29 #ifndef HUGO_DISPLAY_H 30 #define HUGO_DISPLAY_H 38 enum OverlayState {kOvlUndef, kOvlForeground, kOvlBackground};
40 static const int kCenter = -1;
55 virtual void loadFont(int16 fontId) = 0;
58 int16 fontHeight()
const;
59 int16 stringLength(
const char *s)
const;
61 void displayBackground();
62 void displayFrame(
const int sx,
const int sy,
Seq *seq,
const bool foreFl);
63 void displayList(
int update, ...);
64 void displayRect(
const int16 x,
const int16 y,
const int16 dx,
const int16 dy);
65 void drawBoundaries();
66 void drawRectangle(
const bool filledFl,
const int16 x1,
const int16 y1,
const int16 x2,
const int16 y2,
const int color);
67 void drawShape(
const int x,
const int y,
const int color1,
const int color2);
68 void drawStatusText();
72 void initNewScreenDisplay();
74 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);
75 void remapPal(uint16 oldIndex, uint16 newIndex);
76 void resetInventoryObjId();
79 void setBackgroundColor(
const uint16 color);
81 void selectInventoryObjId(
const int16 objId);
82 void shadowStr(int16 sx,
const int16 sy,
const char *s,
const byte color);
84 void userHelp()
const;
85 void writeStr(int16 sx,
const int16 sy,
const char *s,
const byte color);
87 Icondib &getIconBuffer();
88 Viewdib &getBackBuffer();
89 Viewdib &getBackBufferBackup();
90 Viewdib &getFrontBuffer();
91 Viewdib &getGUIBuffer();
96 static const int kRectListSize = 16;
97 static const int kBlitListSize = kRectListSize * 2;
98 static const int kShapeSize = 24;
99 static const int kFontLength = 128;
100 static const int kFontSize = 1200;
101 static const int kNumFonts = 3;
102 static const byte stdMouseCursorHeight = 20;
103 static const byte stdMouseCursorWidth = 12;
105 bool fontLoadedFl[kNumFonts];
108 byte *_arrayFont[kNumFonts];
110 byte _fontdata[kNumFonts][kFontSize];
111 byte *_font[kNumFonts][kFontLength];
113 int16 _arrayFontSize[kNumFonts];
115 Viewdib _frontBuffer;
117 inline bool isInX(
const int16 x,
const Rect *rect)
const;
118 inline bool isInY(
const int16 y,
const Rect *rect)
const;
119 inline bool isOverlapping(
const Rect *rectA,
const Rect *rectB)
const;
121 virtual OverlayState findOvl(
Seq *seqPtr,
ImagePtr dstPtr, uint16 y) = 0;
125 byte _iconImage[kInvDx * kInvDy];
130 int16 mergeLists(
Rect *list,
Rect *blist,
const int16 len, int16 blen);
131 int16 center(
const char *s)
const;
135 Viewdib _backBufferBackup;
138 int16 _dlAddIndex, _dlRestoreIndex;
139 Rect _dlRestoreList[kRectListSize];
140 Rect _dlAddList[kRectListSize];
141 Rect _dlBlistList[kBlitListSize];
145 void merge(
const Rect *rectA,
Rect *rectB);
146 void writeChr(
const int sx,
const int sy,
const byte color,
const char *local_fontdata);
154 void loadFont(int16 fontId)
override;
157 OverlayState findOvl(
Seq *seqPtr,
ImagePtr dstPtr, uint16 y)
override;
165 void loadFont(int16 fontId)
override;
168 OverlayState findOvl(
Seq *seqPtr,
ImagePtr dstPtr, uint16 y)
override;
173 #endif //HUGO_DISPLAY_H
byte * ImagePtr
Definition: game.h:96
Definition: algorithm.h:29
Definition: display.h:160
Definition: display.h:149