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: 6235

Author: john_elliott_uk

Date: 29/08/2007

Subject: Re: Tweaking the JSW engine: One for the experts

 

--- In manicminerandjetsetwilly@yahoogroups.com, adban_de_corcy
wrote:

> Take rooms 'Master Bedroom' 'The nightmare room' and 'Top Landing'.
>
> Now, when the time is divisible by 5 (it ends with 0 or 5), you get to
> 'Master Bedroom' if you go to the left of 'Top Landing'.
>
> Now, if the time is not divisible by five, then when you exit to the
> left of 'Top Landing' you enter 'The nightmare room'.

Changing exits can be done with a patch vector. You've probably
noticed that it happens in the original JSW64.

For a timed change of exits you'd use the 'main loop' patch vector,
something like this:

LD D,nnn ;Room number of the top landing
LD A,(time) ;Last digit of the clock
CP '0'
JR Z,doit
CP '5'
JR Z,doit
LD D,mmm ;Room number of the nightmare room
doit:
LD A,D
LD (80E9h),A ;Set exit to be the specified value.
RET

 

 

arrowleft
arrowright