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: 4638
Author: jgh@arcade.demon.co.uk
Date: 31/12/2004
Subject: Re: The explanation for a class of
> Message-ID: <cpi82h+tt78@...>Mutter mutter... all the TABs vanished... Posted again:
"Alexandra" <never_ever_land2003@...> wrote:
> > All you have to do is NOP out the "RET Z" instruction and you canA single POKE won't do it, as it's missing code, rather than
> > have all these quirky features working in both directions!!
>
> Is there, by any chance, a POKE to turn the leftwards headheight bug
> OFF in JSW? I would really like that when making games without quirky
> features (i.e. in the purely classical platformgame style).
incorrectly functioning code. The following code needs adding:
L9032: OR A ; Back to new head-height position
SBC HL,DE ; Note: no check for wall block
;; Missing code
LD A,(WALL) ;; Get wall attribute
CP (HL) ;; Check left of Willy's head
RET Z ;; Return if wall
;;
LD (POSITION),HL ; Update Willy's position
LD A,B
LD (YPOSN),A ; Update pixel-line position
LD A,&03
LD (L85D2),A
RET
It can be done by making the engine share the end of the movement
code in 13 POKES:
L9032: OR A ; Back to new head-height position
L9033: SBC HL,DE ; Note: no check for wall block
L9035: 3AB280 LD A,(WALL) ;; Get wall attribute
L9038: BE CP (HL) ;; Check left of Willy's head
L9039: C8 RET Z ;; Return if wall
L903A: 22D385 LD (POSITION),HL ;; Update Willy's position
L903D: 3E03 LD A,&03 ;; Load to set variable
L903F: C3AE90 JP L90AE ;; Jump to end of right movement
L9042:
L90A1: LD A,(WALL) ; Get wall attribute
OR A ;
SBC HL,DE ; Points to right of Willy's head
CP (HL) ; If that is wall colour-attribute
RET Z ; then return without moving Willy
DEC HL ; Back to new head-height position
LD (POSITION),HL ; Update Willy's position
XOR A
L90AE: LD (L85D2),A
LD A,B
LD (YPOSN),A ; Update pixel-line position
RET
Hmmm. I may add this to the source code as another two options:
FIXLEFT to check moving left and FIXRIGHT to not check when moving
right.
--
J.G.Harston - jgh@... - mdfs.net/User/JGH
Badly formed email is deleted unseen as spam
