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: 4636
Author: jgh@arcade.demon.co.uk
Date: 30/12/2004
Subject: Re: The explanation for a class of
> Message-ID: <cpi82h+tt78@...>"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:ORA; Back to new head-height position
SBCHL,DE; Note: no check for wall block
;; Missing code
LDA,(WALL);; Get wall attribute
CP(HL);; Check left of Willy's head
RETZ;; Return if wall
;;
LD(POSITION),HL; Update Willy's position
LDA,B
LD(YPOSN),A; Update pixel-line position
LDA,&03
LD(L85D2),A
RET
It can be done by making the engine share the end of the movement
code in 13 POKES:
L9032:ORA; Back to new head-height position
L9033:SBCHL,DE; Note: no check for wall block
L9035: 3AB280LDA,(WALL);; Get wall attribute
L9038:BECP(HL);; Check left of Willy's head
L9039:C8RETZ;; Return if wall
L903A:22D385LD(POSITION),HL;; Update Willy's position
L903D:3E03LDA,&03;; Load to set variable
L903F:C3AE90JPL90AE;; Jump to end of right movement
L9042:
L90A1:LDA,(WALL); Get wall attribute
ORA;
SBCHL,DE; Points to right of Willy's head
CP(HL); If that is wall colour-attribute
RETZ; then return without moving Willy
DECHL; Back to new head-height position
LD(POSITION),HL; Update Willy's position
XORA
L90AE:LD(L85D2),A
LDA,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
