From 1bc9155cb70f4e9bef8222d8b9f4dbc49c650efd Mon Sep 17 00:00:00 2001 From: Dries Harnie Date: Tue, 3 Jul 2012 20:02:57 +0200 Subject: [PATCH] EMI: Move _current{Quat,Pos} up to GfxBase --- engines/grim/gfx_base.cpp | 4 +++- engines/grim/gfx_base.h | 3 +++ engines/grim/gfx_opengl.h | 4 ---- engines/grim/gfx_tinygl.h | 4 ---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/engines/grim/gfx_base.cpp b/engines/grim/gfx_base.cpp index 7241ead7c0e..a7f8b82a218 100644 --- a/engines/grim/gfx_base.cpp +++ b/engines/grim/gfx_base.cpp @@ -28,7 +28,9 @@ namespace Grim { GfxBase::GfxBase() : _renderBitmaps(true), _renderZBitmaps(true), - _shadowModeActive(false) { + _shadowModeActive(false), + _currentPos(0,0,0), + _currentQuat(0,0,0,1) { } diff --git a/engines/grim/gfx_base.h b/engines/grim/gfx_base.h index 3950a89d3a4..d9e6a5c4708 100644 --- a/engines/grim/gfx_base.h +++ b/engines/grim/gfx_base.h @@ -24,6 +24,7 @@ #define GRIM_GFX_BASE_H #include "math/vector3d.h" +#include "math/quat.h" #include "graphics/pixelformat.h" @@ -269,6 +270,8 @@ protected: bool _shadowModeActive; Graphics::PixelFormat _pixelFormat; SpecialtyMaterial _specialty[8]; + Math::Vector3d _currentPos; + Math::Quaternion _currentQuat; }; // Factory-like functions: diff --git a/engines/grim/gfx_opengl.h b/engines/grim/gfx_opengl.h index 14bf9468005..8215971891c 100644 --- a/engines/grim/gfx_opengl.h +++ b/engines/grim/gfx_opengl.h @@ -24,7 +24,6 @@ #define GRIM_GFX_OPENGL_H #include "engines/grim/gfx_base.h" -#include "math/quat.h" #ifdef USE_OPENGL @@ -139,9 +138,6 @@ private: GLuint _dimFragProgram; GLint _maxLights; float _alpha; - - Math::Vector3d _currentPos; - Math::Quaternion _currentQuat; }; } // end of namespace Grim diff --git a/engines/grim/gfx_tinygl.h b/engines/grim/gfx_tinygl.h index f615aa860f3..1414bbce16e 100644 --- a/engines/grim/gfx_tinygl.h +++ b/engines/grim/gfx_tinygl.h @@ -24,7 +24,6 @@ #define GRIM_GFX_TINYGL_H #include "engines/grim/gfx_base.h" -#include "math/quat.h" #include "graphics/tinygl/zgl.h" @@ -132,9 +131,6 @@ private: Graphics::PixelBuffer _storedDisplay; float _alpha; - Math::Vector3d _currentPos; - Math::Quaternion _currentQuat; - void readPixels(int x, int y, int width, int height, uint8 *buffer); void blit(const Graphics::PixelFormat &format, BlitImage *blit, byte *dst, byte *src, int x, int y, int width, int height, bool trans); };