Weird positioning problem

BlitzMax Forums/BlitzMax Programming/Weird positioning problem

Im trying to make a simple beat game (DDR), but I ran into a really stupid problem. I have no clue what it is, a bug in Max2D or me doing something stupid.

The problem is the arrows at the top (called in UpdateGame), the X is ignored (Y is fine) when drawing them.

Can a second eye look at this?

SuperStrict

Framework brl.glmax2d
Import brl.pngloader

Const DIR_RIGHT:Int=0,DIR_DOWN:Int=1,DIR_LEFT:Int=2,DIR_UP:Int=3

Graphics 640,480,0,30

SetMaskColor 255,255,255
Global BeatImage:TImage=LoadImage("beat.png")

Type TBeat
	Const MaxMeasures:Int=512
	Global MeasureArray:TBeat[MaxMeasures+1]
	Global CurMeasure:Double

	Field Dir:Int,Measure:Int
	
	Function Create:TBeat(Dir:Int,m:Int)
		Local b:TBeat=New TBeat
		b.Dir=Dir
		MeasureArray[m]=b
		b.Measure=m
		Return b
	End Function
	
	Method Update()
		SetRotation Dir*90
		DrawImage BeatImage,Dir*64,480-((CurMeasure-Measure)*64)
	End Method
	
	Function UpdateGame()
		CurMeasure:+0.1
		
		SetBlend AlphaBlend
		SetAlpha 0.5
		
		SetRotation 0
		DrawImage BeatImage,0,0
		
		SetRotation 90
		DrawImage BeatImage,64,0
		
		SetRotation 180
		DrawImage BeatImage,128,0
		
		SetRotation 270
		DrawImage BeatImage,192,0
		
		SetAlpha 1
		SetBlend MaskBlend
		
		Local i:Int
		For i=CurMeasure To CurMeasure-10 Step -1
			If i>=0
				If MeasureArray[i] Then MeasureArray[i].Update()
			EndIf
		Next
	End Function
End Type

TBeat.Create(0,0)
TBeat.Create(1,1)
TBeat.Create(2,2)
TBeat.Create(3,3)

While Not KeyHit(KEY_ESCAPE)
Cls
TBeat.UpdateGame()
Flip
Delay 1
Wend
End


The handle of the image is top left so, when rotated, they appear to be in the same position. Try it with midhandleimage straight after the loadimage of beatimage to check.

Ah, that fixed it. Although, I would think setting the X to 192, despite of rotating a 64x64 image, the real X wouldnt be 0? Yet moving the Y works normal.

Thanks.