mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Merge branch 'master' into menu_for_real
This commit is contained in:
commit
3c4c8af20c
11 changed files with 149 additions and 69 deletions
|
@ -167,6 +167,12 @@ void WeaponCheat(PLAYERp pp, const char *)
|
||||||
p = &Player[pnum];
|
p = &Player[pnum];
|
||||||
u = User[p->PlayerSprite];
|
u = User[p->PlayerSprite];
|
||||||
|
|
||||||
|
if (!TEST(p->Flags, PF_TWO_UZI))
|
||||||
|
{
|
||||||
|
SET(p->Flags, PF_TWO_UZI);
|
||||||
|
SET(p->Flags, PF_PICKED_UP_AN_UZI);
|
||||||
|
}
|
||||||
|
|
||||||
// ALL WEAPONS
|
// ALL WEAPONS
|
||||||
if (!SW_SHAREWARE)
|
if (!SW_SHAREWARE)
|
||||||
p->WpnFlags = 0xFFFFFFFF;
|
p->WpnFlags = 0xFFFFFFFF;
|
||||||
|
@ -248,13 +254,6 @@ void ItemCheat(PLAYERp pp, const char *cheat_string)
|
||||||
p = &Player[pnum];
|
p = &Player[pnum];
|
||||||
memset(p->HasKey, TRUE, sizeof(p->HasKey));
|
memset(p->HasKey, TRUE, sizeof(p->HasKey));
|
||||||
|
|
||||||
if (p->Wpn[WPN_UZI] && p->CurWpn == p->Wpn[WPN_UZI])
|
|
||||||
{
|
|
||||||
SET(p->Flags, PF_TWO_UZI);
|
|
||||||
SET(p->Flags, PF_PICKED_UP_AN_UZI);
|
|
||||||
InitWeaponUzi(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
p->WpnShotgunAuto = 50;
|
p->WpnShotgunAuto = 50;
|
||||||
p->WpnRocketHeat = 5;
|
p->WpnRocketHeat = 5;
|
||||||
p->WpnRocketNuke = 1;
|
p->WpnRocketNuke = 1;
|
||||||
|
|
|
@ -765,7 +765,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
|
||||||
|
|
||||||
//#define DART_REPEAT 6
|
//#define DART_REPEAT 6
|
||||||
//#define DART_PIC 2233
|
//#define DART_PIC 2233
|
||||||
if (useDarts)
|
if (gs.Darts)
|
||||||
if (tu->ID == 1793 || tsp->picnum == 1793)
|
if (tu->ID == 1793 || tsp->picnum == 1793)
|
||||||
{
|
{
|
||||||
tsp->picnum = 2519;
|
tsp->picnum = 2519;
|
||||||
|
@ -777,7 +777,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
|
||||||
#define DART_REPEAT 16
|
#define DART_REPEAT 16
|
||||||
if (tu->ID == STAR1)
|
if (tu->ID == STAR1)
|
||||||
{
|
{
|
||||||
if (useDarts)
|
if (gs.Darts)
|
||||||
{
|
{
|
||||||
tsp->picnum = DART_PIC;
|
tsp->picnum = DART_PIC;
|
||||||
tsp->ang = NORM_ANGLE(tsp->ang - 512 - 24);
|
tsp->ang = NORM_ANGLE(tsp->ang - 512 - 24);
|
||||||
|
@ -841,7 +841,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useDarts)
|
if (gs.Darts)
|
||||||
if (tsp->statnum == STAT_STAR_QUEUE)
|
if (tsp->statnum == STAT_STAR_QUEUE)
|
||||||
{
|
{
|
||||||
tsp->picnum = DART_PIC;
|
tsp->picnum = DART_PIC;
|
||||||
|
|
|
@ -208,6 +208,8 @@ const GAME_SET gs_defaults =
|
||||||
0, // Color
|
0, // Color
|
||||||
TRUE, // nuke
|
TRUE, // nuke
|
||||||
"Track??", // waveform track name
|
"Track??", // waveform track name
|
||||||
|
FALSE,
|
||||||
|
TRUE,
|
||||||
};
|
};
|
||||||
GAME_SET gs;
|
GAME_SET gs;
|
||||||
|
|
||||||
|
@ -2654,9 +2656,11 @@ void Control()
|
||||||
|
|
||||||
void _Assert(const char *expr, const char *strFile, unsigned uLine)
|
void _Assert(const char *expr, const char *strFile, unsigned uLine)
|
||||||
{
|
{
|
||||||
sprintf(ds, "Assertion failed: %s %s, line %u", expr, strFile, uLine);
|
buildprintf(ds, "Assertion failed: %s %s, line %u", expr, strFile, uLine);
|
||||||
MONO_PRINT(ds);
|
debug_break();
|
||||||
|
|
||||||
TerminateGame();
|
TerminateGame();
|
||||||
|
|
||||||
#if 1 //def RENDERTYPEWIN
|
#if 1 //def RENDERTYPEWIN
|
||||||
wm_msgbox(apptitle, "%s", ds);
|
wm_msgbox(apptitle, "%s", ds);
|
||||||
#else
|
#else
|
||||||
|
@ -3009,7 +3013,7 @@ Nuke -> 0=Off 1=On
|
||||||
commit -map grenade -autonet 0,0,1,1,1,0,3,2,1,1 -name frank
|
commit -map grenade -autonet 0,0,1,1,1,0,3,2,1,1 -name frank
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char isShareware = FALSE, useDarts = FALSE;
|
char isShareware = FALSE;
|
||||||
|
|
||||||
int DetectShareware(void)
|
int DetectShareware(void)
|
||||||
{
|
{
|
||||||
|
@ -3331,10 +3335,46 @@ void ConKey(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void FunctionKeys(PLAYERp pp)
|
char WangBangMacro[10][64];
|
||||||
|
|
||||||
|
SWBOOL DoQuickSave(short save_num)
|
||||||
|
{
|
||||||
|
PauseAction();
|
||||||
|
|
||||||
|
if (SaveGame(save_num) != -1)
|
||||||
|
{
|
||||||
|
QuickLoadNum = save_num;
|
||||||
|
|
||||||
|
LastSaveNum = -1;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWBOOL DoQuickLoad()
|
||||||
|
{
|
||||||
|
KB_ClearKeysDown();
|
||||||
|
|
||||||
|
PauseAction();
|
||||||
|
|
||||||
|
ReloadPrompt = FALSE;
|
||||||
|
if (LoadGame(QuickLoadNum) == -1)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ready2send = 1;
|
||||||
|
LastSaveNum = -1;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FunctionKeys(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern SWBOOL GamePaused;
|
extern SWBOOL GamePaused;
|
||||||
extern short QuickLoadNum;
|
|
||||||
static int rts_delay = 0;
|
static int rts_delay = 0;
|
||||||
int fn_key = 0;
|
int fn_key = 0;
|
||||||
|
|
||||||
|
@ -3428,16 +3468,25 @@ void FunctionKeys(PLAYERp pp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// F6 option menu
|
// F6 quick save
|
||||||
if (inputState.GetKeyStatus(KEYSC_F6))
|
if (inputState.GetKeyStatus(KEYSC_F6))
|
||||||
{
|
{
|
||||||
extern SWBOOL QuickSaveMode;
|
|
||||||
inputState.ClearKeyStatus(KEYSC_F6);
|
inputState.ClearKeyStatus(KEYSC_F6);
|
||||||
if (!TEST(pp->Flags, PF_DEAD))
|
if (!TEST(pp->Flags, PF_DEAD))
|
||||||
{
|
{
|
||||||
inputState.SetKeyStatus(sc_Escape);
|
inputState.SetKeyStatus(sc_Escape);
|
||||||
ControlPanelType = ct_savemenu;
|
if (QuickLoadNum < 0)
|
||||||
QuickSaveMode = TRUE;
|
{
|
||||||
|
KEY_PRESSED(KEYSC_ESC) = 1;
|
||||||
|
ControlPanelType = ct_savemenu;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
KB_ClearKeysDown();
|
||||||
|
KB_FlushKeyboardQueue();
|
||||||
|
DoQuickSave(QuickLoadNum);
|
||||||
|
ResumeAction();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3450,17 +3499,16 @@ void FunctionKeys(PLAYERp pp)
|
||||||
{
|
{
|
||||||
if (QuickLoadNum < 0)
|
if (QuickLoadNum < 0)
|
||||||
{
|
{
|
||||||
PutStringInfoLine(pp, "Last saved game not found.");
|
KEY_PRESSED(KEYSC_ESC) = 1;
|
||||||
|
ControlPanelType = ct_loadmenu;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
inputState.ClearKeysDown();
|
DoQuickLoad();
|
||||||
inputState.SetKeyStatus(sc_Escape);
|
ResumeAction();
|
||||||
ControlPanelType = ct_quickloadmenu;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3530,7 +3578,6 @@ void FunctionKeys(PLAYERp pp)
|
||||||
void PauseKey(PLAYERp pp)
|
void PauseKey(PLAYERp pp)
|
||||||
{
|
{
|
||||||
extern SWBOOL GamePaused,CheatInputMode;
|
extern SWBOOL GamePaused,CheatInputMode;
|
||||||
extern short QuickLoadNum;
|
|
||||||
extern SWBOOL enabled;
|
extern SWBOOL enabled;
|
||||||
|
|
||||||
if (inputState.GetKeyStatus(sc_Pause) && !CommEnabled && !InputMode && !UsingMenus && !CheatInputMode && !ConPanel)
|
if (inputState.GetKeyStatus(sc_Pause) && !CommEnabled && !InputMode && !UsingMenus && !CheatInputMode && !ConPanel)
|
||||||
|
@ -4249,6 +4296,14 @@ void getinput(SW_PACKET *loc)
|
||||||
SET(loc->bits, prev_weapon + 1);
|
SET(loc->bits, prev_weapon + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buttonMap.ButtonDown(gamefunc_Alt_Weapon_Mode))
|
||||||
|
{
|
||||||
|
buttonMap.ClearButton(gamefunc_Alt_Weapon_Mode);
|
||||||
|
USERp u = User[pp->PlayerSprite];
|
||||||
|
short const which_weapon = u->WeaponNum + 1;
|
||||||
|
SET(loc->bits, which_weapon);
|
||||||
|
}
|
||||||
|
|
||||||
inv_hotkey = 0;
|
inv_hotkey = 0;
|
||||||
if (buttonMap.ButtonDown(gamefunc_Med_Kit))
|
if (buttonMap.ButtonDown(gamefunc_Med_Kit))
|
||||||
inv_hotkey = INVENTORY_MEDKIT+1;
|
inv_hotkey = INVENTORY_MEDKIT+1;
|
||||||
|
|
|
@ -50,7 +50,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
BEGIN_SW_NS
|
BEGIN_SW_NS
|
||||||
|
|
||||||
//#define SW_SHAREWARE 1 // This determines whether game is shareware compile or not!
|
//#define SW_SHAREWARE 1 // This determines whether game is shareware compile or not!
|
||||||
extern char isShareware, useDarts;
|
extern char isShareware;
|
||||||
#define SW_SHAREWARE (isShareware)
|
#define SW_SHAREWARE (isShareware)
|
||||||
|
|
||||||
// Turn warning off for unreferenced variables.
|
// Turn warning off for unreferenced variables.
|
||||||
|
@ -2372,6 +2372,12 @@ int COVERinsertsprite(short sectnum, short statnum); //returns (short)spritenu
|
||||||
|
|
||||||
void AudioUpdate(void); // stupid
|
void AudioUpdate(void); // stupid
|
||||||
|
|
||||||
|
extern short LastSaveNum;
|
||||||
|
extern short QuickLoadNum;
|
||||||
|
void LoadSaveMsg(const char *msg);
|
||||||
|
SWBOOL DoQuickSave(short save_num);
|
||||||
|
SWBOOL DoQuickLoad(void);
|
||||||
|
|
||||||
struct GameInterface : ::GameInterface
|
struct GameInterface : ::GameInterface
|
||||||
{
|
{
|
||||||
int app_main() override;
|
int app_main() override;
|
||||||
|
|
|
@ -69,7 +69,6 @@ short TimeLimitTable[9] = {0,3,5,10,15,20,30,45,60};
|
||||||
|
|
||||||
short QuickLoadNum = -1;
|
short QuickLoadNum = -1;
|
||||||
char QuickLoadDescrDialog[128];
|
char QuickLoadDescrDialog[128];
|
||||||
SWBOOL QuickSaveMode = FALSE;
|
|
||||||
SWBOOL SavePrompt = FALSE;
|
SWBOOL SavePrompt = FALSE;
|
||||||
extern SWBOOL InMenuLevel, LoadGameOutsideMoveLoop, LoadGameFromDemo;
|
extern SWBOOL InMenuLevel, LoadGameOutsideMoveLoop, LoadGameFromDemo;
|
||||||
extern uint8_t RedBookSong[40];
|
extern uint8_t RedBookSong[40];
|
||||||
|
@ -399,6 +398,8 @@ MenuItem options_i[] =
|
||||||
{DefButton(btn_auto_aim, 0, "Auto-Aiming"), OPT_XS, OPT_LINE(9), 1, m_defshade, 0, NULL, NULL, NULL},
|
{DefButton(btn_auto_aim, 0, "Auto-Aiming"), OPT_XS, OPT_LINE(9), 1, m_defshade, 0, NULL, NULL, NULL},
|
||||||
{DefButton(btn_voxels, 0, "Voxel Sprites"), OPT_XS, OPT_LINE(10), 1, m_defshade, 0, NULL, NULL, NULL},
|
{DefButton(btn_voxels, 0, "Voxel Sprites"), OPT_XS, OPT_LINE(10), 1, m_defshade, 0, NULL, NULL, NULL},
|
||||||
{DefButton(btn_stats, 0, "Level Stats"), OPT_XS, OPT_LINE(11), 1, m_defshade, 0, NULL, MNU_StatCheck, NULL},
|
{DefButton(btn_stats, 0, "Level Stats"), OPT_XS, OPT_LINE(11), 1, m_defshade, 0, NULL, MNU_StatCheck, NULL},
|
||||||
|
{DefButton(btn_darts, 0, "Use Darts"), OPT_XS, OPT_LINE(12), 1, m_defshade, 0, NULL, NULL, NULL},
|
||||||
|
{DefButton(btn_autoswitch, 0, "Equip Pickups"), OPT_XS, OPT_LINE(13), 1, m_defshade, 0, NULL, NULL, NULL},
|
||||||
{DefNone}
|
{DefNone}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -571,7 +572,6 @@ MenuItem_p cust_callback_item;
|
||||||
|
|
||||||
static void MNU_ClearDialog(void);
|
static void MNU_ClearDialog(void);
|
||||||
static SWBOOL MNU_Dialog(void);
|
static SWBOOL MNU_Dialog(void);
|
||||||
void LoadSaveMsg(const char *msg);
|
|
||||||
static void MNU_ItemPreProcess(MenuGroup *group);
|
static void MNU_ItemPreProcess(MenuGroup *group);
|
||||||
static void MNU_SelectItem(MenuGroup *group, short index, SWBOOL draw);
|
static void MNU_SelectItem(MenuGroup *group, short index, SWBOOL draw);
|
||||||
static void MNU_PushItem(MenuItem *item, SWBOOL draw);
|
static void MNU_PushItem(MenuItem *item, SWBOOL draw);
|
||||||
|
@ -837,7 +837,7 @@ static int MNU_SelectButtonFunction(const char *buttonname, int *currentfunc)
|
||||||
// Todo: Branch off to the generic keybind menu.
|
// Todo: Branch off to the generic keybind menu.
|
||||||
const int PGSIZ = 9;
|
const int PGSIZ = 9;
|
||||||
const char *strs[] = { "Select the function to assign to", "%s", "or ESCAPE to cancel." };
|
const char *strs[] = { "Select the function to assign to", "%s", "or ESCAPE to cancel." };
|
||||||
int topitem = 0, botitem = NUMGAMEFUNCTIONS-1;
|
int topitem = 0, botitem = NUMGAMEFUNCTIONS;
|
||||||
int i, j, y;
|
int i, j, y;
|
||||||
short w, h=0;
|
short w, h=0;
|
||||||
int returnval = 0;
|
int returnval = 0;
|
||||||
|
@ -854,13 +854,13 @@ static int MNU_SelectButtonFunction(const char *buttonname, int *currentfunc)
|
||||||
}
|
}
|
||||||
else if (inputState.GetKeyStatus(sc_End))
|
else if (inputState.GetKeyStatus(sc_End))
|
||||||
{
|
{
|
||||||
*currentfunc = NUMGAMEFUNCTIONS-1; // -1 because the last one is the console and the top is 'none'
|
*currentfunc = NUMGAMEFUNCTIONS;
|
||||||
inputState.ClearKeyStatus(sc_End);
|
inputState.ClearKeyStatus(sc_End);
|
||||||
}
|
}
|
||||||
else if (inputState.GetKeyStatus(sc_PgDn))
|
else if (inputState.GetKeyStatus(sc_PgDn))
|
||||||
{
|
{
|
||||||
*currentfunc += PGSIZ;
|
*currentfunc += PGSIZ;
|
||||||
if (*currentfunc >= NUMGAMEFUNCTIONS) *currentfunc = NUMGAMEFUNCTIONS-1;
|
if (*currentfunc > NUMGAMEFUNCTIONS) *currentfunc = NUMGAMEFUNCTIONS;
|
||||||
inputState.ClearKeyStatus(sc_PgDn);
|
inputState.ClearKeyStatus(sc_PgDn);
|
||||||
}
|
}
|
||||||
else if (inputState.GetKeyStatus(sc_PgUp))
|
else if (inputState.GetKeyStatus(sc_PgUp))
|
||||||
|
@ -882,11 +882,11 @@ static int MNU_SelectButtonFunction(const char *buttonname, int *currentfunc)
|
||||||
else if (I_MenuDown())
|
else if (I_MenuDown())
|
||||||
{
|
{
|
||||||
I_MenuDownClear();
|
I_MenuDownClear();
|
||||||
*currentfunc = min(NUMGAMEFUNCTIONS - 1, *currentfunc + 1);
|
*currentfunc = min(NUMGAMEFUNCTIONS, *currentfunc + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (NUMGAMEFUNCTIONS-1 > PGSIZ)
|
if (NUMGAMEFUNCTIONS > PGSIZ)
|
||||||
{
|
{
|
||||||
topitem = *currentfunc - PGSIZ/2;
|
topitem = *currentfunc - PGSIZ/2;
|
||||||
botitem = topitem + PGSIZ;
|
botitem = topitem + PGSIZ;
|
||||||
|
@ -896,9 +896,9 @@ static int MNU_SelectButtonFunction(const char *buttonname, int *currentfunc)
|
||||||
botitem += -topitem;
|
botitem += -topitem;
|
||||||
topitem = 0;
|
topitem = 0;
|
||||||
}
|
}
|
||||||
else if (botitem >= NUMGAMEFUNCTIONS)
|
else if (botitem > NUMGAMEFUNCTIONS)
|
||||||
{
|
{
|
||||||
botitem = NUMGAMEFUNCTIONS-1;
|
botitem = NUMGAMEFUNCTIONS;
|
||||||
topitem = botitem - PGSIZ;
|
topitem = botitem - PGSIZ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -942,7 +942,7 @@ static int MNU_SelectButtonFunction(const char *buttonname, int *currentfunc)
|
||||||
MNU_MeasureSmallString(morestr,&dx,&dy);
|
MNU_MeasureSmallString(morestr,&dx,&dy);
|
||||||
if (topitem > 0)
|
if (topitem > 0)
|
||||||
MNU_DrawSmallString(XDIM - OPT_XS - dx, OPT_LINE(4), morestr, 8,16);
|
MNU_DrawSmallString(XDIM - OPT_XS - dx, OPT_LINE(4), morestr, 8,16);
|
||||||
if (botitem < NUMGAMEFUNCTIONS-1)
|
if (botitem < NUMGAMEFUNCTIONS)
|
||||||
MNU_DrawSmallString(XDIM - OPT_XS - dx, OPT_LINE(4)+PGSIZ*8, morestr, 8,16);
|
MNU_DrawSmallString(XDIM - OPT_XS - dx, OPT_LINE(4)+PGSIZ*8, morestr, 8,16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1797,24 +1797,17 @@ MNU_QuickLoadCustom(UserCall call, MenuItem_p item)
|
||||||
// Y pressed
|
// Y pressed
|
||||||
cust_callback = NULL;
|
cust_callback = NULL;
|
||||||
|
|
||||||
inputState.ClearKeysDown();
|
|
||||||
LoadSaveMsg("Loading...");
|
LoadSaveMsg("Loading...");
|
||||||
|
|
||||||
PauseAction();
|
if (DoQuickLoad() == FALSE)
|
||||||
|
|
||||||
ReloadPrompt = FALSE;
|
|
||||||
if (LoadGame(QuickLoadNum) == -1)
|
|
||||||
{
|
{
|
||||||
ResumeAction();
|
ResumeAction();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ready2send = 1;
|
|
||||||
LastSaveNum = -1;
|
|
||||||
|
|
||||||
// do a load game here
|
|
||||||
inputState.ClearKeysDown();
|
|
||||||
ExitMenus();
|
ExitMenus();
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputState.ClearKeysDown();
|
inputState.ClearKeysDown();
|
||||||
|
@ -1874,6 +1867,8 @@ MNU_InitMenus(void)
|
||||||
buttonsettings[btn_playcd] = true;// gs.PlayCD;
|
buttonsettings[btn_playcd] = true;// gs.PlayCD;
|
||||||
buttonsettings[btn_flipstereo] = snd_reversestereo;
|
buttonsettings[btn_flipstereo] = snd_reversestereo;
|
||||||
buttonsettings[btn_stats] = hud_stats;
|
buttonsettings[btn_stats] = hud_stats;
|
||||||
|
buttonsettings[btn_darts] = gs.Darts;
|
||||||
|
buttonsettings[btn_autoswitch] = gs.WeaponAutoSwitch;
|
||||||
|
|
||||||
slidersettings[sldr_gametype] = gs.NetGameType;
|
slidersettings[sldr_gametype] = gs.NetGameType;
|
||||||
slidersettings[sldr_netlevel] = gs.NetLevel;
|
slidersettings[sldr_netlevel] = gs.NetLevel;
|
||||||
|
@ -2430,16 +2425,11 @@ SWBOOL MNU_GetSaveCustom(void)
|
||||||
|
|
||||||
if (MenuInputMode)
|
if (MenuInputMode)
|
||||||
{
|
{
|
||||||
PauseAction();
|
|
||||||
|
|
||||||
LoadSaveMsg("Saving...");
|
LoadSaveMsg("Saving...");
|
||||||
|
|
||||||
if (SaveGame(save_num) != -1)
|
if (DoQuickSave(save_num) == FALSE)
|
||||||
{
|
{
|
||||||
QuickLoadNum = save_num;
|
|
||||||
|
|
||||||
LoadGameGroup.cursor = save_num;
|
LoadGameGroup.cursor = save_num;
|
||||||
LastSaveNum = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ResumeAction();
|
ResumeAction();
|
||||||
|
@ -2524,15 +2514,6 @@ SWBOOL MNU_LoadSaveMove(UserCall call, MenuItem_p item)
|
||||||
SaveGameInfo2[0] = 0;
|
SaveGameInfo2[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QuickSaveMode)
|
|
||||||
{
|
|
||||||
QuickSaveMode = FALSE;
|
|
||||||
MenuInputMode = TRUE;
|
|
||||||
strcpy(BackupSaveGameDescr, SaveGameDescr[game_num]);
|
|
||||||
inputState.ClearKeysDown();
|
|
||||||
inputState.keyFlushChars();
|
|
||||||
}
|
|
||||||
|
|
||||||
LastSaveNum = game_num;
|
LastSaveNum = game_num;
|
||||||
|
|
||||||
// input mode check
|
// input mode check
|
||||||
|
@ -2944,6 +2925,12 @@ void MNU_DoButton(MenuItem_p item, SWBOOL draw)
|
||||||
case btn_stats:
|
case btn_stats:
|
||||||
hud_stats = state = buttonsettings[item->button];
|
hud_stats = state = buttonsettings[item->button];
|
||||||
break;
|
break;
|
||||||
|
case btn_darts:
|
||||||
|
gs.Darts = state = buttonsettings[item->button];
|
||||||
|
break;
|
||||||
|
case btn_autoswitch:
|
||||||
|
gs.WeaponAutoSwitch = state = buttonsettings[item->button];
|
||||||
|
break;
|
||||||
case btn_markers:
|
case btn_markers:
|
||||||
gs.NetSpawnMarkers = state = buttonsettings[item->button];
|
gs.NetSpawnMarkers = state = buttonsettings[item->button];
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -212,6 +212,8 @@ typedef enum
|
||||||
btn_markers, btn_teamplay, btn_friendlyfire,btn_parental,btn_nuke,
|
btn_markers, btn_teamplay, btn_friendlyfire,btn_parental,btn_nuke,
|
||||||
btn_voxels, btn_stats, btn_playcd,
|
btn_voxels, btn_stats, btn_playcd,
|
||||||
btn_videofs,
|
btn_videofs,
|
||||||
|
btn_darts,
|
||||||
|
btn_autoswitch,
|
||||||
btn_max
|
btn_max
|
||||||
} BTNType;
|
} BTNType;
|
||||||
|
|
||||||
|
|
|
@ -1822,7 +1822,7 @@ InitWeaponStar(PLAYERp pp)
|
||||||
PlaySound(DIGI_PULL, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
|
PlaySound(DIGI_PULL, &pp->posx, &pp->posy, &pp->posz, v3df_follow|v3df_dontpan);
|
||||||
if (STD_RANDOM_RANGE(1000) > 900 && pp == Player+myconnectindex)
|
if (STD_RANDOM_RANGE(1000) > 900 && pp == Player+myconnectindex)
|
||||||
{
|
{
|
||||||
if (!useDarts)
|
if (!gs.Darts)
|
||||||
PlayerSound(DIGI_ILIKESHURIKEN,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
|
PlayerSound(DIGI_ILIKESHURIKEN,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7389,7 +7389,7 @@ pDisplaySprites(PLAYERp pp)
|
||||||
picnum = psp->picndx;
|
picnum = psp->picndx;
|
||||||
|
|
||||||
// UK panzies have to have darts instead of shurikens.
|
// UK panzies have to have darts instead of shurikens.
|
||||||
if (useDarts)
|
if (gs.Darts)
|
||||||
switch (picnum)
|
switch (picnum)
|
||||||
{
|
{
|
||||||
case STAR_REST:
|
case STAR_REST:
|
||||||
|
@ -7453,7 +7453,7 @@ pDisplaySprites(PLAYERp pp)
|
||||||
|
|
||||||
case STAR_REST:
|
case STAR_REST:
|
||||||
case 2510:
|
case 2510:
|
||||||
if (!useDarts)
|
if (!gs.Darts)
|
||||||
picnum = 2138;
|
picnum = 2138;
|
||||||
else
|
else
|
||||||
picnum = 2518; // Bloody Dart Hand
|
picnum = 2518; // Bloody Dart Hand
|
||||||
|
|
|
@ -46,6 +46,8 @@ typedef struct
|
||||||
SWBOOL NetNuke;
|
SWBOOL NetNuke;
|
||||||
//SWBOOL PlayCD; // Not implemented and no idea how to support it without the music assets.
|
//SWBOOL PlayCD; // Not implemented and no idea how to support it without the music assets.
|
||||||
char WaveformTrackName[MAXWAVEFORMTRACKLENGTH];
|
char WaveformTrackName[MAXWAVEFORMTRACKLENGTH];
|
||||||
|
SWBOOL Darts;
|
||||||
|
SWBOOL WeaponAutoSwitch;
|
||||||
} GAME_SET, *GAME_SETp;
|
} GAME_SET, *GAME_SETp;
|
||||||
|
|
||||||
extern const GAME_SET gs_defaults;
|
extern const GAME_SET gs_defaults;
|
||||||
|
|
|
@ -651,8 +651,8 @@ short SoundAngle(int x, int y)
|
||||||
if (delta_angle < 0)
|
if (delta_angle < 0)
|
||||||
delta_angle = NORM_ANGLE((1024 + delta_angle) + 1024);
|
delta_angle = NORM_ANGLE((1024 + delta_angle) + 1024);
|
||||||
|
|
||||||
// convert 2048 degree angle to 32 degree angle
|
// convert 2048 degree angle to 128 degree angle
|
||||||
return delta_angle >> 6;
|
return delta_angle >> 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _PlayerSound(const char *file, int line, int num, int *x, int *y, int *z, Voc3D_Flags flags, PLAYERp pp)
|
int _PlayerSound(const char *file, int line, int num, int *x, int *y, int *z, Voc3D_Flags flags, PLAYERp pp)
|
||||||
|
|
|
@ -5959,8 +5959,7 @@ KeyMain:
|
||||||
if (pp->WpnAmmo[WPN_STAR] >= DamageData[WPN_STAR].max_ammo)
|
if (pp->WpnAmmo[WPN_STAR] >= DamageData[WPN_STAR].max_ammo)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//if (useDarts) sprintf(ds,"Darts");
|
sprintf(ds, gs.Darts ? "Darts" : "Shurikens");
|
||||||
//else sprintf(ds,"Shurikens");
|
|
||||||
PutStringInfo(Player+pnum, DamageData[WPN_STAR].weapon_name);
|
PutStringInfo(Player+pnum, DamageData[WPN_STAR].weapon_name);
|
||||||
PlayerUpdateAmmo(pp, WPN_STAR, DamageData[WPN_STAR].weapon_pickup);
|
PlayerUpdateAmmo(pp, WPN_STAR, DamageData[WPN_STAR].weapon_pickup);
|
||||||
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
|
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
|
||||||
|
@ -5970,6 +5969,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_STAR)))
|
if (TEST(pp->WpnFlags, BIT(WPN_STAR)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_STAR));
|
SET(pp->WpnFlags, BIT(WPN_STAR));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
if (User[pp->PlayerSprite]->WeaponNum <= WPN_STAR && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum <= WPN_STAR && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
InitWeaponStar(pp);
|
InitWeaponStar(pp);
|
||||||
|
@ -5995,6 +5997,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_MINE)))
|
if (TEST(pp->WpnFlags, BIT(WPN_MINE)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_MINE));
|
SET(pp->WpnFlags, BIT(WPN_MINE));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_MINE && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_MINE && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
InitWeaponMine(pp);
|
InitWeaponMine(pp);
|
||||||
|
@ -6036,6 +6041,9 @@ KeyMain:
|
||||||
ChoosePlayerGetSound(pp);
|
ChoosePlayerGetSound(pp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
|
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_UZI && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_UZI && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -6075,6 +6083,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_MICRO)))
|
if (TEST(pp->WpnFlags, BIT(WPN_MICRO)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_MICRO));
|
SET(pp->WpnFlags, BIT(WPN_MICRO));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_MICRO && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_MICRO && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
InitWeaponMicro(pp);
|
InitWeaponMicro(pp);
|
||||||
|
@ -6143,6 +6154,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_GRENADE)))
|
if (TEST(pp->WpnFlags, BIT(WPN_GRENADE)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_GRENADE));
|
SET(pp->WpnFlags, BIT(WPN_GRENADE));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_GRENADE && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_GRENADE && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
InitWeaponGrenade(pp);
|
InitWeaponGrenade(pp);
|
||||||
|
@ -6169,6 +6183,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_ROCKET)))
|
if (TEST(pp->WpnFlags, BIT(WPN_ROCKET)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_ROCKET));
|
SET(pp->WpnFlags, BIT(WPN_ROCKET));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
InitWeaponRocket(pp);
|
InitWeaponRocket(pp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -6213,6 +6230,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_RAIL)))
|
if (TEST(pp->WpnFlags, BIT(WPN_RAIL)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_RAIL));
|
SET(pp->WpnFlags, BIT(WPN_RAIL));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_RAIL && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_RAIL && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
InitWeaponRail(pp);
|
InitWeaponRail(pp);
|
||||||
|
@ -6252,6 +6272,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_SHOTGUN)))
|
if (TEST(pp->WpnFlags, BIT(WPN_SHOTGUN)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_SHOTGUN));
|
SET(pp->WpnFlags, BIT(WPN_SHOTGUN));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_SHOTGUN && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_SHOTGUN && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
InitWeaponShotgun(pp);
|
InitWeaponShotgun(pp);
|
||||||
|
@ -6318,6 +6341,9 @@ KeyMain:
|
||||||
if (TEST(pp->WpnFlags, BIT(WPN_HOTHEAD)))
|
if (TEST(pp->WpnFlags, BIT(WPN_HOTHEAD)))
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_NAPALM) | BIT(WPN_RING) | BIT(WPN_HOTHEAD));
|
SET(pp->WpnFlags, BIT(WPN_NAPALM) | BIT(WPN_RING) | BIT(WPN_HOTHEAD));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_HOTHEAD && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_HOTHEAD && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
InitWeaponHothead(pp);
|
InitWeaponHothead(pp);
|
||||||
|
@ -6362,6 +6388,9 @@ KeyMain:
|
||||||
break;
|
break;
|
||||||
SET(pp->WpnFlags, BIT(WPN_HEART));
|
SET(pp->WpnFlags, BIT(WPN_HEART));
|
||||||
|
|
||||||
|
if (!gs.WeaponAutoSwitch)
|
||||||
|
break;
|
||||||
|
|
||||||
if (User[pp->PlayerSprite]->WeaponNum > WPN_HEART && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
if (User[pp->PlayerSprite]->WeaponNum > WPN_HEART && User[pp->PlayerSprite]->WeaponNum != WPN_SWORD)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -7492,7 +7492,7 @@ const char *DeathString(short SpriteNum)
|
||||||
case 5011:
|
case 5011:
|
||||||
return "blade";
|
return "blade";
|
||||||
case STAR1:
|
case STAR1:
|
||||||
if (useDarts) return "dart";
|
if (gs.Darts) return "dart";
|
||||||
else return "shuriken";
|
else return "shuriken";
|
||||||
case CROSSBOLT:
|
case CROSSBOLT:
|
||||||
return "crossbow bolt";
|
return "crossbow bolt";
|
||||||
|
|
Loading…
Reference in a new issue