From dee8dbe09221b235e5bb8628f3b2af01687355ce Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 9 Jun 2013 16:37:13 +0000 Subject: [PATCH] Lunatic: rename bitint members to *bits instead of *x. git-svn-id: https://svn.eduke32.com/eduke32@3864 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/lunatic/defs.ilua | 2 +- polymer/eduke32/source/lunatic/defs_common.lua | 3 +-- polymer/eduke32/source/lunatic/test.elua | 11 ++++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index f86a1565d..b962487f9 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -147,7 +147,7 @@ defs_c.bitint_new_struct_type("int32_t", "SBit32") -- for external exposure. local ACTOR_STRUCT = [[ __attribute__((packed)) struct { - const int32_t t_data[10]; // 56b sometimes used to hold offsets to con code + const int32_t t_data[10]; const struct move mv; const struct action ac; const int16_t _padding[1]; diff --git a/polymer/eduke32/source/lunatic/defs_common.lua b/polymer/eduke32/source/lunatic/defs_common.lua index 8accb0e2e..c894d83ef 100644 --- a/polymer/eduke32/source/lunatic/defs_common.lua +++ b/polymer/eduke32/source/lunatic/defs_common.lua @@ -110,8 +110,7 @@ function bitint_new_struct_type(basetypename, newtypename) end function bitint_member(bitint_struct_typename, membname) - -- XXX: rename to '~bits' instead of '~x'? - return string.format("union { %s %s; %s %sx; };", + return string.format("union { %s %s; %s %sbits; };", bitint_to_base_type[bitint_struct_typename], membname, bitint_struct_typename, membname) end diff --git a/polymer/eduke32/source/lunatic/test.elua b/polymer/eduke32/source/lunatic/test.elua index 854b2b4cb..1f4efb804 100644 --- a/polymer/eduke32/source/lunatic/test.elua +++ b/polymer/eduke32/source/lunatic/test.elua @@ -60,8 +60,8 @@ if (vol ~= 4) then sector[i].ceilingpal = 2; local ceil = sec.ceiling ceil.shade = sector[i].ceiling.shade + 8 - ceil.statx:flip(SF.SMOOSH) - sec.floorstatx:flip(SF.SWAPXY) + ceil.statbits:flip(SF.SMOOSH) + sec.floorstatbits:flip(SF.SWAPXY) end end @@ -392,10 +392,11 @@ gameactor(1680, AF.chain_end+AF.enemy, 2*TROOPSTRENGTH, "TROOPSTAND", -- LIZTROO local actr = actor[i] if (actr:get_count() % 30 == 0) then - spr.cstatx:flip(CS.YFLIP) + spr.cstatbits:flip(CS.YFLIP) end - actr.flagsx:test(AF.NVG) -- test of bitint's ":test()" for actor[].flags + -- Test of bitint's ":test()" for actor[].flags. + actr.flagsbits:test(AF.NVG) if (dist < 4096) then -- Duke Vader / Anakin Nukewalker? @@ -462,7 +463,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.TRANS_BITMASK) + tspr2.cstatbits:set(CS.TRANS_BITMASK) end end end)