Skip to content

Commit

Permalink
Some main dol actor splits, dAcOsw_c OK, dTgSw_c OK (#34)
Browse files Browse the repository at this point in the history
* Some main dol actor splits and code

* Match dAcOsw_c

* diff clean

* Fix

* dTgSw_c OK
  • Loading branch information
robojumper authored Sep 25, 2024
1 parent 2d05a82 commit 0f9ef3d
Show file tree
Hide file tree
Showing 39 changed files with 1,453 additions and 306 deletions.
4 changes: 2 additions & 2 deletions config/SOUE01/rels/d_t_timerNP/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global
_epilog = .text:0x00000030; // type:function size:0x2C scope:global
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
dTgTimer_c_classInit__Fv = .text:0x00000070; // type:function size:0x4C
__dt__14dTgTimerBase_cFv = .text:0x000000C0; // type:function size:0x58
__dt__5dTg_cFv = .text:0x000000C0; // type:function size:0x58
increment__FPUs = .text:0x00000120; // type:function size:0x24
create__10dTgTimer_cFv = .text:0x00000150; // type:function size:0xD4
actorExecute__10dTgTimer_cFv = .text:0x00000230; // type:function size:0xB8
Expand All @@ -24,4 +24,4 @@ _ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
g_profile_TIMER_TAG = .data:0x00000000; // type:object size:0x10 data:4byte
__vt__10dTgTimer_c = .data:0x00000034; // type:object size:0x74
__vt__14dTgTimerBase_c = .data:0x000000A8; // type:object size:0x74
__vt__5dTg_c = .data:0x000000A8; // type:object size:0x74
78 changes: 77 additions & 1 deletion config/SOUE01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,82 @@ toBeSorted/counters/extra_wallet_counter.cpp:
.data start:0x805280B0 end:0x805280D0
.sbss start:0x80575640 end:0x80575648

d/a/d_a_player.cpp:
.text start:0x801C5C30 end:0x802471F8
.ctors start:0x804DB824 end:0x804DB828

d/a/obj/d_a_obj_item.cpp:
.text start:0x80247200 end:0x80258E58
.ctors start:0x804DB828 end:0x804DB82C

d/a/obj/d_a_obj_bomb.cpp:
.text start:0x80258E60 end:0x8025D5D8
.ctors start:0x804DB82C end:0x804DB830
.data start:0x80534490 end:0x805347A8

d/a/obj/d_a_obj_arrow.cpp:
.text start:0x8025D5E0 end:0x80260D38
.ctors start:0x804DB830 end:0x804DB834
.data start:0x805347A8 end:0x80534AD0

d/a/obj/d_a_obj_boomerang.cpp:
.text start:0x80260D40 end:0x80265618
.ctors start:0x804DB834 end:0x804DB838
.data start:0x80534AD0 end:0x80534E78

d/a/obj/d_a_obj_fairy.cpp:
.text start:0x80265620 end:0x80268598
.ctors start:0x804DB838 end:0x804DB83C
.data start:0x80534E78 end:0x80535270
.bss start:0x805B4DD8 end:0x805B4FA8

d/a/obj/d_a_obj_tbox.cpp:
.text start:0x802685A0 end:0x8026F488
.ctors start:0x804DB83C end:0x804DB840
.data start:0x80535270 end:0x80535A18

d/a/obj/d_a_obj_time_area.cpp:
.text start:0x8026F490 end:0x80271888
.ctors start:0x804DB840 end:0x804DB844

d/a/obj/d_a_obj_switch.cpp:
.text start:0x80271890 end:0x80273368
.ctors start:0x804DB844 end:0x804DB848
.data start:0x80535CD8 end:0x80535FB8
.sdata start:0x80573A60 end:0x80573A70
.sdata2 start:0x8057C498 end:0x8057C4E0
.bss start:0x805B5528 end:0x805B5668

d/tg/d_t_alldie.cpp:
.text start:0x80273BC0 end:0x8027405C

d/tg/d_t_view_clip.cpp:
.text start:0x80274060 end:0x802743DC

d/tg/d_t_switch.cpp:
.text start:0x802743E0 end:0x802756D8
.ctors start:0x804DB848 end:0x804DB84C
.data start:0x805361B0 end:0x80536478
.sdata start:0x80573A70 end:0x80573A80
.sdata2 start:0x8057C518 end:0x8057C520
.bss start:0x805B56A8 end:0x805B57A8

d/tg/d_t_mass_object.cpp:
.text start:0x802756E0 end:0x8027A0A4

d/tg/d_t_camera.cpp:
.text start:0x8027A0B0 end:0x8027A370

d/tg/d_t_event.cpp:
.text start:0x8027A370 end:0x8027A740

d/tg/d_t_event_f.cpp:
.text start:0x8027A740 end:0x8027AB30

d/tg/d_tk_event.cpp:
.text start:0x8027AB30 end:0x8027B408
.ctors start:0x804DB84C end:0x804DB850

s/s_StateID.cpp:
.text start:0x802DDDB0 end:0x802DE1F4
.ctors start:0x804DB8B8 end:0x804DB8BC
Expand Down Expand Up @@ -371,7 +447,7 @@ m/m3d/m_fanm.cpp:
.sdata2 start:0x8057CD50 end:0x8057CD60

m/m3d/m_mdl.cpp:
.text start:0x802EAF80 end:0x802EBB5C
.text start:0x802EAF80 end:0x802EBBC4
.data start:0x805426C0 end:0x80542708
.sdata2 start:0x8057CD60 end:0x8057CD68

Expand Down
436 changes: 220 additions & 216 deletions config/SOUE01/symbols.txt

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,15 @@ def nw4rLib(lib_name, objects, extra_cflags=[]):
Object(NonMatching, "toBeSorted/sound_info.cpp"),
Object(NonMatching, "d/a/d_a_base.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_base.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_item.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_bomb.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_arrow.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_boomerang.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_fairy.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_tbox.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_time_area.cpp"),
Object(Matching, "d/a/obj/d_a_obj_switch.cpp"),
Object(Matching, "d/tg/d_t_switch.cpp"),
Object(Matching, "toBeSorted/arc_managers/current_stage_arc_manager.cpp"),
Object(Matching, "toBeSorted/arc_managers/oarc_manager.cpp"),
Object(Matching, "toBeSorted/arc_managers/layout_arc_manager.cpp"),
Expand Down
10 changes: 10 additions & 0 deletions include/c/c_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ f32 rnd();
int rndInt(int max);
f32 rndF(f32 max);
f32 rndFX(f32 amp);


template <typename T>
T calcTimer(T* value) {
if (*(T*)value != 0) {
*value = *value - 1;
}
return *value;
}

} // namespace cM

#endif
2 changes: 1 addition & 1 deletion include/d/a/d_a_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class dAcBase_c : public dBase_c {
// Start of SoundSource stuff
/* 8002d590 */ void FUN_8002d590();
/* 8002d5b0 */ void FUN_8002d5b0();
/* 8002d5d0 */ void playSound();
/* 8002d5d0 */ void playSound(u16 effect);
/* 8002d600 */ void FUN_8002d600();
/* 8002d630 */ void FUN_8002d630();
/* 8002d6d0 */ void FUN_8002d6d0();
Expand Down
186 changes: 186 additions & 0 deletions include/d/a/d_a_player.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
#include <d/a/obj/d_a_obj_base.h>

class dAcPy_c : public dAcObjBase_c {
public:
dAcPy_c();
virtual ~dAcPy_c();

/* vt 0x080 */ virtual void IfCurrentActionToActor();
/* vt 0x084 */ virtual void vt_0x084();
/* vt 0x088 */ virtual void set0x439F();
/* vt 0x08C */ virtual void set0x43DE();
/* vt 0x090 */ virtual void vt_0x090();
/* vt 0x094 */ virtual void relatedToUsingItem0x11();
/* vt 0x098 */ virtual void setPosRot();
/* vt 0x09C */ virtual void isLiftingObject();
/* vt 0x0A0 */ virtual void isThrowingOrRollingItem();
/* vt 0x0A4 */ virtual void canThrowObject();
/* vt 0x0A8 */ virtual void canRollObject();
/* vt 0x0AC */ virtual void vt_0x0AC();
/* vt 0x0B0 */ virtual void isCarryingBomb();
/* vt 0x0B4 */ virtual void isPullingOutBomb();
/* vt 0x0B8 */ virtual void isUsingHarp();
/* vt 0x0BC */ virtual void isFinishedPlayingHarp();
/* vt 0x0C0 */ virtual void isUsingWhip();
/* vt 0x0C4 */ virtual void anotherThingWithWhip();
/* vt 0x0C8 */ virtual void somethingWithWHip();
/* vt 0x0CC */ virtual void isWhipOnObject();
/* vt 0x0D0 */ virtual void tryGrabItemWithWhip();
/* vt 0x0D4 */ virtual void someFloatWithWhip();
/* vt 0x0D8 */ virtual void getItemFromClawshotsMaybe();
/* vt 0x0DC */ virtual void vt_0x0DC();
/* vt 0x0E0 */ virtual void isUsingBomb();
/* vt 0x0E4 */ virtual void vt_0x0E4();
/* vt 0x0E8 */ virtual void vt_0x0E8();
/* vt 0x0EC */ virtual void vt_0x0EC();
/* vt 0x0F0 */ virtual void vt_0x0F0();
/* vt 0x0F4 */ virtual void vt_0x0F4();
/* vt 0x0F8 */ virtual void vt_0x0F8();
/* vt 0x0FC */ virtual void vt_0x0FC();
/* vt 0x100 */ virtual void isCrawling();
/* vt 0x104 */ virtual void isUsingSword();
/* vt 0x108 */ virtual void isUsingMitts();
/* vt 0x10C */ virtual void isUsingShield();
/* vt 0x110 */ virtual void getTargetedActor1();
/* vt 0x114 */ virtual void somethingWithCarriedActorFlags();
/* vt 0x118 */ virtual dAcObjBase_c *getCurrentCarriedActor();
/* vt 0x11C */ virtual void checkBeetleActorReferences();
/* vt 0x120 */ virtual void getBeetleActorReferencesSize();
/* vt 0x124 */ virtual void vt_0x124();
/* vt 0x128 */ virtual void vt_0x128();
/* vt 0x12C */ virtual void vt_0x12C();
/* vt 0x130 */ virtual void isBurning();
/* vt 0x134 */ virtual void isShocked();
/* vt 0x138 */ virtual void isCursed();
/* vt 0x13C */ virtual void isSmelly();
/* vt 0x140 */ virtual void store2Floats0x4500();
/* vt 0x144 */ virtual void setActorLinkToSomething();
/* vt 0x148 */ virtual void applyDamageWithIFrames();
/* vt 0x14C */ virtual void vt_0x14C();
/* vt 0x150 */ virtual void hasLessThanQuarterHealth();
/* vt 0x154 */ virtual void vt_0x154();
/* vt 0x158 */ virtual void vt_0x158();
/* vt 0x15C */ virtual void vt_0x15C();
/* vt 0x160 */ virtual void vt_0x160();
/* vt 0x164 */ virtual void vt_0x164();
/* vt 0x168 */ virtual void getCurrentAnimFrame();
/* vt 0x16C */ virtual void getFloatIfStruggling();
/* vt 0x170 */ virtual void isSwimming();
/* vt 0x174 */ virtual void isGustBellowsBeingBlown();
/* vt 0x178 */ virtual void getPointedAngle();
/* vt 0x17C */ virtual void getBellowsPosOrOtherVec3F();
/* vt 0x180 */ virtual void setWindMillPos();
/* vt 0x184 */ virtual void isOffeset0x435eEqual0x20();
/* vt 0x188 */ virtual void getVec3F_Z();
/* vt 0x18C */ virtual void somethingWithMainBodyModel();
/* vt 0x190 */ virtual void getSheathModelMatrix();
/* vt 0x194 */ virtual void getSwordModelMatrix();
/* vt 0x198 */ virtual void vt_0x198();
/* vt 0x19C */ virtual void vt_0x19C();
/* vt 0x1A0 */ virtual void vt_0x1A0();
/* vt 0x1A4 */ virtual void vt_0x1A4();
/* vt 0x1A8 */ virtual void vt_0x1A8();
/* vt 0x1AC */ virtual void vt_0x1AC();
/* vt 0x1B0 */ virtual void isItemFairyFromBugnet();
/* vt 0x1B4 */ virtual void isByte0x434eEqual7();
/* vt 0x1B8 */ virtual void canHandleGameOver();
/* vt 0x1BC */ virtual void vt_0x1BC();
/* vt 0x1C0 */ virtual void vt_0x1C0();
/* vt 0x1C4 */ virtual void getActorInActorRef1();
/* vt 0x1C8 */ virtual void doesActorRef1Exist();
/* vt 0x1CC */ virtual void unlinkActorRef1();
/* vt 0x1D0 */ virtual void ifHasHealthAndSomethingElse();
/* vt 0x1D4 */ virtual void isChargingWeapon();
/* vt 0x1D8 */ virtual void isWeaponChargedFully();
/* vt 0x1DC */ virtual void didShootBow();
/* vt 0x1E0 */ virtual void vt_0x1E0();
/* vt 0x1E4 */ virtual void checkRefArrayAtIndex();
/* vt 0x1E8 */ virtual void sizeOfActorRefs_16();
/* vt 0x1EC */ virtual void vt_0x1EC();
/* vt 0x1F0 */ virtual void vt_0x1F0();
/* vt 0x1F4 */ virtual void didDiveSky_and_other();
/* vt 0x1F8 */ virtual void didDiveSky_andNotOther();
/* vt 0x1FC */ virtual void isLandingFromSailcloth();
/* vt 0x200 */ virtual void isBeingPulledFromRightClawshot();
/* vt 0x204 */ virtual void isBeingPulledByLeftClawshot();
/* vt 0x208 */ virtual void isDashing();
/* vt 0x20C */ virtual void isSliding();
/* vt 0x210 */ virtual void isSlding2();
/* vt 0x214 */ virtual void vt_0x214();
/* vt 0x218 */ virtual void isinMpPosePower();
/* vt 0x21C */ virtual void isPushingBlock();
/* vt 0x220 */ virtual void getRidingActor();
/* vt 0x224 */ virtual void isRidingBall();
/* vt 0x228 */ virtual void getRidingMinecartActor();
/* vt 0x22C */ virtual void getTurnableSwitch();
/* vt 0x230 */ virtual void vt_0x230();
/* vt 0x234 */ virtual void vt_0x234();
/* vt 0x238 */ virtual void setVecIfInFreeFall();
/* vt 0x23C */ virtual void setActorRef10();
/* vt 0x240 */ virtual void vt_0x240();
/* vt 0x244 */ virtual void vt_0x244();
/* vt 0x248 */ virtual void vt_0x248();
/* vt 0x24C */ virtual void vt_0x24C();
/* vt 0x250 */ virtual void vt_0x250();
/* vt 0x254 */ virtual void isAttackingUnderground();
/* vt 0x258 */ virtual void vt_0x258();
/* vt 0x25C */ virtual void vt_0x25C();
/* vt 0x260 */ virtual void vt_0x260();
/* vt 0x264 */ virtual void getGroosenatorIfIn();
/* vt 0x268 */ virtual void setActorRef11();
/* vt 0x26C */ virtual void doesGameOver();
/* vt 0x270 */ virtual void triggerExitRelated();
/* vt 0x274 */ virtual void vt_0x274();
/* vt 0x278 */ virtual void vt_0x278();
/* vt 0x27C */ virtual void getSwordPos();
/* vt 0x280 */ virtual void vt_0x280();
/* vt 0x284 */ virtual bool isUsingBugnet() const;
/* vt 0x288 */ virtual const mVec3_c &getBugNetPos() const;
/* vt 0x28C */ virtual void isUsingBugnet1();
/* vt 0x290 */ virtual void bugNetCollectTreasure();
/* vt 0x294 */ virtual void somethingSwitchDials();
/* vt 0x298 */ virtual void vt_0x298();
/* vt 0x29C */ virtual void getDieLargeDamageDir();
/* vt 0x2A0 */ virtual void doGameOver();
/* vt 0x2A4 */ virtual void isRunningUpWall();
/* vt 0x2A8 */ virtual void lookTowardItem();
/* vt 0x2AC */ virtual void vt_0x2AC();
/* vt 0x2B0 */ virtual void vt_0x2B0();
/* vt 0x2B4 */ virtual void triggerMoveEventMaybe();
/* vt 0x2B8 */ virtual void setActorRef9();
/* vt 0x2BC */ virtual void unlinkActorRef9();
/* vt 0x2C0 */ virtual void vt_0x2C0();
/* vt 0x2C4 */ virtual void vt_0x2C4();
/* vt 0x2C8 */ virtual void isRecovering();
/* vt 0x2CC */ virtual void isDrinkingPotion();
/* vt 0x2D0 */ virtual void isHealingShield();
/* vt 0x2D4 */ virtual void isBottleOut();
/* vt 0x2D8 */ virtual void isUsingBottle();
/* vt 0x2DC */ virtual void getShieldRegenProgressMaybe();
/* vt 0x2E0 */ virtual void vt_0x2E0();
/* vt 0x2E4 */ virtual void someDivingHrabbingStuff();
/* vt 0x2E8 */ virtual void vt_0x2E8();
/* vt 0x2EC */ virtual void isOnClawTargetMaybe();
/* vt 0x2F0 */ virtual void isMPPose();
/* vt 0x2F4 */ virtual void isOnTightRope();
/* vt 0x2F8 */ virtual void isOnVines();
/* vt 0x2FC */ virtual void alwaysRet0();
/* vt 0x300 */ virtual void canBlockAttack();
/* vt 0x304 */ virtual void vt_0x304();
/* vt 0x308 */ virtual void vt_0x308();
/* vt 0x30C */ virtual void vt_0x30C();
/* vt 0x310 */ virtual void vt_0x310();
/* vt 0x314 */ virtual void vt_0x314();
/* vt 0x318 */ virtual void vt_0x318();

/* 0x330 */ u8 unk_0x330[0x340 - 0x330];
/* 0x340 */ u32 someFlags_0x340;
/* 0x344 */ u8 unk_0x344[0x350 - 0x344];
/* 0x350 */ u32 someFlags_0x350;
u8 UNK_0x354[0x35C - 0x354];
/* 0x35C */ u32 mForceOrPreventActionFlags;
/* 0x360 */ UNKWORD field_0x360;
/* 0x364 */ u32 mActionFlags;

static dAcPy_c *LINK;
};
1 change: 0 additions & 1 deletion include/d/a/d_a_t_wood_area.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define D_A_T_WOOD_AREA_H

#include <d/a/obj/d_a_obj_base.h>
#include <d/d_player.h>
#include <f/f_list_nd.h>
#include <s/s_State.hpp>
#include <s/s_StateMgr.hpp>
Expand Down
17 changes: 5 additions & 12 deletions include/d/a/e/d_a_e_hb_leaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
#include <d/a/obj/d_a_obj_base.h>
#include <m/m3d/m_anmmdl.h>
#include <m/m3d/m_anmtexpat.h>

extern "C" bool fn_800B9D80(f32, f32, f32 *, int, const mVec3_c &, u32);
#include <toBeSorted/time_area_mgr.h>

class dAcEhb_leaf_c : public dAcObjBase_c {
public:
dAcEhb_leaf_c() : someFloat(unkFloat0), field_0x3CC(0), field_0x3DE(0) {}
dAcEhb_leaf_c() : mTimeAreaStruct(unkFloat0), field_0x3DE(0) {}
virtual ~dAcEhb_leaf_c() {}
virtual bool createHeap() override;
virtual int create() override;
Expand All @@ -27,24 +26,18 @@ class dAcEhb_leaf_c : public dAcObjBase_c {
m3d::mdlAnmChr mModel; // 0x330
m3d::anmTexPat_c mAnm; // 0x398

f32 someFloat; // 0x3C4
UNKWORD field_0x3C8; // 0x3C8
u8 field_0x3CC; // 0x3CC
TimeAreaStruct mTimeAreaStruct; // 0x3C4
mVec3_c mStartingPos; // 0x3D0
u16 someRot; // 0x3DC
u8 field_0x3DE; // 0x3DE
u8 mType; // 0x3DF

bool isNearZero() {
return fabsf(someFloat) <= FLT_EPSILON;
}

bool isHidden() {
return mType != 0 && isNearZero() ? true : false;
return mType != 0 && mTimeAreaStruct.isNearZero() ? true : false;
}

void doCheck() {
fn_800B9D80(10.0f, 0.2f, &someFloat, roomid, mStartingPos, 0);
mTimeAreaStruct.check(roomid, mStartingPos, 0, 10.0f, 0.2f);
}

int getParam1() {
Expand Down
Loading

0 comments on commit 0f9ef3d

Please sign in to comment.