mirror of
https://github.com/zeldaret/ph
synced 2026-06-07 11:57:43 -04:00
Merge branch 'main' into decomp/MapManager
This commit is contained in:
@@ -318,8 +318,8 @@ ARM void Actor::SetTransform(Transform *transform) {
|
||||
|
||||
ARM void Actor::vfunc_a8() {}
|
||||
|
||||
ARM void Actor::func_Ov00_020c1bfc(s32 param1) {
|
||||
gMapManager->func_ov00_02084be0(mUnk_020.mUnk_0a[param1], mUnk_020.mUnk_08[param1]);
|
||||
ARM bool Actor::func_ov00_020c1bfc(s32 param1) {
|
||||
return gMapManager->func_ov00_02084be0(mUnk_020.mUnk_0a[param1], mUnk_020.mUnk_08[param1]);
|
||||
}
|
||||
|
||||
ARM void Actor::func_ov00_020c1c20(s32 param1, unk32 param2) {
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
#include "Actor/Dungeon/ActorActionObject.hpp"
|
||||
#include "Map/MapManager.hpp"
|
||||
#include "Player/LinkStateBase.hpp"
|
||||
#include "Player/PlayerLinkBase.hpp"
|
||||
#include "Save/AdventureFlags.hpp"
|
||||
|
||||
#pragma section sbss begin
|
||||
ActorType ActorActionObject::gType = ActorType(ActorTypeId_ActionObject, (ActorCreateFunc) ActorActionObject::Create, NULL);
|
||||
#pragma section sbss end
|
||||
|
||||
extern u32 **data_027e0fe0[];
|
||||
ARM ActorActionObject *ActorActionObject::Create() {
|
||||
return new(*data_027e0fe0[0], 4) ActorActionObject();
|
||||
}
|
||||
|
||||
ARM ActorActionObject::ActorActionObject() {}
|
||||
|
||||
ARM ActorActionObject::~ActorActionObject() {}
|
||||
|
||||
// non-matching
|
||||
ARM bool ActorActionObject::vfunc_08() {
|
||||
mGravity = 0;
|
||||
mHitbox.pos = gVec3p_ZERO;
|
||||
mHitbox.size = -1;
|
||||
mUnk_08c.pos = mHitbox.pos;
|
||||
mUnk_08c.size = mHitbox.size;
|
||||
mUnk_0a4.mUnk_04 = gVec3p_ZERO;
|
||||
mUnk_0a4.mUnk_10 = -1;
|
||||
mVisible = false;
|
||||
mUnk_130 = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
ARM void ActorActionObject::vfunc_14(u32 param1) {
|
||||
if (!this->func_ov00_020c313c(param1)) {
|
||||
return;
|
||||
}
|
||||
|
||||
u32 flag = mUnk_020.mUnk_00[2];
|
||||
bool bVar3;
|
||||
switch (mUnk_020.mUnk_00[0]) {
|
||||
case 0: bVar3 = true; break;
|
||||
case 1:
|
||||
if (gPlayerLink->mGrabActor.id != -1 && gPlayerLink->GetStateId() == LinkStateId_Move) {
|
||||
bVar3 = true;
|
||||
} else {
|
||||
bVar3 = false;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (gPlayerLink->mGrabActor.id == -1 && gPlayerLink->GetStateId() == LinkStateId_Move) {
|
||||
bVar3 = true;
|
||||
} else {
|
||||
bVar3 = false;
|
||||
}
|
||||
break;
|
||||
default: bVar3 = false; break;
|
||||
}
|
||||
|
||||
if (!bVar3) {
|
||||
return;
|
||||
}
|
||||
if (!gMapManager->func_ov00_020836dc((u32) mUnk_020.mUnk_00[1], 0)) {
|
||||
return;
|
||||
}
|
||||
if (mUnk_020.mUnk_0a[0] != 0 && !this->func_ov00_020c1bfc(0)) {
|
||||
return;
|
||||
}
|
||||
if (flag != 0 && !gAdventureFlags->Get(flag)) {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerLinkBase *link = gPlayerLink;
|
||||
if (link != NULL && link->vfunc_18(7)) {
|
||||
if (mUnk_020.mUnk_00[3] == 1) {
|
||||
link->func_ov000_020bcf50(&mPos, 0x800);
|
||||
}
|
||||
this->func_ov00_020c1c20(1, 1);
|
||||
this->Kill();
|
||||
}
|
||||
}
|
||||
|
||||
ARM void ActorActionObject::vfunc_18(u32 param1) {
|
||||
this->func_ov00_020c313c(param1);
|
||||
}
|
||||
@@ -8,6 +8,6 @@ bool ActorEventIcon::vfunc_08() {}
|
||||
void ActorEventIcon::vfunc_14(u32 param1) {}
|
||||
void ActorEventIcon::vfunc_18(u32 param1) {}
|
||||
u32 ActorEventIcon::func_ov000_02090648(u32 param1) {}
|
||||
bool func_ov000_02090774(u32 param1) {}
|
||||
bool ActorEventIcon::func_ov000_02090774(u32 param1) {}
|
||||
void ActorEventIcon::vfunc_1c(u16 *param1) {}
|
||||
ActorEventIcon::~ActorEventIcon() {}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "Actor/Navi/ActorForceNavi.hpp"
|
||||
|
||||
#pragma section sbss begin
|
||||
ActorType ActorForceNavi::gType = ActorType(ActorTypeId_ForceNavi, (ActorCreateFunc) ActorForceNavi::Create, NULL);
|
||||
#pragma section sbss end
|
||||
|
||||
extern u32 **data_027e0fe0[];
|
||||
ActorForceNavi *ActorForceNavi::Create() {
|
||||
return new(*data_027e0fe0[0], 4) ActorForceNavi();
|
||||
}
|
||||
|
||||
ARM FairyId ActorForceNavi::GetFairyId() {
|
||||
return FairyId_Power;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#include "Actor/Navi/ActorNavi.hpp"
|
||||
#include "Player/EquipHammer.hpp"
|
||||
|
||||
ActorType ActorNavi::gType = ActorType(ActorTypeId_Navi, (ActorCreateFunc) ActorNavi::Create, NULL);
|
||||
UnkStruct_ov000_020b8110 data_ov000_020ee1cc;
|
||||
|
||||
ActorNavi *ActorNavi::Create() {}
|
||||
UnkStruct_ov000_020b8110::UnkStruct_ov000_020b8110() :
|
||||
UnkStruct_ov000_020beba8(7) {}
|
||||
UnkStruct_ov000_020b8110::~UnkStruct_ov000_020b8110() {}
|
||||
void UnkStruct_ov000_020b8110::vfunc_08(unk16 *param1) {}
|
||||
void UnkStruct_ov000_020b8110::vfunc_18(s32 *param1) {}
|
||||
void UnkStruct_ov000_020b8110::vfunc_14(u16 *param1) {}
|
||||
void ActorNavi::func_ov000_020b8200() {}
|
||||
void ActorNavi::vfunc_c4() {}
|
||||
void ActorNavi::vfunc_c8() {}
|
||||
FairyId ActorNavi::GetFairyId() {}
|
||||
s32 ActorNavi::vfunc_b8() {}
|
||||
void ActorNavi::vfunc_d4() {}
|
||||
void ActorNavi::vfunc_d0() {}
|
||||
void ActorNavi::SetActive(bool active) {}
|
||||
void ActorNavi::vfunc_e0() {}
|
||||
void ActorNavi::vfunc_d8() {}
|
||||
void ActorNavi::vfunc_20(bool param1) {}
|
||||
bool ActorNavi::vfunc_cc(unk32 *param1) {}
|
||||
bool ActorNavi::vfunc_c0(Vec3p *param1) {}
|
||||
void ActorNavi::vfunc_e8() {}
|
||||
bool ActorNavi::vfunc_8c() {}
|
||||
void ActorNavi::vfunc_ec() {}
|
||||
EquipHammer *GetEquipHammer() {}
|
||||
void ActorNavi::func_ov000_020b853c() {}
|
||||
ActorNavi::~ActorNavi() {}
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "Actor/Navi/ActorWisdomNavi.hpp"
|
||||
|
||||
#pragma section sbss begin
|
||||
ActorType ActorWisdomNavi::gType = ActorType(ActorTypeId_WisdomNavi, (ActorCreateFunc) ActorWisdomNavi::Create, NULL);
|
||||
#pragma section sbss end
|
||||
|
||||
extern u32 **data_027e0fe0[];
|
||||
ARM ActorWisdomNavi *ActorWisdomNavi::Create() {
|
||||
return new(*data_027e0fe0[0], 4) ActorWisdomNavi();
|
||||
}
|
||||
|
||||
ARM FairyId ActorWisdomNavi::GetFairyId() {
|
||||
return FairyId_Wisdom;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ ARM FairyId ItemManager::GetEquippedFairy() const {
|
||||
return fairy;
|
||||
}
|
||||
|
||||
ARM ActorNavi *ItemManager::GetFairy(FairyId id) const {
|
||||
ARM ActorNaviBase *ItemManager::GetFairy(FairyId id) const {
|
||||
return mFairies[id];
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ bool PlayerLinkBase::func_ov000_020bba00() {}
|
||||
bool PlayerLinkBase::func_ov000_020bba14() {}
|
||||
bool PlayerLinkBase::func_ov000_020bba28() {}
|
||||
void PlayerLinkBase::func_ov000_020bba48() {}
|
||||
void PlayerLinkBase::vfunc_18(s32 param1) {}
|
||||
bool PlayerLinkBase::vfunc_18(s32 param1) {}
|
||||
bool PlayerLinkBase::CanMove() {}
|
||||
bool PlayerLinkBase::vfunc_58() {}
|
||||
bool PlayerLinkBase::vfunc_5c() {}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#include "Actor/Navi/ActorNavi.hpp"
|
||||
|
||||
ActorNavi::ActorNavi() {}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include "Map/MapOverworld.hpp"
|
||||
|
||||
MapOverworld::MapOverworld(u32 width, u32 height) :
|
||||
MapBase(width, height) {}
|
||||
MapOverworld::~MapOverworld() {}
|
||||
void MapOverworld::vfunc_08(u32 param_2, u32 param_3, Course *param_4) {}
|
||||
void MapOverworld::vfunc_14() {}
|
||||
void MapOverworld::vfunc_1c(bool param_2) {}
|
||||
void MapOverworld::func_ov018_0215bfc8() {}
|
||||
void MapOverworld::vfunc_20(s32 param_2) {}
|
||||
void MapOverworld::vfunc_2c() {}
|
||||
void MapOverworld::vfunc_94() {}
|
||||
unk32 MapOverworld::vfunc_a4() {}
|
||||
unk32 MapOverworld::vfunc_54() {}
|
||||
unk32 MapOverworld::vfunc_58() {}
|
||||
unk32 MapOverworld::vfunc_5c() {}
|
||||
unk32 MapOverworld::vfunc_60() {}
|
||||
unk32 MapOverworld::vfunc_64() {}
|
||||
u32 MapOverworld::func_ov018_0215c34c() {}
|
||||
u32 MapOverworld::func_ov018_0215c368() {}
|
||||
s32 MapOverworld::func_ov018_0215c380(u8 *param1) {}
|
||||
void MapOverworld::vfunc_bc() {}
|
||||
void MapOverworld::vfunc_98() {}
|
||||
void MapOverworld::vfunc_c0() {}
|
||||
unk32 MapOverworld::vfunc_78() {}
|
||||
unk32 MapOverworld::vfunc_7c() {}
|
||||
unk32 MapOverworld::vfunc_80() {}
|
||||
unk8 MapOverworld::vfunc_b0(unk32 param_2, unk32 param_3) {}
|
||||
void MapOverworld::func_ov018_0215c650() {}
|
||||
void MapOverworld::func_ov018_0215c6ac() {}
|
||||
void MapOverworld::func_ov018_0215c6d0() {}
|
||||
MapOverworld_Unk1::MapOverworld_Unk1(u32 param1, u8 *param2, unk32 param3) :
|
||||
UnkStruct_ov000_020c0c08(0, param2) {}
|
||||
void MapOverworld::func_ov018_0215c9ac() {}
|
||||
void func_ov018_0215ca24(s32 param1) {}
|
||||
void func_ov018_0215ca3c(s32 param1, s32 param2, unk32 param3, unk32 param4) {}
|
||||
void func_ov018_0215ca8c(s32 param1) {}
|
||||
void MapOverworld::vfunc_4c() {}
|
||||
@@ -1,7 +1,88 @@
|
||||
#include "System/OverlayManager.hpp"
|
||||
#include "global.h"
|
||||
#include "nds/Overlay.h"
|
||||
|
||||
void OverlayManager::Load(OverlayIndex index, OverlayId id) {}
|
||||
void OverlayManager::LoadIfNotLoaded(OverlayIndex index, OverlayId id) {}
|
||||
void OverlayManager::Unload(OverlayIndex index) {}
|
||||
void OverlayManager::LoadOverlaySetup(s32 index) {}
|
||||
void OverlayManager::UnloadOverlaySetup() {}
|
||||
struct UnkStruct_020ee698 {
|
||||
/* 00 */ unk8 mUnk_00[0x2C];
|
||||
/* 2c */ unk32 mUnk_2c;
|
||||
/* 30 */
|
||||
};
|
||||
extern UnkStruct_020ee698 data_ov000_020ee698;
|
||||
|
||||
struct OverlaySetup {
|
||||
/* 00 */ unk8 mUnk_00;
|
||||
/* 01 */ unk8 mUnk_01;
|
||||
/* 02 */ unk8 mUnk_02;
|
||||
/* 03 */ unk8 mUnk_03;
|
||||
/* 04 */ OverlayId slot1Overlay;
|
||||
/* 08 */ OverlayId slot2Overlay;
|
||||
/* 0c */ OverlayId slot3Overlay;
|
||||
/* 10 */ OverlayId slot12Overlay;
|
||||
/* 14 */ void *mUnk_14;
|
||||
/* 18 */ void *mUnk_18;
|
||||
/* 1c */
|
||||
};
|
||||
extern OverlaySetup gOverlaySetups[];
|
||||
|
||||
extern u32 *data_027e0ce0[];
|
||||
extern "C" void func_ov007_02102850(u32 **);
|
||||
extern "C" void func_ov007_021028a0(u32 **);
|
||||
|
||||
THUMB void OverlayManager::Load(OverlayIndex index, OverlayId id) {
|
||||
if (id != OverlayId_None) {
|
||||
Overlay_Load(NULL, id);
|
||||
}
|
||||
|
||||
this->mLoadedOverlays[index] = id;
|
||||
}
|
||||
|
||||
THUMB void OverlayManager::LoadIfNotLoaded(OverlayIndex index, OverlayId id) {
|
||||
OverlayId loadedId = this->mLoadedOverlays[index];
|
||||
|
||||
if (loadedId != id) {
|
||||
this->Unload(index);
|
||||
this->Load(index, id);
|
||||
}
|
||||
}
|
||||
|
||||
THUMB void OverlayManager::Unload(OverlayIndex index) {
|
||||
if (this->mLoadedOverlays[index] != OverlayId_None) {
|
||||
Overlay_Unload(NULL, this->mLoadedOverlays[index]);
|
||||
this->mLoadedOverlays[index] = OverlayId_None;
|
||||
}
|
||||
}
|
||||
|
||||
//! TODO: solve the .word issue with the overlay IDs
|
||||
//! both functions should match otherwise
|
||||
THUMB void OverlayManager::LoadOverlaySetup(s32 index) {
|
||||
OverlayId overlayId;
|
||||
OverlaySetup *pSetup;
|
||||
|
||||
pSetup = &gOverlaySetups[index];
|
||||
|
||||
this->LoadIfNotLoaded(OverlayIndex_1, pSetup->slot1Overlay);
|
||||
this->LoadIfNotLoaded(OverlayIndex_2, pSetup->slot2Overlay);
|
||||
|
||||
if (index == 5) {
|
||||
func_ov007_02102850(data_027e0ce0);
|
||||
} else {
|
||||
overlayId = pSetup->slot12Overlay;
|
||||
|
||||
if (index == 6 && data_ov000_020ee698.mUnk_2c == 2) {
|
||||
overlayId = OverlayId_61;
|
||||
}
|
||||
|
||||
this->Load(OverlayIndex_3, pSetup->slot3Overlay);
|
||||
this->Load(OverlayIndex_12, overlayId);
|
||||
}
|
||||
}
|
||||
|
||||
THUMB void OverlayManager::UnloadOverlaySetup() {
|
||||
this->Unload(OverlayIndex_12);
|
||||
this->Unload(OverlayIndex_3);
|
||||
|
||||
if (this->mLoadedOverlays[2] == OverlayId_07) {
|
||||
func_ov007_021028a0(data_027e0ce0);
|
||||
this->Unload(OverlayIndex_2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user