Re: A86: Code Troubles


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

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


Follow-Ups: References: