diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-04-16 15:07:42 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-04-17 18:51:28 +0300 |
commit | 159806140fd33e6ddab951c0f6f180cfbf927d38 (patch) | |
tree | da076be3baa4d987fb5935e220a3d901c926e0e7 /source/blender/windowmanager/intern | |
parent | 28b996a9d2090efdd74115a653629ef9d7d871f7 (diff) |
Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine
This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.
Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
that we can wait until then to remove this.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 7 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 102 |
2 files changed, 5 insertions, 104 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 9dcb83244ca..ef8888c9f87 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -881,8 +881,6 @@ int wm_homefile_read( /* start with save preference untitled.blend */ G.save_over = 0; - /* disable auto-play in startup.blend... */ - G.fileflags &= ~G_FILE_AUTOPLAY; wm_file_read_post(C, true, use_userdef); @@ -1192,7 +1190,6 @@ static int wm_file_write(bContext *C, const char *filepath, int fileflags, Repor } SET_FLAG_FROM_TEST(G.fileflags, fileflags & G_FILE_COMPRESS, G_FILE_COMPRESS); - SET_FLAG_FROM_TEST(G.fileflags, fileflags & G_FILE_AUTOPLAY, G_FILE_AUTOPLAY); /* prevent background mode scripts from clobbering history */ if (do_history) { @@ -1300,7 +1297,7 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w } else { /* save as regular blend file */ - int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_HISTORY); + int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY); ED_editors_flush_edits(C, false); @@ -1427,7 +1424,7 @@ static int wm_homefile_write_exec(bContext *C, wmOperator *op) ED_editors_flush_edits(C, false); /* force save as regular blend file */ - fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_HISTORY); + fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY); if (BLO_write_file(CTX_data_main(C), filepath, fileflags | G_FILE_USERPREFS, op->reports, NULL) == 0) { printf("fail\n"); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 4c7c2cc96e4..2af478b9470 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -86,9 +86,6 @@ #include "BPY_extern.h" #endif -#ifdef WITH_GAMEENGINE -# include "BL_System.h" -#endif #include "GHOST_Path-api.h" #include "GHOST_C-api.h" @@ -193,7 +190,7 @@ void WM_init(bContext *C, int argc, const char **argv) ED_file_init(); /* for fsmenu */ ED_node_init_butfuncs(); - BLF_init(); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */ + BLF_init(); BLT_lang_init(); /* reports cant be initialized before the wm, @@ -218,7 +215,7 @@ void WM_init(bContext *C, int argc, const char **argv) GPU_init(); - GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP)); + GPU_set_mipmap(true); GPU_set_linear_mipmap(true); GPU_set_anisotropic(U.anisotropic_filter); GPU_set_gpu_mipmapping(U.use_gpu_mipmap); @@ -324,96 +321,6 @@ void WM_init_splash(bContext *C) } } -bool WM_init_game(bContext *C) -{ - wmWindowManager *wm = CTX_wm_manager(C); - wmWindow *win; - - ScrArea *sa; - ARegion *ar = NULL; - - Scene *scene = CTX_data_scene(C); - - if (!scene) { - /* XXX, this should not be needed. */ - Main *bmain = CTX_data_main(C); - scene = bmain->scene.first; - } - - win = wm->windows.first; - - /* first to get a valid window */ - if (win) - CTX_wm_window_set(C, win); - - sa = BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_VIEW3D, 0); - ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); - - /* if we have a valid 3D view */ - if (sa && ar) { - ARegion *arhide; - - CTX_wm_area_set(C, sa); - CTX_wm_region_set(C, ar); - - /* disable quad view */ - if (ar->alignment == RGN_ALIGN_QSPLIT) - WM_operator_name_call(C, "SCREEN_OT_region_quadview", WM_OP_EXEC_DEFAULT, NULL); - - /* toolbox, properties panel and header are hidden */ - for (arhide = sa->regionbase.first; arhide; arhide = arhide->next) { - if (arhide->regiontype != RGN_TYPE_WINDOW) { - if (!(arhide->flag & RGN_FLAG_HIDDEN)) { - ED_region_toggle_hidden(C, arhide); - } - } - } - - /* full screen the area */ - if (!sa->full) { - ED_screen_state_toggle(C, win, sa, SCREENMAXIMIZED); - } - - /* Fullscreen */ - if ((scene->gm.playerflag & GAME_PLAYER_FULLSCREEN)) { - WM_operator_name_call(C, "WM_OT_window_fullscreen_toggle", WM_OP_EXEC_DEFAULT, NULL); - wm_get_screensize(&ar->winrct.xmax, &ar->winrct.ymax); - ar->winx = ar->winrct.xmax + 1; - ar->winy = ar->winrct.ymax + 1; - } - else { - GHOST_RectangleHandle rect = GHOST_GetClientBounds(win->ghostwin); - ar->winrct.ymax = GHOST_GetHeightRectangle(rect); - ar->winrct.xmax = GHOST_GetWidthRectangle(rect); - ar->winx = ar->winrct.xmax + 1; - ar->winy = ar->winrct.ymax + 1; - GHOST_DisposeRectangle(rect); - } - - WM_operator_name_call(C, "VIEW3D_OT_game_start", WM_OP_EXEC_DEFAULT, NULL); - - BKE_sound_exit(); - - return true; - } - else { - ReportTimerInfo *rti; - - BKE_report(&wm->reports, RPT_ERROR, "No valid 3D View found, game auto start is not possible"); - - /* After adding the report to the global list, reset the report timer. */ - WM_event_remove_timer(wm, NULL, wm->reports.reporttimer); - - /* Records time since last report was added */ - wm->reports.reporttimer = WM_event_add_timer(wm, CTX_wm_window(C), TIMER, 0.02); - - rti = MEM_callocN(sizeof(ReportTimerInfo), "ReportTimerInfo"); - wm->reports.reporttimer->customdata = rti; - - return false; - } -} - /* free strings of open recent files */ static void free_openrecent(void) { @@ -491,7 +398,7 @@ void WM_exit_ext(bContext *C, const bool do_python) /* save the undo state as quit.blend */ char filename[FILE_MAX]; bool has_edited; - int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_HISTORY); + int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY); BLI_make_file_string("/", filename, BKE_tempdir_base(), BLENDER_QUIT_FILE); @@ -625,9 +532,6 @@ void WM_exit_ext(bContext *C, const bool do_python) wm_ghost_exit(); CTX_free(C); -#ifdef WITH_GAMEENGINE - SYS_DeleteSystem(SYS_GetSystem()); -#endif GHOST_DisposeSystemPaths(); |