diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | include/global.h | 6 | ||||
-rw-r--r-- | include/main.h | 40 | ||||
-rw-r--r-- | include/nitro/nitro.h (renamed from nitro/nitro.h) | 4 | ||||
-rw-r--r-- | include/nitro/os.c (renamed from nitro/os.c) | 0 | ||||
-rw-r--r-- | include/nitro/os.h (renamed from nitro/os.h) | 2 | ||||
-rw-r--r-- | include/nitro/os_asm.h (renamed from nitro/os_asm.h) | 2 | ||||
-rw-r--r-- | include/nitro/os_asm.s (renamed from nitro/os_asm.s) | 0 | ||||
-rw-r--r-- | include/nitro/types.h (renamed from nitro/types.h) | 0 | ||||
-rw-r--r-- | src/FUN_02000DF4.c | 11 | ||||
-rw-r--r-- | src/main.c | 45 | ||||
-rw-r--r-- | src/string_util.c | 2 |
13 files changed, 57 insertions, 59 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 27dd07f9..ef9276a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,4 +8,4 @@ enable_language(ASM) file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "*.c") add_executable(PokeDiamond ${SOURCES}) -target_include_directories(PokeDiamond PRIVATE nitro) +target_include_directories(PokeDiamond PRIVATE include) @@ -79,7 +79,7 @@ OBJCOPY := $(CROSS)objcopy # ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o ASFLAGS = -proc arm5te -CFLAGS = -O4,p -proc v5te -thumb -fp soft -lang c99 -Cpp_exceptions off -i nitro +CFLAGS = -O4,p -proc v5te -thumb -fp soft -lang c99 -Cpp_exceptions off -i include LDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m Entry ####################### Other Tools ######################### diff --git a/include/global.h b/include/global.h new file mode 100644 index 00000000..33880ca1 --- /dev/null +++ b/include/global.h @@ -0,0 +1,6 @@ +#ifndef GUARD_GLOBAL_H +#define GUARD_GLOBAL_H + +#include "nitro/nitro.h" + +#endif //GUARD_GLOBAL_H diff --git a/include/main.h b/include/main.h new file mode 100644 index 00000000..0df94795 --- /dev/null +++ b/include/main.h @@ -0,0 +1,40 @@ +#ifndef GUARD_MAIN_H +#define GUARD_MAIN_H + +struct Unk2106FA0 +{ + s32 unk0; + s32 unk4; + s32 unk8; + s32 unkC; + s32 unk10; + s32 unk14; + s32 unk18; + s32 unk1C; + s32 unk20; +}; + +struct Unk21C48B8 +{ + void (*unk0)(s32); + s32 unk4; + s32 unk8; + s32 unkC; + s32 unk10; + s32 unk14; + s32 unk18; + s32 unk1C; + s32 unk20; + s32 unk24; + s32 unk28; + s32 unk2C; + s32 unk30; + s32 unk34; + s32 unk38; + u8 filler3C[0xC]; + s32 unk48; + u8 filler4C[0x20]; + s32 unk6C; +}; + +#endif //GUARD_MAIN_H diff --git a/nitro/nitro.h b/include/nitro/nitro.h index 70ad9a18..017f3708 100644 --- a/nitro/nitro.h +++ b/include/nitro/nitro.h @@ -6,8 +6,8 @@ extern "C" { #endif // Include all nitro files -#include "types.h" -#include "os.h" +#include "nitro/types.h" +#include "nitro/os.h" #ifdef __cplusplus }; diff --git a/nitro/os.c b/include/nitro/os.c index a531740d..a531740d 100644 --- a/nitro/os.c +++ b/include/nitro/os.c diff --git a/nitro/os.h b/include/nitro/os.h index 8e4d4ed3..c14b2891 100644 --- a/nitro/os.h +++ b/include/nitro/os.h @@ -5,6 +5,6 @@ #ifndef POKEDIAMOND_OS_H #define POKEDIAMOND_OS_H -#include "os_asm.h" +#include "nitro/os_asm.h" #endif //POKEDIAMOND_OS_H diff --git a/nitro/os_asm.h b/include/nitro/os_asm.h index 43c93385..775955f1 100644 --- a/nitro/os_asm.h +++ b/include/nitro/os_asm.h @@ -5,7 +5,7 @@ #ifndef POKEDIAMOND_OS_ASM_H #define POKEDIAMOND_OS_ASM_H -#include "types.h" +#include "nitro/types.h" OSProcMode OS_GetProcMode(); diff --git a/nitro/os_asm.s b/include/nitro/os_asm.s index 86d7603c..86d7603c 100644 --- a/nitro/os_asm.s +++ b/include/nitro/os_asm.s diff --git a/nitro/types.h b/include/nitro/types.h index d702de23..d702de23 100644 --- a/nitro/types.h +++ b/include/nitro/types.h diff --git a/src/FUN_02000DF4.c b/src/FUN_02000DF4.c index 0cc1c2dd..0099480c 100644 --- a/src/FUN_02000DF4.c +++ b/src/FUN_02000DF4.c @@ -1,12 +1,5 @@ -#include "nitro.h" - -struct Unk2106FA0 { - u8 filler0[0x8]; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; -}; +#include "global.h" +#include "main.h" extern struct Unk2106FA0 gBacklightTop; @@ -1,46 +1,5 @@ - -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned long u32; -typedef signed char s8; -typedef signed short s16; -typedef signed long s32; - -struct Unk2106FA0 -{ - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; - s32 unk20; -}; - -struct Unk21C48B8 -{ - void (*unk0)(s32); - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; - s32 unk20; - s32 unk24; - s32 unk28; - s32 unk2C; - s32 unk30; - s32 unk34; - s32 unk38; - u8 filler3C[0xC]; - s32 unk48; - u8 filler4C[0x20]; - s32 unk6C; -}; +#include "global.h" +#include "main.h" extern struct Unk2106FA0 gBacklightTop; extern struct Unk2106FA0 gBacklightTop_2; // same as the first one, it's referenced twice in the constant pool... diff --git a/src/string_util.c b/src/string_util.c index 7d755cb9..8f9c96ff 100644 --- a/src/string_util.c +++ b/src/string_util.c @@ -1,4 +1,4 @@ -#include "nitro.h"
+#include "global.h"
u16 gDigitTable[] = {
0xA2,
|