From ac2224f095367073c53f9fd719eee3884d7b67ab Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Tue, 20 Aug 2024 23:19:16 +0200 Subject: [PATCH] Add versions.h (#2060) --- include/macros.h | 10 ---------- include/versions.h | 15 +++++++++++++++ src/boot/build.c | 2 +- src/code/z_common_data.c | 1 + src/code/z_message.c | 1 + src/code/z_play.c | 1 + src/overlays/actors/ovl_En_Mag/z_en_mag.c | 1 + .../gamestates/ovl_file_choose/z_file_choose.c | 1 + src/overlays/gamestates/ovl_title/z_title.c | 1 + 9 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 include/versions.h diff --git a/include/macros.h b/include/macros.h index c5ce822ae2..595b6729f8 100644 --- a/include/macros.h +++ b/include/macros.h @@ -1,16 +1,6 @@ #ifndef MACROS_H #define MACROS_H -// OOT versions in build order -#define OOT_GC_JP 1 -#define OOT_GC_JP_MQ 2 -#define OOT_GC_US 3 -#define OOT_GC_US_MQ 4 -#define OOT_GC_EU_MQ_DBG 5 -#define OOT_GC_EU 6 -#define OOT_GC_EU_MQ 7 -#define OOT_GC_JP_CE 8 - #ifndef AVOID_UB #define BAD_RETURN(type) type #else diff --git a/include/versions.h b/include/versions.h new file mode 100644 index 0000000000..f2c2ea4a3f --- /dev/null +++ b/include/versions.h @@ -0,0 +1,15 @@ +#ifndef VERSIONS_H +#define VERSIONS_H + +// OOT versions in build order +#define OOT_NTSC_1_2 1 +#define OOT_GC_JP 2 +#define OOT_GC_JP_MQ 3 +#define OOT_GC_US 4 +#define OOT_GC_US_MQ 5 +#define OOT_GC_EU_MQ_DBG 6 +#define OOT_GC_EU 7 +#define OOT_GC_EU_MQ 8 +#define OOT_GC_JP_CE 9 + +#endif diff --git a/src/boot/build.c b/src/boot/build.c index 47facdaa96..9f60b54bd7 100644 --- a/src/boot/build.c +++ b/src/boot/build.c @@ -1,4 +1,4 @@ -#include "macros.h" +#include "versions.h" #if PLATFORM_N64 const char gBuildTeam[] = "zelda@srd44"; diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index 08e0184951..f3432db458 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -1,5 +1,6 @@ #include "global.h" #include "region.h" +#include "versions.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" diff --git a/src/code/z_message.c b/src/code/z_message.c index 2266cd1f9f..e5b7bbc700 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -2,6 +2,7 @@ #include "message_data_static.h" #include "terminal.h" #include "assets/textures/parameter_static/parameter_static.h" +#include "versions.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" diff --git a/src/code/z_play.c b/src/code/z_play.c index 135f24c75e..6088ca2e68 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -1,6 +1,7 @@ #include "global.h" #include "quake.h" #include "terminal.h" +#include "versions.h" #include "z64frame_advance.h" diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 16c2103107..732b21405c 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -6,6 +6,7 @@ #include "z_en_mag.h" #include "assets/objects/object_mag/object_mag.h" +#include "versions.h" #define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 56e09ba275..e52c5c5de1 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1,5 +1,6 @@ #include "file_select.h" #include "terminal.h" +#include "versions.h" #include "assets/textures/title_static/title_static.h" #include "assets/textures/parameter_static/parameter_static.h" diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index ad8f3d884a..3d1ea7a35d 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -6,6 +6,7 @@ #include "global.h" #include "alloca.h" +#include "versions.h" #include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h" #if OOT_DEBUG