Regalloc/debug/misc fixes (#2794)

* Fix "0" asserts

* More debug and regalloc fixes

* Fix PTMF syntax for compatibility with other compilers

* Fix some fakematches, link more TUs for J/P
This commit is contained in:
LagoLunatic
2025-11-10 18:25:00 -08:00
committed by GitHub
parent a02f72d8f3
commit 23a1c94063
87 changed files with 314 additions and 607 deletions
+1
View File
@@ -133,6 +133,7 @@ hioInit = .bss:0x00000048; // type:object size:0x1 data:byte
@3933 = .bss:0x0000004C; // type:object size:0xC scope:local @3933 = .bss:0x0000004C; // type:object size:0xC scope:local
l_HIO = .bss:0x00000058; // type:object size:0x1C scope:global data:byte l_HIO = .bss:0x00000058; // type:object size:0x1C scope:global data:byte
@4275 = .bss:0x00000074; // type:object size:0xC scope:local @4275 = .bss:0x00000074; // type:object size:0xC scope:local
init$2218 = .bss:0x00000080; // type:object size:0x1 scope:local align:1
sc$4274 = .bss:0x00000084; // type:object size:0xC scope:local sc$4274 = .bss:0x00000084; // type:object size:0xC scope:local
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000090; // type:object size:0x4 scope:global sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000090; // type:object size:0x4 scope:global
sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x00000094; // type:object size:0x4 scope:global sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x00000094; // type:object size:0x4 scope:global
@@ -419,6 +419,7 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
@4083 = .bss:0x00000048; // type:object size:0xC scope:local @4083 = .bss:0x00000048; // type:object size:0xC scope:local
l_HIO = .bss:0x00000054; // type:object size:0x4 scope:global data:4byte l_HIO = .bss:0x00000054; // type:object size:0x4 scope:global data:4byte
@5080 = .bss:0x00000058; // type:object size:0xC scope:local @5080 = .bss:0x00000058; // type:object size:0xC scope:local
init$2720 = .bss:0x00000064; // type:object size:0x1 scope:local
eyeOffset$5079 = .bss:0x00000068; // type:object size:0xC scope:local eyeOffset$5079 = .bss:0x00000068; // type:object size:0xC scope:local
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000074; // type:object size:0x4 scope:global sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000074; // type:object size:0x4 scope:global
sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x00000078; // type:object size:0x4 scope:global sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x00000078; // type:object size:0x4 scope:global
+7 -7
View File
@@ -1777,7 +1777,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_ot"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_ot"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_ph"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_ph"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_pm"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_pm"),
ActorRel(MatchingFor("GZ2E01"), "d_a_e_po"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_po"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_pz"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_pz"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_rb"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_rb"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_rdb"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_e_rdb"),
@@ -1861,7 +1861,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_fairy"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_fairy"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_fguard"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_fguard"),
ActorRel(NonMatching, "d_a_npc_gnd"), ActorRel(NonMatching, "d_a_npc_gnd"),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_gra", extra_cflags=[DANPCF_C_HACK]), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_gra", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_grc", extra_cflags=[DANPCF_C_HACK]), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_grc", extra_cflags=[DANPCF_C_HACK]),
ActorRel(NonMatching, "d_a_npc_grd"), ActorRel(NonMatching, "d_a_npc_grd"),
ActorRel(NonMatching, "d_a_npc_grm"), ActorRel(NonMatching, "d_a_npc_grm"),
@@ -1948,7 +1948,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zelda"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zelda"),
ActorRel(Equivalent, "d_a_npc_zra", extra_cflags=[DANPCF_C_HACK]), # weak func order ActorRel(Equivalent, "d_a_npc_zra", extra_cflags=[DANPCF_C_HACK]), # weak func order
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zrc", extra_cflags=[DANPCF_C_HACK]), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zrc", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_zrz", extra_cflags=[DANPCF_C_HACK]), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_zrz", extra_cflags=[DANPCF_C_HACK]),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_Lv5Key"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_Lv5Key"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_Turara"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_Turara"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_TvCdlst"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_TvCdlst"),
@@ -2016,10 +2016,10 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gb"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gb"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_geyser"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_geyser"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_glowSphere"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_glowSphere"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_gm"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gm"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_goGate"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_goGate"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gomikabe"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gomikabe"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_gra2"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gra2"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_graWall"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_graWall"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gra_rock"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_gra_rock"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_grave_stone"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_grave_stone"),
@@ -2148,7 +2148,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdoor"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdoor"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdtile"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdtile"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdwall"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pdwall"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_picture"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_picture"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pillar"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pillar"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pleaf"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_pleaf"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_poCandle"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_poCandle"),
@@ -2240,7 +2240,7 @@ config.libs = [
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_waterfall"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_waterfall"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wchain"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wchain"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wdStick"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wdStick"),
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_web0"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_web0"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_web1"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_web1"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_well_cover"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_well_cover"),
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wflag"), ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_obj_wflag"),
+3 -3
View File
@@ -564,7 +564,7 @@ struct J2DColorChanInfo {
/* 0x0 */ u8 field_0x3; /* 0x0 */ u8 field_0x3;
}; };
inline u8 J2DCalcColorChanID(const J2DColorChanInfo& info) { return info.field_0x1; } inline u16 J2DCalcColorChanID(u8 param_0) { return param_0; }
extern const J2DColorChanInfo j2dDefaultColorChanInfo; extern const J2DColorChanInfo j2dDefaultColorChanInfo;
/** /**
@@ -577,11 +577,11 @@ public:
setColorChanInfo(j2dDefaultColorChanInfo); setColorChanInfo(j2dDefaultColorChanInfo);
} }
J2DColorChan(const J2DColorChanInfo& info) { J2DColorChan(const J2DColorChanInfo& info) {
mColorChan = J2DCalcColorChanID(info); mColorChan = J2DCalcColorChanID(info.field_0x1);
} }
void setColorChanInfo(const J2DColorChanInfo& info) { void setColorChanInfo(const J2DColorChanInfo& info) {
mColorChan = J2DCalcColorChanID(info); mColorChan = J2DCalcColorChanID(info.field_0x1);
} }
u16 getMatSrc() const { return mColorChan & 1; } u16 getMatSrc() const { return mColorChan & 1; }
+1 -1
View File
@@ -215,7 +215,7 @@ public:
chunk = chunk->getNextChunk(); chunk = chunk->getNextChunk();
} }
JUT_PANIC(362,"Cannnot free for JASMemChunkPool") JUT_PANIC(362, "Cannnot free for JASMemChunkPool");
} }
/* 0x18 */ MemoryChunk* field_0x18; /* 0x18 */ MemoryChunk* field_0x18;
+1 -1
View File
@@ -89,7 +89,7 @@ private:
/* 0x5BC */ u8 field_0x5bc[0x5DC - 0x5BC]; /* 0x5BC */ u8 field_0x5bc[0x5DC - 0x5BC];
/* 0x5DC */ u8 mDoorAction; /* 0x5DC */ u8 mDoorAction;
/* 0x5E0 */ dPath* mpPath; /* 0x5E0 */ dPath* mpPath;
/* 0x5E4 */ cXyz mPoint; /* 0x5E4 */ Vec mPoint;
/* 0x5F0 */ u8 mPathIndex; /* 0x5F0 */ u8 mPathIndex;
/* 0x5F4 */ int mPointIndex; /* 0x5F4 */ int mPointIndex;
/* 0x5F8 */ u8 mBossHealth; /* 0x5F8 */ u8 mBossHealth;
-15
View File
@@ -10,9 +10,6 @@ class J3DModelData;
class dBgW; class dBgW;
struct fs_weed_s { struct fs_weed_s {
/* 8086FED8 */ ~fs_weed_s();
/* 8086FF38 */ fs_weed_s();
/* 0x00 */ cXyz field_0x00[15]; /* 0x00 */ cXyz field_0x00[15];
/* 0xB4 */ f32 field_0xb4; /* 0xB4 */ f32 field_0xb4;
/* 0xB8 */ f32 field_0xb8; /* 0xB8 */ f32 field_0xb8;
@@ -20,9 +17,6 @@ struct fs_weed_s {
}; };
struct fs_tsubo_s { struct fs_tsubo_s {
/* 8086FE98 */ ~fs_tsubo_s();
/* 8086FED4 */ fs_tsubo_s();
/* 0x00 */ cXyz field_0x00; /* 0x00 */ cXyz field_0x00;
/* 0x0C */ u8 field_0x0c[0x14 - 0x0c]; /* 0x0C */ u8 field_0x0c[0x14 - 0x0c];
/* 0x14 */ J3DModel* field_0x14; /* 0x14 */ J3DModel* field_0x14;
@@ -34,9 +28,6 @@ struct fs_tsubo_s {
}; };
struct fs_rod_s { struct fs_rod_s {
/* 8086FF84 */ ~fs_rod_s();
/* 8086FFC0 */ fs_rod_s();
/* 0x00 */ cXyz field_0x00; /* 0x00 */ cXyz field_0x00;
/* 0x0C */ u8 field_0x0C[0x14 - 0x0C]; /* 0x0C */ u8 field_0x0C[0x14 - 0x0C];
/* 0x14 */ J3DModel* field_0x14; /* 0x14 */ J3DModel* field_0x14;
@@ -49,9 +40,6 @@ struct fs_rod_s {
}; };
struct fs_lure_s { struct fs_lure_s {
/* 8086FFDC */ ~fs_lure_s();
/* 80870018 */ fs_lure_s();
/* 0x00 */ cXyz field_0x00; /* 0x00 */ cXyz field_0x00;
/* 0x0C */ s16 field_0x0c; /* 0x0C */ s16 field_0x0c;
/* 0x0E */ s16 field_0x0e; /* 0x0E */ s16 field_0x0e;
@@ -72,9 +60,6 @@ struct fs_lure_s {
}; };
struct fs_koro2_s { struct fs_koro2_s {
/* 8086FD78 */ ~fs_koro2_s();
/* 8086FDB4 */ fs_koro2_s();
/* 0x00 */ J3DModel* mpModel; /* 0x00 */ J3DModel* mpModel;
/* 0x04 */ Mtx field_0x04; /* 0x04 */ Mtx field_0x04;
/* 0x34 */ s8 field_0x34; /* 0x34 */ s8 field_0x34;
+1 -1
View File
@@ -1112,7 +1112,7 @@ public:
struct daNpcF_anmPlayData { struct daNpcF_anmPlayData {
u16 idx; u16 idx;
f32 morf; f32 morf;
s32 numLoops; int numLoops;
}; };
enum AnmFlags { enum AnmFlags {
+1 -1
View File
@@ -195,7 +195,7 @@ public:
return true; return true;
} }
void doNormalAction() { void doNormalAction(int) {
mOrderEvtNo = 0; mOrderEvtNo = 0;
if (mpNextActionFn != NULL) { if (mpNextActionFn != NULL) {
if (mpNextActionFn == mpActionFn) { if (mpNextActionFn == mpActionFn) {
+1 -1
View File
@@ -244,7 +244,7 @@ public:
break; break;
default: default:
OS_REPORT("%s: Line.%d arg=%d\n", "d_a_passer_mng.cpp", 1049, param_1); OS_REPORT("%s: Line.%d arg=%d\n", "d_a_passer_mng.cpp", 1049, param_1);
JUT_PANIC(1050, 0); JUT_ASSERT(1050, FALSE);
break; break;
} }
return paramLow << 8; return paramLow << 8;
+1
View File
@@ -273,6 +273,7 @@ public:
class dEvDtFlag_c { class dEvDtFlag_c {
public: public:
dEvDtFlag_c() {} dEvDtFlag_c() {}
~dEvDtFlag_c() {}
BOOL flagCheck(int flag); BOOL flagCheck(int flag);
BOOL flagSet(int flag); BOOL flagSet(int flag);
BOOL flagMaxCheck(int flag); BOOL flagMaxCheck(int flag);
+1
View File
@@ -10,6 +10,7 @@ class fopAc_ac_c;
class dEvent_exception_c { class dEvent_exception_c {
public: public:
dEvent_exception_c() { mEventInfoIdx = -1; } dEvent_exception_c() { mEventInfoIdx = -1; }
~dEvent_exception_c() {}
void init(); void init();
int setStartDemo(int mapToolID); int setStartDemo(int mapToolID);
const char* getEventName(); const char* getEventName();
+1 -4
View File
@@ -831,10 +831,7 @@ public:
/* 0x2DB */ u8 door_light_influence_ratio; /* 0x2DB */ u8 door_light_influence_ratio;
/* 0x2DC */ s16 unk_light_influence_ratio; /* 0x2DC */ s16 unk_light_influence_ratio;
/* 0x2DE */ u8 fish_pond_colreg_adjust_ON; /* 0x2DE */ u8 fish_pond_colreg_adjust_ON;
/* 0x2E0 */ s16 fish_pond_colreg_c0_R; /* 0x2E0 */ GXColorS10 fish_pond_colreg_c0;
/* 0x2E2 */ s16 fish_pond_colreg_c0_G;
/* 0x2E4 */ s16 fish_pond_colreg_c0_B;
/* 0x2E6 */ u8 field_0x2E6[0x2E8 - 0x2E6];
/* 0x2E8 */ u8 water_mud_adjust_ON; /* 0x2E8 */ u8 water_mud_adjust_ON;
/* 0x2EA */ s16 field_0x2ea; /* 0x2EA */ s16 field_0x2ea;
/* 0x2EC */ s16 field_0x2ec; /* 0x2EC */ s16 field_0x2ec;
+2 -2
View File
@@ -180,7 +180,7 @@ public:
void setArchiveName(char* name) { mArchiveName = name; } void setArchiveName(char* name) { mArchiveName = name; }
u8 getMapToolId() { return mMapToolId; } u8 getMapToolId() { return mMapToolId; }
s16 getEventId() { return mEventId; } s16 getEventId() { return mEventId; }
s16 getIdx() { return mIndex; } s16 getIdx() { return (s8)mIndex; }
void setIdx(u8 i_idx) { mIndex = i_idx; } void setIdx(u8 i_idx) { mIndex = i_idx; }
char* getArchiveName() { return mArchiveName; } char* getArchiveName() { return mArchiveName; }
BOOL chkCondition(u16 condition) { return (mCondition & condition) == condition; } BOOL chkCondition(u16 condition) { return (mCondition & condition) == condition; }
@@ -195,7 +195,7 @@ public:
/* 0x06 */ u16 mCondition; /* 0x06 */ u16 mCondition;
/* 0x08 */ s16 mEventId; /* 0x08 */ s16 mEventId;
/* 0x0A */ u8 mMapToolId; /* 0x0A */ u8 mMapToolId;
/* 0x0B */ s8 mIndex; /* 0x0B */ u8 mIndex;
/* 0x0C */ char* mArchiveName; /* 0x0C */ char* mArchiveName;
/* 0x10 */ u8 field_0x10; /* 0x10 */ u8 field_0x10;
/* 0x14 */ void (*field_0x14)(void*); /* 0x14 */ void (*field_0x14)(void*);
+1 -1
View File
@@ -1661,7 +1661,7 @@ int daAlink_c::procCutTurnInit(int param_0, int param_1) {
if (param_0) { if (param_0) {
var_f31 = cutData->mRightTurnInputStartFrame; var_f31 = cutData->mRightTurnInputStartFrame;
} else { } else {
var_f31 = cutData->mRightTurnAnm.mStartFrame; var_f31 = anm_data->mStartFrame;
} }
field_0x3484 = cutData->mRightAttackStartFrame; field_0x3484 = cutData->mRightAttackStartFrame;
+6 -3
View File
@@ -1303,7 +1303,7 @@ void daB_DS_c::executeOpeningDemo() {
mMode++; mMode++;
} }
break; break;
case 2: case 2: {
f32 calc_center = cLib_addCalcPos(&mCameraCenter, mOpCenterDt[1], 0.3f, 2.0f, 1.0f); f32 calc_center = cLib_addCalcPos(&mCameraCenter, mOpCenterDt[1], 0.3f, 2.0f, 1.0f);
f32 calc_eye = cLib_addCalcPos(&mCameraEye, mOpEyeDt[1], 0.3f, 2.0f, 1.0f); f32 calc_eye = cLib_addCalcPos(&mCameraEye, mOpEyeDt[1], 0.3f, 2.0f, 1.0f);
if (calc_center > 2.0f || calc_eye > 2.0f || cLib_calcTimer(&mModeTimer) != 0) { if (calc_center > 2.0f || calc_eye > 2.0f || cLib_calcTimer(&mModeTimer) != 0) {
@@ -1323,6 +1323,7 @@ void daB_DS_c::executeOpeningDemo() {
fopAcM_OffStatus(this, 0x4000); fopAcM_OffStatus(this, 0x4000);
mMode++; mMode++;
// fallthrough // fallthrough
}
case 3: case 3:
mPedestalFallTimer = l_HIO.mPedestalFallTime; mPedestalFallTimer = l_HIO.mPedestalFallTime;
@@ -1519,7 +1520,7 @@ void daB_DS_c::executeOpeningDemo() {
dComIfGp_getVibration().StartShock(4, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); dComIfGp_getVibration().StartShock(4, 0x1f, cXyz(0.0f, 1.0f, 0.0f));
mMode++; mMode++;
// fallthrough // fallthrough
case 26: case 26: {
if (!field_0x85e && mpZantMorf->isStop()) { if (!field_0x85e && mpZantMorf->isStop()) {
mpZantMorf->setAnm(static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("B_DS", 67)), mpZantMorf->setAnm(static_cast<J3DAnmTransform*>(dComIfG_getObjectRes("B_DS", 67)),
J3DFrameCtrl::EMode_LOOP, 1.0f, 1.0f, 0.0f, -1.0f); J3DFrameCtrl::EMode_LOOP, 1.0f, 1.0f, 0.0f, -1.0f);
@@ -1562,6 +1563,7 @@ void daB_DS_c::executeOpeningDemo() {
mMode = 30; mMode = 30;
field_0x85e = false; field_0x85e = false;
// fallthrough // fallthrough
}
case 30: case 30:
mCameraCenter.set(mOpCenterDt[12]); mCameraCenter.set(mOpCenterDt[12]);
mCameraEye.set(mOpEyeDt[12]); mCameraEye.set(mOpEyeDt[12]);
@@ -2325,7 +2327,7 @@ void daB_DS_c::executeDamage() {
mMode = 100; mMode = 100;
mSound.startCreatureSound(Z2SE_EN_DS_MDEMO_FALL, 0, -1); mSound.startCreatureSound(Z2SE_EN_DS_MDEMO_FALL, 0, -1);
// fallthrough // fallthrough
case 100: case 100: {
gravity = -0.2f; gravity = -0.2f;
if (current.pos.y > -1600.0f) { if (current.pos.y > -1600.0f) {
if (current.pos.y <= -300.0f) { if (current.pos.y <= -300.0f) {
@@ -2346,6 +2348,7 @@ void daB_DS_c::executeDamage() {
&p2_angle, NULL, 0xff); &p2_angle, NULL, 0xff);
mMode = 101; mMode = 101;
// fallthrough // fallthrough
}
case 101: case 101:
cLib_addCalc2(&mCameraCenter.y, down_center_dt[4].y, 0.7f, 10.0f); cLib_addCalc2(&mCameraCenter.y, down_center_dt[4].y, 0.7f, 10.0f);
cLib_addCalc2(&mCameraEye.y, down_eye_dt[4].y, 0.7f, 10.0f); cLib_addCalc2(&mCameraEye.y, down_eye_dt[4].y, 0.7f, 10.0f);
-2
View File
@@ -444,7 +444,6 @@ void daBalloon2D_c::setComboAlpha() {
} }
/* 80654730-80654E8C 001350 075C+00 1/1 0/0 0/0 .text drawAddScore__13daBalloon2D_cFv */ /* 80654730-80654E8C 001350 075C+00 1/1 0/0 0/0 .text drawAddScore__13daBalloon2D_cFv */
// NONMATCHING - field_0x0.x, regalloc
void daBalloon2D_c::drawAddScore() { void daBalloon2D_c::drawAddScore() {
for (s32 i = 19; i >= 0; i--) { for (s32 i = 19; i >= 0; i--) {
if (field_0x5f8[i].field_0xe != 0) { if (field_0x5f8[i].field_0xe != 0) {
@@ -591,7 +590,6 @@ void daBalloon2D_HIO_c::resetAddScoreSetFlag() {
} }
/* 80655250-80655304 001E70 00B4+00 1/0 0/0 0/0 .text daBalloon2D_create__FP13daBalloon2D_c */ /* 80655250-80655304 001E70 00B4+00 1/0 0/0 0/0 .text daBalloon2D_create__FP13daBalloon2D_c */
// NONMATCHING - vtable
static int daBalloon2D_create(daBalloon2D_c* i_this) { static int daBalloon2D_create(daBalloon2D_c* i_this) {
fopAcM_ct(i_this, daBalloon2D_c); fopAcM_ct(i_this, daBalloon2D_c);
return i_this->create(); return i_this->create();
+7
View File
@@ -408,6 +408,13 @@ int daBg_c::draw() {
break; break;
} }
#ifdef DEBUG
s16 sp56 = 0xFF;
if (g_kankyoHIO.navy.fish_pond_colreg_adjust_ON) {
sp50 = g_kankyoHIO.navy.fish_pond_colreg_c0;
}
#endif
f32 var_f31 = bgPart->tevstr->AmbCol.r / 10.0f; f32 var_f31 = bgPart->tevstr->AmbCol.r / 10.0f;
var_f31 *= var_f31; var_f31 *= var_f31;
if (var_f31 > 1.0f) { if (var_f31 > 1.0f) {
+4 -5
View File
@@ -131,7 +131,6 @@ u8* daBgObj_c::spec_data_c::initFarInfoBlock(u8* i_dataPtr) {
/* 80459904-80459B64 000324 0260+00 1/1 0/0 1/1 .text Set__Q29daBgObj_c11spec_data_cFPv /* 80459904-80459B64 000324 0260+00 1/1 0/0 1/1 .text Set__Q29daBgObj_c11spec_data_cFPv
*/ */
// NONMATCHING - close-ish
bool daBgObj_c::spec_data_c::Set(void* i_ptr) { bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
JUT_ASSERT(496, i_ptr != NULL); JUT_ASSERT(496, i_ptr != NULL);
@@ -160,7 +159,7 @@ bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
default: default:
// Invalid data block type // Invalid data block type
OS_REPORT_ERROR("データブロックタイプが不正です<%d>\n", block_type); OS_REPORT_ERROR("データブロックタイプが不正です<%d>\n", block_type);
JUT_PANIC(527, "0"); JUT_ASSERT(527, FALSE);
} }
if (block_type == 0) { if (block_type == 0) {
@@ -201,7 +200,7 @@ bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
default: default:
// Invalid data block type // Invalid data block type
OS_REPORT_ERROR("データブロックタイプが不正です<%d>\n", block_type); OS_REPORT_ERROR("データブロックタイプが不正です<%d>\n", block_type);
JUT_PANIC(570, "0"); JUT_ASSERT(570, FALSE);
} }
if (block_type == 0) { if (block_type == 0) {
@@ -242,7 +241,7 @@ bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
default: default:
// "Data Block type invalid<%d>\n" // "Data Block type invalid<%d>\n"
OSReport_Error("データブロックタイプが不正です<%d>\n", block_type); OSReport_Error("データブロックタイプが不正です<%d>\n", block_type);
JUT_PANIC(619, "0"); JUT_ASSERT(619, FALSE);
break; break;
} }
@@ -980,7 +979,7 @@ void daBgObj_c::setParticle() {
default: default:
// Multi MoveBG: Particle model number is invalid <%d> // Multi MoveBG: Particle model number is invalid <%d>
OS_REPORT_ERROR("マルチMoveBG:パーティクルモデル番号が不正<%d>\n", modelNumber); OS_REPORT_ERROR("マルチMoveBG:パーティクルモデル番号が不正<%d>\n", modelNumber);
JUT_PANIC(1689, "0"); JUT_ASSERT(1689, FALSE);
break; break;
} }
JPABaseEmitter* emitter = dComIfGp_particle_set( JPABaseEmitter* emitter = dComIfGp_particle_set(
+2 -3
View File
@@ -932,7 +932,6 @@ void daBoomerang_c::setEffect() {
} }
/* 804A0874-804A0F0C 002834 0698+00 2/0 0/0 0/0 .text procWait__13daBoomerang_cFv */ /* 804A0874-804A0F0C 002834 0698+00 2/0 0/0 0/0 .text procWait__13daBoomerang_cFv */
// NONMATCHING - small regalloc
int daBoomerang_c::procWait() { int daBoomerang_c::procWait() {
daAlink_c* player = daAlink_getAlinkActorClass(); daAlink_c* player = daAlink_getAlinkActorClass();
speedF = 0.0f; speedF = 0.0f;
@@ -973,7 +972,7 @@ int daBoomerang_c::procWait() {
offStateFlg0(FLG0_10); offStateFlg0(FLG0_10);
} }
current.angle.y += 0x1830; current.angle.y += (s16)0x1830;
shape_angle.x = current.angle.x; shape_angle.x = current.angle.x;
shape_angle.y = current.angle.y; shape_angle.y = current.angle.y;
shape_angle.z = 0x1000; shape_angle.z = 0x1000;
@@ -993,7 +992,7 @@ int daBoomerang_c::procWait() {
procMove(); procMove();
} else if (dCam_getBody()->Mode() != 8) { } else if (dCam_getBody()->Mode() != 8) {
if (dComIfGp_checkPlayerStatus0(0, 0x80000) && player->getAtnActor() != NULL && m_lockCnt < BOOMERANG_LOCK_MAX) { if (dComIfGp_checkPlayerStatus0(0, 0x80000) && player->getAtnActor() != NULL && m_lockCnt < BOOMERANG_LOCK_MAX) {
fpc_ProcID atn_actor_id = fopAcM_GetID(player->getAtnActor()); fpc_ProcID atn_actor_id = (fpc_ProcID)fopAcM_GetID(player->getAtnActor());
int var_r27 = 0; int var_r27 = 0;
while (var_r27 < m_lockCnt) { while (var_r27 < m_lockCnt) {

Some files were not shown because too many files have changed in this diff Show More