From a31e2209c5bc16b9be446923fcfe230592544ed3 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Mon, 14 Aug 2023 17:53:08 +0200 Subject: [PATCH] port: fix firing range props to Ryan again --- port/src/preprocess.c | 10 ---------- port/src/romdata.c | 2 +- src/game/training.c | 4 ++-- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/port/src/preprocess.c b/port/src/preprocess.c index 2a7daf1de..66ab08452 100644 --- a/port/src/preprocess.c +++ b/port/src/preprocess.c @@ -997,16 +997,6 @@ void preprocessSequences(u8 *data, u32 size) } } -void preprocessFiringRange(u8 *data, u32 size) -{ - // u16 texts[9] is the first and only thing we care about here - // probably no sense supporting custom sizes either - u16 *texts = (u16 *)data; - for (s32 i = 0; i < 9; ++i) { - PD_SWAP_VAL(texts[i]); - } -} - void preprocessTexturesList(u8 *data, u32 size) { struct texture *tex = (struct texture *)data; diff --git a/port/src/romdata.c b/port/src/romdata.c index 6bee895c0..72453b640 100644 --- a/port/src/romdata.c +++ b/port/src/romdata.c @@ -70,7 +70,7 @@ static struct romfile fileSlots[ROMDATA_MAX_FILES]; ROMSEG_DECL_SEG(mpstringsF, 0x7df820, 0x3700, NULL ) \ ROMSEG_DECL_SEG(mpstringsS, 0x7e2f20, 0x3700, NULL ) \ ROMSEG_DECL_SEG(mpstringsI, 0x7e6620, 0x3700, NULL ) \ - ROMSEG_DECL_SEG(firingrange, 0x7e9d20, 0x1550, preprocessFiringRange ) \ + ROMSEG_DECL_SEG(firingrange, 0x7e9d20, 0x1550, NULL ) \ ROMSEG_DECL_SEG(fonttahoma, 0x7f7860, 0x0, preprocessFont ) \ ROMSEG_DECL_SEG(fontnumeric, 0x7f8b20, 0x0, preprocessFont ) \ ROMSEG_DECL_SEG(fonthandelgothicsm, 0x7f9d30, 0x0, preprocessFont ) \ diff --git a/src/game/training.c b/src/game/training.c index 157ff84fb..4f24e1728 100644 --- a/src/game/training.c +++ b/src/game/training.c @@ -481,7 +481,7 @@ void *frLoadRomData(u32 len) g_FrRomData = mempAlloc(ALIGN16(len), MEMPOOL_STAGE); if (g_FrRomData) { - return dmaExecWithAutoAlign(g_FrRomData, (romptr_t) &_firingrangeSegmentRomStart, len); + return dmaExecWithAutoAlign(g_FrRomData, (romptr_t) REF_SEG _firingrangeSegmentRomStart, len); } return NULL; @@ -1073,7 +1073,7 @@ void frUnlockDoor(void) void frLoadData(void) { if (!g_FrDataLoaded) { - s32 len = (s32)&_firingrangeSegmentRomEnd - (s32)&_firingrangeSegmentRomStart; + s32 len = (s32) REF_SEG _firingrangeSegmentRomEnd - (s32) REF_SEG _firingrangeSegmentRomStart; s32 index = 0; u32 i; u32 numscripts = 1;