Skip to content

Commit

Permalink
enum fix, flto, changed 3d view to angle change
Browse files Browse the repository at this point in the history
  • Loading branch information
elhobbs committed Dec 21, 2019
1 parent da69c37 commit c89e4cc
Show file tree
Hide file tree
Showing 34 changed files with 155 additions and 59 deletions.
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ include $(DEVKITARM)/3ds_rules
#---------------------------------------------------------------------------------
export TARGET := $(shell basename $(CURDIR))
BUILD := build
SOURCES := src arm9/source arm11/source khax
SOURCES := src arm9/source arm11/source helix/fixpt helix/fixpt/real helix/fixpt/real/arm khax
DATA := dat
INCLUDES := include src arm9/include arm11/include khax
INCLUDES := include src arm9/include arm11/include helix/fixpt/pub khax
APP_TITLE := prboom
APP_DESCRIPTION := prboom for the 3ds
APP_AUTHOR := elhobbs
Expand All @@ -39,14 +39,19 @@ CFLAGS2 := -g -Wall -O2 -mword-relocations -save-temps \
-fomit-frame-pointer -ffast-math \
$(ARCH)

CFLAGS := -g -Wall -mword-relocations \
CFLAGS := -g -Wall -mword-relocations -flto \
-ffunction-sections \
-fdata-sections \
-fno-short-enums \
$(ARCH) \
-O2

CFLAGS += $(INCLUDE) -DARM11 -D_3DS -DHAVE_CONFIG_H
CFLAGS3 := -g -Wall -mword-relocations \
-ffunction-sections \
-fdata-sections \
$(ARCH) \
-O0

CFLAGS += $(INCLUDE) -DARM11 -DARM -D_3DS -DHAVE_CONFIG_H

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

Expand Down
2 changes: 2 additions & 0 deletions arm11/source/dbopl.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ typedef enum {
sm6Start,
sm2Percussion,
sm3Percussion,
sm3_max = 0xffffffffL
} SynthMode;

//Shifts for the values contained in chandata variable
Expand All @@ -96,6 +97,7 @@ typedef enum {
SUSTAIN,
DECAY,
ATTACK,
operstatemax_max = 0xffffffffL
} OperatorState;

struct _Operator {
Expand Down
2 changes: 1 addition & 1 deletion arm11/source/musplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ byte* mus_load_music(u8 *data)
header->ID[2] != 'S' ||
header->ID[3] != 0x1A)
{
printf("mus_load_music: failed\n");
printf("mus_load_music: failed type %c %c %c\n", header->ID[0], header->ID[1], header->ID[2]);
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion arm11/source/musplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ typedef unsigned char u8;
typedef enum {
MUS_IDLE,
MUS_PLAYING,
MUS_EXIT
MUS_EXIT,
MUS_max = 0xffffffffL
} MUS_STATE;

void mus_init();
Expand Down
3 changes: 2 additions & 1 deletion arm11/source/opl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ typedef void (*opl_callback_t)(void *data);
typedef enum
{
OPL_REGISTER_PORT = 0,
OPL_DATA_PORT = 1
OPL_DATA_PORT = 1,
OPL_max = 0xffffffffL
} opl_port_t;

#define OPL_NUM_OPERATORS 21
Expand Down
Binary file modified prboom3ds.3ds
Binary file not shown.
Binary file modified prboom3ds.3dsx
Binary file not shown.
Binary file modified prboom3ds.cia
Binary file not shown.
6 changes: 4 additions & 2 deletions src/d_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ typedef enum
ev_keydown,
ev_keyup,
ev_mouse,
ev_joystick
ev_joystick,
ev_max = 0xffffffffL
} evtype_t;

// Event structure.
Expand All @@ -73,6 +74,7 @@ typedef enum
ga_completed,
ga_victory,
ga_worlddone,
ga_max = 0xffffffffL
} gameaction_t;


Expand Down Expand Up @@ -112,7 +114,7 @@ typedef enum
// Savegame slot numbers occupy the second byte of buttons.
BTS_SAVEMASK = (4+8+16),
BTS_SAVESHIFT = 2,

TBS_MAX = 0xffffffffL
} buttoncode_t;


Expand Down
5 changes: 3 additions & 2 deletions src/d_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
typedef enum
{
CMD_SEND = 1,
CMD_GET = 2

CMD_GET = 2,
CMD_max = 0xffffffffL
} command_t;


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

typedef struct
Expand Down
6 changes: 4 additions & 2 deletions src/d_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ typedef enum
// Dead on the ground, view follows killer.
PST_DEAD,
// Ready to restart/respawn???
PST_REBORN
PST_REBORN,
PST_max = 0xffffffffL

} playerstate_t;

Expand All @@ -82,7 +83,8 @@ typedef enum
// No damage, no health loss.
CF_GODMODE = 2,
// Not really a cheat, just a debug aid.
CF_NOMOMENTUM = 4
CF_NOMOMENTUM = 4,
CF_max = 0xffffffffL

} cheat_t;

Expand Down
33 changes: 22 additions & 11 deletions src/doomdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ typedef enum {
registered, // DOOM 1 registered, E3, M27
commercial, // DOOM 2 retail, E1 M34 (DOOM 2 german edition not handled)
retail, // DOOM 1 retail, E4, M36
indetermined // Well, no IWAD found.
indetermined, // Well, no IWAD found.
gamemode_max = 0xffffffffL
} GameMode_t;

// Mission packs - might be useful for TC stuff?
Expand All @@ -78,15 +79,17 @@ typedef enum {
doom2, // DOOM 2
pack_tnt, // TNT mission pack
pack_plut, // Plutonia pack
none
none,
game_mission_max = 0xffffffffL
} GameMission_t;

// Identify language to use, software localization.
typedef enum {
english,
french,
german,
unknown
unknown,
language_max = 0xffffffffL
} Language_t;

//
Expand Down Expand Up @@ -150,7 +153,8 @@ typedef enum {
GS_LEVEL,
GS_INTERMISSION,
GS_FINALE,
GS_DEMOSCREEN
GS_DEMOSCREEN,
GS_max = 0xffffffffL
} gamestate_t;

//
Expand Down Expand Up @@ -178,7 +182,8 @@ typedef enum {
sk_easy,
sk_medium,
sk_hard,
sk_nightmare
sk_nightmare,
sk_max = 0xffffffffL
} skill_t;

//
Expand All @@ -192,7 +197,8 @@ typedef enum {
it_blueskull,
it_yellowskull,
it_redskull,
NUMCARDS
NUMCARDS,
card_max = 0xffffffffL
} card_t;

// The defined weapons, including a marker
Expand All @@ -209,7 +215,8 @@ typedef enum {
wp_supershotgun,

NUMWEAPONS,
wp_nochange // No pending weapon change.
wp_nochange, // No pending weapon change.
wp_max = 0xffffffffL
} weapontype_t;

// Ammunition types defined.
Expand All @@ -219,7 +226,8 @@ typedef enum {
am_cell, // Plasma rifle, BFG.
am_misl, // Missile launcher.
NUMAMMO,
am_noammo // Unlimited for chainsaw / fist.
am_noammo, // Unlimited for chainsaw / fist.
ammotype_max = 0xffffffffL
} ammotype_t;

// Power up artifacts.
Expand All @@ -230,15 +238,17 @@ typedef enum {
pw_ironfeet,
pw_allmap,
pw_infrared,
NUMPOWERS
NUMPOWERS,
pw_max = 0xffffffffL
} powertype_t;

// Power up durations (how many seconds till expiration).
typedef enum {
INVULNTICS = (30*TICRATE),
INVISTICS = (60*TICRATE),
INFRATICS = (120*TICRATE),
IRONTICS = (60*TICRATE)
IRONTICS = (60*TICRATE),
powerduration_max = 0xffffffffL
} powerduration_t;

// DOOM keyboard definition.
Expand Down Expand Up @@ -347,7 +357,8 @@ typedef enum {
ss_chat,
ss_gen, /* killough 10/98 */
ss_comp, /* killough 10/98 */
ss_max
ss_max,
ss_max_all = 0xffffffffL
} ss_types;

// phares 3/20/98:
Expand Down
1 change: 1 addition & 0 deletions src/doomtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ typedef enum {
/* Aliases follow */
boom_compatibility = boom_201_compatibility, /* Alias used by G_Compatibility */
best_compatibility = prboom_6_compatibility,
complevel_max = 0xffffffffL
} complevel_t;

/* cph - from v_video.h, needed by gl_struct.h */
Expand Down
10 changes: 7 additions & 3 deletions src/info.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ typedef enum
SPR_DOGS, /* killough 7/19/98: Marine's best friend :) */
#endif

NUMSPRITES /* counter of how many there are */
NUMSPRITES, /* counter of how many there are */
SPR_max = 0xffffffffL

} spritenum_t;

Expand Down Expand Up @@ -1246,7 +1247,9 @@ typedef enum

S_MUSHROOM, /* killough 10/98: mushroom explosion effect */

NUMSTATES /* Counter of how many there are */
NUMSTATES, /* Counter of how many there are */

S_max = 0xffffffffL

} statenum_t;

Expand Down Expand Up @@ -1434,7 +1437,8 @@ typedef enum {
MT_STEALTHSHOTGUY,
MT_STEALTHZOMBIE,

NUMMOBJTYPES // Counter of how many there are
NUMMOBJTYPES, // Counter of how many there are
MT_max = 0xffffffffL
} mobjtype_t;

/********************************************************************
Expand Down
1 change: 1 addition & 0 deletions src/lprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ typedef enum /* Logical output levels */
LO_FATAL=16,
LO_DEBUG=32,
LO_ALWAYS=64,
LO_max = 0xffffffffL
} OutputLevels;

#ifndef __GNUC__
Expand Down
1 change: 1 addition & 0 deletions src/m_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ typedef enum {
m_scrn, // A key can not be assigned to more than one action
m_map, // in the same group. A key can be assigned to one
m_menu, // action in one group, and another action in another.
m_max = 0xffffffffL
} setup_group;

/****************************
Expand Down
3 changes: 2 additions & 1 deletion src/m_random.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ typedef enum {
pr_defect, // #62 // Start new entries -- add new entries below

// End of new entries
NUMPRCLASS // MUST be last item in list
NUMPRCLASS, // MUST be last item in list
pr_max = 0xffffffffL
} pr_class_t;

// The random number generator's state.
Expand Down
3 changes: 2 additions & 1 deletion src/p_enemy.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ typedef enum {
DI_SOUTH,
DI_SOUTHEAST,
DI_NODIR,
NUMDIRS
NUMDIRS,
DI_max = 0xffffffffL
} dirtype_t;

static void P_NewChaseDir(mobj_t *actor);
Expand Down
3 changes: 2 additions & 1 deletion src/p_pspr.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ typedef enum
{
ps_weapon,
ps_flash,
NUMPSPRITES
NUMPSPRITES,
ps_max = 0xffffffffL
} psprnum_t;

typedef struct
Expand Down
3 changes: 2 additions & 1 deletion src/p_saveg.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ void P_UnArchiveWorld (void)

typedef enum {
tc_end,
tc_mobj
tc_mobj,
tc_max = 0xffffffffL
} thinkerclass_t;

// phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the
Expand Down
Loading

0 comments on commit c89e4cc

Please sign in to comment.