diff options
author | yinsimei | 2017-05-30 09:59:56 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-13 18:27:45 +0200 |
commit | 8c59f8deac6da7fd3b46234b70ca1cea428ca1f5 (patch) | |
tree | 5ceb323ae2ac20c28120084726330b17bbd2861c /engines/sludge/floor.cpp | |
parent | b920f61a111b2dddac41b44a318c9078dea833ff (diff) | |
download | scummvm-rg350-8c59f8deac6da7fd3b46234b70ca1cea428ca1f5.tar.gz scummvm-rg350-8c59f8deac6da7fd3b46234b70ca1cea428ca1f5.tar.bz2 scummvm-rg350-8c59f8deac6da7fd3b46234b70ca1cea428ca1f5.zip |
SLUDGE: Replace sludge stream reading functions by scummvm ones
Diffstat (limited to 'engines/sludge/floor.cpp')
-rw-r--r-- | engines/sludge/floor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sludge/floor.cpp b/engines/sludge/floor.cpp index ec5738728f..cfb64d5b4a 100644 --- a/engines/sludge/floor.cpp +++ b/engines/sludge/floor.cpp @@ -135,7 +135,7 @@ bool setFloor(int fileNum) { // Find out how many polygons there are and reserve memory currentFloor->originalNum = fileNum; - currentFloor->numPolygons = getch(bigDataFile); + currentFloor->numPolygons = bigDataFile->readByte(); currentFloor->polygon = new floorPolygon[currentFloor->numPolygons]; if (!checkNew(currentFloor->polygon)) return false; @@ -146,7 +146,7 @@ bool setFloor(int fileNum) { // Find out how many vertex IDs there are and reserve memory - currentFloor->polygon[i].numVertices = getch(bigDataFile); + currentFloor->polygon[i].numVertices = bigDataFile->readByte(); currentFloor->polygon[i].vertexID = new int[currentFloor->polygon[i].numVertices]; if (!checkNew(currentFloor->polygon[i].vertexID)) @@ -155,21 +155,21 @@ bool setFloor(int fileNum) { // Read in each vertex ID for (j = 0; j < currentFloor->polygon[i].numVertices; j++) { - currentFloor->polygon[i].vertexID[j] = get2bytes(bigDataFile); + currentFloor->polygon[i].vertexID[j] = bigDataFile->readUint16BE(); } } // Find out how many vertices there are and reserve memory - i = get2bytes(bigDataFile); + i = bigDataFile->readUint16BE(); currentFloor->vertex = new POINT[i]; if (!checkNew(currentFloor->vertex)) return false; for (j = 0; j < i; j++) { - currentFloor->vertex[j].x = get2bytes(bigDataFile); - currentFloor->vertex[j].y = get2bytes(bigDataFile); + currentFloor->vertex[j].x = bigDataFile->readUint16BE(); + currentFloor->vertex[j].y = bigDataFile->readUint16BE(); } finishAccess(); |