Permalink
Browse files

Remove dead code.

git-svn-id: svn+ssh://jay/var/svn/wolf/trunk@158 32837ae5-38f0-4cfd-8401-3ff76d8497c4
  • Loading branch information...
1 parent bef56f2 commit a5ee03f9e382ff2871a918da00c766663b0c406b paul committed Jul 5, 2008
Showing with 103 additions and 57 deletions.
  1. +2 −1 Makefile
  2. +0 −1 build_pagemap.c
  3. +8 −0 id_ca.c
  4. +1 −1 id_ca.h
  5. +3 −1 id_us.c
  6. +7 −3 id_vh.c
  7. +2 −1 luminary-crt0.S
  8. +1 −1 misc.c
  9. +1 −1 sd_null.c
  10. +0 −8 vi_bare.c
  11. +4 −0 vi_comm.c
  12. +2 −0 wl_act2.c
  13. +10 −1 wl_def.h
  14. +19 −19 wl_draw.c
  15. +6 −0 wl_game.c
  16. +4 −4 wl_inter.c
  17. +26 −10 wl_main.c
  18. +7 −5 wl_play.c
View
@@ -21,7 +21,8 @@ OBJS = objs.o misc.o id_ca.o id_vh.o id_us.o \
wl_inter.o wl_menu.o wl_play.o wl_state.o wl_main.o \
wl_debug.o vi_comm.o tables.o mapheaders.o pagemap.c \
grstarts.o pictable.o pal4bit.o \
- sprites.o walls.o mapdata.o net.o
+ sprites.o walls.o mapdata.o
+# net.o
# romchunk.o
ROBJS = wl_draw.o
SOBJS = $(OBJS) $(ROBJS) vi_svga.o
View
@@ -13,7 +13,6 @@ int main()
fread(header, 2, 3, f);
printf("#include \"wl_def.h\"\n");
- printf("const myint ChunksInFile = %d;\n", header[0]);
printf("const myint PMSpriteStart = %d;\n", header[1]);
#ifdef ENABLE_AUDIO
printf("const myint PMSoundStart = %d;\n", header[2]);
View
@@ -523,6 +523,7 @@ void CA_Startup()
mapon = -1;
}
+#ifndef EMBEDDED
/*
======================
=
@@ -545,6 +546,7 @@ void CA_Shutdown()
CloseRead(audiohandle);
#endif
}
+#endif
/* ======================================================================== */
@@ -695,12 +697,14 @@ memptr CA_GetChunk(myint chunk)
}
#endif
+#ifndef EMBEDDED
void CA_UnCacheGrChunk(myint chunk)
{
}
void CA_CacheGrChunk(myint chunk)
{
}
+#endif
/* ======================================================================== */
@@ -780,9 +784,11 @@ void MM_Startup()
pool_offset = 0;
}
+#ifndef EMBEDDED
void MM_Shutdown()
{
}
+#endif
memptr MM_AllocPool(pool_id *id, unsigned long size)
{
@@ -967,8 +973,10 @@ static void PML_ClosePageFile()
memptr PM_GetPage(myint pagenum)
{
memptr addr;
+#ifndef EMBEDDED
if (pagenum >= ChunksInFile)
Quit("PM_GetPage: Invalid page request");
+#endif
if (PageAddr[pagenum])
return MM_PoolPtr(PageAddr[pagenum]);
View
@@ -81,7 +81,7 @@ typedef struct {
} PageListStruct;
#ifdef ENABLE_PRECOMPILE
-extern const myint ChunksInFile, PMSpriteStart, PMSoundStart;
+extern const myint PMSpriteStart, PMSoundStart;
extern const PageListStruct PMPages[];
extern pool_id PageAddr[];
extern const uint32_t grstarts[NUMCHUNKS + 1];
View
@@ -8,9 +8,11 @@ typedef struct {
Point ul, lr;
} Rect;
+#ifndef EMBEDDED
// Global variables
word PrintX,PrintY;
word WindowX,WindowY,WindowW,WindowH;
+#endif
// Internal variables
@@ -46,6 +48,7 @@ void US_Startup()
}
+#ifndef EMBEDDED
///////////////////////////////////////////////////////////////////////////
//
// US_Shutdown() - Shuts down the User Mgr
@@ -59,7 +62,6 @@ void US_Shutdown()
US_Started = false;
}
-#ifndef EMBEDDED
// Window/Printing routines
///////////////////////////////////////////////////////////////////////////
View
10 id_vh.c
@@ -8,14 +8,15 @@ myint px, py;
byte fontcolor, backcolor;
myint fontnumber;
+#ifndef LUMINARY
+myint xfrac, yfrac;
+
boolean screenfaded;
#ifndef SKIPFADE
static byte palette1[256][3], palette2[256][3];
#endif
-myint xfrac, yfrac;
-
/* ======================================================================== */
#ifndef SKIPFADE
@@ -82,7 +83,6 @@ void VL_FadeOut(myint start, myint end, myint red, myint green, myint blue, myin
screenfaded = true;
}
-#ifndef LUMINARY
/*
=================
=
@@ -425,11 +425,15 @@ void VW_Startup()
{
VL_Startup();
+#ifndef EMBEDDED
xfrac = (vwidth << 16) / 320;
yfrac = (vheight << 16) / 200;
+#endif
}
+#ifndef EMBEDDED
void VW_Shutdown()
{
VL_Shutdown();
}
+#endif
View
@@ -97,7 +97,8 @@ __isr_vectors:
.word isr_handler /*39*/
.word isr_handler /*40*/
.word isr_handler /*41*/
-.word ethernet_isr /*42*/
+.word isr_handler /*42*/
+/*.word ethernet_isr *//*42*/
.word isr_handler /*43*/
.word isr_handler /*44*/
.word isr_handler /*45*/
View
2 misc.c
@@ -154,6 +154,7 @@ unsigned long sleepuntil(unsigned long t)
return now;
}
+#ifndef EMBEDDED
long filelength(myint handle)
{
#ifdef __linux__
@@ -170,7 +171,6 @@ long filelength(myint handle)
#endif
}
-#ifndef EMBEDDED
char *itoa(myint value, char *string, myint radix)
{
return ltoa(value, string, radix);
View
@@ -6,7 +6,6 @@ boolean AdLibPresent, SoundBlasterPresent;
SDMode SoundMode;
SMMode MusicMode;
SDSMode DigiMode;
-#endif
void SD_SetDigiDevice(SDSMode mode)
{
@@ -128,3 +127,4 @@ void PlaySoundLocGlobal(word s, myint id, fixed gx,fixed gy)
void UpdateSoundLoc(fixed x, fixed y, myint angle)
{
}
+#endif
View
@@ -237,14 +237,6 @@ void VL_Startup()
#endif
}
-void VL_Shutdown()
-{
-}
-
-void VL_WaitVBL(int i)
-{
-}
-
void VW_UpdateScreen()
{
#ifdef LUMINARY
View
@@ -175,6 +175,7 @@ static void INL_StartKbd(void)
IN_ClearKeysDown();
}
+#ifndef EMBEDDED
///////////////////////////////////////////////////////////////////////////
//
// INL_ShutKbd() - Restores keyboard control to the BIOS
@@ -192,6 +193,7 @@ static void INL_ShutKbd(void)
static void INL_ShutMouse(void)
{
}
+#endif
#ifdef ENABLE_JOYSTICK
///////////////////////////////////////////////////////////////////////////
@@ -253,6 +255,7 @@ void IN_Startup(void)
IN_Started = true;
}
+#ifndef EMBEDDED
///////////////////////////////////////////////////////////////////////////
//
// IN_Shutdown() - Shuts down the Input Mgr
@@ -276,6 +279,7 @@ void IN_Shutdown(void)
IN_Started = false;
}
+#endif
///////////////////////////////////////////////////////////////////////////
//
View
@@ -2415,6 +2415,7 @@ void T_BJDone(objtype *ob)
//===========================================================================
+#ifndef EMBEDDED
/*
===============
=
@@ -2445,6 +2446,7 @@ boolean CheckPosition(objtype *ob)
return true;
}
+#endif
/*
View
@@ -708,12 +708,21 @@ typedef enum PACKED {
extern char str[80], str2[20];
-extern myint viewwidth, viewheight;
+#ifdef EMBEDDED
+#define viewwidth 128
+#define sviewheight 64
+#define xoffset 0
+#define yoffset 0
+#define centerx (viewwidth/2-1)
+#define shootdelta (viewwidth/10)
+#else
+extern myint viewwidth, sviewheight;
extern myint viewwidthwin, viewheightwin;
extern myint xoffset, yoffset;
extern myint centerx;
extern myint shootdelta;
+#endif
extern boolean startgame,loadedgame;
extern myint mouseadjustment;
Oops, something went wrong.

0 comments on commit a5ee03f

Please sign in to comment.