Lunatic/m32: make Mapster23 actually start stand-alone, oops.

git-svn-id: https://svn.eduke32.com/eduke32@4238 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-01-02 00:08:36 +00:00
parent 49de6d79b3
commit e71df2b6e3
4 changed files with 14 additions and 4 deletions

View file

@ -471,7 +471,7 @@ $(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.lua
$(COMPILE_STATUS)
if $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
# Same thing for defs.ilua which I'm too reluctant to rename now:
# Same thing for defs*.ilua which I'm too reluctant to rename now:
# NOTE: The target path must match EXACTLY with that of the DEFS_BC_SIZE
# determination in Makefile.common, because it is embedded into the bytecode as
# debugging information.

View file

@ -479,10 +479,16 @@ ifneq ($(LUNATIC),0)
ifndef DEFS_BC_SIZE
DEFS_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(MAKEFILE_COMMON_DIR)/source/lunatic/defs.ilua -)
DEFS_BC_SIZE := $(word 3, $(DEFS_BC_SIZE))
# Pass the bytecode size to the sub-makes, too.
# Pass it to the sub-makes, too.
export DEFS_BC_SIZE
endif
BASECOMMONFLAGS+= -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE)
# Determine size of defs_m32.ilua bytecode once.
ifndef DEFS_M32_BC_SIZE
DEFS_M32_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(MAKEFILE_COMMON_DIR)/source/lunatic/defs_m32.ilua -)
DEFS_M32_BC_SIZE := $(word 3, $(DEFS_M32_BC_SIZE))
export DEFS_M32_BC_SIZE
endif
BASECOMMONFLAGS+= -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE) -DLUNATIC_DEFS_M32_BC_SIZE=$(DEFS_M32_BC_SIZE)
ifeq ($(PLATFORM),WINDOWS)
BASELIBS+= -lluajit

View file

@ -10507,7 +10507,10 @@ int32_t ExtInit(void)
#ifdef LUNATIC
if (Em_CreateState(&g_EmState) == 0)
{
i = L_RunOnce(&g_EmState, "defs_m32.ilua");
extern const char luaJIT_BC_defs_m32[];
i = L_RunString(&g_EmState, (char *)luaJIT_BC_defs_m32, 0,
LUNATIC_DEFS_M32_BC_SIZE, "defs_m32.ilua");
if (i != 0)
{
Em_DestroyState(&g_EmState);

View file

@ -90,6 +90,7 @@ OSD_Printf;
crc32once;
luaJIT_BC_defs_m32;
luaJIT_BC_defs_common;
luaJIT_BC_engine_maptext;
luaJIT_BC_engine;