mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 07:39:08 +00:00
VOYEUR: Remove unused variables and functions in GraphicsManager
This commit is contained in:
parent
3584680587
commit
27d624e79f
@ -90,7 +90,7 @@ void EventsManager::startMainClockInt() {
|
||||
_mainIntNode._intFunc = &EventsManager::mainVoyeurIntFunc;
|
||||
_mainIntNode._flags = 0;
|
||||
_mainIntNode._curTime = 0;
|
||||
_mainIntNode._timeReset = _vm->_graphicsManager._palFlag ? 50 : 60;
|
||||
_mainIntNode._timeReset = 60;
|
||||
}
|
||||
|
||||
void EventsManager::mainVoyeurIntFunc() {
|
||||
|
@ -832,7 +832,7 @@ int DisplayResource::drawText(const Common::String &msg) {
|
||||
ViewPortResource *viewPort = !(_flags & DISPFLAG_VIEWPORT) ? NULL :
|
||||
(ViewPortResource *)this;
|
||||
|
||||
if (gfxManager._drawTextPermFlag || (fontInfo._fontFlags & DISPFLAG_1) || fontInfo._justify ||
|
||||
if ((fontInfo._fontFlags & DISPFLAG_1) || fontInfo._justify ||
|
||||
(gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT))) {
|
||||
msgWidth = viewPort->textWidth(msg);
|
||||
yp = pos.y;
|
||||
|
@ -1238,7 +1238,7 @@ void ThreadResource::doRoom() {
|
||||
|
||||
_vm->flipPageAndWait();
|
||||
|
||||
vm._graphicsManager.fadeUpICF1(0);
|
||||
vm._graphicsManager.fadeUpICF1();
|
||||
voy._eventFlags &= EVTFLAG_RECORDING;
|
||||
vm._eventsManager.showCursor();
|
||||
}
|
||||
@ -1595,7 +1595,7 @@ void ThreadResource::freeTheApt() {
|
||||
_vm->_graphicsManager.fadeDownICF1(5);
|
||||
_vm->flipPageAndWaitForFade();
|
||||
|
||||
_vm->_graphicsManager.fadeUpICF1(0);
|
||||
_vm->_graphicsManager.fadeUpICF1();
|
||||
|
||||
if (_vm->_currentVocId != -1) {
|
||||
_vm->_soundManager.stopVOCPlay();
|
||||
|
@ -31,25 +31,17 @@ namespace Voyeur {
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
DrawInfo::DrawInfo(int penColor, const Common::Point &pos, int flags) {
|
||||
DrawInfo::DrawInfo(int penColor, const Common::Point &pos) {
|
||||
_penColor = penColor;
|
||||
_pos = pos;
|
||||
_flags = flags;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
GraphicsManager::GraphicsManager(): _defaultDrawInfo(1, Common::Point(), 0), _drawPtr(&_defaultDrawInfo) {
|
||||
_SVGAPage = 0;
|
||||
GraphicsManager::GraphicsManager(): _defaultDrawInfo(1, Common::Point()), _drawPtr(&_defaultDrawInfo) {
|
||||
_SVGAMode = 0;
|
||||
_SVGAReset = 0;
|
||||
_screenOffset = 0;
|
||||
_planeSelect = 0;
|
||||
_sImageShift = 3;
|
||||
_palFlag = false;
|
||||
_MCGAMode = false;
|
||||
_saveBack = true;
|
||||
_drawTextPermFlag = false;
|
||||
_clipPtr = NULL;
|
||||
_viewPortListPtr = NULL;
|
||||
_backgroundPage = NULL;
|
||||
@ -71,8 +63,6 @@ GraphicsManager::~GraphicsManager() {
|
||||
}
|
||||
|
||||
void GraphicsManager::setupMCGASaveRect(ViewPortResource *viewPort) {
|
||||
_MCGAMode = true;
|
||||
|
||||
if (viewPort->_activePage) {
|
||||
viewPort->_activePage->_flags |= 1;
|
||||
Common::Rect *clipRect = _clipPtr;
|
||||
@ -252,10 +242,9 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
|
||||
}
|
||||
|
||||
if (srcFlags & DISPFLAG_1000) {
|
||||
srcImgData = srcPic->_imgData + (var4C << 14) + _screenOffset;
|
||||
srcImgData = srcPic->_imgData + (var4C << 14);
|
||||
for (uint idx = 0; idx < srcPic->_maskData; ++idx) {
|
||||
if (var4C < 4) {
|
||||
EMSMapPageHandle(srcPic->_planeSize, srcPic->_imgData[idx], var4C);
|
||||
++var4C;
|
||||
}
|
||||
}
|
||||
@ -263,10 +252,9 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
|
||||
srcImgData = srcPic->_imgData;
|
||||
}
|
||||
if (destFlags & DISPFLAG_1000) {
|
||||
destImgData = destPic->_imgData + (var4C << 14) + _screenOffset;
|
||||
destImgData = destPic->_imgData + (var4C << 14);
|
||||
for (uint idx = 0; idx < srcPic->_maskData; ++idx) {
|
||||
if (var4C < 4) {
|
||||
EMSMapPageHandle(destPic->_planeSize, destPic->_imgData[idx], var4C);
|
||||
++var4C;
|
||||
}
|
||||
}
|
||||
@ -274,7 +262,6 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
|
||||
destImgData = destPic->_imgData;
|
||||
}
|
||||
|
||||
_SVGAPage = _SVGAReset;
|
||||
if (srcPic->_select != 0xff)
|
||||
return;
|
||||
|
||||
|
@ -50,9 +50,8 @@ class DrawInfo {
|
||||
public:
|
||||
int _penColor;
|
||||
Common::Point _pos;
|
||||
int _flags;
|
||||
public:
|
||||
DrawInfo(int penColor, const Common::Point &pos, int flags);
|
||||
DrawInfo(int penColor, const Common::Point &pos);
|
||||
};
|
||||
|
||||
typedef void (GraphicsManager::*GraphicMethodPtr)();
|
||||
@ -63,32 +62,21 @@ typedef void (GraphicsManager::*ViewPortRestorePtr)(ViewPortResource *);
|
||||
class GraphicsManager {
|
||||
public:
|
||||
VoyeurEngine *_vm;
|
||||
bool _palFlag;
|
||||
byte _VGAColors[PALETTE_SIZE];
|
||||
Common::Array<byte *> _colorChain;
|
||||
PictureResource *_backgroundPage;
|
||||
int _SVGAPage;
|
||||
int _SVGAMode;
|
||||
int _SVGAReset;
|
||||
ViewPortListResource *_viewPortListPtr;
|
||||
ViewPortResource **_vPort;
|
||||
bool _MCGAMode;
|
||||
bool _saveBack;
|
||||
Common::Rect *_clipPtr;
|
||||
int _screenOffset;
|
||||
uint _planeSelect;
|
||||
int _sImageShift;
|
||||
Graphics::Surface _screenSurface;
|
||||
CMapResource *_backColors;
|
||||
FontInfoResource *_fontPtr;
|
||||
PictureResource *_fontChar;
|
||||
DrawInfo *_drawPtr;
|
||||
DrawInfo _defaultDrawInfo;
|
||||
bool _drawTextPermFlag;
|
||||
private:
|
||||
static void fadeIntFunc();
|
||||
static void vDoCycleInt();
|
||||
|
||||
void restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount,
|
||||
PictureResource *srcPic, PictureResource *destPic);
|
||||
public:
|
||||
@ -116,7 +104,7 @@ public:
|
||||
void setColors(int start, int count, const byte *pal);
|
||||
void screenReset();
|
||||
void fadeDownICF1(int steps);
|
||||
void fadeUpICF1(int steps);
|
||||
void fadeUpICF1(int steps = 0);
|
||||
void fadeDownICF(int steps);
|
||||
void drawDot();
|
||||
|
||||
@ -124,9 +112,6 @@ public:
|
||||
* Synchronizes the game data
|
||||
*/
|
||||
void synchronize(Common::Serializer &s);
|
||||
|
||||
// Methods in the original that are stubbed in ScummVM
|
||||
void EMSMapPageHandle(int v1, int v2, int v3) {}
|
||||
};
|
||||
|
||||
} // End of namespace Voyeur
|
||||
|
Loading…
Reference in New Issue
Block a user