2009-09-12 23:13:02 +00:00
|
|
|
// m32 script test & show-off file
|
|
|
|
// do "include a" in the console
|
|
|
|
|
|
|
|
include names.h
|
|
|
|
|
|
|
|
gamevar i 0 1 // per-block (top-level, event, or state) variable
|
|
|
|
gamevar j 0 1
|
|
|
|
|
|
|
|
gamevar davr 65536 0
|
|
|
|
gamevar dayx 65536 0
|
|
|
|
|
2009-09-16 22:24:24 +00:00
|
|
|
define TQUOTE 3
|
|
|
|
|
2009-09-12 23:13:02 +00:00
|
|
|
definequote 0 OK
|
|
|
|
definequote 1 DAMN
|
|
|
|
|
2009-09-16 22:24:24 +00:00
|
|
|
definequote 2 BU:%d ABS:%d
|
|
|
|
definequote TQUOTE write on me!
|
|
|
|
|
|
|
|
definequote 4 ASPECT: VR=%d, YX=%d
|
|
|
|
definequote 5 KEY:%d
|
|
|
|
|
2009-09-12 23:13:02 +00:00
|
|
|
gamearray ar 128
|
|
|
|
gamearray parm 8
|
|
|
|
|
|
|
|
defstate artest
|
|
|
|
for j range 128
|
|
|
|
set ar[j] j
|
|
|
|
set i 0
|
|
|
|
for j range 128
|
|
|
|
add i ar[j]
|
|
|
|
ife i 8128 quote 0 else quote 1
|
|
|
|
ends
|
|
|
|
|
|
|
|
defstate setas
|
|
|
|
set j dayx
|
|
|
|
mul j ydim mul j 8
|
|
|
|
div j xdim div j 5
|
|
|
|
setaspect davr j
|
|
|
|
ends
|
|
|
|
|
|
|
|
onevent EVENT_ANALYZESPRITES
|
|
|
|
for i drawnsprites
|
|
|
|
ifactor LIZTROOP spritepal 6
|
|
|
|
endevent
|
|
|
|
|
|
|
|
onevent EVENT_ENTER3DMODE
|
|
|
|
state setas
|
|
|
|
endevent
|
|
|
|
|
2009-09-16 22:24:24 +00:00
|
|
|
onevent EVENT_DRAW2DSCREEN
|
|
|
|
set drawlinepat -1
|
|
|
|
for i allsprites
|
|
|
|
ifactor LIZTROOP
|
|
|
|
drawcircle16b sprite[i].x sprite[i].y 256 9
|
|
|
|
// set i totalclock
|
|
|
|
// shiftr i 6
|
|
|
|
// drawcircle16b posx posy 256 i
|
|
|
|
// set j i
|
|
|
|
// add j 8
|
|
|
|
// drawcircle16 halfxdim16 midydim16 12 j
|
|
|
|
// qsprintf 3 2 i j
|
|
|
|
// printmessage16 3
|
|
|
|
endevent
|
|
|
|
|
|
|
|
onevent EVENT_OVERHEADEDITOR
|
|
|
|
|
|
|
|
for i range 27
|
|
|
|
{
|
|
|
|
ifkey alphakeys[i]
|
|
|
|
{
|
|
|
|
qsprintf TQUOTE 5 i
|
|
|
|
quote TQUOTE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for i range 10
|
|
|
|
// ife 0 1
|
|
|
|
{
|
|
|
|
ifkey numberkeys[i]
|
|
|
|
{
|
|
|
|
qsprintf TQUOTE 5 i
|
|
|
|
quote TQUOTE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
endevent
|
|
|
|
|
|
|
|
onevent EVENT_KEYS3D
|
|
|
|
for i range 10
|
|
|
|
// ife 0 1
|
|
|
|
{
|
|
|
|
ifkey numberkeys[i]
|
|
|
|
{
|
|
|
|
qsprintf TQUOTE 5 i
|
|
|
|
quote TQUOTE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ifkey KEY_SPACE
|
|
|
|
// ife 0 1
|
|
|
|
{
|
|
|
|
ifeithershift sub davr 512 else add davr 512
|
|
|
|
ifl davr 32768 set davr 32768
|
|
|
|
ifg davr 256000 set davr 256000
|
|
|
|
setaspect davr yxaspect
|
|
|
|
qsprintf TQUOTE 4 davr yxaspect
|
|
|
|
quote TQUOTE
|
|
|
|
}
|
|
|
|
endevent
|
|
|
|
|
2009-09-12 23:13:02 +00:00
|
|
|
defstate itertest
|
|
|
|
for i spritesofsector searchsector
|
|
|
|
// ife sprite[i].picnum AMMO set sprite[i].picnum BATTERYAMMO
|
|
|
|
ifactor parm[0] cactor parm[1]
|
|
|
|
ends
|