diff --git a/engines/chewy/detail.h b/engines/chewy/detail.h index 3cd015a01e6..306d87a815a 100644 --- a/engines/chewy/detail.h +++ b/engines/chewy/detail.h @@ -192,13 +192,13 @@ public: void load_rdi_taf(const char *fname, int16 load_flag); - void setStaticSpr(int16 nr, int16 sprNr); + void setStaticSpr(int16 detNr, int16 sprNr); byte *getStaticImage(int16 detNr); void setStaticPos(int16 detNr, int16 x, int16 y, bool hideFl, bool correctionFlag); void setSetailPos(int16 detNr, int16 x, int16 y); - void hideStaticSpr(int16 nr); - void showStaticSpr(int16 nr); + void hideStaticSpr(int16 detNr); + void showStaticSpr(int16 detNr); void freezeAni(); void unfreeze_ani(); void getAniValues(int16 aniNr, int16 *start, int16 *end); diff --git a/engines/chewy/globals.h b/engines/chewy/globals.h index 1b4677ec2d0..b07d3c7bcb2 100644 --- a/engines/chewy/globals.h +++ b/engines/chewy/globals.h @@ -96,7 +96,6 @@ public: int16 _zoom_mov_fak = 0; int16 _auto_obj = 0; - int16 _ged_mov_ebene = 0; bool _cur_display = false; int16 _mouseLeftClick = 0; @@ -273,7 +272,7 @@ public: // mcga.cpp byte _saved_palette[PALETTE_SIZE] = { 0 }; bool _screenHasDefault = false; - byte *_screenDefaultP = nullptr; + byte *_screenDefaultPtr = nullptr; int _spriteWidth = 0; // mcga_graphics.cpp diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp index d3da31f318c..fb6a8f6e811 100644 --- a/engines/chewy/inits.cpp +++ b/engines/chewy/inits.cpp @@ -49,7 +49,6 @@ void standard_init() { _G(out)->cls(); _G(out)->savePalette(); _G(out)->setClip(0, 0, 320, 200); - _G(out)->setWriteMode(0); _G(scr_width) = 0; _G(screen0) = (byte *)g_screen->getPixels(); _G(in)->neuer_kb_handler(&_G(kbinfo)); @@ -104,7 +103,6 @@ void var_init() { _G(auto_p_nr) = 0; _G(menu_item) = CUR_WALK; _G(inventoryNr) = 0; - _G(ged_mov_ebene) = 1; new_game(); _G(spieler).MainMenuY = MENU_Y; _G(spieler).DispFlag = true; diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp index 528a5560360..e6f5d930d82 100644 --- a/engines/chewy/main.cpp +++ b/engines/chewy/main.cpp @@ -554,7 +554,7 @@ void setupScreen(SetupScreenMode mode) { _G(gpkt).Hoehe = _G(room)->_gedYAnz[_G(room_blk).AkAblage]; _G(gpkt).Mem = _G(ged_mem)[_G(room_blk).AkAblage]; _G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].Ebenen; - _G(gpkt).AkMovEbene = _G(ged_mov_ebene); + _G(gpkt).AkMovEbene = 1; _G(mov)->goto_xy(&_G(gpkt)); _G(spieler_mi)[P_CHEWY].XyzStart[0] = _G(spieler_vector)[P_CHEWY].Xypos[0]; _G(spieler_mi)[P_CHEWY].XyzStart[1] = _G(spieler_vector)[P_CHEWY].Xypos[1]; @@ -1199,7 +1199,7 @@ bool autoMove(int16 movNr, int16 playerNum) { _G(gpkt).Hoehe = _G(room)->_gedYAnz[_G(room_blk).AkAblage]; _G(gpkt).Mem = _G(ged_mem)[_G(room_blk).AkAblage]; _G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].Ebenen; - _G(gpkt).AkMovEbene = _G(ged_mov_ebene); + _G(gpkt).AkMovEbene = 1; _G(mov)->goto_xy(&_G(gpkt)); _G(spieler_mi)[playerNum].XyzStart[0] = _G(spieler_vector)[playerNum].Xypos[0]; diff --git a/engines/chewy/mcga.cpp b/engines/chewy/mcga.cpp index 6912d0b98b4..f314ba4746c 100644 --- a/engines/chewy/mcga.cpp +++ b/engines/chewy/mcga.cpp @@ -36,7 +36,7 @@ namespace Chewy { void init_mcga() { _G(currentScreen) = (byte *)g_screen->getPixels(); _G(screenHasDefault) = false; - _G(screenDefaultP) = nullptr; + _G(screenDefaultPtr) = nullptr; _G(spriteWidth) = 0; } diff --git a/engines/chewy/mcga_graphics.cpp b/engines/chewy/mcga_graphics.cpp index dfa36fa57bc..b82971c6216 100644 --- a/engines/chewy/mcga_graphics.cpp +++ b/engines/chewy/mcga_graphics.cpp @@ -29,13 +29,7 @@ namespace Chewy { -#define MAXSTRING 255 - McgaGraphics::McgaGraphics() { - for (int i = 0; i < 360; i++) { - _sines[i] = sin(i * 3.14159265359 / 180); - _cosines[i] = cos(i * 3.14159265359 / 180); - } } McgaGraphics::~McgaGraphics() { @@ -47,10 +41,6 @@ void McgaGraphics::init() { init_mcga(); } -void McgaGraphics::setWriteMode(char wm) { - _writeMode = wm; -} - void McgaGraphics::setClip(int16 x1, int16 y1, int16 x2, int16 y2) { _G(clipx1) = x1; _G(clipx2) = x2; @@ -62,16 +52,12 @@ void McgaGraphics::setPointer(byte *ptr) { if (ptr) { _G(currentScreen) = ptr; } else if (_G(screenHasDefault)) { - _G(currentScreen) = _G(screenDefaultP); + _G(currentScreen) = _G(screenDefaultPtr); } else { _G(currentScreen) = (byte *)g_screen->getPixels(); } } -byte *McgaGraphics::getPointer() { - return get_dispoff(); -} - void McgaGraphics::setPalette(byte *palette) { for (int16 i = 0; i < 768; i++) _palTable[i] = palette[i]; @@ -718,12 +704,4 @@ void McgaGraphics::scale_set(byte *sptr, int16 x, int16 y, int16 xdiff_, int16 y mspr_set_mcga(sptr, x, y, scrwidth); } -void McgaGraphics::ltoa(long N, char *str, int base) { - sprintf(str, "%ld", N); -} - -void McgaGraphics::ultoa(uint32 N, char *str, int base) { - sprintf(str, "%u", N); -} - } // namespace Chewy diff --git a/engines/chewy/mcga_graphics.h b/engines/chewy/mcga_graphics.h index fc873cebeb9..8dc0d606a96 100644 --- a/engines/chewy/mcga_graphics.h +++ b/engines/chewy/mcga_graphics.h @@ -23,7 +23,6 @@ #define CHEWY_MCGA_GRAPHICS_H #include "graphics/screen.h" -#include "chewy/ngstypes.h" namespace Chewy { @@ -33,11 +32,9 @@ public: ~McgaGraphics(); void init(); - void setWriteMode(char wm); void setClip(int16 x1, int16 y1, int16 x2, int16 y2); void setPointer(byte *ptr); - byte *getPointer(); void setPalette(byte *palette); void savePalette(byte *palette = nullptr); @@ -74,17 +71,9 @@ public: private: int16 devices(); - float _sines[360]; - float _cosines[360]; byte _palTable[PALETTE_SIZE]; - uint8 _writeMode = 0; - int16 _crlfx = 0, _crlfy = 0; - int16 _fontBr = 0, _fontH = 0; uint8 _svga = 0; uint8 _einfuegen = 0; - - void ltoa(long N, char *str, int base); - void ultoa(uint32 N, char *str, int base); }; } // namespace Chewy