diff options
Diffstat (limited to 'main.asm')
-rw-r--r-- | main.asm | 40 |
1 files changed, 37 insertions, 3 deletions
@@ -85,7 +85,6 @@ DelayFrames: ; 0x468 ret ; 0x46f - RTC: ; 46f ; update time and time-sensitive palettes @@ -2245,16 +2244,50 @@ PushScriptPointer: ; 261f ret ; 2631 -INCBIN "baserom.gbc",$2631,$26ef - $2631 +INCBIN "baserom.gbc",$2631,$26d4 - $2631 + +GetScriptByte: ; 0x26d4 +; Return byte at ScriptBank:ScriptPos in a. + + push hl + push bc + + ld a, [$ff9d] + push af + + ld a, [ScriptBank] + rst Bankswitch + + ld hl, ScriptPos + ld c, [hl] + inc hl + ld b, [hl] + + ld a, [bc] + + inc bc + ld [hl], b + dec hl + ld [hl], c + + ld b, a + pop af + rst Bankswitch + ld a, b + + pop bc + pop hl + ret +; 0x26ef ObjectEvent: ; 0x26ef jumptextfaceplayer ObjectEventText ; 0x26f2 - ObjectEventText: TX_FAR _ObjectEventText db "@" +; 0x26f7 INCBIN "baserom.gbc",$26f7,$2bed-$26f7 @@ -2289,6 +2322,7 @@ GetMapHeaderPointer: ; 0x2bed ld a, OlivineGym_MapHeader - OlivinePokeCenter1F_MapHeader call AddNTimes ret +; 0x2c04 GetMapHeaderMember: ; 0x2c04 ; Extract data from the current map's header. |