aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/object.cpp
diff options
context:
space:
mode:
authorD G Turner2012-11-30 12:08:55 +0000
committerD G Turner2012-11-30 12:08:55 +0000
commit617f6179c1b96a1d2f8209dac8a3bf23da2415de (patch)
treec67454d143a44a045d9787bd39dcab091aeea253 /engines/dreamweb/object.cpp
parent9dc4542f3cda5aa055419bb0cc25cf06a3cc492a (diff)
downloadscummvm-rg350-617f6179c1b96a1d2f8209dac8a3bf23da2415de.tar.gz
scummvm-rg350-617f6179c1b96a1d2f8209dac8a3bf23da2415de.tar.bz2
scummvm-rg350-617f6179c1b96a1d2f8209dac8a3bf23da2415de.zip
DREAMWEB: Change various loop variables to uint, rather than size_t.
This is partly for readability and partly to avoid any possible portability issues i.e. though they should be the same, size_t is defined by system headers, whereas uint is defined within our build system. Also, replaced a array size calculation with our ARRAYSIZE macro.
Diffstat (limited to 'engines/dreamweb/object.cpp')
-rw-r--r--engines/dreamweb/object.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 1af9b036aa..bb9e9677d7 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -31,7 +31,7 @@ void DreamWebEngine::showRyanPage() {
void DreamWebEngine::findAllRyan() {
memset(_ryanInvList, 0xff, sizeof(_ryanInvList));
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
const DynObject *extra = getExAd(i);
if (extra->mapad[0] != kExObjectType)
continue;
@@ -47,8 +47,8 @@ void DreamWebEngine::findAllRyan() {
void DreamWebEngine::fillRyan() {
ObjectRef *inv = &_ryanInvList[_vars._ryanPage * 10];
findAllRyan();
- for (size_t i = 0; i < 2; ++i) {
- for (size_t j = 0; j < 5; ++j) {
+ for (uint i = 0; i < 2; ++i) {
+ for (uint j = 0; j < 5; ++j) {
obToInv(inv->_index, inv->_type, kInventx + j * kItempicsize, kInventy + i * kItempicsize);
++inv;
}
@@ -1130,7 +1130,7 @@ void DreamWebEngine::emergencyPurge() {
void DreamWebEngine::purgeAnItem() {
const DynObject *extraObjects = _exData;
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 &&
extraObjects[i].initialLocation != _realLocation) {
deleteExObject(i);
@@ -1138,7 +1138,7 @@ void DreamWebEngine::purgeAnItem() {
}
}
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) {
deleteExObject(i);
return;