aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authormd52011-03-20 15:29:12 +0200
committermd52011-03-20 15:29:12 +0200
commit89f9c5a9c35834856bb3692fb30a9eb42606ec91 (patch)
treec357cf62e94a9ec4f518b797ee86c26583e21629 /engines/sci/graphics
parent4df049f4d7fccb794db45c932e5188296907dbc8 (diff)
downloadscummvm-rg350-89f9c5a9c35834856bb3692fb30a9eb42606ec91.tar.gz
scummvm-rg350-89f9c5a9c35834856bb3692fb30a9eb42606ec91.tar.bz2
scummvm-rg350-89f9c5a9c35834856bb3692fb30a9eb42606ec91.zip
SCI: Moved the engine hunk pointer processing code inside the GfxPorts class
This allows us make _windowList private again
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/ports.cpp11
-rw-r--r--engines/sci/graphics/ports.h4
2 files changed, 14 insertions, 1 deletions
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index aca278fe4a..cc206bd5b9 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -28,6 +28,7 @@
#include "sci/console.h"
#include "sci/sci.h"
#include "sci/engine/features.h"
+#include "sci/engine/gc.h"
#include "sci/engine/kernel.h"
#include "sci/engine/state.h"
#include "sci/engine/selector.h"
@@ -708,6 +709,16 @@ int16 GfxPorts::kernelPriorityToCoordinate(byte priority) {
return _priorityBottom;
}
+void GfxPorts::processEngineHunkList(WorklistManager &wm) {
+ for (PortList::const_iterator it = _windowList.begin(); it != _windowList.end(); ++it) {
+ if ((*it)->isWindow()) {
+ Window *wnd = ((Window *)*it);
+ wm.push(wnd->hSaved1);
+ wm.push(wnd->hSaved2);
+ }
+ }
+}
+
void GfxPorts::printWindowList(Console *con) {
for (PortList::const_iterator it = _windowList.begin(); it != _windowList.end(); ++it) {
if ((*it)->isWindow()) {
diff --git a/engines/sci/graphics/ports.h b/engines/sci/graphics/ports.h
index d14272791f..31ed671daf 100644
--- a/engines/sci/graphics/ports.h
+++ b/engines/sci/graphics/ports.h
@@ -35,6 +35,7 @@ namespace Sci {
class GfxPaint16;
class GfxScreen;
class GfxText16;
+struct WorklistManager;
// window styles
enum {
@@ -102,6 +103,7 @@ public:
void kernelGraphAdjustPriority(int top, int bottom);
byte kernelCoordinateToPriority(int16 y);
int16 kernelPriorityToCoordinate(byte priority);
+ void processEngineHunkList(WorklistManager &wm);
void printWindowList(Console *con);
Port *_wmgrPort;
@@ -115,10 +117,10 @@ public:
virtual void saveLoadWithSerializer(Common::Serializer &ser);
+private:
/** The list of open 'windows' (and ports), in visual order. */
PortList _windowList;
-private:
/** The list of all open 'windows' (and ports), ordered by their id. */
PortArray _windowsById;