aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/user_interface.h
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-18 22:37:33 -0400
committerPaul Gilbert2014-03-18 22:37:33 -0400
commit5b4b7a5ca972f533c7a6129e84fd5d26e3b2ebb6 (patch)
treec815932473b1e5a32ce22a0d70cf9f41fe6a1f8f /engines/mads/user_interface.h
parent4875c83f1023585ff7c807f5633aac84eb5e3c2b (diff)
downloadscummvm-rg350-5b4b7a5ca972f533c7a6129e84fd5d26e3b2ebb6.tar.gz
scummvm-rg350-5b4b7a5ca972f533c7a6129e84fd5d26e3b2ebb6.tar.bz2
scummvm-rg350-5b4b7a5ca972f533c7a6129e84fd5d26e3b2ebb6.zip
MADS: Finished UISlots::draw method
Diffstat (limited to 'engines/mads/user_interface.h')
-rw-r--r--engines/mads/user_interface.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/engines/mads/user_interface.h b/engines/mads/user_interface.h
index a474fe1fa1..9d2af0425d 100644
--- a/engines/mads/user_interface.h
+++ b/engines/mads/user_interface.h
@@ -27,6 +27,7 @@
#include "common/rect.h"
#include "common/str.h"
#include "mads/msurface.h"
+#include "mads/screen.h"
namespace MADS {
@@ -47,18 +48,42 @@ public:
UISlot();
};
+/**
+ * Sprite list for the user interface
+ */
class UISlots : public Common::Array<UISlot> {
+private:
+ MADSEngine *_vm;
public:
+ /**
+ * Constructor
+ */
+ UISlots(MADSEngine *vm) : _vm(vm) {}
+
+ /**
+ * Add a sprite to the list
+ */
void add(const Common::Point &pt, int frameNumber, int spritesIndex);
+
+ /**
+ * Adds a special entry for full refresh of the user interface
+ */
void fullRefresh();
- void draw(int v1, int v2);
+ /**
+ * Draw all the sprites in the list on the user interface.
+ * @param updateFlag Flag drawn areas to be updated on physical screen
+ * @param delFlag Controls how used slots are deleted after drawing
+ */
+ void draw(bool updateFlag, bool delFlag);
};
class UserInterface : public MSurface {
+ friend class UISlots;
private:
MADSEngine *_vm;
+ MSurface _surface;
int _invSpritesIndex;
int _invFrameNumber;
@@ -114,11 +139,12 @@ private:
*/
void inventoryAnim();
public:
+ UISlots _uiSlots;
+ DirtyAreas _dirtyAreas;
ScrCategory _category;
int _screenObjectsCount;
- Common::Rect _bounds;
+ Common::Rect _drawBounds;
Common::Rect *_rectP;
- MSurface _surface;
int _inventoryTopIndex;
int _objectY;
int _selectedInvIndex;
@@ -128,7 +154,6 @@ public:
int _v1A;
int _v1C;
int _v1E;
- UISlots _uiSlots;
public:
/**
* Constructor