From 4781eecdb49ec3734a751d5ca2f72ace33693ed3 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 24 May 2013 13:54:29 +0000 Subject: [PATCH] LunaCON: partially sync with r3803, link with lpeg.a (update to LPeg 0.12). For pre-1.3 CONs, determining the older script version with gamestartup and/or definelevelname is not implemented. git-svn-id: https://svn.eduke32.com/eduke32@3806 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile | 2 +- polymer/eduke32/source/lunatic/lunacon.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 60e31c6b6..26a560dc1 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -147,7 +147,7 @@ ifneq (0,$(LUNATIC)) EDITOROBJS+= $(OBJ)/lunatic_m32.$o $(LUNATIC_COMMON_OBJS) GAMEOBJS+= $(OBJ)/lunatic_game.$o $(LUNATIC_COMMON_OBJS) - GAMEOBJS+= $(OBJ)/../lpeg.$o # TEMP + GAMEOBJS+= $(OBJ)/../lpeg.a # TEMP GAMEOBJS+= $(OBJ)/luaJIT_BC_con_lang.$o \ $(OBJ)/luaJIT_BC_lunacon.$o \ $(OBJ)/luaJIT_BC_geom.$o \ diff --git a/polymer/eduke32/source/lunatic/lunacon.lua b/polymer/eduke32/source/lunatic/lunacon.lua index 77c287c7d..93a1d42cc 100644 --- a/polymer/eduke32/source/lunatic/lunacon.lua +++ b/polymer/eduke32/source/lunatic/lunacon.lua @@ -867,6 +867,7 @@ local function reset_gamedata() g_data.music = {} end +-- TODO: PRE13 has no (3D Realms time). function Cmd.definelevelname(vol, lev, fn, ptstr, dtstr, levname) if (not (vol >= 0 and vol < conl.MAXVOLUMES)) then errprintf("volume number exceeds maximum volume count.") @@ -1013,6 +1014,7 @@ end function Cmd.gamestartup(...) local args = {...} + -- TODO: PRE13: detection of other g_scriptVersion. if (#args ~= 26 and #args ~= 30) then errprintf("must pass either 26 (1.3D) or 30 (1.5) values") return @@ -1934,6 +1936,8 @@ local Cinner = { / SPS".cstat=%1", clipdist = cmd(D) / SPS".clipdist=%1", + shadeto = cmd(D) / -- PRE13 + "", sizeto = cmd(D,D) / "_con._sizeto(_aci,%1,%2)", -- TODO: see control.lua:_sizeto sizeat = cmd(D,D) @@ -2053,6 +2057,8 @@ local Cinner = { / handle.debug, endofgame = cmd(D) / "_con._endofgame(_pli,%1)", + endoflevel = cmd(D) -- PRE13 + / "_con._endofgame(_pli,%1)", lotsofglass = cmd(D) / "_con._A_SpawnGlass(_aci,%1)", mail = cmd(D) @@ -2269,6 +2275,8 @@ local Cinner = { activatebysector = cmd(R,R) / "_con._activatebysector(%1,%2)", + activate = cmd(D) -- PRE13, THISACTOR already translated to cur. player + / "_con._operateactivators(%d,_pli)", operateactivators = cmd(R,R) -- THISACTOR / function(tag, pli) return format("_con._operateactivators(%s,%s)", tag, thisactor_to_pli(pli)) @@ -2418,6 +2426,8 @@ local Cif = { / format("(%s-%s)<=256*%%1", SPS".z", ACS".ceilingz"), ifphealthl = cmd(D) / format("sprite[%s].extra<%%1", PLS".i"), + ifplayersl = cmd(D) -- PRE13 + / "1<%1", -- TODO_MP ifspritepal = cmd(D) / SPS".pal==%1", ifgotweaponce = cmd(D)