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
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt1
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp12
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp16
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Canvas.h4
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp14
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_System.cpp4
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp8
-rw-r--r--source/gameengine/GamePlayer/ghost/Makefile2
8 files changed, 31 insertions, 30 deletions
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index 848c2f73f06..8164878762c 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -73,4 +73,3 @@ IF(WITH_FFMPEG)
ENDIF(WITH_FFMPEG)
BLENDERLIB_NOLIST(gp_ghost "${SRC}" "${INC}")
-#env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = [], libtype='player',priority=0, compileflags=cflags)
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 43b26cf9a06..71507642226 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -28,10 +28,6 @@
* GHOST Blender Player application implementation file.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifdef WIN32
#pragma warning (disable:4786) // suppress stl-MSVC debug info warning
#include <windows.h>
@@ -677,7 +673,8 @@ bool GPG_Application::startEngine(void)
m_mouse,
m_networkdevice,
startscenename,
- m_startScene);
+ m_startScene,
+ m_canvas);
#ifndef DISABLE_PYTHON
// some python things
@@ -797,10 +794,7 @@ void GPG_Application::exitEngine()
m_canvas = 0;
}
- libtiff_exit();
-#ifdef WITH_QUICKTIME
- quicktime_exit();
-#endif
+ IMB_exit();
GPU_extensions_exit();
m_exitRequested = 0;
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp b/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp
index 0a96fbbe503..24c0102a87c 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp
@@ -31,10 +31,6 @@
#include <assert.h>
#include "GHOST_ISystem.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
GPG_Canvas::GPG_Canvas(GHOST_IWindow* window)
: GPC_Canvas(0, 0), m_window(window)
{
@@ -79,6 +75,8 @@ void GPG_Canvas::SetMousePosition(int x, int y)
void GPG_Canvas::SetMouseState(RAS_MouseState mousestate)
{
+ m_mousestate = mousestate;
+
if (m_window)
{
switch (mousestate)
@@ -106,3 +104,13 @@ void GPG_Canvas::SwapBuffers()
m_window->swapBuffers();
}
}
+
+float GPG_Canvas::GetMouseNormalizedX(int x)
+{
+ return float(x)/this->GetWidth();
+}
+
+float GPG_Canvas::GetMouseNormalizedY(int y)
+{
+ return float(y)/this->GetHeight();
+}
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Canvas.h b/source/gameengine/GamePlayer/ghost/GPG_Canvas.h
index 18e58691d2c..7b19c03d3c3 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Canvas.h
+++ b/source/gameengine/GamePlayer/ghost/GPG_Canvas.h
@@ -53,6 +53,10 @@ public:
virtual void SetMousePosition(int x, int y);
virtual void SetMouseState(RAS_MouseState mousestate);
virtual void SwapBuffers();
+ virtual int GetMouseX(int x){return x;};
+ virtual int GetMouseY(int y){return y;};
+ virtual float GetMouseNormalizedX(int x);
+ virtual float GetMouseNormalizedY(int y);
bool BeginDraw() { return true;};
void EndDraw() {};
diff --git a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
index 243322b715d..2e9810ad0ae 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
@@ -30,10 +30,6 @@
#include "GPG_KeyboardDevice.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
GPG_KeyboardDevice::GPG_KeyboardDevice(void)
{
m_reverseKeyTranslateTable[GHOST_kKeyA ] = KX_AKEY ;
@@ -101,7 +97,15 @@ GPG_KeyboardDevice::GPG_KeyboardDevice(void)
m_reverseKeyTranslateTable[GHOST_kKeyF9 ] = KX_F9KEY ;
m_reverseKeyTranslateTable[GHOST_kKeyF10 ] = KX_F10KEY ;
m_reverseKeyTranslateTable[GHOST_kKeyF11 ] = KX_F11KEY ;
- m_reverseKeyTranslateTable[GHOST_kKeyF12 ] = KX_F12KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF12 ] = KX_F12KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF13 ] = KX_F13KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF14 ] = KX_F14KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF15 ] = KX_F15KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF16 ] = KX_F16KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF17 ] = KX_F17KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF18 ] = KX_F18KEY ;
+ m_reverseKeyTranslateTable[GHOST_kKeyF19 ] = KX_F19KEY ;
+
// Numpad keys
m_reverseKeyTranslateTable[GHOST_kKeyNumpad0 ] = KX_PAD0 ;
diff --git a/source/gameengine/GamePlayer/ghost/GPG_System.cpp b/source/gameengine/GamePlayer/ghost/GPG_System.cpp
index d57b90dfff1..94756ec4ed5 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_System.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_System.cpp
@@ -32,10 +32,6 @@
#include <assert.h>
#include "GHOST_ISystem.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
GPG_System::GPG_System(GHOST_ISystem* system)
: m_system(system)
{
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 9d87adb7400..9cdee2a340c 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -376,11 +376,7 @@ int main(int argc, char** argv)
GEN_init_messaging_system();
-#ifdef WITH_QUICKTIME
- quicktime_init();
-#endif
-
- libtiff_init();
+ IMB_init();
// Parse command line options
#ifndef NDEBUG
@@ -664,7 +660,7 @@ int main(int argc, char** argv)
system->getMainDisplayDimensions(fullScreenWidth, fullScreenHeight);
// process first batch of events. If the user
// drops a file on top off the blenderplayer icon, we
- // recieve an event with the filename
+ // receive an event with the filename
system->processEvents(0);
diff --git a/source/gameengine/GamePlayer/ghost/Makefile b/source/gameengine/GamePlayer/ghost/Makefile
index a7fcf46b695..b2fcd2ac1ff 100644
--- a/source/gameengine/GamePlayer/ghost/Makefile
+++ b/source/gameengine/GamePlayer/ghost/Makefile
@@ -15,7 +15,7 @@
#
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 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.