Commit Graph

1692 Commits

Author SHA1 Message Date
Léo Lam d928a299f9 Merge pull request #231 from leoetlino/stack/03f-definition-moves
Move functions across and inside TUs to better match link order
2026-10-18 17:55:05 +01:00
Léo Lam ef164cc8aa ksys/phys: move motionTypeFromText to physUtil
motionTypeFromText isn't part of physDefines: its "Keyframed" string
(only used there) sits between the StaticCompound and PlayReport strings
in .rodata, far from physDefines' enum text, and the function is linked
right after the contact listener's inline virtuals, so it most likely
starts a new TU at 0x7100fd069c.

Nothing separates it from getMaterialMaskFromShape and the other helpers
in physUtil, so it goes in the same file and its declaration moves to
physUtil.h. That part is a guess: neither function has data that would
show a boundary.

(AI assisted using Claude Opus 5.5)
2026-10-16 00:18:41 +01:00
Léo Lam 7286390bea ksys/phys: rename physStaticCompoundUtil to physUtil
Most of these helpers have nothing to do with StaticCompound: they look
up material masks and collision filter info from shapes and collidables.
physUtil also fits the link order, between physUserTag and physWorld,
and it's what the function groups already call this block.

(AI assisted using Claude Opus 5.5)
2026-10-16 18:51:17 +03:00
Léo Lam 65ea3f7cdd uking/scene: move the map getters to uking::StageInfo
They're linked before gameStageInfo.cpp's sinit with no other sinit
in between, so they belong to gameStageInfo, not gameScene, and become
StageInfo statics declared in gameStageInfo.h. Their GameScene owner
was a guess.

(AI assisted using Claude Opus 5.5)
2026-10-15 22:56:22 +01:00
Léo Lam 13861707e3 ksys/act: make calcHash a free function in actAwarenessMiscUtils
calcHash is linked between AwarenessInstance's sinit and the next one,
together with two AwarenessSourcePool helpers and the job queue
functions of Awareness::Unk1, so it's a shared helper rather than an
Awareness member, declared in the new file's own header.
actAwareness.cpp calls this 4-byte function out of line, so it's likely
not defined there. The file name sorts between actAwarenessInstance and
the sensor files, which is where it is linked.

(AI assisted using Claude Opus 5.5)
2026-10-15 22:56:21 +01:00
Léo Lam e78c02499d Merge pull request #230 from leoetlino/stack/03e-actor-virtual-names
Name placeholder virtuals from their overrides
2026-10-15 19:12:41 +01:00
Léo Lam 8eca2642b0 ksys, uking: move four definitions to match link order
calc_ goes before leave_ in ForceSetCameraPos and InWaterSelForkASPlay,
and RailRoute's dtor goes after getCheckPointName (an unnamed row
there is likely its D0).

BaseProcJobHandler's ctor is linked right before BaseProc's ctor, so it
moves into actBaseProc.cpp, and the class moves into actBaseProc.h so
that its declaration stays with its definition.

(AI assisted using Claude Opus 5.5)
2026-10-15 01:59:46 +02:00
Léo Lam 05236e5a38 Name placeholder virtuals from their overrides
Each base class virtual is named after what its overrides do and how
callers use it, e.g. AttCheck::calcMtx (0x710108a614) is the virtual
that AttClient calls before testing its checks.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-15 01:59:46 +02:00
Léo Lam deb3086555 Merge pull request #228 from leoetlino/stack/03d5-sort-source-lists
Action, AI, Query: sort the source lists by file name
2026-10-14 08:58:26 +01:00
Léo Lam 5c2fe6fc38 Merge pull request #227 from leoetlino/stack/03d4-link-order-moves
ksys: move some source files to better match link order
2026-10-14 08:50:25 +01:00
Léo Lam d8535deac9 Action, AI, Query: sort the source lists by file name
These objects are linked in case-insensitive file name order, but the
lists kept renamed files at their old positions, so the decomp linked
them out of order.

(AI assisted using Claude Opus 5.5)
2026-10-13 03:33:27 +02:00
Léo Lam ea13bac74a ksys: move AS setting, RootAi and three others to match link order
Each file moves to where its code is linked, and namespaces follow the
new paths. ASSettingMgr is an unofficial name.

| Old | New |
|---|---|
| act::ASSetting (ActorSystem/actASSetting) | res::ASSettingMgr (Resource/Actor/resResourceASSettingMgr) |
| Resource/resResourceASSetting, Resource/Actor/resResourceASResourceExtension | Resource/Actor/resResourceASSetting |
| ksys::DebugFinder (System/DebugFinder) | ksys::act::DebugFinder (ActorSystem/actDebugFinder) |
| ActorSystem/LOD/actLodState | ActorSystem/actLodState |
| ActorSystem/actAiRoot | ActorSystem/aiRootAi |
| Map/mapStagePreActorCache | System/StagePreActorCache (ksys) |

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-13 03:33:27 +02:00
Léo Lam e400fe7025 Merge pull request #225 from leoetlino/stack/03d3-phys-layout
ksys/phys: rearrange the folder layout to match link order
2026-10-13 02:09:07 +01:00
Léo Lam 80c6ad898a Merge pull request #226 from leoetlino/order-report-collapse-renames
tools: collapse renames in the order comparison
2026-10-13 02:00:20 +01:00
Léo Lam 89322a8d0c ksys/phys: rearrange the folder layout to match link order
A folder's files are linked before its subfolders, and the rigid body
files are linked as one flat sequence. ListShape is the one file that
does not fit this order.

| Old | New |
|---|---|
| RigidBody/Shape/<Kind>/phys<Kind>Shape.cpp | RigidBody/Shape/phys<Kind>Shape.cpp |
| RigidBody/Shape/<Kind>/phys<Kind>RigidBody.cpp | RigidBody/physRigidBody<Kind>.cpp |
| RigidBody/Shape/List/physListShapeRigidBody.cpp | RigidBody/physRigidBodyListShape.cpp |
| physHavokMemoryAllocator.cpp | System/physHavokMemoryAllocator.cpp |
| StaticCompound/physStaticCompound{,Mgr,RigidBodyGroup,Util}.cpp | System/ |
| StaticCompound/physStaticCompound{Info,Autogen}.cpp | System/physStaticCompoundInfo.cpp |

The original has the type infos' cleanup functions just before
StaticCompoundInfo's functions, so the merged file defines the
reflection data first, with plain static cleanup functions as in
Havok's generated reflection code. Template instantiations would be
emitted after the rest of the file.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-13 02:55:29 +02:00
Léo Lam 790a1a311d tools: collapse renames in the order comparison
Renaming or moving a file printed every still-misordered entry it touched
as a -/+ pair, burying the real changes. Entries are now keyed by original
address: ones only renamed are counted instead of listed, and the rest are
sorted by address.

(AI assisted using Claude Opus 5.5)
2026-10-13 02:31:34 +02:00
Léo Lam 0ee30415f7 Merge pull request #223 from leoetlino/stack/03d2-link-order-renames
Move code to the TUs that match link order and rename files
2026-10-13 01:10:43 +01:00
Léo Lam fa2b8b7d47 Move code to the TUs that match link order and rename files
Rename classes and files so that they sort where their code is linked,
and move code that is linked inside another TU into that TU's file.

| Old | New | TU start |
|---|---|---|
| ActorAreaInOutSendMessage | AreaInOutSendMessage | 0x710009fa64 |
| AreaTagAction | AreaActionBase | 0x7100e21e64 |
| sndResource.{h,cpp} | sndSound.{h,cpp} | |

| Code | From | To |
|---|---|---|
| SoundMgr | sndMgr.h | sndSound.h |
| PlayReport | PlayReportMgr.cpp | PlayReport.cpp |
| PlayReport::addPlayTimes, addPosition | PlayReportMgr.cpp | ProductReporter.cpp |

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-13 01:53:08 +02:00
Léo Lam b26086477c Merge pull request #224 from leoetlino/order-check
tools: add a script that measures misordered objects and functions
2026-10-13 00:43:23 +01:00
Léo Lam 4bd1d8782b tools: add a script that measures object and function order
The decomp binary should ideally be laying out objects and functions in
the same order as the original executable (as much as possible). Add a
script that a) reports misordered objects, functions that appear to be
implemented in the wrong TU and misordered functions within objects,
and b) can compare against a saved baseline so CI can fail PRs that
make the order worse.

(AI assisted using Claude Opus 5.5)
2026-10-13 01:31:08 +02:00
Léo Lam dd8d8e036a Merge pull request #221 from leoetlino/stack/03d1-damage-handler
ksys/act: split IDamageManager out of DamageManagerBase
2026-10-12 03:21:08 +01:00
Léo Lam 419f8f46bb ksys/act: split IDamageManager out of DamageManagerBase
DamageManagerBase's root base class (previously
DamageManagerBase_UnknownBase1) holds the damage callback list, and its
code is linked among the ActorSystem objects rather than with the
Game/Actor/Damage files. It appears to be an engine-side abstract base,
so let's move it to KingSystem/ActorSystem as ksys::act::IDamageManager
(unofficial name, following the ksys IManager/Manager pattern and
Actor::getDamageMgr), together with DamageCallback and Struct20Base, and
have Actor::getDamageMgr return it. DamageManagerBase now overrides its
getters and inherits addDamageCallback/removeDamageCallback from it.

The rest of the damage code stays in Game/Actor/Damage but is regrouped
to match link order: Struct20::combineMaybe moves into
actDamageManagerBase.cpp, Struct20::reset becomes inline and
dmgStruct20.cpp becomes actDamageMgr.cpp. The uking::dmg namespace is
merged into uking::act, so the files there take the act prefix too, and
dmgInfoManager becomes actDamageInfoMgr after the class it holds.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-11 04:53:08 +02:00
Léo Lam bdf141cf2d Merge pull request #210 from Pistonight/lib/migrade_sdk
lib: botw migrate to new nnsdk repo
2026-10-11 03:50:14 +01:00
Léo Lam 08c2d002a6 Merge pull request #220 from leoetlino/stack/03c1-actor-link-accessor
ksys/act: rename the actor accessor to ActorLinkConstDataAccess
2026-10-11 03:49:21 +01:00
Pistonight 5aac30d758 lib: migrate to new nnsdk repo 2026-10-10 19:37:53 -07:00
Léo Lam 6e9afd0f7d ksys/act: rename the actor accessor to ActorLinkConstDataAccess
The 0x18-sized accessor appears to be named ActorLinkConstDataAccess
based on a source path string in the Wii U build. The 0x10-sized
base class (which we had given the name to) only holds a BaseProc and
its dtor/acquire functions live in a separate TU so let's rename it
BaseProcAccessor (unofficial name).

acquireActor is a header inline whose one copy landed in the BeamBase
object. Nothing in BeamBase calls it, so the BeamBase function that used
it was probably dead-stripped by the linker.

(AI assisted using Claude Opus 5.5)
2026-10-11 04:13:20 +02:00
Léo Lam 49c6b5c183 Merge pull request #219 from leoetlino/stack/03c-action-renames-link-order
Action: rename 56 base classes to fit link order
2026-10-09 10:11:49 +01:00
Léo Lam 950e78e940 Action: rename 56 base classes to fit link order
Action TUs link in case-insensitive file-name order, so a guessed base
name that does not sort into the slot where the class's TU sits is wrong.
Each new name sorts between the neighbouring TUs below and is coined from
the class's params, derived classes and code.

| Old | New | Links between | TU start |
|---|---|---|---|
| GiantAttackWithAS | AttackWithAS | AttackPartBind – AvoidingCloseMoveActionBase | 0x71000adf4c |
| BattleCloseMoveActionBase | AvoidingCloseMoveActionBase | AttackWithAS – AvoidingCloseMoveBase | 0x71000ae354 |
| ForbidTag | BasicSignalForbidTag | BasicSignalEnemyNotice – BattleCloseDangerAvoidRun | 0x71000ba90c |
| NeckSpinBeam | BeamNeckSpin | BeamMove – NeckSpin | 0x71000c1eb8 |
| PlayerStoleOpenBase | BindPlayerNodeBase | BindParentAction – BindPlayerNodeEx | 0x71000c6300 |
| PlayerStoleOpenEx | BindPlayerNodeEx | BindPlayerNodeBase – BirdEscape | 0x71000c68a8 |
| KokkoCreateDropBase | CreateDropBase | CreateAndReplaceAssassin – CreateEpona | 0x71000e3500 |
| MoveToTargetCurveBase | CurveMoveToTargetBase | CreateObjectsOfOwnedHorse – DamagedTurn | 0x71000e4f8c |
| ApplyDamageForPlayer | DemoApplyDamageBase | DeletePorchItemIncludeEquip – DemoApplyDamageForPlayer | 0x71000e78fc |
| WarpPlayerBase | DestPlayerWarpBase | DemoVisibleOn – DestPointMoveBase | 0x71000ec7c8 |
| RailMoveBase | DestPointMoveBase | DestPlayerWarpBase – DgnObj_DLC_CogWheel_Rotate | 0x71000ecff8 |
| ChuchuDissappearEscapeBase | DisappearAndEscapeBase | DisableAutoSavePausing – DisappearDeathCounter | 0x71000f04b4 |
| AttackPowerExplode | EitherSideExplode | EatWithAS – ElectricAttack | 0x7100102b3c |
| EnemyFortressChatTurnBase | EnemyFortressChatLookBase | EnemyFortressChatCall – EnemyFortressChatSpeak | 0x7100107860 |
| HornUseBase | EquipHornUseBase | EquipedWithScale – Escape | 0x71001131f4 |
| EventHoverNullASPlayBase | EventNullASPlayBase | EventMiniGameTimerWrite – EventOpenGetDemo | 0x710011c8c8 |
| FireWoodBase | FireBurnBase | FallAttack – FireWood | 0x710012d258 |
| AreaFireObserveBase | FireObserveBase | AreaRecreateActorAction – OwnedHorseObserveAction (Area) | 0x7100e23d88 |
| FlyingCharacterDamageBase | FlyingActorDamageBase | FlowingDust – FlyingCharacterFreeFallBase | 0x7100130748 |
| ForkDynActorNoTargetSelfBase | ForkEndByConditionBase | ForkEmitShockWaveByContact – ForkEndByDistance | 0x71001503b0 |
| ForkSimpleGrabBase | ForkGrabBase | ForkGolemMaterialASPlay – ForkGravityScaleChange | 0x71001579b8 |
| ForkHoverKeepRotateTurnBase | ForkKeepRotateTurn | ForkJumpToTargetOnDownEnd – ForkKnockBackNoRot | 0x7100159c08 |
| ForkEmitChmField | ForkTrgEmitChmFieldBase | ForkTimerForceResetCondition – ForkTurnASHold | 0x7100167ea0 |
| ChuchuPreAttackBase | GelJumpBase | GelEnemySystemHideChase – GelJumpTackle | 0x71001806dc |
| GiantEnemyWalkWithVibration | GiantEnemyMoveWithVibration | GiantDownSwingAttack – GiantEnemyWalk | 0x71001892d4 |
| GiantNavMeshWalkWithVibration | GiantNavMeshMoveWithVibration | GiantHandClapToTarget – GiantNavMeshWalk | 0x7100189c64 |
| GuardianMoveTo | GuardianActionBase | GuardBreak – GuardianAimBeam | 0x71001926f4 |
| AnimalFollowBase | HorseFollowBase | HorseFollow – HorseFreeze | 0x71001a082c |
| HorseRide | HorseRideBase | HorseRideAttack – HorseRideCancelCommand | 0x71001ad7ac |
| HorseRideCommandBase | HorseRideOneTimeCommandBase | HorseRideOneTimeASPlay – HorseRideOneTimeViewASPlay | 0x71001aff3c |
| OctarockReloadWigBase | IgniteActorReloadBase | IceBroken – IgnitedThrown | 0x71001b5258 |
| TakeHitImpactForce | KnockBackHitImpactForce | Kick* – KokkoCreateDrop* | 0x71001c9268 |
| SiteBossSwordWhirlSlashChargeBase | LastBossSwordWhirlSlashChargeBase | LastBossStun – LastBossThunderAppear | 0x71001d8210 |
| Move2HomePosBase | MoveHomePosBase | MoveByAnimeDrivenToTarget – MoveKeyFramed | 0x71001ea488 |
| MultiVacuumRotScaleTimeByDistWithTgtBase | MultiVacuumBase | Msg2CameraResetNoConnect – MultiVacuumRotBase | 0x71001edb88 |
| MultiVacuumRotScaleTimeByDistWithTgt | MultiVacuumRotBase | MultiVacuumBase – MultiVacuumRotScaleTimeByDist | 0x71001eec0c |
| NavMeshAction | NavMeshMoveBase | NavMeshLiftWalk – NavMeshMoveWithAS | 0x71001f0518 |
| BackWalkEx | NormalBackWalk | NoDeleteCurrentActor – Notice | 0x71001f2f78 |
| GiantOneHandActionWithLegTurn | OneHandActionWithLegTurn | OnCorrect – OnEnterSwapActorBase | 0x7100211194 |
| ForkOnEnterSwapDropTableActorBase | OnEnterSwapActorBase | OneHandActionWithLegTurn – OnEnterSwapDropTable | 0x71002117ec |
| ForkOnEnterSwapDropTableActor | OnEnterSwapDropTable | OnEnterSwapActorBase – OnEnterSwapDropTableActor | 0x7100211d0c |
| RegistedActorDeadCheckBase | RegistedActorAllDeadCheckBase | ReflectThrown – RegistedActorBroadCastMessage | 0x7100229a34 |
| RegistedActorActionBase | RegistedActorSetActionBase | RegistedActorDeadCheck – ReloadArrow | 0x710022a3a8 |
| SendPlayerNoticeMessageBase | SendNoticeMessageBase | SendMessageBroadCast – SendPlayerNoticeMessage | 0x7100243cf0 |
| SendMessageToTargetActor | SendTargetActorMessageBase | SendSignalForSignalFlowAct – SendTargetActorRequestShareAwn | 0x710024487c |
| SideWalkBase | SideMoveBase | ShutterOpenWait – SideStep | 0x71002525a0 |
| SimpleGrabWithASBase | SimpleGrabBase | SilentKilled – SimpleGrabWithAS | 0x71002544d4 |
| KnockBackShock | SimpleKnockBackShock | SimpleGrabWithAS – SimpleLineBeam | 0x7100254ac8 |
| SlippedCircleWalkBase | SlippedCircleMoveBase | SlippedBackWalkBase – SlippedCircleWalk | 0x710026fe88 |
| SlippedWalkBase | SlippedMoveBase | SlippedCircleWalk – SlippedWalk | 0x7100270b68 |
| ActionWithPosAngReduce | StopBase | StopASPlay – StopCliffTongueAttack | 0x710027e328 |
| AttackBase | StoppingAttackBase | StopOnObj – StorePlayerPosAndRotate | 0x7100280554 |
| SwimEnemyAnmBackBlownOffBase | SwimEnemyBlownOffBase | SwimEnemyAnmBackBlownOffToPL – SwimGetUp | 0x71002890d0 |
| LookAtObjectBase | TurnAndLookToObjBase | TurnAndLookAtToObjectNow – TurnAndLookToObject | 0x710029e794 |
| GiantAttack | TurnGiantAttack | TurnBase – TurnIgnite | 0x71002a1738 |
| WillBallAction | WillBallBase | WillBallAvoidCenterDist – WillBallParabolaAttack | 0x71002bb4ec |

\* The nearest correctly placed neighbour; the TUs in between are still
misnamed.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-08 03:04:40 +02:00
Léo Lam 86a48df10b Merge pull request #218 from leoetlino/stack/03-drop-ai-generators
tools: drop the AI class generators and their aidef data
2026-10-08 01:12:37 +01:00
Léo Lam ffb09a2b11 tools: drop the AI class generators and their aidef data
The AI/Action/Query stub generators, the stub matcher and the IDA vfunc
renamers are no longer useful now that:
- every class has hand-edited source code
- IDB naming work has superseded the placeholder names used by the
  scripts

The scripts don't even import any more so we should just remove them.

(AI assisted using Claude Opus 5.5)
2026-10-08 02:02:11 +02:00
Léo Lam 4d2c07a45a Merge pull request #217 from leoetlino/stack/03b-side-ownership
Move misplaced code between KingSystem and U-King
2026-10-06 04:10:42 +01:00
Léo Lam 9d6a597e91 Actor: ActorFactory is game, CurrentResNameMgr is ksys
ActorFactory's static initialiser fills its table with uking actor
ctors. CurrentResNameMgr (0x71010b770c) links in KingSystem/System right
before GameConfig.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:39 +02:00
Léo Lam 98f0c80f1d The task and thread families are plain ksys::
They link in the same block as the plain-ksys:: Message family.
getItemValue and applyScreenFade sit in engine UI TUs, hence ksys::ui.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:39 +02:00
Léo Lam 6442a24670 eft: move the effect actions to KingSystem/Effect
Link order: FootStepCalcOn (0x7100da1968) lies in the KingSystem/Effect
block.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:39 +02:00
Léo Lam 8002f122c8 ActorSystem: Fork AIs, DemoRootAI and queries are ksys
They form one run in the ActorSystem block (DemoRootAI at 0x7100d61e68,
right after VillagerMgr).

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:39 +02:00
Léo Lam 44c75aa78a SystemPauseMgr and NXArgs are game code
Both link in the game archive, and NXArgs uses game classes such as
GameScene. The engine only calls SystemPauseMgr's virtuals, so it now
goes through ksys::ISystemPauseMgr and no longer includes Game/.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:39 +02:00
Léo Lam c4c7c00e85 aoc: Manager is ksys, the DLC managers stay game-side
aoc::Manager is created during engine start-up and called by gdt, map
and StarterPackMgr; only game code uses HardModeManager and
ChampionBalladManager.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:39 +02:00
Léo Lam 38905c8c07 AutoPlacement is game code: move it to Game/
It is created only from game code, no engine code calls it, and it
hardcodes game actor names.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:38 +02:00
Léo Lam 4a6239bbbf ksys: small declaration fixes
setCamera's only caller passes the camera actor, a ksys::act::Actor;
ksys::act::Camera is only forward-declared.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:38 +02:00
Léo Lam d8da4fc5f2 Actor: PlayerInfo/PlayerBase are game, GameConfig ksys
Every decomp user of PlayerInfo is game code, and PlayerBase sits right
above Player. GameConfig.h models the engine base that
links at GameConfig's slot in KingSystem/System.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:38 +02:00
Léo Lam 34e57daf61 AI: merge the duplicate DummyAction into ksys
The action factory uses the single ksys ctor for both entries and
DummyDropTable's ctor calls it too; deriving from it makes
DummyDropTable's five functions match.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:38 +02:00
Léo Lam a168b93bbc snd: move sound actions and AIs to KingSystem/Sound
They link with KingSystem/Sound (0x7100fe8b54-0x7101060ed4) as sorted
Action/AI passes of their own. The three area tag actions keep their
game base AreaTagAction, which links in the Game/Actor/Area block.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:38 +02:00
Léo Lam 7bc225838a Name placeholder declarations after the IDB
Keeps source and CSV from drifting from the IDB. Names are read from the
bodies, e.g. ActionBase::applyParams is what all 13 non-stub overrides
of that slot do.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:37 +02:00
Léo Lam 891c0a8494 Merge pull request #216 from leoetlino/stack/03a-ai-base-renames
AI: rename misordered base classes
2026-10-06 01:57:14 +01:00
Flatener 9595c31c7f world: implement Manager::isRaining (#214)
* world: implement Manager::isRaining

Implement the position-based rain check for Rain, HeavyRain, ThunderRain,
and BlueskyRain. Declare the climate weather lookup dependency and name
both functions in the function table.

The rain check matches the original function at 0x71010f33a4.

* world: keep rainfall queries const

Restore const on Manager::isRaining and make its climate weather helper
const. Both queries only read Manager state. Update their function-table
symbols; the rain check still matches the original.
2026-10-05 11:09:41 -07:00
Léo Lam b12306210c AI: rename misordered base classes
AI and Action TUs link in case-insensitive file-name order, so a guessed
base name that breaks it is wrong. Each new name sorts into the slot
where the class's TU sits (neighbouring TUs and an address in the TU
below) and comes from the class's params, child states and derived
classes.

ai::

| Old | New | Links between | In TU |
|---|---|---|---|
| AddViewTargetPosBase | AddViewTarget | AddSwarmMove – AddViewTargetPos | 0x71002f9c68 |
| AncientNecklaceBallBase | PlayASSwitch | PipeDrawing – PlayerSetTarget | 0x71004f6a78 |
| AnimalRoamBase | AnimalRndMove | AnimalRangeKeepMoveWithLOS – AnimalRoam | 0x710030a6c0 |
| AppearNearTarget | AppearFromTarget | AnimalTimelineAI – AppearFromTargetFrontAfterChase | 0x710030d868 |
| AssassinFieldShooterBattleBase | AssassinShooterBattle | AssassinRoot – AssassinShooterJuniorAzitoRoot | 0x7100321dc4 |
| AssassinMagicTgtSelect | TargetHeightAreaSelect | TargetExistSelect – TargetHomeDir | 0x71005bef5c |
| AssassinNormal | GuardHomePosNormal | GuardFrequencySelect – GuardianAI | 0x710040cd68 |
| BeamExplodeBase | SimpleBeamExplode | SimpleASBridge – SimpleEnemyNormal | 0x710056c5fc |
| ChildFavoriteSelectorBase | ChildSelector | ChildHaveSelect – ChmCheck | 0x710034aad0 |
| DragonRootBase | ControlRailRoot | ConditionMoveActionSelect – CookPotRoot | 0x7100356664 |
| EnemyChemTargetActionBase | EnemyTargetAction | EnemySyncAttack – EnemyTargetGearSelect | 0x71003bf75c |
| FlyingEnemyKeepMove | FlyingEnemyDistanceKeepMove | FlyingEnemyDiagonallyKeepMove – FlyingEnemyFindPlayer | 0x71003d1694 |
| GoronCannonBase | BigCannon | BezierRailMove – BirdDead | 0x710032cd80 |
| GuardNearTarget | InvincibleNearTargetBase | InvincibleNearTarget – InvisibleKorokRailMove | 0x710044c6b8 |
| GuardianBeamAttackBase | GuardianCommonBeamAttack | GuardianCloseBattle – GuardianDown | 0x7100411da0 |
| HorseCheckLineOfSightSelectorBase | CheckLineOfSightSelector | ChaseSound – ChemicalEnemyFindPlayer | 0x7100346868 |
| LargeEnemyFindPlayer | GiantEnemyFindPlayer | GiantEarthReleaseAttack – GiantEscapeFromDamageWater | 0x71003f69c8 |
| MimicCliffStopEnemyNormalBase | CliffStopEnemyNormal | CliffDistanceSelectThreeAction – CloseSmallAttackBase | 0x71003522f4 |
| MiniBeamAttack | GuideBeamAttackEnemyBattle | GuardianWait – GyroActivateTerminal | 0x710042cae8 |
| MotorcycleRootBase | HorseRiddenStatusSelector | HorseRiddenByNPC – HorseRideChargeAttack | 0x710043ea88 |
| NPCTravelBase | NPCScheduleMove | NPCRunaway – NPCSearch | 0x71004df66c |
| NonPlayerHorseRide | RideHorseNonPlayer | RideHorseAI – WildHorseDefWanderAI (Horse) | 0x7100e60178 |
| OctarockEscape | OctarockHideEscapeBase | OctarockHideEscape – OctarockOptionRoot | 0x71004ec368 |
| OctarockRootBase | VacuumEnemyRoot | VacuumedBombDamageSelect – VehicleSelector | 0x71005e3348 |
| OneMemoryMagicBattleBase | MagicBattle | LynelWarp – MagneGearRoot | 0x710049d0d8 |
| PriestBossMode | PriestBoss | PreyStun – PriestBossActorCloneRoot | 0x7100505b7c |
| RailMove | BezierRailMove | BeeSwarmRoot – BigCannon | 0x710032bbf0 |
| RangeSelect | NewRangeSelect | NewMannequinRoot – NormalHumanEquipableShield | 0x71004bc0e8 |
| RegistedActorNumTwoSelectBase | RegistedActor | ReflectableThrown – RegistedActorNumTwoSelect | 0x710053dfcc |
| RemainElectricCannonRootBase | LargeCannonRoot | LargeCannonAttackRoot – LastAttackerSelect | 0x71004741e4 |
| SandwormNormalBase | AwnSeal | AwarenessScale – BackAttackEnemyBattle | 0x71003258b4 |
| SeqTwoLineReachableTargetActionBase | SeqTwoLineReachableTarget | SeqTwoAction – SeqTwoLineReachableTargetAction | 0x7100567460 |
| SimpleWildlifeRoot | CapturedActorRoot | CapturedActorReactionChemical – CarryBox | 0x7100342690 |
| SiteBossChemicalProjectile | GanonFlameBall | GanonFarAttackRootOnWall – GanonGrudgeNormal | 0x71003e996c |
| SiteBossRecognizeRootBase | LastBossRecognizeRoot | LastBossRailWarpRoot – LastBossRoot | 0x7100478930 |
| SpecialEnemySleep | SleepNormal | SleepBedRoot – SleepSelect | 0x710059a8c0 |
| TargetAttackAttitudeTgtSelectBase | TargetAttackAttitudeTgt | TargetAngerSelect – TargetAttackAttitudeTgtSelect | 0x71005bb3ac |
| TargetPosAI | TargetActorPos | TargetActorGrabAdapter – TargetAngerSelect | 0x71005bab4c |
| TargetPosDynParamRot | TargetPosDynParamRotFromMyPos | TargetPosDynParamRotFromCtrPos – TargetPosLostCheck | 0x71005c4f8c |
| TargetPosOffset | OffsetTargetPos | OctarockWaterWait – OnCliffEnemyBattle | 0x71004f16d8 |
| TimedGuardNearTarget | InvincibleNearTarget | InvincibleHiddenOctarock – InvincibleNearTargetBase | 0x710044c1a4 |
| UnarmedEnemySearch | NavMove | NavMeshTurnAwayFromHitPos – NavMoveNearTarget | 0x71004b5ec0 |
| UnarmedEnemySearchWeapon | EnemySearch | EnemyRoot – EnemySearchHorse | 0x71003b6460 |
| WholeDungeonRotateTag | DungeonRotateTagApp | DungeonRotateTag4WindApp – DungeonRotateTagCont | 0x7100379554 |

action::

| Old | New | Links between | In TU |
|---|---|---|---|
| AirOctaFloatBase | AirOctaMoveBase | AirOctaMgr – AirOctaNoticeTurn | 0x71000880f8 |
| AtkTackleMove | TackleAttack | SystemWarp – TackleMove | 0x71002910a4 |
| BasicSignalEnemy | BasicSignalEnemyNotice | BasicSignalEnemyForceNotice – BattleCloseDangerAvoidRun* | 0x71000ba65c |
| BattleCloseAction | AvoidingCloseMoveBase | AvoidingCloseMoveActionWithAcc – AwarenessShareOnePartsASPlay | 0x71000aed44 |
| BattleCloseActionWithAcc | AvoidingCloseMoveActionWithAcc | AttackPartBind – AvoidingCloseMoveBase* | 0x71000ae8ec |
| BattleCloseSlippedWalkBase | BattleCloseSlippedMoveBase | BattleCloseMoveAction – BattleCloseSlippedWalk | 0x71000becc8 |
| CameraLockOnBase | CameraTrackBase | CameraTail – CameraWakeboard (Camera) | 0x71007850e4 |
| ChargeAndShoot | ArrowChargeAndShoot | AreaRoot – ArrowShootHoming | 0x71000a17a4 |
| ChemicalAttack | EmitAttackBase | ElectricParalysis – EmitElectricWaterBall | 0x7100104f54 |
| ChemicalAttackBall | ChemicalAttack | CheckHorseCustomizeEdit – ChemicalElectricWaterBall | 0x71000db0e8 |
| FlyingCharacterReaction | FlyingCharacterFreeFallBase | FlyingCharacterFreeFall – FlyingCharacterFreeFallDie | 0x7100132590 |
| FollowChallenge | AppearFollowChallenge | AnimeDrivenTurn – AppearNumHeroSeal | 0x710004d0b4 |
| ForkASTrgEmitShockWave | ForkEmitShockWave | ForkEmitExpandFieldWithCreate – ForkEmitShockWaveByContact | 0x710014f188 |
| GolemThrowPartsToTargetBase | GolemThrowPartsBase | GolemRepairParts – GolemThrowPartsToTarget | 0x710018d678 |
| HorseRideMoveCommand | HorseRideSetGearCommand | HorseRideSearch – HorseRideShoot | 0x71001b0828 |
| OctarockBalloonBase | BalloonRopeBase | BalloonBase – BasicSignalBossAwakeSleep | 0x71000b8b9c |
| PlayerGlide | PlayerParashawlGlideBase | PlayerParashawlGlide – PlayerPickUp (Player) | 0x710080352c |
| PriestBossWarpOrVanish | PriestBossCloneFastWarp | PreJumpAttack – PriestBossClonesSpawn | 0x7100221304 |
| RotateTurnToTarget | ASPlayRotateTurnToTarget | AscendingCurrentFixedSize – ASPlaySimpleAnmDriven | 0x71000a7bec |
| SetGetFlagBase | SetFlag | SetExtraLifeOfPlayer – SetFrameASPlay | 0x7100247990 |
| SimpleMessageDialogCtrl | ForkBasicMessageDialogCtrl | ForkAttackWithWeaponOrWithout – ForkBattleNodeForAttackGround | 0x71001471cc |
| SiteBossBlowOff | LastBossBlowOff | LargeDamage – LastBossChemicalPillarAttack | 0x71001cf0ec |
| SiteBossLswordAtk | SiteBossLswordAttack | SiteBossLswordAtkWithChemical – SiteBossLswordFireBall | 0x710025c470 |
| WaitOnObjBase | StopOnObj | StopJump – StorePlayerPosAndRotate* | 0x710027f974 |
| WaterUpDownMoveBase | WaterDepthMoveBase | WarpToStaticAnchor – WaterEmitter | 0x71002b33cc |

Neighbours marked * are the nearest correctly placed TU; a TU that is
itself still misnamed sits in between.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-04 23:40:26 +02:00
Léo Lam b9c6e58791 Remove the AI class status lists
Decompilation progress is tracked per function in uking_functions.csv
and on the kanban board. These per-class lists stopped being updated
long ago (20 of 1927 actions "done") and only cost upkeep on renames.

(AI assisted using Claude Opus 5.5)
2026-10-04 23:40:13 +02:00
Léo Lam 732b8d3962 Merge pull request #215 from leoetlino/stack/02-small-fixes
Minor fixes for issues found during AI-assisted naming passes
2026-10-04 21:57:57 +01:00
Léo Lam 88b478ac37 Merge pull request #211 from leoetlino/stack/01-moves
Move source files around to better match link order
2026-10-04 21:14:43 +01:00
Michael Zhao a005c77334 docs: improve agent instructions (#213) 2026-10-04 12:19:20 -07:00