aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/draw.cpp')
-rw-r--r--engines/gob/draw.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp
index 960f4e9e34..ae1bbd4e8e 100644
--- a/engines/gob/draw.cpp
+++ b/engines/gob/draw.cpp
@@ -24,6 +24,7 @@
*/
#include "common/endian.h"
+#include "common/str.h"
#include "gob/gob.h"
#include "gob/draw.h"
@@ -328,7 +329,7 @@ void Draw::adjustCoords(char adjust, int16 *coord1, int16 *coord2) {
if (coord2)
*coord2 *= 2;
if (coord1)
- *coord2 *= 2;
+ *coord1 *= 2;
break;
case 1:
@@ -470,10 +471,8 @@ void Draw::oPlaytoons_sub_F_1B(uint16 id, int16 left, int16 top, int16 right, in
else
WRITE_VAR(24, (uint32) 0);
WRITE_VAR(25, (uint32) shortId);
- if (_hotspotText) {
- strncpy(_hotspotText, paramStr, 40);
- _hotspotText[39] = 0;
- }
+ if (_hotspotText)
+ Common::strlcpy(_hotspotText, paramStr, 40);
}
_vm->_inter->funcBlock(0);
_vm->_game->_script->pop();
@@ -640,10 +639,11 @@ void Draw::wobble(Surface &surfDesc) {
}
Font *Draw::loadFont(const char *path) const {
- if (!_vm->_dataIO->existData(path))
+ if (!_vm->_dataIO->hasFile(path))
return 0;
- byte *data = _vm->_dataIO->getData(path);
+ int32 size;
+ byte *data = _vm->_dataIO->getFile(path, size);
return new Font(data);
}