diff --git a/polymer/eduke32/source/gameexec.h b/polymer/eduke32/source/gameexec.h index f82361cb0..294a39ab9 100644 --- a/polymer/eduke32/source/gameexec.h +++ b/polymer/eduke32/source/gameexec.h @@ -26,112 +26,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "sector.h" // mapstate_t #include "gamedef.h" // vmstate_t +#include "events_defs.h" -// the order of these can't be changed or else compatibility with EDuke 2.0 mods will break -// KEEPINSYNC with EventNames[] and lunatic/con_lang.lua -enum GameEvent_t { - EVENT_INIT, // 0 - EVENT_ENTERLEVEL, - EVENT_RESETWEAPONS, - EVENT_RESETINVENTORY, - EVENT_HOLSTER, - EVENT_LOOKLEFT, // 5 - EVENT_LOOKRIGHT, - EVENT_SOARUP, - EVENT_SOARDOWN, - EVENT_CROUCH, - EVENT_JUMP, // 10 - EVENT_RETURNTOCENTER, - EVENT_LOOKUP, - EVENT_LOOKDOWN, - EVENT_AIMUP, - EVENT_FIRE, // 15 - EVENT_CHANGEWEAPON, - EVENT_GETSHOTRANGE, - EVENT_GETAUTOAIMANGLE, - EVENT_GETLOADTILE, - EVENT_CHEATGETSTEROIDS, // 20 - EVENT_CHEATGETHEAT, - EVENT_CHEATGETBOOT, - EVENT_CHEATGETSHIELD, - EVENT_CHEATGETSCUBA, - EVENT_CHEATGETHOLODUKE, // 25 - EVENT_CHEATGETJETPACK, - EVENT_CHEATGETFIRSTAID, - EVENT_QUICKKICK, - EVENT_INVENTORY, - EVENT_USENIGHTVISION, // 30 - EVENT_USESTEROIDS, - EVENT_INVENTORYLEFT, - EVENT_INVENTORYRIGHT, - EVENT_HOLODUKEON, - EVENT_HOLODUKEOFF, // 35 - EVENT_USEMEDKIT, - EVENT_USEJETPACK, - EVENT_TURNAROUND, - EVENT_DISPLAYWEAPON, - EVENT_FIREWEAPON, // 40 - EVENT_SELECTWEAPON, - EVENT_MOVEFORWARD, - EVENT_MOVEBACKWARD, - EVENT_TURNLEFT, - EVENT_TURNRIGHT, // 45 - EVENT_STRAFELEFT, - EVENT_STRAFERIGHT, - EVENT_WEAPKEY1, - EVENT_WEAPKEY2, - EVENT_WEAPKEY3, // 50 - EVENT_WEAPKEY4, - EVENT_WEAPKEY5, - EVENT_WEAPKEY6, - EVENT_WEAPKEY7, - EVENT_WEAPKEY8, // 55 - EVENT_WEAPKEY9, - EVENT_WEAPKEY10, - EVENT_DRAWWEAPON, - EVENT_DISPLAYCROSSHAIR, - EVENT_DISPLAYREST, // 60 - EVENT_DISPLAYSBAR, - EVENT_RESETPLAYER, - EVENT_INCURDAMAGE, - EVENT_AIMDOWN, - EVENT_GAME, // 65 - EVENT_PREVIOUSWEAPON, - EVENT_NEXTWEAPON, - EVENT_SWIMUP, - EVENT_SWIMDOWN, - EVENT_GETMENUTILE, // 70 - EVENT_SPAWN, - EVENT_LOGO, - EVENT_EGS, - EVENT_DOFIRE, - EVENT_PRESSEDFIRE, // 75 - EVENT_USE, - EVENT_PROCESSINPUT, - EVENT_FAKEDOMOVETHINGS, - EVENT_DISPLAYROOMS, - EVENT_KILLIT, // 80 - EVENT_LOADACTOR, - EVENT_DISPLAYBONUSSCREEN, - EVENT_DISPLAYMENU, - EVENT_DISPLAYMENUREST, - EVENT_DISPLAYLOADINGSCREEN, // 85 - EVENT_ANIMATESPRITES, - EVENT_NEWGAME, - EVENT_SOUND, - EVENT_CHECKTOUCHDAMAGE, - EVENT_CHECKFLOORDAMAGE, // 90 - EVENT_LOADGAME, - EVENT_SAVEGAME, - EVENT_PREGAME, - EVENT_CHANGEMENU, - EVENT_DAMAGEHPLANE, // 95 - EVENT_ACTIVATECHEAT, #ifdef LUNATIC - EVENT_ANIMATEALLSPRITES, +# include "lunatic_game.h" #endif - MAXEVENTS -}; extern int32_t ticrandomseed; @@ -158,7 +57,7 @@ int32_t VM_OnEvent_(int32_t iEventID,int32_t iActor,int32_t iPlayer,int32_t lDis static inline int32_t VM_HaveEvent(int32_t iEventID) { #ifdef LUNATIC - return L_IsInitialized(&g_ElState) && El_HaveEvent(iEventID) + return L_IsInitialized(&g_ElState) && El_HaveEvent(iEventID); #else return apScriptGameEvent[iEventID]!=NULL; #endif diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index cdbf6da85..afcbd124e 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -1039,6 +1039,7 @@ void Gv_ResetSystemDefaults(void) #endif G_InitProjectileData(); +#ifndef LUNATIC // hackhackhackhackhack i = hash_find(&h_arrays, "tilesizx"); if (i >= 0) @@ -1057,6 +1058,7 @@ void Gv_ResetSystemDefaults(void) for (; j