-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleanmem.scr
40 lines (37 loc) · 878 Bytes
/
cleanmem.scr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
//cleanmem_init( [free-switch] );
//If argument0 = 1, the dll will free the dll, as opposed to init it.
//call cleanmem_init(1); at the end of the game.
{
var dll;
dll = "CleanMem.dll"; //Incase you have it under a different directory
if (argument0)
{
external_free(dll);
exit;
}
global._cleanmem = external_define(dll,"halo_shg_clean",dll_cdecl,ty_real,0);
global._cleanmem_get_mem = external_define(dll,"halo_shg_get_mem",dll_cdecl,ty_real,0);
return 0;
}
cleanmem
//Clean Memory DLL
//Halo Shg
//
//result = cleanmem();
//
//Returns zero if fails
//nonzero if succeeds.
{
return ( external_call(global._cleanmem) );
}
cleanmem_get_mem
//Clean Memory DLL
//Halo Shg
//
//mem = cleanmem_get_mem();
//
//Returns 0 if fails, or memory in bytes if succeeds.
{
return ( external_call(global._cleanmem_get_mem) );
}