aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/screentext.h
diff options
context:
space:
mode:
authorjohndoe1232014-04-11 09:40:54 +0200
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit2e149cf651ee9344ee96ea904c5dce5a444aeaff (patch)
tree5fb2c760d303a4db0856cbc4de7c94609d8b4238 /engines/illusions/screentext.h
parent67366aa04b723fadec300cc6ce1d5c6ee9241af7 (diff)
downloadscummvm-rg350-2e149cf651ee9344ee96ea904c5dce5a444aeaff.tar.gz
scummvm-rg350-2e149cf651ee9344ee96ea904c5dce5a444aeaff.tar.bz2
scummvm-rg350-2e149cf651ee9344ee96ea904c5dce5a444aeaff.zip
ILLUSIONS: More work on Duckman
- Implement Duckman cursor and interaction handling - Add more script opcodes - Add TextDrawer and ScreenText (needs minor refactoring for BBDOU)
Diffstat (limited to 'engines/illusions/screentext.h')
-rw-r--r--engines/illusions/screentext.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/engines/illusions/screentext.h b/engines/illusions/screentext.h
new file mode 100644
index 0000000000..4340224bdb
--- /dev/null
+++ b/engines/illusions/screentext.h
@@ -0,0 +1,77 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef ILLUSIONS_SCREENTEXT_H
+#define ILLUSIONS_SCREENTEXT_H
+
+#include "illusions/graphics.h"
+#include "common/list.h"
+#include "common/rect.h"
+#include "graphics/surface.h"
+
+namespace Illusions {
+
+class IllusionsEngine;
+class FontResource;
+
+struct ScreenTextInfo {
+ Common::Point _position;
+ WidthHeight _dimensions;
+ Common::Point _offsPt;
+ uint32 _fontId;
+ uint16 _color2;
+ uint16 _color1;
+ byte _colorR, _colorG, _colorB;
+ uint _flags;
+};
+
+struct ScreenTextEntry {
+ ScreenTextInfo _info;
+ uint16 _text[1024];
+};
+
+class ScreenText {
+public:
+ ScreenText(IllusionsEngine *vm);
+ ~ScreenText();
+ void getTextInfoDimensions(WidthHeight &textInfoDimensions);
+ void setTextInfoPosition(Common::Point position);
+ void updateTextInfoPosition(Common::Point position);
+ void clipTextInfoPosition(Common::Point &position);
+ bool refreshScreenText(FontResource *font, WidthHeight dimensions, Common::Point offsPt,
+ uint16 *text, uint textFlags, uint16 color2, uint16 color1, uint16 *&outTextPtr);
+ bool insertText(uint16 *text, uint32 fontId, WidthHeight dimensions, Common::Point offsPt, uint flags,
+ uint16 color2, uint16 color1, byte colorR, byte colorG, byte colorB, uint16 *&outTextPtr);
+ void removeText();
+ void clearText();
+public:
+ IllusionsEngine *_vm;
+ Common::Point _position;
+ WidthHeight _dimensions;
+ Graphics::Surface *_surface;
+ Common::List<ScreenTextEntry*> _screenTexts;
+ void freeTextSurface();
+};
+
+} // End of namespace Illusions
+
+#endif // ILLUSIONS_SCREENTEXT_H