Commit Graph

86 Commits

Author SHA1 Message Date
helixhorned 5e5f80d61b Lunatic: keep status number symbols in actor.STAT instead of gv.STAT_*.
git-svn-id: https://svn.eduke32.com/eduke32@3860 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 14:26:30 +00:00
helixhorned 34138cdc96 Lunatic: fix current incarnation of gamevar saving/restoration.
git-svn-id: https://svn.eduke32.com/eduke32@3857 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-07 10:18:17 +00:00
helixhorned f8c04673b4 Lunatic: tweak sector.STAT.* and other names a little.
git-svn-id: https://svn.eduke32.com/eduke32@3851 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-06 11:22:35 +00:00
helixhorned 75313a78c8 Lunatic: sector[].ceiling/.floor gets a reference to a ceiling-or-floor struct.
Also, make sector[].*stat a bitint type.

Now, a piece of code could look like this:
local sec = sector[i]
local ceil = sec.ceiling
ceil.statx:flip(sector.STAT.SMOOSH)

git-svn-id: https://svn.eduke32.com/eduke32@3844 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:43 +00:00
helixhorned 51ad20eda5 Lunatic: fix a couple of oversights, tweak some stuff.
git-svn-id: https://svn.eduke32.com/eduke32@3843 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 20:09:42 +00:00
helixhorned 4ed1eaa520 Lunatic: accept any number of *.lua modules on the command line.
There's no option letter for loading them, and the extension is checked
case sensitively. Lua modules are loaded after CON translated to Lua.
Also remove -testlua option.

git-svn-id: https://svn.eduke32.com/eduke32@3788 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-19 19:29:16 +00:00
helixhorned f95967fad7 Lunatic: remove old gamevar/serialization code.
git-svn-id: https://svn.eduke32.com/eduke32@3771 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-15 18:32:52 +00:00
helixhorned ec5cd930e0 Lunatic: fix test.elua after map-int VX and one rename, add one microbenchmark.
git-svn-id: https://svn.eduke32.com/eduke32@3664 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-12 11:59:29 +00:00
helixhorned bbdc035335 Lunatic: replace DukePlayer_t set-member methods with metatable magic.
So that members needing it are checked when they're assigned to using the
usual syntax. What kind of check to perform (sector, player, ... x whether
negative values are allowed) is written in a declarative fashion inside the
C declaration.

Also, make Lunatic's MAXQUOTES be C's OBITQUOTEINDEX and bound-check an
access of sprite[p->wackedbyplayer] in the C code.

git-svn-id: https://svn.eduke32.com/eduke32@3653 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:41 +00:00
helixhorned abcc98d5c1 Lunatic: access to show2dsector[], fix some permit-negative bound checks.
git-svn-id: https://svn.eduke32.com/eduke32@3650 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-07 15:20:28 +00:00
helixhorned 6ebe2d4745 Lunatic: custom integer types treated as bitfields.
Used for engine struct's (c)stat and actor[].flags members.

git-svn-id: https://svn.eduke32.com/eduke32@3643 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:10 +00:00
helixhorned 49290a090c Lunatic: make palette_t a bcarray-generated type, various tweaks.
- Increase LuaJIT max. machine code limit to 10 MiB

git-svn-id: https://svn.eduke32.com/eduke32@3641 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:53:03 +00:00
helixhorned 512b9286fe LunaCON: ifsquished.
git-svn-id: https://svn.eduke32.com/eduke32@3640 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-05 17:52:59 +00:00
helixhorned e63874d011 Lunatic: chaining of actor callback functions.
For events and actors, a flag can be now passed whether to chain the new
function at the beginning or end of an already existing one, or to replace
it entirely.
Also, for the translator, add option -fno-error-nostate, disabled by default.

git-svn-id: https://svn.eduke32.com/eduke32@3629 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-31 18:58:04 +00:00
helixhorned efbc4cec90 Lunatic: actor usertypes from CON, set SFLAGs as 2nd gameactor() arg in Lua.
In passing, fix a couple of omissions: gameactor() being passed nil's in the
middle, more than one moveflag to CON *actor.

git-svn-id: https://svn.eduke32.com/eduke32@3597 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:53:28 +00:00
helixhorned ad55e2d424 Lunatic: make ivec3 and dvec3 types share same metatable, orthogonalize API.
Specifically, remove ivec3's blen1() method and add from/to BUILD coordinate
(z scaled by 16) conversion methods.

git-svn-id: https://svn.eduke32.com/eduke32@3591 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:27 +00:00
helixhorned 904a26e045 Clean up mdsprite.c:voxdraw() a little.
git-svn-id: https://svn.eduke32.com/eduke32@3589 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 10:20:14 +00:00
helixhorned ef464f2a1d Lunatic: allow indexing some weapon/inventory arrays with their names.
git-svn-id: https://svn.eduke32.com/eduke32@3564 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-15 16:56:19 +00:00
helixhorned 1606c17a77 Lunatic: fixups and debugging helpers.
- add LuaJIT's 'v' module printing trace info
- translator: fix game function name definitions
- revert math.fmod -> math.modf, they are different!
- disable JIT compilation for a function we're getting strange crashes with
- Make some of DukePlayer_t's members 'bool' on the Lua side. It's way
  too easy to write something like "ps.jetpack_on" where "ps.jetpack_on~=0"
  was meant. [Background: Kyle873 observed that Duke was always floating.]
- Error out if looping in our_module(). I find this behavior more logical
  than returning true.
- fix a couple of missed FORBID variables

git-svn-id: https://svn.eduke32.com/eduke32@3530 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-28 17:30:04 +00:00
helixhorned f791b5af20 Lunatic: sector[]:zrangeat(), 'getzrange' command for the translator.
Also, fix quote commands there.

git-svn-id: https://svn.eduke32.com/eduke32@3524 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-25 15:31:13 +00:00
helixhorned 185f0a8cc4 Lunatic translator: text rendering and other niceties.
git-svn-id: https://svn.eduke32.com/eduke32@3501 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 16:07:42 +00:00
helixhorned 2d61216758 Lunatic translator: sprite list commands, findnear*, protect player[].ftq.
git-svn-id: https://svn.eduke32.com/eduke32@3498 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 16:07:32 +00:00
helixhorned a3b3804a08 Lunatic: more commands, timing test for xmath's sine functions.
git-svn-id: https://svn.eduke32.com/eduke32@3489 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-16 18:53:15 +00:00
helixhorned 605de9f6d1 Lunatic: input access.
git-svn-id: https://svn.eduke32.com/eduke32@3477 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-10 16:24:44 +00:00
helixhorned fab00b4750 Lunatic: sprite.change{sect,stat}, access to more members, member read test.
git-svn-id: https://svn.eduke32.com/eduke32@3475 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-10 16:24:32 +00:00
helixhorned 35802d7e41 Lunatic: [gs]et{player,actor}var, access to protected projectile members.
git-svn-id: https://svn.eduke32.com/eduke32@3469 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-10 16:23:59 +00:00
helixhorned 90793f6a67 Lunatic: working tsprite methods, static members, struct array timing test.
git-svn-id: https://svn.eduke32.com/eduke32@3468 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-10 16:23:54 +00:00
helixhorned 5e4edcaaa8 Lunatic (translator): thisprojectile, *shoot.
git-svn-id: https://svn.eduke32.com/eduke32@3466 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-07 21:01:18 +00:00
helixhorned 7c861cac42 Rework how the z velocity is passed from *zshoot to A_Shoot().
Previously, actor[].shootzvel (implementation detail, not available to CON)
was checked, and if it was !=0, that was the overridden velocity. The value
0 meant "hardcoded, projectile-dependent velocity". But that neccesiated a
hack where if zvel 0 was passed and really meant, it needed to be set to
1 instead.  Now we have A_ShootWithZvel() taking an additional last argument
plus a macro SHOOT_HARDCODED_ZVEL permissible for that argument.

git-svn-id: https://svn.eduke32.com/eduke32@3465 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-07 21:01:12 +00:00
helixhorned b92edcc798 Lunatic: projectiles...
git-svn-id: https://svn.eduke32.com/eduke32@3463 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-07 21:01:03 +00:00
helixhorned d5c62b7de3 Lunatic translator: codegen for actor-tsprite accesses, sync some RO members.
git-svn-id: https://svn.eduke32.com/eduke32@3454 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-03 12:48:06 +00:00
helixhorned 163c019209 Lunatic: provide access to actor-tsprite.
git-svn-id: https://svn.eduke32.com/eduke32@3452 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-01 13:05:20 +00:00
helixhorned f95b6fddb5 Lunatic translator: codegen for some "method-like" member write accesses.
git-svn-id: https://svn.eduke32.com/eduke32@3444 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-01 13:04:52 +00:00
helixhorned ba8c6e487d Lunatic: use bcarray types to guard accesses to arrays inside structs.
git-svn-id: https://svn.eduke32.com/eduke32@3435 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-26 17:07:44 +00:00
helixhorned 142e36d6f4 Lunatic: cmdline switch to run test script, compile out more code, 2 more GVs.
git-svn-id: https://svn.eduke32.com/eduke32@3415 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:06 +00:00
helixhorned 7acd1ad743 Lunatic: more convenient weapon data access.
git-svn-id: https://svn.eduke32.com/eduke32@3407 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:28:43 +00:00
helixhorned fbaa00665d Lunatic: various.
- Fix "gv" access.
- camera
- translator: comparison predicates, predefs...

git-svn-id: https://svn.eduke32.com/eduke32@3406 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-19 18:28:40 +00:00
helixhorned 39ce7aee62 Lunatic: codegen beyond milestone 1.
- weapon data
- changing ones... (locals for now)
- operators

git-svn-id: https://svn.eduke32.com/eduke32@3392 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-13 16:40:32 +00:00
helixhorned 51c5afaae6 Lunatic: a couple of small changes.
git-svn-id: https://svn.eduke32.com/eduke32@3380 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-06 18:56:45 +00:00
helixhorned 80ee967b8e Lunatic: beginning to glue things together. Introducing LUNATIC_ONLY.
git-svn-id: https://svn.eduke32.com/eduke32@3343 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 15:21:24 +00:00
helixhorned cc090a2ea8 Lunatic: sinking in code.
git-svn-id: https://svn.eduke32.com/eduke32@3324 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-28 17:18:02 +00:00
helixhorned fa2ac57674 Lunatic: event chaining.
git-svn-id: https://svn.eduke32.com/eduke32@3320 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-25 16:13:45 +00:00
helixhorned 41bfa1b841 Lunatic: print -> OSD_Printf, error reporting.
git-svn-id: https://svn.eduke32.com/eduke32@3319 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-25 16:13:41 +00:00
helixhorned 4ea9f799b1 Lunatic: more complete gameactor(), misc. translator tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@3315 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-23 19:24:16 +00:00
helixhorned 76b970e547 Lunatic: implement the non-local control flow needed for some commands.
git-svn-id: https://svn.eduke32.com/eduke32@3250 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:59 +00:00
helixhorned b850d04f8d Lunatic: Makefile tweaks, protect sprite[].picnum.
git-svn-id: https://svn.eduke32.com/eduke32@3248 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:50 +00:00
helixhorned dacf2695ff Lunatic: better protection of array members inside structs.
git-svn-id: https://svn.eduke32.com/eduke32@3227 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:18:52 +00:00
helixhorned 8293e72a95 Lunatic translator: rework how composites are passed around.
git-svn-id: https://svn.eduke32.com/eduke32@3226 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-25 13:18:46 +00:00
helixhorned ed0e73c84a Lunatic: update structures, find maps case-insensitively in findmaps.sh.
git-svn-id: https://svn.eduke32.com/eduke32@3109 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-03 19:32:43 +00:00
helixhorned 8f89c89d86 Lunatic: various tweaks and API changes/additions.
git-svn-id: https://svn.eduke32.com/eduke32@3063 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:26:24 +00:00