mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Lunatic: tweak sector.STAT.* and other names a little.
git-svn-id: https://svn.eduke32.com/eduke32@3851 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6cc62ea2bf
commit
f8c04673b4
2 changed files with 35 additions and 29 deletions
|
@ -739,56 +739,62 @@ function conststruct(tab)
|
|||
end
|
||||
|
||||
-- Static, non-instance members. Used to hold constants, for example
|
||||
-- sprite.CSTAT.TRANSLUCENT1
|
||||
-- sprite.CSTAT.TRANS1
|
||||
local static_members = { sector={}, wall={}, sprite={} }
|
||||
|
||||
-- XXX: go over these constant names and see if they can be named better.
|
||||
static_members.sector.STAT = conststruct
|
||||
{
|
||||
PARALLAX = 1,
|
||||
SLOPED = 2,
|
||||
XYSWAP = 4,
|
||||
SLOPE = 2,
|
||||
SWAPXY = 4,
|
||||
SMOOSH = 8,
|
||||
XFLIP = 16,
|
||||
YFLIP = 32,
|
||||
FLIPX = 16,
|
||||
FLIPY = 32,
|
||||
RELATIVE = 64,
|
||||
MASKED = 128,
|
||||
MASK = 128,
|
||||
-- NOTE the reversed order
|
||||
TRANSLUCENT2 = 128,
|
||||
TRANSLUCENT1 = 256,
|
||||
TRANSLUCENT_BOTH_BITS = 256+128,
|
||||
BLOCKING = 512,
|
||||
TRANS2 = 128,
|
||||
TRANS1 = 256,
|
||||
BLOCK = 512,
|
||||
HITSCAN = 1024,
|
||||
|
||||
FLIP_BITMASK = 16+32,
|
||||
ORIENT_BITMASK = 4+16+32,
|
||||
TRANS_BITMASK = 128+256,
|
||||
}
|
||||
|
||||
static_members.wall.CSTAT = conststruct
|
||||
{
|
||||
BLOCKING = 1,
|
||||
BLOCK = 1,
|
||||
BOTTOMSWAP = 2,
|
||||
BOTTOMALIGN = 4,
|
||||
XFLIP = 8,
|
||||
MASKED = 16,
|
||||
ALIGNBOTTOM = 4,
|
||||
FLIPX = 8,
|
||||
MASK = 16,
|
||||
ONEWAY = 32,
|
||||
HITSCAN = 64,
|
||||
TRANSLUCENT1 = 128,
|
||||
YFLIP = 256,
|
||||
TRANSLUCENT2 = 512,
|
||||
TRANSLUCENT_BOTH_BITS = 512+128,
|
||||
TRANS1 = 128,
|
||||
FLIPY = 256,
|
||||
TRANS2 = 512,
|
||||
|
||||
FLIP_BITMASK = 8+256,
|
||||
TRANS_BITMASK = 128+512,
|
||||
}
|
||||
|
||||
static_members.sprite.CSTAT = conststruct
|
||||
{
|
||||
BLOCKING = 1,
|
||||
TRANSLUCENT1 = 2,
|
||||
BLOCK = 1,
|
||||
TRANS1 = 2,
|
||||
XFLIP = 4,
|
||||
YFLIP = 8,
|
||||
WALLALIGN = 16,
|
||||
FLOORALIGN = 32,
|
||||
ONESIDED = 64,
|
||||
CENTERED = 128,
|
||||
ALIGNWALL = 16,
|
||||
ALIGNFLOOR = 32,
|
||||
ONESIDE = 64,
|
||||
CENTER = 128,
|
||||
HITSCAN = 256,
|
||||
TRANSLUCENT2 = 512,
|
||||
TRANSLUCENT_BOTH_BITS = 512+2,
|
||||
TRANS2 = 512,
|
||||
|
||||
ALIGN_BITMASK = 16+32,
|
||||
TRANS_BITMASK = 2+512,
|
||||
}
|
||||
|
||||
local bitar = require("bitar")
|
||||
|
|
|
@ -52,7 +52,7 @@ for i = 0, gv.numsectors/2 do
|
|||
local ceil = sec.ceiling
|
||||
ceil.shade = sector[i].ceiling.shade + 8
|
||||
ceil.statx:flip(SF.SMOOSH)
|
||||
sec.floorstatx:flip(SF.XYSWAP)
|
||||
sec.floorstatx:flip(SF.SWAPXY)
|
||||
end
|
||||
|
||||
local vol, lev = gv.currentEpisode()+1, gv.currentLevel()+1
|
||||
|
@ -455,7 +455,7 @@ function(aci)
|
|||
if (tspr2) then
|
||||
tspr2.x = tspr2.x + 512*math.cos(gv.totalclock/60)
|
||||
tspr2.y = tspr2.y + 512*math.sin(gv.totalclock/60)
|
||||
tspr2.cstatx:set(CS.TRANSLUCENT_BOTH_BITS)
|
||||
tspr2.cstatx:set(CS.TRANS_BITMASK)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue