Resource centre for ZX Spectrum games
using Manic Miner and Jet Set Willy game engines
Archive of the
Manic Miner & Jet Set Willy Yahoo! Group
messages
|
|
||
|
|
Message: 4115
Author: carlwoffenden
Date: 22/04/2004
Subject: Rope disassembly
I'm away from my Windows box for a few days (and Fuse on OS X doesn't
have a working debugger). I think I'm getting Willy blind but some of
my comments on this don't make sense without seeing it in action -
when do the two addresses (0x936F and 0x939B) get called?
L936F: BIT 0,(IX+&0B) ; grab flag
JR Z,L93B3 ; branch if Willy was already on rope
LD A,(L85D0) ; Willy's walking/facing flags
BIT 1,A
JR Z,L93B3 ; branch if Willy was standing still
RRCA ; facing flag now at bit-7
XOR (IX+&00) ; XOR with rope swing direction
RLCA
RLCA
AND &02
DEC A
LD HL,#85D6
ADD A,(HL)
LD (HL),A
LD A,(#80EB) ; room above
LD C,A
LD A,(#8420) ; current room
CP C
JR NZ,L939B ; branch if going up isn't same room
LD A,(HL)
CP &0C
JR NC,L939B ; branch if Willy's rope y > 12
LD (HL),&0C ; else set the rope y to 12 (6 pixels)
L939B: LD A,(HL)
CP (IX+&04) ; rope length
JR C,L93B3 ; branch if Willy's rope y < rope len
JR Z,L93B3 ; branch if Willy's rope y < rope len
LD (HL),&F0 ; else set the rope y to 240 (120px)
LD A,(#85CF) ; Willy's y * 2
AND &F8 ; align it to half a block
LD (#85CF),A ; then update it
XOR A
LD (#85D1),A ; change Willy's action to standing
JR L93B3
Thanks,
Carl.
