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

Author: john_elliott_uk

Date: 20/08/2004

Subject: Re: Patch Vectors

 

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

> vector: ld hl,tick ;HL = address of the tick count.
> inc (hl) ;Add 1 to the count.
> ld a,(hl) ;Get its new value
> cp 26 ;Or however many ticks you want
> ret c ;If A is less than 26, return.
> ld (hl),0 ;Reset the counter to 0.
> ld hl,80D6h ;HL = address of the conveyor direction
> ld a,(hl) ;A = current conveyor flag
> xor 1 ;If A was 1, it becomes 0, and vice versa.
> ld (hl),a
> ret

- Though in JSW64, that only reverses the conveyor animation. To
reverse the conveyor direction, you have to do the same trick to the
correct entry in the element map at 8D33h. Say your conveyor is cell 5
- the entry to reverse is at 8D33h + 2*5 + 1 = 8D3Eh.

 

 

arrowleft
arrowright