diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-02 05:39:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-02 05:39:46 +0400 |
commit | 32b2b1f544661f6dee4a81428b562fe7a3bc3f13 (patch) | |
tree | 917d2ea4cc4ee20a81b1ec27c257b3d833d0979e | |
parent | bd7d26993f32bda6f0c0ca81e1455fb9f55418e3 (diff) |
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
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index c61b2f0f31d..de8166b372b 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -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 @@ static void RestoreState(bContext *C) 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 @@ static int game_engine_exec(bContext *C, wmOperator *unused) view3d_operator_needs_opengl(C); + game_set_commmandline_options(&startscene->gm); + SaveState(C); StartKetsjiShell(C, ar, 1); RestoreState(C); |