aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/lines.cpp
diff options
context:
space:
mode:
authorStrangerke2013-02-18 01:37:21 +0100
committerStrangerke2013-02-18 01:37:21 +0100
commit7428af9a4c612b59cee7f55d867a00464b3dae64 (patch)
treebc72860f5075ff5c5bb755cea9b2b1584db51a5a /engines/hopkins/lines.cpp
parentccf07b8956aa6865f4b8c0ff52cbb89d50e0421f (diff)
downloadscummvm-rg350-7428af9a4c612b59cee7f55d867a00464b3dae64.tar.gz
scummvm-rg350-7428af9a4c612b59cee7f55d867a00464b3dae64.tar.bz2
scummvm-rg350-7428af9a4c612b59cee7f55d867a00464b3dae64.zip
HOPKINS: Replace casted READ_LE_UINT16 by the equivalent macro to improve readability
Diffstat (limited to 'engines/hopkins/lines.cpp')
-rw-r--r--engines/hopkins/lines.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index c4441e0da7..4cb2dd3d09 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -90,13 +90,13 @@ void LinesManager::loadLines(const Common::String &file) {
_linesNumb = 0;
_lastLine = 0;
byte *ptr = _vm->_fileManager.loadFile(file);
- for (int idx = 0; (int16)READ_LE_UINT16((uint16 *)ptr + (idx * 5)) != -1; idx++) {
+ for (int idx = 0; READ_LE_INT16((uint16 *)ptr + (idx * 5)) != -1; idx++) {
addLine(idx,
- (Directions)(int16)READ_LE_UINT16((uint16 *)ptr + (idx * 5)),
- (int16)READ_LE_UINT16((uint16 *)ptr + (idx * 5) + 1),
- (int16)READ_LE_UINT16((uint16 *)ptr + (idx * 5) + 2),
- (int16)READ_LE_UINT16((uint16 *)ptr + (idx * 5) + 3),
- (int16)READ_LE_UINT16((uint16 *)ptr + (idx * 5) + 4));
+ (Directions)READ_LE_INT16((uint16 *)ptr + (idx * 5)),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 1),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 2),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 3),
+ READ_LE_INT16((uint16 *)ptr + (idx * 5) + 4));
}
initRoute();
_vm->_globals.freeMemory(ptr);