mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-09-01 09:22:53 -04:00
Attempt to decompile cheatMenuHandleDialog
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ SECTIONS
|
||||
inflateSegmentRomStart = 0x4e850;
|
||||
ziplistSegmentRomStart = 0x4fc40;
|
||||
|
||||
_anticheatUncloakPoisonAddress = 0x7002a324;
|
||||
_antipiracyUncloakWriteAddress = 0x7002a324;
|
||||
|
||||
__rompos = 0;
|
||||
.boot 0x70001000 : AT(__rompos) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include "boot/boot.h"
|
||||
#include "constants.h"
|
||||
#include "gvars/gvars.h"
|
||||
#include "setup/setup_000000.h"
|
||||
@@ -479,6 +480,52 @@ glabel cheatMenuHandleDialog
|
||||
/* f107a74: 00000000 */ sll $zero,$zero,0x0
|
||||
);
|
||||
|
||||
// Mismatch because it optimises the `end = &ptr[4]` line.
|
||||
// It's calculating it as &func00002148 + 24 rather than ptr + 4.
|
||||
//bool cheatMenuHandleDialog(u32 operation, struct menu_dialog *dialog, struct menustackitem *stackitem)
|
||||
//{
|
||||
// if (operation == MENUOP_100) {
|
||||
// func0f14a52c();
|
||||
//
|
||||
// if (func0f11e78c()) {
|
||||
// savefileSetFlag(SAVEFILEFLAG_USED_TRANSFERPAK);
|
||||
// }
|
||||
//
|
||||
//#if PIRACYCHECKS
|
||||
// {
|
||||
// u32 *ptr = (u32 *)&func00002148;
|
||||
// u32 *end = (u32 *)&func000022e0;
|
||||
// u32 checksum = 0;
|
||||
//
|
||||
// while (ptr < end) {
|
||||
// checksum ^= ~*ptr;
|
||||
// ptr++;
|
||||
// }
|
||||
//
|
||||
// if (checksum != 0x6f764531) {
|
||||
// ptr = (u32 *)&func00002148 + 20;
|
||||
// end = &ptr[4];
|
||||
//
|
||||
// while (ptr < end) {
|
||||
// *ptr = 0x00000012;
|
||||
// ptr++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//#endif
|
||||
// }
|
||||
//
|
||||
// if (operation == MENUOP_101) {
|
||||
// if (func0f11e78c()) {
|
||||
// savefileSetFlag(SAVEFILEFLAG_USED_TRANSFERPAK);
|
||||
// }
|
||||
//
|
||||
// func0f14a560();
|
||||
// }
|
||||
//
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
char *cheatGetMarquee(struct menu_item *arg0)
|
||||
{
|
||||
u32 cheat_id;
|
||||
|
||||
+2
-2
@@ -5671,8 +5671,8 @@ void chrUncloak(struct chrdata *chr, bool value)
|
||||
}
|
||||
|
||||
if (checksum != 0x5874f34e) {
|
||||
extern volatile u32 _anticheatUncloakPoisonAddress[];
|
||||
_anticheatUncloakPoisonAddress[-2] = 0;
|
||||
extern volatile u32 _antipiracyUncloakWriteAddress[];
|
||||
_antipiracyUncloakWriteAddress[-2] = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,8 @@ s32 func000018ac(void);
|
||||
s32 func00001b28(void);
|
||||
s32 func00001e30(void);
|
||||
s32 func00001fa8(void);
|
||||
s32 func00002148(void);
|
||||
s32 func000022e0(void);
|
||||
s32 func00002ff0(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,7 @@ s32 cheatGetByTimedStageIndex(s32 stage_index, s32 difficulty);
|
||||
s32 cheatGetByCompletedStageIndex(s32 stage_index);
|
||||
s32 cheatGetTime(s32 cheat_id);
|
||||
char *cheatGetName(s32 cheat_id);
|
||||
s32 cheatMenuHandleDialog(u32, u32, u32 *);
|
||||
bool cheatMenuHandleDialog(u32 operation, struct menu_dialog *dialog, struct menustackitem *stackitem);
|
||||
s32 cheatMenuHandleCheatCheckbox(u32 arg0, struct menu_item *item, s32 arg2);
|
||||
s32 cheatMenuHandleBuddyCheckbox(s32 arg0, struct menu_item *item, s32 arg2);
|
||||
bool cheatMenuHandleTurnOffAllCheats(u32 arg0, u32 arg1, u32 *arg2);
|
||||
|
||||
Reference in New Issue
Block a user