From 5c06ef08bf0535b023175266d9ea817324a4bbe5 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 9 Dec 2012 13:24:36 +0000 Subject: [PATCH] Make EventNames[] an array of (const char *) instead of const tokenlist. git-svn-id: https://svn.eduke32.com/eduke32@3258 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 196 +++++++++--------- polymer/eduke32/source/gamedef.h | 2 +- polymer/eduke32/source/gameexec.h | 4 +- polymer/eduke32/source/lunatic/lunatic_game.c | 29 ++- 4 files changed, 124 insertions(+), 107 deletions(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 245f67951..506cdb6c4 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -569,104 +569,104 @@ const char *keyw[] = "" }; -// KEEPINSYNC2 -const tokenlist EventNames[MAXEVENTS] = +// KEEPINSYNC with enum GameEvent_t and lunatic/con_lang.lua +const char *EventNames[MAXEVENTS] = { - { "EVENT_INIT", EVENT_INIT }, - { "EVENT_ENTERLEVEL", EVENT_ENTERLEVEL }, - { "EVENT_RESETWEAPONS", EVENT_RESETWEAPONS }, - { "EVENT_RESETINVENTORY", EVENT_RESETINVENTORY }, - { "EVENT_HOLSTER", EVENT_HOLSTER }, - { "EVENT_LOOKLEFT", EVENT_LOOKLEFT }, - { "EVENT_LOOKRIGHT", EVENT_LOOKRIGHT }, - { "EVENT_SOARUP", EVENT_SOARUP }, - { "EVENT_SOARDOWN", EVENT_SOARDOWN }, - { "EVENT_CROUCH", EVENT_CROUCH }, - { "EVENT_JUMP", EVENT_JUMP }, - { "EVENT_RETURNTOCENTER", EVENT_RETURNTOCENTER }, - { "EVENT_LOOKUP", EVENT_LOOKUP }, - { "EVENT_LOOKDOWN", EVENT_LOOKDOWN }, - { "EVENT_AIMUP", EVENT_AIMUP }, - { "EVENT_FIRE", EVENT_FIRE }, - { "EVENT_CHANGEWEAPON", EVENT_CHANGEWEAPON }, - { "EVENT_GETSHOTRANGE", EVENT_GETSHOTRANGE }, - { "EVENT_GETAUTOAIMANGLE", EVENT_GETAUTOAIMANGLE }, - { "EVENT_GETLOADTILE", EVENT_GETLOADTILE }, - { "EVENT_CHEATGETSTEROIDS", EVENT_CHEATGETSTEROIDS }, - { "EVENT_CHEATGETHEAT", EVENT_CHEATGETHEAT }, - { "EVENT_CHEATGETBOOT", EVENT_CHEATGETBOOT }, - { "EVENT_CHEATGETSHIELD", EVENT_CHEATGETSHIELD }, - { "EVENT_CHEATGETSCUBA", EVENT_CHEATGETSCUBA }, - { "EVENT_CHEATGETHOLODUKE", EVENT_CHEATGETHOLODUKE }, - { "EVENT_CHEATGETJETPACK", EVENT_CHEATGETJETPACK }, - { "EVENT_CHEATGETFIRSTAID", EVENT_CHEATGETFIRSTAID }, - { "EVENT_QUICKKICK", EVENT_QUICKKICK }, - { "EVENT_INVENTORY", EVENT_INVENTORY }, - { "EVENT_USENIGHTVISION", EVENT_USENIGHTVISION }, - { "EVENT_USESTEROIDS", EVENT_USESTEROIDS }, - { "EVENT_INVENTORYLEFT", EVENT_INVENTORYLEFT }, - { "EVENT_INVENTORYRIGHT", EVENT_INVENTORYRIGHT }, - { "EVENT_HOLODUKEON", EVENT_HOLODUKEON }, - { "EVENT_HOLODUKEOFF", EVENT_HOLODUKEOFF }, - { "EVENT_USEMEDKIT", EVENT_USEMEDKIT }, - { "EVENT_USEJETPACK", EVENT_USEJETPACK }, - { "EVENT_TURNAROUND", EVENT_TURNAROUND }, - { "EVENT_DISPLAYWEAPON", EVENT_DISPLAYWEAPON }, - { "EVENT_FIREWEAPON", EVENT_FIREWEAPON }, - { "EVENT_SELECTWEAPON", EVENT_SELECTWEAPON }, - { "EVENT_MOVEFORWARD", EVENT_MOVEFORWARD }, - { "EVENT_MOVEBACKWARD", EVENT_MOVEBACKWARD }, - { "EVENT_TURNLEFT", EVENT_TURNLEFT }, - { "EVENT_TURNRIGHT", EVENT_TURNRIGHT }, - { "EVENT_STRAFELEFT", EVENT_STRAFELEFT }, - { "EVENT_STRAFERIGHT", EVENT_STRAFERIGHT }, - { "EVENT_WEAPKEY1", EVENT_WEAPKEY1 }, - { "EVENT_WEAPKEY2", EVENT_WEAPKEY2 }, - { "EVENT_WEAPKEY3", EVENT_WEAPKEY3 }, - { "EVENT_WEAPKEY4", EVENT_WEAPKEY4 }, - { "EVENT_WEAPKEY5", EVENT_WEAPKEY5 }, - { "EVENT_WEAPKEY6", EVENT_WEAPKEY6 }, - { "EVENT_WEAPKEY7", EVENT_WEAPKEY7 }, - { "EVENT_WEAPKEY8", EVENT_WEAPKEY8 }, - { "EVENT_WEAPKEY9", EVENT_WEAPKEY9 }, - { "EVENT_WEAPKEY10", EVENT_WEAPKEY10 }, - { "EVENT_DRAWWEAPON", EVENT_DRAWWEAPON }, - { "EVENT_DISPLAYCROSSHAIR", EVENT_DISPLAYCROSSHAIR }, - { "EVENT_DISPLAYREST", EVENT_DISPLAYREST }, - { "EVENT_DISPLAYSBAR", EVENT_DISPLAYSBAR }, - { "EVENT_RESETPLAYER", EVENT_RESETPLAYER }, - { "EVENT_INCURDAMAGE", EVENT_INCURDAMAGE }, - { "EVENT_AIMDOWN", EVENT_AIMDOWN }, - { "EVENT_GAME", EVENT_GAME }, - { "EVENT_PREVIOUSWEAPON", EVENT_PREVIOUSWEAPON }, - { "EVENT_NEXTWEAPON", EVENT_NEXTWEAPON }, - { "EVENT_SWIMUP", EVENT_SWIMUP }, - { "EVENT_SWIMDOWN", EVENT_SWIMDOWN }, - { "EVENT_GETMENUTILE", EVENT_GETMENUTILE }, - { "EVENT_SPAWN", EVENT_SPAWN }, - { "EVENT_LOGO", EVENT_LOGO }, - { "EVENT_EGS", EVENT_EGS }, - { "EVENT_DOFIRE", EVENT_DOFIRE }, - { "EVENT_PRESSEDFIRE", EVENT_PRESSEDFIRE }, - { "EVENT_USE", EVENT_USE }, - { "EVENT_PROCESSINPUT", EVENT_PROCESSINPUT }, - { "EVENT_FAKEDOMOVETHINGS", EVENT_FAKEDOMOVETHINGS }, - { "EVENT_DISPLAYROOMS", EVENT_DISPLAYROOMS }, - { "EVENT_KILLIT", EVENT_KILLIT }, - { "EVENT_LOADACTOR", EVENT_LOADACTOR }, - { "EVENT_DISPLAYBONUSSCREEN", EVENT_DISPLAYBONUSSCREEN }, - { "EVENT_DISPLAYMENU", EVENT_DISPLAYMENU }, - { "EVENT_DISPLAYMENUREST", EVENT_DISPLAYMENUREST }, - { "EVENT_DISPLAYLOADINGSCREEN", EVENT_DISPLAYLOADINGSCREEN }, - { "EVENT_ANIMATESPRITES", EVENT_ANIMATESPRITES }, - { "EVENT_NEWGAME", EVENT_NEWGAME }, - { "EVENT_SOUND", EVENT_SOUND }, - { "EVENT_CHECKTOUCHDAMAGE", EVENT_CHECKTOUCHDAMAGE }, - { "EVENT_CHECKFLOORDAMAGE", EVENT_CHECKFLOORDAMAGE }, - { "EVENT_LOADGAME", EVENT_LOADGAME }, - { "EVENT_SAVEGAME", EVENT_SAVEGAME }, - { "EVENT_PREGAME", EVENT_PREGAME }, - { "EVENT_CHANGEMENU", EVENT_CHANGEMENU } + "EVENT_INIT", + "EVENT_ENTERLEVEL", + "EVENT_RESETWEAPONS", + "EVENT_RESETINVENTORY", + "EVENT_HOLSTER", + "EVENT_LOOKLEFT", + "EVENT_LOOKRIGHT", + "EVENT_SOARUP", + "EVENT_SOARDOWN", + "EVENT_CROUCH", + "EVENT_JUMP", + "EVENT_RETURNTOCENTER", + "EVENT_LOOKUP", + "EVENT_LOOKDOWN", + "EVENT_AIMUP", + "EVENT_FIRE", + "EVENT_CHANGEWEAPON", + "EVENT_GETSHOTRANGE", + "EVENT_GETAUTOAIMANGLE", + "EVENT_GETLOADTILE", + "EVENT_CHEATGETSTEROIDS", + "EVENT_CHEATGETHEAT", + "EVENT_CHEATGETBOOT", + "EVENT_CHEATGETSHIELD", + "EVENT_CHEATGETSCUBA", + "EVENT_CHEATGETHOLODUKE", + "EVENT_CHEATGETJETPACK", + "EVENT_CHEATGETFIRSTAID", + "EVENT_QUICKKICK", + "EVENT_INVENTORY", + "EVENT_USENIGHTVISION", + "EVENT_USESTEROIDS", + "EVENT_INVENTORYLEFT", + "EVENT_INVENTORYRIGHT", + "EVENT_HOLODUKEON", + "EVENT_HOLODUKEOFF", + "EVENT_USEMEDKIT", + "EVENT_USEJETPACK", + "EVENT_TURNAROUND", + "EVENT_DISPLAYWEAPON", + "EVENT_FIREWEAPON", + "EVENT_SELECTWEAPON", + "EVENT_MOVEFORWARD", + "EVENT_MOVEBACKWARD", + "EVENT_TURNLEFT", + "EVENT_TURNRIGHT", + "EVENT_STRAFELEFT", + "EVENT_STRAFERIGHT", + "EVENT_WEAPKEY1", + "EVENT_WEAPKEY2", + "EVENT_WEAPKEY3", + "EVENT_WEAPKEY4", + "EVENT_WEAPKEY5", + "EVENT_WEAPKEY6", + "EVENT_WEAPKEY7", + "EVENT_WEAPKEY8", + "EVENT_WEAPKEY9", + "EVENT_WEAPKEY10", + "EVENT_DRAWWEAPON", + "EVENT_DISPLAYCROSSHAIR", + "EVENT_DISPLAYREST", + "EVENT_DISPLAYSBAR", + "EVENT_RESETPLAYER", + "EVENT_INCURDAMAGE", + "EVENT_AIMDOWN", + "EVENT_GAME", + "EVENT_PREVIOUSWEAPON", + "EVENT_NEXTWEAPON", + "EVENT_SWIMUP", + "EVENT_SWIMDOWN", + "EVENT_GETMENUTILE", + "EVENT_SPAWN", + "EVENT_LOGO", + "EVENT_EGS", + "EVENT_DOFIRE", + "EVENT_PRESSEDFIRE", + "EVENT_USE", + "EVENT_PROCESSINPUT", + "EVENT_FAKEDOMOVETHINGS", + "EVENT_DISPLAYROOMS", + "EVENT_KILLIT", + "EVENT_LOADACTOR", + "EVENT_DISPLAYBONUSSCREEN", + "EVENT_DISPLAYMENU", + "EVENT_DISPLAYMENUREST", + "EVENT_DISPLAYLOADINGSCREEN", + "EVENT_ANIMATESPRITES", + "EVENT_NEWGAME", + "EVENT_SOUND", + "EVENT_CHECKTOUCHDAMAGE", + "EVENT_CHECKFLOORDAMAGE", + "EVENT_LOADGAME", + "EVENT_SAVEGAME", + "EVENT_PREGAME", + "EVENT_CHANGEMENU" }; const memberlabel_t SectorLabels[]= @@ -5713,7 +5713,7 @@ static void C_AddDefaultDefinitions(void) int32_t i; for (i=0; iname, lua_tostring(L, -1)); // get err msg lua_pop(L, 1); return -1;