diff options
author | Matthew Hoops | 2012-03-20 14:18:57 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-03-20 14:49:16 -0400 |
commit | 71756bdf4eae5ba9cc3f329b85e894f04640aaef (patch) | |
tree | 40d464262da107ab5eed82f198685209161ebac1 /backends/platform/iphone/iphone_video.h | |
parent | 03eba05b09e5c9e5a351f8111185934b92a3fed3 (diff) | |
parent | 3c3576a224b92c703b4e8ea20008ac8a069980dd (diff) | |
download | scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.gz scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.bz2 scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'backends/platform/iphone/iphone_video.h')
-rw-r--r-- | backends/platform/iphone/iphone_video.h | 79 |
1 files changed, 51 insertions, 28 deletions
diff --git a/backends/platform/iphone/iphone_video.h b/backends/platform/iphone/iphone_video.h index 223f025978..1405fe35f1 100644 --- a/backends/platform/iphone/iphone_video.h +++ b/backends/platform/iphone/iphone_video.h @@ -20,48 +20,69 @@ * */ -#ifndef _IPHONE_VIDEO__H -#define _IPHONE_VIDEO__H +#ifndef BACKENDS_PLATFORM_IPHONE_IPHONE_VIDEO_H +#define BACKENDS_PLATFORM_IPHONE_IPHONE_VIDEO_H -#import <UIKit/UIKit.h> -#import <Foundation/Foundation.h> -#import <QuartzCore/QuartzCore.h> +#include <UIKit/UIKit.h> +#include <Foundation/Foundation.h> +#include <QuartzCore/QuartzCore.h> -#import <OpenGLES/EAGL.h> -#import <OpenGLES/ES1/gl.h> -#import <OpenGLES/ES1/glext.h> +#include <OpenGLES/EAGL.h> +#include <OpenGLES/ES1/gl.h> +#include <OpenGLES/ES1/glext.h> -#import "iphone_keyboard.h" +#include "iphone_keyboard.h" +#include "iphone_common.h" -@interface iPhoneView : UIView -{ - void* _screenSurface; - NSMutableArray* _events; - SoftKeyboard* _keyboardView; - CALayer* _screenLayer; +@interface iPhoneView : UIView { + VideoContext _videoContext; - int _widthOffset; - int _heightOffset; + NSMutableArray *_events; + SoftKeyboard *_keyboardView; - EAGLContext* _context; + EAGLContext *_context; GLuint _viewRenderbuffer; GLuint _viewFramebuffer; - GLint _backingWidth; - GLint _backingHeight; - GLint _visibleWidth; - GLint _visibleHeight; GLuint _screenTexture; GLuint _overlayTexture; GLuint _mouseCursorTexture; + + 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; + + GLfloat _mouseVertCoords[4 * 2]; + GLfloat _mouseTexCoords[4 * 2]; + GLint _mouseHotspotX, _mouseHotspotY; + GLint _mouseWidth, _mouseHeight; + GLfloat _mouseScaleX, _mouseScaleY; + + int _scaledShakeOffsetY; + + UITouch *_firstTouch; + UITouch *_secondTouch; } - (id)initWithFrame:(struct CGRect)frame; -- (void)drawRect:(CGRect)frame; +- (VideoContext *)getVideoContext; -- (void *)getSurface; +- (void)drawRect:(CGRect)frame; +- (void)createScreenTexture; - (void)initSurface; +- (void)setViewTransformation; + +- (void)setGraphicsMode; - (void)updateSurface; - (void)updateMainSurface; @@ -69,11 +90,13 @@ - (void)updateMouseSurface; - (void)clearColorBuffer; --(void)updateMouseCursor; +- (void)notifyMouseMove; +- (void)updateMouseCursorScaling; +- (void)updateMouseCursor; - (id)getEvent; -- (void)deviceOrientationChanged:(int)orientation; +- (void)deviceOrientationChanged:(UIDeviceOrientation)orientation; - (void)applicationSuspend; @@ -81,6 +104,6 @@ @end +extern iPhoneView *g_iPhoneViewInstance; - -#endif /* _IPHONE_VIDEO__H */ +#endif |