mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Minor menu cleanups, only half-finished (if that).
git-svn-id: https://svn.eduke32.com/eduke32@3084 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2fde79b4bc
commit
54ec3c7640
8 changed files with 736 additions and 630 deletions
|
@ -915,7 +915,7 @@ nextdemo_nomenu:
|
|||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
g_player[myconnectindex].ps->gm |= MODE_MENU;
|
||||
ChangeToMenu(0);
|
||||
M_ChangeMenu(MENU_MAIN);
|
||||
S_MenuSound();
|
||||
}
|
||||
|
||||
|
|
|
@ -2870,8 +2870,8 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
|
||||
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2) ready2send = 0;
|
||||
|
||||
if (g_player[myconnectindex].ps->gm&MODE_GAME) ChangeToMenu(50);
|
||||
else ChangeToMenu(0);
|
||||
if (g_player[myconnectindex].ps->gm&MODE_GAME) M_ChangeMenu(50);
|
||||
else M_ChangeMenu(MENU_MAIN);
|
||||
screenpeek = myconnectindex;
|
||||
}
|
||||
}
|
||||
|
@ -3998,8 +3998,6 @@ int32_t A_InsertSprite(int32_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int3
|
|||
|
||||
A_ResetVars(i);
|
||||
|
||||
lastupdate[i] = 0;
|
||||
|
||||
if (apScriptGameEvent[EVENT_EGS])
|
||||
{
|
||||
extern int32_t block_deletesprite;
|
||||
|
@ -6006,6 +6004,7 @@ SPAWN_END:
|
|||
|
||||
// spawning is technically not allowed to fail in BUILD, so we just hide whatever
|
||||
// the client spawns with SPRITE_NULL because the server will send it anyway
|
||||
/*
|
||||
if (g_netClient && j >= 0)
|
||||
{
|
||||
int32_t zz;
|
||||
|
@ -6016,6 +6015,7 @@ SPAWN_END:
|
|||
return i;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return i;
|
||||
}
|
||||
|
@ -6191,11 +6191,13 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
i = t->owner;
|
||||
s = &sprite[t->owner];
|
||||
|
||||
/*
|
||||
if (A_CheckSpriteFlags(i, SPRITE_NULL))
|
||||
{
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
|
||||
if (t->picnum < GREENSLIME || t->picnum > GREENSLIME+7)
|
||||
switch (DYNAMICTILEMAP(t->picnum))
|
||||
|
@ -7796,7 +7798,7 @@ void G_HandleLocalKeys(void)
|
|||
if (KB_UnBoundKeyPressed(sc_F1)/* || (ud.show_help && I_AdvanceTrigger())*/)
|
||||
{
|
||||
KB_ClearKeyDown(sc_F1);
|
||||
ChangeToMenu(400);
|
||||
M_ChangeMenu(400);
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
||||
|
@ -7843,7 +7845,7 @@ FAKE_F2:
|
|||
P_DoQuote(QUOTE_SAVE_DEAD,g_player[myconnectindex].ps);
|
||||
return;
|
||||
}
|
||||
ChangeToMenu(350);
|
||||
M_ChangeMenu(350);
|
||||
g_screenCapture = 1;
|
||||
G_DrawRooms(myconnectindex,65536);
|
||||
//savetemp("duke3d.tmp",waloff[TILE_SAVESHOT],160*100);
|
||||
|
@ -7867,7 +7869,7 @@ FAKE_F2:
|
|||
KB_ClearKeyDown(sc_F3);
|
||||
|
||||
FAKE_F3:
|
||||
ChangeToMenu(300);
|
||||
M_ChangeMenu(300);
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
|
||||
|
@ -7894,7 +7896,7 @@ FAKE_F3:
|
|||
ready2send = 0;
|
||||
totalclock = ototalclock;
|
||||
}
|
||||
ChangeToMenu(701);
|
||||
M_ChangeMenu(MENU_SOUND_INGAME);
|
||||
|
||||
}
|
||||
|
||||
|
@ -7987,7 +7989,7 @@ FAKE_F3:
|
|||
if (KB_UnBoundKeyPressed(sc_F10))
|
||||
{
|
||||
KB_ClearKeyDown(sc_F10);
|
||||
ChangeToMenu(500);
|
||||
M_ChangeMenu(500);
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
g_player[myconnectindex].ps->gm |= MODE_MENU;
|
||||
|
@ -8053,7 +8055,7 @@ FAKE_F3:
|
|||
if (KB_UnBoundKeyPressed(sc_F11))
|
||||
{
|
||||
KB_ClearKeyDown(sc_F11);
|
||||
ChangeToMenu(232);
|
||||
M_ChangeMenu(232);
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
g_player[myconnectindex].ps->gm |= MODE_MENU;
|
||||
|
@ -9757,7 +9759,7 @@ void G_BackToMenu(void)
|
|||
if (ud.recstat == 1) G_CloseDemoWrite();
|
||||
ud.warp_on = 0;
|
||||
g_player[myconnectindex].ps->gm = MODE_MENU;
|
||||
ChangeToMenu(0);
|
||||
M_ChangeMenu(MENU_MAIN);
|
||||
KB_FlushKeyboardQueue();
|
||||
Bsprintf(tempbuf, "%s - " APPNAME, g_gameNamePtr);
|
||||
wm_setapptitle(tempbuf);
|
||||
|
@ -9790,7 +9792,7 @@ static int32_t G_EndOfLevel(void)
|
|||
if (!VOLUMEALL)
|
||||
G_DoOrderScreen();
|
||||
g_player[myconnectindex].ps->gm = MODE_MENU;
|
||||
ChangeToMenu(0);
|
||||
M_ChangeMenu(MENU_MAIN);
|
||||
probey = 0;
|
||||
return 2;
|
||||
}
|
||||
|
@ -9858,7 +9860,7 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
#endif
|
||||
|
||||
Bassert(sizeof(actor_t)==128);
|
||||
Bassert(offsetof(actor_t, bposx) == sizeof(netactor_t));
|
||||
Bassert(offsetof(actor_t, lightId) == sizeof(netactor_t));
|
||||
Bassert(sizeof(DukePlayer_t)%4 == 0);
|
||||
|
||||
#ifdef GEKKO
|
||||
|
|
|
@ -2329,7 +2329,7 @@ nullquote:
|
|||
|
||||
case CON_CMENU:
|
||||
insptr++;
|
||||
ChangeToMenu(Gv_GetVarX(*insptr++));
|
||||
M_ChangeMenu(Gv_GetVarX(*insptr++));
|
||||
continue;
|
||||
|
||||
case CON_SOUNDVAR:
|
||||
|
@ -3080,7 +3080,7 @@ nullquote:
|
|||
{
|
||||
g_player[vm.g_p].ps->gm |= MODE_MENU;
|
||||
KB_ClearKeyDown(sc_Space);
|
||||
ChangeToMenu(15000);
|
||||
M_ChangeMenu(15000);
|
||||
}
|
||||
else g_player[vm.g_p].ps->gm = MODE_RESTART;
|
||||
vm.g_flags |= VM_NOEXECUTE;
|
||||
|
@ -5101,11 +5101,13 @@ void A_Execute(int32_t iActor,int32_t iPlayer,int32_t lDist)
|
|||
&sprite[iActor], 0
|
||||
};
|
||||
|
||||
/*
|
||||
if (g_netClient && A_CheckSpriteFlags(iActor, SPRITE_NULL))
|
||||
{
|
||||
A_DeleteSprite(iActor);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
if (g_netServer || g_netClient)
|
||||
randomseed = ticrandomseed;
|
||||
|
@ -5230,11 +5232,11 @@ void A_Execute(int32_t iActor,int32_t iPlayer,int32_t lDist)
|
|||
else if (ud.respawn_items == 1 && (vm.g_sp->cstat&32768)) return;
|
||||
|
||||
if (A_CheckSpriteFlags(vm.g_i, SPRITE_USEACTIVATOR) && sector[vm.g_sp->sectnum].lotag & 16384)
|
||||
changespritestat(vm.g_i,STAT_ZOMBIEACTOR);
|
||||
changespritestat(vm.g_i, STAT_ZOMBIEACTOR);
|
||||
else if (actor[vm.g_i].timetosleep > 1)
|
||||
actor[vm.g_i].timetosleep--;
|
||||
else if (actor[vm.g_i].timetosleep == 1)
|
||||
changespritestat(vm.g_i,STAT_ZOMBIEACTOR);
|
||||
changespritestat(vm.g_i, STAT_ZOMBIEACTOR);
|
||||
}
|
||||
|
||||
void G_SaveMapState(mapstate_t *save)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,6 +25,45 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "savegame.h"
|
||||
|
||||
#define MENU_MARGIN_REGULAR 40
|
||||
#define MENU_MARGIN_CENTER 160
|
||||
|
||||
enum MenuIndex_t {
|
||||
MENU_MAIN = 0,
|
||||
MENU_MAIN_INGAME = 50,
|
||||
MENU_EPISODE = 100,
|
||||
MENU_USERMAP = 101,
|
||||
MENU_SELECTMAP = 102,
|
||||
MENU_SKILL = 110,
|
||||
MENU_SETUP = 200,
|
||||
MENU_GAMESETUP = 201,
|
||||
MENU_OPTIONS = 202,
|
||||
MENU_VIDEOSETUP = 203,
|
||||
MENU_KEYBOARDSETUP = 204,
|
||||
MENU_KEYBOARDASSIGN = 210,
|
||||
MENU_LOAD = 300,
|
||||
MENU_STORY = 400,
|
||||
MENU_F1HELP = 401,
|
||||
MENU_QUIT = 500,
|
||||
MENU_QUITTOTITLE = 501,
|
||||
MENU_QUIT2 = 502,
|
||||
MENU_SOUND = 700,
|
||||
MENU_SOUND_INGAME = 701,
|
||||
MENU_CREDITS = 990,
|
||||
MENU_CREDITS2 = 991,
|
||||
MENU_CREDITS3 = 992,
|
||||
MENU_CREDITS4 = 993,
|
||||
MENU_CREDITS5 = 994,
|
||||
MENU_CREDITS6 = 995,
|
||||
MENU_CREDITS7 = 996,
|
||||
MENU_CREDITS8 = 997,
|
||||
MENU_CREDITS9 = 998,
|
||||
MENU_CREDITS10 = 999,
|
||||
MENU_ADULTMODE = 10000,
|
||||
MENU_ADULTPASSWORD = 10001,
|
||||
MENU_BUYDUKE = 20000,
|
||||
|
||||
};
|
||||
extern char inputloc;
|
||||
extern int16_t g_skillSoundID;
|
||||
extern int32_t g_lastSaveSlot;
|
||||
|
@ -32,7 +71,7 @@ extern int32_t g_quitDeadline;
|
|||
extern int32_t probey;
|
||||
extern int32_t voting;
|
||||
int32_t menutext_(int32_t x,int32_t y,int32_t s,int32_t p,char *t,int32_t bits);
|
||||
void ChangeToMenu(int32_t cm);
|
||||
void M_ChangeMenu(int32_t cm);
|
||||
void G_CheckPlayerColor(int32_t *color,int32_t prev_color);
|
||||
void M_DisplayMenus(void);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ static int32_t osdcmd_changelevel(const osdfuncparm_t *parm)
|
|||
ud.m_noexits = 0;
|
||||
|
||||
g_player[myconnectindex].ps->gm |= MODE_MENU;
|
||||
ChangeToMenu(603);
|
||||
M_ChangeMenu(603);
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ static int32_t osdcmd_map(const osdfuncparm_t *parm)
|
|||
ud.m_noexits = 0;
|
||||
|
||||
g_player[myconnectindex].ps->gm |= MODE_MENU;
|
||||
ChangeToMenu(603);
|
||||
M_ChangeMenu(603);
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -641,7 +641,7 @@ static int32_t osdcmd_cmenu(const osdfuncparm_t *parm)
|
|||
}
|
||||
else
|
||||
{
|
||||
ChangeToMenu(Batol(parm->parms[0]));
|
||||
M_ChangeMenu(Batol(parm->parms[0]));
|
||||
}
|
||||
|
||||
return OSDCMD_OK;
|
||||
|
@ -1476,7 +1476,7 @@ int32_t registerosdcommands(void)
|
|||
{ "snd_mixrate", "snd_mixrate: sound mixing rate", (void *)&ud.config.MixRate, CVAR_INT, 0, 48000 },
|
||||
{ "snd_numbits", "snd_numbits: sound bits", (void *)&ud.config.NumBits, CVAR_INT, 8, 16 },
|
||||
{ "snd_numchannels", "snd_numchannels: the number of sound channels", (void *)&ud.config.NumChannels, CVAR_INT, 0, 2 },
|
||||
{ "snd_numvoices", "snd_numvoices: the number of concurrent sounds", (void *)&ud.config.NumVoices, CVAR_INT, 0, 96 },
|
||||
{ "snd_numvoices", "snd_numvoices: the number of concurrent sounds", (void *)&ud.config.NumVoices, CVAR_INT, 0, 256 },
|
||||
{ "snd_reversestereo", "snd_reversestereo: reverses the stereo channels", (void *)&ud.config.ReverseStereo, CVAR_BOOL, 0, 16 },
|
||||
|
||||
{ "team","team <value>: change team in multiplayer", (void *)&ud.team, CVAR_INT|CVAR_MULTI, 0, 3 },
|
||||
|
|
|
@ -221,7 +221,7 @@ typedef struct {
|
|||
int32_t pcolor, pteam;
|
||||
uint8_t frags[MAXPLAYERS], wchoice[MAX_WEAPONS];
|
||||
|
||||
char vote, gotvote, pingcnt, playerquitflag;
|
||||
char vote, gotvote, pingcnt, playerquitflag, ready;
|
||||
char user_name[32];
|
||||
uint32_t revision;
|
||||
} playerdata_t;
|
||||
|
|
|
@ -238,7 +238,7 @@ static inline int32_t A_FP_ManhattanDist(const DukePlayer_t *ps, const spritetyp
|
|||
|
||||
int32_t __fastcall A_FindPlayer(const spritetype *s, int32_t *d)
|
||||
{
|
||||
if ((!g_netServer && ud.multimode < 2))
|
||||
if (!g_netServer && ud.multimode < 2)
|
||||
{
|
||||
DukePlayer_t *const myps = g_player[myconnectindex].ps;
|
||||
*d = A_FP_ManhattanDist(myps, s);
|
||||
|
|
Loading…
Reference in a new issue