RE: A86: Code Troubles


[Prev][Next][Index][Thread]

RE: A86: Code Troubles




No, actually, I have that in there on purpose.. because throught the RPG,
when you change the maps, a will be incremented in (mapnum) before I call
drawmap... this will cause the drawmap routine to draw the next map.. or in
the calcpos routine, to find the offset of the man [dedicated by the number
6] in the map.. i took out that code just to try, and i changed call calcpos
with ld a,17 or something but still doesn't work.. I still can't figure out
the problem :(

Ahmed El-Helw <ahmed@ticalc.org>
Program Ideas, Upcoming Programs
the ticalc.org project - http://www.ticalc.org/
_____________________________
http://hail.icestorm.net/asm
ICQ : 3350394

> -----Original Message-----
> From: owner-assembly-86@lists.ticalc.org
> [mailto:owner-assembly-86@lists.ticalc.org]On Behalf Of Tercero
> Sent: Wednesday, October 28, 1998 1:54 AM
> To: assembly-86@lists.ticalc.org
> Subject: Re: A86: Code Troubles
>
>
>
> You need to take a break from programming.
> Your problem is very simple.
> Look:
>
> NewGame:
>   xor a			;a = 0
>   ld (mapnum),a		;(mapnum) = 0
>   call drawmap		;u said this works (mapnum) is unchanged
>   call calcpos		;ok, let's go
> ...
>
> calcpos:
>   ld hl,Maps		;ok
>   ld a,(mapnum)		;(mapnum) = 0; a = (mapnum); a = 0
>   or a			;is a = 0; yes, always, why? because
> 			;(mapnum) is never changed from 0 anywhere
> in the prog.
>   jr z,contcalc		;skip the y sprite block finder and
> go right to the
> 			;x-part
>   dec a			;skip
>   ld b,a		;skip
> calcoff:		;skip
>   ld de,128		;skip
>   add hl,de		;skip
>   djnz calcoff		;skip
> contcalc:		;continue
>
>
> --
> Tercero	 --  Email: mailto:tercero@busprod.com
>
> "The stone the builders rejected has become the capstone;"
> 			--Psalms 118:22
> "Everyone who falls on that stone will be broken to pieces,
> but he on whom it falls will be crushed."
> 			--Luke 20:18
>


References: