[A83] Re: 16x16 tile map


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

[A83] Re: 16x16 tile map




I would not recommend a 12x12 bit size routine, 16x16 would be something like 
this:
    ;get offset to graphscreen(I'm not gonna go through this, others do i'm 
just writing it out
    ld de,Tile  ;probably already loaded to de(in this instance)
    ;hl is the offset in the graphscreen
    ld b,16
Loop:
    ld a,(hl)               ;get screen
    ld c,(de)           ;get line in tile
    xor c               ;xor it to the screen
    ld (hl),a               ;save it to screen
    inc hl
    inc de
    ld a,(hl)
    ld c,(de)
    xor c
    ld (hl),a
    inc de
    ;i'm using b as the counter so save it
    push bc
    ld bc,12
    add hl,bc
    pop bc
    djmz Loop
    ret

that is the rough idea of a xor 16x16 tile routine ^_^ hope that helps some 
^_^
also, note, this isn't tested, so if it dosn't work, sorry. but thats the 
general idea ^_^