junglejourney
changeset 41:513dc8ee2a82
Vary the emerge position depending on the player's position.
| author | David Boddie <david@boddie.org.uk> |
|---|---|
| date | Sun Aug 21 16:02:00 2011 +0200 |
| parents | 3946b61beb36 |
| children | 99ef92fc83ae |
| files | mapcode.oph |
| diffstat | 1 files changed, 16 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/mapcode.oph Sun Aug 21 15:56:33 2011 +0200 1.2 +++ b/mapcode.oph Sun Aug 21 16:02:00 2011 +0200 1.3 @@ -1771,22 +1771,34 @@ 1.4 clc 1.5 rts 1.6 1.7 -emerge_position: ; returns A=position 1.8 +emerge_x_position: ; returns A=position 1.9 jsr unlimited_values 1.10 - lda $7d 1.11 + lda $3304 1.12 + and #2 1.13 + eor $7d 1.14 and #7 1.15 adc #1 1.16 clc 1.17 rts 1.18 1.19 +emerge_y_position: ; returns A=position 1.20 + jsr unlimited_values 1.21 + lda $3302 1.22 + and #2 1.23 + eor $7d 1.24 + and #7 1.25 + adc #1 1.26 + clc 1.27 + rts 1.28 + 1.29 emerge_character: ; $74,$75=character address 1.30 1.31 lda #63 1.32 sta $33ff 1.33 1.34 - jsr emerge_position ; obtain a y position 1.35 + jsr emerge_y_position ; obtain a y position 1.36 tax 1.37 - jsr emerge_position ; obtain an x position 1.38 + jsr emerge_x_position ; obtain an x position 1.39 sta $80 ; temporary 1.40 tay 1.41
