aboutsummaryrefslogtreecommitdiff
path: root/engines/cryo/cryolib.h
diff options
context:
space:
mode:
authorStrangerke2016-11-30 22:51:15 -0800
committerEugene Sandulenko2017-01-25 22:42:10 +0100
commitbe3e74882986c8fb2cb164cf5e3dfbb777396e4a (patch)
tree7c13cdbd2936aed80a7a61c40e91b18bbd550390 /engines/cryo/cryolib.h
parent1e3e2b992b8bb51eeb81b75b93fe943b903033e4 (diff)
downloadscummvm-rg350-be3e74882986c8fb2cb164cf5e3dfbb777396e4a.tar.gz
scummvm-rg350-be3e74882986c8fb2cb164cf5e3dfbb777396e4a.tar.bz2
scummvm-rg350-be3e74882986c8fb2cb164cf5e3dfbb777396e4a.zip
CRYO: Objectify View
Diffstat (limited to 'engines/cryo/cryolib.h')
-rw-r--r--engines/cryo/cryolib.h28
1 files changed, 18 insertions, 10 deletions
diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h
index 7af53a1c7f..1c84929cc5 100644
--- a/engines/cryo/cryolib.h
+++ b/engines/cryo/cryolib.h
@@ -30,6 +30,8 @@
namespace Cryo {
+class CryoEngine;
+
#define SW16(n) ( (((n) & 0xFF) << 8) | (((n) >> 8) & 0xFF) )
#define SW32(n) ( (((n) & 0xFF) << 24) | (((n) >> 24) & 0xFF) | (((n) & 0xFF00) << 8) | (((n) >> 8) & 0xFF00))
#if 0
@@ -61,13 +63,26 @@ struct BlitView{
int _height;
};
-struct View {
- byte *_bufferPtr;
+class View {
+private:
+ CryoEngine *_vm;
+
+ bool _allocated;
+
+public:
+ View(CryoEngine *vm, int w, int h);
+ ~View();
+
+ void CLView_SetSrcZoomValues(int x, int y);
+ void CLView_SetDisplayZoomValues(int w, int h);
+ void CLView_InitDatas(int w, int h, void *buffer);
+ void CLView_CenterIn(View *parent);
+
int _width;
int _height;
+ byte *_bufferPtr;
int16 _pitch;
bool _doubled;
- bool _allocated;
BlitView _normal;
BlitView _zoom;
};
@@ -217,13 +232,6 @@ void CLMouse_GetPosition(int16 *x, int16 *y);
void CLMouse_SetPosition(int16 x, int16 y);
uint16 CLMouse_IsDown();
-void CLView_SetSrcZoomValues(View *view, int x, int y);
-void CLView_SetDisplayZoomValues(View *view, int w, int h);
-void CLView_Free(View *view);
-void CLView_InitDatas(View *view, int w, int h, void *buffer);
-View *CLView_New(int w, int h);
-void CLView_CenterIn(View *parent, View *child);
-
void CRYOLib_ManagersInit();
void CRYOLib_ManagersDone();