Hi, this is my code for determining the tile (8x8 pixels) the player is on. Basically what I am trying to do is (x + y * 32), so that later I can look it up in the tiles array (.db)
I am not sure if ASL (five times would be the same as * 32).
CalcTargetTileNumber:
LDA player_tile_y
ASL A ; multiple by 32?
ASL A
ASL A
ASL A
ASL A
CLC
ADC player_tile_x_w
STA target_tile_number
RTS