diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index cad462559..432993ec0 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5989,7 +5989,9 @@ static int32_t G_EndOfLevel(void) void app_crashhandler(void) { G_CloseDemoWrite(); +#if !defined LUNATIC VM_ScriptInfo(insptr, 64); +#endif G_GameQuit(); } diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index a7e305246..c735d040b 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -51,8 +51,10 @@ extern "C" { g_numCompilerWarnings++; \ } while (0) +#if !defined LUNATIC extern intptr_t const * insptr; extern void VM_ScriptInfo(intptr_t const *ptr, int32_t range); +#endif extern hashtable_t h_gamefuncs; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index ecef9b76f..dcbca5dd0 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -85,9 +85,9 @@ GAMEEXEC_STATIC void VM_Execute(int32_t loop); } \ } -extern void VM_ScriptInfo(intptr_t const *ptr, int32_t range) -{ #if !defined LUNATIC +void VM_ScriptInfo(intptr_t const *ptr, int32_t range) +{ if (!script) return; @@ -115,11 +115,8 @@ extern void VM_ScriptInfo(intptr_t const *ptr, int32_t range) initprintf("g_errorLineNum: %d, g_tw: %d\n", g_errorLineNum, g_tw); } -#else - UNREFERENCED_PARAMETER(ptr); - UNREFERENCED_PARAMETER(range); -#endif } +#endif static void VM_DeleteSprite(int32_t iActor, int32_t iPlayer) { diff --git a/polymer/eduke32/source/lunatic/control.lua b/polymer/eduke32/source/lunatic/control.lua index 0aeca1702..173d6f8f2 100644 --- a/polymer/eduke32/source/lunatic/control.lua +++ b/polymer/eduke32/source/lunatic/control.lua @@ -442,7 +442,7 @@ function _myos(x, y, zoom, tilenum, shade, orientation, pal) pal = (sect>=0) and sector[sect].floorpal or 0 end - ffiC.G_DrawTileGeneric(x, y, zoom, tilenum, shade, orientation, pal) + ffiC.VM_DrawTileGeneric(x, y, zoom, tilenum, shade, orientation, pal) end function _inittimer(ticspersec) diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index 087fc9ca8..6e31e5f43 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -684,7 +684,7 @@ void P_DoQuote(int32_t q, DukePlayer_t *p); void P_SetGamePalette(DukePlayer_t *player, uint32_t palid, int32_t set); void G_AddUserQuote(const char *daquote); void G_ClearCameraView(DukePlayer_t *ps); -void G_DrawTileGeneric(int32_t x, int32_t y, int32_t zoom, int32_t tilenum, +void VM_DrawTileGeneric(int32_t x, int32_t y, int32_t zoom, int32_t tilenum, int32_t shade, int32_t orientation, int32_t p); void G_InitTimer(int32_t ticspersec); void G_GetTimeDate(int32_t *vals); diff --git a/polymer/eduke32/source/lunatic/dynsymlist b/polymer/eduke32/source/lunatic/dynsymlist index 59cd168f4..f665d8df3 100644 --- a/polymer/eduke32/source/lunatic/dynsymlist +++ b/polymer/eduke32/source/lunatic/dynsymlist @@ -219,7 +219,7 @@ P_DoQuote; P_SetGamePalette; G_AddUserQuote; G_ClearCameraView; -G_DrawTileGeneric; +VM_DrawTileGeneric; G_InitTimer; G_GetTimeDate; G_ToggleWallInterpolation; diff --git a/polymer/eduke32/source/player.h b/polymer/eduke32/source/player.h index c70a2c1df..ce73045a3 100644 --- a/polymer/eduke32/source/player.h +++ b/polymer/eduke32/source/player.h @@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef player_h_ #define player_h_ +#include "inv.h" + #ifdef __cplusplus extern "C" { #endif