Skip to content

Commit

Permalink
IPHONE: Move some global variables to iPhoneView.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Feb 24, 2012
1 parent 5863f6a commit d93e155
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 7 additions & 0 deletions backends/platform/iphone/iphone_video.h
Expand Up @@ -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;
Expand Down
10 changes: 2 additions & 8 deletions backends/platform/iphone/iphone_video.mm
Expand Up @@ -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;
Expand Down Expand Up @@ -203,6 +195,8 @@ - (id)initWithFrame:(struct CGRect)frame {
_overlayTexture = 0;
_mouseCursorTexture = 0;

_scaledShakeOffsetY = 0;

_gameScreenVertCoords[0] = _gameScreenVertCoords[1] =
_gameScreenVertCoords[2] = _gameScreenVertCoords[3] =
_gameScreenVertCoords[4] = _gameScreenVertCoords[5] =
Expand Down

0 comments on commit d93e155

Please sign in to comment.