A82: Another Question
[Prev][Next][Index][Thread]
A82: Another Question
Hello Everyone... Can someone tell me why this doesn't work??? It displays
4 ssprites, not 8, and not 4 in a row either...
;----------------------------------------------------
Selected:
xor a
ld (Screen),a ;Starting at 0
ld a,47 ;47 -> A
ld (Row1VarY),a ;Y-Coord of Row 1
ld hl,RowVar1
ld (hl),$FF ;I tried a bunch of things for this, including 255 into a -> hl
jr DrawLoop ;Draw the Enemies
DrawLoop:
ld hl,(RowVar1) ;Load RowVar into hl
bit 0,a ;Check the first digit
call nz,RowOneSpr ;if 1, then draw ...
ld a,(Screen)
add a,12
ld (Screen),a
ld hl,(RowVar1)
bit 1,a
call nz,RowOneSpr
ld a,(Screen)
add a,12
ld (Screen),a
ld hl,(RowVar1)
bit 2,a
call nz,RowOneSpr
ld a,(Screen)
add a,12
ld (Screen),a
ld hl,(RowVar1)
bit 3,a
call nz,RowOneSpr
ld a,(Screen)
add a,12
ld (Screen),a
ld hl,(RowVar1)
bit 4,a
call nz,RowOneSpr
ld a,(Screen)
add a,12
ld (Screen),a
ld hl,(RowVar1)
bit 5,a
call nz,RowOneSpr
ld a,(Screen)
add a,12
ld (Screen),a
ld hl,(RowVar1)
bit 6,a
call nz,RowOneSpr
ld a,(Screen)
add a,12
ld (Screen),a
ld hl,(RowVar1)
bit 7,a
call nz,RowOneSpr
xor a
ld (Screen),a
ROM_CALL(DISP_GRAPH)
call Pause
ret
Pause:
call GET_KEY
or a
ret nz
jr z,Pause
RowOneSpr:
ld a,(Screen)
add a,4
ld (Screen),a
ld bc,Row1Spr
ld a,(Row1VarY)
ld e,a
ld a,(Screen)
call SPRXOR ;sprite routine [from DuckHunt 82 or whatever..]
ld a,(Screen)
sub 4
ld (Screen),a
ret
Row1Spr:
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
.db %11111111
;-------------------------------
Any help is appreciated.
-Ahmed
Ahmed El-Helw
ahmedre@worldnet.att.net
http://asm86.home.ml.org
http://asm8x.home.ml.org
Ahmed_ on IRC
ICQ UIN: 3350394