aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/myst.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-01-03 20:40:07 +0000
committerMatthew Hoops2011-01-03 20:40:07 +0000
commit8a77f49a59fd9e4f1444072fe67f27c7a86d97b1 (patch)
tree0c4469165277e7b22b3dcd4d061321753f8c48dc /engines/mohawk/myst.cpp
parentcdb5e55f75652f218549508838c68a6906f0489a (diff)
downloadscummvm-rg350-8a77f49a59fd9e4f1444072fe67f27c7a86d97b1.tar.gz
scummvm-rg350-8a77f49a59fd9e4f1444072fe67f27c7a86d97b1.tar.bz2
scummvm-rg350-8a77f49a59fd9e4f1444072fe67f27c7a86d97b1.zip
MOHAWK: Cleanup some spacing, formatting, and naming
svn-id: r55109
Diffstat (limited to 'engines/mohawk/myst.cpp')
-rw-r--r--engines/mohawk/myst.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 74e2c46b89..b4d035bdfb 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -71,7 +71,7 @@ MohawkEngine_Myst::MohawkEngine_Myst(OSystem *syst, const MohawkGameDescription
_transitionsEnabled = false;
// Engine tweaks
- // Disabling this makes engine behaviour as per
+ // Disabling this makes engine behavior as per
// original, including bugs, missing bits etc. :)
_tweaksEnabled = true;
@@ -127,11 +127,10 @@ MohawkEngine_Myst::~MohawkEngine_Myst() {
delete[] _view.conditionalImages;
delete[] _view.scriptResources;
- while(!_resources.empty()) {
- MystResource *temp = _resources.back();
- _resources.pop_back();
- delete temp;
- }
+ for (uint32 i = 0; i < _resources.size(); i++)
+ delete _resources[i];
+
+ _resources.clear();
}
// Uses cached data objects in preference to disk access
@@ -989,8 +988,8 @@ void MohawkEngine_Myst::drawResourceImages() {
_resources[i]->drawDataToScreen();
}
-void MohawkEngine_Myst::redrawResource(MystResourceType8 *_resource, bool update) {
- _resource->drawConditionalDataToScreen(_scriptParser->getVar(_resource->getType8Var()), update);
+void MohawkEngine_Myst::redrawResource(MystResourceType8 *resource, bool update) {
+ resource->drawConditionalDataToScreen(_scriptParser->getVar(resource->getType8Var()), update);
}
void MohawkEngine_Myst::redrawArea(uint16 var, bool update) {
@@ -1042,11 +1041,10 @@ MystResource *MohawkEngine_Myst::loadResource(Common::SeekableReadStream *rlstSt
}
void MohawkEngine_Myst::loadResources() {
- while(!_resources.empty()) {
- MystResource *temp = _resources.back();
- _resources.pop_back();
- delete temp;
- }
+ for (uint32 i = 0; i < _resources.size(); i++)
+ delete _resources[i];
+
+ _resources.clear();
if (!_view.rlst) {
debugC(kDebugResource, "No RLST present");
@@ -1061,6 +1059,7 @@ void MohawkEngine_Myst::loadResources() {
debugC(kDebugResource, "Resource #%d:", i);
_resources.push_back(loadResource(rlstStream, NULL));
}
+
delete rlstStream;
}