Clean up some of the level initialization and player value reset functions that live in premap.cpp

git-svn-id: https://svn.eduke32.com/eduke32@7171 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-11-18 18:07:51 +00:00
parent beafd13b1a
commit 3aaa5e04aa
6 changed files with 583 additions and 574 deletions

View file

@ -5032,7 +5032,7 @@ DETONATEB:
if (G_HaveActor(sprite[spriteNum].picnum)) if (G_HaveActor(sprite[spriteNum].picnum))
{ {
int32_t playerDist; int32_t playerDist;
int playerNum = A_FindPlayer(pSprite, &playerDist); int const playerNum = A_FindPlayer(pSprite, &playerDist);
A_Execute(spriteNum, playerNum, playerDist); A_Execute(spriteNum, playerNum, playerDist);
} }
next_sprite: next_sprite:

View file

@ -181,7 +181,7 @@ typedef struct {
int32_t m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail; int32_t m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail;
int32_t m_ffire,ffire,m_player_skill,m_level_number,m_volume_number,multimode; int32_t m_ffire,ffire,m_player_skill,m_level_number,m_volume_number,multimode;
int32_t player_skill,level_number,volume_number,m_marker,marker,mouseflip; int32_t player_skill,level_number,volume_number,m_marker,marker,mouseflip;
int32_t music_episode, music_level; int32_t music_episode, music_level, skill_voice;
int32_t playerbest; int32_t playerbest;

View file

@ -41,8 +41,6 @@ droidinput_t droidinput;
#define MENU_MARGIN_CENTER 160 #define MENU_MARGIN_CENTER 160
#define MENU_HEIGHT_CENTER 100 #define MENU_HEIGHT_CENTER 100
int32_t g_skillSoundVoice = -1;
#define USERMAPENTRYLENGTH 25 #define USERMAPENTRYLENGTH 25
static FORCE_INLINE void Menu_StartTextInput() static FORCE_INLINE void Menu_StartTextInput()
@ -2866,7 +2864,7 @@ static void Menu_StartGameWithoutSkill(void)
{ {
ud.m_player_skill = M_SKILL.currentEntry+1; ud.m_player_skill = M_SKILL.currentEntry+1;
g_skillSoundVoice = S_PlaySound(PISTOL_BODYHIT); ud.skill_voice = S_PlaySound(PISTOL_BODYHIT);
ud.m_respawn_monsters = 0; ud.m_respawn_monsters = 0;
@ -2975,7 +2973,7 @@ static void Menu_EntryLinkActivate(MenuEntry_t *entry)
ud.m_player_skill = M_SKILL.currentEntry+1; ud.m_player_skill = M_SKILL.currentEntry+1;
g_skillSoundVoice = S_PlaySound(skillsound); ud.skill_voice = S_PlaySound(skillsound);
if (M_SKILL.currentEntry == 3) ud.m_respawn_monsters = 1; if (M_SKILL.currentEntry == 3) ud.m_respawn_monsters = 1;
else ud.m_respawn_monsters = 0; else ud.m_respawn_monsters = 0;

File diff suppressed because it is too large Load diff

View file

@ -36,7 +36,7 @@ int G_FindLevelByFile(const char *fileName);
void G_CacheMapData(void); void G_CacheMapData(void);
void G_FreeMapState(int levelNum); void G_FreeMapState(int levelNum);
void G_NewGame(int volumeNum, int levelNum, int skillNum); void G_NewGame(int volumeNum, int levelNum, int skillNum);
void G_ResetTimers(uint8_t keepgtics); void G_ResetTimers(bool saveMoveCnt);
void G_SetCrosshairColor(int32_t r,int32_t g,int32_t b); void G_SetCrosshairColor(int32_t r,int32_t g,int32_t b);
void G_UpdateScreenArea(void); void G_UpdateScreenArea(void);
void G_SetViewportShrink(int32_t dir); void G_SetViewportShrink(int32_t dir);

View file

@ -61,7 +61,6 @@ typedef struct
extern char g_soundlocks[MAXSOUNDS]; extern char g_soundlocks[MAXSOUNDS];
extern sound_t g_sounds[MAXSOUNDS]; extern sound_t g_sounds[MAXSOUNDS];
extern int32_t g_skillSoundVoice;
extern int32_t g_numEnvSoundsPlaying,g_highestSoundIdx; extern int32_t g_numEnvSoundsPlaying,g_highestSoundIdx;
bool A_CheckSoundPlaying(int spriteNum,int soundNum); bool A_CheckSoundPlaying(int spriteNum,int soundNum);