Login
Register
Menu
Home
Forum
JassDoc
Types
Functions
Variables
Help
Chat
Media
Search
Search posts
WC3 JASS.com
"The Jass Vault" plus vJASS and Zinc
WC3 Modding Information Center
Forum
Warcraft (WC3) Modding
Warcraft III Resources
Warcraft III Spells and Systems
Codes & Snippets
WorldBounds
Warcraft III:
Maps
Models
Skins
Icons
Spells / Systems
Tools
Tutorials
Snippets
JASS vJASS Spells and Systems
Tutorials
Chat @Discord
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation
-
Zinc documentation
-
WC3 Optimizer documentation
WorldBounds
Codes & Snippets
Started by
moyack
Views
4859
Replies
0
Users
1
1
Pages:
1
Go Down
0 Members and 1 Guest are viewing this topic.
nestharus
Newbie - level 2
Posts:
23
WC3 Models: 0
WC3 Tutorials: 0
WC3 Tools: 0
WC3 Maps: 0
WC3 Skins: 0
WC3 Icons: 0
WC3 Spells: 0
Reputation:
20
User
WorldBounds
on:
February 21, 2012, 10:26:47 PM
Category:
Geometry
Language:
vJASS
Code: jass
library
WorldBounds
/* v2.0.0.0
************************************************************************************
*
* struct WorldBounds extends array
*
* Fields
* -------------------------
*
* readonly static integer maxX
* readonly static integer maxY
* readonly static integer minX
* readonly static integer minY
*
* readonly static integer centerX
* readonly static integer centerY
*
* readonly static rect world
* readonly static region worldRegion
*
************************************************************************************/
private
module
WorldBoundInit
private
static
method
onInit
takes
nothing
returns
nothing
set
world=
GetWorldBounds
()
set
maxX =
R2I
(
GetRectMaxX
(world))
set
maxY =
R2I
(
GetRectMaxY
(world))
set
minX =
R2I
(
GetRectMinX
(world))
set
minY =
R2I
(
GetRectMinY
(world))
set
centerX =
R2I
((maxX + minX)/2)
set
centerY =
R2I
((minY + maxY)/2)
set
worldRegion =
CreateRegion
()
call
RegionAddRect
(worldRegion, world)
endmethod
endmodule
struct
WorldBounds
extends
array
readonly
static
integer
maxX
readonly
static
integer
maxY
readonly
static
integer
minX
readonly
static
integer
minY
readonly
static
integer
centerX
readonly
static
integer
centerY
readonly
static
rect
world
readonly
static
region
worldRegion
implement
WorldBoundInit
endstruct
endlibrary
«
Last Edit: December 19, 2017, 01:03:41 AM by moyack
»
Print
Pages:
1
Go Up
« previous
next »
WC3 Modding Information Center
Forum
Warcraft (WC3) Modding
Warcraft III Resources
Warcraft III Spells and Systems
Codes & Snippets
WorldBounds
Suggested Topics
[functions] GetWorldBounds
Started by
City17
Replies: 0
Views: 321
Jassdoc
PortaMx-SEF 1.54
|
PortaMx © 2008-2015
,
PortaMx corp.
Search
Username
Password
Always stay logged in
Forgot your password?