HOPKINS: Merge two zoom in and out functions

This commit is contained in:
Strangerke 2012-12-15 22:46:09 +01:00
parent 0ec1994adc
commit d7d8c19dae
6 changed files with 101 additions and 105 deletions

View file

@ -460,17 +460,17 @@ LABEL_65:
_vm->_graphicsManager.DD_Lock();
if (_vm->_graphicsManager.SDL_ECHELLE) {
if (_vm->_graphicsManager.Winbpp == 2) {
int v5 = _vm->_graphicsManager.Reel_Zoom(0x14u, _vm->_graphicsManager.SDL_ECHELLE);
int v5 = _vm->_graphicsManager.zoomIn(0x14u, _vm->_graphicsManager.SDL_ECHELLE);
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, v5);
} else {
int v6 = _vm->_graphicsManager.Reel_Zoom(0x14u, _vm->_graphicsManager.SDL_ECHELLE);
int v6 = _vm->_graphicsManager.zoomIn(0x14u, _vm->_graphicsManager.SDL_ECHELLE);
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, v6);
}
_vm->_graphicsManager.DD_Unlock();
_vm->_graphicsManager.dstrect[0].left = _vm->_graphicsManager.Reel_Zoom(0, _vm->_graphicsManager.SDL_ECHELLE);
_vm->_graphicsManager.dstrect[0].top = _vm->_graphicsManager.Reel_Zoom(0x14u, _vm->_graphicsManager.SDL_ECHELLE);
_vm->_graphicsManager.dstrect[0].setWidth(_vm->_graphicsManager.Reel_Zoom(0x280u, _vm->_graphicsManager.SDL_ECHELLE));
_vm->_graphicsManager.dstrect[0].setHeight(_vm->_graphicsManager.Reel_Zoom(0x1B8u, _vm->_graphicsManager.SDL_ECHELLE));
_vm->_graphicsManager.dstrect[0].left = _vm->_graphicsManager.zoomIn(0, _vm->_graphicsManager.SDL_ECHELLE);
_vm->_graphicsManager.dstrect[0].top = _vm->_graphicsManager.zoomIn(0x14u, _vm->_graphicsManager.SDL_ECHELLE);
_vm->_graphicsManager.dstrect[0].setWidth(_vm->_graphicsManager.zoomIn(0x280u, _vm->_graphicsManager.SDL_ECHELLE));
_vm->_graphicsManager.dstrect[0].setHeight(_vm->_graphicsManager.zoomIn(0x1B8u, _vm->_graphicsManager.SDL_ECHELLE));
} else {
if (_vm->_graphicsManager.Winbpp == 2)
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, v4, 20, SCREEN_WIDTH, 440, 0, 20);

View file

@ -122,8 +122,8 @@ void GraphicsManager::SET_MODE(int width, int height) {
bpp = 16;
if (SDL_ECHELLE) {
width = Reel_Zoom(width, SDL_ECHELLE);
height = Reel_Zoom(height, SDL_ECHELLE);
width = zoomIn(width, SDL_ECHELLE);
height = zoomIn(height, SDL_ECHELLE);
}
Graphics::PixelFormat pixelFormat16(2, 5, 6, 5, 0, 11, 5, 0, 0);
@ -1587,18 +1587,18 @@ void GraphicsManager::Affiche_Segment_Vesa() {
if (Winbpp == 2) {
m_scroll16A(VESA_BUFFER, xp, yp, width, height,
Reel_Zoom(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE));
zoomIn(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), zoomIn(yp, SDL_ECHELLE));
} else {
m_scroll2A(VESA_BUFFER, xp, yp, width, height,
Reel_Zoom(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE));
zoomIn(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), zoomIn(yp, SDL_ECHELLE));
}
DD_Unlock();
dstRect.left = Reel_Zoom(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE);
dstRect.top = Reel_Zoom(yp, SDL_ECHELLE);
dstRect.setWidth(Reel_Zoom(width, SDL_ECHELLE));
dstRect.setHeight(Reel_Zoom(height, SDL_ECHELLE));
dstRect.left = zoomIn(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE);
dstRect.top = zoomIn(yp, SDL_ECHELLE);
dstRect.setWidth(zoomIn(width, SDL_ECHELLE));
dstRect.setHeight(zoomIn(height, SDL_ECHELLE));
} else {
// WORKAROUND: Original didn't lock the screen for access
DD_Lock();
@ -1763,22 +1763,20 @@ void GraphicsManager::Restore_Mem(byte *destSurface, const byte *src, int xp, in
} while (yCtr != 1);
}
int GraphicsManager::Reel_Zoom(int v, int percentage) {
return Asm_Zoom(v, percentage);
}
int GraphicsManager::Asm_Zoom(int v, int percentage) {
/**
* Compute the value of a parameter plus a given percentage
*/
int GraphicsManager::zoomIn( int v, int percentage ) {
if (v)
v += percentage * (long int)v / 100;
return v;
}
int GraphicsManager::Reel_Reduc(int v, int percentage) {
return Asm_Reduc(v, percentage);
}
int GraphicsManager::Asm_Reduc(int v, int percentage) {
/**
* Compute the value of a parameter minus a given percentage
*/
int GraphicsManager::zoomOut(int v, int percentage) {
if (v)
v -= percentage * (long int)v / 100;
@ -1830,8 +1828,8 @@ void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp
Agr_Flag_y = 0;
Agr_Flag_x = 0;
Largeur = spriteWidth;
int v20 = Asm_Zoom(spriteWidth, zoom2);
int v22 = Asm_Zoom(spriteHeight1, zoom2);
int v20 = zoomIn(spriteWidth, zoom2);
int v22 = zoomIn(spriteHeight1, zoom2);
if (modeFlag) {
v29 = v20 + dest1P;
if (clip_y) {
@ -1841,7 +1839,7 @@ void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp
int v52 = v20;
int v30 = 0;
int v31 = (uint16)clip_y;
while (Asm_Zoom(v30 + 1, zoom2) < v31)
while (zoomIn(v30 + 1, zoom2) < v31)
;
v20 = v52;
spritePixelsP += Largeur * v30;
@ -1860,7 +1858,7 @@ void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp
v29 -= v32;
int v62 = v22;
int v33 = 0;
while (Asm_Zoom(v33 + 1, zoom2) < v32)
while (zoomIn(v33 + 1, zoom2) < v32)
;
int v34 = v33;
v22 = v62;
@ -1922,7 +1920,7 @@ R_Aff_Zoom_Larg_Cont1:
int v49 = v20;
int v23 = 0;
int v24 = (uint16)clip_y;
while (Asm_Zoom(v23 + 1, zoom2) < v24)
while (zoomIn(v23 + 1, zoom2) < v24)
;
v20 = v49;
spritePixelsP += Largeur * v23;
@ -1938,7 +1936,7 @@ R_Aff_Zoom_Larg_Cont1:
int v50 = v20;
int v25 = (uint16)clip_x;
int v26 = 0;
while (Asm_Zoom(v26 + 1, zoom2) < v25)
while (zoomIn(v26 + 1, zoom2) < v25)
;
int v27 = v26;
v22 = v59;
@ -2003,7 +2001,7 @@ Aff_Zoom_Larg_Cont1:
Largeur = spriteWidth;
Red = zoom1;
if (zoom1 < 100) {
int v37 = Asm_Reduc(spriteWidth, Red);
int v37 = zoomOut(spriteWidth, Red);
if (modeFlag) {
v40 = v37 + dest1P;
do {
@ -2480,8 +2478,8 @@ void GraphicsManager::Reduc_Ecran(const byte *srcSurface, byte *destSurface, int
Red_x = 0;
Red_y = 0;
if (zoom < 100) {
Reduc_Ecran_L = Asm_Reduc(width, Red);
Reduc_Ecran_H = Asm_Reduc(height, Red);
Reduc_Ecran_L = zoomOut(width, Red);
Reduc_Ecran_H = zoomOut(height, Red);
for (int yCtr = 0; yCtr < height; ++yCtr, srcP += nbrligne2) {
Red_y += Red;

View file

@ -52,8 +52,6 @@ private:
HopkinsEngine *_vm;
void CHARGE_ECRAN(const Common::String &file);
int Asm_Zoom(int v, int percentage);
int Asm_Reduc(int v, int percentage);
public:
int _lockCtr;
bool SDL_MODEYES;
@ -177,8 +175,8 @@ public:
void CopyAsm(const byte *surface);
void CopyAsm16(const byte *surface);
void Restore_Mem(byte *destSurface, const byte *src, int xp, int yp, int width, int height);
int Reel_Zoom(int v, int percentage);
int Reel_Reduc(int v, int percentage);
int zoomIn(int v, int percentage);
int zoomOut(int v, int percentage);
void Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int frameIndex, int zoom1, int zoom2, int modeFlag);
void AFFICHE_SPEED(const byte *spriteData, int xp, int yp, int spriteIndex);
void SCOPY(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY);

View file

@ -3218,11 +3218,11 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
v28 = -v26;
v48 = _vm->_globals.STAILLE[v63];
v45 = v63;
v25 = _vm->_graphicsManager.Reel_Reduc(v25, v28);
v25 = _vm->_graphicsManager.zoomOut(v25, v28);
v29 = v27;
if ((v27 & 0x80000000u) != 0)
v29 = -v27;
v40 = _vm->_graphicsManager.Reel_Reduc(v40, v29);
v40 = _vm->_graphicsManager.zoomOut(v40, v29);
v63 = v45;
v26 = v48;
}
@ -3232,11 +3232,11 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
if (v26 < 0)
v31 = -v26;
v46 = v63;
v25 = _vm->_graphicsManager.Reel_Zoom(v25, v31);
v25 = _vm->_graphicsManager.zoomIn(v25, v31);
v32 = v30;
if ((v30 & 0x80000000u) != 0)
v32 = -v30;
v40 = _vm->_graphicsManager.Reel_Zoom(v40, v32);
v40 = _vm->_graphicsManager.zoomIn(v40, v32);
v63 = v46;
}
v33 = v63 + v40;
@ -3281,11 +3281,11 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
v17 = -v15;
v47 = _vm->_globals.STAILLE[v63];
v43 = v63;
v14 = _vm->_graphicsManager.Reel_Reduc(v14, v17);
v14 = _vm->_graphicsManager.zoomOut(v14, v17);
v18 = v16;
if ((v16 & 0x80000000u) != 0)
v18 = -v16;
v39 = _vm->_graphicsManager.Reel_Reduc(v39, v18);
v39 = _vm->_graphicsManager.zoomOut(v39, v18);
v63 = v43;
v15 = v47;
}
@ -3295,11 +3295,11 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
if (v15 < 0)
v20 = -v15;
v44 = v63;
v14 = _vm->_graphicsManager.Reel_Zoom(v14, v20);
v14 = _vm->_graphicsManager.zoomIn(v14, v20);
v21 = v19;
if ((v19 & 0x80000000u) != 0)
v21 = -v19;
v39 = _vm->_graphicsManager.Reel_Zoom(v39, v21);
v39 = _vm->_graphicsManager.zoomIn(v39, v21);
v63 = v44;
}
v22 = v63 + v39;
@ -3336,8 +3336,8 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
do {
v10 = _vm->_globals.Hopkins[v51].field2;
v42 = v63;
v11 = _vm->_graphicsManager.Reel_Reduc(_vm->_globals.Hopkins[v51].field0, 0x19u);
v38 = _vm->_graphicsManager.Reel_Reduc(v10, 0x19u);
v11 = _vm->_graphicsManager.zoomOut(_vm->_globals.Hopkins[v51].field0, 0x19u);
v38 = _vm->_graphicsManager.zoomOut(v10, 0x19u);
v63 = v42;
v12 = 0;
if (v11 > 0) {
@ -3372,8 +3372,8 @@ int LinesManager::SMOOTH_MOVE(int a3, int a4, int a5, int a6) {
do {
v6 = _vm->_globals.Hopkins[v50].field2;
v41 = v63;
v7 = _vm->_graphicsManager.Reel_Reduc(_vm->_globals.Hopkins[v50].field0, 0x19u);
v37 = _vm->_graphicsManager.Reel_Reduc(v6, 0x19u);
v7 = _vm->_graphicsManager.zoomOut(_vm->_globals.Hopkins[v50].field0, 0x19u);
v37 = _vm->_graphicsManager.zoomOut(v6, 0x19u);
v63 = v41;
v8 = 0;
if (v7 > 0) {

View file

@ -792,37 +792,37 @@ void ObjectsManager::CALCUL_BOB(int idx) {
v21 = _vm->_globals.Bob[idx].field36;
if (v21) {
if (v15 >= 0) {
v22 = _vm->_graphicsManager.Reel_Zoom(v15, v21);
v22 = _vm->_graphicsManager.zoomIn(v15, v21);
} else {
if (v15 < 0)
v15 = -v15;
v22 = -_vm->_graphicsManager.Reel_Zoom(v15, v21);
v22 = -_vm->_graphicsManager.zoomIn(v15, v21);
}
if (v6 >= 0) {
v17 = _vm->_graphicsManager.Reel_Zoom(v6, v21);
v17 = _vm->_graphicsManager.zoomIn(v6, v21);
} else {
int v9 = v15;
if (v15 < 0)
v9 = -v15;
v6 = v9;
v17 = -_vm->_graphicsManager.Reel_Zoom(v9, v21);
v17 = -_vm->_graphicsManager.zoomIn(v9, v21);
}
}
if (v20) {
if (v15 >= 0) {
v22 = _vm->_graphicsManager.Reel_Reduc(v15, v20);
v22 = _vm->_graphicsManager.zoomOut(v15, v20);
} else {
v15 = -v15;
v22 = -_vm->_graphicsManager.Reel_Reduc(v15, v20);
v22 = -_vm->_graphicsManager.zoomOut(v15, v20);
}
if (v6 >= 0) {
v17 = _vm->_graphicsManager.Reel_Reduc(v6, v20);
v17 = _vm->_graphicsManager.zoomOut(v6, v20);
} else {
int v11 = v15;
if (v15 < 0)
v11 = -v15;
v17 = -_vm->_graphicsManager.Reel_Reduc(v11, v20);
v17 = -_vm->_graphicsManager.zoomOut(v11, v20);
}
}
@ -842,12 +842,12 @@ void ObjectsManager::CALCUL_BOB(int idx) {
int height = getHeight(_vm->_globals.Bob[idx].spriteData, _vm->_globals.Bob[idx].frameIndex);
if (v21) {
width = _vm->_graphicsManager.Reel_Zoom(width, v21);
height = _vm->_graphicsManager.Reel_Zoom(height, v21);
width = _vm->_graphicsManager.zoomIn(width, v21);
height = _vm->_graphicsManager.zoomIn(height, v21);
}
if (v20) {
height = _vm->_graphicsManager.Reel_Reduc(height, v20);
width = _vm->_graphicsManager.Reel_Reduc(width, v20);
height = _vm->_graphicsManager.zoomOut(height, v20);
width = _vm->_graphicsManager.zoomOut(width, v20);
}
_vm->_globals.Liste2[idx].width = width;
@ -1066,43 +1066,43 @@ void ObjectsManager::CALCUL_SPRITE(int idx) {
if (zoomPercent) {
if (v4 >= 0) {
v22 = _vm->_graphicsManager.Reel_Zoom(v4, zoomPercent);
v22 = _vm->_graphicsManager.zoomIn(v4, zoomPercent);
} else {
v10 = v4;
if (v4 < 0)
v10 = -v4;
v4 = v10;
v22 = -_vm->_graphicsManager.Reel_Zoom(v10, zoomPercent);
v22 = -_vm->_graphicsManager.zoomIn(v10, zoomPercent);
}
if (v8 >= 0) {
v7 = _vm->_graphicsManager.Reel_Zoom(v8, zoomPercent);
v7 = _vm->_graphicsManager.zoomIn(v8, zoomPercent);
} else {
v11 = v4;
if (v4 < 0)
v11 = -v4;
v8 = v11;
v7 = -_vm->_graphicsManager.Reel_Zoom(v11, zoomPercent);
v7 = -_vm->_graphicsManager.zoomIn(v11, zoomPercent);
}
}
if (reducePercent) {
if (v4 >= 0) {
v22 = _vm->_graphicsManager.Reel_Reduc(v4, reducePercent);
v22 = _vm->_graphicsManager.zoomOut(v4, reducePercent);
} else {
v12 = v4;
if (v4 < 0)
v12 = -v4;
v4 = v12;
v22 = -_vm->_graphicsManager.Reel_Reduc(v12, reducePercent);
v22 = -_vm->_graphicsManager.zoomOut(v12, reducePercent);
}
if (v8 >= 0) {
v7 = _vm->_graphicsManager.Reel_Reduc(v8, reducePercent);
v7 = _vm->_graphicsManager.zoomOut(v8, reducePercent);
} else {
v13 = v4;
if (v4 < 0)
v13 = -v4;
v7 = -_vm->_graphicsManager.Reel_Reduc(v13, reducePercent);
v7 = -_vm->_graphicsManager.zoomOut(v13, reducePercent);
}
}
@ -1122,13 +1122,13 @@ void ObjectsManager::CALCUL_SPRITE(int idx) {
height = getHeight(Sprite[idx].spriteData, Sprite[idx].spriteIndex);
if (zoomPercent) {
width = _vm->_graphicsManager.Reel_Zoom(width, zoomPercent);
height = _vm->_graphicsManager.Reel_Zoom(height, zoomPercent);
width = _vm->_graphicsManager.zoomIn(width, zoomPercent);
height = _vm->_graphicsManager.zoomIn(height, zoomPercent);
}
if (reducePercent) {
height = _vm->_graphicsManager.Reel_Reduc(height, reducePercent);
width = _vm->_graphicsManager.Reel_Reduc(width, reducePercent);
height = _vm->_graphicsManager.zoomOut(height, reducePercent);
width = _vm->_graphicsManager.zoomOut(width, reducePercent);
}
Sprite[idx].field30 = width;
@ -1853,21 +1853,21 @@ LABEL_241:
v5 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v5 = -Sprite[0].fieldC;
v3 = _vm->_graphicsManager.Reel_Reduc(v3, v5);
v3 = _vm->_graphicsManager.zoomOut(v3, v5);
v6 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v6 = -Sprite[0].fieldC;
v4 = _vm->_graphicsManager.Reel_Reduc(v4, v6);
v4 = _vm->_graphicsManager.zoomOut(v4, v6);
}
if (Sprite[0].fieldC > 0) {
v7 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v7 = -Sprite[0].fieldC;
v3 = _vm->_graphicsManager.Reel_Zoom(v3, v7);
v3 = _vm->_graphicsManager.zoomIn(v3, v7);
v8 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v8 = -Sprite[0].fieldC;
v4 = _vm->_graphicsManager.Reel_Zoom(v4, v8);
v4 = _vm->_graphicsManager.zoomIn(v4, v8);
}
v0 = v3 + g_old_x;
v58 = g_old_y + v4;
@ -1891,21 +1891,21 @@ LABEL_23:
v11 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v11 = -Sprite[0].fieldC;
v9 = _vm->_graphicsManager.Reel_Reduc(v9, v11);
v9 = _vm->_graphicsManager.zoomOut(v9, v11);
v12 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v12 = -Sprite[0].fieldC;
v10 = _vm->_graphicsManager.Reel_Reduc(v10, v12);
v10 = _vm->_graphicsManager.zoomOut(v10, v12);
}
if (Sprite[0].fieldC > 0) {
v13 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v13 = -Sprite[0].fieldC;
v9 = _vm->_graphicsManager.Reel_Zoom(v9, v13);
v9 = _vm->_graphicsManager.zoomIn(v9, v13);
v14 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v14 = -Sprite[0].fieldC;
v10 = _vm->_graphicsManager.Reel_Zoom(v10, v14);
v10 = _vm->_graphicsManager.zoomIn(v10, v14);
}
v0 = g_old_x - v9;
v58 = g_old_y - v10;
@ -1931,13 +1931,13 @@ LABEL_43:
v17 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v17 = -Sprite[0].fieldC;
v16 = _vm->_graphicsManager.Reel_Reduc(v16, v17);
v16 = _vm->_graphicsManager.zoomOut(v16, v17);
}
if (Sprite[0].fieldC > 0) {
v18 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v18 = -Sprite[0].fieldC;
v16 = _vm->_graphicsManager.Reel_Zoom(v16, v18);
v16 = _vm->_graphicsManager.zoomIn(v16, v18);
}
v0 = g_old_x;
v58 = g_old_y - v16;
@ -1963,13 +1963,13 @@ LABEL_60:
v21 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v21 = -Sprite[0].fieldC;
v20 = _vm->_graphicsManager.Reel_Reduc(v20, v21);
v20 = _vm->_graphicsManager.zoomOut(v20, v21);
}
if (Sprite[0].fieldC > 0) {
v22 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v22 = -Sprite[0].fieldC;
v20 = _vm->_graphicsManager.Reel_Zoom(v20, v22);
v20 = _vm->_graphicsManager.zoomIn(v20, v22);
}
v0 = g_old_x;
v58 = v20 + g_old_y;
@ -1993,21 +1993,21 @@ LABEL_77:
v25 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v25 = -Sprite[0].fieldC;
v23 = _vm->_graphicsManager.Reel_Reduc(v23, v25);
v23 = _vm->_graphicsManager.zoomOut(v23, v25);
v26 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v26 = -Sprite[0].fieldC;
v24 = _vm->_graphicsManager.Reel_Reduc(v24, v26);
v24 = _vm->_graphicsManager.zoomOut(v24, v26);
}
if (Sprite[0].fieldC > 0) {
v27 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v27 = -Sprite[0].fieldC;
v23 = _vm->_graphicsManager.Reel_Zoom(v23, v27);
v23 = _vm->_graphicsManager.zoomIn(v23, v27);
v28 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v28 = -Sprite[0].fieldC;
v24 = _vm->_graphicsManager.Reel_Zoom(v24, v28);
v24 = _vm->_graphicsManager.zoomIn(v24, v28);
}
v0 = v23 + g_old_x;
v58 = g_old_y + v24;
@ -2031,21 +2031,21 @@ LABEL_96:
v31 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v31 = -Sprite[0].fieldC;
v29 = _vm->_graphicsManager.Reel_Reduc(v29, v31);
v29 = _vm->_graphicsManager.zoomOut(v29, v31);
v32 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v32 = -Sprite[0].fieldC;
v30 = _vm->_graphicsManager.Reel_Reduc(v30, v32);
v30 = _vm->_graphicsManager.zoomOut(v30, v32);
}
if (Sprite[0].fieldC > 0) {
v33 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v33 = -Sprite[0].fieldC;
v29 = _vm->_graphicsManager.Reel_Zoom(v29, v33);
v29 = _vm->_graphicsManager.zoomIn(v29, v33);
v34 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v34 = -Sprite[0].fieldC;
v30 = _vm->_graphicsManager.Reel_Zoom(v30, v34);
v30 = _vm->_graphicsManager.zoomIn(v30, v34);
}
v0 = g_old_x - v29;
v58 = g_old_y + v30;
@ -2069,21 +2069,21 @@ LABEL_115:
v37 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v37 = -Sprite[0].fieldC;
v35 = _vm->_graphicsManager.Reel_Reduc(v35, v37);
v35 = _vm->_graphicsManager.zoomOut(v35, v37);
v38 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v38 = -Sprite[0].fieldC;
v36 = _vm->_graphicsManager.Reel_Reduc(v36, v38);
v36 = _vm->_graphicsManager.zoomOut(v36, v38);
}
if (Sprite[0].fieldC > 0) {
v39 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v39 = -Sprite[0].fieldC;
v35 = _vm->_graphicsManager.Reel_Zoom(v35, v39);
v35 = _vm->_graphicsManager.zoomIn(v35, v39);
v40 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v40 = -Sprite[0].fieldC;
v36 = _vm->_graphicsManager.Reel_Zoom(v36, v40);
v36 = _vm->_graphicsManager.zoomIn(v36, v40);
}
v0 = v35 + g_old_x;
v58 = g_old_y + v36;
@ -2107,21 +2107,21 @@ LABEL_134:
v43 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v43 = -Sprite[0].fieldC;
v41 = _vm->_graphicsManager.Reel_Reduc(v41, v43);
v41 = _vm->_graphicsManager.zoomOut(v41, v43);
v44 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v44 = -Sprite[0].fieldC;
v42 = _vm->_graphicsManager.Reel_Reduc(v42, v44);
v42 = _vm->_graphicsManager.zoomOut(v42, v44);
}
if (Sprite[0].fieldC > 0) {
v45 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v45 = -Sprite[0].fieldC;
v41 = _vm->_graphicsManager.Reel_Zoom(v41, v45);
v41 = _vm->_graphicsManager.zoomIn(v41, v45);
v46 = Sprite[0].fieldC;
if (Sprite[0].fieldC < 0)
v46 = -Sprite[0].fieldC;
v42 = _vm->_graphicsManager.Reel_Zoom(v42, v46);
v42 = _vm->_graphicsManager.zoomIn(v42, v46);
}
v0 = g_old_x - v41;
v58 = g_old_y + v42;
@ -5106,9 +5106,9 @@ int ObjectsManager::CALC_PROPRE(int idx) {
v2 = 20 * (5 * v4 - 165) / -67;
}
if (v2 < 0)
return _vm->_graphicsManager.Reel_Reduc(0x19u, -v2);
return _vm->_graphicsManager.zoomOut(0x19u, -v2);
if (v2 > 0)
return _vm->_graphicsManager.Reel_Zoom(0x19u, v2);
return _vm->_graphicsManager.zoomIn(0x19u, v2);
return v1;
}

View file

@ -222,8 +222,8 @@ bool SaveLoadManager::readSavegameHeader(int slot, hopkinsSavegameHeader &header
#define REDUCE_AMOUNT 80
void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
int w = _vm->_graphicsManager.Reel_Reduc(SCREEN_WIDTH, REDUCE_AMOUNT);
int h = _vm->_graphicsManager.Reel_Reduc(SCREEN_HEIGHT - 40, REDUCE_AMOUNT);
int w = _vm->_graphicsManager.zoomOut(SCREEN_WIDTH, REDUCE_AMOUNT);
int h = _vm->_graphicsManager.zoomOut(SCREEN_HEIGHT - 40, REDUCE_AMOUNT);
Graphics::Surface thumb8;
thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8());