PeterTillema / ICE

ICE Compiler for the TI-84 Plus CE
22 stars 1 forks source link

Unexplainable Bug #132

Closed programmer2514 closed 5 years ago

programmer2514 commented 5 years ago

If I create a 64 byte list and attempt to access it as a 8x8 matrix (with *{LIST+(X*7)+Y}), the numbers marked with a 0 work fine, but the numbers marked with the same letter mirror each other: (Example: If you change one A, the other one changes as well)

0,A,B,C,D,E,F,G
0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0
A,B,C,D,E,F,G,0

I don't know why this is happening, but it makes writing a matrix-based game impossible.

P.S. This happens with lists/matrices of all lengths and sizes, and just follows the pattern

PeterTillema commented 5 years ago

Y needs to be multiplied by 8, not X by 7, i.e. *{LIST+(Y*8)+X}.

programmer2514 commented 5 years ago

Thank you. I see that now (although I wanted X & Y switched)