Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Strip out unused demo code.

git-svn-id: svn+ssh://jay/var/svn/wolf/trunk@150 32837ae5-38f0-4cfd-8401-3ff76d8497c4
  • Loading branch information...
commit d6bf851f28fe01988ebac7fb0b44851b43530c16 1 parent 3ac05de
paul authored
View
9 Makefile
@@ -2,7 +2,7 @@ PROGS=ewolf3d
ifeq ($(PROGS),ewolf3d)
CC = arm-unknown-eabi-gcc
-CFLAGS = -g -Wall -fno-common -DLUMINARY -mthumb -march=armv7-m -Os -ffunction-sections -fdata-sections
+CFLAGS = -g -Wall -fno-common -DLUMINARY -mthumb -march=armv7-m -Os -ffunction-sections -fdata-sections -fno-strict-aliasing
else
CC = gcc -m32
CFLAGS = -g -Wall
@@ -21,7 +21,7 @@ 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
+ sprites.o walls.o mapdata.o net.o
# romchunk.o
ROBJS = wl_draw.o
SOBJS = $(OBJS) $(ROBJS) vi_svga.o
@@ -72,7 +72,10 @@ xwolf3d: $(XOBJS)
sdlwolf3d: $(DOBJS)
$(CC) -o sdlwolf3d $(DOBJS) $(DLDLIBS)
-ewolf3d: ewolf3d_reva ewolf3d_revc
+ewolf3d: ewolf3d_reva ewolf3d_revc foo
+
+foo: ewolf3d_reva
+ arm-unknown-eabi-objcopy -O binary $< $@
ewolf3d_reva: ewolf3d_revc $(EOBJS) luminary-crt0.o luminary.ld oled_osram.o
$(CC) $(CFLAGS) -o $@ -Wl,--gc-sections $(EOBJS) oled_osram.o \
View
17 luminary-crt0.S
@@ -84,8 +84,25 @@ __isr_vectors:
.word isr_handler /*26*/
.word isr_handler /*27*/
.word isr_handler /*28*/
+.word isr_handler /*29*/
.word isr_handler /*30*/
.word isr_handler /*31*/
+.word isr_handler /*32*/
+.word isr_handler /*33*/
+.word isr_handler /*34*/
+.word isr_handler /*35*/
+.word isr_handler /*36*/
+.word isr_handler /*37*/
+.word isr_handler /*38*/
+.word isr_handler /*39*/
+.word isr_handler /*40*/
+.word isr_handler /*41*/
+.word ethernet_isr /*42*/
+.word isr_handler /*43*/
+.word isr_handler /*44*/
+.word isr_handler /*45*/
+.word isr_handler /*46*/
+.word isr_handler /*47*/
.bss
_stack_end:
View
3  luminary.h
@@ -8,5 +8,6 @@
#define GPIOF 0x40025000
#define GPIOG 0x40026000
#define SSI0 0x40008000
+#define ENET 0x40048000
-extern void ssi_select(int);
+#define NVIC ((volatile int *)0xe000e000)
View
2  misc.c
@@ -63,6 +63,7 @@ void TimerInit()
}
#elif defined (LUMINARY)
+#include "luminary.h"
volatile unsigned long tcount;
static volatile int tlock;
@@ -80,7 +81,6 @@ unsigned long get_TimeCount(void)
}
#define treg ((volatile int *)0x40030000)
-#define NVIC ((volatile int *)0xe000e000)
void timer_isr()
{
View
4 vi_comm.c
@@ -287,6 +287,7 @@ void IN_ClearKeysDown(void)
memset(Keyboard, 0, sizeof(Keyboard));
}
+#ifndef EMBEDDED
///////////////////////////////////////////////////////////////////////////
//
// IN_ReadControl() - Reads the device associated with the specified
@@ -313,6 +314,7 @@ IN_CheckAck();
case ctrl_Keyboard:
def = &KbdDefs;
+#ifndef EMBEDDED
if (GetKey(def->upleft))
mx = motion_Left,my = motion_Up;
else if (GetKey(def->upright))
@@ -321,6 +323,7 @@ IN_CheckAck();
mx = motion_Left,my = motion_Down;
else if (GetKey(def->downright))
mx = motion_Right,my = motion_Down;
+#endif
if (GetKey(def->up))
my = motion_Up;
@@ -376,6 +379,7 @@ IN_CheckAck();
info->button3 = buttons & (1 << 3);
info->dir = DirTable[((my + 1) * 3) + (mx + 1)];
}
+#endif
///////////////////////////////////////////////////////////////////////////
//
View
2  wl_def.h
@@ -900,9 +900,11 @@ extern myint viewsize;
extern myint controlx,controly; // range from -100 to 100
extern boolean buttonstate[NUMBUTTONS];
+#ifdef ENABLE_DEMO
extern boolean demorecord,demoplayback;
extern byte *demoptr, *lastdemoptr;
extern memptr demobuffer;
+#endif
void StatusDrawPic(unsigned x, unsigned y, unsigned picnum);
View
2  wl_draw.c
@@ -425,8 +425,10 @@ static void DrawPlayerWeapon()
SimpleScaleShape(viewwidth/2,shapenum,viewheight+1);
}
+#ifdef ENABLE_DEMO
if (demorecord || demoplayback)
SimpleScaleShape(viewwidth/2,SPR_DEMO,viewheight+1);
+#endif
}
/*
View
2  wl_game.c
@@ -522,9 +522,11 @@ void SetupGameLevel()
#endif
}
+#ifdef ENABLE_DEMO
if (demoplayback || demorecord)
US_InitRndT(false);
else
+#endif
US_InitRndT(true);
#ifndef ENABLE_PRECOMPILE
View
7 wl_main.c
@@ -85,9 +85,11 @@ void CalcTics()
myint newtime;
myint ticcount;
+#ifdef ENABLE_DEMO
if (demoplayback || demorecord)
ticcount = DEMOTICS - 1; /* [70/4] 17.5 Hz */
else
+#endif
ticcount = 0 + 1; /* 35 Hz */
newtime = sleepuntil(lasttimecount + ticcount);
@@ -95,9 +97,12 @@ void CalcTics()
lasttimecount = newtime;
+#ifdef ENABLE_DEMO
if (demoplayback || demorecord)
tics = DEMOTICS;
- else if (tics > MAXTICS)
+ else
+#endif
+ if (tics > MAXTICS)
tics = MAXTICS;
#ifdef LUMINARY
View
25 wl_play.c
@@ -50,7 +50,7 @@ byte buttonmouse[4]={bt_attack,bt_strafe,bt_use,bt_nobutton};
boolean buttonheld[NUMBUTTONS];
-#ifndef ENABLE_DEMO
+#ifdef ENABLE_DEMO
boolean demorecord,demoplayback;
byte *demoptr, *lastdemoptr;
memptr demobuffer;
@@ -426,8 +426,11 @@ void UpdateInput()
void PollControls()
{
- myint max, min, i;
+ myint max, min;
+#ifdef ENABLE_DEMO
+ myint i;
byte buttonbits;
+#endif
static boolean shoothack;
controlx = 0;
@@ -437,6 +440,7 @@ void PollControls()
memcpy(buttonheld, buttonstate, sizeof(buttonstate));
memset(buttonstate, 0, sizeof(buttonstate));
+#ifdef ENABLE_DEMO
if (demoplayback) {
//
// read commands from demo buffer
@@ -459,6 +463,7 @@ void PollControls()
return;
}
+#endif
/* Update keys */
IN_CheckAck();
@@ -489,6 +494,7 @@ void PollControls()
else if (controly < min)
controly = min;
+#ifdef ENABLE_DEMO
if (demorecord)
{
//
@@ -516,6 +522,7 @@ void PollControls()
controlx *= (myint)tics;
controly *= (myint)tics;
}
+#endif
}
@@ -556,7 +563,11 @@ void CheckKeys()
{
byte scan;
- if (screenfaded || demoplayback) // don't do anything with a faded screen
+ if (screenfaded // don't do anything with a faded screen
+#ifdef ENABLE_DEMO
+ || demoplayback
+#endif
+ )
return;
scan = LastScan;
@@ -584,7 +595,6 @@ void CheckKeys()
IN_ClearKeysDown();
return;
}
-#endif
//
// SECRET CHEAT CODE: 'MLI'
@@ -603,7 +613,6 @@ void CheckKeys()
DrawAmmo();
DrawScore();
-#ifndef EMBEDDED
ClearMemory();
CA_CacheGrChunk(STARTFONT+1);
ClearSplitVWB();
@@ -615,13 +624,11 @@ void CheckKeys()
IN_Ack();
DrawPlayBorder();
-#endif
}
//
// OPEN UP DEBUG KEYS
//
-#ifndef EMBEDDED
if (IN_KeyDown(sc_BackSpace) && IN_KeyDown(sc_LShift) &&
IN_KeyDown(sc_Alt) && MS_CheckParm("debugmode")) {
ClearMemory();
@@ -1282,8 +1289,10 @@ void PlayLoop()
IN_GetMouseDelta(NULL, NULL); // Clear accumulated mouse movement
#endif
+#ifdef ENABLE_DEMO
if (demoplayback)
IN_StartAck();
+#endif
set_TimeCount(0);
@@ -1345,6 +1354,7 @@ void PlayLoop()
}
#endif
+#ifdef ENABLE_DEMO
if (demoplayback)
{
if (IN_CheckAck())
@@ -1353,6 +1363,7 @@ void PlayLoop()
playstate = ex_abort;
}
}
+#endif
} while (!playstate && !startgame);
Please sign in to comment.
Something went wrong with that request. Please try again.