Identify more labels, and use the jumptable macro when possible

This commit is contained in:
Rangi
2020-07-01 13:13:49 -04:00
parent e171c84c29
commit fce6243b43
26 changed files with 41 additions and 253 deletions

View File

@@ -2455,16 +2455,7 @@ Function11d035:
AnimateEZChatCursor:
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
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, hl
.Jumptable:
dw .zero

View File

@@ -351,16 +351,7 @@ MobileTradeAnim_JumptableLoop:
ret
.ExecuteMobileTradeAnimCommand:
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 GetMobileTradeAnimByte ; 00

View File

@@ -354,16 +354,7 @@ Function11619d:
ret
Function1161b8:
ld a, [wc319]
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, wc319
.Jumptable:
dw Function1161d5

View File

@@ -81,16 +81,7 @@ Function1176ee:
ret
Function117719:
ld a, [wcd49]
ld e, a
ld d, 0
ld hl, Jumptable_117728
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
jumptable Jumptable_117728, wcd49
Jumptable_117728:
dw Function117738
@@ -553,16 +544,7 @@ Function117acd:
ret
Function117ae9:
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 Function117b06

View File

@@ -346,16 +346,7 @@ Function171a11:
ret
Function171a36:
ld a, [wcd49]
ld e, a
ld d, 0
ld hl, Jumptable_171a45
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
jumptable Jumptable_171a45, wcd49
Jumptable_171a45:
dw Function171a95