A86: Major Problem with FindPixel
[Prev][Next][Index][Thread]
A86: Major Problem with FindPixel
Has anybody notice while using FindPixel that if you put 2 pixels with the
same Y value next to each other the second one will erase the first one? I
am using the following routine:
ld d,(ter_y)
ld e,(ter_x)
call FindPixel
ld (hl),a
This is probobly caused by the first pixel having an A value of %01000000
(or close to it) and the second having an A value of %00000100 (or close to
it). The second A value completly erases the first pixel. The solution
would be to have the FindPixel routine retern %01000100 instead of
%00000100 the second time. Does anybody have a clue how to do this?
I need this for the terrain routine for my game. Right now, the calculator
choses +1, 0, or -1 and adds it to the current Y value, the X value is
continually increased cause random smooth terrain to form. The problem is
whenever the calc choses 0, it erases all the neighboring pixels on the
same level due to the problem stated above.
-Thanks
Ricci Adams
ricci@chipsnet.com
Follow-Ups: