Skip to content

Commit

Permalink
Add include guards for assembly constants files
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Sep 4, 2023
1 parent d67914e commit 4439253
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions constants/gba_constants.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef GUARD_CONSTANTS_GBA_CONSTANTS_INC
#define GUARD_CONSTANTS_GBA_CONSTANTS_INC

.set PSR_USR_MODE, 0x00000010
.set PSR_FIQ_MODE, 0x00000011
.set PSR_IRQ_MODE, 0x00000012
Expand Down Expand Up @@ -511,3 +514,5 @@
.set BLDCNT_TGT2_OBJ, 1 << 12
.set BLDCNT_TGT2_BD, 1 << 13
.set BLDCNT_TGT2_ALL, BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD

#endif @ GUARD_CONSTANTS_GBA_CONSTANTS_INC
5 changes: 5 additions & 0 deletions constants/global.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef GUARD_CONSTANTS_GLOBAL_INC
#define GUARD_CONSTANTS_GLOBAL_INC

.set TRUE, 1
.set FALSE, 0

Expand All @@ -20,3 +23,5 @@

.set OBJ_IMAGE_ANIM_H_FLIP, 1 << 6
.set OBJ_IMAGE_ANIM_V_FLIP, 1 << 7

#endif @ GUARD_CONSTANTS_GLOBAL_INC
5 changes: 5 additions & 0 deletions constants/m4a_constants.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef GUARD_CONSTANTS_M4A_CONSTANTS_INC
#define GUARD_CONSTANTS_M4A_CONSTANTS_INC

.equiv ID_NUMBER, 0x68736d53

.equiv PCM_DMA_BUF_SIZE, 1584
Expand Down Expand Up @@ -250,3 +253,5 @@
struct_field o_CgbChannel_nextChannelPointer, 4
struct_field o_CgbChannel_dummy4, 8
struct_field CgbChannel_size, 0

#endif @ GUARD_CONSTANTS_M4A_CONSTANTS_INC
5 changes: 5 additions & 0 deletions constants/tms_hms.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef GUARD_CONSTANTS_TMS_HMS_INC
#define GUARD_CONSTANTS_TMS_HMS_INC

#include "constants/tms_hms.h"

/* Expands to:
Expand All @@ -15,3 +18,5 @@ FOREACH_TM(EQUIV_TM)
FOREACH_HM(EQUIV_HM)
#undef EQUIV_TM
#undef EQUIV_HM

#endif @ GUARD_CONSTANTS_TMS_HMS_INC

0 comments on commit 4439253

Please sign in to comment.