File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class Mod
33
33
void drawArtAttackHitboxes (ttyd::dispdrv::CameraId);
34
34
int32_t displayActionCommandsTimingHook (void *, ttyd::battle_unit::AttackParams *);
35
35
void errorHandler (uint16_t , gc::OSContext::OSContext *, uint32_t , uint32_t );
36
- ttyd::npcdrv::NpcEntry *npcNameToPtr_New (const char *);
36
+ ttyd::npcdrv::NpcEntry *checkForNpcNameToPtrError (const char *);
37
37
38
38
private:
39
39
void (*mPFN_marioStMain_trampoline )() = nullptr ;
@@ -59,7 +59,7 @@ class Mod
59
59
void (*mPFN_systemErrorHandler_trampoline )(uint16_t ,
60
60
gc::OSContext::OSContext *, uint32_t , uint32_t ) = nullptr ;
61
61
62
- ttyd::npcdrv::NpcEntry *(*mPFN_npcNameToPtr_New_trampoline )(const char *) = nullptr ;
62
+ ttyd::npcdrv::NpcEntry *(*mPFN_npcNameToPtr_trampoline )(const char *) = nullptr ;
63
63
};
64
64
65
65
}
Original file line number Diff line number Diff line change @@ -633,10 +633,10 @@ void checkHeaps()
633
633
}
634
634
}
635
635
636
- ttyd::npcdrv::NpcEntry *Mod::npcNameToPtr_New (const char *name)
636
+ ttyd::npcdrv::NpcEntry *Mod::checkForNpcNameToPtrError (const char *name)
637
637
{
638
- // Call the original function right away
639
- ttyd::npcdrv::NpcEntry *NPC = mPFN_npcNameToPtr_New_trampoline (name);
638
+ // Call the original function immediately
639
+ ttyd::npcdrv::NpcEntry *NPC = mPFN_npcNameToPtr_trampoline (name);
640
640
641
641
// Check if the returned pointer is valid
642
642
ttyd::npcdrv::NpcWork *NpcWorkPointer = ttyd::npcdrv::npcGetWorkPtr ();
Original file line number Diff line number Diff line change @@ -140,10 +140,10 @@ void Mod::init()
140
140
gMod ->errorHandler (error, context, dsisr, dar);
141
141
});
142
142
143
- mPFN_npcNameToPtr_New_trampoline = patch::hookFunction (
143
+ mPFN_npcNameToPtr_trampoline = patch::hookFunction (
144
144
ttyd::npcdrv::npcNameToPtr, [](const char *name)
145
145
{
146
- return gMod ->npcNameToPtr_New (name);
146
+ return gMod ->checkForNpcNameToPtrError (name);
147
147
});
148
148
149
149
// Initialize typesettings early
You can’t perform that action at this time.
0 commit comments