So I have a matrix (12x8) for a tilemapper that I wrote...
and a routine that displays it:
and then a routine to detect if you are in a block, and store the block ID to C, where B = X+2, A = Y + 16. (the character is 16x8)
but even though the core of the routines
are the same, only the first one shows correct blocks. The second one sometimes detects non existent blocks, and doesn't detect some existing blocks.
Is there something wrong in my syntax? Please help, I could not find the reason.
(attached is the source of the file with the buggy routines)