mirror of
https://github.com/doldecomp/sms.git
synced 2026-11-07 09:06:00 -10:00
Setup GMSE01, GMSJ01_01, GMSP01_NX (#333)
* chore: add GMSE01, GMSJ01_01, GMSP01_NX * chore: add dirs for new roms * fix: fix compilation issues for roms * feat: trigger CI for other roms * fix: build issues for JP and PAL * fix: lint + fix version switch * fix: GMSP01 build failure * chore: disable symbol validation on GMSE01 * fix: paths in PauseMenu2 * fix: lint * chore: finalise splits * chore: document why GMSE01 symbol validation is skipped
This commit is contained in:
1 parent
cbedd19eff
commit
ad01b00780
35 files changed
+127206
-68
No files matched your search
@@ -12,7 +12,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [GMSJ01, GMSP01]
|
||||
version: [GMSJ01, GMSE01, GMSP01, GMSJ01_01, GMSP01_NX]
|
||||
|
||||
steps:
|
||||
# Checkout the repository
|
||||
@@ -93,8 +93,9 @@ jobs:
|
||||
|
||||
# Build the same sources at the base revision. Some TUs already have strict
|
||||
# map-validation errors; CI must reject new errors, not inherited debt.
|
||||
# GMSE01 has no MAP file, so we skip symbol order validation for it
|
||||
- name: Build symbol-validation baseline
|
||||
if: steps.changes.outputs.base != ''
|
||||
if: matrix.version != 'GMSE01' && steps.changes.outputs.base != ''
|
||||
env:
|
||||
BASE: ${{ steps.changes.outputs.base }}
|
||||
run: |
|
||||
@@ -112,7 +113,9 @@ jobs:
|
||||
|
||||
# Validate map symbol presence/order/linkage for each changed .cpp.
|
||||
# Keep the full diagnostics; only errors absent from the base fail this job.
|
||||
# GMSE01 has no MAP file, so we skip symbol order validation for it
|
||||
- name: Validate symbol order
|
||||
if: matrix.version != 'GMSE01'
|
||||
run: |
|
||||
if [ ! -s changed_cpp.txt ]; then
|
||||
echo "No changed .cpp files; nothing to validate."
|
||||
|
||||
@@ -19,6 +19,9 @@ Supported versions:
|
||||
|
||||
- `GMSJ01`: Rev 0 (JPN)
|
||||
- `GMSP01`: Rev 0 (PAL)
|
||||
- `GMSE01`: Rev 0 (NTSC)
|
||||
- `GMSJ01_01`: Rev 1 (JPN)
|
||||
- `GMSP01_NX`: Rev 0 (Mario 3D All Stars (Switch))
|
||||
|
||||
Dependencies
|
||||
============
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
a6782903ef79d4196c8489ecb1b57decb5b3728f orig/GMSE01/sys/main.dol
|
||||
@@ -0,0 +1,37 @@
|
||||
name: mario
|
||||
object_base: orig/GMSE01
|
||||
object: sys/main.dol
|
||||
|
||||
# Generated from marioUS.MAP
|
||||
# map: orig/GMSE01/files/marioUS.MAP
|
||||
# common_start: 0x80404290
|
||||
symbols: config/GMSE01/symbols.txt
|
||||
splits: config/GMSE01/splits.txt
|
||||
|
||||
mw_comment_version: 8 # GC Linker 1.2.5
|
||||
symbols_known: true # Very fast analysis
|
||||
fill_gaps: false # Alignments known
|
||||
|
||||
# MSoundBGMId constants (0x800100xx) that the tracker pairs into .text
|
||||
block_relocations:
|
||||
- source: 0x8016D818
|
||||
- source: 0x8016D81C
|
||||
- source: 0x80172BB4
|
||||
- source: 0x80172BBC
|
||||
- source: 0x80298860
|
||||
- source: 0x80298864
|
||||
- source: 0x802988A8
|
||||
- source: 0x802988AC
|
||||
- source: 0x802BB95C
|
||||
- source: 0x802BBC80
|
||||
- source: 0x802BBC90
|
||||
- source: 0x802BBCD0
|
||||
- source: 0x802BBCD8
|
||||
- source: 0x802BBE48
|
||||
- source: 0x802BBE4C
|
||||
- source: 0x802BBE60
|
||||
- source: 0x802BBE64
|
||||
- source: 0x802BBE78
|
||||
- source: 0x802BBE88
|
||||
- source: 0x802BBFB8
|
||||
- source: 0x802BBFC0
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
60108468079d005ded8e390e8b331b1bd46fd982 orig/GMSJ01_01/sys/main.dol
|
||||
@@ -0,0 +1,37 @@
|
||||
name: mario
|
||||
object_base: orig/GMSJ01_01
|
||||
object: sys/main.dol
|
||||
|
||||
# Generated from mario.MAP
|
||||
# map: orig/GMSJ01_01/files/mario.MAP
|
||||
# common_start: 0x803F5264
|
||||
symbols: config/GMSJ01_01/symbols.txt
|
||||
splits: config/GMSJ01_01/splits.txt
|
||||
|
||||
mw_comment_version: 8 # GC Linker 1.2.5
|
||||
symbols_known: true # Very fast analysis
|
||||
fill_gaps: false # Alignments known
|
||||
|
||||
# MSoundBGMId constants (0x800100xx) that the tracker pairs into .text
|
||||
block_relocations:
|
||||
- source: 0x8014E5F0
|
||||
- source: 0x8014E5F4
|
||||
- source: 0x80153948
|
||||
- source: 0x80153950
|
||||
- source: 0x80278508
|
||||
- source: 0x8027850C
|
||||
- source: 0x80278550
|
||||
- source: 0x80278554
|
||||
- source: 0x8029B16C
|
||||
- source: 0x8029B490
|
||||
- source: 0x8029B4A0
|
||||
- source: 0x8029B4E0
|
||||
- source: 0x8029B4E8
|
||||
- source: 0x8029B658
|
||||
- source: 0x8029B65C
|
||||
- source: 0x8029B670
|
||||
- source: 0x8029B674
|
||||
- source: 0x8029B688
|
||||
- source: 0x8029B698
|
||||
- source: 0x8029B7C8
|
||||
- source: 0x8029B7D0
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
ed18a9ddf46c22172a6cd3edade02b5db27db65f orig/GMSP01_NX/sys/main.dol
|
||||
@@ -0,0 +1,37 @@
|
||||
name: mario
|
||||
object_base: orig/GMSP01_NX
|
||||
object: sys/main.dol
|
||||
|
||||
# Generated from marioEU.MAP
|
||||
# map: orig/GMSP01_NX/files/marioEU.MAP
|
||||
# common_start: 0x803F8F50
|
||||
symbols: config/GMSP01_NX/symbols.txt
|
||||
splits: config/GMSP01_NX/splits.txt
|
||||
|
||||
mw_comment_version: 8 # GC Linker 1.2.5
|
||||
symbols_known: true # Very fast analysis
|
||||
fill_gaps: false # Alignments known
|
||||
|
||||
# MSoundBGMId constants (0x800100xx) that the tracker pairs into .text
|
||||
block_relocations:
|
||||
- source: 0x80163AF0
|
||||
- source: 0x80163AF4
|
||||
- source: 0x801693C8
|
||||
- source: 0x801693D0
|
||||
- source: 0x8028EE9C
|
||||
- source: 0x8028EEA0
|
||||
- source: 0x8028EEE4
|
||||
- source: 0x8028EEE8
|
||||
- source: 0x802B2CA4
|
||||
- source: 0x802B2FC8
|
||||
- source: 0x802B2FD8
|
||||
- source: 0x802B3018
|
||||
- source: 0x802B3020
|
||||
- source: 0x802B3190
|
||||
- source: 0x802B3194
|
||||
- source: 0x802B31A8
|
||||
- source: 0x802B31AC
|
||||
- source: 0x802B31C0
|
||||
- source: 0x802B31D0
|
||||
- source: 0x802B3300
|
||||
- source: 0x802B3308
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+5
-2
@@ -29,8 +29,11 @@ from tools.project import (
|
||||
# Game versions
|
||||
DEFAULT_VERSION = 0
|
||||
VERSIONS = [
|
||||
"GMSJ01", # 0
|
||||
"GMSP01", # 1
|
||||
"GMSJ01", # 0
|
||||
"GMSP01", # 1
|
||||
"GMSE01", # 2
|
||||
"GMSJ01_01", # 3
|
||||
"GMSP01_NX", # 4 (Switch 3D all stars version)
|
||||
]
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
@@ -385,7 +385,9 @@ public:
|
||||
TBossEelSaveParams& getBossEelParams() const { return *mSaveParams; }
|
||||
|
||||
enum {
|
||||
LIVE_FLAG_UNK10000 = VERSION_SELECT(GMSJ01(0x10000), GMSP01(0x20000)),
|
||||
LIVE_FLAG_UNK10000
|
||||
= VERSION_SELECT(GMSJ01(0x10000), GMSE01(0x20000), GMSP01(0x20000),
|
||||
GMSJ01_01(0x20000), GMSP01_NX(0x20000)),
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
@@ -202,7 +202,8 @@ public:
|
||||
|
||||
enum {
|
||||
LIVE_FLAG_MELT_ON_DEATH
|
||||
= VERSION_SELECT(GMSJ01(0x10000), GMSP01(0x20000)),
|
||||
= VERSION_SELECT(GMSJ01(0x10000), GMSE01(0x20000), GMSP01(0x20000),
|
||||
GMSJ01_01(0x20000), GMSP01_NX(0x20000)),
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
@@ -225,11 +225,15 @@ public:
|
||||
bool isClean() const { return mPollutionAmount == 0.0f; }
|
||||
|
||||
enum {
|
||||
LIVE_FLAG_DONT_TALK = VERSION_SELECT(GMSJ01(0x10000), GMSP01(0x20000)),
|
||||
LIVE_FLAG_DONT_TALK
|
||||
= VERSION_SELECT(GMSJ01(0x10000), GMSE01(0x20000), GMSP01(0x20000),
|
||||
GMSJ01_01(0x20000), GMSP01_NX(0x20000)),
|
||||
LIVE_FLAG_SINK_BOTTOM
|
||||
= VERSION_SELECT(GMSJ01(0x800000), GMSP01(0x1000000)),
|
||||
LIVE_FLAG_DONT_THROW
|
||||
= VERSION_SELECT(GMSJ01(0x20000000), GMSP01(0x40000000)),
|
||||
= VERSION_SELECT(GMSJ01(0x800000), GMSE01(0x1000000), GMSP01(0x1000000),
|
||||
GMSJ01_01(0x1000000), GMSP01_NX(0x1000000)),
|
||||
LIVE_FLAG_DONT_THROW = VERSION_SELECT(
|
||||
GMSJ01(0x20000000), GMSE01(0x40000000), GMSP01(0x40000000),
|
||||
GMSJ01_01(0x40000000), GMSP01_NX(0x40000000)),
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
@@ -37,26 +37,52 @@ enum {
|
||||
#ifdef VERSION_GMSP01
|
||||
LIVE_FLAG_CALC_INT_FRAME = 0x4000,
|
||||
#endif
|
||||
LIVE_FLAG_UNK4000 = VERSION_SELECT(GMSJ01(0x4000), GMSP01(0x8000)),
|
||||
LIVE_FLAG_UNK8000 = VERSION_SELECT(GMSJ01(0x8000), GMSP01(0x10000)),
|
||||
LIVE_FLAG_UNK10000 = VERSION_SELECT(GMSJ01(0x10000), GMSP01(0x20000)),
|
||||
LIVE_FLAG_UNK4000
|
||||
= VERSION_SELECT(GMSJ01(0x4000), GMSE01(0x8000), GMSP01(0x8000),
|
||||
GMSJ01_01(0x8000), GMSP01_NX(0x8000)),
|
||||
LIVE_FLAG_UNK8000
|
||||
= VERSION_SELECT(GMSJ01(0x8000), GMSE01(0x10000), GMSP01(0x10000),
|
||||
GMSJ01_01(0x10000), GMSP01_NX(0x10000)),
|
||||
LIVE_FLAG_UNK10000
|
||||
= VERSION_SELECT(GMSJ01(0x10000), GMSE01(0x20000), GMSP01(0x20000),
|
||||
GMSJ01_01(0x20000), GMSP01_NX(0x20000)),
|
||||
// WARNING: some flag values are overloaded between derived classes. E.g.
|
||||
// LIVE_FLAG_UNK10000 means different things for NPCs and small enemies.
|
||||
// Be careful about placing stuff here -- it might belong to derived classes
|
||||
// instead.
|
||||
LIVE_FLAG_UNK20000 = VERSION_SELECT(GMSJ01(0x20000), GMSP01(0x40000)),
|
||||
LIVE_FLAG_UNK40000 = VERSION_SELECT(GMSJ01(0x40000), GMSP01(0x80000)),
|
||||
LIVE_FLAG_UNK80000 = VERSION_SELECT(GMSJ01(0x80000), GMSP01(0x100000)),
|
||||
LIVE_FLAG_UNK100000 = VERSION_SELECT(GMSJ01(0x100000), GMSP01(0x200000)),
|
||||
LIVE_FLAG_UNK200000 = VERSION_SELECT(GMSJ01(0x200000), GMSP01(0x400000)),
|
||||
LIVE_FLAG_UNK400000 = VERSION_SELECT(GMSJ01(0x400000), GMSP01(0x800000)),
|
||||
LIVE_FLAG_UNK1000000 = VERSION_SELECT(GMSJ01(0x1000000), GMSP01(0x2000000)),
|
||||
LIVE_FLAG_UNK2000000 = VERSION_SELECT(GMSJ01(0x2000000), GMSP01(0x4000000)),
|
||||
LIVE_FLAG_UNK4000000 = VERSION_SELECT(GMSJ01(0x4000000), GMSP01(0x8000000)),
|
||||
LIVE_FLAG_UNK20000
|
||||
= VERSION_SELECT(GMSJ01(0x20000), GMSE01(0x40000), GMSP01(0x40000),
|
||||
GMSJ01_01(0x40000), GMSP01_NX(0x40000)),
|
||||
LIVE_FLAG_UNK40000
|
||||
= VERSION_SELECT(GMSJ01(0x40000), GMSE01(0x80000), GMSP01(0x80000),
|
||||
GMSJ01_01(0x80000), GMSP01_NX(0x80000)),
|
||||
LIVE_FLAG_UNK80000
|
||||
= VERSION_SELECT(GMSJ01(0x80000), GMSE01(0x100000), GMSP01(0x100000),
|
||||
GMSJ01_01(0x100000), GMSP01_NX(0x100000)),
|
||||
LIVE_FLAG_UNK100000
|
||||
= VERSION_SELECT(GMSJ01(0x100000), GMSE01(0x200000), GMSP01(0x200000),
|
||||
GMSJ01_01(0x200000), GMSP01_NX(0x200000)),
|
||||
LIVE_FLAG_UNK200000
|
||||
= VERSION_SELECT(GMSJ01(0x200000), GMSE01(0x400000), GMSP01(0x400000),
|
||||
GMSJ01_01(0x400000), GMSP01_NX(0x400000)),
|
||||
LIVE_FLAG_UNK400000
|
||||
= VERSION_SELECT(GMSJ01(0x400000), GMSE01(0x800000), GMSP01(0x800000),
|
||||
GMSJ01_01(0x800000), GMSP01_NX(0x800000)),
|
||||
LIVE_FLAG_UNK1000000
|
||||
= VERSION_SELECT(GMSJ01(0x1000000), GMSE01(0x2000000), GMSP01(0x2000000),
|
||||
GMSJ01_01(0x2000000), GMSP01_NX(0x2000000)),
|
||||
LIVE_FLAG_UNK2000000
|
||||
= VERSION_SELECT(GMSJ01(0x2000000), GMSE01(0x4000000), GMSP01(0x4000000),
|
||||
GMSJ01_01(0x4000000), GMSP01_NX(0x4000000)),
|
||||
LIVE_FLAG_UNK4000000
|
||||
= VERSION_SELECT(GMSJ01(0x4000000), GMSE01(0x8000000), GMSP01(0x8000000),
|
||||
GMSJ01_01(0x8000000), GMSP01_NX(0x8000000)),
|
||||
LIVE_FLAG_UNK8000000
|
||||
= VERSION_SELECT(GMSJ01(0x8000000), GMSP01(0x10000000)),
|
||||
= VERSION_SELECT(GMSJ01(0x8000000), GMSE01(0x10000000), GMSP01(0x10000000),
|
||||
GMSJ01_01(0x10000000), GMSP01_NX(0x10000000)),
|
||||
LIVE_FLAG_UNK10000000
|
||||
= VERSION_SELECT(GMSJ01(0x10000000), GMSP01(0x20000000)),
|
||||
= VERSION_SELECT(GMSJ01(0x10000000), GMSE01(0x20000000), GMSP01(0x20000000),
|
||||
GMSJ01_01(0x20000000), GMSP01_NX(0x20000000)),
|
||||
};
|
||||
|
||||
class TLiveActor : public TTakeActor {
|
||||
|
||||
@@ -506,10 +506,13 @@ enum MSFlag {
|
||||
MSF_STAGE_BOOL_END = 0x50064,
|
||||
MSF_STAGE_INT_END = 0x60064,
|
||||
MSF_SAVED_OPTION_BOOL_END
|
||||
= VERSION_SELECT(GMSJ01(0x70002), GMSP01(0x70003)),
|
||||
= VERSION_SELECT(GMSJ01(0x70002), GMSE01(0x70003), GMSP01(0x70003),
|
||||
GMSJ01_01(0x70003), GMSP01_NX(0x70003)),
|
||||
MSF_SAVED_OPTION_INT_END = 0x80001,
|
||||
MSF_OPTION_BOOL_END = VERSION_SELECT(GMSJ01(0x90001), GMSP01(0x90002)),
|
||||
MSF_OPTION_INT_END = 0xA0002,
|
||||
MSF_OPTION_BOOL_END
|
||||
= VERSION_SELECT(GMSJ01(0x90001), GMSE01(0x90002), GMSP01(0x90002),
|
||||
GMSJ01_01(0x90002), GMSP01_NX(0x90002)),
|
||||
MSF_OPTION_INT_END = 0xA0002,
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -2,8 +2,15 @@
|
||||
#define SYSTEM_RESOLUTION_HPP
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include "version.h"
|
||||
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetIntroRenderWidth();
|
||||
u16 SMSGetIntroRenderHeight();
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetGCLogoVideoHeight(u32 tvFormat);
|
||||
#else
|
||||
u16 SMSGetGCLogoVideoHeight();
|
||||
@@ -15,7 +22,8 @@ u16 SMSGetTitleRenderHeight();
|
||||
u16 SMSGetTitleRenderWidth();
|
||||
u16 SMSGetGameRenderHeight();
|
||||
u16 SMSGetGameRenderWidth();
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetTitleVideoHeight(u32 tvFormat);
|
||||
#else
|
||||
u16 SMSGetTitleVideoHeight();
|
||||
@@ -23,7 +31,8 @@ u16 SMSGetTitleVideoHeight();
|
||||
u16 SMSGetTitleVideoWidth();
|
||||
s32 SMSGetDisplayHeightMax();
|
||||
s32 SMSGetDisplayWidthMax();
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetGameVideoHeight(u32 tvFormat);
|
||||
#else
|
||||
u16 SMSGetGameVideoHeight();
|
||||
|
||||
@@ -7,14 +7,39 @@
|
||||
#define GMSJ01(value)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_GMSE01
|
||||
#define GMSE01(value) value
|
||||
#else
|
||||
#define GMSE01(value)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_GMSP01
|
||||
#define GMSP01(value) value
|
||||
#else
|
||||
#define GMSP01(value)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_GMSJ01_01
|
||||
#define GMSJ01_01(value) value
|
||||
#else
|
||||
#define GMSJ01_01(value)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_GMSP01_NX
|
||||
#define GMSP01_NX(value) value
|
||||
#else
|
||||
#define GMSP01_NX(value)
|
||||
#endif
|
||||
|
||||
#define VERSION_SELECT_JOIN(a, b, c, d, e, f, g, h, ...) a b c d e f g h
|
||||
|
||||
#define VERSION_SELECT(...) (VERSION_SELECT_JOIN(__VA_ARGS__, , , , , , , ))
|
||||
|
||||
#define VSD_STR(x) #x
|
||||
#define VSD_XSTR(x) VSD_STR(x)
|
||||
#define VERSION_SELECT_DEFAULT(defualt_value, ...) \
|
||||
(sizeof(VSD_XSTR(VERSION_SELECT_JOIN(__VA_ARGS__, , , , , , , , ))) > 1 \
|
||||
? (VERSION_SELECT_JOIN(__VA_ARGS__, , , , , , , , ) + 0) \
|
||||
: (defualt_value))
|
||||
|
||||
#endif
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -6,4 +6,8 @@ void TChangeValue::calcChangeValue() { }
|
||||
void dummy(s32 param_1, s32 param_2, s32 param_3)
|
||||
{
|
||||
CLBCalcRatio(param_1, param_2, param_3);
|
||||
#if defined(VERSION_GMSJ01_01)
|
||||
// fakematch for JP rev 1, else it fails to link
|
||||
CLBLinearInbetween<f32>(param_1, param_2, param_3);
|
||||
#endif
|
||||
}
|
||||
@@ -25,7 +25,9 @@ void THelpActor::load(JSUMemoryInputStream& stream)
|
||||
unk6C = stream.readString();
|
||||
initHitActor(ACTOR_TYPE_HELP_ACTOR, 1, HIT_CATEGORY_PLAYER,
|
||||
mScaling.x * 100.0f, mScaling.y * 100.0f, 1.0f, 1.0f);
|
||||
unk68 = local_10 + VERSION_SELECT(GMSJ01(0xE0030), GMSP01(0x33));
|
||||
unk68 = local_10
|
||||
+ VERSION_SELECT(GMSJ01(0xE0030), GMSE01(0x33), GMSP01(0x33),
|
||||
GMSJ01_01(0x33), GMSP01_NX(0x33));
|
||||
}
|
||||
|
||||
void THelpActor::loadAfter()
|
||||
|
||||
@@ -54,7 +54,8 @@ void TMovieSubTitle::setupResource(const char* param_1, JKRArchive* param_2)
|
||||
unk18 = (J2DTextBox*)unk14->search('me_a');
|
||||
unk1C = (J2DTextBox*)unk14->search('me_b');
|
||||
|
||||
char buffer[VERSION_SELECT(GMSJ01(256), GMSP01(1024))];
|
||||
char buffer[VERSION_SELECT(GMSJ01(256), GMSE01(256), GMSP01(1024),
|
||||
GMSJ01_01(1024), GMSP01_NX(1024))];
|
||||
|
||||
// inline?
|
||||
memset(buffer, ' ', ARRAY_COUNT(buffer));
|
||||
|
||||
@@ -114,8 +114,10 @@ void TPauseMenu2::load(JSUMemoryInputStream& pStream)
|
||||
u32 shineStage = SMS_getShineStage(SMSGetMarDirector()->mMap);
|
||||
s32 flag = TFlagManager::getInstance()->getFlag(MSF_EPISODE);
|
||||
|
||||
#ifdef VERSION_GMSP01
|
||||
void* stageBmg = JKRFileLoader::getGlbResource("/cmn2d/stagename.bmg");
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
void* stageBmg = JKRFileLoader::getGlbResource(VERSION_SELECT_DEFAULT(
|
||||
"/cmn2d/stagename.bmg", GMSJ01_01("/common/2d/scenarioname.bmg")));
|
||||
if (SMSGetMarDirector()->mMap == 0x14)
|
||||
shineStage = 0;
|
||||
mStageName->setString(SMSGetMessageData(stageBmg, shineStage));
|
||||
@@ -127,7 +129,10 @@ void TPauseMenu2::load(JSUMemoryInputStream& pStream)
|
||||
if (SMSGetMarDirector()->mMap != 0xF) {
|
||||
void* scenarioBmg = JKRFileLoader::getGlbResource(
|
||||
VERSION_SELECT(GMSJ01("/common/2d/scenarioname.bmg"),
|
||||
GMSP01("/cmn2d/scenarioname.bmg")));
|
||||
GMSE01("/common/2d/scenarioname.bmg"),
|
||||
GMSP01("/cmn2d/scenarioname.bmg"),
|
||||
GMSJ01_01("/common/2d/scenarioname.bmg"),
|
||||
GMSP01_NX("/cmn2d/scenarioname.bmg")));
|
||||
s16 shineID = SMS_getShineID(shineStage, flag, false);
|
||||
const char* scenarioName;
|
||||
if (scenarioBmg == nullptr || shineID == -1 || shineStage == 0) {
|
||||
|
||||
@@ -147,8 +147,13 @@ void TProgSelect::perform(u32 cue, JDrama::TGraphics* graphics)
|
||||
J2DPrint JStack_174(gpSystemFont, 0);
|
||||
JStack_174.setUnk50(32);
|
||||
JStack_174.printReturn(
|
||||
unk1C, VERSION_SELECT(GMSJ01(300), GMSP01(580)), 160, HBIND_CENTER,
|
||||
VBIND_TOP, VERSION_SELECT(GMSJ01(175), GMSP01(35)), 300, 255);
|
||||
unk1C,
|
||||
VERSION_SELECT(GMSJ01(300), GMSE01(580), GMSP01(580),
|
||||
GMSJ01_01(580), GMSP01_NX(580)),
|
||||
160, HBIND_CENTER, VBIND_TOP,
|
||||
VERSION_SELECT(GMSJ01(175), GMSE01(35), GMSP01(35), GMSJ01_01(35),
|
||||
GMSP01_NX(35)),
|
||||
300, 255);
|
||||
if (!mHideTextBoxes) {
|
||||
unk120[0]->draw(240, 400);
|
||||
unk120[1]->draw(340, 400);
|
||||
|
||||
+13
-10
@@ -53,20 +53,22 @@ s32 TFerrisWheel::becomeCalmlyCallback(uintptr_t param_1, u32 param_2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define VERSION_FRAME_RATE \
|
||||
(VERSION_SELECT(GMSJ01(SMSGetAnmFrameRate()), \
|
||||
GMSE01(SMSGetAnmFrameRate()), GMSP01(rotate_frame_rate), \
|
||||
GMSJ01_01(SMSGetAnmFrameRate()), \
|
||||
GMSP01_NX(SMSGetAnmFrameRate())))
|
||||
|
||||
void TFerrisWheel::control()
|
||||
{
|
||||
TMapObjBase::control();
|
||||
if (isState(STATE_UNK2) && !isStateTimerEngaged()) {
|
||||
if (unk140 > VERSION_SELECT(GMSJ01(SMSGetAnmFrameRate()),
|
||||
GMSP01(rotate_frame_rate))
|
||||
/ 4.0f)
|
||||
if (unk140 > VERSION_FRAME_RATE / 4.0f)
|
||||
unk140 -= 0.015f;
|
||||
else
|
||||
mState = STATE_NORMAL;
|
||||
}
|
||||
if (unk140 > VERSION_SELECT(GMSJ01(SMSGetAnmFrameRate()),
|
||||
GMSP01(rotate_frame_rate))
|
||||
/ 4.0f) {
|
||||
if (unk140 > VERSION_FRAME_RATE / 4.0f) {
|
||||
MSound* sound = SMSGetMSound();
|
||||
sound->startSoundActor(MSD_SE_OBJ_MAHRE_GATE_LIGHT, &mPosition, 0,
|
||||
&sound->unk80, 0, 4);
|
||||
@@ -102,9 +104,7 @@ void TFerrisWheel::initMapObj()
|
||||
#endif
|
||||
unk140 = 10.0f;
|
||||
} else {
|
||||
unk140 = VERSION_SELECT(GMSJ01(SMSGetAnmFrameRate()),
|
||||
GMSP01(rotate_frame_rate))
|
||||
/ 4.0f;
|
||||
unk140 = VERSION_FRAME_RATE / 4.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -672,7 +672,10 @@ void TAmiKing::loadAfter()
|
||||
{
|
||||
TMapObjBase::loadAfter();
|
||||
SMS_LoadParticle(VERSION_SELECT(GMSJ01("/scene/Mapobj/amiking.jpa"),
|
||||
GMSP01("/scene/mapObj/amiking.jpa")),
|
||||
GMSE01("/scene/mapObj/amiking.jpa"),
|
||||
GMSP01("/scene/mapObj/amiking.jpa"),
|
||||
GMSJ01_01("/scene/mapObj/amiking.jpa"),
|
||||
GMSP01_NX("/scene/mapObj/amiking.jpa")),
|
||||
MAPOBJ_AMIKING);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,10 @@ int TMarDirector::loadResource()
|
||||
gpMarioParticleManager->unk3B8 = new JPAEmitterManager(
|
||||
gpResourceManager, particleNum, emitterNum, emitterNum * 2, nullptr);
|
||||
gpEmitterManager4D2 = new JPAEmitterManager(
|
||||
nullptr, VERSION_SELECT(GMSJ01(200), GMSP01(270)), 0x20, 0x40, nullptr);
|
||||
nullptr,
|
||||
VERSION_SELECT(GMSJ01(200), GMSE01(270), GMSP01(270), GMSJ01_01(270),
|
||||
GMSP01_NX(270)),
|
||||
0x20, 0x40, nullptr);
|
||||
loadParticle();
|
||||
|
||||
void* rawArch = SMSLoadArchive("/data/yoshi.arc", nullptr, 0, nullptr);
|
||||
|
||||
@@ -323,7 +323,8 @@ bool TMarDirector::setupObjects()
|
||||
|
||||
JDrama::TLookAtCamera* cam = static_cast<JDrama::TLookAtCamera*>(
|
||||
JDrama::TNameRefGen::search("camera 1"));
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSE01) || defined(VERSION_GMSP01) \
|
||||
|| defined(VERSION_GMSJ01_01) || defined(VERSION_GMSP01_NX)
|
||||
cam->mAspect = (u16)SMSGetGameVideoWidth() * 0.9134614f
|
||||
/ (u16)SMSGetGameRenderHeight();
|
||||
#else
|
||||
|
||||
@@ -25,7 +25,8 @@ JDrama::TRect SMSGetRederRect_Game()
|
||||
|
||||
void SMSSetupGCLogoRenderMode(GXRenderModeObj* rmo)
|
||||
{
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u32 tvFormat = VIGetTvFormat();
|
||||
if (!(OSGetConsoleType() & OS_CONSOLE_DEVELOPMENT))
|
||||
tvFormat = VI_PAL;
|
||||
@@ -40,7 +41,8 @@ void SMSSetupGCLogoRenderMode(GXRenderModeObj* rmo)
|
||||
rmo->xFBmode = VI_XFBMODE_DF;
|
||||
rmo->field_rendering = 0;
|
||||
rmo->aa = 0;
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
JDrama::CalcRenderModeXFBHeight(rmo, SMSGetGCLogoVideoHeight(tvFormat));
|
||||
#else
|
||||
JDrama::CalcRenderModeXFBHeight(rmo, SMSGetGCLogoVideoHeight());
|
||||
@@ -59,7 +61,8 @@ void SMSSetupGCLogoRenderingInfo(JDrama::TDisplay* param_1)
|
||||
|
||||
void SMSSetupTitleRenderMode(GXRenderModeObj* rmo)
|
||||
{
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u32 tvFormat = VIGetTvFormat();
|
||||
if (!(OSGetConsoleType() & OS_CONSOLE_DEVELOPMENT))
|
||||
tvFormat = VI_PAL;
|
||||
@@ -82,7 +85,8 @@ void SMSSetupTitleRenderMode(GXRenderModeObj* rmo)
|
||||
rmo->xFBmode = noFilter ? VI_XFBMODE_SF : VI_XFBMODE_DF;
|
||||
rmo->field_rendering = 0;
|
||||
rmo->aa = 0;
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
JDrama::CalcRenderModeXFBHeight(rmo, SMSGetTitleVideoHeight(tvFormat));
|
||||
#else
|
||||
JDrama::CalcRenderModeXFBHeight(rmo, SMSGetTitleVideoHeight());
|
||||
@@ -102,7 +106,8 @@ void SMSSetupTitleRenderingInfo(JDrama::TDisplay* param_1)
|
||||
|
||||
void SMSSetupGameRenderingInfo(JDrama::TDisplay* param_1, bool param_2)
|
||||
{
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u32 tvFormat = VIGetTvFormat();
|
||||
if (!(OSGetConsoleType() & OS_CONSOLE_DEVELOPMENT))
|
||||
tvFormat = VI_PAL;
|
||||
@@ -134,7 +139,8 @@ void SMSSetupGameRenderingInfo(JDrama::TDisplay* param_1, bool param_2)
|
||||
rmo.efbHeight = SMSGetGameRenderHeight();
|
||||
rmo.viWidth = SMSGetGameVideoWidth();
|
||||
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
JDrama::CalcRenderModeXFBHeight(&rmo, SMSGetGameVideoHeight(tvFormat));
|
||||
#else
|
||||
JDrama::CalcRenderModeXFBHeight(&rmo, SMSGetGameVideoHeight());
|
||||
@@ -153,7 +159,8 @@ void SMSSetupGameRenderingInfo(JDrama::TDisplay* param_1, bool param_2)
|
||||
|
||||
void SMSSetupMovieRenderingInfo(JDrama::TDisplay* param_1)
|
||||
{
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u32 tvFormat = VIGetTvFormat();
|
||||
if (!(OSGetConsoleType() & OS_CONSOLE_DEVELOPMENT))
|
||||
tvFormat = VI_PAL;
|
||||
@@ -178,7 +185,8 @@ void SMSSetupMovieRenderingInfo(JDrama::TDisplay* param_1)
|
||||
rmo.xFBmode = noFilter ? VI_XFBMODE_SF : VI_XFBMODE_DF;
|
||||
rmo.field_rendering = 0;
|
||||
rmo.aa = 0;
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
JDrama::CalcRenderModeXFBHeight(&rmo, SMSGetGameVideoHeight(tvFormat));
|
||||
#else
|
||||
JDrama::CalcRenderModeXFBHeight(&rmo, SMSGetGameVideoHeight());
|
||||
|
||||
+34
-11
@@ -1,20 +1,24 @@
|
||||
#include <System/Resolution.hpp>
|
||||
#include <dolphin/vi.h>
|
||||
|
||||
u16 SMSGetGameVideoWidth() { return 660; }
|
||||
u16 SMSGetGameVideoWidth()
|
||||
{
|
||||
return VERSION_SELECT_DEFAULT(660, GMSP01_NX(640));
|
||||
}
|
||||
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetGameVideoHeight(u32 tvFormat)
|
||||
{
|
||||
u16 ret = 448;
|
||||
u16 ret = VERSION_SELECT_DEFAULT(448, GMSP01_NX(360));
|
||||
switch (tvFormat) {
|
||||
case VI_MPAL:
|
||||
case VI_NTSC:
|
||||
case VI_EURGB60:
|
||||
ret = 448;
|
||||
ret = VERSION_SELECT_DEFAULT(448, GMSP01_NX(360));
|
||||
break;
|
||||
case VI_PAL:
|
||||
ret = 530;
|
||||
ret = VERSION_SELECT_DEFAULT(530, GMSP01_NX(360));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -47,9 +51,13 @@ s32 SMSGetDisplayWidthMax() { return 720; }
|
||||
// UNUSED
|
||||
s32 SMSGetDisplayHeightMax() { return 574; }
|
||||
|
||||
u16 SMSGetTitleVideoWidth() { return 660; }
|
||||
u16 SMSGetTitleVideoWidth()
|
||||
{
|
||||
return VERSION_SELECT_DEFAULT(660, GMSP01_NX(640));
|
||||
}
|
||||
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetTitleVideoHeight(u32 tvFormat)
|
||||
{
|
||||
return SMSGetGameVideoHeight(tvFormat);
|
||||
@@ -60,19 +68,29 @@ u16 SMSGetTitleVideoHeight() { return SMSGetGameVideoHeight(); }
|
||||
|
||||
u16 SMSGetGameRenderWidth() { return 640; }
|
||||
|
||||
u16 SMSGetGameRenderHeight() { return 448; }
|
||||
u16 SMSGetGameRenderHeight()
|
||||
{
|
||||
return VERSION_SELECT_DEFAULT(448, GMSP01_NX(360));
|
||||
}
|
||||
|
||||
u16 SMSGetTitleRenderWidth() { return 640; }
|
||||
|
||||
u16 SMSGetTitleRenderHeight() { return 448; }
|
||||
u16 SMSGetTitleRenderHeight()
|
||||
{
|
||||
return VERSION_SELECT_DEFAULT(448, GMSP01_NX(360));
|
||||
}
|
||||
|
||||
u16 SMSGetGCLogoRenderWidth() { return 640; }
|
||||
|
||||
u16 SMSGetGCLogoRenderHeight() { return 448; }
|
||||
u16 SMSGetGCLogoRenderHeight()
|
||||
{
|
||||
return VERSION_SELECT_DEFAULT(448, GMSP01_NX(360));
|
||||
}
|
||||
|
||||
u16 SMSGetGCLogoVideoWidth() { return 640; }
|
||||
|
||||
#ifdef VERSION_GMSP01
|
||||
#if defined(VERSION_GMSP01) || defined(VERSION_GMSJ01_01) \
|
||||
|| defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetGCLogoVideoHeight(u32 tvFormat)
|
||||
{
|
||||
return SMSGetTitleVideoHeight(tvFormat);
|
||||
@@ -80,3 +98,8 @@ u16 SMSGetGCLogoVideoHeight(u32 tvFormat)
|
||||
#else
|
||||
u16 SMSGetGCLogoVideoHeight() { return SMSGetTitleVideoHeight(); }
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_GMSP01_NX)
|
||||
u16 SMSGetIntroRenderWidth() { return 640; }
|
||||
u16 SMSGetIntroRenderHeight() { return 448; }
|
||||
#endif
|
||||
Reference in new issue
Block a user