<feed xmlns='http://www.w3.org/2005/Atom'>
<title>botw/src/KingSystem, branch master</title>
<subtitle>Decompilation of The Legend of Zelda: Breath of the Wild (Switch v1.5.0)</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/'/>
<entry>
<title>ksys/util: bind tryCreateDualHeap to the function body</title>
<updated>2026-10-15T21:56:22+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-15T21:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=dff75e03e837bd35a650871543dff0fc5851d322'/>
<id>dff75e03e837bd35a650871543dff0fc5851d322</id>
<content type='text'>
The 8-byte function only masks the bool argument and branches to the
body right after it, so the body is tryCreateDualHeap and the wrapper is
createDualHeap (name from the IDB). GameData calls the wrapper, so it
now calls createDualHeap.

(AI assisted using Claude Opus 5.5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 8-byte function only masks the bool argument and branches to the
body right after it, so the body is tryCreateDualHeap and the wrapper is
createDualHeap (name from the IDB). GameData calls the wrapper, so it
now calls createDualHeap.

(AI assisted using Claude Opus 5.5)
</pre>
</div>
</content>
</entry>
<entry>
<title>ksys/phys: move motionTypeFromText to physUtil</title>
<updated>2026-10-15T23:18:41+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-15T23:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=ef164cc8aac3a4d1729d3cbf722dec9b30a0c147'/>
<id>ef164cc8aac3a4d1729d3cbf722dec9b30a0c147</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>ksys/phys: rename physStaticCompoundUtil to physUtil</title>
<updated>2026-10-16T15:51:17+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-16T15:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=7286390beae272d1f8201e45ecf725d75241a84d'/>
<id>7286390beae272d1f8201e45ecf725d75241a84d</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>ksys/act: make calcHash a free function in actAwarenessMiscUtils</title>
<updated>2026-10-15T21:56:21+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-15T21:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=13861707e3a5e2b50870460f50769b9056e871ff'/>
<id>13861707e3a5e2b50870460f50769b9056e871ff</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>ksys, uking: move four definitions to match link order</title>
<updated>2026-10-14T23:59:46+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-13T08:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=8eca2642b01591ccbfbee98e66181d8ad5982cd3'/>
<id>8eca2642b01591ccbfbee98e66181d8ad5982cd3</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>Name placeholder virtuals from their overrides</title>
<updated>2026-10-14T23:59:46+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-09-28T01:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=05236e5a38097b198950669b353b14f31adf4322'/>
<id>05236e5a38097b198950669b353b14f31adf4322</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>ksys: move AS setting, RootAi and three others to match link order</title>
<updated>2026-10-13T01:33:27+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-09-28T01:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=ea13bac74ad136aeb3dde81f07ccd62622be94ad'/>
<id>ea13bac74ad136aeb3dde81f07ccd62622be94ad</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>ksys/phys: rearrange the folder layout to match link order</title>
<updated>2026-10-13T00:55:29+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-09-28T01:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=89322a8d0cb0c1aaab509ab653a9368a2ae5dea9'/>
<id>89322a8d0cb0c1aaab509ab653a9368a2ae5dea9</id>
<content type='text'>
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/&lt;Kind&gt;/phys&lt;Kind&gt;Shape.cpp | RigidBody/Shape/phys&lt;Kind&gt;Shape.cpp |
| RigidBody/Shape/&lt;Kind&gt;/phys&lt;Kind&gt;RigidBody.cpp | RigidBody/physRigidBody&lt;Kind&gt;.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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/&lt;Kind&gt;/phys&lt;Kind&gt;Shape.cpp | RigidBody/Shape/phys&lt;Kind&gt;Shape.cpp |
| RigidBody/Shape/&lt;Kind&gt;/phys&lt;Kind&gt;RigidBody.cpp | RigidBody/physRigidBody&lt;Kind&gt;.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)
</pre>
</div>
</content>
</entry>
<entry>
<title>Move code to the TUs that match link order and rename files</title>
<updated>2026-10-12T23:53:08+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-09-28T01:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=fa2b8b7d4738e5ee098fc105adc60e10356dd410'/>
<id>fa2b8b7d4738e5ee098fc105adc60e10356dd410</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>ksys/act: split IDamageManager out of DamageManagerBase</title>
<updated>2026-10-11T02:53:08+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-09-28T01:39:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=419f8f46bb40763d9602e4f975a033194281c5f5'/>
<id>419f8f46bb40763d9602e4f975a033194281c5f5</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
</feed>
