aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-02-18 16:18:10 -0600
committerColin Snover2017-04-22 19:28:36 -0500
commit8a5eb0c7844fc2103df24dae8002938ee57d2064 (patch)
tree93472cbffffd6838157da59106db3706bda09262
parent3ab1f5f4cc6aa79e755fc9688202e2386b74cf92 (diff)
downloadscummvm-rg350-8a5eb0c7844fc2103df24dae8002938ee57d2064.tar.gz
scummvm-rg350-8a5eb0c7844fc2103df24dae8002938ee57d2064.tar.bz2
scummvm-rg350-8a5eb0c7844fc2103df24dae8002938ee57d2064.zip
SCI32: Fix dumb typo in CelInfo32::toString
The typo was `if (kCelTypeColor)` instead of `if (type == kCelTypeColor)`. Changed to use a switch instead for improved clarity and code intelligence.
-rw-r--r--engines/sci/graphics/celobj32.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 351a8856b2..598a062f21 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -125,13 +125,14 @@ struct CelInfo32 {
}
inline Common::String toString() const {
- if (type == kCelTypeView) {
+ switch (type) {
+ case kCelTypeView:
return Common::String::format("view %u, loop %d, cel %d", resourceId, loopNo, celNo);
- } else if (type == kCelTypePic) {
+ case kCelTypePic:
return Common::String::format("pic %u, cel %d", resourceId, celNo);
- } else if (kCelTypeColor) {
+ case kCelTypeColor:
return Common::String::format("color %d", color);
- } else if (type == kCelTypeMem) {
+ case kCelTypeMem:
return Common::String::format("mem %04x:%04x", PRINT_REG(bitmap));
}
}