mirror of
https://github.com/zeldaret/st
synced 2026-08-05 09:34:10 -04:00
Decompile overlay 1 (Part 8) (#108)
* UnkStruct_027e09b4_001 OK * UnkStruct_027e09ac_001 OK * UnkStruct_027e0cec_001 OK * SysNew OK * UnkStruct_027e0cec_18_001 OK * UnkStruct_027e0ce0_34_001 OK * UnkStruct_027e0d00_001 OK * PassengerManager_001 OK * UnkStruct_027e0cf8_08_00_001 OK * UnkStruct_ov020_020e8544_001 OK * code_020bfdd0 OK and code_020bfeec OK * code_020c099c OK
This commit is contained in:
@@ -1,49 +1,37 @@
|
||||
#include "MainGame/PassengerManager.hpp"
|
||||
#include "Unknown/UnkStruct_02049bac.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b8.hpp"
|
||||
|
||||
inline bool Test(s32 val) {
|
||||
bool ret = false;
|
||||
extern "C" bool func_ov000_0205c9d0(unk32 stationSceneIdx);
|
||||
|
||||
if (val > 18 || val >= 16) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline bool Test2(s32 val) {
|
||||
bool ret = true;
|
||||
|
||||
if (val != 15 && !Test(val)) {
|
||||
ret = false;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline bool Test3(s32 val) {
|
||||
bool ret = true;
|
||||
|
||||
if (!Test2(val)) {
|
||||
if (*((volatile unk32 *) &data_027e09a4->mUnk_00.sceneIndex) != 36) {
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// https://decomp.me/scratch/svwnb
|
||||
bool PassengerManager::func_ov001_020bf870() {
|
||||
s32 sceneIndex = data_027e09a4->mUnk_00.sceneIndex;
|
||||
bool ret = true;
|
||||
s32 *pSceneIndex = &data_027e09a4->mUnk_00.sceneIndex;
|
||||
|
||||
if (!Test3(sceneIndex)) {
|
||||
if (*((volatile unk32 *) &data_027e09a4->mUnk_00.sceneIndex) != 37) {
|
||||
ret = false;
|
||||
bool var_r0 = true;
|
||||
bool var_r3 = true;
|
||||
bool var_r4 = true;
|
||||
|
||||
if (data_027e09a4->mUnk_00.sceneIndex != SceneIndex_t_dark) {
|
||||
bool var_r5 = false;
|
||||
|
||||
if (data_027e09a4->IsDarkRealm()) {
|
||||
var_r5 = true;
|
||||
}
|
||||
|
||||
if (!var_r5) {
|
||||
var_r4 = false;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
if (!var_r4 && *pSceneIndex != SceneIndex_b_last1) {
|
||||
var_r3 = false;
|
||||
}
|
||||
|
||||
if (!var_r3 && *pSceneIndex != SceneIndex_b_last2) {
|
||||
var_r0 = false;
|
||||
}
|
||||
|
||||
return var_r0;
|
||||
}
|
||||
|
||||
PassengerManager::PassengerManager() {
|
||||
@@ -65,15 +53,110 @@ void PassengerManager::func_ov001_020bf8e4() {
|
||||
|
||||
void PassengerManager::func_ov001_020bf90c() {}
|
||||
|
||||
void PassengerManager::func_ov001_020bf910() {}
|
||||
void PassengerManager::func_ov001_020bf910() {
|
||||
union Pair {
|
||||
struct {
|
||||
s32 a;
|
||||
s32 b;
|
||||
};
|
||||
s32 data[2];
|
||||
};
|
||||
|
||||
struct LocalStack {
|
||||
Pair sp14[20];
|
||||
Pair *spB4;
|
||||
} stack;
|
||||
|
||||
int spC_10[2];
|
||||
Date sp4[4];
|
||||
const s16 *new_var7;
|
||||
s32 temp_r0;
|
||||
s32 temp_r1;
|
||||
s32 temp_r4;
|
||||
bool temp_r5;
|
||||
s32 var_r2;
|
||||
Pair(*new_var2)[20];
|
||||
bool var_r6;
|
||||
s32 var_r7;
|
||||
Date temp_r2;
|
||||
Pair(*new_var)[20];
|
||||
|
||||
temp_r4 = this->IsDateUnset();
|
||||
temp_r5 = func_ov000_0205c9d0(SceneIndex_f_flame5);
|
||||
|
||||
var_r6 = true;
|
||||
if (data_027e09b8->HasAdventureFlag(AdventureFlag_CompletedSnowRestorationSong)) {
|
||||
if (this->GetActorId() != ActorId_OLDS) {
|
||||
sp4[1] = this->GetDate();
|
||||
sp4[3].data = sp4[1].data;
|
||||
|
||||
if (sp4[1] != this->mDate) {
|
||||
var_r6 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (var_r6) {
|
||||
this->func_ov024_020d4554();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!temp_r4 && !this->func_ov001_020bfa1c()) {
|
||||
this->func_ov024_020d4554();
|
||||
return;
|
||||
}
|
||||
|
||||
new_var7 = data_ov024_020d7598;
|
||||
stack.spB4 = stack.sp14;
|
||||
|
||||
for (var_r7 = 0; var_r7 < 5; var_r7++) {
|
||||
for (var_r2 = 0; var_r2 < 5; var_r2++) {
|
||||
if (temp_r4 && (new_var7[var_r7] != 0x29)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (new_var7[var_r7] == new_var7[var_r2]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!temp_r5 && (new_var7[var_r7] == 0x2E || new_var7[var_r2] == 0x2E)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (new_var7[var_r7] == 0x2E && new_var7[var_r2] == 0x29) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (new_var7[var_r7] == 0x29 && new_var7[var_r2] == 0x2E) {
|
||||
continue;
|
||||
}
|
||||
|
||||
spC_10[0] = new_var7[var_r7];
|
||||
spC_10[1] = new_var7[var_r2];
|
||||
|
||||
if (stack.spB4 != NULL) {
|
||||
stack.spB4->data = spC_10;
|
||||
}
|
||||
|
||||
stack.spB4++;
|
||||
}
|
||||
}
|
||||
|
||||
temp_r1 = stack.spB4 - stack.sp14;
|
||||
sp4[0].data[0] = this->GetDate();
|
||||
sp4[2].data = sp4[0].data;
|
||||
temp_r0 = this->GetRandomIndex(temp_r1, sp4[2].data[0]);
|
||||
|
||||
new_var2 = &stack.sp14;
|
||||
this->mUnk_2C = (*new_var2)[temp_r0].a;
|
||||
this->mUnk_30 = (*(new_var = &stack.sp14))[temp_r0].b;
|
||||
}
|
||||
|
||||
// non-matching
|
||||
bool PassengerManager::func_ov001_020bfa1c() {
|
||||
volatile u16 date[2];
|
||||
u16 date2;
|
||||
date[1] = date[0] = this->GetDate();
|
||||
|
||||
return !((date2 << 0x1B) & 1);
|
||||
Date date;
|
||||
s16 result = this->GetDate();
|
||||
date = *(u16 *) &result;
|
||||
return !(date.day & 1);
|
||||
}
|
||||
|
||||
DECL_INSTANCE(PassengerManager, gpPassengerManager);
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a8.hpp"
|
||||
#include "Unknown/UnkStruct_027e09ac.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b0.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b4.hpp"
|
||||
#include "Unknown/UnkStruct_027e09bc.hpp"
|
||||
|
||||
#include <nitro/g3.h>
|
||||
#include <nitro/gx.h>
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" void func_ov000_02072344(u16 *, UnkStruct_027e09ac_14 *);
|
||||
extern "C" void func_02024df0(u16 *);
|
||||
|
||||
UnkStruct_027e09ac *UnkStruct_027e09ac::Create() {
|
||||
return new(HeapIndex_1) UnkStruct_027e09ac();
|
||||
}
|
||||
|
||||
UnkStruct_027e09ac::UnkStruct_027e09ac() {
|
||||
this->mUnk_14C = 0;
|
||||
this->mUnk_14E = 0;
|
||||
this->mUnk_150 = -1;
|
||||
this->mUnk_154 = 0;
|
||||
this->mUnk_156 = false;
|
||||
this->mUnk_014.func_ov000_02071f98();
|
||||
this->mUnk_0E4.func_ov000_02071f98();
|
||||
|
||||
UnkStruct_027e09b0::Create();
|
||||
UnkStruct_027e09b4::Create();
|
||||
|
||||
G3X_Unk1(1);
|
||||
|
||||
u16 auStack_50[32];
|
||||
func_ov000_02072344(auStack_50, &this->mUnk_014);
|
||||
func_02024df0(auStack_50);
|
||||
|
||||
if (data_027e09bc != NULL && data_027e09bc != NULL) {
|
||||
UnkStruct_027e09a8::Create();
|
||||
}
|
||||
|
||||
MI_CpuFill16(0x190A, &this->mUnk_000.mUnk_04, sizeof(this->mUnk_000.mUnk_04));
|
||||
}
|
||||
|
||||
UnkStruct_027e09ac::~UnkStruct_027e09ac() {
|
||||
UnkStruct_027e09a8::Destroy();
|
||||
UnkStruct_027e09b4::Destroy();
|
||||
UnkStruct_027e09b0::Destroy();
|
||||
G3X_Unk2(1);
|
||||
}
|
||||
|
||||
void UnkStruct_027e09ac::func_ov001_020bebb8() {
|
||||
UnkStruct_StackTitleScreen auStack_28("Environment/tex.bin", 0x01);
|
||||
auStack_28.func_ov000_02059270(0x00, "shadow", 0x192F0000);
|
||||
auStack_28.func_ov000_02059270(0x01, "shadow2", 0x192F0000);
|
||||
auStack_28.func_ov000_02059270(0x02, "wipeA", 0x39BF0000);
|
||||
|
||||
switch ((s32) data_027e09a4->CurrentSceneIndex()) {
|
||||
case SceneIndex_d_main:
|
||||
case SceneIndex_f_flame4:
|
||||
case SceneIndex_f_kakushi1:
|
||||
case SceneIndex_f_kakushi4:
|
||||
auStack_28.func_ov000_02059270(0x03, "light", 0x25BF0000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (data_027e09a4->IsLand()) {
|
||||
auStack_28.func_ov000_02059270(0x04, "srod_tex", 0x389F0000);
|
||||
}
|
||||
|
||||
this->func_ov000_02072b08(0x00, 0x00);
|
||||
data_027e09a8->func_ov000_020713bc();
|
||||
data_027e09b4->func_ov001_020bea84();
|
||||
}
|
||||
|
||||
void UnkStruct_027e09ac::func_ov001_020bec8c() {}
|
||||
|
||||
void UnkStruct_027e09a8::Destroy() {
|
||||
if (data_027e09a8 != NULL) {
|
||||
delete data_027e09a8;
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e09b4::Destroy() {
|
||||
if (data_027e09b4 != NULL) {
|
||||
delete data_027e09b4;
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e09b0::Destroy() {
|
||||
if (data_027e09b0 != NULL) {
|
||||
delete data_027e09b0;
|
||||
}
|
||||
}
|
||||
|
||||
DECL_INSTANCE(UnkStruct_027e09ac, data_027e09ac);
|
||||
DECL_INSTANCE_DTOR(UnkStruct_027e09a8, data_027e09a8);
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b4.hpp"
|
||||
|
||||
UnkStruct_027e09b4 *UnkStruct_027e09b4::Create() {
|
||||
return new(HeapIndex_1) UnkStruct_027e09b4();
|
||||
}
|
||||
|
||||
UnkStruct_027e09b4::UnkStruct_027e09b4() {
|
||||
this->mUnk_300 = this;
|
||||
this->mUnk_304 = 0x6000;
|
||||
this->mUnk_308 = 0x019A;
|
||||
this->mUnk_30A = 0x00CD;
|
||||
}
|
||||
|
||||
void UnkStruct_027e09b4::func_ov001_020bea84() {
|
||||
if (data_027e09a4->IsTrain()) {
|
||||
this->mUnk_308 = 0x0052;
|
||||
this->mUnk_30A = 0x0029;
|
||||
this->mUnk_304 = 0x1000;
|
||||
} else {
|
||||
this->mUnk_308 = 0x019A;
|
||||
this->mUnk_30A = 0x00CD;
|
||||
this->mUnk_304 = 0x6000;
|
||||
}
|
||||
}
|
||||
|
||||
DECL_INSTANCE(UnkStruct_027e09b4, data_027e09b4);
|
||||
|
||||
@@ -63,7 +63,7 @@ UnkStruct_027e0ce0::~UnkStruct_027e0ce0() {
|
||||
delete this->mUnk_1C;
|
||||
}
|
||||
|
||||
void UnkStruct_027e0ce0::func_ov001_020bc4d8(InvImportData *pInvData, unk32 param2, unk32 param3) {
|
||||
void UnkStruct_027e0ce0::func_ov001_020bc4d8(InvImportData *pInvData, SaveFile_00000_0000_Data_D8 *param2, unk32 param3) {
|
||||
UnkStruct_027e09bc *ptr = data_027e09bc;
|
||||
UnkStruct_027e0ce0_0C *pList = GetLinkListRef(this->mUnk_0C);
|
||||
ptr->mUnk_48.Prepend(pList);
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
#include "MainGame/CargoManager.hpp"
|
||||
#include "MainGame/PassengerManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e09b8.hpp"
|
||||
#include "Unknown/UnkStruct_027e0ce0.hpp"
|
||||
#include "Unknown/UnkStruct_027e0d00.hpp"
|
||||
|
||||
extern "C" SceneIndex func_ov000_0205c984();
|
||||
extern "C" unk32 func_ov026_020f4c9c(SceneIndex);
|
||||
|
||||
UnkStruct_027e0ce0_34::UnkStruct_027e0ce0_34() {
|
||||
this->mUnk_20 = NULL;
|
||||
this->mUnk_24 = 0x03;
|
||||
this->mUnk_28 = 0x03;
|
||||
this->mUnk_2C = 0x01;
|
||||
this->mSpiritTrackFlags = this->func_ov024_020d3dc0(0x00, 0x01);
|
||||
this->mUnk_34 = 0x04;
|
||||
this->mUnk_E8 = 0x00;
|
||||
this->mUnk_EC = -1;
|
||||
this->mUnk_F0 = 0x00;
|
||||
|
||||
for (int i = 0; i < ARRAY_LEN(this->mUnk_00); i++) {
|
||||
this->mUnk_00[i] = -1;
|
||||
this->mUnk_10[i] = -1;
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < ARRAY_LEN(this->mTrackFlags); i++) {
|
||||
this->mTrackFlags[i] = 0x00;
|
||||
}
|
||||
|
||||
UnkStruct_027e0d00::Create();
|
||||
PassengerManager::Create();
|
||||
CargoManager::Create();
|
||||
}
|
||||
|
||||
UnkStruct_027e0ce0_34::~UnkStruct_027e0ce0_34() {
|
||||
CargoManager::Destroy();
|
||||
PassengerManager::Destroy();
|
||||
UnkStruct_027e0d00::Destroy();
|
||||
}
|
||||
|
||||
void UnkStruct_027e0ce0_34::func_ov001_020bf22c(SaveFile_00000_0000_Data_D8 *param1, unk32 param2) {
|
||||
this->mUnk_2C = param1->func_ov000_020a0cf4();
|
||||
this->mSpiritTrackFlags = param1->spiritTrackFlags;
|
||||
|
||||
for (int i = 0; i < param1->func_ov000_020a0cf4(); i++) {
|
||||
this->mUnk_00[i] = param1->unk_60[i];
|
||||
this->mUnk_10[i] = param1->unk_64[i];
|
||||
}
|
||||
|
||||
gpPassengerManager->func_ov024_020d41bc(¶m1->unk_40);
|
||||
this->mUnk_34 = param1->unk_69;
|
||||
|
||||
for (u32 i = 0; i < ARRAY_LEN(this->mTrackFlags); i++) {
|
||||
this->mTrackFlags[i] = param1->trackFlags[i];
|
||||
}
|
||||
|
||||
gpCargoManager->SetCargo(param1->cargoType, param1->cargoAmount);
|
||||
this->func_ov024_020d3d80(this->func_ov024_020d3d20());
|
||||
this->mUnk_28 = this->mUnk_24;
|
||||
}
|
||||
|
||||
void UnkStruct_027e0ce0_34::func_ov001_020bf2b8(bool param1) {
|
||||
this->func_ov001_020bf3fc();
|
||||
|
||||
if (this->mUnk_2C == 0x02 && data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedTrainCannon)) {
|
||||
this->func_ov024_020d3f8c();
|
||||
}
|
||||
|
||||
if (this->mUnk_2C == 0x03 && data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedTrainWagon)) {
|
||||
this->func_ov024_020d3fc8();
|
||||
}
|
||||
|
||||
data_027e0d00->func_ov001_020bf530();
|
||||
gpPassengerManager->func_ov001_020bf8e4();
|
||||
gpCargoManager->func_ov001_020bf830();
|
||||
|
||||
if (param1) {
|
||||
gpPassengerManager->func_ov024_020d4258();
|
||||
gpCargoManager->func_ov024_020d591c();
|
||||
}
|
||||
|
||||
if (data_027e09a4->IsTrain()) {
|
||||
this->func_ov024_020d3d80(this->func_ov024_020d3d20());
|
||||
|
||||
if (param1) {
|
||||
this->mUnk_28 = this->mUnk_24;
|
||||
}
|
||||
|
||||
SceneIndex sceneIndex = func_ov000_0205c984();
|
||||
this->mUnk_F0 = func_ov026_020f4c9c(sceneIndex);
|
||||
this->mUnk_20 = new(HeapIndex_1) UnkStruct_027e0ce0_34_20();
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e0ce0_34::func_ov001_020bf378() {
|
||||
if (data_027e09a4->IsTrain()) {
|
||||
DELETE(this->mUnk_20);
|
||||
}
|
||||
|
||||
gpPassengerManager->func_ov001_020bf90c();
|
||||
data_027e0d00->func_ov001_020bf568();
|
||||
}
|
||||
|
||||
void UnkStruct_027e0ce0_34::func_ov001_020bf3bc() {
|
||||
if (this->mUnk_20 != NULL) {
|
||||
this->mUnk_20->func_ov026_020eb5b8();
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e0ce0_34::func_ov001_020bf3cc() {
|
||||
if (this->mUnk_20 != NULL) {
|
||||
this->mUnk_20->func_ov026_020eb6a8();
|
||||
}
|
||||
|
||||
if (this->mUnk_2C == 0x02 && data_027e09b8->HasAdventureFlag(AdventureFlag_ObtainedTrainCannon)) {
|
||||
this->func_ov024_020d3f8c();
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e0ce0_34::func_ov001_020bf3fc() {
|
||||
bool isTowerSplit = data_027e09b8->HasAdventureFlag(AdventureFlag_WatchedSpiritTowerSplitCS);
|
||||
|
||||
if (!data_027e09b8->HasAdventureFlag(AdventureFlag_MetAnjeanFirstTime) && isTowerSplit) {
|
||||
this->func_ov024_020d404c();
|
||||
}
|
||||
}
|
||||
|
||||
ARM_BEGIN
|
||||
|
||||
void CargoManager::Destroy() {
|
||||
if (gpCargoManager != NULL) {
|
||||
delete gpCargoManager;
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::Destroy() {
|
||||
if (data_027e0d00 != NULL) {
|
||||
delete data_027e0d00;
|
||||
}
|
||||
}
|
||||
|
||||
void PassengerManager::Destroy() {
|
||||
if (gpPassengerManager != NULL) {
|
||||
delete gpPassengerManager;
|
||||
}
|
||||
}
|
||||
|
||||
ARM_END
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
#include "Cutscene/Cutscene.hpp"
|
||||
#include "System/OverlayManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e0cec.hpp"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
extern "C" BOOL func_02012fa8(const char *);
|
||||
|
||||
DATA_ALIGN_FIX2();
|
||||
|
||||
enum EffectPathIndex_ {
|
||||
EffectPathIndex_Dungeon1 = 0,
|
||||
EffectPathIndex_Field = 1,
|
||||
EffectPathIndex_Dungeon2 = 2,
|
||||
EffectPathIndex_Battle = 3,
|
||||
EffectPathIndex_BossForest = 4,
|
||||
EffectPathIndex_BossSnow = 5,
|
||||
EffectPathIndex_BossWater = 6,
|
||||
EffectPathIndex_BossFlame = 7,
|
||||
EffectPathIndex_BossDesert = 8,
|
||||
EffectPathIndex_BossDeago = 9,
|
||||
EffectPathIndex_BossLast1 = 10,
|
||||
EffectPathIndex_BossLast2 = 11,
|
||||
};
|
||||
|
||||
static const char *data_ov001_020c2f28[] = {
|
||||
"Effect/dungeon.spa", // EffectPathIndex_Dungeon1
|
||||
"Effect/field.spa", // EffectPathIndex_Field
|
||||
"Effect/dungeon.spa", // EffectPathIndex_Dungeon2
|
||||
"Effect/battle.spa", // EffectPathIndex_Battle
|
||||
"Effect/boss_forest.spa", // EffectPathIndex_BossForest
|
||||
"Effect/boss_snow.spa", // EffectPathIndex_BossSnow
|
||||
"Effect/boss_water.spa", // EffectPathIndex_BossWater
|
||||
"Effect/boss_flame.spa", // EffectPathIndex_BossFlame
|
||||
"Effect/boss_desert.spa", // EffectPathIndex_BossDesert
|
||||
"Effect/boss_deago.spa", // EffectPathIndex_BossDeago
|
||||
"Effect/boss_last1.spa", // EffectPathIndex_BossLast1
|
||||
"Effect/boss_last2.spa", // EffectPathIndex_BossLast2
|
||||
};
|
||||
|
||||
UnkStruct_027e0cec *UnkStruct_027e0cec::Create() {
|
||||
data_0204999c.func_ov001_020ba620();
|
||||
return new(HeapIndex_5) UnkStruct_027e0cec();
|
||||
}
|
||||
|
||||
void UnkStruct_027e0cec::func_ov001_020bed34() {
|
||||
data_027e0cec->~UnkStruct_027e0cec();
|
||||
data_0204999c.func_ov001_020ba658();
|
||||
}
|
||||
|
||||
UnkStruct_027e0cec::UnkStruct_027e0cec() :
|
||||
mUnk_00(this),
|
||||
mUnk_20(0) {
|
||||
for (int i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
|
||||
this->mUnk_18[i] = NULL;
|
||||
}
|
||||
|
||||
this->mUnk_20 = 0x00;
|
||||
|
||||
UnkFileSystem2 *pUnkFs2;
|
||||
if (data_027e09a4->IsSceneModeBattle()) {
|
||||
UnkFileSystem2 local_2c(NULL, 0x00);
|
||||
pUnkFs2 = &local_2c;
|
||||
const char *path = "Effect/multiboot.spa";
|
||||
pUnkFs2->vfunc_0C();
|
||||
pUnkFs2->mUnk_04 = path;
|
||||
this->mUnk_18[0] = new(HeapIndex_5) UnkStruct_027e0cec_18(pUnkFs2, true, 0);
|
||||
this->mUnk_20 = 0x02;
|
||||
} else if (data_027e09a4->IsTrain()) {
|
||||
{
|
||||
UnkFileSystem2 local_44(NULL, 0x00);
|
||||
pUnkFs2 = &local_44;
|
||||
const char *path = "Effect/train.spa";
|
||||
pUnkFs2->vfunc_0C();
|
||||
pUnkFs2->mUnk_04 = path;
|
||||
this->mUnk_18[0] = new(HeapIndex_5) UnkStruct_027e0cec_18(pUnkFs2, true, 0);
|
||||
}
|
||||
|
||||
if (gOverlayManager.IsTrainDark()) {
|
||||
UnkFileSystem2 local_5c(NULL, 0x00);
|
||||
pUnkFs2 = &local_5c;
|
||||
const char *path = "Effect/train_dark.spa";
|
||||
pUnkFs2->vfunc_0C();
|
||||
pUnkFs2->mUnk_04 = path;
|
||||
this->mUnk_18[1] = new(HeapIndex_5) UnkStruct_027e0cec_18(pUnkFs2, true, 1);
|
||||
}
|
||||
} else if (data_027e09a4->IsCutscene()) {
|
||||
this->mUnk_20 = 0x01;
|
||||
const char *unk_00 = Cutscene_GetParamEntry(data_027e09a4->CurrentCSIndex())->mUnk_00;
|
||||
|
||||
wchar_t aStack_9c[32];
|
||||
aStack_9c[ARRAY_LEN(aStack_9c) - 1] = L'\0';
|
||||
strncpy((char *) aStack_9c, "Effect/demo_", sizeof(aStack_9c) - 1);
|
||||
|
||||
size_t len1 = strlen((char *) aStack_9c);
|
||||
strncpy((char *) aStack_9c + len1, unk_00, sizeof(aStack_9c) - 1 - len1);
|
||||
|
||||
const char *ext = ".spa";
|
||||
size_t len2 = strlen((char *) aStack_9c);
|
||||
strncpy((char *) aStack_9c + len2, ext, sizeof(aStack_9c) - 1 - len2);
|
||||
|
||||
UnkFileSystem2 local_b4(NULL, 0x00);
|
||||
pUnkFs2 = &local_b4;
|
||||
pUnkFs2->vfunc_0C();
|
||||
pUnkFs2->mUnk_04 = (char *) aStack_9c;
|
||||
|
||||
const char *local_b0 = (char *) aStack_9c;
|
||||
|
||||
if (func_02012fa8(local_b0)) {
|
||||
this->mUnk_18[0] = new(HeapIndex_5) UnkStruct_027e0cec_18(pUnkFs2, true, 0);
|
||||
}
|
||||
} else {
|
||||
const char *iVar4;
|
||||
|
||||
for (int i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
|
||||
switch (i) {
|
||||
case 0: {
|
||||
UnkFileSystem2 local_cc(NULL, 0x00);
|
||||
pUnkFs2 = &local_cc;
|
||||
const char *path = "Effect/land.spa";
|
||||
pUnkFs2->vfunc_0C();
|
||||
pUnkFs2->mUnk_04 = path;
|
||||
this->mUnk_18[i] = new(HeapIndex_5) UnkStruct_027e0cec_18(pUnkFs2, true, i);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
iVar4 = this->func_ov001_020bef98();
|
||||
|
||||
if (iVar4 != NULL) {
|
||||
UnkFileSystem2 local_e4(NULL, 0x00);
|
||||
pUnkFs2 = &local_e4;
|
||||
pUnkFs2->vfunc_0C();
|
||||
pUnkFs2->mUnk_04 = iVar4;
|
||||
this->mUnk_18[i] = new(HeapIndex_5) UnkStruct_027e0cec_18(pUnkFs2, true, i);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data_0204999c.func_ov001_020ba640();
|
||||
}
|
||||
|
||||
const char *UnkStruct_027e0cec::func_ov001_020bef98() {
|
||||
SceneIndex sceneIndex = data_027e09a4->CurrentSceneIndex();
|
||||
if (sceneIndex == SceneIndex_b_last22) {
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossLast2];
|
||||
}
|
||||
|
||||
if (gOverlayManager.IsField()) {
|
||||
return data_ov001_020c2f28[EffectPathIndex_Field];
|
||||
}
|
||||
|
||||
switch (gOverlayManager.mLoadedOverlays[OverlaySlot_8]) {
|
||||
case OverlayIndex_BossForest:
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossForest];
|
||||
case OverlayIndex_BossSnow:
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossSnow];
|
||||
case OverlayIndex_BossWater:
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossWater];
|
||||
case OverlayIndex_BossFlame:
|
||||
if (sceneIndex == SceneIndex_d_flame || sceneIndex == SceneIndex_tekiya03) {
|
||||
return data_ov001_020c2f28[EffectPathIndex_Dungeon2];
|
||||
}
|
||||
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossFlame];
|
||||
case OverlayIndex_BossDesert:
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossDesert];
|
||||
case OverlayIndex_BossDeago:
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossDeago];
|
||||
case OverlayIndex_BossLast1:
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossLast1];
|
||||
case OverlayIndex_BossLast2:
|
||||
return data_ov001_020c2f28[EffectPathIndex_BossLast2];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return data_ov001_020c2f28[2];
|
||||
}
|
||||
|
||||
UnkStruct_027e0cec::~UnkStruct_027e0cec() {}
|
||||
|
||||
void UnkStruct_027e0cec::func_ov001_020bf028() {
|
||||
for (int i = 0; i < ARRAY_LEN(this->mUnk_18); i++) {
|
||||
if (this->mUnk_18[i] != NULL) {
|
||||
this->mUnk_18[i]->func_ov000_020a0460();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ARM_BEGIN
|
||||
|
||||
UnkStruct_027e0cec_00::UnkStruct_027e0cec_00(void *param1) :
|
||||
mUnk_10(param1),
|
||||
mUnk_14(0) {}
|
||||
|
||||
DECL_INSTANCE(UnkStruct_027e0cec, data_027e0cec);
|
||||
|
||||
ARM_END
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#include "Unknown/UnkStruct_0204a110.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a0.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e0cec.hpp"
|
||||
|
||||
#include <nitro/dc.h>
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" void *func_02001308(void *, size_t, u32);
|
||||
extern "C" UnkStruct_027e0cec_18_04 *func_ov000_02054690(void *, unk32, unk32, unk32, unk32, unk32);
|
||||
extern unk32 data_027e0154;
|
||||
|
||||
void *UnkStruct_027e0cec_18::func_ov001_020bf0a0(size_t length) {
|
||||
return func_02001308(data_0204999c.mUnk_00[HeapIndex_5], length, 4);
|
||||
}
|
||||
|
||||
UnkStruct_027e0cec_18::UnkStruct_027e0cec_18(UnkFileSystem1 *param1, bool param2, unk32 param3) :
|
||||
mUnk_04(0),
|
||||
mUnk_08(0) {
|
||||
|
||||
unk32 uVar5;
|
||||
unk32 uVar3;
|
||||
if (data_027e09a4 == NULL) {
|
||||
uVar5 = 0x32;
|
||||
uVar3 = 0x64;
|
||||
} else {
|
||||
SceneIndex sceneIndex = data_027e09a4->CurrentSceneIndex();
|
||||
|
||||
if (param3 == 0) {
|
||||
uVar5 = data_027e09a0->func_ov000_020702a8(sceneIndex)->mUnk_18;
|
||||
uVar3 = data_027e09a0->func_ov000_020702a8(sceneIndex)->mUnk_1A;
|
||||
} else {
|
||||
uVar5 = data_027e09a0->func_ov000_020702a8(sceneIndex)->mUnk_1C;
|
||||
uVar3 = data_027e09a0->func_ov000_020702a8(sceneIndex)->mUnk_1E;
|
||||
}
|
||||
}
|
||||
|
||||
this->mUnk_04 = func_ov000_02054690(UnkStruct_027e0cec_18::func_ov001_020bf0a0, uVar5, uVar3, 0x00, 0x24, 0x3F);
|
||||
this->mUnk_04->mUnk_44 = &data_027e0154;
|
||||
this->mUnk_04->mUnk_3C = 0x8000;
|
||||
|
||||
param1->vfunc_08(0x10);
|
||||
size_t size = param1->mFileSize;
|
||||
DC_FlushAll();
|
||||
|
||||
this->mUnk_04->func_ov000_0205498c(param1->mpFile);
|
||||
this->mUnk_08 = ((SPAHeader *) param1->mpFile)->mUnk_08;
|
||||
this->mUnk_04->func_ov000_02054a78();
|
||||
this->mUnk_04->func_ov000_02054a88();
|
||||
|
||||
if (((SPAHeader *) param1->mpFile)->mUnk_18 < size) {
|
||||
param1->vfunc_10(((SPAHeader *) param1->mpFile)->mUnk_18);
|
||||
size = param1->mFileSize;
|
||||
}
|
||||
|
||||
if (param2) {
|
||||
void *ptr = ::operator new(size, HeapIndex_5);
|
||||
MI_CpuCopy32(param1->mpFile, ptr, size);
|
||||
this->mUnk_04->func_ov000_02054998(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
UnkStruct_027e0cec_18::~UnkStruct_027e0cec_18() {}
|
||||
@@ -0,0 +1,138 @@
|
||||
#include "MainGame/CargoManager.hpp"
|
||||
#include "Unknown/UnkStruct_027e09a4.hpp"
|
||||
#include "Unknown/UnkStruct_027e0ce0.hpp"
|
||||
#include "Unknown/UnkStruct_027e0d00.hpp"
|
||||
|
||||
extern "C" unk32 func_ov000_0205c984();
|
||||
extern "C" void func_ov026_020efc40(unk32 param1);
|
||||
|
||||
UnkStruct_027e0d00::UnkStruct_027e0d00() {
|
||||
this->mUnk_0E0 = NULL;
|
||||
this->mUnk_0F4 = NULL;
|
||||
this->mUnk_0F8 = NULL;
|
||||
this->mUnk_0FC = NULL;
|
||||
this->mUnk_100 = NULL;
|
||||
this->mUnk_104 = false;
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
this->mUnk_000[i] = NULL;
|
||||
this->mUnk_010[i] = NULL;
|
||||
this->mUnk_0A0[i] = NULL;
|
||||
this->mUnk_0E4[i] = NULL;
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
for (int j = 0; j < MAX_TRAIN_SETS; j++) {
|
||||
this->mUnk_020[i][j] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < ARRAY_LEN(this->mUnk_0B0); i++) {
|
||||
this->mUnk_0B0[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
UnkStruct_027e0d00::~UnkStruct_027e0d00() {}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf530() {
|
||||
if (data_027e09a4->IsTrain()) {
|
||||
this->func_ov001_020bf730();
|
||||
|
||||
unk32 uVar2 = func_ov000_0205c984();
|
||||
this->func_ov024_020d4d6c(uVar2);
|
||||
func_ov026_020efc40(uVar2);
|
||||
this->func_ov001_020bf768();
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf568() {
|
||||
if (data_027e09a4->IsTrain()) {
|
||||
this->func_ov001_020bf7b8();
|
||||
this->func_ov024_020d4df8();
|
||||
this->func_ov001_020bf750();
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf590() {
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
unk32 uVar1 = this->func_ov024_020d485c(i, 0);
|
||||
unk32 uVar2 = this->func_ov024_020d485c(i, 1);
|
||||
unk32 uVar3 = this->func_ov024_020d485c(i, 2);
|
||||
|
||||
const u8 *ptr = data_ov024_020d7624.unk_01;
|
||||
this->mUnk_000[i] = new(HeapIndex_1) UnkStruct_027e0d00_00(uVar1, uVar2, uVar3, ptr[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
this->mUnk_010[i] = (UnkStruct_027e0d00_10 *) ::operator new(this->func_ov024_020d485c(i, 3), HeapIndex_1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
this->mUnk_0E4[i] = (UnkStruct_027e0d00_20 *) ::operator new(sizeof(UnkStruct_027e0d00_20), HeapIndex_1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
this->mUnk_0A0[i] = ::operator new(data_ov024_020d766c[i], HeapIndex_1);
|
||||
}
|
||||
|
||||
this->mUnk_0F8 = new(HeapIndex_1) UnkStruct_027e0d00_00(0x00, SUBSCREEN_WIDTH, SUBSCREEN_HEIGHT, 0x00);
|
||||
this->mUnk_0FC = (UnkStruct_027e0d00_FC *) ::operator new(sizeof(UnkStruct_027e0d00_FC), HeapIndex_1);
|
||||
this->mUnk_100 = (MapObjectProfile_Derived5 *) ::operator new(sizeof(MapObjectProfile_Derived5), HeapIndex_1);
|
||||
this->mUnk_104 = true;
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf69c() {
|
||||
this->mUnk_104 = false;
|
||||
DELETE_ARRAY2(this->mUnk_100);
|
||||
DELETE_ARRAY2(this->mUnk_0FC);
|
||||
DELETE(this->mUnk_0F8);
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
DELETE_ARRAY(this->mUnk_0A0[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
DELETE_ARRAY2(this->mUnk_0E4[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
DELETE_ARRAY(this->mUnk_010[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_TRAIN_PARTS; i++) {
|
||||
DELETE(this->mUnk_000[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf730() {
|
||||
this->func_ov001_020bf590();
|
||||
this->func_ov024_020d4a50();
|
||||
this->func_ov024_020d4cc0(gpCargoManager->GetCargo()->GetType());
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf750() {
|
||||
this->func_ov024_020d4d10();
|
||||
this->func_ov024_020d4ab4();
|
||||
this->func_ov001_020bf69c();
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf768() {
|
||||
bool result = data_027e0ce0->mUnk_2C->GetInventory()->HasRecruitUniform();
|
||||
|
||||
bool hasRecruitUniform = false;
|
||||
if (result != true) {
|
||||
hasRecruitUniform = true;
|
||||
}
|
||||
|
||||
this->mUnk_0E0 = new(HeapIndex_1) UnkStruct_027e0d00_E0(hasRecruitUniform);
|
||||
this->mUnk_0E0->func_ov000_020586b4(0x0, 0x00, 0x00, 0x00);
|
||||
this->mUnk_0E0->func_ov026_020fb964();
|
||||
}
|
||||
|
||||
void UnkStruct_027e0d00::func_ov001_020bf7b8() {
|
||||
this->mUnk_0E0->func_ov026_020fba3c();
|
||||
this->mUnk_0E0->func_ov000_020589e4();
|
||||
DELETE(this->mUnk_0E0);
|
||||
}
|
||||
|
||||
DECL_INSTANCE(UnkStruct_027e0d00, data_027e0d00);
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
#include "Game/GameModeBattle.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_ov020_020e8544.hpp"
|
||||
|
||||
#include <dsprot.h>
|
||||
|
||||
void func_ov001_020bfcc0() {
|
||||
BOOL status;
|
||||
|
||||
if (data_ov020_020e8544 == NULL) {
|
||||
status = false;
|
||||
} else {
|
||||
status = true;
|
||||
}
|
||||
|
||||
if (!status) {
|
||||
data_ov020_020e8544 = new(HeapIndex_1) UnkStruct_ov020_020e8544_Derived1();
|
||||
}
|
||||
}
|
||||
|
||||
void func_ov001_020bfcf0() {
|
||||
BOOL status;
|
||||
|
||||
if (data_ov020_020e8544 == NULL) {
|
||||
status = false;
|
||||
} else {
|
||||
status = true;
|
||||
}
|
||||
|
||||
if (!status) {
|
||||
data_ov020_020e8544 = new(HeapIndex_1) UnkStruct_ov020_020e8544_Derived1();
|
||||
}
|
||||
}
|
||||
|
||||
void func_ov001_020bfd20() {
|
||||
BOOL status;
|
||||
|
||||
if (data_ov020_020e8544 == NULL) {
|
||||
status = false;
|
||||
} else {
|
||||
status = true;
|
||||
}
|
||||
|
||||
if (!status) {
|
||||
data_ov020_020e8544 = new(HeapIndex_1) UnkStruct_ov020_020e8544_Derived2();
|
||||
}
|
||||
}
|
||||
|
||||
void func_ov001_020bfd54() {
|
||||
BOOL status;
|
||||
|
||||
if (data_ov020_020e8544 == NULL) {
|
||||
status = false;
|
||||
} else {
|
||||
status = true;
|
||||
}
|
||||
|
||||
if (!status) {
|
||||
data_ov020_020e8544 = new(HeapIndex_1) UnkStruct_ov020_020e8544_Derived1();
|
||||
}
|
||||
}
|
||||
|
||||
void GameModeBattle::func_ov001_020bfd84(unk32 param1) {
|
||||
switch (param1) {
|
||||
case 0:
|
||||
DSProt_DetectEmulator(func_ov001_020bfcc0);
|
||||
DSProt_DetectFlashcart(func_ov001_020bfcf0);
|
||||
DSProt_DetectNotDummy(func_ov001_020bfd20);
|
||||
func_ov001_020bfd54();
|
||||
break;
|
||||
case 1:
|
||||
data_ov020_020e8544 = new(HeapIndex_1) UnkStruct_ov020_020e8544_Derived1();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_ov023_020f1d94.hpp"
|
||||
#include "global.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <dsprot.h>
|
||||
|
||||
void func_ov001_020bfdd0() {
|
||||
if (data_ov001_020c46f4 != NULL) {
|
||||
DELETE(data_ov001_020c46f4);
|
||||
}
|
||||
|
||||
if (data_ov001_020c46f4 == NULL) {
|
||||
data_ov001_020c46f4 = new(HeapIndex_1) UnkStruct_ov001_020c46f4_Derived1();
|
||||
}
|
||||
}
|
||||
|
||||
void func_ov001_020bfe0c() {
|
||||
if (data_ov001_020c46f4 != NULL) {
|
||||
DELETE(data_ov001_020c46f4);
|
||||
}
|
||||
|
||||
if (data_ov001_020c46f4 == NULL) {
|
||||
data_ov001_020c46f4 = new(HeapIndex_1) UnkStruct_ov001_020c46f4_Derived1();
|
||||
}
|
||||
}
|
||||
|
||||
void func_ov001_020bfe48() {
|
||||
if (data_ov001_020c46f4 != NULL) {
|
||||
DELETE(data_ov001_020c46f4);
|
||||
}
|
||||
|
||||
if (data_ov001_020c46f4 == NULL) {
|
||||
data_ov001_020c46f4 = new(HeapIndex_1) UnkStruct_ov001_020c46f4_Derived1();
|
||||
}
|
||||
}
|
||||
|
||||
void func_ov001_020bfe84() {
|
||||
if (data_ov001_020c46f4 == NULL) {
|
||||
data_ov001_020c46f4 = new(HeapIndex_1) UnkStruct_ov001_020c46f4_Derived2();
|
||||
}
|
||||
}
|
||||
|
||||
void UnkStruct_ov023_020f1d94::func_ov001_020bfeb0() {
|
||||
DSProt_DetectDummy(func_ov001_020bfdd0);
|
||||
|
||||
if (!DSProt_DetectNotEmulator(func_ov001_020bfe84)) {
|
||||
func_ov001_020bfe0c();
|
||||
}
|
||||
|
||||
DSProt_DetectFlashcart(func_ov001_020bfe48);
|
||||
this->mUnk_04 = data_ov001_020c46f4;
|
||||
data_ov001_020c46f4 = NULL;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#include "Actor/ActorUnkLBCK.hpp"
|
||||
#include "Actor/Actor_Derived1.hpp"
|
||||
|
||||
#include <dsprot.h>
|
||||
|
||||
extern ActorUnkLBCK *data_ov001_020c46f8;
|
||||
|
||||
void func_ov001_020bfeec(void) {
|
||||
data_ov001_020c46f8->func_ov000_020984d0();
|
||||
}
|
||||
|
||||
void func_ov001_020bfefc(void) {
|
||||
data_ov001_020c46f8->func_ov000_020984d0();
|
||||
}
|
||||
|
||||
void func_ov001_020bff0c(void) {
|
||||
data_ov001_020c46f8->func_ov001_020bff2c();
|
||||
}
|
||||
|
||||
void func_ov001_020bff1c(void) {
|
||||
data_ov001_020c46f8->func_ov000_020984d0();
|
||||
}
|
||||
|
||||
void Actor_Derived1::func_ov001_020bff2c(void) {
|
||||
this->Actor_Derived1::vfunc_1C();
|
||||
}
|
||||
|
||||
void ActorUnkLBCK::func_ov001_020bff34() {
|
||||
data_ov001_020c46f8 = this;
|
||||
|
||||
DSProt_DetectFlashcart(func_ov001_020bfeec);
|
||||
|
||||
if (DSProt_DetectNotEmulator(func_ov001_020bff0c) != true) {
|
||||
func_ov001_020bfefc();
|
||||
}
|
||||
|
||||
DSProt_DetectDummy(func_ov001_020bff1c);
|
||||
data_ov001_020c46f8 = NULL;
|
||||
this->func_ov062_02159618();
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "Game/GameModeDownloadPlay.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
|
||||
#include <dsprot.h>
|
||||
|
||||
void func_ov001_020c099c(void) {
|
||||
data_ov001_020c46fc = new(HeapIndex_1) UnkStruct_ov001_020c46fc();
|
||||
}
|
||||
|
||||
void func_ov001_020c09c0(void) {
|
||||
DELETE(data_ov001_020c46fc);
|
||||
}
|
||||
|
||||
void GameModeDownloadPlay::func_ov001_020c09dc() {
|
||||
DSProt_DetectNotFlashcart(func_ov001_020c099c);
|
||||
DSProt_DetectEmulator(func_ov001_020c09c0);
|
||||
|
||||
if (DSProt_DetectDummy(NULL)) {
|
||||
DELETE(data_ov001_020c46fc);
|
||||
}
|
||||
|
||||
this->mUnk_48 = data_ov001_020c46fc;
|
||||
data_ov001_020c46fc = NULL;
|
||||
}
|
||||
|
||||
@@ -157,13 +157,13 @@ void UnkSubStruct9::func_ov019_020cbc0c() {
|
||||
}
|
||||
|
||||
unk32 uVar10 = 0;
|
||||
unk32 uVar6 = (pSlot->mInfoData[0].inventory.unk_80 << 4) >> 26;
|
||||
unk32 uVar6 = (pSlot->mInfoData[0].inventory.data.unk_00 << 4) >> 26;
|
||||
|
||||
if (uVar6 == 0) {
|
||||
uVar6 = 0x40;
|
||||
}
|
||||
|
||||
unk32 uVar13 = (pSlot->mInfoData[0].inventory.unk_80 << 10) >> 26;
|
||||
unk32 uVar13 = (pSlot->mInfoData[0].inventory.data.unk_00 << 10) >> 26;
|
||||
if (uVar13 == 0) {
|
||||
uVar13 = uVar6;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "MainGame/MiscAdvManager.hpp"
|
||||
#include "Item/ItemManager.hpp"
|
||||
#include "System/SysNew.hpp"
|
||||
#include "Unknown/UnkStruct_02049bac.hpp"
|
||||
|
||||
#include <nitro/mi.h>
|
||||
|
||||
extern "C" u8 func_ov000_020a9a50();
|
||||
@@ -21,7 +21,7 @@ MiscAdvManager::MiscAdvManager() {
|
||||
MiscAdvManager::~MiscAdvManager() {}
|
||||
|
||||
void MiscAdvManager::func_ov024_020d6310(MiscAdvManager *pSrc) {
|
||||
u16 local_10;
|
||||
Date local_10;
|
||||
|
||||
MI_CpuCopyFast(pSrc, this, sizeof(MiscAdvManager));
|
||||
data_02049bac.func_02014a34(&local_10);
|
||||
@@ -129,16 +129,18 @@ void MiscAdvManager::func_ov024_020d64b4(s8 param1, unk32 param2, const u16 *par
|
||||
}
|
||||
}
|
||||
|
||||
u16 local_18;
|
||||
Date local_18;
|
||||
data_02049bac.func_02014a34(&local_18);
|
||||
|
||||
this->mObtainedStamps[param2] = param1;
|
||||
|
||||
u16 new_var2 = this->mStampDates[param2];
|
||||
u16 temp = local_18;
|
||||
this->mStampDates[param2] = temp;
|
||||
this->mStampDates[param2] = new_var2;
|
||||
this->mStampDates[param2] = temp;
|
||||
Date new_var2;
|
||||
Date temp;
|
||||
new_var2.data[0] = this->mStampDates[param2].data[0];
|
||||
temp.data[0] = local_18.data[0];
|
||||
this->mStampDates[param2].data[0] = temp.data[0];
|
||||
this->mStampDates[param2].data[0] = new_var2.data[0];
|
||||
this->mStampDates[param2].data[0] = temp.data[0];
|
||||
|
||||
u16 new_var3 = this->mStampPos[param2];
|
||||
u16 temp2 = *param3;
|
||||
@@ -188,7 +190,7 @@ void MiscAdvManager::PostPriceCard(unk32 amount, unk32 param2) {
|
||||
this->mNumPostedPriceCards += amount;
|
||||
}
|
||||
|
||||
u16 date;
|
||||
Date date;
|
||||
data_02049bac.func_02014a34(&date);
|
||||
this->mPostDate = date;
|
||||
|
||||
|
||||
@@ -320,9 +320,9 @@ bool PassengerManager::IsDateUnset() {
|
||||
}
|
||||
|
||||
s16 PassengerManager::GetDate() {
|
||||
u16 date;
|
||||
Date date;
|
||||
data_02049bac.func_02014a34(&date);
|
||||
return date;
|
||||
return date.data[0];
|
||||
}
|
||||
|
||||
u32 PassengerManager::GetRandomIndex(u32 param1, u32 seed) {
|
||||
|
||||
@@ -40,7 +40,7 @@ UnkStruct_027e0d00_20::UnkStruct_027e0d00_20(unk32 param1, unk32 param2) :
|
||||
mUnk_B0(0),
|
||||
mUnk_B4(0) {}
|
||||
|
||||
void UnkStruct_027e0d00_20::func_ov024_020d4fa0(unk32 param1, unk32 param2) {
|
||||
void UnkStruct_027e0d00_20::func_ov024_020d4fa0(void *param1, unk32 param2) {
|
||||
u8 unknown[0x90];
|
||||
ModelRender_Derived2 local_120(G3d_GetModelPtr(this->mUnk_50), 0x0C, unknown);
|
||||
void *iVar2;
|
||||
@@ -62,7 +62,7 @@ void UnkStruct_027e0d00_20::func_ov024_020d4fa0(unk32 param1, unk32 param2) {
|
||||
UnkStruct_027e0d00_20::func_ov024_020d4e9c(local_160, this->mUnk_94, true);
|
||||
this->mUnk_A4.~UnkSystem3();
|
||||
this->mUnk_A4.mUnk_00 = local_160;
|
||||
this->mUnk_A4.func_02015460((const char *) &this->mUnk_9C.mUnk_00, (void *) param1, param2);
|
||||
this->mUnk_A4.func_02015460((const char *) &this->mUnk_9C.mUnk_00, param1, param2);
|
||||
|
||||
for (int i = 0; i < ARRAY_LEN(data_ov000_020aa250); i++) {
|
||||
UnkStruct_027e0d00_20::func_ov024_020d4edc(local_160, (wchar_t *) &this->mUnk_9C.mUnk_00, i);
|
||||
|
||||
@@ -12,7 +12,8 @@ Actor *ActorProfileUnkLBCK::Create() {
|
||||
ActorProfileUnkLBCK::ActorProfileUnkLBCK() :
|
||||
ActorProfile_Derived1(ActorId_LBCK) {}
|
||||
|
||||
ActorUnkLBCK::ActorUnkLBCK() {}
|
||||
ActorUnkLBCK::ActorUnkLBCK() :
|
||||
Actor_Derived1(NULL, 0) {}
|
||||
|
||||
void ActorUnkLBCK::func_ov062_02159044(void) {}
|
||||
void ActorUnkLBCK::func_ov062_02159078(void) {}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
extern "C" {
|
||||
void *func_02001654(void *);
|
||||
void *func_020145b0(UnkId *, s32);
|
||||
void *func_020010c0(void *);
|
||||
void *func_02001308(void *);
|
||||
void *func_020010c0(void *, size_t, u32);
|
||||
void *func_02001308(void *, size_t, u32);
|
||||
UnkId *func_02001488(void);
|
||||
UnkId *func_02014704();
|
||||
UnkId *func_020011c8(UnkId *, void *);
|
||||
@@ -15,16 +15,15 @@ unk32 func_020011f4(void *);
|
||||
}
|
||||
extern char *data_0204372c[];
|
||||
|
||||
// non-matching
|
||||
void *SysNew(UnkStruct_02011e10_Sub1 *param1, s32 length, s32 param3) {
|
||||
void *SysNew(UnkStruct_02011e10_Sub1 *param1, u32 length, u32 idLength) {
|
||||
void *newPtr = NULL;
|
||||
|
||||
switch (param1->mId) {
|
||||
case UnkId_EXPH:
|
||||
newPtr = func_020010c0(param1);
|
||||
newPtr = func_020010c0(param1, length, idLength);
|
||||
break;
|
||||
case UnkId_FRMH:
|
||||
newPtr = func_02001308(param1);
|
||||
newPtr = func_02001308(param1, length, idLength);
|
||||
break;
|
||||
case UnkId_UNTH:
|
||||
newPtr = func_02001654(param1);
|
||||
|
||||
Reference in New Issue
Block a user