Skip to content

Commit

Permalink
Disable dead code.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://jay/var/svn/wolf/trunk@165 32837ae5-38f0-4cfd-8401-3ff76d8497c4
  • Loading branch information
paul committed Jul 6, 2008
1 parent 91c66c0 commit d43026b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions wl_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion wl_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions wl_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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();

Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions wl_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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++)
Expand Down
6 changes: 3 additions & 3 deletions wl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion wl_play.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ void StopMusic()

void StartMusic()
{
StartCPMusic(songs[gamestate.mapon+gamestate.episode*10]);
StartCPMusic(songs[gamestate.mapon+gamestate_episode*10]);
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion wl_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ void EndText()

ClearMemory();

artnum = endextern+gamestate.episode;
artnum = endextern+gamestate_episode;
CA_CacheGrChunk(artnum);
text = (const char *)grsegs[artnum];

Expand Down

0 comments on commit d43026b

Please sign in to comment.