Skip to content

Commit eb0cfda

Browse files
authored
Merge pull request #719 from CT075/add-compile-commands
Add compile_commands.txt
2 parents 1f4ae86 + 14c9bd2 commit eb0cfda

File tree

6 files changed

+29
-16
lines changed

6 files changed

+29
-16
lines changed

compile_flags.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-Wimplicit
2+
-WParentheses
3+
-Werror
4+
-I
5+
tools/agbcc/include
6+
-I
7+
include

include/bmudisp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int GetUnitSpritePalette(const struct Unit* unit);
3434
void RefreshUnitSprites(void);
3535
struct SMSHandle * AddUnitSprite(int);
3636
void PutUnitSpritesOam(void);
37-
// ??? PutChapterMarkedTileIconOam(???);
37+
void PutChapterMarkedTileIconOam(void);
3838
void PutUnitSpriteIconsOam(void);
3939
// ??? sub_8027A30(???);
4040
void ResetUnitSpriteHover(void);

include/global.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,7 @@
77

88
#include "gba/gba.h"
99

10-
// this is for denoting objects that *should* be const, but weren't in the original source (resulting in them being emitted in the .data section)
11-
#define SECTION(name) __attribute__((section(name)))
12-
#define CONST_DATA SECTION(".data")
13-
#define EWRAM_OVERLAY(id) SECTION("ewram_overlay_" # id)
14-
15-
// this is for denoting objects that *should* be const, but need to not be for functions to match.
16-
#define SHOULD_BE_CONST
17-
18-
#define NAKEDFUNC __attribute__((naked))
19-
20-
// HACK: applying this macro seems to allow for bitpacked structs to have the same layout in agbcc and modern GCC
21-
#define ALIGN(m) __attribute__((aligned (m)))
22-
#define BITPACKED __attribute__((aligned(4), packed))
10+
#include "prelude.h"
2311

2412
#include "types.h"
2513
#include "variables.h"

include/prelude.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef PRELUDE_H
2+
3+
// HACK: applying this macro seems to allow for bitpacked structs to have the same layout in agbcc and modern GCC
4+
#define ALIGN(m) __attribute__((aligned (m)))
5+
#define BITPACKED __attribute__((aligned(4), packed))
6+
7+
// this is for denoting objects that *should* be const, but weren't in the original source (resulting in them being emitted in the .data section)
8+
#define SECTION(name) __attribute__((section(name)))
9+
#define CONST_DATA SECTION(".data")
10+
#define EWRAM_OVERLAY(id) SECTION("ewram_overlay_" # id)
11+
12+
// this is for denoting objects that *should* be const, but need to not be for functions to match.
13+
#define SHOULD_BE_CONST
14+
15+
#define NAKEDFUNC __attribute__((naked))
16+
17+
#endif // PRELUDE_H

include/types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef GUARD_TYPES_H
22
#define GUARD_TYPES_H
33

4+
#include "prelude.h"
45
#include "gba/types.h"
56
#include <limits.h>
67

include/variables.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include "gba/types.h"
55
#include "types.h"
6-
#include "global.h"
6+
#include "prelude.h"
77
#include "proc.h"
88

99
extern u8 __ewram_start[];
@@ -666,7 +666,7 @@ extern CONST_DATA u8 Unk_088ADFAB[];
666666
// extern ??? Events_WM_Beginning
667667
// extern ??? Events_WM_ChapterIntro
668668
// extern ??? gUnknown_088D2058
669-
extern struct CONST_DATA gfx_set gConvoBackgroundData[];
669+
extern struct gfx_set CONST_DATA gConvoBackgroundData[];
670670
extern u8 CONST_DATA gPromoJidLut[][2];
671671
extern u8 gAnimCharaPalConfig[0x100][7];
672672
extern u8 gAnimCharaPalIt[0x100][7];

0 commit comments

Comments
 (0)