mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +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
|
||||
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
|
||||
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.
|
||||
|
||||
`-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
|
||||
|
||||
|
||||
module(...)
|
||||
|
||||
|
||||
|
@ -75,15 +76,15 @@ function new(x,y,z,c)
|
|||
s = jkiss(x,y,z,c)
|
||||
end
|
||||
--[[
|
||||
print("TEST")
|
||||
local r=ffi.new("rng_jkiss_t")
|
||||
r.x = 123456789; r.y = 987654321; r.z = 43219876; r.c = 6543217;
|
||||
|
||||
t=gv.gethiticks()
|
||||
for i=1,4*2*1e6 do
|
||||
local N = 1e7
|
||||
local t=ffiC.gethiticks()
|
||||
for i=1,N do
|
||||
ffiC.rand_jkiss_dbl(r)
|
||||
end
|
||||
print("TIME: "..gv.gethiticks()-t) -- x86_64: approx. 100 ms
|
||||
print("RANDGEN TIME: "..ffiC.gethiticks()-t) -- x86_64: approx. 100 ms
|
||||
--]]
|
||||
|
||||
return s
|
||||
|
|
|
@ -18,7 +18,7 @@ local gameactor = gameactor
|
|||
|
||||
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.
|
||||
-- NOTE: for objects that are not supposed to be deleted such as this one, it
|
||||
-- would also be OK to use a plain table.
|
||||
|
@ -51,9 +51,9 @@ gameactor
|
|||
movflags = actor.MOVFLAGS.geth,
|
||||
|
||||
func = function(aci)
|
||||
local spr = sprite[aci]
|
||||
-- NOTE: this is prettier than calling it 'a', even if 'act' is used to
|
||||
-- denote an action in other places:
|
||||
local spr = sprite[aci]
|
||||
local act = actor[aci]
|
||||
|
||||
if (act:has_action(0)) then
|
||||
|
|
|
@ -34,7 +34,7 @@ else
|
|||
end
|
||||
|
||||
-- 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
|
||||
|
||||
local t1 = os.clock()
|
||||
|
|
Loading…
Reference in a new issue