Skip to content

Game/Damage: Implement DamageMgrShield - #187

Open
german77 wants to merge 1 commit into
zeldaret:masterfrom
german77:DamageMgrShield
Open

Game/Damage: Implement DamageMgrShield#187
german77 wants to merge 1 commit into
zeldaret:masterfrom
german77:DamageMgrShield

Conversation

@german77

@german77 german77 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This is the first PR with an actual implementation. I have more questions than anything specially with names and file locations. We have DamageMgrBase but also DamageManagerBase and they appear to be the same thing? ksys::res::Chemical but this impl requires ksys::act::Chemical?

hieldSurfDamageLogic and shieldDamageLogic cast from Actor to something else. I couldn't figure out which actor this is meant to be so for now I left those out.

Another thing to note is that the vtable is wrong, the order is not correct for rtti elements but this is probably an issue in DamageManagerBase and not in this class


This change is Reviewable

@Pistonight

Pistonight commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

It's possible the name in the code and in IDA/csv are different. Unless the game has strings to indicate one over the other it's up to us to pick one (hopefully this issue will become less of a deal when the new tool is made)

that said since the code already has DamageManager we should probably stick with that

@Pistonight Pistonight left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pistonight made 4 comments.
Reviewable status: 0 of 7 files reviewed, 4 unresolved discussions (waiting on german77).


src/Game/Damage/dmgDamageManagerBase.h line 128 at r1 (raw file):

    inline void tryApplyDamageRecovery(s32& damage);

    void setDamageType(s32 type) { mDamageType = type; }

Is this an enum?


src/Game/Damage/dmgDamageMgrShield.h line 7 at r1 (raw file):

namespace ksys::act {
// TODO: Move Chemical to correct file

is it possible ksys::act::Chemical and ksys::world::Chemical are the same? (there's ChemicalMgr looks like hasn't been RE'ed much)


src/Game/Damage/dmgDamageMgrShield.h line 10 at r1 (raw file):

class Chemical {
public:
    char filler[0xc0];

convention is u8 _0[0xc0];


src/Game/Damage/dmgDamageMgrShield.h line 24 at r1 (raw file):

    ~DamageMgrShield() override;

    void setDamage2(f32 damage) override;

Do we have better names for these?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants