Browse Source

Merge pull request #59 from blitz-research/develop

Develop up with merge probs sdks copied manualy
abakobo 8 years ago
parent
commit
cfa2f55f68

+ 4 - 3
VERSIONS.TXT

@@ -1,9 +1,10 @@
 
 ***** Monkey2 v1.1.05 *****
 
-* Added WIP MSVC support - see: #MX2_USE_MSVC in bin/windows_env.txt
+* Added std.requesters.OpenUrl support for android and ios.
 
-* Added assimp model for loading 3d models.
+* Added WIP assimp and bullet modules mainly for future use by mojo3d but its nice to have standalone versions of these.
 
-* Added std.requesters.OpenUrl support for android and ios.
+* Added tinyfiledialog library for linux requesters, except for Proceed which uses kdialog as there's no equivalent in tfd.
 
+* Added WIP MSVC support for faster compile times on windows. To enable, use 'MX2_USE_MSVC=1' in bin/env_windows.txt and rebuild all modules.

+ 6 - 6
modules/mojo/app/app.monkey2

@@ -926,7 +926,7 @@ Class AppInstance
 				
 			Case SDL_WINDOWEVENT_FOCUS_GAINED
 			
-				Print "SDL_WINDOWEVENT_FOCUS_GAINED"
+				'Print "SDL_WINDOWEVENT_FOCUS_GAINED"
 			
 				Local active:=_active
 				_activeWindow=_window
@@ -938,7 +938,7 @@ Class AppInstance
 				
 			Case SDL_WINDOWEVENT_FOCUS_LOST
 			
-				Print "SDL_WINDOWEVENT_FOCUS_LOST"
+				'Print "SDL_WINDOWEVENT_FOCUS_LOST"
 			
 				Local active:=_active
 				_active=False
@@ -991,13 +991,13 @@ Class AppInstance
 
 		Case SDL_RENDER_TARGETS_RESET
 		
-			Print "SDL_RENDER_TARGETS_RESET"
+			'Print "SDL_RENDER_TARGETS_RESET"
 		
 			RequestRender()
 			
 		Case SDL_RENDER_DEVICE_RESET
 		
-			Print "SDL_RENDER_DEVICE_RESET"
+			'Print "SDL_RENDER_DEVICE_RESET"
 		
 			mojo.graphics.glutil.glGraphicsSeq+=1
 
@@ -1014,7 +1014,7 @@ Class AppInstance
 		Case SDL_APP_WILLENTERBACKGROUND
 			'Prepare your app to go into the background. Stop loops, etc.
 			'This gets called when the user hits the home button, or gets a call.
-			Print "SDL_APP_WILLENTERBACKGROUND"
+			'Print "SDL_APP_WILLENTERBACKGROUND"
 			_frozen=True
 
 		Case SDL_APP_DIDENTERBACKGROUND
@@ -1030,7 +1030,7 @@ Class AppInstance
 		Case SDL_APP_DIDENTERFOREGROUND
 			'Restart your loops here.
 			'Your app is interactive and getting CPU again.
-			Print "SDL_APP_DIDENTERFOREGROUND"
+			'Print "SDL_APP_DIDENTERFOREGROUND"
 			RequestRender()
 			_frozen=False
 #Endif

+ 4 - 4
modules/mojo/graphics/glexts/glexts.cpp

@@ -60,10 +60,10 @@ namespace bbGLexts{
 			SDL_GL_ExtensionSupported( "GL_WEBGL_depth_texture" ) ||
 			SDL_GL_ExtensionSupported( "GL_OES_depth_texture" );
 		
-		bb_printf( "GL_draw_buffers=%i\n",int( GL_draw_buffers ) );
-		bb_printf( "GL_texture_float=%i\n",int( GL_texture_float ) );
-		bb_printf( "GL_texture_half_float=%i\n",int( GL_texture_half_float ) );
-		bb_printf( "GL_depth_texture=%i\n",int( GL_depth_texture ) );
+//		bb_printf( "GL_draw_buffers=%i\n",int( GL_draw_buffers ) );
+//		bb_printf( "GL_texture_float=%i\n",int( GL_texture_float ) );
+//		bb_printf( "GL_texture_half_float=%i\n",int( GL_texture_half_float ) );
+//		bb_printf( "GL_depth_texture=%i\n",int( GL_depth_texture ) );
 		
 		fflush( stdout );
 	}

+ 9 - 0
modules/mojo/graphics/glutil.monkey2

@@ -7,6 +7,10 @@ Global bindings:=New IntStack
 
 Public
 
+#rem monkeydoc @hidden
+#end
+Global glDebug:Bool=False
+
 #rem monkeydoc @hidden
 #end
 Global glGraphicsSeq:Int=1
@@ -28,8 +32,12 @@ End
 #rem monkeydoc @hidden
 #end
 Function glCheck()
+	
+	If Not glDebug Return
+	
 	Local err:=glGetError()
 	If err=GL_NO_ERROR Return
+	
 	Local msg:=""
 	Select err
 	Case GL_INVALID_ENUM
@@ -45,6 +53,7 @@ Function glCheck()
 	Default
 		msg="?????"
 	End
+	
 	RuntimeError( "GL ERROR: "+msg+" "+err )
 End
 

+ 5 - 5
modules/mojo/graphics/graphicsdevice.monkey2

@@ -430,11 +430,11 @@ Class GraphicsDevice
 
 		glCheck()
 		
-		#If __CONFIG__="debug"
-		Print "GL_VERSION="+glGetString( GL_VERSION )
-		Print "GL_VENDOR="+glGetString( GL_VENDOR )
-		Print "GL_RENDERER="+glGetString( GL_VENDOR )
-		#Endif
+		'#If __CONFIG__="debug"
+		'Print "GL_VERSION="+glGetString( GL_VERSION )
+		'Print "GL_VENDOR="+glGetString( GL_VENDOR )
+		'Print "GL_RENDERER="+glGetString( GL_VENDOR )
+		'#Endif
 			
 		InitGLexts()
 		

+ 1 - 1
modules/mojo/graphics/rendertarget.monkey2

@@ -76,7 +76,7 @@ Class RenderTarget Extends Resource
 		Endif
 
 		If glexts.GL_read_buffer
-			glReadBuffer( GL_NONE )
+			glReadBuffer( _drawBufs ? _drawBufs[0] Else GL_NONE )
 		Endif
 
 		CheckStatus()

+ 5 - 2
modules/mojox/textview.monkey2

@@ -937,11 +937,14 @@ Class TextView Extends ScrollableView
 	End
 	
 	Method OnRenderContent( canvas:Canvas ) Override
+		
+		OnRenderContent( canvas,VisibleRect )
+	End
+	
+	Method OnRenderContent( canvas:Canvas,clip:Recti ) Virtual
 
 		If App.KeyView=Self And Not _blinkTimer RestartBlinkTimer()
 		
-		Local clip:=VisibleRect
-		
 		Local firstLine:=LineAtPoint( New Vec2i( 0,clip.Top ) ) 
 		Local lastLine:=LineAtPoint( New Vec2i( 0,clip.Bottom-1 ) )+1
 		

+ 1 - 1
modules/monkey/native/bbobject.h

@@ -67,7 +67,7 @@ template<class T,class C> T bb_object_cast( C *p ){
 }
 
 inline void bbDBAssertSelf( void *p ){
-	bbDebugAssert( p,"'Self' is null" );
+	bbDebugAssert( p,"Attempt to invoke method on null instance" );
 }
 
 inline bbString bbDBObjectValue( bbObject *p ){

+ 3 - 3
src/createrelease/createrelease.monkey2

@@ -13,7 +13,6 @@ Const IGNORE:="
 .gitignore
 src/c2mx2
 src/createrelease
-src/launcher
 modules/admob
 modules/linq
 modules/gles30
@@ -22,7 +21,7 @@ modules/mojo3d-loaders
 modules/mojo3d-physics
 bin/ted2.state.json
 bin/ted2_windows/state.json
-bin/ted2_macos/state.json
+bin/ted2_macos.app/Contents/MacOS/state.json
 bin/ted2_linux/state.json
 "
 
@@ -101,11 +100,12 @@ Function CopyRelease()
 	CreateDir( output+"/devtools" )
 	CreateDir( output+"/tmp" )
 	
+	CopyFiles( "bananas" )
 	CopyFiles( "bin" )
 	CopyFiles( "docs" )
 	CopyFiles( "modules" )
-	CopyFiles( "bananas" )
 	CopyFiles( "products" )
+	CopyFiles( "scripts" )
 	CopyFiles( "src" )
 	
 	Copy( "ABOUT.HTML" )

+ 1 - 1
src/mx2cc/buildproduct.monkey2

@@ -407,7 +407,7 @@ Class GccBuildProduct Extends BuildProduct
 			
 		cmd+=(toolchain="msvc" ? " -Fo~q" Else " -o ~q") +obj+"~q ~q"+src+"~q"
 		
-		If toolchain<>"msvc" Print StripDir( src )
+		'If toolchain<>"msvc" Print StripDir( src )
 		
 		Exec( cmd )
 		

+ 3 - 10
src/mx2cc/translator_cpp.monkey2

@@ -1069,16 +1069,9 @@ Class Translator_CPP Extends Translator
 			EmitMain()
 		Endif
 		
-		If _debug And func.IsMethod
-		
-			If Not func.IsVirtual And Not func.IsExtension
-				'			
-				'Can't do this yet as it breaks mx2cc!
-				'
-				'Emit( "bbDBAssertSelf(this);" )
-				'
-			Endif
-			
+		If _debug And func.IsMethod And func.cscope.ctype.IsClass And Not func.IsVirtual And Not func.IsExtension
+
+			Emit( "bbDBAssertSelf(this);" )
 		Endif
 		
 		EmitBlock( func )