aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/text32.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics/text32.h')
-rw-r--r--engines/sci/graphics/text32.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/engines/sci/graphics/text32.h b/engines/sci/graphics/text32.h
index 113fbb46a2..4c1e53d971 100644
--- a/engines/sci/graphics/text32.h
+++ b/engines/sci/graphics/text32.h
@@ -30,20 +30,6 @@
namespace Sci {
-struct TextEntry {
- reg_t object;
- uint16 x;
- uint16 y;
- uint16 width;
- uint16 height;
- byte *surface;
- Common::String text;
-};
-
-// TODO: Move to Cache, perhaps?
-#define MAX_CACHED_TEXTS 20
-typedef Common::HashMap<uint32, TextEntry *> TextCache;
-
/**
* Text32 class, handles text calculation and displaying of text for SCI2, SCI21 and SCI3 games
*/
@@ -52,22 +38,21 @@ public:
GfxText32(SegManager *segMan, GfxCache *fonts, GfxScreen *screen);
~GfxText32();
reg_t createTextBitmap(reg_t textObject, uint16 maxWidth = 0, uint16 maxHeight = 0);
- void drawTextBitmap(reg_t textObject, uint16 textX, uint16 textY, uint16 planeWidth);
+ void disposeTextBitmap(reg_t hunkId);
+ void drawTextBitmap(reg_t textObject);
int16 GetLongest(const char *text, int16 maxWidth, GfxFont *font);
- TextEntry *getTextEntry(reg_t textObject);
void kernelTextSize(const char *text, int16 font, int16 maxWidth, int16 *textWidth, int16 *textHeight);
private:
- TextEntry *createTextEntry(reg_t textObject, uint16 maxWidth, uint16 maxHeight);
int16 Size(Common::Rect &rect, const char *text, GuiResourceId fontId, int16 maxWidth);
void Width(const char *text, int16 from, int16 len, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight, bool restoreFont);
void StringWidth(const char *str, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight);
- void purgeCache();
+ Common::Rect getPlaneRect(reg_t textObject);
+ Common::Rect getNSRect(reg_t textObject);
SegManager *_segMan;
GfxCache *_cache;
- TextCache _textCache;
GfxScreen *_screen;
};