Commit 4e85f36a authored by Dino Bollinger's avatar Dino Bollinger
Browse files

Duke3D: Make standalone build gamefunc names available in non-standalone builds as well

Fixes issues when launching Fury with synthesis eduke32 builds
parent 3927367b
......@@ -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",
......
......@@ -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];
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment