SAGA2: Fix overridden methods

This commit is contained in:
Eugene Sandulenko 2021-06-18 19:53:14 +02:00
parent b5359d7202
commit 5b1671fb69
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
10 changed files with 18 additions and 17 deletions

View File

@ -577,7 +577,7 @@ int16 openAutoMap() {
decRes = NULL;
// clean up the backwindow
mainWindow->invalidate(autoMapRect);
mainWindow->invalidate(&autoMapRect);
return rInfo.result;
}

View File

@ -242,7 +242,7 @@ void reDrawScreen(void) {
if (mainWindow && displayEnabled()) {
//updateAllUserControls();
drawMainDisplay();
mainWindow->invalidate(r);
mainWindow->invalidate(&r);
delayReDraw = false;
if (paletteMayHaveChanged) {
paletteMayHaveChanged = false;

View File

@ -213,9 +213,9 @@ BackWindow::BackWindow(const Rect16 &r, uint16 ident, AppFunc *cmd)
: DecoratedWindow(r, ident, "", cmd) {
}
void BackWindow::invalidate(Rect16 &area) {
void BackWindow::invalidate(Rect16 *area) {
if (displayEnabled())
window.update(area);
window.update(*area);
}
// Return true if window floats above animated are

View File

@ -246,7 +246,7 @@ class BackWindow : public DecoratedWindow {
public:
BackWindow(const Rect16 &, uint16, AppFunc *cmd = NULL);
void invalidate(Rect16 &area);
void invalidate(Rect16 *area);
virtual bool isBackdrop(void);
};

View File

@ -184,7 +184,7 @@ int16 ErrorWindow::getResult(void) {
}
ErrorWindow::~ErrorWindow() {
mainWindow->invalidate(mbWindowRect);
mainWindow->invalidate(&mbWindowRect);
}

View File

@ -160,7 +160,7 @@ void gPanel::makeActive(void) {
G_BASE.setActive(this);
}
void gPanel::invalidate(void) {
void gPanel::invalidate(Rect16 *) {
assert(displayEnabled());
window.update(extent);
}
@ -273,7 +273,7 @@ void gPanelList::enable(bool abled) {
gPanel::enable(abled);
}
void gPanelList::invalidate(void) {
void gPanelList::invalidate(Rect16 *) {
gControl *ctl;
Rect16 invArea;

View File

@ -179,7 +179,7 @@ public:
virtual void enable(bool abled);
virtual void select(bool selected);
virtual void ghost(bool ghosted);
virtual void invalidate(void);
virtual void invalidate(Rect16 *area = nullptr);
virtual void setMousePoll(bool abled) {
wantMousePoll = abled ? 1 : 0;
}
@ -210,7 +210,8 @@ public:
}
void show(bool shown = true, bool inval = true) {
enable(shown);
if (inval) invalidate();
if (inval)
invalidate();
}
void moveToFront(gPanelList &l);
@ -268,7 +269,7 @@ public:
void removeControls(void);
public:
void invalidate(void);
void invalidate(Rect16 *area = nullptr);
void draw(void); // redraw the controls
void drawClipped(
gPort &port,

View File

@ -165,7 +165,7 @@ void clearTileAreaPort(void) {
}
Rect16 rect(0, 0, 640, 480);
mainWindow->invalidate(rect);
mainWindow->invalidate(&rect);
}

View File

@ -773,7 +773,7 @@ int16 FileDialog(int16 fileProcess) {
destroyFileFields(fieldStrings);
// replace the damaged area
mainWindow->invalidate(saveLoadWindowRect);
mainWindow->invalidate(&saveLoadWindowRect);
// return the result code
return rInfo.result;
@ -983,7 +983,7 @@ int16 OptionsDialog(bool disableSaveResume) {
saveGameState(deferredLoadID, deferredSaveName);
#endif
}
mainWindow->invalidate(optionsWindowRect);
mainWindow->invalidate(&optionsWindowRect);
}
// return the result code
@ -1272,7 +1272,7 @@ int16 userDialog(const char *title, const char *msg, const char *bMsg1,
decRes = nullptr;
// replace the damaged area
mainWindow->invalidate(messageWindowRect);
mainWindow->invalidate(&messageWindowRect);
// return the result code
return rInfo.result % 10;
@ -1607,7 +1607,7 @@ void placardWindow(int8 type, char *text) {
if (resContext) resFile->disposeContext(resContext);
// replace the damaged area
mainWindow->invalidate(plaqRectBrass); // brass just happens to be the largest rect....
mainWindow->invalidate(&plaqRectBrass); // brass just happens to be the largest rect....
// return the result code
//return rInfo.result;

View File

@ -184,7 +184,7 @@ int16 openVidBox(char *fileName) {
quickRestorePalette();
// replace the damaged area
mainWindow->invalidate(area);
mainWindow->invalidate(&area);
// return the result code
return result;