diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-11-03 23:39:44 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-03 23:39:44 -0300 |
commit | 7715a261d5f387b7769bb8149735e4131ea97757 (patch) | |
tree | 41a3bfe4c655470a3e7b9b5e162e48853ca561d2 /platform | |
parent | 25c38c75425e3ccfcaed53ebd38fc588d6f35764 (diff) | |
parent | 7a9ca08f16c500aa0caccc21a8e42564f962971a (diff) |
Merge pull request #12262 from AndreaCatania/pplug
Physics server plug
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/os_android.cpp | 5 | ||||
-rw-r--r-- | platform/android/os_android.h | 5 | ||||
-rw-r--r-- | platform/haiku/os_haiku.cpp | 13 | ||||
-rw-r--r-- | platform/haiku/os_haiku.h | 4 | ||||
-rw-r--r-- | platform/iphone/os_iphone.cpp | 13 | ||||
-rw-r--r-- | platform/iphone/os_iphone.h | 5 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 5 | ||||
-rw-r--r-- | platform/javascript/os_javascript.h | 4 | ||||
-rw-r--r-- | platform/osx/crash_handler_osx.mm | 1 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 6 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 14 | ||||
-rw-r--r-- | platform/server/os_server.cpp | 12 | ||||
-rw-r--r-- | platform/server/os_server.h | 5 | ||||
-rw-r--r-- | platform/uwp/os_uwp.cpp | 13 | ||||
-rw-r--r-- | platform/uwp/os_uwp.h | 4 | ||||
-rw-r--r-- | platform/windows/crash_handler_win.cpp | 1 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 13 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 7 | ||||
-rw-r--r-- | platform/x11/crash_handler_x11.cpp | 1 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 13 | ||||
-rw-r--r-- | platform/x11/os_x11.h | 5 |
21 files changed, 4 insertions, 145 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 45df312cae..9d43adf788 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -157,11 +157,6 @@ void OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int AudioDriverManager::initialize(p_audio_driver); - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>(); - physics_2d_server->init(); - input = memnew(InputDefault); input->set_fallback_mapping("Default Android Gamepad"); diff --git a/platform/android/os_android.h b/platform/android/os_android.h index 0c78c198a8..d9a66b4e3a 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -38,9 +38,6 @@ #include "os/main_loop.h" //#include "power_android.h" #include "servers/audio_server.h" -#include "servers/physics/physics_server_sw.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include "servers/visual/rasterizer.h" #ifdef ANDROID_NATIVE_ACTIVITY @@ -106,8 +103,6 @@ private: bool use_16bits_fbo; VisualServer *visual_server; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; mutable String data_dir_cache; diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 1d52752f21..7a681d46f7 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -130,13 +130,6 @@ void OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_ window->Show(); visual_server->init(); - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - physics_2d_server = memnew(Physics2DServerSW); - // TODO: enable multithreaded PS - //physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>(); - physics_2d_server->init(); - AudioDriverManager::initialize(p_audio_driver); power_manager = memnew(PowerHaiku); @@ -153,12 +146,6 @@ void OS_Haiku::finalize() { memdelete(visual_server); memdelete(rasterizer); - physics_server->finish(); - memdelete(physics_server); - - physics_2d_server->finish(); - memdelete(physics_2d_server); - memdelete(input); #if defined(OPENGL_ENABLED) diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index d929f7e43b..501650c94f 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -38,8 +38,6 @@ #include "main/input_default.h" #include "power_haiku.h" #include "servers/audio_server.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "servers/physics_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" @@ -52,8 +50,6 @@ private: Rasterizer *rasterizer; VisualServer *visual_server; VideoMode current_video_mode; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; PowerHaiku *power_manager; #ifdef MEDIA_KIT_ENABLED diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index 0efe22c1af..13e3b7670a 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -138,13 +138,6 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_ AudioDriverManager::add_driver(&audio_driver); AudioDriverManager::initialize(p_audio_driver); - // init physics servers - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - //physics_2d_server = memnew( Physics2DServerSW ); - physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>(); - physics_2d_server->init(); - input = memnew(InputDefault); /* @@ -384,12 +377,6 @@ void OSIPhone::finalize() { memdelete(visual_server); // memdelete(rasterizer); - physics_server->finish(); - memdelete(physics_server); - - physics_2d_server->finish(); - memdelete(physics_2d_server); - memdelete(input); }; diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h index e70ac9ba98..eccd294d63 100644 --- a/platform/iphone/os_iphone.h +++ b/platform/iphone/os_iphone.h @@ -41,9 +41,6 @@ #include "in_app_store.h" #include "main/input_default.h" #include "servers/audio_server.h" -#include "servers/physics/physics_server_sw.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" @@ -66,8 +63,6 @@ private: uint8_t supported_orientations; VisualServer *visual_server; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; AudioDriverCoreAudio audio_driver; diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index f6446e77da..3a57de2646 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -480,11 +480,6 @@ void OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, i print_line("Init Physicsserver"); - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - physics_2d_server = memnew(Physics2DServerSW); - physics_2d_server->init(); - input = memnew(InputDefault); _input = input; diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 1c939d3fd5..908a252905 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -39,8 +39,6 @@ #include "os/main_loop.h" #include "power_javascript.h" #include "servers/audio_server.h" -#include "servers/physics/physics_server_sw.h" -#include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/visual/rasterizer.h" #include <emscripten/html5.h> @@ -54,8 +52,6 @@ class OS_JavaScript : public OS_Unix { int64_t last_sync_time; VisualServer *visual_server; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; AudioDriverJavaScript audio_driver_javascript; const char *gl_extensions; diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm index 2ed88db309..5635fe0187 100644 --- a/platform/osx/crash_handler_osx.mm +++ b/platform/osx/crash_handler_osx.mm @@ -29,6 +29,7 @@ /*************************************************************************/ #include "main/main.h" #include "os_osx.h" +#include "project_settings.h" #include <string.h> #include <unistd.h> diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 420bb50af9..fba53f61b6 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -38,9 +38,6 @@ #include "os/input.h" #include "power_osx.h" #include "servers/audio_server.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "servers/physics_2d/physics_2d_server_wrap_mt.h" -#include "servers/physics_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual/visual_server_wrap_mt.h" #include "servers/visual_server.h" @@ -62,9 +59,6 @@ public: List<String> args; MainLoop *main_loop; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; - IP_Unix *ip_unix; AudioDriverCoreAudio audio_driver; diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 33586086dc..78acc97676 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -35,7 +35,6 @@ #include "os/keyboard.h" #include "print_string.h" #include "sem_osx.h" -#include "servers/physics/physics_server_sw.h" #include "servers/visual/visual_server_raster.h" #include <Carbon/Carbon.h> @@ -1092,13 +1091,6 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au AudioDriverManager::initialize(p_audio_driver); - // - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - //physics_2d_server = memnew( Physics2DServerSW ); - physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>(); - physics_2d_server->init(); - input = memnew(InputDefault); joypad_osx = memnew(JoypadOSX); @@ -1120,12 +1112,6 @@ void OS_OSX::finalize() { visual_server->finish(); memdelete(visual_server); //memdelete(rasterizer); - - physics_server->finish(); - memdelete(physics_server); - - physics_2d_server->finish(); - memdelete(physics_2d_server); } void OS_OSX::set_main_loop(MainLoop *p_main_loop) { diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 300c5cffcc..80c04aa5ad 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -31,7 +31,6 @@ //#include "servers/visual/rasterizer_dummy.h" #include "os_server.h" #include "print_string.h" -#include "servers/physics/physics_server_sw.h" #include <stdio.h> #include <stdlib.h> @@ -75,11 +74,6 @@ void OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p ERR_FAIL_COND(!visual_server); visual_server->init(); - // - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - physics_2d_server = memnew(Physics2DServerSW); - physics_2d_server->init(); input = memnew(InputDefault); @@ -111,12 +105,6 @@ void OS_Server::finalize() { memdelete(visual_server); //memdelete(rasterizer); - physics_server->finish(); - memdelete(physics_server); - - physics_2d_server->finish(); - memdelete(physics_2d_server); - memdelete(input); args.clear(); diff --git a/platform/server/os_server.h b/platform/server/os_server.h index ba12f649be..630c82ccdd 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -35,8 +35,6 @@ #include "drivers/unix/os_unix.h" #include "main/input_default.h" #include "servers/audio_server.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "servers/physics_server.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" @@ -56,9 +54,6 @@ class OS_Server : public OS_Unix { bool grab; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; - virtual void delete_main_loop(); IP_Unix *ip_unix; diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index c67e5bae05..8db2a749df 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -264,13 +264,6 @@ void OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_aud } */ - // - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - - physics_2d_server = memnew(Physics2DServerSW); - physics_2d_server->init(); - visual_server->init(); input = memnew(InputDefault); @@ -369,12 +362,6 @@ void OSUWP::finalize() { memdelete(input); - physics_server->finish(); - memdelete(physics_server); - - physics_2d_server->finish(); - memdelete(physics_2d_server); - joypad = nullptr; } diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index 22f8938049..e46e4cc020 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -40,8 +40,6 @@ #include "os/os.h" #include "power_uwp.h" #include "servers/audio_server.h" -#include "servers/physics/physics_server_sw.h" -#include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" @@ -94,8 +92,6 @@ private: int old_x, old_y; Point2i center; VisualServer *visual_server; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; int pressrc; ContextEGL *gl_context; diff --git a/platform/windows/crash_handler_win.cpp b/platform/windows/crash_handler_win.cpp index 2f5ee7956e..feea3911b2 100644 --- a/platform/windows/crash_handler_win.cpp +++ b/platform/windows/crash_handler_win.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "main/main.h" #include "os_windows.h" +#include "project_settings.h" #ifdef CRASH_HANDLER_EXCEPTION diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index ac78dddf0c..01201beccb 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -42,7 +42,6 @@ #include "lang_table.h" #include "main/main.h" #include "packet_peer_udp_winsock.h" -#include "project_settings.h" #include "servers/audio_server.h" #include "servers/visual/visual_server_raster.h" #include "servers/visual/visual_server_wrap_mt.h" @@ -1058,12 +1057,6 @@ void OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD)); } - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - - physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>(); - physics_2d_server->init(); - if (!is_no_window_mode_enabled()) { ShowWindow(hWnd, SW_SHOW); // Show The Window SetForegroundWindow(hWnd); // Slightly Higher Priority @@ -1225,12 +1218,6 @@ void OS_Windows::finalize() { memdelete(debugger_connection_console); } */ - - physics_server->finish(); - memdelete(physics_server); - - physics_2d_server->finish(); - memdelete(physics_2d_server); } void OS_Windows::finalize_core() { diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index c0b8dfc691..c9c00b5e36 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -29,8 +29,8 @@ /*************************************************************************/ #ifndef OS_WINDOWS_H #define OS_WINDOWS_H - #include "context_gl_win.h" +#include "core/project_settings.h" #include "crash_handler_win.h" #include "drivers/rtaudio/audio_driver_rtaudio.h" #include "drivers/wasapi/audio_driver_wasapi.h" @@ -38,7 +38,6 @@ #include "os/os.h" #include "power_windows.h" #include "servers/audio_server.h" -#include "servers/physics/physics_server_sw.h" #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" #ifdef XAUDIO2_ENABLED @@ -47,8 +46,6 @@ #include "drivers/unix/ip_unix.h" #include "key_mapping_win.h" #include "main/input_default.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include <fcntl.h> #include <io.h> @@ -90,8 +87,6 @@ class OS_Windows : public OS { ContextGL_Win *gl_context; #endif VisualServer *visual_server; - PhysicsServer *physics_server; - Physics2DServer *physics_2d_server; int pressrc; HDC hDC; // Private GDI Device Context HINSTANCE hInstance; // Holds The Instance Of The Application diff --git a/platform/x11/crash_handler_x11.cpp b/platform/x11/crash_handler_x11.cpp index 3c54d5cbc2..005a7459f9 100644 --- a/platform/x11/crash_handler_x11.cpp +++ b/platform/x11/crash_handler_x11.cpp @@ -33,6 +33,7 @@ #include "main/main.h" #include "os_x11.h" +#include "project_settings.h" #ifdef CRASH_HANDLER_ENABLED #include <cxxabi.h> diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 09193e0a2b..fbcc22c58e 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -32,7 +32,6 @@ #include "errno.h" #include "key_mapping_x11.h" #include "print_string.h" -#include "servers/physics/physics_server_sw.h" #include "servers/visual/visual_server_raster.h" #include "servers/visual/visual_server_wrap_mt.h" @@ -462,12 +461,6 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au requested = None; visual_server->init(); - // - physics_server = memnew(PhysicsServerSW); - physics_server->init(); - //physics_2d_server = memnew( Physics2DServerSW ); - physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>(); - physics_2d_server->init(); input = memnew(InputDefault); @@ -523,12 +516,6 @@ void OS_X11::finalize() { memdelete(visual_server); //memdelete(rasterizer); - physics_server->finish(); - memdelete(physics_server); - - physics_2d_server->finish(); - memdelete(physics_2d_server); - memdelete(power_manager); if (xrandr_handle) diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index b71b456d49..bfa8b5b375 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -42,9 +42,6 @@ #include "main/input_default.h" #include "power_x11.h" #include "servers/audio_server.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "servers/physics_2d/physics_2d_server_wrap_mt.h" -#include "servers/physics_server.h" #include "servers/visual/rasterizer.h" #include <X11/Xcursor/Xcursor.h> @@ -121,10 +118,8 @@ class OS_X11 : public OS_Unix { uint64_t last_click_ms; uint32_t last_button_state; - PhysicsServer *physics_server; unsigned int get_mouse_button_state(unsigned int p_x11_state); void get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state); - Physics2DServer *physics_2d_server; MouseMode mouse_mode; Point2i center; |