mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Lunatic: a couple of trivial changes.
git-svn-id: https://svn.eduke32.com/eduke32@4021 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bac4265a0b
commit
9acb219721
4 changed files with 9 additions and 8 deletions
|
@ -126,7 +126,7 @@ one.
|
||||||
When enabled, produces an error whenever a global or per-player gamevar is
|
When enabled, produces an error whenever a global or per-player gamevar is
|
||||||
attempted to be read using ++getactorvar++. Otherwise, a warning is emitted. In
|
attempted to be read using ++getactorvar++. Otherwise, a warning is emitted. In
|
||||||
this case, the generated code is either a read of the (global) gamevar, or an
|
this case, the generated code is either a read of the (global) gamevar, or an
|
||||||
access of the _per-player_ gamevar with an actor index, which is probably not
|
access of the per-player gamevar with an actor index, which is probably not
|
||||||
what the coder intended.
|
what the coder intended.
|
||||||
|
|
||||||
`-Wnot-redefined` (default: on)::
|
`-Wnot-redefined` (default: on)::
|
||||||
|
|
|
@ -10,6 +10,7 @@ local decl = decl -- comes from above (defs.ilua)
|
||||||
|
|
||||||
local print = print -- for commented out debug block in new() below
|
local print = print -- for commented out debug block in new() below
|
||||||
|
|
||||||
|
|
||||||
module(...)
|
module(...)
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,15 +76,15 @@ function new(x,y,z,c)
|
||||||
s = jkiss(x,y,z,c)
|
s = jkiss(x,y,z,c)
|
||||||
end
|
end
|
||||||
--[[
|
--[[
|
||||||
print("TEST")
|
|
||||||
local r=ffi.new("rng_jkiss_t")
|
local r=ffi.new("rng_jkiss_t")
|
||||||
r.x = 123456789; r.y = 987654321; r.z = 43219876; r.c = 6543217;
|
r.x = 123456789; r.y = 987654321; r.z = 43219876; r.c = 6543217;
|
||||||
|
|
||||||
t=gv.gethiticks()
|
local N = 1e7
|
||||||
for i=1,4*2*1e6 do
|
local t=ffiC.gethiticks()
|
||||||
|
for i=1,N do
|
||||||
ffiC.rand_jkiss_dbl(r)
|
ffiC.rand_jkiss_dbl(r)
|
||||||
end
|
end
|
||||||
print("TIME: "..gv.gethiticks()-t) -- x86_64: approx. 100 ms
|
print("RANDGEN TIME: "..ffiC.gethiticks()-t) -- x86_64: approx. 100 ms
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|
|
@ -18,7 +18,7 @@ local gameactor = gameactor
|
||||||
|
|
||||||
module(...)
|
module(...)
|
||||||
|
|
||||||
-- Dual-typed per-actor array: <false> if a broken nuke switch is not enabled,
|
-- Dual-typed per-actor array: false if a broken nuke switch is not enabled,
|
||||||
-- start game tic of when it was enabled otherwise.
|
-- start game tic of when it was enabled otherwise.
|
||||||
-- NOTE: for objects that are not supposed to be deleted such as this one, it
|
-- NOTE: for objects that are not supposed to be deleted such as this one, it
|
||||||
-- would also be OK to use a plain table.
|
-- would also be OK to use a plain table.
|
||||||
|
@ -51,9 +51,9 @@ gameactor
|
||||||
movflags = actor.MOVFLAGS.geth,
|
movflags = actor.MOVFLAGS.geth,
|
||||||
|
|
||||||
func = function(aci)
|
func = function(aci)
|
||||||
|
local spr = sprite[aci]
|
||||||
-- NOTE: this is prettier than calling it 'a', even if 'act' is used to
|
-- NOTE: this is prettier than calling it 'a', even if 'act' is used to
|
||||||
-- denote an action in other places:
|
-- denote an action in other places:
|
||||||
local spr = sprite[aci]
|
|
||||||
local act = actor[aci]
|
local act = actor[aci]
|
||||||
|
|
||||||
if (act:has_action(0)) then
|
if (act:has_action(0)) then
|
||||||
|
|
|
@ -34,7 +34,7 @@ else
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Test optional arguments from our_require().
|
-- Test optional arguments from our_require().
|
||||||
printf("Running %s stand-alone with opt arg %s", ourname, tostring(args[2]))
|
printf("Running %s embedded with opt arg %s", ourname, tostring(args[2]))
|
||||||
end
|
end
|
||||||
|
|
||||||
local t1 = os.clock()
|
local t1 = os.clock()
|
||||||
|
|
Loading…
Reference in a new issue