Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
easyworld committed Sep 7, 2016
1 parent acfbeee commit e269fcc
Show file tree
Hide file tree
Showing 6 changed files with 372 additions and 370 deletions.
Binary file modified bin/homebrew.elf
Binary file not shown.
Binary file modified cheat.plg
Binary file not shown.
727 changes: 363 additions & 364 deletions homebrew.map

Large diffs are not rendered by default.

Binary file modified obj/gameplg.o
Binary file not shown.
Binary file modified payload.bin
Binary file not shown.
15 changes: 9 additions & 6 deletions source/gameplg.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ void onCheatItemChanged(int id, int enable) {

// freeze the value
void freezeCheatValue() {
u32 key;
u32 key,pointer;
if (cheatEnabled[0]) {
WRITEU8(0x08c84274, 0xA);
WRITEU8(0x08C83D94, 0xA);
}
if (cheatEnabled[1]) {
WRITEU16(0x08C6FE55, 0x0101);
WRITEU16(0x08C6F975, 0x0101);
}
if (cheatEnabled[2]) {//TODO: need to be a function
key = getKey();
Expand All @@ -119,9 +119,12 @@ void freezeCheatValue() {
// wait until key is up
waitKeyUp();
}
if (cheatEnabled) {
WRITEU8(*(vu32*)(0x81FB9F0)+0xB2,0x1);
cheatEnabled[2] = 0;
if (cheatEnabled[2]) {
pointer = *(vu32*)(0x81FB510);
if(pointer != 0x5D48C0){//magic number
WRITEU8(pointer+0xB2,0x1);
cheatEnabled[2] = 0;
}
}
}
// TODO: handle your own cheat items
Expand Down

0 comments on commit e269fcc

Please sign in to comment.