Permalink
Browse files

Disable dead code.

git-svn-id: svn+ssh://jay/var/svn/wolf/trunk@165 32837ae5-38f0-4cfd-8401-3ff76d8497c4
  • Loading branch information...
1 parent 91c66c0 commit d43026b7acd023eaf3d4e19ef58697bf7186b710 paul committed Jul 6, 2008
Showing with 20 additions and 15 deletions.
  1. +1 −1 Makefile
  2. +5 −0 wl_def.h
  3. +1 −1 wl_draw.c
  4. +4 −4 wl_game.c
  5. +4 −4 wl_inter.c
  6. +3 −3 wl_main.c
  7. +1 −1 wl_play.c
  8. +1 −1 wl_text.c
View
2 Makefile
@@ -20,7 +20,7 @@ HOSTCFLAGS = -DHOST -g -O2
OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
wl_act1.o wl_act2.o wl_act3.o wl_agent.o wl_game.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_main.o \
- wl_debug.o vi_comm.o tables.o pagemap.c \
+ wl_debug.o vi_comm.o tables.o pagemap.o \
grstarts.o pictable.o pal4bit.o \
sprites.o walls.o mapdata.o
# net.o
View
5 wl_def.h
@@ -677,7 +677,12 @@ typedef struct
myint faceframe;
myint attackframe,attackcount,weaponframe;
+#ifndef EMBEDDED
+#define gamestate_episode gamestate.episode
myint episode;
+#else
+#define gamestate_episode 0
+#endif
#ifdef ENABLE_STATS
myint secretcount,treasurecount,killcount;
myint secrettotal,treasuretotal;
View
2 wl_draw.c
@@ -642,7 +642,7 @@ static const byte Ceiling[]=
static void ClearScreen()
{
- unsigned myint ceiling = Ceiling[gamestate.episode*10+mapon];
+ unsigned myint ceiling = Ceiling[gamestate_episode*10+mapon];
unsigned myint floor = 0x19;
VL_Bar(xoffset, yoffset, viewwidth, sviewheight / 2, ceiling);
View
8 wl_game.c
@@ -533,7 +533,7 @@ void SetupGameLevel()
Quit("Map not 64*64!");
#endif
- mapon -= gamestate.episode*10;
+ mapon -= gamestate_episode*10;
memset(tilemap, 0, sizeof(tilemap));
memset(actorat, 0, sizeof(actorat));
@@ -545,11 +545,11 @@ void SetupGameLevel()
/* spawn actors */
/* load the level */
- CA_CacheMap(gamestate.mapon+10*gamestate.episode, 1);
+ CA_CacheMap(gamestate.mapon+10*gamestate_episode, 1);
ScanInfoPlane();
- CA_CacheMap(gamestate.mapon+10*gamestate.episode, 0);
+ CA_CacheMap(gamestate.mapon+10*gamestate_episode, 0);
FixupActors();
@@ -1222,7 +1222,7 @@ void GameLoop()
// COMING BACK FROM SECRET LEVEL
//
if (gamestate.mapon == 9)
- gamestate.mapon = ElevatorBackTo[gamestate.episode]; // back from secret
+ gamestate.mapon = ElevatorBackTo[gamestate_episode]; // back from secret
else
//
// GOING TO SECRET LEVEL
View
8 wl_inter.c
@@ -540,7 +540,7 @@ void LevelCompleted()
Write(26,2,itoa(gamestate.mapon+1,tempstr,10));
- Write(26,12,parTimes[gamestate.episode*10+mapon].timestr);
+ Write(26,12,parTimes[gamestate_episode*10+mapon].timestr);
//
// PRINT TIME
@@ -550,8 +550,8 @@ void LevelCompleted()
if (sec > 99*60) // 99 minutes max
sec = 99*60;
- if (gamestate.TimeCount<parTimes[gamestate.episode*10+mapon].time*4200)
- timeleft=(parTimes[gamestate.episode*10+mapon].time*4200)/70-sec;
+ if (gamestate.TimeCount<parTimes[gamestate_episode*10+mapon].time*4200)
+ timeleft=(parTimes[gamestate_episode*10+mapon].time*4200)/70-sec;
min=sec/60;
sec%=60;
@@ -1057,7 +1057,7 @@ void CheckHighScore(long score, word other)
strcpy(myscore.name, "");
myscore.score = score;
- myscore.episode = gamestate.episode;
+ myscore.episode = gamestate_episode;
myscore.completed = other;
for (i = 0, n = -1; i < MaxScores;i++)
View
6 wl_main.c
@@ -434,7 +434,7 @@ myint SaveTheGame(const char *fn, const char *tag, myint dx, myint dy)
WriteInt32(fd, gamestate.attackframe);
WriteInt32(fd, gamestate.attackcount);
WriteInt32(fd, gamestate.weaponframe);
- WriteInt32(fd, gamestate.episode);
+ WriteInt32(fd, gamestate_episode);
WriteInt32(fd, gamestate.secretcount);
WriteInt32(fd, gamestate.treasurecount);
WriteInt32(fd, gamestate.killcount);
@@ -671,7 +671,7 @@ myint LoadTheGame(const char *fn, myint dx, myint dy)
gamestate.attackframe = ReadInt32(fd);
gamestate.attackcount = ReadInt32(fd);
gamestate.weaponframe = ReadInt32(fd);
- gamestate.episode = ReadInt32(fd);
+ gamestate_episode = ReadInt32(fd);
gamestate.secretcount = ReadInt32(fd);
gamestate.treasurecount = ReadInt32(fd);
gamestate.killcount = ReadInt32(fd);
@@ -1152,14 +1152,14 @@ void NewGame(myint difficulty, myint episode)
#ifndef EMBEDDED
gamestate_difficulty = difficulty;
+ gamestate_episode = episode;
#endif
gamestate.weapon = gamestate.bestweapon
= gamestate.chosenweapon = wp_pistol;
gamestate.health = 100;
gamestate.ammo = STARTAMMO;
gamestate.lives = 3;
gamestate.nextextra = EXTRAPOINTS;
- gamestate.episode = episode;
startgame = true;
}
View
2 wl_play.c
@@ -929,7 +929,7 @@ void StopMusic()
void StartMusic()
{
- StartCPMusic(songs[gamestate.mapon+gamestate.episode*10]);
+ StartCPMusic(songs[gamestate.mapon+gamestate_episode*10]);
}
#endif
View
2 wl_text.c
@@ -684,7 +684,7 @@ void EndText()
ClearMemory();
- artnum = endextern+gamestate.episode;
+ artnum = endextern+gamestate_episode;
CA_CacheGrChunk(artnum);
text = (const char *)grsegs[artnum];

0 comments on commit d43026b

Please sign in to comment.