[A83] Re: Yet Another Tilemap Question


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

[A83] Re: Yet Another Tilemap Question




Well, I'm not a perfect asm coder, and I don't know if this helps, but I'm
saying this anyway.
The 'Labels' are only for humans, not for the calc.

example:

                ;progstart
Label1:
    ld a,b
Label2:
    ld b,c
Label3:
    ld c,d

=

                ;progstart
    ld a,b
    ld b,c
    ld c,d

However, when you call, for example, Label2, the code becomes this:

                ;progstart
    call Label2
Label1:
    ld a,b
Label2:
    ld b,c
Label3:
    ld c,d

=
                ;progstart
    call [value of progstart+number of bytes between progstart and Label2]
                ;in this case, the number of bytes between progstart and
Label2
                ;is 3 (call xxxx) + 1 (ld a,b) = progstart+3.
                ;is (probably) $+1, because $ is the current memory location
    ld a,b
    ld b,c
    ld c,d


>Can someone explain me how they put put srpites on the screen! Because I
>have seen several tilemap routines, in which sprites were drawn, but all
>the tiles were under one Label. But they were cut off. I thought each
sprite
>had a Label, and the routine compares the number they get from the tilemap
>with the numbers sprite.
>But in the routines I have seen they seem to point somewhere in the memory
>location. Can someone explain this to me?
>
>"If I have seen farther than others, it is because I was standing on the
>shoulders of giants." - scientist Sir Isaac Newton, in a letter to his
>colleague Robert Hooke, February 1676.

Hope this helps,
        Ronald Teune
        Using Opera since 08/10/2001
        http://www.zeekoe.cjb.net (Dutch only)
        http://ti.zeekoe.cjb.net (pre-alpha version of my new web site,
        probably available since 22/8/1)
        iets@zeekoe.cjb.net