1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 01:34:18 +00:00

Add OOT_PAL_N64 and move other shorthands to versions.h (#2188)

* Move definitions of OOT_NTSC/OOT_PAL/OOT_MQ to versions.h

* Add PAL_N64 shorthand
This commit is contained in:
cadmic 2024-09-12 02:24:31 -07:00 committed by GitHub
parent f193311013
commit 09c1816e2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 42 additions and 51 deletions

View file

@ -51,57 +51,39 @@ ifeq ($(VERSION),ntsc-1.2)
REGIONAL_CHECKSUM := 1
REGION ?= JP
PLATFORM := N64
PAL := 0
MQ := 0
DEBUG := 0
COMPARE := 0
else ifeq ($(VERSION),gc-jp)
REGION ?= JP
PLATFORM := GC
PAL := 0
MQ := 0
DEBUG := 0
else ifeq ($(VERSION),gc-jp-mq)
REGION ?= JP
PLATFORM := GC
PAL := 0
MQ := 1
DEBUG := 0
else ifeq ($(VERSION),gc-jp-ce)
REGION ?= JP
PLATFORM := GC
PAL := 0
MQ := 0
DEBUG := 0
else ifeq ($(VERSION),gc-us)
REGION ?= US
PLATFORM := GC
PAL := 0
MQ := 0
DEBUG := 0
else ifeq ($(VERSION),gc-us-mq)
REGION ?= US
PLATFORM := GC
PAL := 0
MQ := 1
DEBUG := 0
else ifeq ($(VERSION),gc-eu)
REGION ?= EU
PLATFORM := GC
PAL := 1
MQ := 0
DEBUG := 0
else ifeq ($(VERSION),gc-eu-mq)
REGION ?= EU
PLATFORM := GC
PAL := 1
MQ := 1
DEBUG := 0
else ifeq ($(VERSION),gc-eu-mq-dbg)
REGION ?= EU
PLATFORM := GC
PAL := 1
MQ := 1
DEBUG := 1
else
$(error Unsupported version $(VERSION))
@ -147,18 +129,6 @@ else
$(error Unsupported platform $(PLATFORM))
endif
ifeq ($(PAL),0)
CPP_DEFINES += -DOOT_NTSC=1
else
CPP_DEFINES += -DOOT_PAL=1
endif
ifeq ($(MQ),0)
CPP_DEFINES += -DOOT_MQ=0
else
CPP_DEFINES += -DOOT_MQ=1
endif
ifeq ($(DEBUG),1)
CPP_DEFINES += -DOOT_DEBUG=1
OPTFLAGS := -O2

View file

@ -1,6 +1,7 @@
#define MESSAGE_DATA_STATIC
#include "message_data_fmt.h"
#include "versions.h"
#define DEFINE_MESSAGE(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
const char _message_##textId##_nes[] = nesMessage;

View file

@ -19,8 +19,6 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=1",
"PLATFORM_GC=0",
"OOT_NTSC=1",
"OOT_MQ=0",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2"
@ -46,8 +44,6 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_NTSC=1",
"OOT_MQ=0",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
@ -75,8 +71,6 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_NTSC=1",
"OOT_MQ=1",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
@ -104,8 +98,6 @@
"OOT_REGION=REGION_US",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_NTSC=1",
"OOT_MQ=0",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
@ -133,8 +125,6 @@
"OOT_REGION=REGION_US",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_NTSC=1",
"OOT_MQ=1",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
@ -162,8 +152,6 @@
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_PAL=1",
"OOT_MQ=1",
"OOT_DEBUG=1",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@ -191,8 +179,6 @@
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_PAL=1",
"OOT_MQ=0",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
@ -220,8 +206,6 @@
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_PAL=1",
"OOT_MQ=1",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",
@ -249,8 +233,6 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_NTSC=1",
"OOT_MQ=0",
"OOT_DEBUG=0",
"NDEBUG",
"F3DEX_GBI_2",

View file

@ -64,8 +64,6 @@ A more complete `c_cpp_properties.json` with configurations for all supported ve
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
"OOT_PAL=1",
"OOT_MQ=1",
"OOT_DEBUG=1",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",

View file

@ -1,6 +1,8 @@
#ifndef MACROS_H
#define MACROS_H
#include "versions.h"
#ifndef AVOID_UB
#define BAD_RETURN(type) type
#else

View file

@ -3,6 +3,7 @@
#include "ultra64.h"
#include "message_data_fmt.h"
#include "versions.h"
typedef enum TextBoxType {
/* 0 */ TEXTBOX_TYPE_BLACK,

View file

@ -1,6 +1,8 @@
#ifndef REGS_H
#define REGS_H
#include "versions.h"
#define REG_GROUPS 29 // number of REG groups, i.e. REG, SREG, OREG, etc.
#define REG_PAGES 6
#define REGS_PER_PAGE 16

View file

@ -1,6 +1,7 @@
#ifndef SEGMENT_SYMBOLS_H
#define SEGMENT_SYMBOLS_H
#include "versions.h"
#include "z64.h"
#define DECLARE_SEGMENT(name) \

View file

@ -16,4 +16,27 @@
#define GC_EU_MQ 12
#define GC_JP_CE 13
// NTSC/PAL
#if OOT_VERSION == PAL_1_0 || OOT_VERSION == PAL_1_1 || OOT_VERSION == GC_EU || OOT_VERSION == GC_EU_MQ || OOT_VERSION == GC_EU_MQ_DBG
#define OOT_NTSC 0
#define OOT_PAL 1
#else
#define OOT_NTSC 1
#define OOT_PAL 0
#endif
// PAL N64 (50 Hz)
#if OOT_VERSION == PAL_1_0 || OOT_VERSION == PAL_1_1
#define OOT_PAL_N64 1
#else
#define OOT_PAL_N64 0
#endif
// Master Quest
#if OOT_VERSION == GC_JP_MQ || OOT_VERSION == GC_US_MQ || OOT_VERSION == GC_EU_MQ || OOT_VERSION == GC_EU_MQ_DBG
#define OOT_MQ 1
#else
#define OOT_MQ 0
#endif
#endif

View file

@ -6,6 +6,7 @@
#include "attributes.h"
#include "audiomgr.h"
#include "controller.h"
#include "versions.h"
#include "z64save.h"
#include "z64light.h"
#include "z64bgcheck.h"

View file

@ -2,6 +2,7 @@
#define Z64MESSAGE_H
#include "z64view.h"
#include "versions.h"
struct OcarinaStaff;
struct Actor;

View file

@ -2,6 +2,7 @@
#define Z64SAVE_H
#include "ultra64.h"
#include "versions.h"
#include "z64math.h"
typedef enum Language {

View file

@ -3,6 +3,7 @@
#include "quake.h"
#include "rand.h"
#include "terminal.h"
#include "versions.h"
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
#include "overlays/actors/ovl_En_Part/z_en_part.h"

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "versions.h"
void Interface_Destroy(PlayState* play) {
Map_Destroy(play);

View file

@ -1,5 +1,6 @@
#include "global.h"
#include "message_data_static.h"
#include "versions.h"
/**
* Loads a texture from kanji for the requested `character` into the character texture buffer

View file

@ -1,5 +1,6 @@
#include "global.h"
#include "terminal.h"
#include "versions.h"
#include "assets/textures/parameter_static/parameter_static.h"
#include "assets/textures/do_action_static/do_action_static.h"
#include "assets/textures/icon_item_static/icon_item_static.h"

View file

@ -1,6 +1,6 @@
#include "global.h"
#include "quake.h"
#include "versions.h"
#include "z64frame_advance.h"
#if PLATFORM_N64
#include "n64dd.h"

View file

@ -1,5 +1,6 @@
#include "global.h"
#include "terminal.h"
#include "versions.h"
#define SLOT_SIZE (sizeof(SaveContext) + 0x28)
#define CHECKSUM_SIZE (sizeof(Save) / 2)

View file

@ -1,6 +1,7 @@
// Some text-handling functions
#include "global.h"
#include "n64dd.h"
#include "versions.h"
void (*D_801D2EC0)(void*, uintptr_t, size_t) = NULL;

View file

@ -11,6 +11,7 @@
#include "assets/objects/object_fish/object_fish.h"
#include "ichain.h"
#include "terminal.h"
#include "versions.h"
#if PLATFORM_N64
#include "cic6105.h"
#endif

View file

@ -1,5 +1,6 @@
#include "file_select.h"
#include "terminal.h"
#include "versions.h"
#include "assets/textures/title_static/title_static.h"
#include "assets/overlays/ovl_file_choose/ovl_file_choose.h"