Re: A83: Tile maps
[Prev][Next][Index][Thread]
Re: A83: Tile maps
This is the TCPA's tilemap routine, used in Dragonquest Dungeon, IceClimb,
and chicken shoot(?).
The tilemap format is like:
Tilemap:
.db 1,2,3,4,5,6,7,8,9,10,11,12
.db 5,5,5,5,5,5,5,5,0,0,0,0
.db 5,0,0,0,0,0,0,5,.....
DisplayTileMap:
;de = location of tilemap, can be varied
ld hl, plotsscreen
ld bc, 8*256+0
DrawmapLoop:
ld a, (de)
push de
push hl
ld l, a
ld h, 0
add hl, hl
add hl, hl
add hl, hl
ld de, sprites
;For variable tilesets change the above line to ld de,(tileset)
;and make tileset equal to a location of sprites
add hl, de
ex de, hl
pop hl
push bc
ld b, 8
push hl
DrawmapLoop2:
ld a, (de)
ld (hl),a
inc de
push bc
ld bc, 12
add hl, bc
pop bc
djnz DrawmapLoop2
pop hl
pop bc
pop de
inc de
inc hl
inc c
ld a, c
cp 12
jr nz, Drawmaploop
ld c,0
push de
ld de, 7*12
add hl, de
pop de
djnz Drawmaploop
ret
>From: Jeff Ruud <pyroboy_04@yahoo.com>
>Reply-To: assembly-83@lists.ticalc.org
>To: assembly-83@lists.ticalc.org
>Subject: A83: Tile maps
>Date: Sun, 14 Jan 2001 14:08:06 -0800 (PST)
>
>
>Can someone please explain to me how tile maps work on the 83+, and give me
>an example with commented code? I really want to know how to do this with
>asm. Thanks for all the help.
>
>~Jeff
>
>
>
>---------------------------------
>Do You Yahoo!?
>Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com