- World Tour commentary stubs.

# Conflicts:
#	source/core/gamecontrol.cpp
This commit is contained in:
Christoph Oelckers 2020-05-12 07:51:45 +02:00
parent 0dacfb0049
commit deef1b5936
5 changed files with 34 additions and 11 deletions

View file

@ -2120,7 +2120,7 @@ BEGIN_DUKE_NS
#define MAMAJIBA__STATICRR -8890
#define MAMAJIBB__STATICRR -8895
extern int16_t DynamicTileMap[MAXTILES];
extern int16_t DynamicTileMap[];
void G_InitDynamicTiles(void);

View file

@ -234,7 +234,8 @@ bool checkhitswitch_d(int snum, int w, int switchtype)
if (switchtype == SWITCH_SPRITE) // A wall sprite
{
lotag = sprite[w].lotag; if (lotag == 0) return 0;
lotag = sprite[w].lotag;
if (lotag == 0) return 0;
hitag = sprite[w].hitag;
sx = sprite[w].x;
sy = sprite[w].y;
@ -243,7 +244,8 @@ bool checkhitswitch_d(int snum, int w, int switchtype)
}
else
{
lotag = wall[w].lotag; if (lotag == 0) return 0;
lotag = wall[w].lotag;
if (lotag == 0) return 0;
hitag = wall[w].hitag;
sx = wall[w].x;
sy = wall[w].y;
@ -260,6 +262,22 @@ bool checkhitswitch_d(int snum, int w, int switchtype)
case ALIENSWITCH:
case ALIENSWITCH + 1:
break;
case DEVELOPERCOMMENTARY + 1: //Twentieth Anniversary World Tour
if (switchtype == 1)
{
sprite[w].picnum--;
StopCommentary();
return true;
}
return false;
case DEVELOPERCOMMENTARY: //Twentieth Anniversary World Tour
if (switchtype == 1)
{
if (StartCommentary(lotag, w))
sprite[w].picnum++;
return true;
}
return false;
case ACCESSSWITCH:
case ACCESSSWITCH2:
if (ps[snum].access_incs == 0)

View file

@ -85,17 +85,20 @@ int S_DefineSound(unsigned index, const char* filename, int ps, int pe, int pr,
void S_InitSound();
void S_PlayRRMusic(int newTrack = -1);
inline bool S_IsAmbientSFX(int spriteNum)
{
return (sprite[spriteNum].picnum == TILE_MUSICANDSFX && sprite[spriteNum].lotag < 999);
}
inline bool S_IsSoundValid(int num)
{
return (!soundEngine->isValidSoundId(num + 1));
}
// Placeholders.
inline void StopCommentary()
{}
inline bool StartCommentary(int tag, int sprnum)
{
return false;
}
END_DUKE_NS

View file

@ -459,8 +459,6 @@ void Gv_ResetSystemDefaults(void)
// call many times...
char aszBuf[64];
//AddLog("ResetWeaponDefaults");
for (int weaponNum = 0; weaponNum < MAX_WEAPONS; ++weaponNum)
{
for (int playerNum = 0; playerNum < MAXPLAYERS; ++playerNum)
@ -509,7 +507,6 @@ void Gv_ResetSystemDefaults(void)
g_worksLikeVarID = Gv_GetVarIndex("WORKSLIKE");
g_zRangeVarID = Gv_GetVarIndex("ZRANGE");
//AddLog("EOF:ResetWeaponDefaults");
}
// Will set members that were overridden at CON translation time to 1.

View file

@ -172,6 +172,11 @@ int S_DefineSound(unsigned index, const char *filename, int minpitch, int maxpit
}
inline bool S_IsAmbientSFX(int spriteNum)
{
return (sprite[spriteNum].picnum == TILE_MUSICANDSFX && sprite[spriteNum].lotag < 999);
}
//==========================================================================
//
//