mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
LunaCON: implement 'ssp' command.
git-svn-id: https://svn.eduke32.com/eduke32@4149 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b1d6a97db4
commit
78d30bee9b
3 changed files with 25 additions and 2 deletions
|
@ -1498,6 +1498,17 @@ function _movesprite(spritenum, x, y, z, cliptype)
|
||||||
return ffiC.A_MoveSprite(spritenum, vel, cliptype)
|
return ffiC.A_MoveSprite(spritenum, vel, cliptype)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Also known as A_SetSprite().
|
||||||
|
function _ssp(i, cliptype)
|
||||||
|
check_sprite_idx(i)
|
||||||
|
local spr = ffiC.sprite[i]
|
||||||
|
local vec = spr.xvel * bangvec(spr.ang) -- XXX: slightly different rounding?
|
||||||
|
local ivec = vec:toivec3()
|
||||||
|
ivec.z = spr.zvel
|
||||||
|
|
||||||
|
return (ffiC.A_MoveSprite(i, ivec, cliptype)==0)
|
||||||
|
end
|
||||||
|
|
||||||
-- CON's 'setsprite' function on top of the Lunatic-provided ones.
|
-- CON's 'setsprite' function on top of the Lunatic-provided ones.
|
||||||
-- (Lunatic's sprite setting functions have slightly different semantics.)
|
-- (Lunatic's sprite setting functions have slightly different semantics.)
|
||||||
local updatesect = sprite.updatesect
|
local updatesect = sprite.updatesect
|
||||||
|
|
|
@ -303,7 +303,7 @@ local function new_initial_codetab()
|
||||||
"local _div, _mod, _mulTR, _mulWR = _con._div, _con._mod, _con._mulTR, _con._mulWR",
|
"local _div, _mod, _mulTR, _mulWR = _con._div, _con._mod, _con._mulTR, _con._mulWR",
|
||||||
"local _band, _bor, _bxor = _bit.band, _bit.bor, _bit.bxor",
|
"local _band, _bor, _bxor = _bit.band, _bit.bor, _bit.bxor",
|
||||||
"local _lsh, _rsh, _arsh = _bit.lshift, _bit.rshift, _bit.arshift",
|
"local _lsh, _rsh, _arsh = _bit.lshift, _bit.rshift, _bit.arshift",
|
||||||
"local _setsprite = _con._setsprite",
|
"local _setsprite,_ssp = _con._setsprite,_con._ssp",
|
||||||
|
|
||||||
-- * CON "states" (subroutines) and
|
-- * CON "states" (subroutines) and
|
||||||
-- * Switch function table, indexed by global switch sequence number:
|
-- * Switch function table, indexed by global switch sequence number:
|
||||||
|
@ -2751,7 +2751,7 @@ local Cinner = {
|
||||||
spriteflags = cmd(R) -- also see outer
|
spriteflags = cmd(R) -- also see outer
|
||||||
/ ACS".flags=%1",
|
/ ACS".flags=%1",
|
||||||
ssp = cmd(R,R)
|
ssp = cmd(R,R)
|
||||||
/ handle.NYI,
|
/ "_ssp(%1,%2)",
|
||||||
setsprite = cmd(R,R,R,R)
|
setsprite = cmd(R,R,R,R)
|
||||||
/ "_setsprite(%1,_IV(1,%2,%3,%4))",
|
/ "_setsprite(%1,_IV(1,%2,%3,%4))",
|
||||||
updatesector = cmd(R,R,W)
|
updatesector = cmd(R,R,W)
|
||||||
|
|
|
@ -42,3 +42,15 @@ eventloadactor GPSPEED
|
||||||
mulvar ra_temp 4
|
mulvar ra_temp 4
|
||||||
setactor[THISACTOR].lotag ra_temp
|
setactor[THISACTOR].lotag ra_temp
|
||||||
enda
|
enda
|
||||||
|
|
||||||
|
gamevar ii 0 0
|
||||||
|
onevent EVENT_PROCESSINPUT
|
||||||
|
setvar ii 0
|
||||||
|
whilevarvarn ii MAXSPRITES
|
||||||
|
{
|
||||||
|
ifvare sprite[ii].picnum 58 // space suit
|
||||||
|
ssp ii CLIPMASK0
|
||||||
|
|
||||||
|
addvar ii 1
|
||||||
|
}
|
||||||
|
endevent
|
||||||
|
|
Loading…
Reference in a new issue