diff --git a/source/duke3d/src/_functio.h b/source/duke3d/src/_functio.h index 2c72ade7971813f158210a9067952533061c1717..17c9d733c670a43cf651dbe5ade5d898b8ed815a 100644 --- a/source/duke3d/src/_functio.h +++ b/source/duke3d/src/_functio.h @@ -115,7 +115,7 @@ char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = }; // note: internal ordering is important, must not be changed -const char internal_gamefunction_names[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = +const char gamefunc_symbol_names[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = { "gamefunc_Move_Forward", "gamefunc_Move_Backward", @@ -149,17 +149,10 @@ const char internal_gamefunction_names[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = "gamefunc_Inventory", "gamefunc_Inventory_Left", "gamefunc_Inventory_Right", -#ifndef EDUKE32_STANDALONE - "gamefunc_Holo_Duke", - "gamefunc_Jetpack", - "gamefunc_NightVision", - "gamefunc_MedKit", -#else "gamefunc_Item_1", "gamefunc_Item_2", "gamefunc_Item_3", "gamefunc_Item_4", -#endif "gamefunc_TurnAround", "gamefunc_SendMessage", "gamefunc_Map", @@ -172,13 +165,8 @@ const char internal_gamefunction_names[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = "gamefunc_See_Coop_View", "gamefunc_Mouse_Aiming", "gamefunc_Toggle_Crosshair", -#ifndef EDUKE32_STANDALONE - "gamefunc_Steroids", - "gamefunc_Quick_Kick", -#else "gamefunc_Item_5", "gamefunc_Melee", -#endif "gamefunc_Next_Weapon", "gamefunc_Previous_Weapon", "gamefunc_Show_Console", diff --git a/source/duke3d/src/function.h b/source/duke3d/src/function.h index 6ccdd3c3181affc024734a692396cadfa441c7cc..d552359a3981c7245e49cebe919a4f46f856e449 100644 --- a/source/duke3d/src/function.h +++ b/source/duke3d/src/function.h @@ -107,7 +107,7 @@ enum GameFunction_t EDUKE32_STATIC_ASSERT(NUMGAMEFUNCTIONS <= 64); // CONTROL_ButtonState and CONTROL_ButtonHeldState are uint64_t extern char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN]; -extern const char internal_gamefunction_names[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN]; +extern const char gamefunc_symbol_names[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN]; extern const char keydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN]; extern const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN]; diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 2d3d2fde36ab987bac529d8762f71c1b44186ade..ab3b97222f67ce76a3812d7cb6de85644ecd20cf 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -5435,7 +5435,16 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass) for (int f = 0; f < NUMGAMEFUNCTIONS; f++) - scriptfile_addsymbolvalue(internal_gamefunction_names[f], f); + scriptfile_addsymbolvalue(gamefunc_symbol_names[f], f); + +#ifndef EDUKE32_STANDALONE + scriptfile_addsymbolvalue("gamefunc_Holo_Duke", gamefunc_Holo_Duke); + scriptfile_addsymbolvalue("gamefunc_Jetpack", gamefunc_Jetpack); + scriptfile_addsymbolvalue("gamefunc_NightVision", gamefunc_NightVision); + scriptfile_addsymbolvalue("gamefunc_MedKit", gamefunc_MedKit); + scriptfile_addsymbolvalue("gamefunc_Steroids", gamefunc_Steroids); + scriptfile_addsymbolvalue("gamefunc_Quick_Kick", gamefunc_Quick_Kick); +#endif do { @@ -5833,7 +5842,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass) else if (gamefunc_bitmap & (1ULL << keyIndex)) { LOG_F(WARNING, "Duplicate listing of key '%s' near line %s:%d", - internal_gamefunction_names[keyIndex], pScript->filename, scriptfile_getlinum(pScript, mapPtr)); + gamefunc_symbol_names[keyIndex], pScript->filename, scriptfile_getlinum(pScript, mapPtr)); continue; }