--Thanatos--
New Member
- Reaction score
- 33
JASS:
library DataSystem
function DataSystem_H2I takes handle h returns integer
return h
return 0
endfunction
//! textmacro DataSystem_Declare takes NAME, TYPE
globals
public $TYPE$ array $NAME$1
public $TYPE$ array $NAME$2
public $TYPE$ array $NAME$3
endglobals
function Set$NAME$ takes handle h, $TYPE$ v returns nothing
local integer i=DataSystem_H2I(h)-0x100000
if (i<8191) then
set $NAME$1<i>=v
elseif (i<16382) then
set $NAME$2[i-8191]=v
elseif (i<24573) then
set $NAME$3[i-16382]=v
endif
endfunction
function Get$NAME$ takes handle h returns $TYPE$
local integer i=DataSystem_H2I(h)-0x100000
if (i<8191) then
return $NAME$1<i>
elseif (i<16382) then
return $NAME$2[i-8191]
endif
return $NAME$3[i-16832]
endfunction
//! endtextmacro
//! runtextmacro DataSystem_Declare("Data","integer")
endlibrary
</i></i>
By Grim.
I use this for my map, but it reaches it's limit a lot of times. Any better way?