aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/viewmgr.h
diff options
context:
space:
mode:
authorPaul Gilbert2010-03-23 12:02:23 +0000
committerPaul Gilbert2010-03-23 12:02:23 +0000
commitb46a2b4e100e3018d604da240cecf936c629e8a0 (patch)
treec9cd258d0e9181a2cbaea51611971ee94d58b6b6 /engines/m4/viewmgr.h
parent9571c817c7b7f30ed33ff5d4a07d80b8cea4f8c1 (diff)
downloadscummvm-rg350-b46a2b4e100e3018d604da240cecf936c629e8a0.tar.gz
scummvm-rg350-b46a2b4e100e3018d604da240cecf936c629e8a0.tar.bz2
scummvm-rg350-b46a2b4e100e3018d604da240cecf936c629e8a0.zip
Added further code for the game dialog framework
svn-id: r48368
Diffstat (limited to 'engines/m4/viewmgr.h')
-rw-r--r--engines/m4/viewmgr.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/engines/m4/viewmgr.h b/engines/m4/viewmgr.h
index dccfffb8aa..308240645d 100644
--- a/engines/m4/viewmgr.h
+++ b/engines/m4/viewmgr.h
@@ -32,6 +32,7 @@
#include "common/events.h"
#include "common/rect.h"
+#include "m4/font.h"
#include "m4/globals.h"
#include "m4/events.h"
#include "m4/graphics.h"
@@ -147,6 +148,71 @@ protected:
bool _transparent;
};
+class MadsSpriteSlot {
+public:
+ int spriteId;
+ int timerIndex;
+ int spriteListIndex;
+ int frameNumber;
+ int width;
+ int height;
+ int depth;
+ int scale;
+
+ MadsSpriteSlot() { };
+};
+
+#define SPRITE_SLOTS_SIZE 50
+
+class MadsTextDisplayEntry {
+public:
+ bool active;
+ int spacing;
+ Common::Rect bounds;
+ int active2;
+ uint8 colour1;
+ uint8 colour2;
+ Font *font;
+ const char *msg;
+
+ MadsTextDisplayEntry() { active = false; }
+};
+
+#define TEXT_DISPLAY_SIZE 40
+
+class MadsTextDisplay {
+private:
+ MadsTextDisplayEntry _entries[TEXT_DISPLAY_SIZE];
+public:
+ MadsTextDisplay();
+
+ MadsTextDisplayEntry &operator[](int idx) {
+ assert(idx < TEXT_DISPLAY_SIZE);
+ return _entries[idx];
+ }
+
+ int setActive2(int idx) {
+ assert(idx < TEXT_DISPLAY_SIZE);
+ _entries[idx].active2 = -1;
+ }
+
+ int add(int xp, int yp, uint fontColour, int charSpacing, const char *msg, Font *font);
+ void draw(View *view);
+};
+
+class MadsView: public View {
+protected:
+ MadsSpriteSlot _spriteSlots[SPRITE_SLOTS_SIZE];
+ MadsTextDisplay _textDisplay;
+ int _spriteSlotsStart;
+
+ int getSpriteSlotsIndex();
+public:
+ MadsView(MadsM4Engine *vm, const Common::Rect &viewBounds, bool transparent = false);
+ MadsView(MadsM4Engine *vm, int x = 0, int y = 0, bool transparent = false);
+
+};
+
class ViewManager {
private:
MadsM4Engine *_vm;