Getting at the remainder

BlitzPlus Forums/BlitzPlus Programming/Getting at the remainder

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Solved it myself with this:

Function return_tile(xtemp,ytemp,ly)
x=layer(ly)\x_offset#
tilex = (xtemp-x)/64
tilex=(tilex+layer(ly)\x_map)+1
Text 100,340,"Tile X:"+tilex,True,True


tilex2=xtemp/64
offsetx=xtemp - tilex2 * 64
offsetx=offsetx+(64-x)
If offsetx>64 offsetx=offsetx-64
Text 200,340,"Offset X:"+offsetx,True,True
End Function


But its not pretty !, must be an better way of doing it than what I'm doing :/