mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Lunatic: update structures, find maps case-insensitively in findmaps.sh.
git-svn-id: https://svn.eduke32.com/eduke32@3109 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e6fdb25d6d
commit
ed0e73c84a
5 changed files with 26 additions and 7 deletions
|
@ -172,6 +172,7 @@ typedef struct {
|
|||
int32_t truefz, truecz, player_par;
|
||||
int32_t randomflamex, exitx, exity;
|
||||
int32_t runspeed, max_player_health, max_shield_amount;
|
||||
int32_t autostep, autostep_sbw;
|
||||
|
||||
uint32_t interface_toggle_flag;
|
||||
|
||||
|
@ -259,7 +260,7 @@ typedef struct {
|
|||
int32_t pcolor, pteam;
|
||||
uint8_t frags[MAXPLAYERS], wchoice[MAX_WEAPONS];
|
||||
|
||||
char vote, gotvote, pingcnt, playerquitflag;
|
||||
char vote, gotvote, pingcnt, playerquitflag, ready;
|
||||
char user_name[32];
|
||||
uint32_t revision;
|
||||
} playerdata_t;
|
||||
|
@ -274,6 +275,7 @@ enum
|
|||
NUMGAMEFUNCTIONS = 56,
|
||||
};
|
||||
|
||||
// NOTE: not packed!
|
||||
typedef struct {
|
||||
vec3_t camera;
|
||||
int32_t const_visibility,uw_framerate;
|
||||
|
@ -428,9 +430,19 @@ string.dump = nil
|
|||
|
||||
|
||||
-- sanity-check struct type sizes
|
||||
local good = true
|
||||
for i=0,6 do
|
||||
assert(ffi.sizeof(ffi.string(ffiC.g_sizes_of_what[i]))
|
||||
== ffiC.g_sizes_of[i])
|
||||
local what = ffi.string(ffiC.g_sizes_of_what[i])
|
||||
local fsz = ffi.sizeof(what)
|
||||
local csz = ffiC.g_sizes_of[i]
|
||||
print(i..": "..what..": C sizeof = "..tostring(csz)..", FFI sizeof = "..tostring(fsz))
|
||||
if (fsz ~= csz) then
|
||||
good = false;
|
||||
end
|
||||
end
|
||||
|
||||
if (not good) then
|
||||
error("Some sizes don't match between C and LuaJIT/FFI.")
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,4 @@ if [ -z "$ok" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
find -L "$1" -name '*.map' -print0 | xargs -0 ./foreachmap.lua "-e$2"
|
||||
find -L "$1" -iname '*.map' -print0 | xargs -0 ./foreachmap.lua "-e$2"
|
||||
|
|
|
@ -140,8 +140,8 @@ checkfail('print(nextspritesect[4].whatfield)', "attempt to index a number value
|
|||
-- creating new keys forbidden... handled by LuaJit
|
||||
checkfail('wall[4].QWE = 123', "has no member named 'QWE'")
|
||||
|
||||
-- our 'require' disallows importing such dangerous stuff
|
||||
checkfail("require('os')")
|
||||
-- our 'require' has only safe stuff
|
||||
--checkfail("require('os')")
|
||||
|
||||
-- we must declare globals with 'gamevar'
|
||||
checkfail("new_global = 345", "attempt to write to undeclared variable 'new_global'")
|
||||
|
|
|
@ -10,10 +10,15 @@ local BAR1x5 = 3163
|
|||
|
||||
local function draw_hline_dotted(x1, x2, y, pal,stat)
|
||||
for x=x1,x2,2 do
|
||||
local pl = player[0]
|
||||
local tile = (x==x1 or x==x2) and BAR1x5 or DOT1x5
|
||||
if (player[0].curr_weapon==2) then
|
||||
|
||||
if (pl.curr_weapon==2) then
|
||||
x = x + 16*math.sin(2*math.pi*gv.totalclock/120)
|
||||
elseif (pl.curr_weapon==1) then
|
||||
x = x + (pl.ang - 1024)/100
|
||||
end
|
||||
|
||||
rs(x,y, 65536, 0, tile, 0,pal,stat, 0,0,gv.xdim-1,gv.ydim-1)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -141,6 +141,7 @@ typedef struct {
|
|||
// * int16_t --> int8_t
|
||||
// * char --> int8_t
|
||||
// Need to carefully think about implications!
|
||||
// KEEPINSYNC lunatic/defs.ilua
|
||||
typedef struct {
|
||||
vec3_t pos, opos, vel, npos;
|
||||
int32_t bobposx, bobposy;
|
||||
|
@ -213,6 +214,7 @@ typedef struct {
|
|||
int8_t extbits, filler; // 2b
|
||||
} input_t;
|
||||
|
||||
// KEEPINSYNC lunatic/defs.ilua
|
||||
typedef struct {
|
||||
DukePlayer_t *ps;
|
||||
input_t *sync;
|
||||
|
|
Loading…
Reference in a new issue