aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/adl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/adl/adl.cpp')
-rw-r--r--engines/adl/adl.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index e0c0b3afae..442edb7b71 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -777,18 +777,18 @@ byte &AdlEngine::var(uint i) {
return _state.vars[i];
}
-void AdlEngine::loadWords(Common::ReadStream &stream, WordMap &map) {
+void AdlEngine::loadWords(Common::ReadStream &stream, WordMap &map) const {
uint index = 0;
while (1) {
++index;
- byte buf[kWordSize];
+ byte buf[IDI_WORD_SIZE];
- if (stream.read(buf, kWordSize) < kWordSize)
+ if (stream.read(buf, IDI_WORD_SIZE) < IDI_WORD_SIZE)
error("Error reading word list");
- Common::String word((char *)buf, kWordSize);
+ Common::String word((char *)buf, IDI_WORD_SIZE);
if (!map.contains(word))
map[word] = index;
@@ -802,10 +802,10 @@ void AdlEngine::loadWords(Common::ReadStream &stream, WordMap &map) {
break;
for (uint i = 0; i < synonyms; ++i) {
- if (stream.read((char *)buf, kWordSize) < kWordSize)
+ if (stream.read((char *)buf, IDI_WORD_SIZE) < IDI_WORD_SIZE)
error("Error reading word list");
- word = Common::String((char *)buf, kWordSize);
+ word = Common::String((char *)buf, IDI_WORD_SIZE);
if (!map.contains(word))
map[word] = index;
@@ -1038,7 +1038,7 @@ void AdlEngine::drawNextPixel(Common::Point &p, byte color, byte bits, byte quad
p.y += (bits & 2 ? 1 : -1);
}
-void AdlEngine::drawLineArt(const Common::Array<byte> &lineArt, Common::Point p, byte rotation, byte scaling, byte color) const {
+void AdlEngine::drawLineArt(const Common::Array<byte> &lineArt, const Common::Point &pos, byte rotation, byte scaling, byte color) const {
const byte stepping[] = {
0xff, 0xfe, 0xfa, 0xf4, 0xec, 0xe1, 0xd4, 0xc5,
0xb4, 0xa1, 0x8d, 0x78, 0x61, 0x49, 0x31, 0x18,
@@ -1050,6 +1050,8 @@ void AdlEngine::drawLineArt(const Common::Array<byte> &lineArt, Common::Point p,
byte xStep = stepping[rotation];
byte yStep = stepping[(rotation ^ 0xf) + 1] + 1;
+ Common::Point p(pos);
+
for (uint i = 0; i < lineArt.size(); ++i) {
byte b = lineArt[i];