aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorLars Persson2006-03-09 13:54:36 +0000
committerLars Persson2006-03-09 13:54:36 +0000
commit04151343a78f28c4d58a1a48c1e352888ee4f71c (patch)
treeb7daf56b9618d75629ceeac0acf0d80c0632a47e /engines/lure
parent1d14d18893134ece3819a4c8ff92c10073c2d076 (diff)
downloadscummvm-rg350-04151343a78f28c4d58a1a48c1e352888ee4f71c.tar.gz
scummvm-rg350-04151343a78f28c4d58a1a48c1e352888ee4f71c.tar.bz2
scummvm-rg350-04151343a78f28c4d58a1a48c1e352888ee4f71c.zip
Compile fixes for VC6
svn-id: r21179
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/res_struct.h9
-rw-r--r--engines/lure/room.cpp5
-rw-r--r--engines/lure/surface.cpp7
3 files changed, 12 insertions, 9 deletions
diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h
index 2b1384a056..86f2a0b779 100644
--- a/engines/lure/res_struct.h
+++ b/engines/lure/res_struct.h
@@ -184,6 +184,7 @@ struct TalkResponseResource {
template <class T>
class ManagedList: public Common::List<T> {
+ typedef typename Common::List<T> Common_List;
public:
~ManagedList() {
clear();
@@ -191,14 +192,14 @@ public:
void clear() {
typename Common::List<T>::iterator i;
- for (i = Common::List<T>::begin(); i != Common::List<T>::end(); ++i)
+ for (i = Common_List::begin(); i != Common_List::end(); ++i)
delete *i;
- Common::List<T>::clear();
+ Common_List::clear();
}
typename Common::List<T>::iterator erase(typename Common::List<T>::iterator pos) {
delete *pos;
- return Common::List<T>::erase(pos);
+ return Common_List::erase(pos);
}
typename Common::List<T>::iterator erase(typename Common::List<T>::iterator first,
@@ -206,7 +207,7 @@ public:
typename Common::List<T>::iterator i;
for (i = first; i != last; ++i)
delete *i;
- return Common::List<T>::erase(first, last);
+ return Common_List::erase(first, last);
}
};
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index f6f5ec233b..e27f9cfbdb 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -36,14 +36,15 @@ RoomLayer::RoomLayer(uint16 screenId, bool backgroundLayer):
Surface(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT) {
loadScreen(screenId);
byte *screenData = data().data();
+ int cellY;
// Reset all the cells to false
- for (int cellY = 0; cellY < FULL_VERT_RECTS; ++cellY)
+ for (cellY = 0; cellY < FULL_VERT_RECTS; ++cellY)
for (int cellX = 0; cellX < FULL_HORIZ_RECTS; ++cellX)
_cells[cellY][cellX] = false;
// Loop through each cell of the screen
- for (int cellY = 0; cellY < NUM_VERT_RECTS; ++cellY) {
+ for (cellY = 0; cellY < NUM_VERT_RECTS; ++cellY) {
for (int cellX = 0; cellX < NUM_HORIZ_RECTS; ++cellX) {
bool hasPixels = false;
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index ed64eab918..2205a7ea13 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -234,23 +234,24 @@ void Surface::createDialog(bool blackFlag) {
byte *pDest = _data->data();
uint16 xCenter = _width - DIALOG_EDGE_SIZE * 2;
uint16 yCenter = _height - DIALOG_EDGE_SIZE * 2;
+ int y;
// Dialog top
- for (int y = 0; y < 9; ++y) {
+ for (y = 0; y < 9; ++y) {
copyLine(pSrc, pDest, DIALOG_EDGE_SIZE - 2, xCenter + 2, DIALOG_EDGE_SIZE);
pSrc += (DIALOG_EDGE_SIZE - 2) + 1 + DIALOG_EDGE_SIZE;
pDest += _width;
}
// Dialog sides - note that the same source data gets used for all side lines
- for (int y = 0; y < yCenter; ++y) {
+ for (y = 0; y < yCenter; ++y) {
copyLine(pSrc, pDest, DIALOG_EDGE_SIZE, xCenter, DIALOG_EDGE_SIZE);
pDest += _width;
}
pSrc += DIALOG_EDGE_SIZE * 2 + 1;
// Dialog bottom
- for (int y = 0; y < 9; ++y) {
+ for (y = 0; y < 9; ++y) {
copyLine(pSrc, pDest, DIALOG_EDGE_SIZE, xCenter + 1, DIALOG_EDGE_SIZE - 1);
pSrc += DIALOG_EDGE_SIZE + 1 + (DIALOG_EDGE_SIZE - 1);
pDest += _width;