aboutsummaryrefslogtreecommitdiff
path: root/scumm/scumm.h
diff options
context:
space:
mode:
authorMax Horn2004-04-03 19:41:31 +0000
committerMax Horn2004-04-03 19:41:31 +0000
commit6aa6b49ed57cc5900baaff6698bad062ea2f198b (patch)
treea52cb80d6b9345d39f779ea2fab58462ead47892 /scumm/scumm.h
parent8f6ae7973e895e40ecbf84afa95a0aa81508113b (diff)
downloadscummvm-rg350-6aa6b49ed57cc5900baaff6698bad062ea2f198b.tar.gz
scummvm-rg350-6aa6b49ed57cc5900baaff6698bad062ea2f198b.tar.bz2
scummvm-rg350-6aa6b49ed57cc5900baaff6698bad062ea2f198b.zip
cleanup StringTab stuff
svn-id: r13448
Diffstat (limited to 'scumm/scumm.h')
-rw-r--r--scumm/scumm.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 40ea703584..164058c475 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -252,21 +252,33 @@ struct SentenceTab {
uint8 freezeCount;
};
-// TODO / FIXME: next time save game format changes, Fingolfin would like to
-// revise StringTab. In particular, all t_* fields can be removed, making some
-// code a bit cleaner & easier to understand.
-struct StringTab {
- int16 t_xpos, t_ypos;
- int16 t_right;
- int16 xpos, ypos;
+struct StringSlot {
+ int16 xpos;
+ int16 ypos;
int16 right;
- byte color, t_color;
- byte charset, t_charset;
- bool center, t_center;
- bool overhead, t_overhead;
- bool no_talk_anim, t_no_talk_anim;
+ byte color;
+ byte charset;
+ bool center;
+ bool overhead;
+ bool no_talk_anim;
+};
+
+struct StringTab : StringSlot {
+ StringSlot backup;
+
+ void backupString() {
+ StringSlot &s = *this;
+ backup = s;
+ }
+
+ void restoreString() {
+ StringSlot &s = *this;
+ s = backup;
+ }
};
+
+
enum WhereIsObject {
WIO_NOT_FOUND = -1,
WIO_INVENTORY = 0,
@@ -582,7 +594,6 @@ protected:
void copyScriptString(byte *dst);
int resStrLen(const byte *src) const;
void doSentence(int c, int b, int a);
- void setStringVars(int i);
/* Should be in Resource class */
File _fileHandle;