Skip to content

Commit

Permalink
Upgrade repo for compatibility with current rgbds (breaks pre-0.3.3 c…
Browse files Browse the repository at this point in the history
…ompatibility)
  • Loading branch information
PikalaxALT committed Aug 25, 2017
1 parent dff855f commit d2e3b28
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 64 deletions.
2 changes: 1 addition & 1 deletion engine/movement.asm
Expand Up @@ -63,7 +63,7 @@ Function5006: ; 5006 (1:5006)
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

Function500d: ; 500d (1:500d)
ld a, $1
Expand Down
6 changes: 3 additions & 3 deletions engine/namingscreen.asm
Expand Up @@ -64,7 +64,7 @@ Function11b09: ; 11b09 (4:5b09)
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

.Jumptable
dw Function11b2a
Expand Down Expand Up @@ -338,7 +338,7 @@ Function11d27: ; 11d27 (4:5d27)
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

.Jumptable:
dw Function11d3a
Expand Down Expand Up @@ -1046,7 +1046,7 @@ Function123d5: ; 123d5 (4:63d5)
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

.Jumptable:
dw Function123e8
Expand Down
14 changes: 7 additions & 7 deletions engine/pack.asm
Expand Up @@ -22,7 +22,7 @@ Function10456: ; 10456 (4:4456)
ld a, [wce63]
ld hl, .Jumptable ; $4460
call Function10c9b
jp [hl]
jp hl

.Jumptable
dw Pack_InitGFX
Expand Down Expand Up @@ -141,7 +141,7 @@ Pack_TMHMPocketMenu:
ld a, [wMenuCursorY]
dec a
call Function10c9b
jp [hl]
jp hl

TMHMPocketSubmenuDataHeader_NoGive:
db $40
Expand Down Expand Up @@ -294,7 +294,7 @@ Function105f5: ; 105f5 (4:45f5)
ld a, [wMenuCursorY]
dec a
call Function10c9b
jp [hl]
jp hl

ItemSubmenuDataHeader_UseGiveTossSelQuit:
db $40 ; flags
Expand Down Expand Up @@ -639,7 +639,7 @@ Function108e9: ; 108e9 (4:48e9)
ld a, [wce63]
ld hl, .Jumptable
call Function10c9b
jp [hl]
jp hl

.Jumptable
dw BattlePack_InitGFX
Expand Down Expand Up @@ -793,7 +793,7 @@ Function10a0c: ; 10a0c (4:4a0c)
ld a, [wMenuCursorY]
dec a
call Function10c9b
jp [hl]
jp hl

BattlePackUseQuitMenuDataHeader:
db $40 ; flags
Expand Down Expand Up @@ -928,7 +928,7 @@ Function10af7: ; 10af7 (4:4af7)
ld a, [wce63]
ld hl, .Jumptable
call Function10c9b
jp [hl]
jp hl

.Jumptable
dw DepositOrSell_ItemPocket
Expand Down Expand Up @@ -1071,7 +1071,7 @@ Function10c07: ; 10c07 (4:4c07)
ld a, [wce63]
ld hl, $4c11
call Function10c9b
jp [hl]
jp hl

.Jumptable
dw TutorialItems
Expand Down
26 changes: 13 additions & 13 deletions engine/sprite_anims.asm
Expand Up @@ -9,7 +9,7 @@ DoAnimFrame: ; 8d463
ld a, [hli] ; 23:546f
ld h, [hl] ; 23:5470
ld l, a ; 23:5471
jp [hl] ; 23:5472
jp hl ; 23:5472

.Jumptable: ; 23:5473
dw Function8d4c7
Expand Down Expand Up @@ -166,7 +166,7 @@ Function8d54e: ; 8d54e

Function8d55d: ; 8d55d
call Function8dbdd ; 23:555d
jp [hl] ; 23:5560
jp hl ; 23:5560
; anonymous jumptable
dw Function8d565
Expand Down Expand Up @@ -236,7 +236,7 @@ Function8d5bb: ; 8d5bb

Function8d5bf: ; 8d5bf
call Function8dbdd ; 23:55bf
jp [hl] ; 23:55c2
jp hl ; 23:55c2

; anonymous jumptable
dw Function8d5c9
Expand Down Expand Up @@ -310,7 +310,7 @@ Function8d60b: ; 8d60b

Function8d623: ; 8d623
call Function8dbdd ; 23:5623
jp [hl] ; 23:5626
jp hl ; 23:5626

; anonymous jumptable
dw Function8d62b
Expand Down Expand Up @@ -359,7 +359,7 @@ Function8d667: ; 8d667

Function8d66b: ; 8d66b
call Function8dbdd ; 23:566b
jp [hl] ; 23:566e
jp hl ; 23:566e

; anonymous jumptable
dw Function8d673
Expand Down Expand Up @@ -388,7 +388,7 @@ Function8d68c: ; 8d68c

Function8d690: ; 8d690
call Function8dbdd ; 23:5690
jp [hl] ; 23:5693
jp hl ; 23:5693

; anonymous jumptable
dw Function8d69c
Expand Down Expand Up @@ -472,7 +472,7 @@ Function8d6fe: ; 8d6fe

Function8d702: ; 8d702
call Function8dbdd ; 23:5702
jp [hl] ; 23:5705
jp hl ; 23:5705

; anonymous jumptable
dw Function8d70c
Expand Down Expand Up @@ -545,7 +545,7 @@ Function8d761: ; 8d761

Function8d765: ; 8d765
call Function8dbdd ; 23:5765
jp [hl] ; 23:5768
jp hl ; 23:5768

; anonymous jumptable
dw Function8d76d
Expand Down Expand Up @@ -600,7 +600,7 @@ Function8d786: ; 8d786

Function8d7b1: ; 8d7b1
call Function8dbdd ; 23:57b1
jp [hl] ; 23:57b4
jp hl ; 23:57b4

; anonymous jumptable
dw Function8d7b9
Expand Down Expand Up @@ -643,7 +643,7 @@ Function8d7c9: ; 8d7c9

Function8d7ef: ; 8d7ef
call Function8dbdd ; 23:57ef
jp [hl] ; 23:57f2
jp hl ; 23:57f2

; anonymous jumptable
dw Function8d7f7
Expand Down Expand Up @@ -686,7 +686,7 @@ Function8d807: ; 8d807

Function8d82d: ; 8d82d
call Function8dbdd ; 23:582d
jp [hl] ; 23:5830
jp hl ; 23:5830

; anonymous jumptable
dw Function8d835
Expand Down Expand Up @@ -784,7 +784,7 @@ Function8d8b8: ; 8d8b8

Function8d8bf: ; 8d8bf
call Function8dbdd ; 23:58bf
jp [hl] ; 23:58c2
jp hl ; 23:58c2

; anonymous jumptable
dw Function8d8c7
Expand Down Expand Up @@ -1038,7 +1038,7 @@ Function8da2a: ; 8da2a

Function8da31: ; 8da31
call Function8dbdd ; 23:5a31
jp [hl] ; 23:5a34
jp hl ; 23:5a34
ld b, c ; 23:5a35
ld e, d ; 23:5a36
add e ; 23:5a37
Expand Down
4 changes: 2 additions & 2 deletions engine/title.asm
Expand Up @@ -31,7 +31,7 @@ StartTitleScreen:
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

.Jumptable
dw MainMenu_
Expand Down Expand Up @@ -271,7 +271,7 @@ Function640f: ; 640f (1:640f)
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

.Jumptable
dw Function6426
Expand Down
6 changes: 3 additions & 3 deletions home.asm
Expand Up @@ -4,12 +4,12 @@ INCLUDE "includes.asm"
INCLUDE "rst.asm"
INCLUDE "interrupts.asm"

SECTION "start", HOME[$100]
SECTION "start", ROM0[$100]
Start::
nop
jp _Start

SECTION "bank0", HOME[$150]
SECTION "bank0", ROM0[$150]
INCLUDE "home/vblank.asm"
INCLUDE "home/delay.asm"
INCLUDE "home/rtc.asm"
Expand Down Expand Up @@ -185,7 +185,7 @@ INCLUDE "home/random.asm"
INCLUDE "home/sram.asm"

jp_hl::
jp [hl]
jp hl

jp_de::
push de
Expand Down
2 changes: 1 addition & 1 deletion home/farcall.asm
Expand Up @@ -19,4 +19,4 @@ FarCall_hl:: ; 2e27 (0:2e27)
ret

._hl_
jp [hl]
jp hl
4 changes: 2 additions & 2 deletions home/menu.asm
Expand Up @@ -290,7 +290,7 @@ RunMenuItemPrintingFunction:: ; 1d44 (0:1d44)
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

InitMenuCursorAndButtonPermissions:: ; 1d69 (0:1d69)
call InitVerticalMenuCursor
Expand Down Expand Up @@ -405,7 +405,7 @@ MenuJumptable::
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

GetMenuDataPointerTableEntry:: ; 1e1b (0:1e1b)
ld e, a
Expand Down
2 changes: 1 addition & 1 deletion home/text.asm
Expand Up @@ -732,7 +732,7 @@ Text_TX_SCROLL:: ; 1342 (0:1342)
ret

Text_TX_ASM:: ; 1351 (0:1351)
jp [hl]
jp hl

Text_TX_NUM:: ; 1352 (0:1352)
ld a, [hli]
Expand Down
2 changes: 1 addition & 1 deletion home/vblank.asm
Expand Up @@ -15,7 +15,7 @@ VBlank::
ld l, a
ld de, .return
push de
jp [hl]
jp hl
.return
call GameTimer
pop hl
Expand Down
2 changes: 1 addition & 1 deletion items/item_effects.asm
Expand Up @@ -253,7 +253,7 @@ UltraBall: ; e926
ld l, a
ld de, .skip_or_return_from_ball_fn
push de
jp [hl]
jp hl

.skip_or_return_from_ball_fn
ld a, [wd002]
Expand Down
2 changes: 1 addition & 1 deletion macros.asm
Expand Up @@ -292,7 +292,7 @@ jumptable: MACRO
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl
endm

maskbits: macro
Expand Down
4 changes: 2 additions & 2 deletions predef/cgb.asm
Expand Up @@ -22,7 +22,7 @@ Predef_LoadSGBLayoutCGB:
ld l, a
ld de, .return
push de
jp [hl]
jp hl

.return
ret
Expand Down Expand Up @@ -444,7 +444,7 @@ Function96b7: ; 96b7 (2:56b7)
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

.Jumptable:
dw Function96c8
Expand Down
2 changes: 1 addition & 1 deletion predef/sgb.asm
Expand Up @@ -18,7 +18,7 @@ Predef_LoadSGBLayout: ; 8c2d (2:4c2d)
ld l, a
ld de, FinishSGBPredefFunction
push de
jp [hl]
jp hl

.Jumptable
dw Function8c90
Expand Down
2 changes: 1 addition & 1 deletion rst.asm
Expand Up @@ -28,7 +28,7 @@ SECTION "rst28",ROM0[JumpTable]
ld h, [hl]
ld l, a
pop de
jp [hl]
jp hl

; SECTION "rst30",ROM0[$30]
; rst30 is midst rst28
Expand Down

0 comments on commit d2e3b28

Please sign in to comment.