summaryrefslogtreecommitdiff
path: root/platform/server
diff options
context:
space:
mode:
Diffstat (limited to 'platform/server')
-rw-r--r--platform/server/SCsub8
-rw-r--r--platform/server/detect.py91
-rw-r--r--platform/server/godot_server.cpp45
-rw-r--r--platform/server/logo.h2
-rw-r--r--platform/server/logo.pngbin0 -> 2162 bytes
-rw-r--r--platform/server/os_server.cpp236
-rw-r--r--platform/server/os_server.h119
-rw-r--r--platform/server/platform_config.h30
8 files changed, 531 insertions, 0 deletions
diff --git a/platform/server/SCsub b/platform/server/SCsub
new file mode 100644
index 0000000000..3dda6b4395
--- /dev/null
+++ b/platform/server/SCsub
@@ -0,0 +1,8 @@
+Import('env')
+
+
+common_server=[\
+ "os_server.cpp",\
+]
+
+env.Program('#bin/godot_server',['godot_server.cpp']+common_server)
diff --git a/platform/server/detect.py b/platform/server/detect.py
new file mode 100644
index 0000000000..1ce8c23229
--- /dev/null
+++ b/platform/server/detect.py
@@ -0,0 +1,91 @@
+
+import os
+import sys
+
+
+def is_active():
+ return True
+
+def get_name():
+ return "Server"
+
+
+def can_build():
+
+ if (os.name!="posix"):
+ return False
+
+ return True # enabled
+
+def get_opts():
+
+ return [
+ ('use_llvm','Use llvm compiler','no'),
+ ('force_32_bits','Force 32 bits binary','no')
+ ]
+
+def get_flags():
+
+ return [
+ ('builtin_zlib', 'no'),
+ ]
+
+
+
+def configure(env):
+
+ env.Append(CPPPATH=['#platform/server'])
+ if (env["use_llvm"]=="yes"):
+ env["CC"]="clang"
+ env["CXX"]="clang++"
+ env["LD"]="clang++"
+
+ env['OBJSUFFIX'] = ".srv"+env['OBJSUFFIX']
+ env['LIBSUFFIX'] = ".srv"+env['LIBSUFFIX']
+
+ if (env["force_32_bits"]!="no"):
+ env['OBJSUFFIX'] = ".32"+env['OBJSUFFIX']
+ env['LIBSUFFIX'] = ".32"+env['LIBSUFFIX']
+
+
+ if (env["tools"]=="no"):
+ #no tools suffix
+ env['OBJSUFFIX'] = ".nt"+env['OBJSUFFIX']
+ env['LIBSUFFIX'] = ".nt"+env['LIBSUFFIX']
+
+
+ if (env["target"]=="release"):
+
+ env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer'])
+ env['OBJSUFFIX'] = "_opt"+env['OBJSUFFIX']
+ env['LIBSUFFIX'] = "_opt"+env['LIBSUFFIX']
+
+ elif (env["target"]=="release_debug"):
+
+ env.Append(CCFLAGS=['-O2','-ffast-math','-DDEBUG_ENABLED'])
+ env['OBJSUFFIX'] = "_optd"+env['OBJSUFFIX']
+ env['LIBSUFFIX'] = "_optd"+env['LIBSUFFIX']
+
+
+ elif (env["target"]=="debug"):
+
+ env.Append(CCFLAGS=['-g2', '-Wall','-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED'])
+
+ elif (env["target"]=="profile"):
+
+ env.Append(CCFLAGS=['-g','-pg'])
+ env.Append(LINKFLAGS=['-pg'])
+
+
+ env.Append(CPPFLAGS=['-DSERVER_ENABLED','-DUNIX_ENABLED'])
+ env.Append(LIBS=['pthread','z']) #TODO detect linux/BSD!
+
+ if (env["force_32_bits"]=="yes"):
+ env.Append(CPPFLAGS=['-m32'])
+ env.Append(LINKFLAGS=['-m32','-L/usr/lib/i386-linux-gnu'])
+
+ if (env["CXX"]=="clang++"):
+ env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
+ env["CC"]="clang"
+ env["LD"]="clang++"
+
diff --git a/platform/server/godot_server.cpp b/platform/server/godot_server.cpp
new file mode 100644
index 0000000000..3f817c7237
--- /dev/null
+++ b/platform/server/godot_server.cpp
@@ -0,0 +1,45 @@
+/*************************************************************************/
+/* godot_server.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "main/main.h"
+#include "os_server.h"
+
+int main(int argc, char* argv[]) {
+
+ OS_Server os;
+
+ Error err = Main::setup(argv[0],argc-1,&argv[1]);
+ if (err!=OK)
+ return 255;
+
+ if (Main::start())
+ os.run(); // it is actually the OS that decides how to run
+ Main::cleanup();
+
+ return os.get_exit_code();
+}
diff --git a/platform/server/logo.h b/platform/server/logo.h
new file mode 100644
index 0000000000..bb383145f5
--- /dev/null
+++ b/platform/server/logo.h
@@ -0,0 +1,2 @@
+ /* AUTOGENERATED FILE, DO NOT EDIT */
+ static const unsigned char _server_logo[]={0x89,0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0x73,0x7a,0x7a,0xf4,0x0,0x0,0x0,0x6,0x62,0x4b,0x47,0x44,0x0,0xff,0x0,0xff,0x0,0xff,0xa0,0xbd,0xa7,0x93,0x0,0x0,0x0,0x9,0x70,0x48,0x59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fe,0xa1,0x6a,0x6c,0x2d,0x68,0x6d,0xed,0x60,0xe3,0xc6,0x76,0xa4,0x94,0xcc,0xcc,0x4c,0x25,0x57,0x5,0x30,0x9b,0x49,0x61,0x99,0xb5,0xd8,0x76,0x0,0x69,0xfb,0x10,0x96,0x20,0x1e,0x5f,0x3,0x18,0x4c,0x66,0x92,0x43,0x7b,0x9f,0x42,0xd6,0xaf,0xa5,0x36,0xba,0x16,0xaf,0xe5,0x5a,0x16,0x7,0x7,0x68,0x6b,0x2b,0x30,0x38,0x74,0xe,0xc7,0x71,0x0,0x90,0xd2,0xa6,0xbd,0xed,0x2a,0xea,0xeb,0x1b,0x98,0xcd,0x66,0x18,0x18,0x38,0x4d,0x34,0x1a,0x27,0x18,0xc,0x35,0xac,0xa,0xa0,0xa5,0x65,0x23,0xa0,0x11,0xd2,0x60,0x4b,0x8f,0xe1,0xe1,0x61,0xca,0x65,0x97,0x44,0xa2,0x9e,0x70,0x20,0x84,0x52,0x60,0xb9,0xa3,0x64,0xa7,0xc7,0xf1,0x7,0xfa,0x89,0xe6,0x7,0x39,0x71,0xb6,0x1f,0x80,0x70,0x38,0x4a,0x67,0x67,0x17,0x15,0xd7,0xe5,0xc2,0xe0,0x39,0x46,0xc7,0x86,0x8,0x87,0xa3,0x34,0xae,0x6d,0xa1,0xb9,0x79,0x3d,0xc5,0x52,0xf1,0xf0,0x6a,0x0,0x44,0xa1,0x50,0x24,0x10,0x8,0xe1,0x55,0x34,0x65,0x14,0xcd,0xcd,0x6d,0x48,0x29,0x28,0x14,0xe6,0x11,0xeb,0xb7,0xb0,0xeb,0xfb,0xf,0x30,0xb5,0xe0,0x31,0xfb,0xc1,0xc,0x73,0x73,0x13,0x94,0x2e,0xc,0xd1,0xd8,0xd8,0x4c,0x53,0x53,0xb,0xf3,0xf3,0x39,0x8e,0x1d,0x3b,0xbc,0x44,0xbf,0xc5,0xc6,0x8d,0x1d,0x34,0x35,0xb6,0xe0,0x38,0xe,0x93,0x53,0x69,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xef,0xf1,0xfb,0xfd,0x77,0x5e,0x77,0x5d,0x77,0x6b,0x3e,0x9f,0xe7,0xe0,0xc1,0x37,0x8f,0x1f,0x38,0xf0,0xfa,0xc3,0x7d,0x7d,0x1f,0x9e,0x0,0xbc,0xff,0x49,0x47,0x2b,0xa5,0xc4,0xb2,0xec,0xc6,0x47,0x1e,0x79,0x74,0xf7,0xe5,0x3a,0xfa,0xbc,0xe3,0xdf,0x37,0xe9,0xbc,0x82,0x8a,0x4b,0xde,0x1,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82};
diff --git a/platform/server/logo.png b/platform/server/logo.png
new file mode 100644
index 0000000000..6b7490097f
--- /dev/null
+++ b/platform/server/logo.png
Binary files differ
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
new file mode 100644
index 0000000000..7bc8f61744
--- /dev/null
+++ b/platform/server/os_server.cpp
@@ -0,0 +1,236 @@
+/*************************************************************************/
+/* os_server.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "servers/visual/visual_server_raster.h"
+#include "servers/visual/rasterizer_dummy.h"
+#include "os_server.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "print_string.h"
+#include "servers/physics/physics_server_sw.h"
+
+#include "main/main.h"
+
+#include <unistd.h>
+
+int OS_Server::get_video_driver_count() const {
+
+ return 1;
+}
+const char * OS_Server::get_video_driver_name(int p_driver) const {
+
+ return "Dummy";
+}
+OS::VideoMode OS_Server::get_default_video_mode() const {
+
+ return OS::VideoMode(800,600,false);
+}
+
+void OS_Server::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
+
+ args=OS::get_singleton()->get_cmdline_args();
+ current_videomode=p_desired;
+ main_loop=NULL;
+
+
+ rasterizer = memnew( RasterizerDummy );
+
+ visual_server = memnew( VisualServerRaster(rasterizer) );
+
+ AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
+
+ if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) {
+
+ ERR_PRINT("Initializing audio failed.");
+ }
+
+ sample_manager = memnew( SampleManagerMallocSW );
+ audio_server = memnew( AudioServerSW(sample_manager) );
+ audio_server->init();
+ spatial_sound_server = memnew( SpatialSoundServerSW );
+ spatial_sound_server->init();
+ spatial_sound_2d_server = memnew( SpatialSound2DServerSW );
+ spatial_sound_2d_server->init();
+
+
+ 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 );
+
+ _ensure_data_dir();
+
+
+}
+void OS_Server::finalize() {
+
+ if(main_loop)
+ memdelete(main_loop);
+ main_loop=NULL;
+
+ spatial_sound_server->finish();
+ memdelete(spatial_sound_server);
+ spatial_sound_2d_server->finish();
+ memdelete(spatial_sound_2d_server);
+
+ //if (debugger_connection_console) {
+// memdelete(debugger_connection_console);
+//}
+
+ audio_server->finish();
+ memdelete(audio_server);
+ memdelete(sample_manager);
+
+ visual_server->finish();
+ memdelete(visual_server);
+ memdelete(rasterizer);
+
+ physics_server->finish();
+ memdelete(physics_server);
+
+ physics_2d_server->finish();
+ memdelete(physics_2d_server);
+
+ memdelete(input);
+
+ args.clear();
+}
+
+void OS_Server::set_mouse_show(bool p_show) {
+
+
+}
+void OS_Server::set_mouse_grab(bool p_grab) {
+
+ grab=p_grab;
+}
+bool OS_Server::is_mouse_grab_enabled() const {
+
+ return grab;
+}
+
+int OS_Server::get_mouse_button_state() const {
+
+ return 0;
+}
+
+Point2 OS_Server::get_mouse_pos() const {
+
+ return Point2();
+}
+
+void OS_Server::set_window_title(const String& p_title) {
+
+
+}
+
+void OS_Server::set_video_mode(const VideoMode& p_video_mode,int p_screen) {
+
+
+}
+OS::VideoMode OS_Server::get_video_mode(int p_screen) const {
+
+ return current_videomode;
+}
+void OS_Server::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) const {
+
+
+}
+
+
+MainLoop *OS_Server::get_main_loop() const {
+
+ return main_loop;
+}
+
+void OS_Server::delete_main_loop() {
+
+ if (main_loop)
+ memdelete(main_loop);
+ main_loop=NULL;
+}
+
+void OS_Server::set_main_loop( MainLoop * p_main_loop ) {
+
+ main_loop=p_main_loop;
+ input->set_main_loop(p_main_loop);
+}
+
+bool OS_Server::can_draw() const {
+
+ return false; //can never draw
+};
+
+
+String OS_Server::get_name() {
+
+ return "Server";
+}
+
+
+
+void OS_Server::move_window_to_foreground() {
+
+}
+
+void OS_Server::set_cursor_shape(CursorShape p_shape) {
+
+
+}
+
+void OS_Server::run() {
+
+ force_quit = false;
+
+ if (!main_loop)
+ return;
+
+ main_loop->init();
+
+ while (!force_quit) {
+
+ if (Main::iteration()==true)
+ break;
+ };
+
+ main_loop->finish();
+}
+
+OS_Server::OS_Server() {
+
+ AudioDriverManagerSW::add_driver(&driver_dummy);
+ //adriver here
+ grab=false;
+
+};
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
new file mode 100644
index 0000000000..fcf96253ad
--- /dev/null
+++ b/platform/server/os_server.h
@@ -0,0 +1,119 @@
+/*************************************************************************/
+/* os_server.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef OS_SERVER_H
+#define OS_SERVER_H
+
+
+#include "os/input.h"
+#include "drivers/unix/os_unix.h"
+#include "servers/visual_server.h"
+#include "servers/visual/rasterizer.h"
+#include "servers/audio/audio_driver_dummy.h"
+#include "servers/physics_server.h"
+#include "servers/audio/audio_server_sw.h"
+#include "servers/audio/sample_manager_sw.h"
+#include "servers/spatial_sound/spatial_sound_server_sw.h"
+#include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
+#include "drivers/rtaudio/audio_driver_rtaudio.h"
+#include "servers/physics_2d/physics_2d_server_sw.h"
+
+//bitch
+#undef CursorShape
+/**
+ @author Juan Linietsky <reduzio@gmail.com>
+*/
+
+class OS_Server : public OS_Unix {
+
+ Rasterizer *rasterizer;
+ VisualServer *visual_server;
+ VideoMode current_videomode;
+ List<String> args;
+ MainLoop *main_loop;
+
+ AudioDriverDummy driver_dummy;
+ bool grab;
+
+ PhysicsServer *physics_server;
+ Physics2DServer *physics_2d_server;
+
+ virtual void delete_main_loop();
+ IP_Unix *ip_unix;
+
+ AudioServerSW *audio_server;
+ SampleManagerMallocSW *sample_manager;
+ SpatialSoundServerSW *spatial_sound_server;
+ SpatialSound2DServerSW *spatial_sound_2d_server;
+
+ bool force_quit;
+
+ InputDefault *input;
+
+
+
+protected:
+
+ virtual int get_video_driver_count() const;
+ virtual const char * get_video_driver_name(int p_driver) const;
+ virtual VideoMode get_default_video_mode() const;
+
+ virtual void initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver);
+ virtual void finalize();
+
+ virtual void set_main_loop( MainLoop * p_main_loop );
+
+public:
+
+ virtual String get_name();
+
+ virtual void set_cursor_shape(CursorShape p_shape);
+
+ virtual void set_mouse_show(bool p_show);
+ virtual void set_mouse_grab(bool p_grab);
+ virtual bool is_mouse_grab_enabled() const;
+ virtual Point2 get_mouse_pos() const;
+ virtual int get_mouse_button_state() const;
+ virtual void set_window_title(const String& p_title);
+
+ virtual MainLoop *get_main_loop() const;
+
+ virtual bool can_draw() const;
+
+ virtual void set_video_mode(const VideoMode& p_video_mode,int p_screen=0);
+ virtual VideoMode get_video_mode(int p_screen=0) const;
+ virtual void get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen=0) const;
+
+ virtual void move_window_to_foreground();
+
+ void run();
+
+ OS_Server();
+};
+
+#endif
diff --git a/platform/server/platform_config.h b/platform/server/platform_config.h
new file mode 100644
index 0000000000..1bb5afb002
--- /dev/null
+++ b/platform/server/platform_config.h
@@ -0,0 +1,30 @@
+/*************************************************************************/
+/* platform_config.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include <alloca.h>
+