Forráskód Böngészése

Merge pull request #52 from GWRon/mix_replace_shorthandcodes

[Misc] Replace shorthand codes ($, %...) with their long versions
Brucey 2 éve
szülő
commit
c0f889cdb7

+ 38 - 38
d3d9sdlmax2d.mod/d3d9sdlmax2d.bmx

@@ -30,10 +30,10 @@ Private
 Global _gw:Int,_gh:Int,_gd:Int,_gr:Int,_gf:Long,_gx:Int,_gy:Int
 Global _color:Int
 Global _clscolor:Int
-Global _ix#,_iy#,_jx#,_jy#
-Global _fverts#[24]
+Global _ix:Float,_iy:Float,_jx:Float,_jy:Float
+Global _fverts:Float[24]
 Global _iverts:Int Ptr=Int Ptr( Varptr _fverts[0] )
-Global _lineWidth#
+Global _lineWidth:Float
 
 Global _bound_texture:IDirect3DTexture9
 Global _texture_enabled:Int
@@ -60,7 +60,7 @@ Function DisableTex()
 	_texture_enabled=False
 End Function
 
-Function d3derr( str$ )
+Function d3derr( str:String )
 	If LOG_ERRS WriteStdout "D3DERR: "+str+"~n"
 End Function
 
@@ -157,8 +157,8 @@ Type TD3D9ImageFrame Extends TImageFrame
 		_uscale=1.0/pow2width
 		_vscale=1.0/pow2height
 
-		Local u0#,u1#=width * _uscale
-		Local v0#,v1#=height * _vscale
+		Local u0:Float,u1:Float=width * _uscale
+		Local v0:Float,v1:Float=height * _vscale
 
 		_fverts[4]=u0
 		_fverts[5]=v0
@@ -184,11 +184,11 @@ Type TD3D9ImageFrame Extends TImageFrame
 		Return Self
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Override
-		Local u0#=sx * _uscale
-		Local v0#=sy * _vscale
-		Local u1#=(sx+sw) * _uscale
-		Local v1#=(sy+sh) * _vscale
+	Method Draw( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float ) Override
+		Local u0:Float=sx * _uscale
+		Local v0:Float=sy * _vscale
+		Local u1:Float=(sx+sw) * _uscale
+		Local v1:Float=(sy+sh) * _vscale
 	
 		_fverts[0]=x0*_ix+y0*_iy+tx
 		_fverts[1]=x0*_jx+y0*_jy+ty
@@ -233,9 +233,9 @@ Type TD3D9ImageFrame Extends TImageFrame
 	
 	Field _texture:IDirect3DTexture9,_seq:Int
 	
-	Field _magfilter:Int,_minfilter:Int,_mipfilter:Int,_uscale#,_vscale#
+	Field _magfilter:Int,_minfilter:Int,_mipfilter:Int,_uscale:Float,_vscale:Float
 	
-	Field _fverts#[24],_iverts:Int Ptr=Int Ptr( Varptr _fverts[0] )
+	Field _fverts:Float[24],_iverts:Int Ptr=Int Ptr( Varptr _fverts[0] )
 
 End Type
 
@@ -668,7 +668,7 @@ EndType
 
 Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "DirectX9"
 	End Method
 
@@ -829,7 +829,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_active_blend=blend
 	End Method
 	
-	Method SetAlpha( alpha# ) Override
+	Method SetAlpha( alpha:Float ) Override
 		alpha=Max(Min(alpha,1),0)
 		_color=(Int(255*alpha) Shl 24)|(_color&$ffffff)
 		_iverts[3]=_color
@@ -878,14 +878,14 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		EndIf
 	End Method
 	
-	Method SetTransform( xx#,xy#,yx#,yy# ) Override
+	Method SetTransform( xx:Float,xy:Float,yx:Float,yy:Float ) Override
 		_ix=xx
 		_iy=xy
 		_jx=yx
 		_jy=yy		
 	End Method
 	
-	Method SetLineWidth( width# ) Override
+	Method SetLineWidth( width:Float ) Override
 		_lineWidth=width
 	End Method
 	
@@ -893,18 +893,18 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_d3dDev.Clear 0,Null,D3DCLEAR_TARGET,_clscolor,0,0
 	End Method
 	
-	Method Plot( x#,y# ) Override
+	Method Plot( x:Float,y:Float ) Override
 		_fverts[0]=x+.5
 		_fverts[1]=y+.5
 		DisableTex
 		_d3dDev.DrawPrimitiveUP D3DPT_POINTLIST,1,_fverts,24
 	End Method
 	
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Override
-		Local lx0# = x0*_ix + y0*_iy + tx
-		Local ly0# = x0*_jx + y0*_jy + ty
-		Local lx1# = x1*_ix + y1*_iy + tx
-		Local ly1# = x1*_jx + y1*_jy + ty
+	Method DrawLine( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
+		Local lx0:Float = x0*_ix + y0*_iy + tx
+		Local ly0:Float = x0*_jx + y0*_jy + ty
+		Local lx1:Float = x1*_ix + y1*_iy + tx
+		Local ly1:Float = x1*_jx + y1*_jy + ty
 		If _lineWidth<=1
 			_fverts[0]=lx0+.5
 			_fverts[1]=ly0+.5
@@ -914,7 +914,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 			_d3dDev.DrawPrimitiveUP D3DPT_LINELIST,1,_fverts,24
 			Return
 		EndIf
-		Local lw#=_lineWidth*.5
+		Local lw:Float=_lineWidth*.5
 		If Abs(ly1-ly0)>Abs(lx1-lx0)
 			_fverts[0]=lx0-lw
 			_fverts[1]=ly0
@@ -938,7 +938,7 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLESTRIP,2,_fverts,24
 	End Method
 	
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawRect( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		_fverts[0]  = x0*_ix + y0*_iy + tx
 		_fverts[1]  = x0*_jx + y0*_jy + ty
 		_fverts[6]  = x1*_ix + y0*_iy + tx
@@ -951,19 +951,19 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLESTRIP,2,_fverts,24
 	End Method
 	
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Override
-		Local xr#=(x1-x0)*.5
-		Local yr#=(y1-y0)*.5
+	Method DrawOval( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
+		Local xr:Float=(x1-x0)*.5
+		Local yr:Float=(y1-y0)*.5
 		Local segs:Int=Abs(xr)+Abs(yr)
 		segs=Max(segs,12)&~3
 		x0:+xr
 		y0:+yr
-		Local fverts#[segs*6]
+		Local fverts:Float[segs*6]
 		Local iverts:Int Ptr=Int Ptr( Varptr fverts[0] )
 		For Local i:Int=0 Until segs
-			Local th#=-i*360#/segs
-			Local x#=x0+Cos(th)*xr
-			Local y#=y0-Sin(th)*yr
+			Local th:Float=-i*360:Float/segs
+			Local x:Float=x0+Cos(th)*xr
+			Local y:Float=y0-Sin(th)*yr
 			fverts[i*6+0]=x*_ix+y*_iy+tx
 			fverts[i*6+1]=x*_jx+y*_jy+ty			
 			iverts[i*6+3]=_color
@@ -972,14 +972,14 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLEFAN,segs-2,fverts,24
 	End Method
 	
-	Method DrawPoly( verts#[],handlex#,handley#,tx#,ty#, indices:Int[] ) Override
+	Method DrawPoly( verts:Float[],handlex:Float,handley:Float,tx:Float,ty:Float, indices:Int[] ) Override
 		If verts.length<6 Or (verts.length&1) Return
 		Local segs:Int=verts.length/2
-		Local fverts#[segs*6]
+		Local fverts:Float[segs*6]
 		Local iverts:Int Ptr=Int Ptr( Varptr fverts[0] )
 		For Local i:Int=0 Until segs
-			Local x#=verts[i*2+0]+handlex
-			Local y#=verts[i*2+1]+handley
+			Local x:Float=verts[i*2+0]+handlex
+			Local y:Float=verts[i*2+1]+handley
 			fverts[i*6+0]= x*_ix + y*_iy + tx
 			fverts[i*6+1]= x*_jx + y*_jy + ty
 			iverts[i*6+3]=_color
@@ -1069,8 +1069,8 @@ Type TD3D9SDLMax2DDriver Extends TMax2dDriver
 		Return pixmap
 	End Method
 	
-	Method SetResolution( width#,height# ) Override
-		Local matrix#[]=[..
+	Method SetResolution( width:Float,height:Float ) Override
+		Local matrix:Float[]=[..
 		2.0/width,0.0,0.0,0.0,..
 		 0.0,-2.0/height,0.0,0.0,..
 		 0.0,0.0,1.0,0.0,..

+ 25 - 25
gl2sdlmax2d.mod/main.bmx

@@ -21,7 +21,7 @@ Const GL_BGRA:Int = $80E1
 Const GL_CLAMP_TO_EDGE:Int = $812F
 Const GL_CLAMP_TO_BORDER:Int = $812D
 
-Global ix#, iy#, jx#, jy#
+Global ix:Float, iy:Float, jx:Float, jy:Float
 Global color4ub:Byte[4]
 
 Global state_blend:Int
@@ -543,7 +543,7 @@ Public
 
 Type TGLImageFrame Extends TImageFrame
 
-	Field u0#, v0#, u1#, v1#, uscale#, vscale#
+	Field u0:Float, v0:Float, u1:Float, v1:Float, uscale:Float, vscale:Float
 	Field name:Int, seq:Int
 
 	Method New()
@@ -560,14 +560,14 @@ Type TGLImageFrame Extends TImageFrame
 
 	End Method
 
-	Method Draw( x0#, y0#, x1#, y1#, tx#, ty#, sx#, sy#, sw#, sh# ) Override
+	Method Draw( x0:Float, y0:Float, x1:Float, y1:Float, tx:Float, ty:Float, sx:Float, sy:Float, sw:Float, sh:Float ) Override
 
 		Assert seq = GraphicsSeq Else "Image does not exist"
 
-		Local u0# = sx * uscale
-		Local v0# = sy * vscale
-		Local u1# = ( sx + sw ) * uscale
-		Local v1# = ( sy + sh ) * vscale
+		Local u0:Float = sx * uscale
+		Local v0:Float = sy * vscale
+		Local u1:Float = ( sx + sw ) * uscale
+		Local v1:Float = ( sy + sh ) * vscale
 
 		_driver.DrawTexture( name, u0, v0, u1, v1, x0, y0, x1, y1, tx, ty, Self )
 
@@ -1056,7 +1056,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 ?
 	End Method
 
-	Method ToString$() Override
+	Method ToString:String() Override
 
 		Return "OpenGL"
 
@@ -1128,7 +1128,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetAlpha( alpha# ) Override
+	Method SetAlpha( alpha:Float ) Override
 
 		If alpha > 1.0 Then alpha = 1.0
 		If alpha < 0.0 Then alpha = 0.0
@@ -1136,7 +1136,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetLineWidth( width# ) Override
+	Method SetLineWidth( width:Float ) Override
 
 		glLineWidth( width )
 
@@ -1182,7 +1182,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetTransform( xx#, xy#, yx#, yy# ) Override
+	Method SetTransform( xx:Float, xy:Float, yx:Float, yy:Float ) Override
 
 		ix = xx
 		iy = xy
@@ -1200,7 +1200,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method Plot( px#, py# ) Override
+	Method Plot( px:Float, py:Float ) Override
 
 		FlushTest( PRIMITIVE_DOT )
 
@@ -1220,7 +1220,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawLine( x0#, y0#, x1#, y1#, tx#, ty# ) Override
+	Method DrawLine( x0:Float, y0:Float, x1:Float, y1:Float, tx:Float, ty:Float ) Override
 
 		FlushTest( PRIMITIVE_LINE )
 
@@ -1248,7 +1248,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawRect( x0#, y0#, x1#, y1#, tx#, ty# ) Override
+	Method DrawRect( x0:Float, y0:Float, x1:Float, y1:Float, tx:Float, ty:Float ) Override
 
 		FlushTest( PRIMITIVE_PLAIN_TRIANGLE )
 
@@ -1290,13 +1290,13 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawOval( x0#, y0#, x1#, y1#, tx#, ty# ) Override
+	Method DrawOval( x0:Float, y0:Float, x1:Float, y1:Float, tx:Float, ty:Float ) Override
 
 		' TRIANGLE_FAN (no batching)
 		FlushTest( PRIMITIVE_TRIANGLE_FAN )
 
-		Local xr# = ( x1 - x0 ) * 0.5
-		Local yr# = ( y1 - y0 ) * 0.5
+		Local xr:Float = ( x1 - x0 ) * 0.5
+		Local yr:Float = ( y1 - y0 ) * 0.5
 		Local segs:Int = Abs( xr ) + Abs( yr )
 
 		segs = Max( segs, 12 ) &~ 3
@@ -1312,9 +1312,9 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 		Local off:Int = 2
 
 		For Local i:Int = 0 To segs
-			Local th# = i * 360# / segs
-			Local x# = x0 + Cos( th ) * xr
-			Local y# = y0 - Sin( th ) * yr
+			Local th:Float = i * 360:Float / segs
+			Local x:Float = x0 + Cos( th ) * xr
+			Local y:Float = y0 - Sin( th ) * yr
 			vert_array[in + off    ] = x * ix + y * iy + tx
 			vert_array[in + off + 1] = x * jx + y * jy + ty
 			off :+ 2
@@ -1341,7 +1341,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawPoly( xy#[], handle_x#, handle_y#, origin_x#, origin_y#, indices:Int[] ) Override
+	Method DrawPoly( xy:Float[], handle_x:Float, handle_y:Float, origin_x:Float, origin_y:Float, indices:Int[] ) Override
 
 		If xy.length < 6 Or ( xy.length & 1 ) Then Return
 
@@ -1351,8 +1351,8 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 		Local in:Int = vert_index * 2
 
 		For Local i:Int = 0 Until xy.length Step 2
-			Local x# = handle_x + xy[i]
-			Local y# = handle_y + xy[i + 1]
+			Local x:Float = handle_x + xy[i]
+			Local y:Float = handle_y + xy[i + 1]
 			vert_array[in + i    ] = x * ix + y * iy + origin_x
 			vert_array[in + i + 1] = x * jx + y * jy + origin_y
 		Next
@@ -1385,7 +1385,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawTexture( name:Int, u0#, v0#, u1#, v1#, x0#, y0#, x1#, y1#, tx#, ty#, img:TImageFrame = Null )
+	Method DrawTexture( name:Int, u0:Float, v0:Float, u1:Float, v1:Float, x0:Float, y0:Float, x1:Float, y1:Float, tx:Float, ty:Float, img:TImageFrame = Null )
 
 		FlushTest( PRIMITIVE_TEXTURED_TRIANGLE, name )
 
@@ -1454,7 +1454,7 @@ Type TGL2Max2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method SetResolution( width#, height# ) Override
+	Method SetResolution( width:Float, height:Float ) Override
 
 		u_pmatrix.SetOrthographic( 0, width, 0, height, -1, 1 )
 		'glMatrixMode( GL_PROJECTION )

+ 1 - 1
glsdlgraphics.mod/glsdlgraphics.bmx

@@ -144,7 +144,7 @@ The font used is an internal fixed point 8x16 font.<br>
 <br>
 This function is intended for debugging purposes only - performance is unlikely to be stellar.
 End Rem
-Function GLDrawText( text$,x,y )
+Function GLDrawText( text:String,x,y )
 '	If fontSeq<>graphicsSeq
 	If Not fontTex
 		Local pixmap:TPixmap=TPixmap.Create( 1024,16,PF_RGBA8888 )

+ 24 - 24
glsdlmax2d.mod/glsdlmax2d.bmx

@@ -53,7 +53,7 @@ Const GL_BGRA:Int=$80E1
 Const GL_CLAMP_TO_EDGE:Int=$812F
 Const GL_CLAMP_TO_BORDER:Int=$812D
 
-Global ix#,iy#,jx#,jy#
+Global ix:Float,iy:Float,jx:Float,jy:Float
 Global color4ub:Byte[4]
 
 Global state_blend:Int
@@ -441,7 +441,7 @@ Public
 
 Type TGLImageFrame Extends TImageFrame
 
-	Field u0#,v0#,u1#,v1#,uscale#,vscale#
+	Field u0:Float,v0:Float,u1:Float,v1:Float,uscale:Float,vscale:Float
 
 	Field name:Int,seq:Int
 	
@@ -455,13 +455,13 @@ Type TGLImageFrame Extends TImageFrame
 		seq=0
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Override
+	Method Draw( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float ) Override
 		Assert seq=GraphicsSeq Else "Image does not exist"
 
-		Local u0#=sx * uscale
-		Local v0#=sy * vscale
-		Local u1#=(sx+sw) * uscale
-		Local v1#=(sy+sh) * vscale
+		Local u0:Float=sx * uscale
+		Local v0:Float=sy * vscale
+		Local u1:Float=(sx+sw) * uscale
+		Local v1:Float=(sy+sh) * vscale
 		
 		EnableTex name
 		glBegin GL_QUADS
@@ -586,7 +586,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		SDLGraphicsDriver().Flip sync
 	End Method
 	
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "OpenGL"
 	End Method
 
@@ -630,14 +630,14 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		End Select
 	End Method
 
-	Method SetAlpha( alpha# ) Override
+	Method SetAlpha( alpha:Float ) Override
 		If alpha>1.0 alpha=1.0
 		If alpha<0.0 alpha=0.0
 		color4ub[3]=alpha*255
 		glColor4ubv color4ub
 	End Method
 
-	Method SetLineWidth( width# ) Override
+	Method SetLineWidth( width:Float ) Override
 		glLineWidth width
 	End Method
 	
@@ -675,7 +675,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		EndIf
 	End Method
 
-	Method SetTransform( xx#,xy#,yx#,yy# ) Override
+	Method SetTransform( xx:Float,xy:Float,yx:Float,yy:Float ) Override
 		ix=xx
 		iy=xy
 		jx=yx
@@ -686,14 +686,14 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glClear GL_COLOR_BUFFER_BIT
 	End Method
 
-	Method Plot( x#,y# ) Override
+	Method Plot( x:Float,y:Float ) Override
 		DisableTex
 		glBegin GL_POINTS
 		glVertex2f x+.5,y+.5
 		glEnd
 	End Method
 
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawLine( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		DisableTex
 		glBegin GL_LINES
 		glVertex2f x0*ix+y0*iy+tx+.5,x0*jx+y0*jy+ty+.5
@@ -701,7 +701,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glEnd
 	End Method
 
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawRect( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		DisableTex
 		glBegin GL_QUADS
 		glVertex2f x0*ix+y0*iy+tx,x0*jx+y0*jy+ty
@@ -711,10 +711,10 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glEnd
 	End Method
 	
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawOval( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 	
-		Local xr#=(x1-x0)*.5
-		Local yr#=(y1-y0)*.5
+		Local xr:Float=(x1-x0)*.5
+		Local yr:Float=(y1-y0)*.5
 		Local segs:Int=Abs(xr)+Abs(yr)
 		
 		segs=Max(segs,12)&~3
@@ -725,23 +725,23 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		DisableTex
 		glBegin GL_POLYGON
 		For Local i:Int=0 Until segs
-			Local th#=i*360#/segs
-			Local x#=x0+Cos(th)*xr
-			Local y#=y0-Sin(th)*yr
+			Local th:Float=i*360:Float/segs
+			Local x:Float=x0+Cos(th)*xr
+			Local y:Float=y0-Sin(th)*yr
 			glVertex2f x*ix+y*iy+tx,x*jx+y*jy+ty
 		Next
 		glEnd
 		
 	End Method
 	
-	Method DrawPoly( xy#[],handle_x#,handle_y#,origin_x#,origin_y#, indices:Int[] ) Override
+	Method DrawPoly( xy:Float[],handle_x:Float,handle_y:Float,origin_x:Float,origin_y:Float, indices:Int[] ) Override
 		If xy.length<6 Or (xy.length&1) Return
 		
 		DisableTex
 		glBegin GL_POLYGON
 		For Local i:Int=0 Until Len xy Step 2
-			Local x#=xy[i+0]+handle_x
-			Local y#=xy[i+1]+handle_y
+			Local x:Float=xy[i+0]+handle_x
+			Local y:Float=xy[i+1]+handle_y
 			glVertex2f x*ix+y*iy+origin_x,x*jx+y*jy+origin_y
 		Next
 		glEnd
@@ -776,7 +776,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		Return p
 	End Method
 	
-	Method SetResolution( width#,height# ) Override
+	Method SetResolution( width:Float,height:Float ) Override
 		glMatrixMode GL_PROJECTION
 		glLoadIdentity
 		glOrtho 0,width,height,0,-1,1

+ 1 - 1
sdl.mod/sdl.bmx

@@ -220,7 +220,7 @@ End Function
 
 Type TSDLStreamFactory Extends TStreamFactory
 
-	Method CreateStream:TStream( url:Object, proto$, path$, readable:Int, writeMode:Int ) Override
+	Method CreateStream:TStream( url:Object, proto:String, path:String, readable:Int, writeMode:Int ) Override
 		If proto="sdl" Then
 			Return TSDLStream.Create( path, readable, writeMode )
 		End If

+ 1 - 1
sdlfreeaudio.mod/sdlfreeaudio.bmx

@@ -74,7 +74,7 @@ Type TSDLFreeAudioDriver Extends TFreeAudioAudioDriver
 		Return res <> -1
 	End Method
 
-	Function Create:TFreeAudioAudioDriver( name$,Mode:Int ) Override
+	Function Create:TFreeAudioAudioDriver( name:String,Mode:Int ) Override
 		Local t:TSDLFreeAudioDriver = New TSDLFreeAudioDriver
 		t._name=name
 		t._mode=Mode

+ 9 - 9
sdlgraphics.mod/examples/example_01.bmx

@@ -7,12 +7,12 @@ Import brl.standardio
 
 Graphics 800, 600, 0, 60, GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER
 
-Global ax#, ay#,tim#
+Global ax:Float, ay:Float,tim:Float
 
 While Not AppTerminate()
 	Local wid:Int = GraphicsWidth()
 	Local hgt:Int = GraphicsHeight()
-	Local asp# = Float(wid)/Float(hgt)
+	Local asp:Float = Float(wid)/Float(hgt)
 	
 	glViewport 0,0,wid,hgt
 	glMatrixMode GL_PROJECTION
@@ -24,13 +24,13 @@ While Not AppTerminate()
 	glMatrixMode GL_MODELVIEW
 	glLoadIdentity
 	
-	Local global_ambient#[]=[0.6#, 0.5#,  0.3#, 1.0#]
-	Local light0pos#[]=     [0.0#, 5.0#, 10.0#, 1.0#]
-	Local light0ambient#[]= [0.5#, 0.5#,  0.5#, 1.0#]
-	Local light0diffuse#[]= [0.3#, 0.3#,  0.3#, 1.0#]
-	Local light0specular#[]=[0.8#, 0.8#,  0.8#, 1.0#]
+	Local global_ambient:Float[]=[0.6:Float, 0.5:Float,  0.3:Float, 1.0:Float]
+	Local light0pos:Float[]=     [0.0:Float, 5.0:Float, 10.0:Float, 1.0:Float]
+	Local light0ambient:Float[]= [0.5:Float, 0.5:Float,  0.5:Float, 1.0:Float]
+	Local light0diffuse:Float[]= [0.3:Float, 0.3:Float,  0.3:Float, 1.0:Float]
+	Local light0specular:Float[]=[0.8:Float, 0.8:Float,  0.8:Float, 1.0:Float]
 	
-	Local lmodel_ambient#[]=[ 0.2#,0.2#,0.2#,1.0#]
+	Local lmodel_ambient:Float[]=[ 0.2:Float,0.2:Float,0.2:Float,1.0:Float]
 	glLightModelfv(GL_LIGHT_MODEL_AMBIENT,lmodel_ambient)
 	
 	glLightModelfv(GL_LIGHT_MODEL_AMBIENT, global_ambient)
@@ -61,7 +61,7 @@ Wend
 
 
 
-Function DrawSizeCube(size#)
+Function DrawSizeCube(size:Float)
 	size=-size
 	'Front Face
 	glBegin(GL_TRIANGLE_STRIP)

+ 16 - 16
sdljoystick.mod/sdljoystick.bmx

@@ -72,76 +72,76 @@ Type TSDLJoystickDriver Extends TJoystickDriver
 	Method JoyHit:Int( button:Int, port:Int=0 ) Override
 	End Method
 	
-	Method JoyX#( port:Int=0 ) Override
+	Method JoyX:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_X)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyY#( port:Int=0 ) Override
+	Method JoyY:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_Y)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyZ#( port:Int=0 ) Override
+	Method JoyZ:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_Z)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyR#( port:Int=0 ) Override
+	Method JoyR:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_R)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyU#( port:Int=0 ) Override
+	Method JoyU:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_U)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyV#( port:Int=0 ) Override
+	Method JoyV:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_V)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyYaw#( port:Int=0 ) Override
+	Method JoyYaw:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_YAW)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyPitch#( port:Int=0 ) Override
+	Method JoyPitch:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_PITCH)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyRoll#( port:Int=0 ) Override
+	Method JoyRoll:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local c:Int=SDL_JoystickGetAxis(currentJoystick.joystickPtr, JOY_ROLL)
 		If ( c Shr 15 ) Then c=-( c-1 )
 		Return c/32767.0
 	End Method
 	
-	Method JoyHat#( port:Int=0 ) Override
+	Method JoyHat:Float( port:Int=0 ) Override
 		SampleJoy port
 		Local pos:Int = SDL_JoystickGetHat(currentJoystick.joystickPtr, 0)
 		Return _hatPositions[pos]
 	End Method
 	
-	Method JoyWheel#( port:Int=0 ) Override
+	Method JoyWheel:Float( port:Int=0 ) Override
 	End Method
 	
 	Method JoyType:Int( port:Int=0 ) Override
@@ -150,35 +150,35 @@ Type TSDLJoystickDriver Extends TJoystickDriver
 	End Method
 	
 	Method JoyXDir:Int( port:Int=0 ) Override
-		Local t#=JoyX( port )
+		Local t:Float=JoyX( port )
 		If t<-.333333 Return -1
 		If t>.333333 Return 1
 		Return 0
 	End Method
 
 	Method JoyYDir:Int( port:Int=0 ) Override
-		Local t#=JoyY( port )
+		Local t:Float=JoyY( port )
 		If t<-.333333 Return -1
 		If t>.333333 Return 1
 		Return 0
 	End Method
 
 	Method JoyZDir:Int( port:Int=0 ) Override
-		Local t#=JoyZ( port )
+		Local t:Float=JoyZ( port )
 		If t<-.333333 Return -1
 		If t>.333333 Return 1
 		Return 0
 	End Method
 
 	Method JoyUDir:Int( port:Int=0 ) Override
-		Local t#=JoyU( port )
+		Local t:Float=JoyU( port )
 		If t<-.333333 Return -1
 		If t>.333333 Return 1
 		Return 0
 	End Method
 
 	Method JoyVDir:Int( port:Int=0 ) Override
-		Local t#=JoyV( port )
+		Local t:Float=JoyV( port )
 		If t<-.333333 Return -1
 		If t>.333333 Return 1
 		Return 0

+ 23 - 23
sdlrendermax2d.mod/sdlrendermax2d.bmx

@@ -62,7 +62,7 @@ Public
 
 Type TSDLRenderImageFrame Extends TImageFrame
 
-	Field u0#, v0#, u1#, v1#, uscale#, vscale#
+	Field u0:Float, v0:Float, u1:Float, v1:Float, uscale:Float, vscale:Float
 
 	Field pixmap:TPixmap
 	Field surface:TSDLSurface
@@ -84,12 +84,12 @@ Type TSDLRenderImageFrame Extends TImageFrame
 		pixmap = Null
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Override
+	Method Draw( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float ) Override
 
-		Local u0# = sx * uscale
-		Local v0# = sy * vscale
-		Local u1# = ( sx + sw ) * uscale
-		Local v1# = ( sy + sh ) * vscale
+		Local u0:Float = sx * uscale
+		Local v0:Float = sy * vscale
+		Local u1:Float = ( sx + sw ) * uscale
+		Local v1:Float = ( sy + sh ) * vscale
 
 		_driver.DrawTexture( texture, u0, v0, u1, v1, x0, y0, x1, y1, tx, ty, Self )
 
@@ -128,7 +128,7 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 	Field clsColor:SDLColor = New SDLColor(0, 0, 0, 255)
 
 	Field renderer:TSDLRenderer
-	Field ix#,iy#,jx#,jy#
+	Field ix:Float,iy:Float,jx:Float,jy:Float
 	Field state_blend:Int
 
 	Method Create:TSDLRenderMax2DDriver()
@@ -180,7 +180,7 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		renderer.Present()
 	End Method
 	
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "SDLRenderer"
 	End Method
 
@@ -209,14 +209,14 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		End Select
 	End Method
 
-	Method SetAlpha( alpha# ) Override
+	Method SetAlpha( alpha:Float ) Override
 		If alpha>1.0 alpha=1.0
 		If alpha<0.0 alpha=0.0
 		drawColor.a=alpha*255
 		renderer.SetDrawColor(drawColor.r, drawColor.g, drawColor.b, drawColor.a)
 	End Method
 
-	Method SetLineWidth( width# ) Override
+	Method SetLineWidth( width:Float ) Override
 		'glLineWidth width
 	End Method
 	
@@ -256,7 +256,7 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		EndIf
 	End Method
 
-	Method SetTransform( xx#,xy#,yx#,yy# ) Override
+	Method SetTransform( xx:Float,xy:Float,yx:Float,yy:Float ) Override
 		ix=xx
 		iy=xy
 		jx=yx
@@ -269,15 +269,15 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		renderer.SetDrawColor(drawColor.r, drawColor.g, drawColor.b, drawColor.a)
 	End Method
 
-	Method Plot( x#,y# ) Override
+	Method Plot( x:Float,y:Float ) Override
 		renderer.DrawPoint(Int(x+.5),Int(y+.5))
 	End Method
 
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawLine( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		renderer.DrawLine(Int(x0*ix+y0*iy+tx+.5), Int(x0*jx+y0*jy+ty+.5), Int(x1*ix+y1*iy+tx+.5), Int(x1*jx+y1*jy+ty+.5))
 	End Method
 
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawRect( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		Local StaticArray vertices:SDLVertex[4]
 		Local vert:SDLVertex Ptr = vertices
 
@@ -314,7 +314,7 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		renderer.Geometry(Null, vertices, 4, indices, 6)
 	End Method
 	
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawOval( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 
 		Local StaticArray vertices:SDLVertex[50]
 		Local vert:SDLVertex Ptr = vertices
@@ -323,8 +323,8 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		Local StaticArray indices:Int[147]
 		local ic:int
 
-		Local xr#=(x1-x0)*.5
-		Local yr#=(y1-y0)*.5
+		Local xr:Float=(x1-x0)*.5
+		Local yr:Float=(y1-y0)*.5
 		local r:Float = (xr + yr) * 0.5
 
 		Local segs:Int = Min(49, 360 / acos(2 * (1 - 0.5 / r)^2 - 1))
@@ -341,9 +341,9 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		vc :+ 1
 		
 		For Local i:Int=0 Until segs
-			Local th#=i*360#/segs
-			Local x#=x0+Cos(th)*xr
-			Local y#=y0-Sin(th)*yr
+			Local th:Float=i*360:Float/segs
+			Local x:Float=x0+Cos(th)*xr
+			Local y:Float=y0-Sin(th)*yr
 
 			vert.position.x = x * ix + y * iy + tx
 			vert.position.y = x * jx + y * jy + ty
@@ -370,7 +370,7 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		renderer.Geometry(Null, vertices, vc, indices, ic)
 	End Method
 	
-	Method DrawPoly( xy#[],handle_x#,handle_y#,origin_x#,origin_y#, indices:Int[] ) Override
+	Method DrawPoly( xy:Float[],handle_x:Float,handle_y:Float,origin_x:Float,origin_y:Float, indices:Int[] ) Override
 
 		If xy.length<6 Or (xy.length&1) Return
 		
@@ -405,7 +405,7 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 
 	End Method
 
-	Method DrawTexture( texture:TSDLTexture, u0#, v0#, u1#, v1#, x0#, y0#, x1#, y1#, tx#, ty#, img:TImageFrame = Null )
+	Method DrawTexture( texture:TSDLTexture, u0:Float, v0:Float, u1:Float, v1:Float, x0:Float, y0:Float, x1:Float, y1:Float, tx:Float, ty:Float, img:TImageFrame = Null )
 
 		Local StaticArray vertices:SDLVertex[4]
 		Local vert:SDLVertex Ptr = vertices
@@ -476,7 +476,7 @@ Type TSDLRenderMax2DDriver Extends TMax2DDriver
 		Return p
 	End Method
 	
-	Method SetResolution( width#,height# ) Override
+	Method SetResolution( width:Float,height:Float ) Override
 		renderer.SetLogicalSize(Int(width), Int(height))
 	End Method
 	

+ 6 - 6
sdlsystem.mod/sdlsystem.bmx

@@ -73,7 +73,7 @@ Type TSDLSystemDriver Extends TSystemDriver
 		End If
 	End Method
 
-	Method Notify( Text$,serious:Int ) Override
+	Method Notify( Text:String,serious:Int ) Override
 		Local res:Int = bmx_SDL_ShowSimpleMessageBox(Text, AppTitle, serious)
 		' failed to display message box?
 		If res Then
@@ -81,15 +81,15 @@ Type TSDLSystemDriver Extends TSystemDriver
 		End If
 	End Method
 	
-	Method Confirm:Int( Text$,serious:Int ) Override
+	Method Confirm:Int( Text:String,serious:Int ) Override
 		Return bmx_SDL_ShowMessageBox_confirm(Text, AppTitle, serious)
 	End Method
 	
-	Method Proceed:Int( Text$,serious:Int ) Override
+	Method Proceed:Int( Text:String,serious:Int ) Override
 		Return bmx_SDL_ShowMessageBox_proceed(Text, AppTitle, serious)
 	End Method
 
-	Method RequestFile$( Text$,exts$,save:Int,file$ ) Override
+	Method RequestFile:String( Text:String,exts:String,save:Int,file:String ) Override
 ?Not haiku and Not ios
 		Local requestedFile:String
 		
@@ -145,7 +145,7 @@ Type TSDLSystemDriver Extends TSystemDriver
 ?
 	End Method
 	
-	Method RequestDir$( Text$,path$ ) Override
+	Method RequestDir:String( Text:String,path:String ) Override
 ?Not haiku And Not ios
 		Local requestedDir:String
 		
@@ -171,7 +171,7 @@ Type TSDLSystemDriver Extends TSystemDriver
 ?
 	End Method
 
-	Method OpenURL:Int( url$ ) Override
+	Method OpenURL:Int( url:String ) Override
 		Local u:Byte Ptr = url.ToUTF8String()
 		Local res:Int = SDL_OpenURL(u)
 		MemFree(u)

+ 3 - 3
sdltimer.mod/sdltimer.bmx

@@ -78,7 +78,7 @@ Import "glue.c"
 Private
 
 Extern
-Function bmx_sdl_timer_start:Byte Ptr( hertz#,timer:TTimer )
+Function bmx_sdl_timer_start:Byte Ptr( hertz:Float,timer:TTimer )
 Function bmx_sdl_timer_stop( handle:Byte Ptr,timer:TTimer )
 Function bmx_sdl_timer_fire( id:Int, obj:Object, ticks:Int )
 End Extern
@@ -138,7 +138,7 @@ Type TSDLTimer Extends TTimer
 		Return n
 	End Method
 	
-	Function Create:TTimer( hertz#,event:TEvent=Null ) Override
+	Function Create:TTimer( hertz:Float,event:TEvent=Null ) Override
 		Local t:TSDLTimer =New TSDLTimer
 		Local handle:Byte Ptr=bmx_sdl_timer_start( hertz,t )
 		If Not handle Return Null
@@ -160,7 +160,7 @@ Type TSDLTimerFactory Extends TTimerFactory
 		Return "SDLTimer"
 	End Method
 	
-	Method Create:TTimer(hertz#,event:TEvent=Null) Override
+	Method Create:TTimer(hertz:Float,event:TEvent=Null) Override
 		Return TSDLTimer.Create( hertz,event )
 	End Method
 		

+ 13 - 13
virtualjoystick.mod/virtualjoystick.bmx

@@ -115,53 +115,53 @@ Type TVirtualJoystickDriver Extends TJoystickDriver
 		End If
 	End Method
 	
-	Method JoyX#( port:Int=0 ) Override
+	Method JoyX:Float( port:Int=0 ) Override
 		SampleJoy port
 		If currentJoystick Then
 			Return currentJoystick.GetX()
 		End If
 	End Method
 	
-	Method JoyY#( port:Int=0 ) Override
+	Method JoyY:Float( port:Int=0 ) Override
 		SampleJoy port
 		If currentJoystick Then
 			Return currentJoystick.GetY()
 		End If
 	End Method
 	
-	Method JoyZ#( port:Int=0 ) Override
+	Method JoyZ:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyR#( port:Int=0 ) Override
+	Method JoyR:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyU#( port:Int=0 ) Override
+	Method JoyU:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyV#( port:Int=0 ) Override
+	Method JoyV:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyYaw#( port:Int=0 ) Override
+	Method JoyYaw:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyPitch#( port:Int=0 ) Override
+	Method JoyPitch:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyRoll#( port:Int=0 ) Override
+	Method JoyRoll:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyHat#( port:Int=0 ) Override
+	Method JoyHat:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
-	Method JoyWheel#( port:Int=0 ) Override
+	Method JoyWheel:Float( port:Int=0 ) Override
 		Return 0
 	End Method
 	
@@ -169,14 +169,14 @@ Type TVirtualJoystickDriver Extends TJoystickDriver
 	End Method
 	
 	Method JoyXDir:Int( port:Int=0 ) Override
-		Local t#=JoyX( port )
+		Local t:Float=JoyX( port )
 		If t<.333333 Return -1
 		If t>.333333 Return 1
 		Return 0
 	End Method
 
 	Method JoyYDir:Int( port:Int=0 ) Override
-		Local t#=JoyY( port )
+		Local t:Float=JoyY( port )
 		If t<.333333 Return -1
 		If t>.333333 Return 1
 		Return 0