Reduce stack usage
This commit is contained in:
parent
2562c5dcef
commit
d9d80e4e18
@ -7,6 +7,11 @@
|
|||||||
CROSS_COMPILE = arm-frosted-eabi-
|
CROSS_COMPILE = arm-frosted-eabi-
|
||||||
CC= $(CROSS_COMPILE)gcc # gcc or g++
|
CC= $(CROSS_COMPILE)gcc # gcc or g++
|
||||||
|
|
||||||
|
ifeq ($V,'1')
|
||||||
|
V=''
|
||||||
|
else
|
||||||
|
V=@
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS+=-mthumb -mlittle-endian -mthumb-interwork -ffunction-sections -fdata-sections -mcpu=cortex-m3
|
CFLAGS+=-mthumb -mlittle-endian -mthumb-interwork -ffunction-sections -fdata-sections -mcpu=cortex-m3
|
||||||
CFLAGS+=-DCORE_M3 -D__frosted__
|
CFLAGS+=-DCORE_M3 -D__frosted__
|
||||||
@ -36,7 +41,7 @@ OBJS= \
|
|||||||
$(O)/dstrings.o \
|
$(O)/dstrings.o \
|
||||||
$(O)/i_system.o \
|
$(O)/i_system.o \
|
||||||
$(O)/i_sound_dummy.o \
|
$(O)/i_sound_dummy.o \
|
||||||
$(O)/i_video_dummy.o \
|
$(O)/i_video_fbdev.o \
|
||||||
$(O)/i_net.o \
|
$(O)/i_net.o \
|
||||||
$(O)/tables.o \
|
$(O)/tables.o \
|
||||||
$(O)/f_finale.o \
|
$(O)/f_finale.o \
|
||||||
@ -100,14 +105,16 @@ clean:
|
|||||||
rm -f frosted/*
|
rm -f frosted/*
|
||||||
|
|
||||||
$(O)/fdoom: $(OBJS) $(O)/i_main.o
|
$(O)/fdoom: $(OBJS) $(O)/i_main.o
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(O)/i_main.o \
|
@echo [Linking $@]
|
||||||
|
$V$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(O)/i_main.o \
|
||||||
-o $(O)/fdoom $(LIBS) -Wl,-Map,fdoom.map
|
-o $(O)/fdoom $(LIBS) -Wl,-Map,fdoom.map
|
||||||
|
|
||||||
$(O):
|
$(O):
|
||||||
mkdir -p $(O)
|
mkdir -p $(O)
|
||||||
|
|
||||||
$(O)/%.o: %.c $(O)
|
$(O)/%.o: %.c $(O)
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
@echo [Compiling $<]
|
||||||
|
$V$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
#
|
#
|
||||||
|
@ -96,6 +96,7 @@ typedef enum
|
|||||||
// It will not work dynamically, see visplanes.
|
// It will not work dynamically, see visplanes.
|
||||||
//
|
//
|
||||||
#define BASE_WIDTH 320
|
#define BASE_WIDTH 320
|
||||||
|
//#define BASE_WIDTH 480
|
||||||
|
|
||||||
// It is educational but futile to change this
|
// It is educational but futile to change this
|
||||||
// scaling e.g. to 2. Drawing of status bar,
|
// scaling e.g. to 2. Drawing of status bar,
|
||||||
@ -103,13 +104,16 @@ typedef enum
|
|||||||
// by the graphics.
|
// by the graphics.
|
||||||
#define SCREEN_MUL 1
|
#define SCREEN_MUL 1
|
||||||
#define INV_ASPECT_RATIO 0.625 // 0.75, ideally
|
#define INV_ASPECT_RATIO 0.625 // 0.75, ideally
|
||||||
|
//#define INV_ASPECT_RATIO 0.567// 0.75, ideally
|
||||||
|
|
||||||
// Defines suck. C sucks.
|
// Defines suck. C sucks.
|
||||||
// C++ might sucks for OOP, but it sure is a better C.
|
// C++ might sucks for OOP, but it sure is a better C.
|
||||||
// So there.
|
// So there.
|
||||||
#define SCREENWIDTH 320
|
#define SCREENWIDTH 320
|
||||||
|
//#define SCREENWIDTH 480
|
||||||
//SCREEN_MUL*BASE_WIDTH //320
|
//SCREEN_MUL*BASE_WIDTH //320
|
||||||
#define SCREENHEIGHT 200
|
#define SCREENHEIGHT 200
|
||||||
|
//#define SCREENHEIGHT 272
|
||||||
//(int)(SCREEN_MUL*BASE_WIDTH*INV_ASPECT_RATIO) //200
|
//(int)(SCREEN_MUL*BASE_WIDTH*INV_ASPECT_RATIO) //200
|
||||||
|
|
||||||
|
|
||||||
|
@ -1588,9 +1588,9 @@ void G_DoPlayDemo (void)
|
|||||||
demobuffer = demo_p = W_CacheLumpName (defdemoname, PU_STATIC);
|
demobuffer = demo_p = W_CacheLumpName (defdemoname, PU_STATIC);
|
||||||
if ( *demo_p++ != VERSION)
|
if ( *demo_p++ != VERSION)
|
||||||
{
|
{
|
||||||
fprintf( stderr, "Demo is from a different game version!\n");
|
fprintf( stderr, "Demo is from a different game version! - Trying anyway...\n");
|
||||||
gameaction = ga_nothing;
|
//gameaction = ga_nothing;
|
||||||
return;
|
//return;
|
||||||
}
|
}
|
||||||
|
|
||||||
skill = *demo_p++;
|
skill = *demo_p++;
|
||||||
|
@ -839,11 +839,12 @@ void R_SortVisSprites (void)
|
|||||||
//
|
//
|
||||||
// R_DrawSprite
|
// R_DrawSprite
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
short clipbot[SCREENWIDTH];
|
||||||
|
short cliptop[SCREENWIDTH];
|
||||||
void R_DrawSprite (vissprite_t* spr)
|
void R_DrawSprite (vissprite_t* spr)
|
||||||
{
|
{
|
||||||
drawseg_t* ds;
|
drawseg_t* ds;
|
||||||
short clipbot[SCREENWIDTH];
|
|
||||||
short cliptop[SCREENWIDTH];
|
|
||||||
int x;
|
int x;
|
||||||
int r1;
|
int r1;
|
||||||
int r2;
|
int r2;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//XXX FIXME
|
//XXX FIXME
|
||||||
in_addr_t inet_addr(const char *cp)
|
in_addr_t inet_addr(const char *cp)
|
||||||
{
|
{
|
||||||
return NULL;
|
return (in_addr_t)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX FIXME
|
// XXX FIXME
|
||||||
|
Loading…
x
Reference in New Issue
Block a user