2
0
Эх сурвалжийг харах

Fixed latest build issues.

Brucey 2 жил өмнө
parent
commit
93f15525e6

+ 19 - 4
d3d9odd2d.mod/d3d9odd2d.bmx

@@ -1,4 +1,4 @@
-Strict
+SuperStrict
 
 
 Rem
 Rem
 bbdoc: Graphics/Direct3D9 Odd2D
 bbdoc: Graphics/Direct3D9 Odd2D
@@ -87,16 +87,28 @@ Type TD3D9Odd2DDriver Extends TOdd2DDriver
 	
 	
 '	Method GraphicsModes:TGraphicsMode[]() Abstract
 '	Method GraphicsModes:TGraphicsMode[]() Abstract
 	
 	
-	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr, flags:Int )
+	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr, flags:Long )
 		Local g:TD3D9Graphics=D3D9GraphicsDriver().AttachGraphics( widget,flags )
 		Local g:TD3D9Graphics=D3D9GraphicsDriver().AttachGraphics( widget,flags )
 		If g Return TMax2DGraphics.Create( g,Self )
 		If g Return TMax2DGraphics.Create( g,Self )
 	End Method
 	End Method
 	
 	
-	Method CreateGraphics:TGraphics( width:Int, height:Int ,depth:Int, hertz:Int, flags:Int, x:Int, y:Int )
+	Method CreateGraphics:TGraphics( width:Int, height:Int ,depth:Int, hertz:Int, flags:Long, x:Int, y:Int )
 		Local g:TD3D9Graphics=D3D9GraphicsDriver().CreateGraphics( width,height,depth,hertz,flags,x,y )
 		Local g:TD3D9Graphics=D3D9GraphicsDriver().CreateGraphics( width,height,depth,hertz,flags,x,y )
 		If g Return TMax2DGraphics.Create( g,Self )
 		If g Return TMax2DGraphics.Create( g,Self )
 	End Method
 	End Method
-	
+
+	Method CreateRenderImageFrame:TImageFrame(width:UInt, height:UInt, flags:Int)
+		' TODO
+	End Method
+
+	Method SetBackBuffer()
+		' TODO
+	End Method
+
+	Method SetRenderImageFrame(RenderImageFrame:TImageFrame)
+		' TODO
+	End Method
+
 	Method SetGraphics( g:TGraphics )
 	Method SetGraphics( g:TGraphics )
 		Super.SetGraphics g
 		Super.SetGraphics g
 		If g Then _d3dDev=TD3D9Graphics(TMax2DGraphics(g)._graphics).GetDirect3DDevice()
 		If g Then _d3dDev=TD3D9Graphics(TMax2DGraphics(g)._graphics).GetDirect3DDevice()
@@ -142,6 +154,9 @@ Type TD3D9Odd2DDriver Extends TOdd2DDriver
 		TOD3D9ImageFrame(iframe).DrawPoly xyuv,handlex,handley,originx,originy
 		TOD3D9ImageFrame(iframe).DrawPoly xyuv,handlex,handley,originx,originy
 	End Method
 	End Method
 
 
+	Method ToString:String()
+		Return "Direct3D9 Odd2D Driver"
+	End Method
 End Type
 End Type
 
 
 Rem
 Rem

+ 1 - 1
examples/odd2dtest.bmx

@@ -4,7 +4,7 @@ Framework ODD.GLOdd2D
 ?Win32
 ?Win32
 Import ODD.D3D9Odd2D
 Import ODD.D3D9Odd2D
 ?
 ?
-Import brl.RandomDefault
+Import brl.Random
 
 
 SetGraphicsDriver GLOdd2DDriver()
 SetGraphicsDriver GLOdd2DDriver()
 'Uncomment a driver to try it (Windows only)
 'Uncomment a driver to try it (Windows only)

+ 18 - 3
glodd2d.mod/glodd2d.bmx

@@ -1,4 +1,4 @@
-Strict
+SuperStrict
 
 
 Rem
 Rem
 bbdoc: Graphics/OpenGL Odd2D
 bbdoc: Graphics/OpenGL Odd2D
@@ -77,16 +77,28 @@ Type TGLOdd2DDriver Extends TOdd2DDriver
 	
 	
 '	Method GraphicsModes:TGraphicsMode[]() Abstract
 '	Method GraphicsModes:TGraphicsMode[]() Abstract
 	
 	
-	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr, flags:Int )
+	Method AttachGraphics:TMax2DGraphics( widget:Byte Ptr, flags:Long )
 		Local g:TGLGraphics=GLGraphicsDriver().AttachGraphics( widget,flags )
 		Local g:TGLGraphics=GLGraphicsDriver().AttachGraphics( widget,flags )
 		If g Return TMax2DGraphics.Create( g,Self )
 		If g Return TMax2DGraphics.Create( g,Self )
 	End Method
 	End Method
 	
 	
-	Method CreateGraphics:TGraphics( width:Int, height:Int ,depth:Int, hertz:Int, flags:Int, x:Int, y:Int )
+	Method CreateGraphics:TGraphics( width:Int, height:Int ,depth:Int, hertz:Int, flags:Long, x:Int, y:Int )
 		Local g:TGLGraphics=GLGraphicsDriver().CreateGraphics( width,height,depth,hertz,flags,x,y )
 		Local g:TGLGraphics=GLGraphicsDriver().CreateGraphics( width,height,depth,hertz,flags,x,y )
 		If g Return TMax2DGraphics.Create( g,Self )
 		If g Return TMax2DGraphics.Create( g,Self )
 	End Method
 	End Method
 	
 	
+	Method CreateRenderImageFrame:TImageFrame(width:UInt, height:UInt, flags:Int)
+		' TODO
+	End Method
+
+	Method SetBackBuffer()
+		' TODO
+	End Method
+
+	Method SetRenderImageFrame(RenderImageFrame:TImageFrame)
+		' TODO
+	End Method
+
 '	Method SetGraphics( g:TGraphics ) Abstract
 '	Method SetGraphics( g:TGraphics ) Abstract
 	
 	
 '	Method Flip( sync ) Abstract
 '	Method Flip( sync ) Abstract
@@ -128,6 +140,9 @@ Type TGLOdd2DDriver Extends TOdd2DDriver
 		TOGLImageFrame(iframe).DrawPoly xyuv,handlex,handley,originx,originy
 		TOGLImageFrame(iframe).DrawPoly xyuv,handlex,handley,originx,originy
 	End Method
 	End Method
 
 
+	Method ToString:String()
+		Return "OpenGL Odd2D Driver"
+	End Method
 End Type
 End Type
 
 
 Rem
 Rem

+ 9 - 9
odd2d.mod/odd2d.bmx

@@ -1,4 +1,4 @@
-Strict
+SuperStrict
 
 
 Rem
 Rem
 bbdoc: Graphics/Odd2D
 bbdoc: Graphics/Odd2D
@@ -43,7 +43,7 @@ Type TOdd2DDriver Extends TMax2DDriver
 	Field adj_vp_x:Int, adj_vp_y:Int, adj_vp_width:Int, adj_vp_height:Int
 	Field adj_vp_x:Int, adj_vp_y:Int, adj_vp_width:Int, adj_vp_height:Int
 	
 	
 	Field m2d_blend:Int, m2d_alpha:Float, m2d_linewidth:Float
 	Field m2d_blend:Int, m2d_alpha:Float, m2d_linewidth:Float
-	Field m2d_clsred:Int, m2d_clsgreen:Int, m2d_clsblue:Int
+	Field m2d_clsred:Int, m2d_clsgreen:Int, m2d_clsblue:Int,m2d_clsalpha:Float
 	Field m2d_red:Int, m2d_green:Int, m2d_blue:Int
 	Field m2d_red:Int, m2d_green:Int, m2d_blue:Int
 	Field m2d_ix:Float, m2d_iy:Float, m2d_jx:Float, m2d_jy:Float
 	Field m2d_ix:Float, m2d_iy:Float, m2d_jx:Float, m2d_jy:Float
 	
 	
@@ -61,7 +61,7 @@ Type TOdd2DDriver Extends TMax2DDriver
 		_odd2dDriver=TOdd2DDriver(_max2dDriver)
 		_odd2dDriver=TOdd2DDriver(_max2dDriver)
 	End Method
 	End Method
 	
 	
-	Method Flip( sync:Int )
+	Method Flip:Int( sync:Int )
 		ClearBorder
 		ClearBorder
 		_m2ddriver.Flip sync
 		_m2ddriver.Flip sync
 	End Method
 	End Method
@@ -83,9 +83,9 @@ Type TOdd2DDriver Extends TMax2DDriver
 		_m2dDriver.SetColor red,green,blue
 		_m2dDriver.SetColor red,green,blue
 	End Method
 	End Method
 	
 	
-	Method SetClsColor( red:Int, green:Int, blue:Int )
-		m2d_clsred=red;m2d_clsgreen=green;m2d_clsblue=blue
-		_m2dDriver.SetClsColor red,green,blue
+	Method SetClsColor( red:Int, green:Int, blue:Int, alpha:Float )
+		m2d_clsred=red;m2d_clsgreen=green;m2d_clsblue=blue;m2d_clsalpha=alpha
+		_m2dDriver.SetClsColor red,green,blue,alpha
 	End Method
 	End Method
 	
 	
 	Method SetViewport( x:Int, y:Int, width:Int, height:Int )
 	Method SetViewport( x:Int, y:Int, width:Int, height:Int )
@@ -162,7 +162,7 @@ Type TOdd2DDriver Extends TMax2DDriver
 		SetScale sclx,scly
 		SetScale sclx,scly
 	End Method
 	End Method
 	
 	
-	Method DrawPoly( xy#[],handlex#,handley#,originx#,originy# )
+	Method DrawPoly( xy#[],handlex#,handley#,originx#,originy#, indices:Int[] )
 		Local rot:Float=GetRotation()
 		Local rot:Float=GetRotation()
 		Local sclx:Float,scly:Float
 		Local sclx:Float,scly:Float
 		GetScale sclx,scly
 		GetScale sclx,scly
@@ -172,7 +172,7 @@ Type TOdd2DDriver Extends TMax2DDriver
 		originx:+focus_x+border_x
 		originx:+focus_x+border_x
 		originy:+focus_y+border_y
 		originy:+focus_y+border_y
 		
 		
-		_m2dDriver.DrawPoly xy,handlex,handley,originx,originy
+		_m2dDriver.DrawPoly xy,handlex,handley,originx,originy,indices
 		
 		
 		SetRotation rot
 		SetRotation rot
 		SetScale sclx,scly
 		SetScale sclx,scly
@@ -329,7 +329,7 @@ Type TOdd2DDriver Extends TMax2DDriver
 		m2d_blend=MASKBLEND
 		m2d_blend=MASKBLEND
 		m2d_alpha=1
 		m2d_alpha=1
 		m2d_linewidth=1
 		m2d_linewidth=1
-		m2d_clsred=0;m2d_clsgreen=0;m2d_clsblue=0
+		m2d_clsred=0;m2d_clsgreen=0;m2d_clsblue=0;m2d_clsalpha=1
 		m2d_red=255;m2d_green=255;m2d_blue=255
 		m2d_red=255;m2d_green=255;m2d_blue=255
 	End Method
 	End Method