aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/room.h
diff options
context:
space:
mode:
authorMatthew Stewart2018-07-18 23:53:21 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commitac9cd1f00a28b09dd0202c90a2fe023bc8cba525 (patch)
treebb3666dcdc40ab72f6e6917c8de1881d40b65ab2 /engines/startrek/room.h
parenta024a3fd4501a0ab41ffdd62f65914f2307bdf22 (diff)
downloadscummvm-rg350-ac9cd1f00a28b09dd0202c90a2fe023bc8cba525.tar.gz
scummvm-rg350-ac9cd1f00a28b09dd0202c90a2fe023bc8cba525.tar.bz2
scummvm-rg350-ac9cd1f00a28b09dd0202c90a2fe023bc8cba525.zip
STARTREK: Implement fixed-point decimal class
Diffstat (limited to 'engines/startrek/room.h')
-rw-r--r--engines/startrek/room.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 1442e90162..434ff76eb2 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -27,6 +27,7 @@
#include "common/ptr.h"
#include "common/str.h"
+#include "startrek/fixedint.h"
#include "startrek/startrek.h"
#include "startrek/text.h"
@@ -60,11 +61,13 @@ public:
// Helper stuff for RDF access
uint16 readRdfWord(int offset);
- // Scale-related stuff (rename these later)
- uint16 getVar06() { return readRdfWord(0x06); }
- uint16 getVar08() { return readRdfWord(0x08); }
- uint16 getVar0a() { return readRdfWord(0x0a); }
- uint16 getVar0c() { return readRdfWord(0x0c); }
+ // Scale-related stuff; at the "min Y" position or below, the crewmembers have
+ // "minimum" scale; that value rises to the "max scale" value by the time they reach
+ // the "max Y" value.
+ uint16 getMaxY() { return readRdfWord(0x06); }
+ uint16 getMinY() { return readRdfWord(0x08); }
+ Fixed16 getMinScale() { return Fixed16::fromRaw(readRdfWord(0x0a)); }
+ Fixed16 getMaxScale() { return Fixed16::fromRaw(readRdfWord(0x0c)); }
// words 0x0e and 0x10 in RDF file are pointers to start and end of event code.
// That code is instead rewritten on a per-room basis.