mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Lunatic: slightly cleaner weapondata_t access.
Also, for the embedded translator: don't warn on unrecognized command line opt. git-svn-id: https://svn.eduke32.com/eduke32@3590 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
904a26e045
commit
700d9cef0c
2 changed files with 7 additions and 7 deletions
|
@ -377,6 +377,10 @@ typedef struct {
|
|||
int32_t shade;
|
||||
} hudweapon_t;
|
||||
|
||||
typedef
|
||||
]].. WEAPONDATA_STRUCT ..[[
|
||||
weapondata_t;
|
||||
|
||||
typedef
|
||||
]].. PROJECTILE_STRUCT ..[[
|
||||
projectile_t;
|
||||
|
@ -394,10 +398,6 @@ typedef struct {
|
|||
int16_t sect;
|
||||
} camera_t;
|
||||
|
||||
typedef struct {
|
||||
]] .. table.concat(con_lang.wdata_members, ';')..';' .. [[
|
||||
} weapondata_t;
|
||||
|
||||
enum
|
||||
{
|
||||
MAXMOUSEBUTTONS = 10,
|
||||
|
@ -738,7 +738,7 @@ end
|
|||
local actor_ptr_ct = ffi.typeof("$ *", ffi.typeof(strip_const(ACTOR_STRUCT)))
|
||||
local player_ptr_ct = ffi.typeof("$ *", ffi.typeof(strip_const(DUKEPLAYER_STRUCT)))
|
||||
local projectile_ptr_ct = ffi.typeof("$ *", ffi.typeof(strip_const(PROJECTILE_STRUCT)))
|
||||
local weapondata_ptr_ct = ffi.typeof("$ *", ffi.typeof(strip_const(WEAPONDATA_STRUCT)))
|
||||
local weapondata_ptr_ct = ffi.typeof("$ *", ffi.typeof((strip_const(WEAPONDATA_STRUCT):gsub(" _"," "))))
|
||||
local con_action_ct = ffi.typeof("con_action_t")
|
||||
local con_move_ct = ffi.typeof("con_move_t")
|
||||
local con_ai_ct = ffi.typeof("con_ai_t")
|
||||
|
@ -936,7 +936,7 @@ local weapondata_mt = {
|
|||
end
|
||||
end
|
||||
|
||||
ffi.cast(weapondata_ptr_ct, wd)['_'..member] = val
|
||||
ffi.cast(weapondata_ptr_ct, wd)[member] = val
|
||||
end,
|
||||
}
|
||||
ffi.metatype("weapondata_t", weapondata_mt)
|
||||
|
|
|
@ -3171,7 +3171,7 @@ local function handle_cmdline_arg(str)
|
|||
ok = true
|
||||
end
|
||||
|
||||
if (not ok) then
|
||||
if (not ffi and not ok) then
|
||||
printf("Warning: Unrecognized option %s", str)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue