mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 01:10:33 +00:00
Move build.c definitions to the makefile, introduce and use libultra version defines in libultra instead of PLATFORM defines (#2353)
* Move build.c definitions to the makefile, introduce and use libultra version defines in libultra instead of PLATFORM defines * MAJOR+MINOR versions -> VERSION+PATCH, stringify build defines in makefile, let the libultra version determine the OPTFLAGS for libultra files * Clang format moment * Remove LIBULTRA_VERSION_ID, tweak OS_VERSION and libultra version definitions * Better fix for formatting problems
This commit is contained in:
parent
df5d4cb467
commit
9170902f8d
12 changed files with 106 additions and 77 deletions
|
@ -54,13 +54,13 @@
|
|||
* and what libultra version (os_ver) it uses.
|
||||
*
|
||||
* The hardware revision for a retail N64 is (2,0).
|
||||
* The libultra version may be a single letter, without quotes.
|
||||
* The libultra version must be a single char, in quotes.
|
||||
*/
|
||||
#define LIBULTRA_VERSION(hw_major, hw_minor, os_ver) \
|
||||
#define OS_VERSION(hw_major, hw_minor, os_ver) \
|
||||
.half 0; \
|
||||
.byte (hw_major) * 10 + (hw_minor); \
|
||||
_os_ver_start = .; \
|
||||
.ascii #os_ver ; \
|
||||
.byte (os_ver) ; \
|
||||
.if (. - _os_ver_start) != 1; \
|
||||
.error "OS version should be just one letter"; \
|
||||
.endif
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "rom_header.h"
|
||||
#include "ultra64/version.h"
|
||||
#include "region.h"
|
||||
#include "versions.h"
|
||||
|
||||
|
@ -6,11 +7,7 @@
|
|||
/* 0x01 */ PI_DOMAIN_1_CFG(64, 18, 7, 3)
|
||||
/* 0x04 */ SYSTEM_CLOCK_RATE_SETTING(0xF)
|
||||
/* 0x08 */ ENTRYPOINT(0x80000400)
|
||||
#if PLATFORM_N64
|
||||
/* 0x0C */ LIBULTRA_VERSION(2, 0, I)
|
||||
#else
|
||||
/* 0x0C */ LIBULTRA_VERSION(2, 0, L)
|
||||
#endif
|
||||
/* 0x0C */ OS_VERSION(2, 0, LIBULTRA_VERSION)
|
||||
/* 0x10 */ CHECKSUM()
|
||||
/* 0x18 */ PADDING(8)
|
||||
/* 0x20 */ ROM_NAME("THE LEGEND OF ZELDA")
|
||||
|
@ -28,12 +25,4 @@
|
|||
#elif OOT_REGION == REGION_EU
|
||||
/* 0x3E */ REGION(PAL)
|
||||
#endif
|
||||
#if OOT_VERSION == NTSC_1_0 || OOT_VERSION == PAL_1_0
|
||||
/* 0x3F */ GAME_REVISION(0)
|
||||
#elif OOT_VERSION == NTSC_1_1 || OOT_VERSION == PAL_1_1
|
||||
/* 0x3F */ GAME_REVISION(1)
|
||||
#elif OOT_VERSION == NTSC_1_2
|
||||
/* 0x3F */ GAME_REVISION(2)
|
||||
#else
|
||||
/* 0x3F */ GAME_REVISION(15)
|
||||
#endif
|
||||
/* 0x3F */ GAME_REVISION(OOT_REVISION)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue