2014-05-22 22:13:20 +00:00
|
|
|
PewterGuys: ; 37ca1 (d:7ca1)
|
2014-09-10 03:55:19 +00:00
|
|
|
ld hl, wSimulatedJoypadStatesEnd
|
|
|
|
ld a, [wSimulatedJoypadStatesIndex]
|
|
|
|
dec a ; this decrement causes it to overwrite the last byte before $FF in the list
|
|
|
|
ld [wSimulatedJoypadStatesIndex], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld d, 0
|
|
|
|
ld e, a
|
|
|
|
add hl, de
|
|
|
|
ld d, h
|
|
|
|
ld e, l
|
|
|
|
ld hl, PointerTable_37ce6
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [wWhichPewterGuy]
|
2014-05-22 22:13:20 +00:00
|
|
|
add a
|
|
|
|
ld b, 0
|
|
|
|
ld c, a
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld a, [W_YCOORD]
|
|
|
|
ld b, a
|
|
|
|
ld a, [W_XCOORD]
|
|
|
|
ld c, a
|
2015-07-26 02:26:54 +00:00
|
|
|
.findMatchingCoordsLoop
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
|
|
|
cp b
|
2015-07-26 02:26:54 +00:00
|
|
|
jr nz, .nextEntry1
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
|
|
|
cp c
|
2015-07-26 02:26:54 +00:00
|
|
|
jr nz, .nextEntry2
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2015-07-26 02:26:54 +00:00
|
|
|
.copyMovementDataLoop
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
|
|
|
cp $ff
|
|
|
|
ret z
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
2014-09-10 03:55:19 +00:00
|
|
|
ld a, [wSimulatedJoypadStatesIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
inc a
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesIndex], a
|
2015-07-26 02:26:54 +00:00
|
|
|
jr .copyMovementDataLoop
|
|
|
|
.nextEntry1
|
2014-05-22 22:13:20 +00:00
|
|
|
inc hl
|
2015-07-26 02:26:54 +00:00
|
|
|
.nextEntry2
|
2014-05-22 22:13:20 +00:00
|
|
|
inc hl
|
|
|
|
inc hl
|
2015-07-26 02:26:54 +00:00
|
|
|
jr .findMatchingCoordsLoop
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
PointerTable_37ce6: ; 37ce6 (d:7ce6)
|
|
|
|
dw PewterMuseumGuyCoords
|
|
|
|
dw PewterGymGuyCoords
|
|
|
|
|
|
|
|
; these are the four coordinates of the spaces below, above, to the left and
|
|
|
|
; to the right of the museum guy, and pointers to different movements for
|
|
|
|
; the player to make to get positioned before the main movement.
|
|
|
|
PewterMuseumGuyCoords: ; 37cea (d:7cea)
|
|
|
|
db 18, 27
|
|
|
|
dw .down
|
|
|
|
db 16, 27
|
|
|
|
dw .up
|
|
|
|
db 17, 26
|
|
|
|
dw .left
|
|
|
|
db 17, 28
|
|
|
|
dw .right
|
|
|
|
|
|
|
|
.down
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_UP, D_UP, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
.up
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_RIGHT, D_LEFT, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
.left
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_UP, D_RIGHT, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
.right
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_UP, D_LEFT, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
; these are the five coordinates which trigger the gym guy and pointers to
|
|
|
|
; different movements for the player to make to get positioned before the
|
|
|
|
; main movement
|
2015-07-17 07:52:25 +00:00
|
|
|
; $00 is a pause
|
2014-05-22 22:13:20 +00:00
|
|
|
PewterGymGuyCoords: ; 37d06 (d:7d06)
|
|
|
|
db 16, 34
|
|
|
|
dw .one
|
|
|
|
db 17, 35
|
|
|
|
dw .two
|
|
|
|
db 18, 37
|
|
|
|
dw .three
|
|
|
|
db 19, 37
|
|
|
|
dw .four
|
|
|
|
db 17, 36
|
|
|
|
dw .five
|
|
|
|
|
|
|
|
.one
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_LEFT, D_DOWN, D_DOWN, D_RIGHT, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
.two
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_LEFT, D_DOWN, D_RIGHT, D_LEFT, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
.three
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_LEFT, D_LEFT, D_LEFT, $00, $00, $00, $00, $00, $00, $00, $00, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
.four
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_LEFT, D_LEFT, D_UP, D_LEFT, $ff
|
2014-05-22 22:13:20 +00:00
|
|
|
.five
|
2015-07-17 07:52:25 +00:00
|
|
|
db D_LEFT, D_DOWN, D_LEFT, $00, $00, $00, $00, $00, $00, $00, $00, $ff
|