aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-24 01:02:29 +0100
committerJohannes Schickel2012-02-24 01:02:29 +0100
commitd93e1558fca1a13d71e588189c309b4daec8d150 (patch)
tree3bf54e14ea179341c8c864421621f80567d65870 /backends
parent5863f6a5565b22f6e92c1e1254d8e12651d24de4 (diff)
downloadscummvm-rg350-d93e1558fca1a13d71e588189c309b4daec8d150.tar.gz
scummvm-rg350-d93e1558fca1a13d71e588189c309b4daec8d150.tar.bz2
scummvm-rg350-d93e1558fca1a13d71e588189c309b4daec8d150.zip
IPHONE: Move some global variables to iPhoneView.
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/iphone/iphone_video.h7
-rw-r--r--backends/platform/iphone/iphone_video.mm10
2 files changed, 9 insertions, 8 deletions
diff --git a/backends/platform/iphone/iphone_video.h b/backends/platform/iphone/iphone_video.h
index 1d9d7e7d35..4d6d906a3c 100644
--- a/backends/platform/iphone/iphone_video.h
+++ b/backends/platform/iphone/iphone_video.h
@@ -49,11 +49,18 @@
UIDeviceOrientation _orientation;
+ GLint _renderBufferWidth;
+ GLint _renderBufferHeight;
+
GLfloat _gameScreenVertCoords[4 * 2];
GLfloat _gameScreenTexCoords[4 * 2];
+ CGRect _gameScreenRect;
GLfloat _overlayVertCoords[4 * 2];
GLfloat _overlayTexCoords[4 * 2];
+ CGRect _overlayRect;
+
+ int _scaledShakeOffsetY;
}
- (id)initWithFrame:(struct CGRect)frame;
diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm
index d7511c56d4..621238d1c2 100644
--- a/backends/platform/iphone/iphone_video.mm
+++ b/backends/platform/iphone/iphone_video.mm
@@ -30,20 +30,12 @@
iPhoneView *g_iPhoneViewInstance = nil;
static int _fullWidth;
static int _fullHeight;
-static CGRect _gameScreenRect;
-
-static CGRect _overlayRect;
static int _needsScreenUpdate = 0;
static UITouch *_firstTouch = NULL;
static UITouch *_secondTouch = NULL;
-static GLint _renderBufferWidth;
-static GLint _renderBufferHeight;
-
-static int _scaledShakeOffsetY;
-
#if 0
static long lastTick = 0;
static int frames = 0;
@@ -203,6 +195,8 @@ const char *iPhone_getDocumentsDir() {
_overlayTexture = 0;
_mouseCursorTexture = 0;
+ _scaledShakeOffsetY = 0;
+
_gameScreenVertCoords[0] = _gameScreenVertCoords[1] =
_gameScreenVertCoords[2] = _gameScreenVertCoords[3] =
_gameScreenVertCoords[4] = _gameScreenVertCoords[5] =