Identify more labels, and use the jumptable macro when possible
This commit is contained in:
@@ -230,16 +230,7 @@ Function81a74:
|
||||
jr nz, .asm_81aab
|
||||
|
||||
.asm_81a8b
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_81acf
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
jumptable Jumptable_81acf, wJumptableIndex
|
||||
|
||||
.asm_81a9a
|
||||
call Function81eca
|
||||
|
@@ -363,16 +363,7 @@ NamingScreenJoypadLoop:
|
||||
ret
|
||||
|
||||
.RunJumptable:
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, .Jumptable
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
jumptable .Jumptable, wJumptableIndex
|
||||
|
||||
.Jumptable:
|
||||
dw .InitCursor
|
||||
@@ -1050,16 +1041,7 @@ INCBIN "gfx/icons/mail_big.2bpp"
|
||||
ret
|
||||
|
||||
.DoJumptable:
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
jumptable .Jumptable, wJumptableIndex
|
||||
|
||||
.Jumptable:
|
||||
dw .init_blinking_cursor
|
||||
|
@@ -91,16 +91,7 @@ StringOptions:
|
||||
db "CANCEL@"
|
||||
|
||||
GetOptionPointer:
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Pointers
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
jumptable .Pointers, wJumptableIndex
|
||||
|
||||
.Pointers:
|
||||
; entries correspond to OPT_* constants
|
||||
|
Reference in New Issue
Block a user