Created
August 1, 2021 07:28
-
-
Save Ruin0x11/49047bd7a711f3a79616b2aad4da4901 to your computer and use it in GitHub Desktop.
hsplua test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "hsplua.as" | |
hl_newstate 0 | |
hl_switchstate 0 | |
hl_pushfunction *dolog | |
hl_setglobal "dolog" | |
hl_dostring "g = dolog('tests', 12345, 'test')" | |
hl_getglobal "g" | |
a=hl_tointeger(1) | |
hl_pop | |
dim test, 15 | |
test(0) = 45 | |
test(1) = 46 | |
test(2) = 47 | |
test(3) = 48 | |
hl_pushdim test | |
hl_setglobal "test" | |
hl_dostring "l = #test" | |
hl_dostring "g = test[1]" | |
hl_getglobal "g" | |
a=hl_tointeger(1) | |
hl_pop | |
hl_newtable | |
hl_pushvalue -1 | |
hl_setglobal "hsp" | |
hl_pushfunction *dolog | |
hl_setfield -2, "logmes" | |
hl_pop | |
randomize | |
screen 0,320,240,0 | |
cls 4 | |
buffer 3,320,240,0 | |
cls 4 | |
font "MS ゴシック",40,1 | |
buffer 4,,,0 | |
cls 0 | |
*main | |
gsel 3 | |
gmode 0,320,240 | |
pos 5,5:gzoom 310,230,0 | |
gmode 6,320,240,2 | |
pos 0,0:gcopy 4,0,0 | |
x=rnd(320)-20: y=rnd(240)-20 | |
color rnd(256),rnd(256),rnd(256):pos x,y:mes "●" | |
mes(a) | |
gsel 0 | |
gmode 3,320,240,64 | |
pos 0,0:gcopy 3,0,0 | |
await 20 | |
goto *main | |
stop | |
*dolog | |
s=hl_tostring(1) | |
i=hl_tointeger(2) | |
qw=hl_tostring(3) | |
hl_pop | |
logmes s | |
logmes qw | |
return 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment