[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22944] branches/blender2.5/blender/source /blender/editors/space_view3d/view3d_view.c: Game options like enable physics visualisation, nomipmap, displaylists, ignore_deprecation_warnings etc work again.

Campbell Barton ideasman42 at gmail.com
Wed Sep 2 03:39:54 CEST 2009


Revision: 22944
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22944
Author:   campbellbarton
Date:     2009-09-02 03:39:46 +0200 (Wed, 02 Sep 2009)

Log Message:
-----------
Game options like enable physics visualisation, nomipmap, displaylists, ignore_deprecation_warnings etc work again.
space_set_commmandline_options from space.c as game_set_commmandline_options

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_view.c

Modified: branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_view.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_view.c	2009-09-02 00:42:12 UTC (rev 22943)
+++ branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_view.c	2009-09-02 01:39:46 UTC (rev 22944)
@@ -81,6 +81,10 @@
 
 #include "PIL_time.h" /* smoothview */
 
+#if GAMEBLENDER == 1
+#include "SYS_System.h"
+#endif
+
 #include "view3d_intern.h"	// own include
 
 /* use this call when executing an operator,
@@ -1442,6 +1446,56 @@
 	glPopAttrib();
 }
 
+/* was space_set_commmandline_options in 2.4x */
+void game_set_commmandline_options(GameData *gm)
+{
+	SYS_SystemHandle syshandle;
+	int test;
+
+	if ( (syshandle = SYS_GetSystem()) ) {
+		/* User defined settings */
+		test= (U.gameflags & USER_DISABLE_SOUND);
+		/* if user already disabled audio at the command-line, don't re-enable it */
+		if (test)
+			SYS_WriteCommandLineInt(syshandle, "noaudio", test);
+
+		test= (U.gameflags & USER_DISABLE_MIPMAP);
+		GPU_set_mipmap(!test);
+		SYS_WriteCommandLineInt(syshandle, "nomipmap", test);
+
+		/* File specific settings: */
+		/* Only test the first one. These two are switched
+		 * simultaneously. */
+		test= (gm->flag & GAME_SHOW_FRAMERATE);
+		SYS_WriteCommandLineInt(syshandle, "show_framerate", test);
+		SYS_WriteCommandLineInt(syshandle, "show_profile", test);
+
+		test = (gm->flag & GAME_SHOW_FRAMERATE);
+		SYS_WriteCommandLineInt(syshandle, "show_properties", test);
+
+		test= (gm->flag & GAME_SHOW_PHYSICS);
+		SYS_WriteCommandLineInt(syshandle, "show_physics", test);
+
+		test= (gm->flag & GAME_ENABLE_ALL_FRAMES);
+		SYS_WriteCommandLineInt(syshandle, "fixedtime", test);
+
+//		a= (G.fileflags & G_FILE_GAME_TO_IPO);
+//		SYS_WriteCommandLineInt(syshandle, "game2ipo", a);
+
+		test= (gm->flag & GAME_IGNORE_DEPRECATION_WARNINGS);
+		SYS_WriteCommandLineInt(syshandle, "ignore_deprecation_warnings", test);
+
+		test= (gm->matmode == GAME_MAT_MULTITEX);
+		SYS_WriteCommandLineInt(syshandle, "blender_material", test);
+		test= (gm->matmode == GAME_MAT_GLSL);
+		SYS_WriteCommandLineInt(syshandle, "blender_glsl_material", test);
+		test= (gm->flag & GAME_DISPLAY_LISTS);
+		SYS_WriteCommandLineInt(syshandle, "displaylists", test);
+
+
+	}
+}
+
 /* maybe we need this defined somewhere else */
 extern void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int always_use_expand_framing);
 
@@ -1483,6 +1537,8 @@
 
 	view3d_operator_needs_opengl(C);
 	
+	game_set_commmandline_options(&startscene->gm);
+
 	SaveState(C);
 	StartKetsjiShell(C, ar, 1);
 	RestoreState(C);





More information about the Bf-blender-cvs mailing list