-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
280 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,7 @@ B8=, | |
B5=♂ | ||
B6=♀ | ||
AE=- | ||
BA=/ | ||
FE=\n | ||
FA=\l | ||
FB=\p | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
|
||
#include "main.h" | ||
#include "types.h" | ||
#include "berry.h" | ||
#include "pokemon.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#pragma once | ||
|
||
#include "sprite.h" | ||
|
||
typedef void (*MainCallback)(void); | ||
typedef void (*IntrCallback)(void); | ||
typedef void (*IntrFunc)(void); | ||
|
||
struct Main | ||
{ | ||
/*0x000*/ MainCallback callback1; | ||
/*0x004*/ MainCallback callback2; | ||
|
||
/*0x008*/ MainCallback savedCallback; | ||
|
||
/*0x00C*/ IntrCallback vblankCallback; | ||
/*0x010*/ IntrCallback hblankCallback; | ||
/*0x014*/ IntrCallback vcountCallback; | ||
/*0x018*/ IntrCallback serialCallback; | ||
|
||
/*0x01C*/ vu16 intrCheck; | ||
|
||
/*0x020*/ u32 vblankCounter1; | ||
/*0x024*/ u32 vblankCounter2; | ||
|
||
/*0x028*/ u16 heldKeysRaw; // held keys without L=A remapping | ||
/*0x02A*/ u16 newKeysRaw; // newly pressed keys without L=A remapping | ||
/*0x02C*/ u16 heldKeys; // held keys with L=A remapping | ||
/*0x02E*/ u16 newKeys; // newly pressed keys with L=A remapping | ||
/*0x030*/ u16 newAndRepeatedKeys; // newly pressed keys plus key repeat | ||
/*0x032*/ u16 keyRepeatCounter; // counts down to 0, triggering key repeat | ||
/*0x034*/ bool16 watchedKeysPressed; // whether one of the watched keys was pressed | ||
/*0x036*/ u16 watchedKeysMask; // bit mask for watched keys | ||
|
||
/*0x038*/ u8 objCount; | ||
|
||
/*0x03C*/ struct OamData oamBuffer[128]; | ||
|
||
/*0x43C*/ u8 state; | ||
|
||
/*0x43D*/ u8 oamLoadDisabled:1; | ||
/*0x43D*/ u8 inBattle:1; | ||
}; | ||
|
||
extern struct Main gMain; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.if WRONG_SAVE_TYPE_ERROR | ||
.org 0x800028c | ||
ldr r7, =(@NoFlashMemoryCallback | 1) | ||
bx r7 | ||
.pool | ||
|
||
.autoregion | ||
.align 2 | ||
@NoFlashMemoryCallback: | ||
cmp r0, #1 | ||
beq @return_to_main | ||
ldr r0, =(@MainCBHook | 1) | ||
ldr r7, =(0x80003cc | 1) | ||
bl @linker | ||
|
||
@return_to_main: | ||
ldr r7, =(0x8000294 | 1) | ||
bx r7 | ||
|
||
@linker: | ||
bx r7 | ||
.pool | ||
|
||
@MainCBHook: | ||
push {r0-r2, lr} | ||
ldr r2, =(0x3001bac) | ||
ldrb r1, [r2] | ||
|
||
cmp r1, #0x1 | ||
beq @early_ret | ||
|
||
ldr r0, =(@ErrorText) | ||
|
||
push {r0-r7} | ||
bl FlashNotDetectedScreen | ||
pop {r0-r7} | ||
|
||
mov r1, #0x1 | ||
strb r1, [r2] | ||
|
||
@early_ret: | ||
pop {r0-r2, pc} | ||
.pool | ||
|
||
@ErrorText: | ||
.byte 0xFC, 0x01, 0x02 | ||
.stringn "ERROR!\n" | ||
.byte 0xFC, 0x01, 0x01 | ||
.string "Flash memory not detected.\n\nSet your emulator's save type\nsetting to Flash 1MB / 128K\nand reload the rom." | ||
.endautoregion | ||
.endif |
Oops, something went wrong.