[A83] Re: Tilemap problems


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

[A83] Re: Tilemap problems



Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks, I changed the source, but the screen still garbles up whenever it
displays, still. If anyone even has an idea what is wrong it would be
greatly appreciated. Thanks once again.=0D
=0D
Start:=0D
 bcall(_runindicoff)=0D
 ld a,0=0D
 ld (X),a=0D
 call TilemapDraw=0D
 bcall(_grbufcpy)=0D
 bcall(_getkey)=0D
 ret=0D
TilemapDraw:=0D
 bcall(_grbufclr)=0D
 ld hl,Tilemap=0D
 ld de,(X)=0D
 ld d,0=0D
 add hl,de=0D
 ld de,0000h ;So we start out at 0,0=0D
 ld b,10=0D
RowLoop:=0D
 push bc=0D
 ld b,13  ;The width of my rows=0D
ColumnLoop: =0D
 ld a,(hl)  ;Loading a with the number in the postition that it is pointi=
ng =0D
to=0D
 inc hl=0D
 push hl=0D
 push de=0D
 ld l,a=0D
 ld h,0=0D
 ld e,a=0D
 ld d,0=0D
 add hl,hl  ;So we get a*4=0D
 add hl,hl=0D
 add hl,de  ;So we get a*6 which will give us how many bytes to shift dow=
n=0D
 ld de,sprites=0D
 add hl,de=0D
 pop de=0D
 push bc=0D
 ld b,6  ;The width of our sprite=0D
 ld l,d  ;Our postion on the screen=0D
 ld a,e=0D
 push de=0D
 call ionfastcopy=0D
 pop de=0D
 ld a,6=0D
 add a,e=0D
 ld e,a=0D
 pop bc  ;Gets the bc that we used to store the rows=0D
 pop hl=0D
 djnz ColumnLoop=0D
 ld e,00h=0D
 ld a,6=0D
 add a,d=0D
 ld d,a=0D
 pop bc  ;Gets the bc that we used to store the colums=0D
 djnz RowLoop=0D
 ret=0D
Tilemap:=0D
  .db 0,0,0,0,0,0,0,0,0,0,0,0,0=0D
  .db 1,2,1,1,1,2,1,1,1,1,1,1,2=0D
  .db 0,2,0,0,0,2,0,0,0,0,0,0,2=0D
  .db 1,1,1,2,1,1,1,1,1,1,2,1,1=0D
  .db 0,0,0,2,0,0,0,0,0,0,2,0,0=0D
  .db 1,2,1,1,1,2,1,1,1,1,1,1,1=0D
  .db 0,2,0,0,0,2,0,0,0,0,0,0,0=0D
  .db 1,1,1,2,1,1,1,1,1,1,2,1,1=0D
  .db 0,0,0,2,0,0,0,0,0,0,2,0,0=0D
  .db 1,1,1,1,1,1,1,1,1,1,1,1,1=0D
sprites:=0D
blankspace:  ;0=0D
 .db  %00000000=0D
 .db  %00000000=0D
 .db  %00000000=0D
 .db  %00000000=0D
 .db  %00000000=0D
 .db  %00000000=0D
floor:   ;1 =0D
 .db  %11111100=0D
 .db  %11111100=0D
 .db  %11111100=0D
 .db  %11111100=0D
 .db  %11111100=0D
 .db  %11111100=0D
ladder:   ;2=0D
 .db  %11110000=0D
 .db  %00110000=0D
 .db  %00110000=0D
 .db  %00111100=0D
 .db  %00110000=0D
 .db  %00110000=0D
=2Eend=0D
END=0D
-------Original Message-------=0D
=0D
From: assembly-83@lists.ticalc.org=0D
Date: Monday, November 12, 2001 3:48:44 PM=0D
To: assembly-83@lists.ticalc.org=0D
Subject: [A83] Re: Tilemap problems=0D
=0D
well the answer to the garbled screen is the way you define your sprites.=
=2E.=0D
you must define 8 bits, not 6... so leave the two last columns open=0D
eg:=0D
=0D
Black_Tile:=0D
=2E.db %11111100=0D
=2E.db %11111100=0D
=2E.db %11111100=0D
=2E.db %11111100=0D
=2E.db %11111100=0D
=2E.db %11111100=0D
=0D
=2E


-- Binary/unsupported file stripped by Listar --
-- Err : No filename to use for decode, file stripped.
-- Type: Image/unknown





References: