Skip to content

Commit c89e4cc

Browse files
committed
enum fix, flto, changed 3d view to angle change
1 parent da69c37 commit c89e4cc

34 files changed

+155
-59
lines changed

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ include $(DEVKITARM)/3ds_rules
1919
#---------------------------------------------------------------------------------
2020
export TARGET := $(shell basename $(CURDIR))
2121
BUILD := build
22-
SOURCES := src arm9/source arm11/source khax
22+
SOURCES := src arm9/source arm11/source helix/fixpt helix/fixpt/real helix/fixpt/real/arm khax
2323
DATA := dat
24-
INCLUDES := include src arm9/include arm11/include khax
24+
INCLUDES := include src arm9/include arm11/include helix/fixpt/pub khax
2525
APP_TITLE := prboom
2626
APP_DESCRIPTION := prboom for the 3ds
2727
APP_AUTHOR := elhobbs
@@ -39,14 +39,19 @@ CFLAGS2 := -g -Wall -O2 -mword-relocations -save-temps \
3939
-fomit-frame-pointer -ffast-math \
4040
$(ARCH)
4141

42-
CFLAGS := -g -Wall -mword-relocations \
42+
CFLAGS := -g -Wall -mword-relocations -flto \
4343
-ffunction-sections \
4444
-fdata-sections \
45-
-fno-short-enums \
4645
$(ARCH) \
4746
-O2
4847

49-
CFLAGS += $(INCLUDE) -DARM11 -D_3DS -DHAVE_CONFIG_H
48+
CFLAGS3 := -g -Wall -mword-relocations \
49+
-ffunction-sections \
50+
-fdata-sections \
51+
$(ARCH) \
52+
-O0
53+
54+
CFLAGS += $(INCLUDE) -DARM11 -DARM -D_3DS -DHAVE_CONFIG_H
5055

5156
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
5257

arm11/source/dbopl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ typedef enum {
7474
sm6Start,
7575
sm2Percussion,
7676
sm3Percussion,
77+
sm3_max = 0xffffffffL
7778
} SynthMode;
7879

7980
//Shifts for the values contained in chandata variable
@@ -96,6 +97,7 @@ typedef enum {
9697
SUSTAIN,
9798
DECAY,
9899
ATTACK,
100+
operstatemax_max = 0xffffffffL
99101
} OperatorState;
100102

101103
struct _Operator {

arm11/source/musplay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ byte* mus_load_music(u8 *data)
724724
header->ID[2] != 'S' ||
725725
header->ID[3] != 0x1A)
726726
{
727-
printf("mus_load_music: failed\n");
727+
printf("mus_load_music: failed type %c %c %c\n", header->ID[0], header->ID[1], header->ID[2]);
728728
return 0;
729729
}
730730

arm11/source/musplay.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ typedef unsigned char u8;
166166
typedef enum {
167167
MUS_IDLE,
168168
MUS_PLAYING,
169-
MUS_EXIT
169+
MUS_EXIT,
170+
MUS_max = 0xffffffffL
170171
} MUS_STATE;
171172

172173
void mus_init();

arm11/source/opl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ typedef void (*opl_callback_t)(void *data);
3232
typedef enum
3333
{
3434
OPL_REGISTER_PORT = 0,
35-
OPL_DATA_PORT = 1
35+
OPL_DATA_PORT = 1,
36+
OPL_max = 0xffffffffL
3637
} opl_port_t;
3738

3839
#define OPL_NUM_OPERATORS 21

prboom3ds.3ds

22.5 KB
Binary file not shown.

prboom3ds.3dsx

-15.2 KB
Binary file not shown.

prboom3ds.cia

22.5 KB
Binary file not shown.

src/d_event.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ typedef enum
4949
ev_keydown,
5050
ev_keyup,
5151
ev_mouse,
52-
ev_joystick
52+
ev_joystick,
53+
ev_max = 0xffffffffL
5354
} evtype_t;
5455

5556
// Event structure.
@@ -73,6 +74,7 @@ typedef enum
7374
ga_completed,
7475
ga_victory,
7576
ga_worlddone,
77+
ga_max = 0xffffffffL
7678
} gameaction_t;
7779

7880

@@ -112,7 +114,7 @@ typedef enum
112114
// Savegame slot numbers occupy the second byte of buttons.
113115
BTS_SAVEMASK = (4+8+16),
114116
BTS_SAVESHIFT = 2,
115-
117+
TBS_MAX = 0xffffffffL
116118
} buttoncode_t;
117119

118120

src/d_net.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
typedef enum
6161
{
6262
CMD_SEND = 1,
63-
CMD_GET = 2
64-
63+
CMD_GET = 2,
64+
CMD_max = 0xffffffffL
6565
} command_t;
6666

6767

@@ -128,6 +128,7 @@ typedef enum {
128128
// Leave space, so low values corresponding to normal netgame setup packets can be ignored
129129
nm_plcolour = 3,
130130
nm_savegamename = 4,
131+
nm_max = 0xffffffffL
131132
} netmisctype_t;
132133

133134
typedef struct

0 commit comments

Comments
 (0)