Merge remote-tracking branch 'upstream/HEAD' into d_a_e_skytail

This commit is contained in:
elijah-thomas774
2026-09-24 18:15:38 -04:00
41 changed files with 2188 additions and 270 deletions
+1 -1
View File
@@ -58,4 +58,4 @@ lbl_17_data_190 = .data:0x00000190; // type:object size:0x34
lbl_17_data_1C4 = .data:0x000001C4; // type:object size:0x5 data:string
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
lbl_17_bss_8 = .bss:0x00000008; // type:object size:0x10
AcBombf__StateID_Wait = .bss:0x00000018; // type:object size:0x30 data:4byte
StateID_Wait__10dAcBombf_c = .bss:0x00000018; // type:object size:0x30 data:4byte
+3
View File
@@ -1586,10 +1586,13 @@ d/d_thp_player.cpp:
d/tg/d_t_alldie.cpp:
.text start:0x80273BC0 end:0x8027405C align:16
.data start:0x805360A0 end:0x80536128
.sdata2 start:0x8057C4F0 end:0x8057C508
d/tg/d_t_view_clip.cpp:
.text start:0x80274060 end:0x802743DC align:16
.data start:0x80536128 end:0x805361B0
.sdata2 start:0x8057C508 end:0x8057C518
.bss start:0x805B5668 end:0x805B56A8
d/tg/d_t_switch.cpp:
.text start:0x802743E0 end:0x802756D8 align:16
+140 -140
View File
@@ -1183,7 +1183,7 @@ fn_800306C0 = .text:0x800306C0; // type:function size:0x10
fn_800306D0__11dAcEnBase_cFv = .text:0x800306D0; // type:function size:0x24
fn_80030700__11dAcEnBase_cFv = .text:0x80030700; // type:function size:0x24
targetPlayerOrScrapper__11dAcEnBase_cFf = .text:0x80030730; // type:function size:0xB0
fn_800307E0 = .text:0x800307E0; // type:function size:0x34
fn_800307E0__11dAcEnBase_cFP7mVec3_cl = .text:0x800307E0; // type:function size:0x34
fn_80030820 = .text:0x80030820; // type:function size:0x14
fn_80030840 = .text:0x80030840; // type:function size:0x13C
fn_80030980__11dAcEnBase_cFRQ23m3d5mdl_clb = .text:0x80030980; // type:function size:0x188
@@ -2496,7 +2496,7 @@ getCurrentBeetleType__7dAcPy_cFv = .text:0x8005C270; // type:function size:0x78
getCurrentBowType__7dAcPy_cFv = .text:0x8005C2F0; // type:function size:0x60
getCurrentMittsType = .text:0x8005C350; // type:function size:0x48
isPouchUsable = .text:0x8005C3A0; // type:function size:0x80
isInBossRushMinigameState = .text:0x8005C420; // type:function size:0x8
checkInBossRush__15MinigameManagerFv = .text:0x8005C420; // type:function size:0x8
isItemRestrictedByBokoBase__7dAcPy_cF7ITEM_ID = .text:0x8005C430; // type:function size:0xB8
isItemRestricted = .text:0x8005C4F0; // type:function size:0xE0
fn_8005C5D0 = .text:0x8005C5D0; // type:function size:0x34
@@ -2507,7 +2507,7 @@ isBottleOut__17daPlayerActBase_cFv = .text:0x8005C640; // type:function size:0x8
isHealingShield__17daPlayerActBase_cFv = .text:0x8005C650; // type:function size:0x8
isDrinkingPotion__17daPlayerActBase_cFv = .text:0x8005C660; // type:function size:0x8
isRecovering__17daPlayerActBase_cCFv = .text:0x8005C670; // type:function size:0x8
lookTowardItem__17daPlayerActBase_cFv = .text:0x8005C680; // type:function size:0x4
lookTowardItem__17daPlayerActBase_cFRC7mVec3_cUl4mAngfff = .text:0x8005C680; // type:function size:0x4
isRunningUpWall__17daPlayerActBase_cFv = .text:0x8005C690; // type:function size:0x8
doGameOver__17daPlayerActBase_cFv = .text:0x8005C6A0; // type:function size:0x4
getDieLargeDamageDir__17daPlayerActBase_cFv = .text:0x8005C6B0; // type:function size:0x8
@@ -2561,7 +2561,7 @@ ifHasHealthAndSomethingElse__17daPlayerActBase_cFv = .text:0x8005C9A0; // type:f
unlinkActorRef1__17daPlayerActBase_cFv = .text:0x8005C9B0; // type:function size:0x4
doesActorRef1Exist__17daPlayerActBase_cFv = .text:0x8005C9C0; // type:function size:0x8
getActorInActorRef1__17daPlayerActBase_cFv = .text:0x8005C9D0; // type:function size:0x8
vt_0x1BC__17daPlayerActBase_cFv = .text:0x8005C9E0; // type:function size:0x8
getBeetleHeldActor__17daPlayerActBase_cFv = .text:0x8005C9E0; // type:function size:0x8
canHandleGameOver__17daPlayerActBase_cFv = .text:0x8005C9F0; // type:function size:0x4
isByte0x434eEqual7__17daPlayerActBase_cFv = .text:0x8005CA00; // type:function size:0x8
isItemFairyFromBugnet__17daPlayerActBase_cFv = .text:0x8005CA10; // type:function size:0x8
@@ -2656,7 +2656,7 @@ setSwordAnm__19daPlayerModelBase_cFPCc = .text:0x8005E090; // type:function size
initSwordModel__19daPlayerModelBase_cFv = .text:0x8005E100; // type:function size:0x1F0
updateSwordModel__19daPlayerModelBase_cFv = .text:0x8005E2F0; // type:function size:0xA8
getCurrentShieldPouchSlot__19daPlayerModelBase_cFv = .text:0x8005E3A0; // type:function size:0x50
isInBambooCuttingMinigame__7dAcPy_cFv = .text:0x8005E3F0; // type:function size:0x8 scope:weak
checkInBambooCutting__15MinigameManagerFv = .text:0x8005E3F0; // type:function size:0x8 scope:weak
getCurrentlyEquippedShieldId__19daPlayerModelBase_cFv = .text:0x8005E400; // type:function size:0x4C
getShieldType__19daPlayerModelBase_cFl = .text:0x8005E450; // type:function size:0x3C
initShieldModel__19daPlayerModelBase_cFv = .text:0x8005E490; // type:function size:0x2C0
@@ -4008,7 +4008,7 @@ isTimeshiftStoneActive = .text:0x800BBC10; // type:function size:0x14
fn_800BBC30 = .text:0x800BBC30; // type:function size:0x58
fn_800BBC90 = .text:0x800BBC90; // type:function size:0x4C
fn_800BBCE0 = .text:0x800BBCE0; // type:function size:0x54
fn_800BBD40 = .text:0x800BBD40; // type:function size:0xC0
fn_800BBD40__14dTimeAreaMgr_cFv = .text:0x800BBD40; // type:function size:0xC0
fn_800BBE00 = .text:0x800BBE00; // type:function size:0xAC
TimeStoneBase__setActiveStone = .text:0x800BBEB0; // type:function size:0x3C
fn_800BBEF0 = .text:0x800BBEF0; // type:function size:0x14
@@ -5841,8 +5841,8 @@ baseItemLytIndexToCurrentVariant__21dLytMeterItemSelect_cCFl = .text:0x800F07D0;
baseItemIdToCurrentVariant__21dLytMeterItemSelect_cCF7ITEM_ID = .text:0x800F08B0; // type:function size:0xD4
getBaseItemLytIndexforInternalId__21dLytMeterItemSelect_cCFl = .text:0x800F0990; // type:function size:0x44
isWheelBlockedByCurrentAction__21dLytMeterItemSelect_cFv = .text:0x800F09E0; // type:function size:0xBC
isInSpiralChargeTutorialMinigame__21dLytMeterItemSelect_cFv = .text:0x800F0AA0; // type:function size:0x8
isInRollercoasterMinigame__21dLytMeterItemSelect_cFv = .text:0x800F0AB0; // type:function size:0x8
checkInSprialChargeTutorial__15MinigameManagerFv = .text:0x800F0AA0; // type:function size:0x8 scope:weak
checkInRollerCoaster__15MinigameManagerFv = .text:0x800F0AB0; // type:function size:0x8 scope:weak
setCurrentItemText__21dLytMeterItemSelect_cF7ITEM_ID = .text:0x800F0AC0; // type:function size:0xA8
getName__21dLytMeterItemSelect_cCFv = .text:0x800F0B70; // type:function size:0x8 scope:weak
getLyt__21dLytMeterItemSelect_cFv = .text:0x800F0B80; // type:function size:0x8 scope:weak
@@ -11967,7 +11967,7 @@ fn_801E2DD0 = .text:0x801E2DD0; // type:function size:0x38
fn_801E2E10 = .text:0x801E2E10; // type:function size:0x54
fn_801E2E70 = .text:0x801E2E70; // type:function size:0x74
fn_801E2EF0 = .text:0x801E2EF0; // type:function size:0xD0
fn_801E2FC0 = .text:0x801E2FC0; // type:function size:0x1A0
fn_801E2FC0__7dAcPy_cFRC7mVec3_cR13cBgS_PolyInfof = .text:0x801E2FC0; // type:function size:0x1A0
isBWheelItemNotRestricted = .text:0x801E3160; // type:function size:0xB0
hasUsableItem = .text:0x801E3210; // type:function size:0x40
fn_801E3250 = .text:0x801E3250; // type:function size:0x78
@@ -12361,26 +12361,26 @@ fn_80202270 = .text:0x80202270; // type:function size:0x170
ActorLink__pushingLog = .text:0x802023E0; // type:function size:0x12C
fn_80202510 = .text:0x80202510; // type:function size:0x1A8
ActorLink__logPushed = .text:0x802026C0; // type:function size:0x298
isObjectFromBeetle = .text:0x80202960; // type:function size:0x13C
fn_80202AA0 = .text:0x80202AA0; // type:function size:0x13C
fn_80202BE0 = .text:0x80202BE0; // type:function size:0x10
ActorLink__checkBeetleActorReferenceAtIndex = .text:0x80202BF0; // type:function size:0x20
ActorLink__somethingBombsInBeetleActorRefs = .text:0x80202C10; // type:function size:0x88
fn_80202CA0 = .text:0x80202CA0; // type:function size:0x8
fn_80202CB0 = .text:0x80202CB0; // type:function size:0x8
fn_80202CC0 = .text:0x80202CC0; // type:function size:0x8
fn_80202CD0 = .text:0x80202CD0; // type:function size:0x8
fn_80202CE0 = .text:0x80202CE0; // type:function size:0x8
fn_80202CF0 = .text:0x80202CF0; // type:function size:0x8
fn_80202D00 = .text:0x80202D00; // type:function size:0x8
fn_80202D10 = .text:0x80202D10; // type:function size:0x8
fn_80202D20 = .text:0x80202D20; // type:function size:0x8
fn_80202D30 = .text:0x80202D30; // type:function size:0x8
fn_80202D40 = .text:0x80202D40; // type:function size:0x8
fn_80202D50 = .text:0x80202D50; // type:function size:0x8
fn_80202D60 = .text:0x80202D60; // type:function size:0x8
fn_80202D70 = .text:0x80202D70; // type:function size:0x8
fn_80202D80 = .text:0x80202D80; // type:function size:0x8
insert__Q27dAcPy_c11ObjectArrayFP12dAcObjBase_c = .text:0x80202960; // type:function size:0x13C
execute__Q27dAcPy_c11ObjectArrayFv = .text:0x80202AA0; // type:function size:0x13C
getStateID__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80202BE0; // type:function size:0x10
get__Q27dAcPy_c11ObjectArrayFl = .text:0x80202BF0; // type:function size:0x20
removeBombs__Q27dAcPy_c11ObjectArrayFv = .text:0x80202C10; // type:function size:0x88
getBombDistanceUnknown0__7dAcPy_cFv = .text:0x80202CA0; // type:function size:0x8
getBombExplodeTimer__7dAcPy_cFv = .text:0x80202CB0; // type:function size:0x8
getBombUnknown0_0__7dAcPy_cFv = .text:0x80202CC0; // type:function size:0x8
getBombUnknown0_1__7dAcPy_cFv = .text:0x80202CD0; // type:function size:0x8
getBombUnknown1_0__7dAcPy_cFv = .text:0x80202CE0; // type:function size:0x8
getBombUnknown1_1__7dAcPy_cFv = .text:0x80202CF0; // type:function size:0x8
getBombAcceleration__7dAcPy_cFv = .text:0x80202D00; // type:function size:0x8
getBombMaxSpeed__7dAcPy_cFv = .text:0x80202D10; // type:function size:0x8
getBombBounceSpeed__7dAcPy_cFv = .text:0x80202D20; // type:function size:0x8
getBombStopSpeedY__7dAcPy_cFv = .text:0x80202D30; // type:function size:0x8
getBombMaxSpeedY__7dAcPy_cFv = .text:0x80202D40; // type:function size:0x8
getBombParticleScale__7dAcPy_cFv = .text:0x80202D50; // type:function size:0x8
getBombExplodeRadius__7dAcPy_cFv = .text:0x80202D60; // type:function size:0x8
getBombAcceleration_1__7dAcPy_cFv = .text:0x80202D70; // type:function size:0x8
getBombMaxSpeed_1__7dAcPy_cFv = .text:0x80202D80; // type:function size:0x8
fn_80202D90__7dAcPy_cFb = .text:0x80202D90; // type:function size:0x48
ActorLink__getTotalNumberOfBombs = .text:0x80202DE0; // type:function size:0x4
ActorLink__changeBombCounterAndPouch = .text:0x80202DF0; // type:function size:0x8
@@ -12760,7 +12760,7 @@ fn_8021B2C0 = .text:0x8021B2C0; // type:function size:0x8
checkBeetleItemRetrieve = .text:0x8021B2D0; // type:function size:0xAC
setBeetleFlashClr__7dAcPy_cFRC6mColor = .text:0x8021B380; // type:function size:0x48
setBeetleBackAnim__7dAcPy_cFv = .text:0x8021B3D0; // type:function size:0x48
setBeetleReleasedObject = .text:0x8021B420; // type:function size:0x38
setBeetleReleasedObject__7dAcPy_cFP12dAcObjBase_c = .text:0x8021B420; // type:function size:0x38
getBeetleActorPtr = .text:0x8021B460; // type:function size:0x7C
strippedBeetleFunction = .text:0x8021B4E0; // type:function size:0x4
checkUsingBeetleAnim = .text:0x8021B4F0; // type:function size:0x50
@@ -13136,26 +13136,26 @@ moveLinkToCoordinatesMaybe = .text:0x8023B600; // type:function size:0x438
fn_8023BA40 = .text:0x8023BA40; // type:function size:0xAC
fn_8023BAF0 = .text:0x8023BAF0; // type:function size:0x6C
checkMinigameStateBitset = .text:0x8023BB60; // type:function size:0x13C
checkInsectCaptureGameState = .text:0x8023BCA0; // type:function size:0x4
checkInsectCaptureGameState2 = .text:0x8023BCB0; // type:function size:0x8
checkMinigameStatePumpkinCarry = .text:0x8023BCC0; // type:function size:0x4
checkMinigameStatePumpkinCarry2 = .text:0x8023BCD0; // type:function size:0x8
checkBambooCuttingMinigameState2 = .text:0x8023BCE0; // type:function size:0x4
checkMinigameThrillDigger = .text:0x8023BCF0; // type:function size:0x4
checkMinigameThrillDigger2 = .text:0x8023BD00; // type:function size:0x8
checkFunFunIslandMinigameState = .text:0x8023BD10; // type:function size:0x4
isInMinigameInsectCapture__7dAcPy_cFv = .text:0x8023BCA0; // type:function size:0x4
checkInInsectCapture__15MinigameManagerFv = .text:0x8023BCB0; // type:function size:0x8
isInMinigamePumpkinCarry__7dAcPy_cFv = .text:0x8023BCC0; // type:function size:0x4
checkInPumpkinCarry__15MinigameManagerFv = .text:0x8023BCD0; // type:function size:0x8
isInMinigameBambooCutting__7dAcPy_cFv = .text:0x8023BCE0; // type:function size:0x4
isInMinigameThrillDigger__7dAcPy_cFv = .text:0x8023BCF0; // type:function size:0x4
checkInThrillDigger__15MinigameManagerFv = .text:0x8023BD00; // type:function size:0x8
isInMinigameFunFunIsland__7dAcPy_cFv = .text:0x8023BD10; // type:function size:0x4
checkInFunFunIsland__15MinigameManagerFv = .text:0x8023BD20; // type:function size:0x8
checkMinigameHouseCleaning = .text:0x8023BD30; // type:function size:0x4
checkMinigameHouseCleaning2 = .text:0x8023BD40; // type:function size:0x8
checkTrialTimeAttackMinigameState = .text:0x8023BD50; // type:function size:0x4
checkTrialTimeAttackMinigameState2 = .text:0x8023BD60; // type:function size:0x8
isInBossRushMinigameState2 = .text:0x8023BD70; // type:function size:0x4
checkPumpkinClayShootingMinigameState = .text:0x8023BD80; // type:function size:0x4
checkPumpkinClayShootingMinigameState2 = .text:0x8023BD90; // type:function size:0x8
checkHarpPlayingMinigameState = .text:0x8023BDA0; // type:function size:0x4
checkHarpPlayingMinigameState2 = .text:0x8023BDB0; // type:function size:0x8
checkRollercoasterMinigameState2 = .text:0x8023BDC0; // type:function size:0x4
inSpecialMinigameState = .text:0x8023BDD0; // type:function size:0x4
isInMinigameHouseCleaning__7dAcPy_cFv = .text:0x8023BD30; // type:function size:0x4
checkInHouseCleaning__15MinigameManagerFv = .text:0x8023BD40; // type:function size:0x8
isInMinigameTrialTimeAttack__7dAcPy_cFv = .text:0x8023BD50; // type:function size:0x4
checkInTrialTimeAttack__15MinigameManagerFv = .text:0x8023BD60; // type:function size:0x8
isInMinigameBossRush__7dAcPy_cFv = .text:0x8023BD70; // type:function size:0x4
isInMinigamePumpkinArchery__7dAcPy_cFv = .text:0x8023BD80; // type:function size:0x4
checkInPumpkinArchery__15MinigameManagerFv = .text:0x8023BD90; // type:function size:0x8
isInMinigameHarpPlaying__7dAcPy_cFv = .text:0x8023BDA0; // type:function size:0x4
checkInHarpPlaying__15MinigameManagerFv = .text:0x8023BDB0; // type:function size:0x8
isInMinigameRollerCoaster__7dAcPy_cFv = .text:0x8023BDC0; // type:function size:0x4
isInMinigameSprialChargeTutorial__7dAcPy_cFv = .text:0x8023BDD0; // type:function size:0x4
fn_8023BDE0 = .text:0x8023BDE0; // type:function size:0x144
handlesInputMaybe = .text:0x8023BF30; // type:function size:0x974
fn_8023C8B0 = .text:0x8023C8B0; // type:function size:0x130
@@ -13215,7 +13215,7 @@ fn_80242C00 = .text:0x80242C00; // type:function size:0x58
fn_80242C60 = .text:0x80242C60; // type:function size:0x11A8
fn_80243E10 = .text:0x80243E10; // type:function size:0x18
fn_80243E30 = .text:0x80243E30; // type:function size:0x19C
dBase_c__checkActorNameId = .text:0x80243FD0; // type:function size:0x24
isProfile__24@unnamed@d_a_player_cpp@FP9dAcBase_cUs = .text:0x80243FD0; // type:function size:0x24
ActorLink__preUpdate = .text:0x80244000; // type:function size:0x58C
ActorLink__update = .text:0x80244590; // type:function size:0x11F0
fn_80245780 = .text:0x80245780; // type:function size:0x4
@@ -13972,68 +13972,68 @@ __dt__23sFStateID_c<9dAcItem_c>Fv = .text:0x80258D70; // type:function size:0x58
isSameName__23sFStateID_c<9dAcItem_c>CFPCc = .text:0x80258DD0; // type:function size:0x88
dAcBomb_c_classInit__Fv = .text:0x80258E60; // type:function size:0x134
__dt__21sFState_c<9dAcBomb_c>Fv = .text:0x80258FA0; // type:function size:0x58
fn_80259000 = .text:0x80259000; // type:function size:0x6C
fn_80259070 = .text:0x80259070; // type:function size:0xA0
fn_80259110 = .text:0x80259110; // type:function size:0xA4
fn_802591C0 = .text:0x802591C0; // type:function size:0x28
fn_802591F0 = .text:0x802591F0; // type:function size:0x28
fn_80259220 = .text:0x80259220; // type:function size:0x338
fn_80259560 = .text:0x80259560; // type:function size:0x10
fn_80259570 = .text:0x80259570; // type:function size:0x30
__dt__24sFStateFct_c<9dAcBomb_c>Fv = .text:0x80259000; // type:function size:0x6C
__dt__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80259070; // type:function size:0xA0
__dt__47sFStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c>Fv = .text:0x80259110; // type:function size:0xA4
coHitCallback__9dAcBomb_cFP8cCcD_Obj = .text:0x802591C0; // type:function size:0x28
dAcBomb_coHitCallback__FP12dAcObjBase_cP8cCcD_ObjP12dAcObjBase_cP8cCcD_Obj = .text:0x802591F0; // type:function size:0x28
tgHitCallback__9dAcBomb_cFP12dAcObjBase_cP8cCcD_ObjP8cCcD_Obj = .text:0x80259220; // type:function size:0x338
changeState__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x80259560; // type:function size:0x10
dAcBomb_tgHitCallback__FP12dAcObjBase_cP8cCcD_ObjP12dAcObjBase_cP8cCcD_Obj = .text:0x80259570; // type:function size:0x30
createHeap__9dAcBomb_cFv = .text:0x802595A0; // type:function size:0xC0
AcBomb__create = .text:0x80259660; // type:function size:0x3D8
fn_80259A40 = .text:0x80259A40; // type:function size:0x84
fn_80259AD0 = .text:0x80259AD0; // type:function size:0x2C
fn_80259B00 = .text:0x80259B00; // type:function size:0x304
fn_80259E10 = .text:0x80259E10; // type:function size:0x68
fn_80259E80 = .text:0x80259E80; // type:function size:0xB0
fn_80259F30 = .text:0x80259F30; // type:function size:0x58
create__9dAcBomb_cFv = .text:0x80259660; // type:function size:0x3D8
unkVirtFunc_0x5C__9dAcBomb_cFv = .text:0x80259A40; // type:function size:0x84
doDelete__9dAcBomb_cFv = .text:0x80259AD0; // type:function size:0x2C
checkExplode__9dAcBomb_cFv = .text:0x80259B00; // type:function size:0x304
setRoomId__9dAcBomb_cFv = .text:0x80259E10; // type:function size:0x68
setSmokePos__9dAcBomb_cFv = .text:0x80259E80; // type:function size:0xB0
checkWaterIn__9dAcBomb_cFv = .text:0x80259F30; // type:function size:0x58
setTransformFromFlower__9dAcBomb_cFRC6mMtx_c = .text:0x80259F90; // type:function size:0x150
fn_8025A0E0 = .text:0x8025A0E0; // type:function size:0x20
fn_8025A100 = .text:0x8025A100; // type:function size:0x50
fn_8025A150 = .text:0x8025A150; // type:function size:0x94
fn_8025A1F0 = .text:0x8025A1F0; // type:function size:0x1CC
AcBomb__stateExplodeEnter = .text:0x8025A3C0; // type:function size:0x690
fn_8025AA50 = .text:0x8025AA50; // type:function size:0x10
AcBomb__stateExplodeUpdate = .text:0x8025AA60; // type:function size:0x68
AcBomb__stateExplodeLeave = .text:0x8025AAD0; // type:function size:0x4
AcBomb__stateCarryEnter = .text:0x8025AAE0; // type:function size:0x13C
AcBomb__stateCarryUpdate = .text:0x8025AC20; // type:function size:0x1EC
AcBomb__stateCarryLeave = .text:0x8025AE10; // type:function size:0x68
fn_8025AE80 = .text:0x8025AE80; // type:function size:0x10
AcBomb__stateWaitEnter = .text:0x8025AE90; // type:function size:0x40
AcBomb__stateWaitUpdate = .text:0x8025AED0; // type:function size:0xBBC
AcBomb__stateWaitLeave = .text:0x8025BA90; // type:function size:0x1C
AcBomb__stateFlowerWaitEnter = .text:0x8025BAB0; // type:function size:0x48
AcBomb__stateFlowerWaitUpdate = .text:0x8025BB00; // type:function size:0x224
AcBomb__stateFlowerWaitLeave = .text:0x8025BD30; // type:function size:0x7C
AcBomb__stateWindCarryEnter = .text:0x8025BDB0; // type:function size:0x94
AcBomb__stateWindCarryUpdate = .text:0x8025BE50; // type:function size:0x13C
AcBomb__stateWindCarryLeave = .text:0x8025BF90; // type:function size:0x4
fn_8025BFA0 = .text:0x8025BFA0; // type:function size:0x230
fn_8025C1D0 = .text:0x8025C1D0; // type:function size:0xF8
fn_8025C2D0 = .text:0x8025C2D0; // type:function size:0xF0
fn_8025C3C0 = .text:0x8025C3C0; // type:function size:0xB8
fn_8025C480 = .text:0x8025C480; // type:function size:0x70
AcBomb__update = .text:0x8025C4F0; // type:function size:0x7A0
fn_8025CC90 = .text:0x8025CC90; // type:function size:0x10
fn_8025CCA0 = .text:0x8025CCA0; // type:function size:0x148
fn_8025CDF0 = .text:0x8025CDF0; // type:function size:0x140
fn_8025CF30 = .text:0x8025CF30; // type:function size:0x60
fn_8025CF90 = .text:0x8025CF90; // type:function size:0xC
fn_8025CFA0 = .text:0x8025CFA0; // type:function size:0x1C
fn_8025CFC0 = .text:0x8025CFC0; // type:function size:0x1C
fn_8025CFE0 = .text:0x8025CFE0; // type:function size:0x1C
fn_8025D000 = .text:0x8025D000; // type:function size:0x10
fn_8025D010 = .text:0x8025D010; // type:function size:0x10
fn_8025D020 = .text:0x8025D020; // type:function size:0x10
fn_8025D030 = .text:0x8025D030; // type:function size:0x10
fn_8025D040 = .text:0x8025D040; // type:function size:0x30
fn_8025D070 = .text:0x8025D070; // type:function size:0x30
fn_8025D0A0 = .text:0x8025D0A0; // type:function size:0x30
AcBomb__sinit = .text:0x8025D0D0; // type:function size:0x420
AcBomb__state_dtor = .text:0x8025D4F0; // type:function size:0x58
fn_8025D550 = .text:0x8025D550; // type:function size:0x88
setPickupTarget__9dAcBomb_cFv = .text:0x8025A0E0; // type:function size:0x20
lookAt__9dAcBomb_cFv = .text:0x8025A100; // type:function size:0x50
bounceWall__9dAcBomb_cF4mAng = .text:0x8025A150; // type:function size:0x94
getVelocity__9dAcBomb_cFR7mVec3_c = .text:0x8025A1F0; // type:function size:0x1CC
initializeState_Explode__9dAcBomb_cFv = .text:0x8025A3C0; // type:function size:0x690
getOldStateID__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8025AA50; // type:function size:0x10
executeState_Explode__9dAcBomb_cFv = .text:0x8025AA60; // type:function size:0x68
finalizeState_Explode__9dAcBomb_cFv = .text:0x8025AAD0; // type:function size:0x4
initializeState_Carry__9dAcBomb_cFv = .text:0x8025AAE0; // type:function size:0x13C
executeState_Carry__9dAcBomb_cFv = .text:0x8025AC20; // type:function size:0x1EC
finalizeState_Carry__9dAcBomb_cFv = .text:0x8025AE10; // type:function size:0x68
getNewStateID__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8025AE80; // type:function size:0x10
initializeState_Wait__9dAcBomb_cFv = .text:0x8025AE90; // type:function size:0x40
executeState_Wait__9dAcBomb_cFv = .text:0x8025AED0; // type:function size:0xBBC
finalizeState_Wait__9dAcBomb_cFv = .text:0x8025BA90; // type:function size:0x1C
initializeState_FlowerWait__9dAcBomb_cFv = .text:0x8025BAB0; // type:function size:0x48
executeState_FlowerWait__9dAcBomb_cFv = .text:0x8025BB00; // type:function size:0x224
finalizeState_FlowerWait__9dAcBomb_cFv = .text:0x8025BD30; // type:function size:0x7C
initializeState_WindCarry__9dAcBomb_cFv = .text:0x8025BDB0; // type:function size:0x94
executeState_WindCarry__9dAcBomb_cFv = .text:0x8025BE50; // type:function size:0x13C
finalizeState_WindCarry__9dAcBomb_cFv = .text:0x8025BF90; // type:function size:0x4
setBombColor__9dAcBomb_cFv = .text:0x8025BFA0; // type:function size:0x230
rollTo__9dAcBomb_cFRC7mVec3_c = .text:0x8025C1D0; // type:function size:0xF8
rollToInternal__9dAcBomb_cFRC7mVec3_c = .text:0x8025C2D0; // type:function size:0xF0
registerInEvent__9dAcBomb_cFv = .text:0x8025C3C0; // type:function size:0xB8
unkVirtFunc_0x6C__9dAcBomb_cFv = .text:0x8025C480; // type:function size:0x70
actorExecute__9dAcBomb_cFv = .text:0x8025C4F0; // type:function size:0x7A0
executeState__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8025CC90; // type:function size:0x10
draw__9dAcBomb_cFv = .text:0x8025CCA0; // type:function size:0x148
__dt__9dAcBomb_cFv = .text:0x8025CDF0; // type:function size:0x140
build__24sFStateFct_c<9dAcBomb_c>FRC12sStateIDIf_c = .text:0x8025CF30; // type:function size:0x60
dispose__24sFStateFct_c<9dAcBomb_c>FRP10sStateIf_c = .text:0x8025CF90; // type:function size:0xC
initialize__21sFState_c<9dAcBomb_c>Fv = .text:0x8025CFA0; // type:function size:0x1C
execute__21sFState_c<9dAcBomb_c>Fv = .text:0x8025CFC0; // type:function size:0x1C
finalize__21sFState_c<9dAcBomb_c>Fv = .text:0x8025CFE0; // type:function size:0x1C
initializeState__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8025D000; // type:function size:0x10
finalizeState__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8025D010; // type:function size:0x10
refreshState__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8025D020; // type:function size:0x10
getState__77sStateMgr_c<9dAcBomb_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8025D030; // type:function size:0x10
finalizeState__23sFStateID_c<9dAcBomb_c>CFR9dAcBomb_c = .text:0x8025D040; // type:function size:0x30
executeState__23sFStateID_c<9dAcBomb_c>CFR9dAcBomb_c = .text:0x8025D070; // type:function size:0x30
initializeState__23sFStateID_c<9dAcBomb_c>CFR9dAcBomb_c = .text:0x8025D0A0; // type:function size:0x30
__sinit_\d_a_obj_bomb_cpp = .text:0x8025D0D0; // type:function size:0x420
__dt__23sFStateID_c<9dAcBomb_c>Fv = .text:0x8025D4F0; // type:function size:0x58
isSameName__23sFStateID_c<9dAcBomb_c>CFPCc = .text:0x8025D550; // type:function size:0x88
dAcArrow_c_classInit__Fv = .text:0x8025D5E0; // type:function size:0x110
__dt__23sFState_c<10dAcArrow_c>Fv = .text:0x8025D6F0; // type:function size:0x58
__dt__26sFStateFct_c<10dAcArrow_c>Fv = .text:0x8025D750; // type:function size:0x6C
@@ -14493,26 +14493,26 @@ destroy__12dThpPlayer_cFv = .text:0x80273A40; // type:function size:0x98
isDone__12dThpPlayer_cFv = .text:0x80273AE0; // type:function size:0x2C
draw__14ThpVideoScreenFv = .text:0x80273B10; // type:function size:0x38
THPVideoDecodeLC = .text:0x80273B50; // type:function size:0x68
TgAlldie__ctor = .text:0x80273BC0; // type:function size:0x5C
TgAlldie__init = .text:0x80273C20; // type:function size:0x74
fn_80273CA0 = .text:0x80273CA0; // type:function size:0x8
TgAlldie__update = .text:0x80273CB0; // type:function size:0x26C
fn_80273F20 = .text:0x80273F20; // type:function size:0x8
fn_80273F30 = .text:0x80273F30; // type:function size:0xD0
fn_80274000 = .text:0x80274000; // type:function size:0x5C
TgViewClip__ctor = .text:0x80274060; // type:function size:0x4C
TgViewClip__init = .text:0x802740B0; // type:function size:0x74
fn_80274130 = .text:0x80274130; // type:function size:0x8
fn_80274140 = .text:0x80274140; // type:function size:0x8
TgViewClip__draw = .text:0x80274150; // type:function size:0xC0
fn_80274210 = .text:0x80274210; // type:function size:0x8
resetViewClipVals = .text:0x80274220; // type:function size:0x40
getViewClipCull = .text:0x80274260; // type:function size:0x80
fn_802742E0 = .text:0x802742E0; // type:function size:0x44
checkIdxMask = .text:0x80274330; // type:function size:0x14
fn_80274350 = .text:0x80274350; // type:function size:0x18
setViewClipVals = .text:0x80274370; // type:function size:0x10
fn_80274380 = .text:0x80274380; // type:function size:0x5C
dTgAllDie_c_classInit__Fv = .text:0x80273BC0; // type:function size:0x5C
create__11dTgAllDie_cFv = .text:0x80273C20; // type:function size:0x74
doDelete__11dTgAllDie_cFv = .text:0x80273CA0; // type:function size:0x8
actorExecute__11dTgAllDie_cFv = .text:0x80273CB0; // type:function size:0x26C
draw__11dTgAllDie_cFv = .text:0x80273F20; // type:function size:0x8
getNearestToPlayer__11dTgAllDie_cFl = .text:0x80273F30; // type:function size:0xD0
__dt__11dTgAllDie_cFv = .text:0x80274000; // type:function size:0x5C
dTgViewClip_c_classInit__Fv = .text:0x80274060; // type:function size:0x4C
create__13dTgViewClip_cFv = .text:0x802740B0; // type:function size:0x74
doDelete__13dTgViewClip_cFv = .text:0x80274130; // type:function size:0x8
actorExecute__13dTgViewClip_cFv = .text:0x80274140; // type:function size:0x8
draw__13dTgViewClip_cFv = .text:0x80274150; // type:function size:0xC0
setViewClip__13dTgViewClip_cFUc = .text:0x80274210; // type:function size:0x8
resetViewClip__13dTgViewClip_cFv = .text:0x80274220; // type:function size:0x40
getCull__13dTgViewClip_cFlf = .text:0x80274260; // type:function size:0x80
checkForceOn__13dTgViewClip_cFl = .text:0x802742E0; // type:function size:0x44
getViewClipBit__13dTgViewClip_cFlUc = .text:0x80274330; // type:function size:0x14
setViewClipBit__13dTgViewClip_cFlUc = .text:0x80274350; // type:function size:0x18
setViewClip__13dTgViewClip_cFlUc = .text:0x80274370; // type:function size:0x10
__dt__13dTgViewClip_cFv = .text:0x80274380; // type:function size:0x5C
dTgSw_c_classInit__Fv = .text:0x802743E0; // type:function size:0xBC
__dt__19sFState_c<7dTgSw_c>Fv = .text:0x802744A0; // type:function size:0x58 scope:weak
__dt__22sFStateFct_c<7dTgSw_c>Fv = .text:0x80274500; // type:function size:0x6C scope:weak
@@ -36307,7 +36307,7 @@ __vt__13dAcItemBase_c = .data:0x80534098; // type:object size:0x94
lbl_80534130 = .data:0x80534130; // type:object size:0x32C
__vt__23sFStateID_c<9dAcItem_c> = .data:0x8053445C; // type:object size:0x34
g_profile_BOMB = .data:0x80534490; // type:object size:0x10
lbl_805344A0 = .data:0x805344A0; // type:object size:0x2C
sSphSrc = .data:0x805344A0; // type:object size:0x2C
lbl_805344CC = .data:0x805344CC; // type:object size:0xA data:string
lbl_805344D8 = .data:0x805344D8; // type:object size:0x17 data:string
jumptable_805344F0 = .data:0x805344F0; // type:object size:0x20 scope:local
@@ -36470,9 +36470,9 @@ g_profile_THPPLAYER = .data:0x80535FB8; // type:object size:0xC
__vt__12dThpPlayer_c = .data:0x80536040; // type:object size:0x4C
__vt__14ThpVideoScreen = .data:0x80536090; // type:object size:0x10
g_profile_ALLDIE_TAG = .data:0x805360A0; // type:object size:0x10
TgAlldie__vtable = .data:0x805360B0; // type:object size:0x78
__vt__11dTgAllDie_c = .data:0x805360B0; // type:object size:0x74
g_profile_VIEW_CLIP_TAG = .data:0x80536128; // type:object size:0x10
TgViewClip__vtable = .data:0x80536138; // type:object size:0x78
__vt__13dTgViewClip_c = .data:0x80536138; // type:object size:0x74
g_profile_SW_TAG = .data:0x805361B0; // type:object size:0x10
...data.0 = .data:0x805361B0; // type:label scope:local
@5858 = .data:0x805361C0; // type:object size:0xD scope:local data:string
@@ -42206,7 +42206,7 @@ s_Create_Scale__9dAcBase_c = .sbss:0x80575088; // type:object size:0x4 data:4byt
s_Create_Parent__9dAcBase_c = .sbss:0x8057508C; // type:object size:0x4 data:4byte
s_Create_ActorInfo__9dAcBase_c = .sbss:0x80575090; // type:object size:0x4 data:4byte
s_Create_Subtype__9dAcBase_c = .sbss:0x80575094; // type:object size:0x1 data:byte
ENEMY_LIST = .sbss:0x80575098; // type:object size:0x8 data:4byte
sEnemyList__11dAcEnBase_c = .sbss:0x80575098; // type:object size:0x8 data:4byte
NPC_ACTOR_LIST = .sbss:0x805750A0; // type:object size:0x8 data:4byte
lbl_805750A8 = .sbss:0x805750A8; // type:object size:0x8 data:4byte
lbl_805750B0 = .sbss:0x805750B0; // type:object size:0x8 data:2byte
@@ -52451,11 +52451,11 @@ AcItem__STATE_RESURGE_WAIT = .bss:0x805B47F8; // type:object size:0x40 data:4byt
AcItem__STATE_WAIT_TURN_OFF = .bss:0x805B4838; // type:object size:0x40 data:4byte
AcItem__STATE_WAIT_SACRED_DEW_GET_EFFECT = .bss:0x805B4878; // type:object size:0x30 data:4byte
lbl_805B48A8 = .bss:0x805B48A8; // type:object size:0x10
AcBomb__STATE_WAIT = .bss:0x805B48B8; // type:object size:0x40 data:4byte
StateID_FlowerWait__9dAcBomb_c = .bss:0x805B48F8; // type:object size:0x40 data:4byte
AcBomb__STATE_EXPLODE = .bss:0x805B4938; // type:object size:0x40 data:4byte
AcBomb__STATE_CARRY = .bss:0x805B4978; // type:object size:0x40 data:4byte
AcBomb__STATE_WIND_CARRY = .bss:0x805B49B8; // type:object size:0x30 data:4byte
StateID_Wait__9dAcBomb_c = .bss:0x805B48B8; // type:object size:0x30 data:4byte
StateID_FlowerWait__9dAcBomb_c = .bss:0x805B48F8; // type:object size:0x30 data:4byte
StateID_Explode__9dAcBomb_c = .bss:0x805B4938; // type:object size:0x30 data:4byte
StateID_Carry__9dAcBomb_c = .bss:0x805B4978; // type:object size:0x30 data:4byte
StateID_WindCarry__9dAcBomb_c = .bss:0x805B49B8; // type:object size:0x30 data:4byte
lbl_805B49E8 = .bss:0x805B49E8; // type:object size:0x10
lbl_805B49F8 = .bss:0x805B49F8; // type:object size:0xA8
AcArrow__STATE_WAIT = .bss:0x805B4AA0; // type:object size:0x40 data:4byte
@@ -52522,7 +52522,7 @@ StateID_OffWait__8dAcOsw_c = .bss:0x805B55B8; // type:object size:0x30 data:4byt
StateID_Off__8dAcOsw_c = .bss:0x805B55F8; // type:object size:0x30 data:4byte
@8419 = .bss:0x805B5628; // type:object size:0xC scope:local
StateID_None__8dAcOsw_c = .bss:0x805B5638; // type:object size:0x30 data:4byte
ViewClip_Vals = .bss:0x805B5668; // type:object size:0x40
sViewClips__13dTgViewClip_c = .bss:0x805B5668; // type:object size:0x40
@5114 = .bss:0x805B56A8; // type:object size:0xC scope:local
...bss.0 = .bss:0x805B56A8; // type:label scope:local
StateID_OnWait__7dTgSw_c = .bss:0x805B56B8; // type:object size:0x30 data:4byte
+2 -2
View File
@@ -647,8 +647,8 @@ config.libs = [
Object(NonMatching, "d/a/obj/d_a_obj_time_area.cpp"),
Object(Matching, "d/a/obj/d_a_obj_switch.cpp"),
Object(Matching, "d/d_thp_player.cpp"),
Object(NonMatching, "d/tg/d_t_alldie.cpp"),
Object(NonMatching, "d/tg/d_t_view_clip.cpp"),
Object(Matching, "d/tg/d_t_alldie.cpp"),
Object(Matching, "d/tg/d_t_view_clip.cpp"),
Object(Matching, "d/tg/d_t_switch.cpp"),
Object(NonMatching, "d/tg/d_t_mass_object.cpp"),
Object(NonMatching, "d/tg/d_t_camera.cpp"),
+1 -2
View File
@@ -12,7 +12,6 @@ public:
dAcBombf_c() : mStateMgr(*this) {}
virtual ~dAcBombf_c() {}
virtual bool createHeap() override;
virtual int create() override;
virtual int actorExecute() override;
virtual int draw() override;
virtual int doDelete() override;
@@ -31,7 +30,7 @@ private:
/* 0x394 */ UNKWORD field_0x394;
/* 0x398 */ cBgS_PolyInfo field_0x398;
/* 0x3C4 */ TimeAreaStruct mTimeAreaStruct;
/* 0x3D0 */ bool field_0x3D0;
/* 0x3D0 */ bool mIsUnderground;
/* 0x3D1 */ u8 mDespawnSceneFlag;
/* 0x3D2 */ u8 field_0x3D2;
/* 0x3D3 */ u8 field_0x3D3;
+56 -4
View File
@@ -4,6 +4,7 @@
#include "common.h"
#include "d/a/d_a_base.h"
#include "d/a/d_a_item.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/col/c/c_bg_s_poly_info.h"
#include "d/d_player_mdl.h"
#include "m/m_angle.h"
@@ -32,13 +33,44 @@ public:
/* vt 0x314 */ virtual void vt_0x314();
/* vt 0x318 */ virtual void vt_0x318();
struct ObjectArray {
static const size_t sNumObjects = 16;
bool insert(dAcObjBase_c *);
void execute();
dAcObjBase_c *get(s32 index);
void removeBombs();
dAcObjRef_c mObjs[sNumObjects];
u32 mCounter[sNumObjects];
};
protected:
/* 0x137C */ u8 _0x137C[0x16F0 - 0x137C];
/* 0x137C */ ObjectArray mOwnedObjects;
/* 0x147C */ ObjectArray mOwnedProjectiles;
/* 0x157C */ u8 _0x157C[0x16F0 - 0x157C];
/* 0x16F0 */ nw4r::g3d::ResFile mHeldResFile;
/* 0x16F4 */ u8 _0x16F4[0x4564 - 0x16F4];
/* 0x4564 */ f32 field_0x4564;
public:
// Bomb Function [0x80202CA0 - 0x80202DF0?]
static f32 getBombDistanceUnknown0();
static s32 getBombExplodeTimer();
static f32 getBombAcceleration();
static f32 getBombMaxSpeed();
static f32 getBombUnknown0_0();
static f32 getBombUnknown0_1();
static f32 getBombUnknown1_0();
static f32 getBombUnknown1_1();
static f32 getBombAcceleration_1();
static f32 getBombMaxSpeed_1();
static f32 getBombBounceSpeed();
static f32 getBombParticleScale();
static f32 getBombExplodeRadius();
static f32 getBombStopSpeedY();
static f32 getBombMaxSpeedY();
// Beetle Functions [0x8021AA70 - 0x8021BE20]
s16 getBeetleFlightTime();
mAng getBeetleAngle0();
@@ -58,6 +90,7 @@ public:
void setBeetleFlashClr(const mColor &);
void setBeetleBackAnim();
s32 getBeetleWarningTimeLeft();
void setBeetleReleasedObject(dAcObjBase_c *pObj);
// Item select/equip/use functions [0x801E3160 - 0x801E7AD0] ?
static s32 calcItemWheelSelection(bool reset, s32 numOptions);
@@ -75,6 +108,20 @@ public:
f32 fn_802097C0(); // 1000.0f
f32 fn_802097D0(); // 4000.0f
// Minigame Functions [0x8023BB60 - 0x8023BDD0]
static bool isInMinigameInsectCapture();
static bool isInMinigamePumpkinCarry();
static bool isInMinigameBambooCutting();
static bool isInMinigameThrillDigger();
static bool isInMinigameFunFunIsland();
static bool isInMinigameHouseCleaning();
static bool isInMinigameTrialTimeAttack();
static bool isInMinigameBossRush();
static bool isInMinigamePumpkinArchery();
static bool isInMinigameHarpPlaying();
static bool isInMinigameRollerCoaster();
static bool isInMinigameSprialChargeTutorial();
public:
f32 getField_0x4564() const {
return field_0x4564;
@@ -117,6 +164,14 @@ public:
return LINK2;
}
static bool insertOwnedObject(dAcObjBase_c *pObj) {
return LINK2->mOwnedObjects.insert(pObj);
}
ObjectArray &getOwnedObjects() {
return mOwnedObjects;
}
void onShieldUpdate();
static dAcPy_c *LINK;
@@ -130,9 +185,6 @@ public:
}
static s32 getCurrentBugNetType();
static bool isInBambooCuttingMinigame() {
return MinigameManager::isInMinigameState(MinigameManager::BAMBOO_CUTTING);
}
static bool isItemRestrictedByBokoBase(ITEM_ID item);
static u32 getCurrentHealthCapacity();
+6
View File
@@ -5,6 +5,7 @@
#include "d/a/obj/d_a_obj_base.h"
#include "d/a/obj/d_a_obj_bomb.h"
#include "d/d_cc.h"
#include "f/f_list_mg.h"
#include "m/m3d/m_mdl.h"
#include "m/m_angle.h"
#include "m/m_vec.h"
@@ -86,6 +87,7 @@ public:
bool fn_80030570(m3d::mdl_c &, u8, f32); // lighting related
void fn_800306D0();
void fn_80030700();
static void fn_800307E0(mVec3_c *pPos, s32);
dAcObjBase_c *targetPlayerOrScrapper(f32 biasToScrapper);
static void fn_80030980(m3d::mdl_c &, s32, bool markDirty);
bool isWithinCameraView(f32, f32);
@@ -95,6 +97,10 @@ public:
bool ChkCrossPlayer(f32 height);
static dAcEnBase_c *GetNextEnemy(dAcEnBase_c *pParent) {
return static_cast<dAcEnBase_c *>(getNextObject(&sEnemyList, pParent));
}
protected:
// TODO: Make accessors for this list to auto-convert to dAcEnBase?
static fLiMgBa_c sEnemyList;
-3
View File
@@ -1,7 +1,6 @@
#ifndef D_A_OBJ_BASE_H
#define D_A_OBJ_BASE_H
#include "c/c_math.h"
#include "common.h"
#include "d/a/d_a_base.h"
#include "d/a/d_a_salbage_if.h"
@@ -14,11 +13,9 @@
#include "m/m3d/m_shadow.h"
#include "m/m3d/m_smdl.h"
#include "m/m_angle.h"
#include "m/m_color.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
#include "m/types_m.h"
#include "nw4r/math/math_arithmetic.h"
// Ghidra: ActorObjectBase
// size: 0x330
+111 -28
View File
@@ -9,25 +9,64 @@
#include "d/col/cc/d_cc_d.h"
#include "d/d_shadow.h"
#include "m/m3d/m_smdl.h"
#include "m/m_angle.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
#include "s/s_StateID.hpp"
#include "toBeSorted/d_emitter.h"
// This may need its own file and could be independent of a bomb
class UnkBombColInfo : public cBgS_PolyInfo {
public:
UnkBombColInfo() : field_0x10(0), field_0x14(0), field_0x18(0) {}
u32 field_0x10;
u32 field_0x14;
u32 field_0x18;
};
class dAcBomb_c : public dAcObjBase_c {
public:
dAcBomb_c() : mStateMgr(*this), mSelfRef(this), mEffect1(this), mEffect2(this) {}
virtual ~dAcBomb_c();
dAcBomb_c() : mStateMgr(*this), mUnkRef(this), mEffect1(this), mEffect2(this) {}
virtual ~dAcBomb_c() {}
enum Type_e {
BOMB_0 = 0, // Explode
BOMBF = 1,
BOMBF_CRAWLSPACE = 2,
BOMB_PLAYER_CARRY = 3, // Carry
BOMB_4 = 4, // Explode
BOMB_5 = 5, // Flower
BOMB_EXPLODE_NO_DAMAGE = 6,
BOMB_BOCO_CARRY = 7,
BOMB_MAX,
};
enum Flag_e {
FLAG_PLAYER_MAKE = (1 << 0),
FLAG_CHAIN_BOMB = (1 << 1), // When another bomb blows another bomb up
FLAG_BOMB_HIT = (1 << 2),
FLAG_0x8 = (1 << 3),
FLAG_0x10 = (1 << 4),
FLAG_UNDERWATER = (1 << 5),
FLAG_0x40 = (1 << 6),
FLAG_0x80 = (1 << 7),
FLAG_0x100 = (1 << 8),
FLAG_NEAR_TIMEDOOR = (1 << 9),
FLAG_0x400 = (1 << 10),
FLAG_FALL_IN_WATER = (1 << 11),
FLAG_DELETE_BOMB = (1 << 12),
FLAG_0x2000 = (1 << 13),
FLAG_0x4000 = (1 << 14),
FLAG_0x8000 = (1 << 15),
FLAG_0x10000 = (1 << 16),
FLAG_0x20000 = (1 << 17),
FLAG_ROLL = (1 << 18),
FLAG_0x80000 = (1 << 19),
FLAG_0x100000 = (1 << 20),
FLAG_0x200000 = (1 << 21),
FLAG_0x400000 = (1 << 22),
FLAG_FUSE_PAUSED = (1 << 23), // Like in cutscenes
FLAG_FLOWER = (1 << 24),
FLAG_BEETLE_CARRY = (1 << 25),
FLAG_0x4000000 = (1 << 26),
FLAG_BOKO_CARRY = (1 << 27),
FLAG_0x10000000 = (1 << 28),
FLAG_0x20000000 = (1 << 29),
FLAG_0x40000000 = (1 << 30),
FLAG_0x80000000 = (1 << 31),
};
/* vt 0x08 */ virtual int create() override;
/* vt 0x14 */ virtual int doDelete() override;
@@ -44,36 +83,80 @@ public:
STATE_FUNC_DECLARE(dAcBomb_c, Carry);
STATE_FUNC_DECLARE(dAcBomb_c, WindCarry);
void setTransformFromFlower(const mMtx_c &);
STATE_MGR_DEFINE_UTIL_ISSTATE(dAcBomb_c);
STATE_MGR_DEFINE_UTIL_CHANGESTATE(dAcBomb_c);
STATE_MGR_DEFINE_UTIL_GETSTATEID(dAcBomb_c);
STATE_MGR_DEFINE_UTIL_GETOLDSTATEID(dAcBomb_c);
STATE_MGR_DEFINE_UTIL_GETNEWSTATEID(dAcBomb_c);
STATE_MGR_DEFINE_UTIL_EXECUTESTATE(dAcBomb_c);
void Off_0xA3C(u32 mask) {
field_0xA3C &= ~mask;
void coHitCallback(cCcD_Obj *i_objInfB);
void tgHitCallback(dAcObjBase_c *i_actorB, cCcD_Obj *i_objInfA, cCcD_Obj *i_objInfB);
void setTarget(const mVec3_c &t);
void setRoomId();
void setSmokePos();
bool checkWaterIn();
void setTransformFromFlower(const mMtx_c &);
void setPickupTarget();
bool checkExplode();
void lookAt();
void bounceWall(mAng angle);
void getVelocity(mVec3_c &out);
void setBombColor();
void rollTo(const mVec3_c &dir);
void rollToInternal(const mVec3_c &dir);
s16 getFuseTimer() const {
return mFuseTime;
}
void On_0xA3C(u32 mask) {
field_0xA3C |= mask;
bool checkFlag(u32 mask) const {
return (mFlag & mask);
}
void unsetFlag(u32 mask) {
mFlag &= ~mask;
}
void setFlag(u32 mask) {
mFlag |= mask;
}
u32 getBombType() const {
return mParams;
}
private:
bool createModel();
public:
/* 0x330 */ nw4r::g3d::ResFile mBrres;
/* 0x330 */ nw4r::g3d::ResFile mRes;
/* 0x334 */ m3d::smdl_c mMdl;
/* 0x350 */ dShadowCircle_c mShdw;
/* 0x358 */ dBgS_BombAcch mAcch;
/* 0x708 */ dBgS_AcchCir mAcchCir;
/* 0x764 */ dCcD_Sph mCcDSph;
/* 0x764 */ dCcD_Sph mSph;
/* 0x8B4 */ mMtx_c mMtx;
/* 0x8E4 */ dBgS_BombLinChk mLinChk;
/* 0x97C */ UnkBombColInfo mUnkInfo;
/* 0x9B4 */ u8 _9B4[0x9B8 - 0x9B4];
/* 0x9B8 */ dAcBomb_c *mSelfRef;
/* 0x9BC */ u8 _9BC[0x9D4 - 0x9BC];
/* 0x97C */ cBgS_PolyInfo mUnkInfo;
/* 0x9A8 */ dAcObjRef_unk mUnkRef;
/* 0x9D4 */ dEmitter_c mEffect1;
/* 0xA08 */ dEmitter_c mEffect2;
/* 0xA3C */ u32 field_0xA3C;
/* 0xA40 */ u32 field_0xA40;
/* 0xA44 */ s16 field_0xA44;
/* 0xA46 */ u8 _3[0xA50 - 0xA46];
/* 0xA3C */ u32 mFlag;
/* 0xA40 */ u8 mRollFrameTimer; // Set to `60` upon roll - Uses additional force to roll bomb
/* 0xA41 */ u8 mMainMatID;
/* 0xA42 */ u8 field_0xA42;
/* 0xA44 */ s16 mFuseTime;
/* 0xA46 */ u16 mCarryTimer;
/* 0xA48 */ mAng mGndAngle;
/* 0xA4A */ mAng mRollRotationY;
/* 0xA4C */ f32 mRollSpeed;
/* 0xA50 */ f32 field_0xA50;
/* 0xA54 */ u8 _4[0xA9C - 0xA54];
/* 0xA54 */ mVec3_c mSmokePosNext;
/* 0xA60 */ mVec3_c mSmokePosPrev;
/* 0xA6C */ mVec3_c mSmokePos;
/* 0xA78 */ mVec3_c mExternalTranslation;
/* 0xA84 */ mVec3_c mHitForce;
/* 0xA90 */ mVec3_c mStreamForce;
/* 0xA9C */ STATE_MGR_DECLARE(dAcBomb_c);
};
+1
View File
@@ -61,6 +61,7 @@ enum dBgPc_Attribute {
POLY_ATTR_DAMAGE = 13,
POLY_ATTR_SLOPE_RUN = 15,
POLY_ATTR_SAND_DEEP_SLOW = 16,
POLY_ATTR_CURSED_WATER = 17,
};
class dBgPc {
public:
+21 -6
View File
@@ -524,6 +524,12 @@ public:
const dBgS_GndChk &GetGnd() const {
return mGnd;
}
dBgS_WtrChk &GetWtr() {
return mWtr;
}
const dBgS_WtrChk &GetWtr() const {
return mWtr;
}
dBgS_RoofChk &GetRoof() {
return mRoof;
@@ -532,8 +538,17 @@ public:
return mRoof;
}
void SetField_0xD4(f32 v) {
field_0x0D4 = v;
void SetGndChkOffset(f32 v) {
mGndChkOffset = v;
}
void SetRoofCrrHeight(f32 v) {
mRoofCrrHeight = v;
}
void SetWaterCheckOffset(f32 v) {
mWtrCheckOffset = v;
}
void SetWtrChkMode(u8 v) {
mWtrMode = v;
}
public:
@@ -555,12 +570,12 @@ public:
/* 0x0A8 */ f32 field_0x0A8;
/* 0x0AC */ f32 field_0x0AC;
/* 0x0B0 */ f32 mGroundHeight;
/* 0x0B4 */ f32 field_0x0B4;
/* 0x0B4 */ f32 mGndChkOffset;
/* 0x0B8 */ cM3dGPla mPlane_0x0B8;
/* 0x0C8 */ f32 field_0x0C8;
/* 0x0CC */ f32 field_0x0CC;
/* 0x0D0 */ f32 mRoofHeight;
/* 0x0D4 */ f32 field_0x0D4;
/* 0x0D4 */ f32 mRoofCrrHeight;
/* 0x0D8 */ f32 field_0x0D8;
/* 0x0DC */ cBgS_PolyInfo *mpOutPolyInfo;
/* 0x0E0 */ f32 mRoofH_0x0E0;
@@ -572,9 +587,9 @@ public:
/* 0x1D0 */ f32 field_0x1D0;
/* 0x1D4 */ dBgS_GndChk mGnd;
/* 0x264 */ dBgS_RoofChk mRoof;
/* 0x2F4 */ f32 field_0x2F4;
/* 0x2F4 */ f32 mWtrCheckOffset;
/* 0x2F8 */ dBgS_WtrChk mWtr;
/* 0x390 */ u8 field_0x390;
/* 0x390 */ u8 mWtrMode;
/* 0x394 */ s32 field_0x394;
/* 0x398 */ mVec3_c field_0x398;
/* 0x3A4 */ mVec3_c field_0x3A4;
+17
View File
@@ -526,6 +526,9 @@ public:
void SetSrcModifer(u32 modifier) {
mSrc.mInfo.mModifier = modifier;
}
u32 GetSrcModifer() const {
return mSrc.mInfo.mModifier;
}
void OnSrcModifer(u32 m) {
mSrc.mInfo.mModifier |= m;
}
@@ -949,6 +952,10 @@ public:
mAt.SetCallback(cb);
}
void SetTgCallback(cCcD_HitCallback cb) {
mTg.SetCallback(cb);
}
void SetCoCallback(cCcD_HitCallback cb) {
mCo.SetCallback(cb);
}
@@ -1006,6 +1013,13 @@ public:
void OnAt_0x4000() {
mAt.OnSPrm(0x4000);
}
// Related to Beetle (no hook)
u32 ChkAt_0x4000() {
return mAt.MskSPrm(0x4000);
}
u32 GetAtSrcModifier() const {
return mAt.GetSrcModifer();
}
void SetAtInfo_0x0(u8 amount) {
@@ -1115,6 +1129,9 @@ public:
void ClrCo_0x400() {
mCo.OffSPrm(0x400);
}
u32 ChkCo_0x8000() {
return mCo.MskSPrm(0x8000);
}
void OnCo_0x8000() {
mCo.OnSPrm(0x8000);
}
+6 -1
View File
@@ -5,6 +5,7 @@
#include "d/col/c/c_m3d.h"
#include "m/m_angle.h"
#include "m/m_vec.h"
#include "nw4r/math/math_types.h"
#include "rvl/MTX/vec.h"
// Plane with a normal
@@ -29,8 +30,12 @@ public:
mD = -VECDotProduct(mNormal, point);
}
void SetupNP(const mVec3_c &normal, const mVec3_c &point) {
mNormal = normal;
mD = -nw4r::math::VEC3Dot(mNormal, point);
}
// Unused
// void SetupNP(const mVec3_c &, const mVec3_c &);
// bool getCrossY(const mVec3_c &, f32 *) const;
// void Set(const cM3dGPla *);
+3
View File
@@ -41,6 +41,9 @@ public:
dCcMassS_Mng &GetMassMng() {
return mMassMng;
}
void SetMass(cCcD_Obj *p_obj, u8 priority) {
mMassMng.SetObj(p_obj, priority);
}
void Ct();
void Dt();
+20 -7
View File
@@ -19,15 +19,15 @@ public:
public:
enum ConnectionType_e {
CONNECTION_0 = 0,
CONNECTION_1 = 1,
CONNECTION_1 = 1, // Standard
CONNECTION_2 = 2,
CONNECTION_3 = 3,
CONNECTION_4 = 4,
CONNECTION_5 = 5,
CONNECTION_6 = 6,
CONNECTION_7 = 7,
CONNECTION_8 = 8,
CONNECTION_9 = 9,
CONNECTION_4 = 4, // clawshot
CONNECTION_5 = 5, // Beetle
CONNECTION_6 = 6, // From Sword Swing?
CONNECTION_7 = 7, // Whip
CONNECTION_8 = 8, // Arrow/Heartf
CONNECTION_9 = 9, // Chandelier/lotus flower
};
enum State_e {
STATE_0 = 0,
@@ -87,6 +87,19 @@ public:
return field_0xA0->getArrowOffsetPosAndAngle(param_1, param_2, param_3, param_4, param_5);
}
dAcBase_c *getControllingActor() {
return static_cast<dAcBase_c *>(mControllingActor.p_owner);
}
void setField_0x8C_0x90(f32 f0, f32 f1) {
field_0x8C = f0;
field_0x90 = f1;
}
void setField_0x94_0x98(f32 f0, f32 f1) {
field_0x94 = f0;
field_0x98 = f1;
}
public:
void set(u32 flags, f32, f32, f32, void *unk);
bool tryAttach(dAcObjBase_c *, dAcObjBase_c *, dAcRefBase_c *, ConnectionType_e, bool);
+8 -3
View File
@@ -2,12 +2,13 @@
#define D_A_PLAYER_ACT_H
#include "d/a/d_a_base.h"
#include "d/a/obj/d_a_obj_bomb.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/d_player_base.h"
#include "m/m_vec.h"
class dAcEnBase_c;
class dAcOFairy_c;
class dAcBomb_c;
// Does this one have a vtable?
// Name unknown
@@ -247,7 +248,7 @@ public:
return false;
}
/* vt 0x1B8 */ virtual void canHandleGameOver() {}
/* vt 0x1BC */ virtual UNKWORD vt_0x1BC() {
/* vt 0x1BC */ virtual dAcObjBase_c *getBeetleHeldActor() {
return 0;
}
@@ -414,7 +415,7 @@ public:
/* vt 0x2A4 */ virtual bool isRunningUpWall() {
return false;
}
/* vt 0x2A8 */ virtual void lookTowardItem() {}
/* vt 0x2A8 */ virtual void lookTowardItem(const mVec3_c &, u32, mAng, f32, f32, f32) {}
/* vt 0x2AC */ virtual void vt_0x2AC() {}
/* vt 0x2B0 */ virtual void vt_0x2B0() {}
/* vt 0x2B4 */ virtual void triggerMoveEventMaybe(u32, u32, u32, const mVec3_c *, const mAng &, u32, u32) {}
@@ -550,6 +551,10 @@ public:
FLG0_HANGING_ITEM | FLG0_HANGING_LEDGE | FLG0_UNK_0x10 | FLG0_IN_AIR,
};
enum dAcPy_FLG1 {
ActFLG1_INCRAWLSPACE = 0x400000
};
inline bool checkFlags0x340(u32 mask) const {
return (someFlags_0x340 & mask) != 0;
}
+6 -1
View File
@@ -163,8 +163,13 @@ public:
s8 getCurrRoomId() const {
return curr_room_id;
}
bool isRoomID(s32 id) const {
return curr_room_id == id;
}
dFader_c& getFader() { return mFader; }
dFader_c &getFader() {
return mFader;
}
bool fn_801B3EE0();
void fn_801B3F20();
+8 -3
View File
@@ -6,7 +6,7 @@
/**
* @brief Gets a point on a XZ circle.
*
*
* @param center the circle center. Will also hold the result.
* @param angle the Y angle.
* @param radius the circle radius.
@@ -15,10 +15,15 @@ inline static void getXZCirclePoint(mVec3_c &center, const mAng &angle, f32 radi
center.x += radius * angle.sin();
center.z += radius * angle.cos();
}
inline static void setXYZCirclePoint(mVec3_c &center, const mAng &angle, f32 radius, f32 y) {
center.x = radius * angle.sin();
center.y = y;
center.z = radius * angle.cos();
}
/**
* @brief Converts a 2D vector to a 3D vector holding the original's vector coordinates in its XY components.
*
*
* @param v The 2D vector
* @return mVec3_c The 3D vector
*/
@@ -28,7 +33,7 @@ inline mVec3_c vec2ToVec3XY(const mVec2_c &v) {
/**
* @brief Computes left x right
*
*
* @param result the result
* @param left left operant
* @param right right operand
@@ -169,9 +169,6 @@ public:
virtual ~dLytMeterItemSelect_c() {}
static bool isInSpiralChargeTutorialMinigame();
static bool isInRollercoasterMinigame();
// This enum might be used externally too?
enum InternalItem_e {
I_BOMB_BAG,
+32
View File
@@ -0,0 +1,32 @@
#ifndef D_T_ALL_DIE_H
#define D_T_ALL_DIE_H
#include "d/t/d_tg.h"
#include "m/m_mtx.h"
#include "toBeSorted/time_area_mgr.h"
class dTgAllDie_c : public dTg_c {
public:
dTgAllDie_c() {}
virtual ~dTgAllDie_c() {}
virtual int create() override;
virtual int doDelete() override;
virtual int draw() override;
virtual int actorExecute() override;
static dTgAllDie_c *getNearestToPlayer(s32 roomId);
private:
/* 0x0FC */ mMtx_c mArea;
/* 0x12C */ TimeAreaStruct mTimeArea;
/* 0x138 */ s32 mNumEnemiesInArea;
/* 0x13C */ u16 mTimer0x13C;
/* 0x13E */ u8 mType;
/* 0x13F */ u8 mSceneflag;
/* 0x140 */ u8 mTimer0x140;
/* 0x144 */ u32 field_0x144;
/* 0x145 */ u8 field_0x148;
};
#endif
+49
View File
@@ -0,0 +1,49 @@
#ifndef D_T_VIEW_CLIP_H
#define D_T_VIEW_CLIP_H
#include "d/t/d_tg.h"
#include "m/m_mtx.h"
class dTgViewClip_c : public dTg_c {
public:
static const s32 sNumEntries = 0x40;
enum Flag_e {
FLAG_NORMAL = 0,
FLAG_FORCE_ON = (1 << 0),
FLAG_FORCE_OFF = (1 << 1),
};
enum Type_e {
TYPE_FORCE_ON,
TYPE_FORCE_OFF,
};
dTgViewClip_c() {}
virtual ~dTgViewClip_c() {}
virtual int create() override;
virtual int doDelete() override;
virtual int draw() override;
virtual int actorExecute() override;
void setViewClip(u8 setBit);
static void resetViewClip();
static f32 getCull(s32 idx, f32 cullDistance);
static bool checkForceOn(s32 idx);
static u8 getViewClipBit(s32 idx, u8 setBit);
static void setViewClipBit(s32 idx, u8 setBit);
static void setViewClip(s32 idx, u8 value);
private:
/* 0x0DC */ mMtx_c mArea;
/* 0x12C */ u8 mIndex;
/* 0x12D */ u8 mType;
/* 0x12E */ u8 mAreaIndex;
static u8 sViewClips[sNumEntries];
};
#endif
+10
View File
@@ -48,11 +48,21 @@
return *mStateMgr.getStateID() == value; \
}
#define STATE_MGR_DEFINE_UTIL_GETSTATEID(class_name) \
const sFStateID_c<class_name> &getStateID() const { \
return (sFStateID_c<class_name> &)*mStateMgr.getStateID(); \
}
#define STATE_MGR_DEFINE_UTIL_GETOLDSTATEID(class_name) \
const sFStateID_c<class_name> &getOldStateID() const { \
return (sFStateID_c<class_name> &)*mStateMgr.getOldStateID(); \
}
#define STATE_MGR_DEFINE_UTIL_GETNEWSTATEID(class_name) \
const sFStateID_c<class_name> &getNewStateID() const { \
return (sFStateID_c<class_name> &)*mStateMgr.getNewStateID(); \
}
// Use this when you need need sFStateID_c vtables to appear in a different order
#define STATE_MGR_DEFINE_UTIL_INSTANCIATE_STATE(class_name) \
bool dummy_need_state_instanciation(const sFStateID_c<class_name> &value) const { \
+32 -2
View File
@@ -31,12 +31,42 @@ public:
static MinigameManager *GetInstance() {
return sInstance;
}
static bool checkInBossRush() {
return isInMinigameState(BOSS_RUSH);
static bool checkInInsectCapture() {
return isInMinigameState(INSECT_CAPTURE);
}
static bool checkInPumpkinCarry() {
return isInMinigameState(PUMPKIN_CARRY);
}
static bool checkInBambooCutting() {
return isInMinigameState(BAMBOO_CUTTING);
}
static bool checkInThrillDigger() {
return isInMinigameState(THRILL_DIGGER);
}
static bool checkInFunFunIsland() {
return isInMinigameState(FUN_FUN_ISLAND);
}
static bool checkInHouseCleaning() {
return isInMinigameState(HOUSE_CLEANING);
}
static bool checkInTrialTimeAttack() {
return isInMinigameState(TRIAL_TIME_ATTACK);
}
static bool checkInBossRush() {
return isInMinigameState(BOSS_RUSH);
}
static bool checkInPumpkinArchery() {
return isInMinigameState(PUMPKIN_ARCHERY);
}
static bool checkInHarpPlaying() {
return isInMinigameState(HARP_PLAYING);
}
static bool checkInRollerCoaster() {
return isInMinigameState(ROLLERCOASTER);
}
static bool checkInSprialChargeTutorial() {
return isInMinigameState(SPIRAL_CHARGE_TUTORIAL);
}
private:
MinigameManager() {}
+3 -1
View File
@@ -41,7 +41,7 @@ struct TimeAreaStruct {
return fabsf(field_0x00) <= FLT_EPSILON;
}
f32 getDistMaybe() {
f32 getDistMaybe() const {
return field_0x00;
}
@@ -72,6 +72,8 @@ public:
s32 fn_800B9B60(s32 roomId, const mVec3_c &position);
f32 fn_800B9CE0(const mVec3_c &position);
static bool fn_800BBD40();
bool isInLanayruMiningFacility() const {
return mIsInLanayruMiningFacility;
}
+21 -17
View File
@@ -14,6 +14,13 @@ SPECIAL_ACTOR_PROFILE(BOMBF, dAcBombf_c, fProfile::BOMBF, 0x129, 0, 4099);
STATE_DEFINE(dAcBombf_c, Wait);
class dAcBombf_HIO_c {
public:
inline static const char *getBombName() {
return "Bomb";
}
};
bool dAcBombf_c::createHeap() {
nw4r::g3d::ResFile resFile(getOarcResFile("FlowerBomb"));
nw4r::g3d::ResMdl resMdl = resFile.GetResMdl("LeafBomb");
@@ -30,8 +37,8 @@ int dAcBombf_c::actorCreate() {
CREATE_ALLOCATOR(dAcBombf_c);
field_0x3D2 = (mParams >> 4) & 0xF;
field_0x3D0 = field_0x3D2 == 1;
if (field_0x3D0) {
mIsUnderground = field_0x3D2 == 1;
if (mIsUnderground) {
mModel.setPriorityDraw(0x82, 0x7F);
}
@@ -133,7 +140,7 @@ int dAcBombf_c::actorExecute() {
}
int dAcBombf_c::draw() {
if (field_0x3D0 != 0 && !dAcPy_c::LINK->checkActionFlagsCont(0x400000)) {
if (mIsUnderground != 0 && !dAcPy_c::LINK->checkActionFlagsCont(0x400000)) {
return SUCCEEDED;
}
drawModelType1(&mModel);
@@ -143,15 +150,12 @@ int dAcBombf_c::draw() {
void dAcBombf_c::regrowBomb() {
// These params are hell
s8 viewclip_idx = checkActorProperty(dAcBase_c::AC_PROP_0x1) ? mViewClipIdx : -1;
u32 actorParams1;
actorParams1 = 1;
if (field_0x3D0) {
actorParams1 = 2;
}
dAcObjBase_c *ac = dAcObjBase_c::create(
"Bomb", mRoomID, actorParams1, &mPosition, nullptr, nullptr, 0xFFFFFFFF, 0xFFFF, viewclip_idx
u32 bombType = mIsUnderground ? dAcBomb_c::BOMBF_CRAWLSPACE : dAcBomb_c::BOMBF;
const char *name = dAcBombf_HIO_c::getBombName();
dAcBomb_c *ac = static_cast<dAcBomb_c *>(
dAcObjBase_c::create(name, mRoomID, bombType, &mPosition, nullptr, nullptr, 0xFFFFFFFF, 0xFFFF, viewclip_idx)
);
mBombRef.link(static_cast<dAcBomb_c *>(ac));
mBombRef.link(ac);
dAcBomb_c *bomb = mBombRef.get();
if (bomb != nullptr) {
field_0x394 = 0x3C;
@@ -160,15 +164,13 @@ void dAcBombf_c::regrowBomb() {
bomb->setActorProperty(AC_PROP_0x1);
}
if (field_0x3D4 == 0) {
bomb->field_0xA44 *= 1.5f;
bomb->mFuseTime *= 1.5f;
}
}
}
void dAcBombf_c::initializeState_Wait() {}
extern "C" u16 lbl_8057A750;
void dAcBombf_c::executeState_Wait() {
if (SceneflagManager::sInstance->checkBoolFlag(mRoomID, mDespawnSceneFlag)) {
deleteRequest();
@@ -194,7 +196,9 @@ void dAcBombf_c::executeState_Wait() {
} else {
startSound(SE_TIMESLIP_TIMESLIP_REV);
}
dJEffManager_c::spawnEffect(lbl_8057A750, mPosition, nullptr, nullptr, nullptr, nullptr, 0, 0);
dJEffManager_c::spawnEffect(
PARTICLE_RESOURCE_ID_MAPPING_464_, mPosition, nullptr, nullptr, nullptr, nullptr, 0, 0
);
}
scaleFactor *= mTimeAreaStruct.field_0x00;
@@ -206,14 +210,14 @@ void dAcBombf_c::executeState_Wait() {
}
dAcBomb_c *bomb = mBombRef.get();
if (bomb != nullptr) {
if (!bomb->mStateMgr.isState(dAcBomb_c::StateID_FlowerWait) && field_0x3D0 == 0) {
if (!bomb->mStateMgr.isState(dAcBomb_c::StateID_FlowerWait) && mIsUnderground == 0) {
mBombRef.unlink();
field_0x394 = 0x3C;
}
} else {
if (field_0x394 != 0) {
field_0x394--;
} else if (field_0x3D0 == 0 || dAcPy_c::LINK->getSquareDistanceTo(mPosition) > 22500.0f) {
} else if (mIsUnderground == 0 || dAcPy_c::LINK->getSquareDistanceTo(mPosition) > 22500.0f) {
regrowBomb();
}
}
+7 -7
View File
@@ -187,7 +187,7 @@ void dAcEKs_c::setStartingState() {
changeState(StateID_Move);
mCurrentState = mStartingState;
mAcch.ClrRoofNone();
mAcch.SetField_0xD4(55.f);
mAcch.SetRoofCrrHeight(55.f);
mAcch.SetGroundUpY(30.f);
mAcchCir.SetWall(20.f, 60.f);
} break;
@@ -199,14 +199,14 @@ void dAcEKs_c::setStartingState() {
}
mAcch.ClrRoofHit();
mAcch.SetGroundUpY(0.f);
mAcch.SetField_0xD4(0.f);
mAcch.SetRoofCrrHeight(0.f);
mAcchCir.SetWall(0.f, 5.f);
} break;
case EKS_STARTSTATE_PathMove: {
mCurrentState = mStartingState;
mAcch.ClrRoofNone();
mAcch.SetField_0xD4(55.f);
mAcch.SetRoofCrrHeight(55.f);
mAcch.SetGroundUpY(30.f);
mAcchCir.SetWall(20.f, 60.f);
changeState(StateID_PathMove);
@@ -1789,7 +1789,7 @@ void dAcEKs_c::initializeState_Wait() {
mRotation.y = field_0xD8A;
mRotation.x = mAng(0);
mAcch.ClrRoofHit();
mAcch.SetField_0xD4(0);
mAcch.SetRoofCrrHeight(0);
mAcch.SetGroundUpY(0);
setBattleBgmRelated(0);
@@ -2042,7 +2042,7 @@ void dAcEKs_c::finalizeState_WakeUp() {
mAngle.y = mRotation.y;
mAcch.ClrRoofNone();
mAcchCir.SetWall(20, 60);
mAcch.SetField_0xD4(55);
mAcch.SetRoofCrrHeight(55);
mAcch.SetGroundUpY(30);
}
@@ -2116,7 +2116,7 @@ void dAcEKs_c::initializeState_WaitReady() {
field_0xDA5 = 0;
field_0xD50 = 30;
mAcch.ClrRoofHit();
mAcch.SetField_0xD4(0.f);
mAcch.SetRoofCrrHeight(0.f);
mAcch.SetGroundUpY(0.f);
field_0xDAD = 0;
field_0xDAE = 0;
@@ -2853,7 +2853,7 @@ void dAcEKs_c::initializeState_WindBlow() {
mAcceleration = -0.5f;
mAcch.ClrRoofNone();
mAcchCir.SetWall(20, 60);
mAcch.SetField_0xD4(55);
mAcch.SetRoofCrrHeight(55);
mAcch.SetGroundUpY(30);
}
void dAcEKs_c::executeState_WindBlow() {
+2 -2
View File
@@ -208,7 +208,7 @@ int dAcEremly_c::actorCreate() {
field_0xA50.z = mPosition.z;
mAcchCir.SetWall(mScaleF * 10.f, mScaleF * 60.f);
mAcch.SetField_0xD4(100.f + _weird_zero);
mAcch.SetRoofCrrHeight(100.f + _weird_zero);
field_0xB04 = 60.f;
if (mIsHorwellsPet == 0) {
@@ -1113,7 +1113,7 @@ void dAcEremly_c::initializeState_Fly() {
mYOffset = 0.f;
mAnmStep = 0;
mAcch.SetField_0xD4(f);
mAcch.SetRoofCrrHeight(f);
mVelocity.x = mVelocity.z = 0.f;
mSpeed = 0.f;
+3 -3
View File
@@ -164,7 +164,7 @@ int dAcEsm_c::actorCreate() {
mAcchCir.SetWall(mScaleTarget.y * 100.f, mScaleTarget.x * 100.f);
mStts.SetRank(10);
mObjAcch.SetGndThinCellingOff();
mObjAcch.field_0x390 = 1;
mObjAcch.SetWtrChkMode(1);
mMaxSpeed = -40.f;
@@ -1093,8 +1093,8 @@ bool dAcEsm_c::fn_187_4B50() {
if (mBombRef.isLinked()) {
dAcBomb_c *pBomb = mBombRef.get();
if (pBomb) {
pBomb->On_0xA3C(0x4);
pBomb->Off_0xA3C(0x800000);
pBomb->setFlag(dAcBomb_c::FLAG_BOMB_HIT);
pBomb->unsetFlag(dAcBomb_c::FLAG_FUSE_PAUSED);
mBombRef.unlink();
}
+7 -3
View File
@@ -5,6 +5,7 @@
#include "d/a/d_a_base.h"
#include "d/a/d_a_item.h"
#include "d/a/d_a_player.h"
#include "d/a/e/d_a_en_base.h"
#include "d/a/npc/d_a_npc_ce_friend.h"
#include "d/a/npc/d_a_npc_ce_lady.h"
#include "d/a/obj/d_a_obj_base.h"
@@ -91,7 +92,11 @@ static dCcD_SrcCyl sSrcCyl = {
{
/* mObjAt */ {AT_TYPE_PHYSICS, 0x10013, {0, 0, 0}, 4, 0, 0, 0, 0, 0},
/* mObjTg */
{~(AT_TYPE_BUGNET | AT_TYPE_BEETLE | AT_TYPE_GLITTERING_SPORES | AT_TYPE_0x8000), 0x2000111, {0, 0xF, 0x407}, 0, 0},
{~(AT_TYPE_BUGNET | AT_TYPE_BEETLE | AT_TYPE_GLITTERING_SPORES | AT_TYPE_0x8000),
0x2000111,
{0, 0xF, 0x407},
0,
0},
/* mObjCo*/ {0xE9},
},
{
@@ -1067,7 +1072,6 @@ void dAcOBarrel_c::fn_293_3DB0() {
quat_0xD90 = q1 * q2 * q0 * quat_0xD90;
}
extern "C" void fn_800307E0(const mVec3_c &, s32);
void dAcOBarrel_c::fn_293_4200() {
getLinkage().forceRemove(this);
@@ -1124,7 +1128,7 @@ void dAcOBarrel_c::fn_293_4200() {
PARTICLE_RESOURCE_ID_MAPPING_658_, emitPosition, nullptr, &mScale, nullptr, nullptr, 0, 0
);
}
fn_800307E0(mPosition, 0);
dAcEnBase_c::fn_800307E0(&mPosition, 0);
startSound(SE_Barrel_BOMB);
mStateMgr.changeState(StateID_Explode);
+1 -1
View File
@@ -320,7 +320,7 @@ void dAcOtubo_c::finalizeState_Grab() {
mSph.OnAtSet();
}
mObjAcch.ClrRoofNone();
mObjAcch.field_0x0D4 = 50.f;
mObjAcch.SetRoofCrrHeight(50.f);
}
void dAcOtubo_c::initializeState_Put() {}
+1 -1
View File
@@ -52,7 +52,7 @@ int dTgAction_c::actorExecute() {
}
if (pObj->mProfileName == fProfile::BOMB) {
if (checkAreaBox(mActiveMtx, pObj->getPosition())) {
reinterpret_cast<dAcBomb_c *>(pObj)->On_0xA3C(0x20000000);
reinterpret_cast<dAcBomb_c *>(pObj)->setFlag(dAcBomb_c::FLAG_0x20000000);
}
}
}
+1 -1
View File
@@ -774,7 +774,7 @@ int dAcItem_c::create() {
getItemFlagStruct(getItemId())->field_0x01 * 0.5f, getItemFlagStruct(getItemId())->field_0x00 * 0.6f
);
mObjAcch.Set(this, 1, &mAcchCir);
mObjAcch.field_0x0D4 = 50.0f;
mObjAcch.SetRoofCrrHeight(50.0f);
mObjAcch.SetClrSpeedY();
mObjAcch.SetField_0xC(4);
mAcceleration = -2.0f;
+143
View File
@@ -1,5 +1,15 @@
#include "d/a/d_a_player.h"
#include "common.h"
#include "d/a/d_a_base.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/a/obj/d_a_obj_bomb.h"
#include "f/f_profile.h"
#include "f/f_profile_name.h"
#include "toBeSorted/minigame_mgr.h"
#include <stddef.h>
dAcPy_c *dAcPy_c::LINK;
// TODO: Disable this pragma when the ctors are matching
@@ -8,3 +18,136 @@ dAcPy_c::dAcPy_c() {}
#pragma dont_inline reset
dAcPy_c::~dAcPy_c() {}
namespace {
bool isProfile(dAcBase_c *pActor, ProfileName profile) {
return pActor && pActor->mProfileName == profile;
}
} // namespace
bool dAcPy_c::ObjectArray::insert(dAcObjBase_c *pObj) {
for (size_t i = 0; i < sNumObjects; ++i) {
if (mObjs[i].get() != pObj) {
continue;
}
if (isProfile(pObj, fProfile::BOMB)) {
mCounter[i] = MAX(0, static_cast<dAcBomb_c *>(pObj)->getFuseTimer()) + 3;
} else {
mCounter[i] = 90;
}
return true;
}
for (size_t i = 0; i < sNumObjects; ++i) {
if (mObjs[i].get() != nullptr) {
continue;
}
mObjs[i].link(pObj);
if (isProfile(pObj, fProfile::BOMB)) {
mCounter[i] = MAX(0, static_cast<dAcBomb_c *>(pObj)->getFuseTimer()) + 3;
} else {
mCounter[i] = 90;
}
return true;
}
return false;
}
void dAcPy_c::ObjectArray::execute() {
// Unlink Object as needed
for (int i = 0; i < sNumObjects; ++i) {
dAcObjBase_c *pObj = mObjs[i].get();
if (isProfile(pObj, fProfile::BOMB)) {
if (static_cast<dAcBomb_c *>(pObj)->isState(dAcBomb_c::StateID_Explode)) {
mObjs[i].unlink();
mCounter[i] = 0;
}
} else {
if (--mCounter[i] == 0) {
mObjs[i].unlink();
}
}
}
// Try to bubble objects left
// This seems buggy if multiple objects arent link consecutively
int lastOccupiedObject = sNumObjects;
for (int i = sNumObjects - 1; i >= 0; --i) {
// Skip Occupied objects
if (mObjs[i].isLinked()) {
lastOccupiedObject = i;
continue;
}
if (lastOccupiedObject != sNumObjects) {
mObjs[i].link(mObjs[lastOccupiedObject].get());
mCounter[i] = mCounter[lastOccupiedObject];
mObjs[lastOccupiedObject].unlink();
lastOccupiedObject = sNumObjects;
}
}
}
dAcObjBase_c *dAcPy_c::ObjectArray::get(s32 index) {
if (index >= sNumObjects) {
return nullptr;
}
return mObjs[index].get();
}
void dAcPy_c::ObjectArray::removeBombs() {
for (int i = 0; i < sNumObjects; ++i) {
dAcObjBase_c *pObj = get(i);
if (pObj != nullptr) {
if (pObj->mProfileName == fProfile::BOMB) {
dAcBomb_c *pBomb = static_cast<dAcBomb_c *>(pObj);
pBomb->deleteRequest();
pBomb->mEffect1.remove(true);
pBomb->mEffect2.remove(true);
}
}
}
}
bool dAcPy_c::isInMinigameInsectCapture() {
return MinigameManager::GetInstance()->checkInInsectCapture();
}
bool dAcPy_c::isInMinigamePumpkinCarry() {
return MinigameManager::GetInstance()->checkInPumpkinCarry();
}
bool dAcPy_c::isInMinigameBambooCutting() {
return MinigameManager::GetInstance()->checkInBambooCutting();
}
bool dAcPy_c::isInMinigameThrillDigger() {
return MinigameManager::GetInstance()->checkInThrillDigger();
}
bool dAcPy_c::isInMinigameFunFunIsland() {
return MinigameManager::GetInstance()->checkInFunFunIsland();
}
bool dAcPy_c::isInMinigameHouseCleaning() {
return MinigameManager::GetInstance()->checkInHouseCleaning();
}
bool dAcPy_c::isInMinigameTrialTimeAttack() {
return MinigameManager::GetInstance()->checkInTrialTimeAttack();
}
bool dAcPy_c::isInMinigameBossRush() {
return MinigameManager::GetInstance()->checkInBossRush();
}
bool dAcPy_c::isInMinigamePumpkinArchery() {
return MinigameManager::GetInstance()->checkInPumpkinArchery();
}
bool dAcPy_c::isInMinigameHarpPlaying() {
return MinigameManager::GetInstance()->checkInHarpPlaying();
}
bool dAcPy_c::isInMinigameRollerCoaster() {
return MinigameManager::GetInstance()->checkInRollerCoaster();
}
bool dAcPy_c::isInMinigameSprialChargeTutorial() {
return MinigameManager::GetInstance()->checkInSprialChargeTutorial();
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -184,7 +184,7 @@ int dAcBoomerang_c::create() {
mAcch.Set(this, 1, &mAcchCir);
mAcch.SetGroundUpY(20.f);
mAcch.SetField_0xD4(30.f);
mAcch.SetRoofCrrHeight(30.f);
mAcch.ClrRoofNone();
mAcch.SetBeetle();
mAcch.OnWaterGrp();
+12 -12
View File
@@ -53,19 +53,19 @@ dBgS_Acch::dBgS_Acch()
field_0x0A8(0.0f),
field_0x0AC(0.0f),
mGroundHeight(-1e9f),
field_0x0B4(120.0f),
mGndChkOffset(120.0f),
field_0x0C8(0.0f),
field_0x0CC(0.0f),
mRoofHeight(1e9f),
field_0x0D4(1.0f),
mRoofCrrHeight(1.0f),
field_0x0D8(0.0f),
mpOutPolyInfo(nullptr),
mRoofH_0x0E0(0.0f),
mGroundH_0x0E4(0.0f),
field_0x0E8(1e9f),
field_0x1D0(-1.0f),
field_0x2F4(1000.0f),
field_0x390(0),
mWtrCheckOffset(1000.0f),
mWtrMode(0),
field_0x394(0) {
SetPolyPassChk(GetPolyPassChkInfo());
SetGrpPassChk(GetGrpPassChkInfo());
@@ -159,7 +159,7 @@ void dBgS_Acch::GroundCheck(dBgS &bgs, bool param2) {
mVec3_c gnd_pos = *GetPos();
// This Ordering is weird
f32 temp = (field_0x0B4 - field_0x0A8) + field_0x0AC;
f32 temp = (mGndChkOffset - field_0x0A8) + field_0x0AC;
if (mFlags & ACCH_FLAG_0x20000) {
if (temp <= 1.1f) {
temp = 1.1f;
@@ -199,7 +199,7 @@ void dBgS_Acch::GroundCheck(dBgS &bgs, bool param2) {
}
if (gnd_pos.y < mpPos->y + field_0x0E8 &&
mpPos->y + field_0x0E8 < (field_0x0B4 - field_0x0A8) + field_0x0AC + mpPos->y) {
mpPos->y + field_0x0E8 < (mGndChkOffset - field_0x0A8) + field_0x0AC + mpPos->y) {
gnd_pos.y = mpPos->y + field_0x0E8;
}
@@ -277,11 +277,11 @@ void dBgS_Acch::GroundRoofProc(dBgS &bgs, bool param2) {
mRoofHeight = bgs.RoofChk(&mRoof);
if (mRoofHeight != 1e9f) {
if (mpPos->y + field_0x0D4 > mRoofHeight) {
field_0x0D8 = mRoofHeight - field_0x0D4;
if (mpPos->y + mRoofCrrHeight > mRoofHeight) {
field_0x0D8 = mRoofHeight - mRoofCrrHeight;
SetRoofHit();
} else if (field_0x0C8 + field_0x0D4 > mRoofHeight) {
field_0x0D8 = mRoofHeight - field_0x0D4;
} else if (field_0x0C8 + mRoofCrrHeight > mRoofHeight) {
field_0x0D8 = mRoofHeight - mRoofCrrHeight;
SetRoofHit();
}
}
@@ -414,8 +414,8 @@ void dBgS_Acch::SphCheck() {
if (height > field_0x0A8 && field_0x0A8 > 0.0f) {
height = field_0x0A8;
}
if (height > field_0x0D4 && field_0x0D4 > 1.0f) {
height = field_0x0D4;
if (height > mRoofCrrHeight && mRoofCrrHeight > 1.0f) {
height = mRoofCrrHeight;
}
height *= 0.8f;
}
+3 -2
View File
@@ -999,8 +999,9 @@ void daPlayerModelBase_c::updateSwordModel() {
}
u32 daPlayerModelBase_c::getCurrentShieldPouchSlot() {
// Compiler quirk, inline function not inlined due to GetLink call
if (dScGame_c::currentSpawnInfo.getTrial() == SpawnInfo::TRIAL || dAcPy_c::GetLink()->isInBambooCuttingMinigame()) {
// Compiler quirk, inline function not inlined due to MinigameManager::GetInstance call
if (dScGame_c::currentSpawnInfo.getTrial() == SpawnInfo::TRIAL ||
MinigameManager::GetInstance()->checkInBambooCutting()) {
return POUCH_SLOT_NONE;
}
return FileManager::GetInstance()->getShieldPouchSlot();
+2 -1
View File
@@ -9,6 +9,7 @@
#include "nw4r/math/math_types.h"
#include "sized_string.h"
#include "toBeSorted/event_manager.h"
#include "toBeSorted/minigame_mgr.h"
struct dLytDoButton_HIO_c {
dLytDoButton_HIO_c();
@@ -294,7 +295,7 @@ bool dLytDobutton_c::remove() {
bool dLytDobutton_c::execute() {
bool isInEvent = EventManager::isInEvent();
bool b1 = true;
if (dAcPy_c::GetLink()->isInBambooCuttingMinigame()) {
if (MinigameManager::GetInstance()->checkInBambooCutting()) {
setActionTextStuff(ICON_12, ACT_DO_70, false);
}
if (field_0x490 == 0) {
+4 -11
View File
@@ -2714,23 +2714,16 @@ bool dLytMeterItemSelect_c::isWheelBlockedByCurrentAction() {
if (dAcPy_c::LINK->getRidingActorType() == dAcPy_c::RIDING_LOFTWING ||
dAcPy_c::LINK->checkActionFlags(dAcPy_c::FLG0_SWING_ROPE) || dAcPy_c::LINK->checkCurrentAction(0x9C) ||
dAcPy_c::LINK->getRidingActorType() == dAcPy_c::RIDING_TRUCK_MINECART ||
dAcPy_c::LINK->checkCurrentAction(0x95) || isInSpiralChargeTutorialMinigame() || isInRollercoasterMinigame() ||
dAcPy_c::LINK->checkCurrentAction(0x8C) || dLytMeter_c::GetMain()->isInSwordDrawEvent() ||
checkIsInSkykeepPuzzle() || dLytMeter_c::GetInstance()->getMeterField_0x13770() == 0) {
dAcPy_c::LINK->checkCurrentAction(0x95) || MinigameManager::GetInstance()->checkInSprialChargeTutorial() ||
MinigameManager::GetInstance()->checkInRollerCoaster() || dAcPy_c::LINK->checkCurrentAction(0x8C) ||
dLytMeter_c::GetMain()->isInSwordDrawEvent() || checkIsInSkykeepPuzzle() ||
dLytMeter_c::GetInstance()->getMeterField_0x13770() == 0) {
return true;
}
return false;
}
bool dLytMeterItemSelect_c::isInSpiralChargeTutorialMinigame() {
return MinigameManager::isInMinigameState(MinigameManager::SPIRAL_CHARGE_TUTORIAL);
}
bool dLytMeterItemSelect_c::isInRollercoasterMinigame() {
return MinigameManager::isInMinigameState(MinigameManager::ROLLERCOASTER);
}
void dLytMeterItemSelect_c::setCurrentItemText(ITEM_ID item) {
if (item >= ITEM_NONE && field_0x5754 == 0) {
mText[1].setShouldBeSelect(true);
+112
View File
@@ -0,0 +1,112 @@
#include "d/t/d_t_alldie.h"
#include "common.h"
#include "d/a/d_a_player.h"
#include "d/a/e/d_a_en_base.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/d_stage.h"
#include "d/flag/sceneflag_manager.h"
#include "f/f_base.h"
#include "f/f_manager.h"
#include "f/f_profile_name.h"
#include "s/s_Math.h"
#include "toBeSorted/area_math.h"
#include "toBeSorted/event_manager.h"
SPECIAL_ACTOR_PROFILE(ALLDIE_TAG, dTgAllDie_c, fProfile::ALLDIE_TAG, 0x23, 0, 4);
int dTgAllDie_c::create() {
mSceneflag = getFromParams(4, 0xFF);
mType = getFromParams(12, 0x3);
mTimer0x140 = getFromParams(22, 0xFF);
field_0x148 = 0;
field_0x144 = getFromParams(30, 0xFF);
mRotation.x.set(0);
matrixCreateFromPosRotYScale(mArea, mPosition, mRotation.y, mScale, nullptr, 0.0f);
return SUCCEEDED;
}
int dTgAllDie_c::doDelete() {
return SUCCEEDED;
}
int dTgAllDie_c::actorExecute() {
if (!dStage_c::GetInstance()->isRoomID(mRoomID)) {
return SUCCEEDED;
}
if (mType <= 1) {
if (dTimeAreaMgr_c::fn_800BBD40()) {
return SUCCEEDED;
}
mTimeArea.check(mRoomID, mPosition, 0, 10.0f, 0.1f);
f32 f = mTimeArea.getDistMaybe();
if (mType == 0 && f < 1.0f) {
return SUCCEEDED;
}
if (mType == 1 && 0.0f < f) {
return SUCCEEDED;
}
}
mNumEnemiesInArea = 0;
dAcEnBase_c *pEnemy = nullptr;
while ((pEnemy = dAcEnBase_c::GetNextEnemy(pEnemy))) {
if (pEnemy->mRoomID == mRoomID && !pEnemy->checkInteractionFlags(0x2)) {
if (pEnemy->checkProcControl(DISABLE_EXECUTE) == 0 && pEnemy->mLifecycleState != TO_BE_DELETED) {
if (checkAreaBox(mArea, pEnemy->mPosition)) {
mNumEnemiesInArea++;
}
}
}
}
if (mNumEnemiesInArea == 0) {
if (field_0x148 != 0 && EventManager::isInEvent()) {
return SUCCEEDED;
}
if (sLib::calcTimer(&mTimer0x13C) == 0) {
if (mSceneflag < 0xFF && !SceneflagManager::sInstance->checkBoolFlag(mRoomID, mSceneflag)) {
SceneflagManager::sInstance->setFlag(mRoomID, mSceneflag);
}
}
} else {
mTimer0x13C = (mTimer0x140 <= 128 ? mTimer0x140 + 40 : 40 - (256 - mTimer0x140));
if (mSceneflag < 0xFF && SceneflagManager::sInstance->checkBoolFlag(mRoomID, mSceneflag)) {
SceneflagManager::sInstance->unsetFlag(mRoomID, mSceneflag);
}
}
return SUCCEEDED;
}
int dTgAllDie_c::draw() {
return SUCCEEDED;
}
dTgAllDie_c *dTgAllDie_c::getNearestToPlayer(s32 roomId) {
fBase_c *pPrev = nullptr;
dTgAllDie_c *pReturn = nullptr;
const dAcPy_c *pPlayer = dAcPy_c::GetLink();
f32 minDist = 1e10f;
while (true) {
dTgAllDie_c *pTgAllDie =
static_cast<dTgAllDie_c *>(fManager_c::searchBaseByProfName(fProfile::ALLDIE_TAG, pPrev));
pPrev = pTgAllDie;
if (pTgAllDie == nullptr) {
break;
}
if (roomId == pTgAllDie->mRoomID) {
f32 dist = pPlayer->getPosition().squareDistanceToXZ(pTgAllDie->getPosition());
if (dist < minDist) {
pReturn = pTgAllDie;
minDist = dist;
}
}
}
return pReturn;
}
+93
View File
@@ -0,0 +1,93 @@
#include "d/t/d_t_view_clip.h"
#include "common.h"
#include "d/d_camera.h"
#include "d/d_sc_game.h"
#include "f/f_base.h"
#include "toBeSorted/area_math.h"
#include "toBeSorted/area_utils.h"
SPECIAL_ACTOR_PROFILE(VIEW_CLIP_TAG, dTgViewClip_c, fProfile::VIEW_CLIP_TAG, 0xB, 0, 0);
u8 dTgViewClip_c::sViewClips[dTgViewClip_c::sNumEntries] = {};
int dTgViewClip_c::create() {
mIndex = getFromParams(0, 0x3F);
mType = getFromParams(8, 0xF);
if (mType == 0xF) {
mType = TYPE_FORCE_OFF;
}
mAreaIndex = getFromParams(12, 0xFF);
matrixCreateFromPosRotYScale(mArea, mPosition, mRotation.y, mScale, nullptr, 0.0f);
return SUCCEEDED;
}
int dTgViewClip_c::doDelete() {
return SUCCEEDED;
}
int dTgViewClip_c::actorExecute() {
return SUCCEEDED;
}
int dTgViewClip_c::draw() {
dCamera_c *pCamera = dScGame_c::getCamera();
if (!checkAreaBox(mArea, pCamera->getPosition())) {
if (mAreaIndex == 0xFF) {
return SUCCEEDED;
}
if (!checkPosInArea(mAreaIndex, mRoomID, pCamera->getPosition(), nullptr)) {
return SUCCEEDED;
}
}
switch (mType) {
case TYPE_FORCE_ON: setViewClip(FLAG_FORCE_ON); break;
case TYPE_FORCE_OFF: setViewClip(FLAG_FORCE_OFF); break;
}
return SUCCEEDED;
}
void dTgViewClip_c::setViewClip(u8 setBit) {
setViewClipBit(mIndex, setBit);
}
void dTgViewClip_c::resetViewClip() {
for (int i = 0; i < sNumEntries - 1; ++i) {
setViewClip(i, 0);
}
}
f32 dTgViewClip_c::getCull(s32 idx, f32 cullDistance) {
if (idx > ARRAY_LENGTH(sViewClips) - 2) {
return cullDistance;
}
if (getViewClipBit(idx, FLAG_FORCE_ON)) {
return FLOAT_MAX;
} else if (getViewClipBit(idx, FLAG_FORCE_OFF)) {
return -1.0f;
}
return cullDistance;
}
bool dTgViewClip_c::checkForceOn(s32 idx) {
if (idx <= ARRAY_LENGTH(sViewClips) - 2) {
return getViewClipBit(idx, FLAG_FORCE_ON);
}
return false;
}
u8 dTgViewClip_c::getViewClipBit(s32 idx, u8 setBit) {
return sViewClips[idx] & setBit;
}
void dTgViewClip_c::setViewClipBit(s32 idx, u8 setBit) {
sViewClips[idx] |= setBit;
}
void dTgViewClip_c::setViewClip(s32 idx, u8 value) {
sViewClips[idx] = value;
}