29 #ifndef HUGO_DISPLAY_H 30 #define HUGO_DISPLAY_H 32 #include "graphics/surface.h" 33 #include "graphics/fonts/dosfont.h" 37 class SeekableReadStream;
42 enum OverlayState {kOvlUndef, kOvlForeground, kOvlBackground};
44 static const int kCenter = -1;
59 virtual void loadFont(int16 fontId) = 0;
62 int16 fontHeight()
const;
63 int16 stringLength(
const char *s)
const;
65 void displayBackground();
66 virtual void displayFrame(
const int sx,
const int sy,
Seq *seq,
const bool foreFl) = 0;
67 void displayList(
int update, ...);
68 void displayRect(
const int16 x,
const int16 y,
const int16 dx,
const int16 dy);
69 void drawBoundaries();
70 void drawRectangle(
const bool filledFl,
const int16 x1,
const int16 y1,
const int16 x2,
const int16 y2,
const int color);
71 void drawShape(
const int x,
const int y,
const int color1,
const int color2);
72 void updateStatusText();
73 void updatePromptText(
const char *command,
char cursor);
74 void drawStatusText();
75 void displayStatusText();
76 void drawPromptText();
77 void displayPromptText();
81 void initNewScreenDisplay();
83 void moveImage(
ImagePtr srcImage,
const int16 x1,
const int16 y1,
const int16 dx, int16 dy,
const int16 width1,
ImagePtr dstImage,
const int16 x2,
const int16 y2,
const int16 width2);
84 void remapPal(uint16 oldIndex, uint16 newIndex);
85 void resetInventoryObjId();
88 void setBackgroundColor(
const uint16 color);
90 void selectInventoryObjId(
const int16 objId);
91 void shadowStr(int16 sx,
const int16 sy,
const char *s,
const byte color);
93 void userHelp()
const;
94 void writeStr(int16 sx,
const int16 sy,
const char *s,
const byte color);
95 Common::Rect drawDosText(byte x, byte y,
const char *text, byte color);
96 byte getDosMessageBoxBorder()
const;
101 Icondib &getIconBuffer();
102 Viewdib &getBackBuffer();
103 Viewdib &getBackBufferBackup();
104 Viewdib &getFrontBuffer();
105 Viewdib &getGUIBuffer();
110 static const int kRectListSize = 16;
111 static const int kBlitListSize = kRectListSize * 2;
112 static const int kShapeSize = 24;
113 static const int kFontLength = 128;
114 static const int kFontSize = 1200;
115 static const int kNumFonts = 3;
116 static const byte stdMouseCursorHeight = 20;
117 static const byte stdMouseCursorWidth = 12;
119 bool fontLoadedFl[kNumFonts];
122 byte *_arrayFont[kNumFonts];
124 byte _fontdata[kNumFonts][kFontSize];
125 byte *_font[kNumFonts][kFontLength];
126 int16 _arrayFontSize[kNumFonts];
133 Viewdib _frontBuffer;
136 inline bool isInX(
const int16 x,
const Rect *rect)
const;
137 inline bool isInY(
const int16 y,
const Rect *rect)
const;
138 inline bool isOverlapping(
const Rect *rectA,
const Rect *rectB)
const;
141 byte _iconImage[kInvDx * kInvDy];
145 int16 mergeLists(
Rect *list,
Rect *blist,
const int16 len, int16 blen);
146 int16 center(
const char *s)
const;
150 Viewdib _backBufferBackup;
151 Viewdib _frontBufferBoxBackup;
154 int16 _dlAddIndex, _dlRestoreIndex;
155 Rect _dlRestoreList[kRectListSize];
156 Rect _dlAddList[kRectListSize];
157 Rect _dlBlistList[kBlitListSize];
161 void merge(
const Rect *rectA,
Rect *rectB);
162 void writeChr(
const int sx,
const int sy,
const byte color,
const char *local_fontdata);
170 void loadFont(int16 fontId)
override;
173 void displayFrame(
const int sx,
const int sy,
Seq *seq,
const bool foreFl)
override;
177 OverlayState findOvl(
Seq *seqPtr,
ImagePtr dstPtr, uint16 y);
185 void loadFont(int16 fontId)
override;
188 void displayFrame(
const int sx,
const int sy,
Seq *seq,
const bool foreFl)
override;
192 OverlayState findOvl(
Seq *seqPtr,
ImagePtr dstPtr, uint16 y);
197 #endif //HUGO_DISPLAY_H
byte * ImagePtr
Definition: game.h:97
Definition: algorithm.h:29
Definition: display.h:180
Definition: display.h:165
Definition: keyboard.h:294