aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudvig Strigeus2001-10-16 12:20:22 +0000
committerLudvig Strigeus2001-10-16 12:20:22 +0000
commiteebe5f2f73ddede3051c06f5f47294559784363a (patch)
treea3dd785fc2c22c62724cbde75c81eec47d44c8a1
parent794163c1a334e9f99f7cdd70ab2c70fd7bd04737 (diff)
downloadscummvm-rg350-eebe5f2f73ddede3051c06f5f47294559784363a.tar.gz
scummvm-rg350-eebe5f2f73ddede3051c06f5f47294559784363a.tar.bz2
scummvm-rg350-eebe5f2f73ddede3051c06f5f47294559784363a.zip
made files compile on unix
svn-id: r3434
-rw-r--r--object.cpp13
-rw-r--r--resource.cpp5
-rw-r--r--scummvm.cpp5
3 files changed, 17 insertions, 6 deletions
diff --git a/object.cpp b/object.cpp
index 79bea00fbb..23ba1fc87b 100644
--- a/object.cpp
+++ b/object.cpp
@@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
+ * Revision 1.4 2001/10/16 12:20:18 strigeus
+ * made files compile on unix
+ *
* Revision 1.3 2001/10/16 10:01:47 strigeus
* preliminary DOTT support
*
@@ -401,10 +404,10 @@ void Scumm::loadRoomObjects() {
_objs[i].obj_nr = READ_LE_UINT16(&cdhd->obj_id);
#if defined(DOTT)
- _objs[i].numstrips = cdhd->w>>3;
- _objs[i].height = cdhd->h>>3;
- _objs[i].x_pos = cdhd->x>>3;
- _objs[i].y_pos = cdhd->y>>3;
+ _objs[i].numstrips = READ_LE_UINT16(&cdhd->w)>>3;
+ _objs[i].height = READ_LE_UINT16(&cdhd->h)>>3;
+ _objs[i].x_pos = ((int16)READ_LE_UINT16(&cdhd->x))>>3;
+ _objs[i].y_pos = ((int16)READ_LE_UINT16(&cdhd->y))>>3;
#else
_objs[i].numstrips = cdhd->w;
_objs[i].height = cdhd->h;
@@ -758,4 +761,4 @@ int Scumm::getDistanceBetween(bool is_obj_1, int b, int c, bool is_obj_2, int e,
return getDist(x,y,x2,y2) * 0xFF / ((i + j)>>1);
}
-#endif \ No newline at end of file
+#endif
diff --git a/resource.cpp b/resource.cpp
index bff925159a..f0efc07ee7 100644
--- a/resource.cpp
+++ b/resource.cpp
@@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
+ * Revision 1.4 2001/10/16 12:20:20 strigeus
+ * made files compile on unix
+ *
* Revision 1.3 2001/10/16 10:01:47 strigeus
* preliminary DOTT support
*
@@ -266,7 +269,7 @@ void Scumm::readIndexFile(int mode) {
void Scumm::readIndexFile() {
uint32 blocktype,itemsize;
int numblock = 0;
- int num;
+ int num, i;
debug(9, "readIndexFile()");
diff --git a/scummvm.cpp b/scummvm.cpp
index b6b3696d39..68ff70eff1 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
+ * Revision 1.8 2001/10/16 12:20:22 strigeus
+ * made files compile on unix
+ *
* Revision 1.7 2001/10/16 10:01:48 strigeus
* preliminary DOTT support
*
@@ -957,8 +960,10 @@ void CDECL debug(int level, const char *s, ...) {
}
void checkHeap() {
+#if defined(WIN32)
if (_heapchk() != _HEAPOK) {
error("Heap is invalid!");
}
+#endif
}