aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cryo/cryolib.cpp16
-rw-r--r--engines/cryo/cryolib.h8
-rw-r--r--engines/cryo/eden.cpp14
3 files changed, 22 insertions, 16 deletions
diff --git a/engines/cryo/cryolib.cpp b/engines/cryo/cryolib.cpp
index 0f931d3ced..368699e632 100644
--- a/engines/cryo/cryolib.cpp
+++ b/engines/cryo/cryolib.cpp
@@ -59,7 +59,7 @@ View::View(CryoEngine *vm, int w, int h) : _vm(vm) {
void *buffer = (byte *)malloc(w * h);
if (buffer) {
_allocated = true;
- CLView_InitDatas(w, h, buffer);
+ initDatas(w, h, buffer);
} else
error("Unable to allocate view buffer");
}
@@ -69,17 +69,20 @@ View::~View() {
free(_bufferPtr);
}
-void View::CLView_SetSrcZoomValues(int x, int y) {
+// Original name: CLView_SetSrcZoomValues
+void View::setSrcZoomValues(int x, int y) {
_zoom._srcLeft = x;
_zoom._srcTop = y;
}
-void View::CLView_SetDisplayZoomValues(int w, int h) {
+// Original name: CLView_SetDisplayZoomValues
+void View::setDisplayZoomValues(int w, int h) {
_zoom._width = w;
_zoom._height = h;
}
-void View::CLView_InitDatas(int w, int h, void *buffer) {
+// Original name: CLView_InitDatas
+void View::initDatas(int w, int h, void *buffer) {
_bufferPtr = (byte *)buffer;
_width = w;
_height = h;
@@ -99,7 +102,8 @@ void View::CLView_InitDatas(int w, int h, void *buffer) {
_zoom._height = h;
}
-void View::CLView_CenterIn(View *parent) {
+// Original name: CLView_CenterIn
+void View::centerIn(View *parent) {
_normal._dstLeft = (parent->_width - _normal._width) / 2;
_normal._dstTop = (parent->_height - _normal._height) / 2;
_zoom._dstLeft = (parent->_width - _zoom._width) / 2;
@@ -427,7 +431,7 @@ void CLTimer_Action(void *arg) {
///// CRYOLib
void CRYOLib_ManagersInit() {
g_system->getTimerManager()->installTimerProc(CLTimer_Action, 10000, nullptr, "100hz timer");
- g_ed->ScreenView->CLView_InitDatas(g_ed->_screen.w, g_ed->_screen.h, g_ed->_screen.getPixels());
+ g_ed->ScreenView->initDatas(g_ed->_screen.w, g_ed->_screen.h, g_ed->_screen.getPixels());
}
void CRYOLib_ManagersDone() {
diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h
index bf1d9e2174..7e1ec1a338 100644
--- a/engines/cryo/cryolib.h
+++ b/engines/cryo/cryolib.h
@@ -71,10 +71,10 @@ 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);
+ void setSrcZoomValues(int x, int y);
+ void setDisplayZoomValues(int w, int h);
+ void initDatas(int w, int h, void *buffer);
+ void centerIn(View *parent);
int _width;
int _height;
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index 9471b355ab..6db7d5b102 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -3649,11 +3649,13 @@ void EdenGame::tyranDies(perso_t *perso) {
}
void EdenGame::SpecialObjets(perso_t *perso, char objid) {
+#pragma pack(push, 1)
struct SpecialObject {
int8 _characterType;
int8 _objectId;
void (EdenGame::*dispFct)(perso_t *perso);
};
+#pragma pack(pop)
static SpecialObject kSpecialObjectActions[] = {
// persoType, objectId, dispFct
@@ -5557,9 +5559,9 @@ void EdenGame::openwindow() {
p_mainview = new View(_vm, 640, 200);
p_mainview->_normal._width = 320;
CLBlitter_FillView(p_mainview, 0xFFFFFFFF);
- p_mainview->CLView_SetSrcZoomValues(0, 0);
- p_mainview->CLView_SetDisplayZoomValues(640, 400);
- p_mainview->CLView_CenterIn(_vm->ScreenView);
+ p_mainview->setSrcZoomValues(0, 0);
+ p_mainview->setDisplayZoomValues(640, 400);
+ p_mainview->centerIn(_vm->ScreenView);
p_mainview_buf = p_mainview->_bufferPtr;
mouse_x_center = p_mainview->_normal._dstLeft + p_mainview->_normal._width / 2;
@@ -6232,9 +6234,9 @@ void EdenGame::showMovie(char arg1) {
bool playing = true;
_vm->_video->allocMemory(_hnmContext);
p_hnmview = new View(_vm, _hnmContext->_header._width, _hnmContext->_header._height);
- p_hnmview->CLView_SetSrcZoomValues(0, 0);
- p_hnmview->CLView_SetDisplayZoomValues(_hnmContext->_header._width * 2, _hnmContext->_header._height * 2);
- p_hnmview->CLView_CenterIn(_vm->ScreenView);
+ p_hnmview->setSrcZoomValues(0, 0);
+ p_hnmview->setDisplayZoomValues(_hnmContext->_header._width * 2, _hnmContext->_header._height * 2);
+ p_hnmview->centerIn(_vm->ScreenView);
p_hnmview_buf = p_hnmview->_bufferPtr;
if (arg1) {
p_hnmview->_normal._height = 160;