Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-30 22:08:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-30 22:08:44 +0300
commita1b8bc93e2890303eb5f9459681830091227a8bc (patch)
tree8482332744edc1b0b28b85a5bf0e729f5faddaa4 /source
parent7ca3ff1ff111363e4850d2c500e47a20fe17ba7c (diff)
remove unmaintained windows and unix game engine plugin code.
Diffstat (limited to 'source')
-rw-r--r--source/gameengine/GamePlayer/common/CMakeLists.txt9
-rw-r--r--source/gameengine/GamePlayer/common/Makefile15
-rw-r--r--source/gameengine/GamePlayer/common/SConscript14
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_Canvas.cpp68
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_Canvas.h58
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp299
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_Engine.h61
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.cpp133
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.h61
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_PolygonMaterial.h53
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_System.cpp51
-rw-r--r--source/gameengine/GamePlayer/common/unix/GPU_System.h46
-rw-r--r--source/gameengine/GamePlayer/common/unix/Makefile70
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_Canvas.cpp171
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_Canvas.h115
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_Engine.cpp112
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_Engine.h45
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.cpp283
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.h66
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_System.cpp88
-rw-r--r--source/gameengine/GamePlayer/common/windows/GPW_System.h58
-rw-r--r--source/gameengine/GamePlayer/common/windows/Makefile62
22 files changed, 0 insertions, 1938 deletions
diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt
index 46fd467e8d5..d3b053c90b1 100644
--- a/source/gameengine/GamePlayer/common/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/common/CMakeLists.txt
@@ -77,15 +77,6 @@ SET(SRC
GPC_RawLogoArrays.h
GPC_RenderTools.h
GPC_System.h
- unix/GPU_Canvas.h
- unix/GPU_Engine.h
- unix/GPU_KeyboardDevice.h
- unix/GPU_PolygonMaterial.h
- unix/GPU_System.h
- windows/GPW_Canvas.h
- windows/GPW_Engine.h
- windows/GPW_KeyboardDevice.h
- windows/GPW_System.h
)
ADD_DEFINITIONS(-DGLEW_STATIC)
diff --git a/source/gameengine/GamePlayer/common/Makefile b/source/gameengine/GamePlayer/common/Makefile
index e28cacb826a..dd6aa9fc98c 100644
--- a/source/gameengine/GamePlayer/common/Makefile
+++ b/source/gameengine/GamePlayer/common/Makefile
@@ -67,18 +67,3 @@ CPPFLAGS += -I../../../gameengine/Rasterizer
CPPFLAGS += -I../../../gameengine/SceneGraph
CPPFLAGS += -I../../../gameengine/Rasterizer/RAS_OpenGLRasterizer
CPPFLAGS += -I../../../gameengine/Physics/common
-
-###############################
-
-SOURCEDIR = source/gameengine/GamePlayer/common
-DIRS =
-ifeq ($(OS),windows)
-# Still
- DIRS = windows
-else
- ifneq ($(OS),darwin)
- DIRS = unix
- endif
-endif
-
-include nan_subdirs.mk
diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript
index 86fb66974db..873f53f25fa 100644
--- a/source/gameengine/GamePlayer/common/SConscript
+++ b/source/gameengine/GamePlayer/common/SConscript
@@ -44,20 +44,6 @@ incs = ['.',
'#source/blender/gpu',
'#extern/glew/include']
-#This is all plugin stuff!
-#if sys.platform=='win32':
-# source_files += ['windows/GPW_Canvas.cpp',
-# 'windows/GPW_Engine.cpp',
-# 'windows/GPW_KeyboardDevice.cpp',
-# 'windows/GPW_System.cpp']
-# gp_common_env.Append ( CPPPATH = ['windows'])
-#elif sys.platform=='linux2' or sys.platform=='linux-i386':
-# source_files += ['unix/GPU_Canvas.cpp',
-# 'unix/GPU_Engine.cpp',
-# 'unix/GPU_KeyboardDevice.cpp',
-# 'unix/GPU_System.cpp']
-# gp_common_env.Append ( CPPPATH = ['unix'])
-
defs = [ 'GLEW_STATIC' ]
if env['WITH_BF_PYTHON']:
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_Canvas.cpp b/source/gameengine/GamePlayer/common/unix/GPU_Canvas.cpp
deleted file mode 100644
index bb7b55fbcf1..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_Canvas.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-//#include <iostream>
-#include "GPU_Canvas.h"
-
-GPU_Canvas::GPU_Canvas(KXH_plugin_handle p, int width, int height)
- : GPC_Canvas(width, height), m_plugin(p)
-{
- /* intentionally empty */
-}
-
-
-GPU_Canvas::~GPU_Canvas(void)
-{
- /* intentionally empty */
-}
-
-void GPU_Canvas::Init(void)
-{
- /* intentionally empty */
-}
-
-void GPU_Canvas::SwapBuffers(void)
-{
- if (m_plugin) KXH_swap_buffers(m_plugin);
-}
-
-bool
-GPU_Canvas::BeginDraw(void)
-{
- if (m_plugin) {
- return KXH_begin_draw(m_plugin);
- } else {
- return false;
- }
-}
-
-void GPU_Canvas::EndDraw(void)
-{
- if (m_plugin) KXH_end_draw(m_plugin);
-}
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_Canvas.h b/source/gameengine/GamePlayer/common/unix/GPU_Canvas.h
deleted file mode 100644
index 963c8f20435..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_Canvas.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __GPU_CANVAS_H
-#define __GPU_CANVAS_H
-
-#include <iostream>
-
-#include "KXH_ketsji_hooks.h"
-#include "GPC_Canvas.h"
-
-class GPU_Canvas : public GPC_Canvas
-{
-private:
-
- /** Handle to the drawing resource. */
- KXH_plugin_handle m_plugin;
-
-public:
- GPU_Canvas(KXH_plugin_handle display, int width, int height);
- virtual ~GPU_Canvas();
-
- virtual void Init(void);
-
- bool BeginDraw(void);
- void EndDraw(void);
- virtual void SwapBuffers(void);
-
-};
-
-#endif // __GPU_CANVAS_H
-
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp b/source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp
deleted file mode 100644
index 3eb7147bd98..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp
+++ /dev/null
@@ -1,299 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <assert.h>
-#include <unistd.h>
-#include "GPU_Engine.h"
-#include "GPC_MouseDevice.h"
-#include "GPU_Canvas.h"
-#include "GPU_KeyboardDevice.h"
-#include "GPU_System.h"
-
-#include "BLI_blenlib.h"
-#include "BLO_readfile.h"
-
-#include "SND_DeviceManager.h"
-
-#include "NG_NetworkScene.h"
-#include "NG_LoopBackNetworkDeviceInterface.h"
-#include "SND_DeviceManager.h"
-#include "KX_BlenderSceneConverter.h"
-#include "KX_KetsjiEngine.h"
-
-#include "GPC_RenderTools.h"
-#include "GPC_RawImage.h"
-
-void Redraw(GPU_Engine *engine); // -the- redraw function
-
-// callback functions
-/*
-void RedrawCallback(Widget, XtPointer closure, XEvent *, Boolean *continue_to_dispatch);
-
-void KeyDownCallback(Widget w, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch);
-void KeyUpCallback(Widget w, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch);
-
-void ButtonPressReleaseCallback(Widget w, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch);
-void PointerMotionCallback(Widget w, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch);
-
-void TimeOutCallback(XtPointer closure, XtIntervalId *id);
-*/
-
-GPU_Engine::GPU_Engine(char *customLoadingAnimationURL,
- int foregroundColor, int backgroundColor, int frameRate) :
- GPC_Engine(customLoadingAnimationURL, foregroundColor, backgroundColor,
- frameRate), m_timerTimeOutMsecs(10)
-{
-}
-
-
-GPU_Engine::~GPU_Engine()
-{
-}
-
-/*
-bool GPU_Engine::Initialize(Display *display, Window window, int width, int height)
-{
- SND_DeviceManager::Subscribe();
- m_audiodevice = SND_DeviceManager::Instance();
-
- m_keyboarddev = new GPU_KeyboardDevice();
- m_mousedev = new GPC_MouseDevice();
-
- // constructor only initializes data
- // m_canvas = new GPU_Canvas(display, window, width, height);
- //m_canvas->Init(); // create the actual visual and rendering context
- //cout << "GPU_Canvas created and initialized, m_canvas " << m_canvas << endl;
- //AddEventHandlers(); // done here (in GPU_Engine) since the event handlers need access to 'this', ie the engine
-
- // put the Blender logo in the topleft corner
- if(m_BlenderLogo != 0)
- // adding a banner automatically enables them
- m_BlenderLogoId = m_canvas->AddBanner(m_BlenderLogo->Width(), m_BlenderLogo->Height(),
- m_BlenderLogo->Width(), m_BlenderLogo->Height(),
- m_BlenderLogo->Data(), GPC_Canvas::alignTopLeft);
-
- // put the Blender3D logo in the bottom right corner
- if(m_Blender3DLogo != 0)
- // adding a banner automatically enables them
- m_Blender3DLogoId = m_canvas->AddBanner(m_Blender3DLogo->Width(), m_Blender3DLogo->Height(),
- m_Blender3DLogo->Width(), m_Blender3DLogo->Height(),
- m_Blender3DLogo->Data(), GPC_Canvas::alignTopLeft);
-
-#if 0
- // put the NaN logo in the bottom right corner
- if(m_NaNLogo != 0)
- // adding a banner automatically enables them
- m_NaNLogoId = m_canvas->AddBanner(m_NaNLogo->Width(), m_NaNLogo->Height(),
- m_NaNLogo->Width(), m_NaNLogo->Height(),
- m_NaNLogo->Data(), GPC_Canvas::alignBottomRight);
-#endif
- // enable the display of all banners
- m_canvas->SetBannerDisplayEnabled(true);
-
- m_rendertools = new GPC_RenderTools();
-
- m_networkdev = new NG_LoopBackNetworkDeviceInterface();
- assert(m_networkdev);
-
- // creation of system needs 'current rendering context', this is taken care
- // of by the GPU_Canvas::Init()
- m_system = new GPU_System();
-
- m_system->SetKeyboardDevice((GPU_KeyboardDevice *)m_keyboarddev);
- m_system->SetMouseDevice(m_mousedev);
- m_system->SetNetworkDevice(m_networkdev);
-
- m_initialized = true;
-
- return m_initialized;
-}
-*/
-
-/*
-void GPU_Engine::HandleNewWindow(Window window)
-{
- // everything only if it's really a new window
- if(window != ((GPU_Canvas *)m_canvas)->GetWindow())
- {
- cout << "GPU_Engine::HandleNewWindow(), new window so calling SetNewWindowMakeNewWidgetAndMakeCurrent()" << endl;
- // We don't have to remove the event handlers ourselves, they are destroyed by X11
-
- // make canvas aware of new window, and make it current
- ((GPU_Canvas *)m_canvas)->SetNewWindowMakeNewWidgetAndMakeCurrent(window);
-
- // and add event handlers to new widget
- AddEventHandlers();
- cout << "GPU_Engine::HandleNewWindow(), event handlers added" << endl;
- }
-}
-*/
-/*
-void GPU_Engine::AddEventHandlers(void)
-{
- Widget widget = ((GPU_Canvas *)m_canvas)->GetWidget();
-
- // redraw
- // MUST be the *Raw* event handler, the normal one doesn't work!
- XtAddRawEventHandler(widget, ExposureMask, FALSE, RedrawCallback, this);
-#if 0
- // key down
- XtAddRawEventHandler(widget, KeyPressMask, FALSE, KeyDownCallback, this);
- // key up
- XtAddRawEventHandler(widget, KeyReleaseMask, FALSE, KeyUpCallback, this);
-
- // mouse button press
- XtAddRawEventHandler(widget, ButtonPressMask, FALSE, ButtonPressReleaseCallback, this);
- // mouse button release
- XtAddRawEventHandler(widget, ButtonReleaseMask, FALSE, ButtonPressReleaseCallback, this);
- // mouse motion
- XtAddRawEventHandler(widget, PointerMotionMask, FALSE, PointerMotionCallback, this);
-#endif
-#if 0
- // time out, not a real timer. New time out will be set in callback
- m_timerId = XtAppAddTimeOut(XtWidgetToApplicationContext(widget),
- m_timerTimeOutMsecs, TimeOutCallback, this);
-#endif
-}
-*/
-
-void Redraw(GPU_Engine *engine)
-{
-/* if(engine->Running())
- {
- if(engine->Loading())
- {
- engine->UpdateLoadingAnimation();
- }
-
- engine->m_system->DoMainLoopCallback();
- }*/
-}
-
-
-/*+++++++++++++++++++++++++++++++++++++++++++++++++
- * Callback functions
- +++++++++++++++++++++++++++++++++++++++++++++++++*/
-void RedrawCallback(Widget, XtPointer closure, XEvent *, Boolean *continue_to_dispatch)
-{
- GPU_Engine *engine = (GPU_Engine *)closure;
-
- Redraw(engine);
-
- *continue_to_dispatch = True;
-}
-
-
-void KeyDownCallback(Widget, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch)
-{
-/* GPU_Engine *engine = (GPU_Engine *)closure;
- XKeyEvent *keyEvent = (XKeyEvent *)event;
-
- if(engine->Running())
- engine->m_system->AddKey(int(keyEvent->keycode), 1);
-
- *continue_to_dispatch = True;*/
-}
-
-
-void KeyUpCallback(Widget, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch)
-{
-/* GPU_Engine *engine = (GPU_Engine *)closure;
- XKeyEvent *keyEvent = (XKeyEvent *)event;
-
- if(engine->Running())
- engine->m_system->AddKey(int(keyEvent->keycode), 0);
-
- *continue_to_dispatch = True;*/
-}
-
-
-void ButtonPressReleaseCallback(Widget, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch)
-{
- GPU_Engine *engine = (GPU_Engine *)closure;
- XButtonEvent *buttonEvent = (XButtonEvent *)event;
- bool isDown;
- GPC_MouseDevice::TButtonId button;
-
- if(engine->Running())
- {
- // determine type of event, press or release
- isDown = false;
- if(buttonEvent->type == ButtonPress)
- isDown = true;
- // determine which button exactly generated this event
- switch(buttonEvent->button)
- {
- case 1:
- button = GPC_MouseDevice::buttonLeft;
- break;
- case 2:
- button = GPC_MouseDevice::buttonMiddle;
- break;
- case 3:
- button = GPC_MouseDevice::buttonRight;
- break;
- }
- engine->m_mousedev->ConvertButtonEvent(button,
- isDown, buttonEvent->x, buttonEvent->y);
- }
-
- *continue_to_dispatch = True;
-}
-
-
-void PointerMotionCallback(Widget w, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch)
-{
- GPU_Engine *engine = (GPU_Engine *)closure;
- XButtonEvent *buttonEvent = (XButtonEvent *)event;
-
- if(engine->Running())
- {
- engine->m_mousedev->ConvertMoveEvent(buttonEvent->x, buttonEvent->y);
- }
-
- *continue_to_dispatch = True;
-}
-
-/*
-void TimeOutCallback(XtPointer closure, XtIntervalId *id)
-{
- GPU_Engine *engine = (GPU_Engine *)closure;
-
- Redraw(engine);
- // add a new time out since there is no real timer for X (not a simple one like under windows)
- // TODO Have to get faster timer !
-
- if(engine->Running())
- engine->m_timerId = XtAppAddTimeOut(XtWidgetToApplicationContext(
- ((GPU_Canvas *)engine->m_canvas)->GetWidget()),
- engine->m_timerTimeOutMsecs, TimeOutCallback,
- closure);
-}
-
-*/
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_Engine.h b/source/gameengine/GamePlayer/common/unix/GPU_Engine.h
deleted file mode 100644
index 12fb70c84ef..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_Engine.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __GPU_ENGINE_H
-#define __GPU_ENGINE_H
-
-#include <X11/Xlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-
-#define Object DNA_Object // tricky stuff !!! but without it, it doesn't compile...
-
-#include "GPC_Engine.h"
-
-
-class GPU_Engine : public GPC_Engine
-{
-public:
- XtIntervalId m_timerId;
- unsigned long m_timerTimeOutMsecs;
-
-public:
- GPU_Engine(char *customLoadingAnimation,
- int foregroundColor, int backgroundColor, int frameRate);
- virtual ~GPU_Engine();
- bool Initialize(Display *display, Window window, int width, int height);
-
- void HandleNewWindow(Window window);
-
-private:
- void AddEventHandlers();
-};
-
-#endif // __GPU_ENGINE_H
-
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.cpp b/source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.cpp
deleted file mode 100644
index 5444cf22ac9..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#include "GPU_KeyboardDevice.h"
-
-void GPU_KeyboardDevice::register_X_key_down_event(KeySym k)
-{
- ConvertEvent(k, 1);
-}
-
-void GPU_KeyboardDevice::register_X_key_up_event(KeySym k)
-{
- ConvertEvent(k, 0);
-}
-
-
-#define map_x_key_to_kx_key(x,y) m_reverseKeyTranslateTable[x] = y;
-
-GPU_KeyboardDevice::GPU_KeyboardDevice(void)
-{
- unsigned int i = 0;
-
- // Needed?
- m_reverseKeyTranslateTable.clear();
-
- for (i = XK_A; i< XK_Z; i++) {
- m_reverseKeyTranslateTable[i]
- = (SCA_IInputDevice::KX_EnumInputs)
- (((unsigned int)SCA_IInputDevice::KX_AKEY) + i - XK_A);
- }
-
- // Shifted versions: should not occur: KX doesn't distinguish
- for (i = XK_a; i< XK_z; i++) {
- m_reverseKeyTranslateTable[i]
- = (SCA_IInputDevice::KX_EnumInputs)
- (((int)SCA_IInputDevice::KX_AKEY) + i - XK_a);
- }
-
- for (i = XK_0; i< XK_9; i++) {
- m_reverseKeyTranslateTable[i]
- = (SCA_IInputDevice::KX_EnumInputs)
- (((int)SCA_IInputDevice::KX_ZEROKEY) + i - XK_0);
- }
-
- for (i = XK_F1; i< XK_F19; i++) {
- m_reverseKeyTranslateTable[i]
- = (SCA_IInputDevice::KX_EnumInputs)
- (((int)SCA_IInputDevice::KX_F1KEY) + i - XK_F1);
- }
-
- // the remainder:
- map_x_key_to_kx_key(XK_BackSpace, SCA_IInputDevice::KX_BACKSPACEKEY);
- map_x_key_to_kx_key(XK_Tab, SCA_IInputDevice::KX_TABKEY);
- map_x_key_to_kx_key(XK_Return, SCA_IInputDevice::KX_RETKEY);
- map_x_key_to_kx_key(XK_Escape, SCA_IInputDevice::KX_ESCKEY);
- map_x_key_to_kx_key(XK_space, SCA_IInputDevice::KX_SPACEKEY);
-
- map_x_key_to_kx_key(XK_Shift_L, SCA_IInputDevice::KX_LEFTSHIFTKEY);
- map_x_key_to_kx_key(XK_Shift_R, SCA_IInputDevice::KX_RIGHTSHIFTKEY);
- map_x_key_to_kx_key(XK_Control_L, SCA_IInputDevice::KX_LEFTCTRLKEY);
- map_x_key_to_kx_key(XK_Control_R, SCA_IInputDevice::KX_RIGHTCTRLKEY);
- map_x_key_to_kx_key(XK_Alt_L, SCA_IInputDevice::KX_LEFTALTKEY);
- map_x_key_to_kx_key(XK_Alt_R, SCA_IInputDevice::KX_RIGHTALTKEY);
-
- map_x_key_to_kx_key(XK_Insert, SCA_IInputDevice::KX_INSERTKEY);
- map_x_key_to_kx_key(XK_Delete, SCA_IInputDevice::KX_DELKEY);
- map_x_key_to_kx_key(XK_Home, SCA_IInputDevice::KX_HOMEKEY);
- map_x_key_to_kx_key(XK_End, SCA_IInputDevice::KX_ENDKEY);
- map_x_key_to_kx_key(XK_Page_Up, SCA_IInputDevice::KX_PAGEUPKEY);
- map_x_key_to_kx_key(XK_Page_Down, SCA_IInputDevice::KX_PAGEDOWNKEY);
-
- map_x_key_to_kx_key(XK_Left, SCA_IInputDevice::KX_LEFTARROWKEY);
- map_x_key_to_kx_key(XK_Right, SCA_IInputDevice::KX_RIGHTARROWKEY);
- map_x_key_to_kx_key(XK_Up, SCA_IInputDevice::KX_UPARROWKEY);
- map_x_key_to_kx_key(XK_Down, SCA_IInputDevice::KX_DOWNARROWKEY);
-
- map_x_key_to_kx_key(XK_KP_0, SCA_IInputDevice::KX_PAD0);
- map_x_key_to_kx_key(XK_KP_1, SCA_IInputDevice::KX_PAD1);
- map_x_key_to_kx_key(XK_KP_2, SCA_IInputDevice::KX_PAD2);
- map_x_key_to_kx_key(XK_KP_3, SCA_IInputDevice::KX_PAD3);
- map_x_key_to_kx_key(XK_KP_4, SCA_IInputDevice::KX_PAD4);
- map_x_key_to_kx_key(XK_KP_5, SCA_IInputDevice::KX_PAD5);
- map_x_key_to_kx_key(XK_KP_6, SCA_IInputDevice::KX_PAD6);
- map_x_key_to_kx_key(XK_KP_7, SCA_IInputDevice::KX_PAD7);
- map_x_key_to_kx_key(XK_KP_8, SCA_IInputDevice::KX_PAD8);
- map_x_key_to_kx_key(XK_KP_9, SCA_IInputDevice::KX_PAD9);
- map_x_key_to_kx_key(XK_KP_Decimal, SCA_IInputDevice::KX_PADPERIOD);
-
- map_x_key_to_kx_key(XK_KP_Insert, SCA_IInputDevice::KX_INSERTKEY);
- map_x_key_to_kx_key(XK_KP_End, SCA_IInputDevice::KX_ENDKEY);
- map_x_key_to_kx_key(XK_KP_Down, SCA_IInputDevice::KX_DOWNARROWKEY);
- map_x_key_to_kx_key(XK_KP_Page_Down,SCA_IInputDevice::KX_PAGEDOWNKEY);
- map_x_key_to_kx_key(XK_KP_Left, SCA_IInputDevice::KX_LEFTARROWKEY);
- map_x_key_to_kx_key(XK_KP_Right, SCA_IInputDevice::KX_RIGHTARROWKEY);
- map_x_key_to_kx_key(XK_KP_Home, SCA_IInputDevice::KX_HOMEKEY);
- map_x_key_to_kx_key(XK_KP_Up, SCA_IInputDevice::KX_UPARROWKEY);
- map_x_key_to_kx_key(XK_KP_Page_Up, SCA_IInputDevice::KX_PAGEUPKEY);
- map_x_key_to_kx_key(XK_KP_Delete, SCA_IInputDevice::KX_DELKEY);
-
- map_x_key_to_kx_key(XK_KP_Enter, SCA_IInputDevice::KX_PADENTER);
- map_x_key_to_kx_key(XK_KP_Add, SCA_IInputDevice::KX_PADPLUSKEY);
- map_x_key_to_kx_key(XK_KP_Subtract, SCA_IInputDevice::KX_PADMINUS);
- map_x_key_to_kx_key(XK_KP_Multiply, SCA_IInputDevice::KX_PADASTERKEY);
- map_x_key_to_kx_key(XK_KP_Divide, SCA_IInputDevice::KX_PADSLASHKEY);
-
- map_x_key_to_kx_key(XK_Caps_Lock, SCA_IInputDevice::KX_CAPSLOCKKEY);
-
-}
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.h b/source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.h
deleted file mode 100644
index e4ff20c7159..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __GPU_KEYBOARDDEVICE_H
-#define __GPU_KEYBOARDDEVICE_H
-
-#include <X11/keysym.h>
-#include <X11/X.h> // Brilliant name, eh? Stupid !@#!$!@#@@% This is
- // actually needed so as not to get name clashes between Object from
- // blender and Object from X11... The proper include would be
- // Intrinsic.h . Yes, we are a bunch of sado-masochists. Let's hurt
- // ourselves!
-
-#include "GPC_KeyboardDevice.h"
-
-class GPU_KeyboardDevice : public GPC_KeyboardDevice
-{
-public:
-
- void register_X_key_down_event(KeySym k);
- void register_X_key_up_event(KeySym k);
-
- GPU_KeyboardDevice(void);
- virtual ~GPU_KeyboardDevice()
- {
- /* intentionally empty */
- }
-
- private:
- SCA_IInputDevice::KX_EnumInputs
- convert_x_keycode_to_kx_keycode(unsigned int key);
-};
-
-#endif // _GPU_KEYBOARDDEVICE_H
-
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_PolygonMaterial.h b/source/gameengine/GamePlayer/common/unix/GPU_PolygonMaterial.h
deleted file mode 100644
index 66c8f830ad8..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_PolygonMaterial.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __GPU_POLYGONMATERIAL_H
-#define __GPU_POLYGONMATERIAL_H
-
-#include "BP_PolygonMaterial.h"
-
-class GPU_PolygonMaterial : public BP_PolygonMaterial
-{
-public:
- GPUPolygonMaterial(const STR_String& texname, bool ba,const STR_String& matname,
- int tile, int tileXrep, int tileYrep, int mode, int transparant,
- int lightlayer,,void* tpage) :
- BP_PolygonMaterial(texname, ba,matname, tile, tileXrep, tileYrep,
- mode, transparant, lightlayer),
- m_tface(tpage)
- {
- }
-
- virtual ~GPU_PolygonMaterial()
- {
- }
-};
-
-#endif // __GPU_POLYGONMATERIAL_H
-
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_System.cpp b/source/gameengine/GamePlayer/common/unix/GPU_System.cpp
deleted file mode 100644
index 8085ecb4380..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_System.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <sys/time.h>
-#include "GPU_System.h"
-
-static struct timeval startTime;
-static int startTimeDone = 0;
-
-
-double GPU_System::GetTimeInSeconds()
-{
- if(!startTimeDone)
- {
- gettimeofday(&startTime, NULL);
- startTimeDone = 1;
- }
-
- struct timeval now;
- gettimeofday(&now, NULL);
- // next '1000' are used for precision
- long ticks = (now.tv_sec - startTime.tv_sec) * 1000 + (now.tv_usec - startTime.tv_usec) / 1000;
- double secs = (double)ticks / 1000.0;
- return secs;
-}
diff --git a/source/gameengine/GamePlayer/common/unix/GPU_System.h b/source/gameengine/GamePlayer/common/unix/GPU_System.h
deleted file mode 100644
index bd0658014e8..00000000000
--- a/source/gameengine/GamePlayer/common/unix/GPU_System.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __GPU_SYSTEM_H
-#define __GPU_SYSTEM_H
-
-#include "GPC_System.h"
-
-class GPU_System : public GPC_System
-{
-public:
- GPU_System()
- {
- }
-
- virtual double GetTimeInSeconds();
-};
-
-#endif // __GPU_SYSTEM_H
-
diff --git a/source/gameengine/GamePlayer/common/unix/Makefile b/source/gameengine/GamePlayer/common/unix/Makefile
deleted file mode 100644
index db29a087b28..00000000000
--- a/source/gameengine/GamePlayer/common/unix/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = unix
-DIR = $(OCGDIR)/gameengine/GamePlayer/common/$(LIBNAME)
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I$(NAN_GLEW)/include
-CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_STRING)/include
-
-CPPFLAGS += -I..
-CPPFLAGS += -I../../netscape/src/ketsji
-CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-
-
-# Game Engine
-CPPFLAGS += -I../../../../gameengine/Converter
-CPPFLAGS += -I../../../../gameengine/Expressions
-CPPFLAGS += -I../../../../gameengine/GameLogic
-CPPFLAGS += -I../../../../gameengine/Ketsji
-CPPFLAGS += -I../../../../gameengine/Ketsji/KXNetwork
-CPPFLAGS += -I../../../../gameengine/Network
-CPPFLAGS += -I../../../../gameengine/Network/LoopBackNetwork
-CPPFLAGS += -I../../../../gameengine/Rasterizer
-CPPFLAGS += -I../../../../gameengine/Rasterizer/RAS_OpenGLRasterizer
-CPPFLAGS += -I../../../../gameengine/SceneGraph
-
-CPPFLAGS += -I$(NAN_MOTO)/include
-
-# Blender stuff
-CPPFLAGS += -I../../../../blender/blenkernel
-CPPFLAGS += -I../../../../blender/blenlib
-CPPFLAGS += -I../../../../blender/blenloader
-CPPFLAGS += -I../../../../blender/imbuf
-CPPFLAGS += -I../../../../blender/makesdna
-CPPFLAGS += -I../../../../kernel/gen_system
-
-CPPFLAGS += -I../../kernel/gen_system
-
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_Canvas.cpp b/source/gameengine/GamePlayer/common/windows/GPW_Canvas.cpp
deleted file mode 100644
index 44437820bd2..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_Canvas.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "GPW_Canvas.h"
-
-GPW_Canvas::GPW_Canvas(HWND hWnd, HDC hDC, int width, int height)
- : GPC_Canvas(width, height), m_hWnd(hWnd), m_hRC(0), m_hDC(hDC)
-{
-}
-
-
-GPW_Canvas::~GPW_Canvas()
-{
- if (m_hRC) {
- ::wglDeleteContext(m_hRC);
- }
- //if (m_hDC) {
- // ::ReleaseDC(m_hWnd, m_hDC);
- //}
-}
-
-
-void GPW_Canvas::Init()
-{
-
-// log_entry("GPW_Canvas::Init");
-
- /*
- * Color and depth bit values are not to be trusted.
- * For instance, on TNT2:
- * When the screen color depth is set to 16 bit, we get 5 color bits
- * and 16 depth bits.
- * When the screen color depth is set to 32 bit, we get 8 color bits
- * and 24 depth bits.
- * Just to be safe, we request high quality settings.
- */
- PIXELFORMATDESCRIPTOR pfd =
- {
- sizeof(PIXELFORMATDESCRIPTOR), // iSize
- 1, // iVersion
- PFD_DRAW_TO_WINDOW |
- PFD_SUPPORT_OPENGL |
-// PFD_STEREO |
- PFD_DOUBLEBUFFER, // dwFlags
- PFD_TYPE_RGBA, // iPixelType
- 32, // cColorBits
- 0, 0, // cRedBits, cRedShift (ignored)
- 0, 0, // cGreenBits, cGreenShift (ignored)
- 0, 0, // cBlueBits, cBlueShift (ignored)
- 0, 0, // cAlphaBits, cAlphaShift (ignored)
- 0, 0, 0, 0, 0, // cAccum_X_Bits
- 32, // cDepthBits
- 0, // cStencilBits
- 0, // cAuxBuffers
- PFD_MAIN_PLANE, // iLayerType
- 0, // bReserved
- 0, // dwLayerMask
- 0, // dwVisibleMask
- 0 // dwDamageMask
- };
- PIXELFORMATDESCRIPTOR match;
-
- // Look what we get back for this pixel format
- int pixelFormat = ::ChoosePixelFormat(m_hDC, &pfd);
- if (!pixelFormat) {
- DWORD error = ::GetLastError();
- }
- ::DescribePixelFormat(m_hDC, pixelFormat, sizeof(match), &match);
-
- // Activate the pixel format for this context
- ::SetPixelFormat(m_hDC, ::ChoosePixelFormat(m_hDC, &match), &match);
-
- // Create the OpenGL context and make it current
- m_hRC = ::wglCreateContext(m_hDC);
- ::wglMakeCurrent(m_hDC, m_hRC);
-
-}
-
-void GPW_Canvas::SetMousePosition(int x, int y)
-{
- POINT point = { x, y };
- if (m_hWnd)
- {
- ::ClientToScreen(m_hWnd, &point);
- ::SetCursorPos(point.x, point.y);
- }
-}
-
-
-void GPW_Canvas::SetMouseState(RAS_MouseState mousestate)
-{
- LPCSTR id;
- switch (mousestate)
- {
- case MOUSE_INVISIBLE:
- HideCursor();
- break;
- case MOUSE_WAIT:
- ::SetCursor(::LoadCursor(0, IDC_WAIT));
- ShowCursor();
- break;
- case MOUSE_NORMAL:
- ::SetCursor(::LoadCursor(0, IDC_ARROW));
- ShowCursor();
- break;
- }
-}
-
-
-bool GPW_Canvas::BeginDraw(void)
-{
- ::wglMakeCurrent(m_hDC, m_hRC);
- // check errors, anyone?
- return true;
-}
-
-
-void GPW_Canvas::EndDraw(void)
-{
- ::wglMakeCurrent(NULL, NULL);
-}
-
-void GPW_Canvas::SwapBuffers(void)
-{
- if (m_hDC) {
- ::SwapBuffers(m_hDC);
- }
-}
-
-
-void GPW_Canvas::HideCursor(void)
-{
- int count = ::ShowCursor(FALSE);
- while (count >= 0)
- {
- count = ::ShowCursor(FALSE);
- }
-}
-
-
-void GPW_Canvas::ShowCursor(void)
-{
- ::ShowCursor(TRUE);
-}
-
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_Canvas.h b/source/gameengine/GamePlayer/common/windows/GPW_Canvas.h
deleted file mode 100644
index f43be233ee2..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_Canvas.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef _GPW_CANVAS_H_
-#define _GPW_CANVAS_H_
-
-#ifdef WIN32
-#pragma warning (disable:4786) // suppress stl-MSVC debug info warning
-#endif
-
-#include <iostream>
-#include <windows.h>
-//#include <gl/gl.h>
-
-#include "GPC_Canvas.h"
-
-
-class GPW_Canvas : public GPC_Canvas
-{
-protected:
- /** The window handle. */
- HWND m_hWnd;
- /** Rendering context. */
- HGLRC m_hRC;
- /** Device Context. */
- HDC m_hDC;
-
-public:
- /**
- * Constructor.
- */
- GPW_Canvas(HWND hWnd, HDC hDC, int width, int height);
-
- /**
- * Destructor.
- */
- virtual ~GPW_Canvas(void);
-
- virtual void Init(void);
-
- /**
- * Moves the cursor to a new location.
- * @param x The x-coordinate of the new location.
- * @param x The y-coordinate of the new location.
- */
- virtual void SetMousePosition(int x, int y);
-
- /**
- * Sets the cursor shape and/or visibility.
- * @param mousestate The new state ofthe cursor.
- */
- virtual void SetMouseState(RAS_MouseState mousestate);
-
- bool BeginDraw(void);
- void EndDraw(void);
-
- virtual void SwapBuffers(void);
-
- virtual HDC GetHDC(void)
- {
- return m_hDC;
- }
-
- virtual void SetHDC(HDC hDC)
- {
- if (hDC != m_hDC) {
- m_hDC = hDC;
- }
- }
-
- virtual HGLRC GetHGLRC(void)
- {
- return m_hRC;
- }
-
-protected:
- /**
- * Hides the mouse cursor.
- */
- void HideCursor(void);
-
- /**
- * Shows the mouse cursor.
- */
- void ShowCursor(void);
-};
-
-#endif // _GPW_CANVAS_H_
-
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_Engine.cpp b/source/gameengine/GamePlayer/common/windows/GPW_Engine.cpp
deleted file mode 100644
index f5e9f2e767c..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_Engine.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#pragma warning (disable : 4786)
-
-#include <assert.h>
-
-#include "GPC_MouseDevice.h"
-#include "GPC_RenderTools.h"
-#include "GPC_RawImage.h"
-
-#include "GPW_Canvas.h"
-#include "GPW_Engine.h"
-#include "GPW_KeyboardDevice.h"
-#include "GPW_System.h"
-
-
-#include "NG_NetworkScene.h"
-#include "NG_LoopBackNetworkDeviceInterface.h"
-
-GPW_Engine::GPW_Engine(char *customLoadingAnimationURL,
- int foregroundColor, int backgroundColor, int frameRate) :
- GPC_Engine(customLoadingAnimationURL, foregroundColor, backgroundColor,
- frameRate)
-{
-}
-
-
-GPW_Engine::~GPW_Engine()
-{
-}
-
-
-bool GPW_Engine::Initialize(HDC hdc, int width, int height)
-{
- m_keyboarddev = new GPW_KeyboardDevice();
- m_mousedev = new GPC_MouseDevice();
-
- // constructor only initializes data
- m_canvas = new GPW_Canvas(0, hdc, width, height);
- m_canvas->Init(); // create the actual visual and rendering context
-
- // put the Blender logo in the topleft corner
- if(m_BlenderLogo != 0)
- // adding a banner automatically enables them
- m_BlenderLogoId = m_canvas->AddBanner(m_BlenderLogo->Width(), m_BlenderLogo->Height(),
- m_BlenderLogo->Width(), m_BlenderLogo->Height(),
- m_BlenderLogo->Data(), GPC_Canvas::alignTopLeft);
-
- // put the Blender3D logo in the bottom right corner
- if(m_Blender3DLogo != 0)
- // adding a banner automatically enables them
- m_Blender3DLogoId = m_canvas->AddBanner(m_Blender3DLogo->Width(), m_Blender3DLogo->Height(),
- m_Blender3DLogo->Width(), m_Blender3DLogo->Height(),
- m_Blender3DLogo->Data(), GPC_Canvas::alignBottomRight);
-#if 0
- // put the NaN logo in the bottom right corner
- if(m_NaNLogo != 0)
- // adding a banner automatically enables them
- m_NaNLogoId = m_canvas->AddBanner(m_NaNLogo->Width(), m_NaNLogo->Height(),
- m_NaNLogo->Width(), m_NaNLogo->Height(),
- m_NaNLogo->Data(), GPC_Canvas::alignBottomRight);
-#endif
- // enable the display of all banners
- m_canvas->SetBannerDisplayEnabled(true);
-
- // stuff that must be done after creation of a rendering context
- //m_canvas->InitPostRenderingContext();
-
- m_rendertools = new GPC_RenderTools();
-
- m_networkdev = new NG_LoopBackNetworkDeviceInterface();
- assert(m_networkdev);
-
- // creation of system needs 'current rendering context', this is taken care
- // of by the GPW_Canvas
- m_system = new GPW_System();
-
-// m_system->SetKeyboardDevice((GPW_KeyboardDevice *)m_keyboarddev);
-// m_system->SetMouseDevice(m_mousedev);
-// m_system->SetNetworkDevice(m_networkdev);
-
- m_initialized = true;
-
- return m_initialized;
-}
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_Engine.h b/source/gameengine/GamePlayer/common/windows/GPW_Engine.h
deleted file mode 100644
index 8d237073fb0..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_Engine.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __GPW_ENGINE_H
-#define __GPW_ENGINE_H
-
-#include "GPC_Engine.h"
-
-class GPW_Engine : public GPC_Engine
-{
-public:
- GPW_Engine(char *customLoadingAnimation,
- int foregroundColor, int backgroundColor, int frameRate);
- virtual ~GPW_Engine();
- bool Initialize(HDC hdc, int width, int height);
-};
-
-#endif // __GPW_ENGINE_H
-
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.cpp b/source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.cpp
deleted file mode 100644
index 7e8a50915c8..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.cpp
+++ /dev/null
@@ -1,283 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "GPW_KeyboardDevice.h"
-
-// Key code values not found in winuser.h
-#ifndef VK_MINUS
-#define VK_MINUS 0xBD
-#endif // VK_MINUS
-#ifndef VK_SEMICOLON
-#define VK_SEMICOLON 0xBA
-#endif // VK_SEMICOLON
-#ifndef VK_PERIOD
-#define VK_PERIOD 0xBE
-#endif // VK_PERIOD
-#ifndef VK_COMMA
-#define VK_COMMA 0xBC
-#endif // VK_COMMA
-#ifndef VK_QUOTE
-#define VK_QUOTE 0xDE
-#endif // VK_QUOTE
-#ifndef VK_BACK_QUOTE
-#define VK_BACK_QUOTE 0xC0
-#endif // VK_BACK_QUOTE
-#ifndef VK_SLASH
-#define VK_SLASH 0xBF
-#endif // VK_SLASH
-#ifndef VK_BACK_SLASH
-#define VK_BACK_SLASH 0xDC
-#endif // VK_BACK_SLASH
-#ifndef VK_EQUALS
-#define VK_EQUALS 0xBB
-#endif // VK_EQUALS
-#ifndef VK_OPEN_BRACKET
-#define VK_OPEN_BRACKET 0xDB
-#endif // VK_OPEN_BRACKET
-#ifndef VK_CLOSE_BRACKET
-#define VK_CLOSE_BRACKET 0xDD
-#endif // VK_CLOSE_BRACKET
-
-
-
-GPW_KeyboardDevice::GPW_KeyboardDevice(void)
-{
- m_separateLeftRight = false;
- m_separateLeftRightInitialized = false;
-
- m_reverseKeyTranslateTable['A' ] = KX_AKEY ;
- m_reverseKeyTranslateTable['B' ] = KX_BKEY ;
- m_reverseKeyTranslateTable['C' ] = KX_CKEY ;
- m_reverseKeyTranslateTable['D' ] = KX_DKEY ;
- m_reverseKeyTranslateTable['E' ] = KX_EKEY ;
- m_reverseKeyTranslateTable['F' ] = KX_FKEY ;
- m_reverseKeyTranslateTable['G' ] = KX_GKEY ;
- m_reverseKeyTranslateTable['H' ] = KX_HKEY ;
- m_reverseKeyTranslateTable['I' ] = KX_IKEY ;
- m_reverseKeyTranslateTable['J' ] = KX_JKEY ;
- m_reverseKeyTranslateTable['K' ] = KX_KKEY ;
- m_reverseKeyTranslateTable['L' ] = KX_LKEY ;
- m_reverseKeyTranslateTable['M' ] = KX_MKEY ;
- m_reverseKeyTranslateTable['N' ] = KX_NKEY ;
- m_reverseKeyTranslateTable['O' ] = KX_OKEY ;
- m_reverseKeyTranslateTable['P' ] = KX_PKEY ;
- m_reverseKeyTranslateTable['Q' ] = KX_QKEY ;
- m_reverseKeyTranslateTable['R' ] = KX_RKEY ;
- m_reverseKeyTranslateTable['S' ] = KX_SKEY ;
- m_reverseKeyTranslateTable['T' ] = KX_TKEY ;
- m_reverseKeyTranslateTable['U' ] = KX_UKEY ;
- m_reverseKeyTranslateTable['V' ] = KX_VKEY ;
- m_reverseKeyTranslateTable['W' ] = KX_WKEY ;
- m_reverseKeyTranslateTable['X' ] = KX_XKEY ;
- m_reverseKeyTranslateTable['Y' ] = KX_YKEY ;
- m_reverseKeyTranslateTable['Z' ] = KX_ZKEY ;
-
- m_reverseKeyTranslateTable['0' ] = KX_ZEROKEY ;
- m_reverseKeyTranslateTable['1' ] = KX_ONEKEY ;
- m_reverseKeyTranslateTable['2' ] = KX_TWOKEY ;
- m_reverseKeyTranslateTable['3' ] = KX_THREEKEY ;
- m_reverseKeyTranslateTable['4' ] = KX_FOURKEY ;
- m_reverseKeyTranslateTable['5' ] = KX_FIVEKEY ;
- m_reverseKeyTranslateTable['6' ] = KX_SIXKEY ;
- m_reverseKeyTranslateTable['7' ] = KX_SEVENKEY ;
- m_reverseKeyTranslateTable['8' ] = KX_EIGHTKEY ;
- m_reverseKeyTranslateTable['9' ] = KX_NINEKEY ;
-
- // Middle keyboard area keys
- m_reverseKeyTranslateTable[VK_PAUSE ] = KX_PAUSEKEY ;
- m_reverseKeyTranslateTable[VK_INSERT ] = KX_INSERTKEY ;
- m_reverseKeyTranslateTable[VK_DELETE ] = KX_DELKEY ;
- m_reverseKeyTranslateTable[VK_HOME ] = KX_HOMEKEY ;
- m_reverseKeyTranslateTable[VK_END ] = KX_ENDKEY ;
- m_reverseKeyTranslateTable[VK_PRIOR ] = KX_PAGEUPKEY ;
- m_reverseKeyTranslateTable[VK_NEXT ] = KX_PAGEDOWNKEY ;
-
- // Arrow keys
- m_reverseKeyTranslateTable[VK_UP ] = KX_UPARROWKEY ;
- m_reverseKeyTranslateTable[VK_DOWN ] = KX_DOWNARROWKEY ;
- m_reverseKeyTranslateTable[VK_LEFT ] = KX_LEFTARROWKEY ;
- m_reverseKeyTranslateTable[VK_RIGHT ] = KX_RIGHTARROWKEY ;
-
- // Function keys
- m_reverseKeyTranslateTable[VK_F1 ] = KX_F1KEY ;
- m_reverseKeyTranslateTable[VK_F2 ] = KX_F2KEY ;
- m_reverseKeyTranslateTable[VK_F3 ] = KX_F3KEY ;
- m_reverseKeyTranslateTable[VK_F4 ] = KX_F4KEY ;
- m_reverseKeyTranslateTable[VK_F5 ] = KX_F5KEY ;
- m_reverseKeyTranslateTable[VK_F6 ] = KX_F6KEY ;
- m_reverseKeyTranslateTable[VK_F7 ] = KX_F7KEY ;
- m_reverseKeyTranslateTable[VK_F8 ] = KX_F8KEY ;
- m_reverseKeyTranslateTable[VK_F9 ] = KX_F9KEY ;
- m_reverseKeyTranslateTable[VK_F10 ] = KX_F10KEY ;
- m_reverseKeyTranslateTable[VK_F11 ] = KX_F11KEY ;
- m_reverseKeyTranslateTable[VK_F12 ] = KX_F12KEY ;
- m_reverseKeyTranslateTable[VK_F13 ] = KX_F13KEY ;
- m_reverseKeyTranslateTable[VK_F14 ] = KX_F14KEY ;
- m_reverseKeyTranslateTable[VK_F15 ] = KX_F15KEY ;
- m_reverseKeyTranslateTable[VK_F16 ] = KX_F16KEY ;
- m_reverseKeyTranslateTable[VK_F17 ] = KX_F17KEY ;
- m_reverseKeyTranslateTable[VK_F18 ] = KX_F18KEY ;
- m_reverseKeyTranslateTable[VK_F19 ] = KX_F19KEY ;
-
- // Numpad keys
- m_reverseKeyTranslateTable[VK_NUMPAD0 ] = KX_PAD0 ;
- m_reverseKeyTranslateTable[VK_NUMPAD1 ] = KX_PAD1 ;
- m_reverseKeyTranslateTable[VK_NUMPAD2 ] = KX_PAD2 ;
- m_reverseKeyTranslateTable[VK_NUMPAD3 ] = KX_PAD3 ;
- m_reverseKeyTranslateTable[VK_NUMPAD4 ] = KX_PAD4 ;
- m_reverseKeyTranslateTable[VK_NUMPAD5 ] = KX_PAD5 ;
- m_reverseKeyTranslateTable[VK_NUMPAD6 ] = KX_PAD6 ;
- m_reverseKeyTranslateTable[VK_NUMPAD7 ] = KX_PAD7 ;
- m_reverseKeyTranslateTable[VK_NUMPAD8 ] = KX_PAD8 ;
- m_reverseKeyTranslateTable[VK_NUMPAD9 ] = KX_PAD9 ;
- m_reverseKeyTranslateTable[VK_MULTIPLY ] = KX_PADASTERKEY ;
- m_reverseKeyTranslateTable[VK_ADD ] = KX_PADPLUSKEY ;
- m_reverseKeyTranslateTable[VK_DECIMAL ] = KX_PADPERIOD ;
- m_reverseKeyTranslateTable[VK_SUBTRACT ] = KX_PADMINUS ;
- m_reverseKeyTranslateTable[VK_DIVIDE ] = KX_PADSLASHKEY ;
- m_reverseKeyTranslateTable[VK_SEPARATOR ] = KX_PADENTER ;
-
- // Other keys
- m_reverseKeyTranslateTable[VK_CAPITAL ] = KX_CAPSLOCKKEY ;
- m_reverseKeyTranslateTable[VK_ESCAPE ] = KX_ESCKEY ;
- m_reverseKeyTranslateTable[VK_TAB ] = KX_TABKEY ;
- //m_reverseKeyTranslateTable[VK_RETURN ] = KX_RETKEY ;
- m_reverseKeyTranslateTable[VK_SPACE ] = KX_SPACEKEY ;
- m_reverseKeyTranslateTable[VK_RETURN ] = KX_LINEFEEDKEY ;
- m_reverseKeyTranslateTable[VK_BACK ] = KX_BACKSPACEKEY ;
- m_reverseKeyTranslateTable[VK_SEMICOLON ] = KX_SEMICOLONKEY ;
- m_reverseKeyTranslateTable[VK_PERIOD ] = KX_PERIODKEY ;
- m_reverseKeyTranslateTable[VK_COMMA ] = KX_COMMAKEY ;
- m_reverseKeyTranslateTable[VK_QUOTE ] = KX_QUOTEKEY ;
- m_reverseKeyTranslateTable[VK_BACK_QUOTE ] = KX_ACCENTGRAVEKEY ;
- m_reverseKeyTranslateTable[VK_MINUS ] = KX_MINUSKEY ;
- m_reverseKeyTranslateTable[VK_SLASH ] = KX_SLASHKEY ;
- m_reverseKeyTranslateTable[VK_BACK_SLASH ] = KX_BACKSLASHKEY ;
- m_reverseKeyTranslateTable[VK_EQUALS ] = KX_EQUALKEY ;
- m_reverseKeyTranslateTable[VK_OPEN_BRACKET ] = KX_LEFTBRACKETKEY ;
- m_reverseKeyTranslateTable[VK_CLOSE_BRACKET ] = KX_RIGHTBRACKETKEY ;
-
- /*
- * Need to handle Ctrl, Alt and Shift keys differently.
- * Win32 messages do not discriminate left and right keys.
- */
- m_reverseKeyTranslateTable[VK_LCONTROL ] = KX_LEFTCTRLKEY ;
- m_reverseKeyTranslateTable[VK_RCONTROL ] = KX_RIGHTCTRLKEY ;
- m_reverseKeyTranslateTable[VK_LMENU ] = KX_LEFTALTKEY ;
- m_reverseKeyTranslateTable[VK_RMENU ] = KX_RIGHTALTKEY ;
- m_reverseKeyTranslateTable[VK_RSHIFT ] = KX_RIGHTSHIFTKEY ;
- m_reverseKeyTranslateTable[VK_LSHIFT ] = KX_LEFTSHIFTKEY ;
-}
-
-
-GPW_KeyboardDevice::~GPW_KeyboardDevice(void)
-{
-}
-
-
-void GPW_KeyboardDevice::ConvertWinEvent(WPARAM wParam, bool isDown)
-{
- if ((wParam == VK_SHIFT) || (wParam == VK_MENU) || (wParam == VK_CONTROL)) {
- ConvertModifierKey(wParam, isDown);
- }
- else {
- ConvertEvent(wParam, isDown);
- }
-}
-
-
-void GPW_KeyboardDevice::ConvertModifierKey(WPARAM wParam, bool isDown)
-{
- /*
- GetKeyState and GetAsyncKeyState only work with Win95, Win98, NT4,
- Terminal Server and Windows 2000.
- But on WinME it always returns zero. These two functions are simply
- skipped by Millenium Edition!
-
- Official explanation from Microsoft:
- Intentionally disabled.
- It didn't work all that well on some newer hardware, and worked less
- well with the passage of time, so it was fully disabled in ME.
- */
- if (!m_separateLeftRightInitialized && isDown) {
- CheckForSeperateLeftRight(wParam);
- }
- if (m_separateLeftRight) {
- bool down = HIBYTE(::GetKeyState(VK_LSHIFT)) != 0;
- ConvertEvent(VK_LSHIFT, down);
- down = HIBYTE(::GetKeyState(VK_RSHIFT)) != 0;
- ConvertEvent(VK_RSHIFT, down);
- down = HIBYTE(::GetKeyState(VK_LMENU)) != 0;
- ConvertEvent(VK_LMENU, down);
- down = HIBYTE(::GetKeyState(VK_RMENU)) != 0;
- ConvertEvent(VK_RMENU, down);
- down = HIBYTE(::GetKeyState(VK_LCONTROL)) != 0;
- ConvertEvent(VK_LCONTROL, down);
- down = HIBYTE(::GetKeyState(VK_RCONTROL)) != 0;
- ConvertEvent(VK_RCONTROL, down);
- }
- else {
- bool down = HIBYTE(::GetKeyState(VK_SHIFT)) != 0;
- ConvertEvent(VK_LSHIFT, down);
- ConvertEvent(VK_RSHIFT, down);
- down = HIBYTE(::GetKeyState(VK_MENU)) != 0;
- ConvertEvent(VK_LMENU, down);
- ConvertEvent(VK_RMENU, down);
- down = HIBYTE(::GetKeyState(VK_CONTROL)) != 0;
- ConvertEvent(VK_LCONTROL, down);
- ConvertEvent(VK_RCONTROL, down);
- }
-}
-
-
-void GPW_KeyboardDevice::CheckForSeperateLeftRight(WPARAM wParam)
-{
- // Check whether this system supports separate left and right keys
- switch (wParam) {
- case VK_SHIFT:
- m_separateLeftRight =
- (HIBYTE(::GetKeyState(VK_LSHIFT)) != 0) ||
- (HIBYTE(::GetKeyState(VK_RSHIFT)) != 0) ?
- true : false;
- break;
- case VK_CONTROL:
- m_separateLeftRight =
- (HIBYTE(::GetKeyState(VK_LCONTROL)) != 0) ||
- (HIBYTE(::GetKeyState(VK_RCONTROL)) != 0) ?
- true : false;
- break;
- case VK_MENU:
- m_separateLeftRight =
- (HIBYTE(::GetKeyState(VK_LMENU)) != 0) ||
- (HIBYTE(::GetKeyState(VK_RMENU)) != 0) ?
- true : false;
- break;
- }
- m_separateLeftRightInitialized = true;
-}
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.h b/source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.h
deleted file mode 100644
index e47ce32c44c..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef _GPW_KEYBOARDDEVICE_H_
-#define _GPW_KEYBOARDDEVICE_H_
-
-#pragma warning (disable : 4786)
-
-#include <windows.h>
-#include "GPC_KeyboardDevice.h"
-
-/**
- * Win32 implementation of GPC_KeyboardDevice.
- * The contructor fills the keyboard code translation map.
- * Base class GPC_KeyboardDevice does the rest.
- * @see SCA_IInputDevice
- */
-class GPW_KeyboardDevice : public GPC_KeyboardDevice
-{
-public:
- GPW_KeyboardDevice(void);
-
- virtual ~GPW_KeyboardDevice(void);
-
- void ConvertWinEvent(WPARAM wParam, bool isDown);
-
-protected:
-
- void ConvertModifierKey(WPARAM wParam, bool isDown);
-
- void CheckForSeperateLeftRight(WPARAM wParam);
-
- /** Stores the capability of this system to distinguish left and right modifier keys. */
- bool m_separateLeftRight;
- /** Stores the initialization state of the member m_leftRightDistinguishable. */
- bool m_separateLeftRightInitialized;
-};
-
-#endif //_GPW_KEYBOARDDEVICE_H_
-
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_System.cpp b/source/gameengine/GamePlayer/common/windows/GPW_System.cpp
deleted file mode 100644
index 4f4a48a52f1..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_System.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * Timing routine taken and modified from KX_BlenderSystem.cpp
- */
-
-#include <windows.h>
-#include "GPW_System.h"
-
-GPW_System::GPW_System(void)
-{
- m_freq = 0;
- m_lastCount = 0;
- m_lastRest = 0;
- m_lastTime = 0;
-}
-
-
-double GPW_System::GetTimeInSeconds()
-{
-#if 0
- double secs = ::GetTickCount();
- secs /= 1000.;
- return secs;
-#else
-
- // 03/20/1999 Thomas Hieber: completely redone to get true Millisecond
- // accuracy instead of very rough ticks. This routine will also provide
- // correct wrap around at the end of "long"
-
- // m_freq was set to -1, if the current Hardware does not support
- // high resolution timers. We will use GetTickCount instead then.
- if (m_freq < 0) {
- return ::GetTickCount();
- }
-
- // m_freq is 0, the first time this function is being called.
- if (m_freq == 0) {
- // Try to determine the frequency of the high resulution timer
- if (!::QueryPerformanceFrequency((LARGE_INTEGER*)&m_freq)) {
- // There is no such timer....
- m_freq = -1;
- return 0;
- }
- }
-
- // Retrieve current count
- __int64 count = 0;
- ::QueryPerformanceCounter((LARGE_INTEGER*)&count);
-
- // Calculate the time passed since last call, and add the rest of
- // those tics that didn't make it into the last reported time.
- __int64 delta = 1000*(count-m_lastCount) + m_lastRest;
-
- m_lastTime += (long)(delta/m_freq); // Save the new value
- m_lastRest = delta%m_freq; // Save those ticks not being counted
- m_lastCount = count; // Save last count
-
- // Return a high quality measurement of time
- return m_lastTime/1000.0;
-#endif
-}
-
-
diff --git a/source/gameengine/GamePlayer/common/windows/GPW_System.h b/source/gameengine/GamePlayer/common/windows/GPW_System.h
deleted file mode 100644
index bd9a0cd709f..00000000000
--- a/source/gameengine/GamePlayer/common/windows/GPW_System.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * Timing routine taken and modified from KX_BlenderSystem.cpp
- */
-
-#ifndef _GPW_SYSTEM_H_
-#define _GPW_SYSTEM_H_
-
-#pragma warning (disable:4786) // suppress stl-MSVC debug info warning
-
-#include "GPC_System.h"
-
-#if defined(__CYGWIN32__)
-# define __int64 long long
-#endif
-
-class GPW_System : public GPC_System
-{
-public:
- GPW_System();
-
- virtual double GetTimeInSeconds();
-protected:
-
- __int64 m_freq;
- __int64 m_lastCount;
- __int64 m_lastRest;
- long m_lastTime;
-
-};
-
-#endif //_GPW_SYSTEM_H_
-
diff --git a/source/gameengine/GamePlayer/common/windows/Makefile b/source/gameengine/GamePlayer/common/windows/Makefile
deleted file mode 100644
index 200f84dd3e6..00000000000
--- a/source/gameengine/GamePlayer/common/windows/Makefile
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-# ATTENTION: this Makefile is only used for win builds!
-
-LIBNAME = windows
-DIR = $(OCGDIR)/gameengine/GamePlayer/common/$(LIBNAME)
-
-include nan_compile.mk
-
-CPPFLAGS += -I..
-CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-
-CPPFLAGS += -I$(SRCHOME)/gameengine/GameLogic
-CPPFLAGS += -I$(SRCHOME)/gameengine/Rasterizer
-CPPFLAGS += -I$(SRCHOME)/gameengine/Ketsji
-CPPFLAGS += -I$(SRCHOME)/gameengine/Network
-CPPFLAGS += -I$(SRCHOME)/gameengine/Network/LoopBackNetwork
-
-CPPFLAGS += -I$(SRCHOME)/gameengine/Physics/Sumo/Fuzzics/include
-CPPFLAGS += -I$(SRCHOME)/gameengine/Physics/Sumo/include
-
-CPPFLAGS += -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_STRING)/include
-CPPFLAGS += -I$(NAN_GLEW)/include
-
-# Blender stuff
-CPPFLAGS += -I$(SRCHOME)/blender/blenkernel
-CPPFLAGS += -I$(SRCHOME)/blender/blenlib
-CPPFLAGS += -I$(SRCHOME)/blender/blenloader
-CPPFLAGS += -I$(SRCHOME)/blender/imbuf
-CPPFLAGS += -I$(SRCHOME)/blender/makesdna
-CPPFLAGS += -I$(SRCHOME)/kernel/gen_system
-
-CPPFLAGS += -I../../kernel/gen_system
-