Skip to content

Commit

Permalink
Revamp Cheats menu
Browse files Browse the repository at this point in the history
  • Loading branch information
HylianFreddy committed Dec 22, 2021
1 parent 7c7f450 commit 3d4a573
Show file tree
Hide file tree
Showing 17 changed files with 438 additions and 242 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ ifeq ($(Z3D), $(OOT3DJ))
CFLAGS += -g -DVersion_JP
endif

citra ?= 0
ifneq ($(citra), 0)
CFLAGS += -g -DCITRA
endif

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
Expand Down
Binary file modified code.ips
Binary file not shown.
Binary file added code_citra_us.ips
Binary file not shown.
Binary file modified code_j.ips
Binary file not shown.
9 changes: 9 additions & 0 deletions include/common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef _COMMON_H_
#define _COMMON_H_

#include "3ds/svc.h"

extern MemInfo query_memory_permissions(u32 address);
extern bool is_valid_memory_read(const MemInfo* info);

#endif //_COMMON_H_
28 changes: 25 additions & 3 deletions include/menus/cheats.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

#include "menu.h"

extern Menu CheatsMenu;
extern Menu CheatsItemsMenu;
extern Menu CheatsKeysMenu;
extern ToggleMenu CheatsMenu;

void Cheats_ShowCheatsMenu();
void applyCheats();

typedef enum {
/* 0x00*/ CHEATS_HEALTH = 0,
/* 0x01*/ CHEATS_MAGIC,
/* 0X02*/ CHEATS_STICKS,
/* 0X03*/ CHEATS_NUTS,
/* 0X04*/ CHEATS_BOMBS,
/* 0X05*/ CHEATS_ARROWS,
/* 0X06*/ CHEATS_SEEDS,
/* 0X07*/ CHEATS_BOMBCHUS,
/* 0X08*/ CHEATS_BEANS,
/* 0X09*/ CHEATS_KEYS,
/* 0X0A*/ CHEATS_RUPEES,
/* 0X0B*/ CHEATS_MQ,
/* 0X0C*/ CHEATS_NAYRUS_LOVE,
/* 0X0D*/ CHEATS_FREEZE_TIME,
/* 0X0E*/ CHEATS_NO_MUSIC,
/* 0X0F*/ CHEATS_USABLE_ITEMS,
/* 0X10*/ CHEATS_ISG,
/* 0X11*/ CHEATS_QUICK_TEXT,
} CheatNames;
44 changes: 44 additions & 0 deletions oot.ld
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ SECTIONS
*(.patch_loader)
}

.patch_InstantTextFirstLine 0x2E049C : {
*(.patch_InstantTextFirstLine)
}

.patch_InstantTextBoxBreak 0x2E0664 : {
*(.patch_InstantTextBoxBreak)
}

.patch_InstantTextRemoveOff 0x2E06C8 : {
*(.patch_InstantTextRemoveOff)
}

.patch_load 0x2E3790 : {
*(.patch_load)
}
Expand All @@ -16,6 +28,22 @@ SECTIONS
*(.patch_Gfx_Update)
}

.patch_SetBGMEntrance 0x331048 : {
*(.patch_SetBGMEntrance)
}

.patch_TurboTextSignalNPC 0x3469F4 : {
*(.patch_TurboTextSignalNPC)
}

.patch_PlaySound 0x35C528 : {
*(.patch_PlaySound)
}

.patch_SetBGMEvent 0x36EC40 : {
*(.patch_SetBGMEvent)
}

.patch_before_GlobalContext_Update 0x452390 : {
*(.patch_before_GlobalContext_Update)
}
Expand All @@ -24,6 +52,22 @@ SECTIONS
*(.patch_after_GlobalContext_Update)
}

.patch_ItemUsability 0x476D1C : {
*(.patch_ItemUsability)
}

.patch_TurboTextAdvance 0x480928 : {
*(.patch_TurboTextAdvance)
}

.patch_SetBGMDayNight 0x483C88 : {
*(.patch_SetBGMDayNight)
}

.patch_TurboTextClose 0x488214 : {
*(.patch_TurboTextClose)
}

. = 0x4C99A8;
. = ALIGN(4);
.loader : {
Expand Down
Loading

0 comments on commit 3d4a573

Please sign in to comment.