diff options
author | Einar Johan Trøan Sømåen | 2012-07-22 22:55:54 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-22 22:55:54 +0200 |
commit | f6a5a2a0d57d2e0829aa93ac0b30d3c0e1bf8838 (patch) | |
tree | 11fc0f9994c0e938027f767dc5e054bd42c921fd /engines/wintermute/ad/ad_node_state.cpp | |
parent | 30ada3c13f63ef35ccdd21ca76fb45aa9fb1dc3c (diff) | |
download | scummvm-rg350-f6a5a2a0d57d2e0829aa93ac0b30d3c0e1bf8838.tar.gz scummvm-rg350-f6a5a2a0d57d2e0829aa93ac0b30d3c0e1bf8838.tar.bz2 scummvm-rg350-f6a5a2a0d57d2e0829aa93ac0b30d3c0e1bf8838.zip |
WINTERMUTE: Wrap away base_script_holder's _filename field in getters/setters, avoiding direct writes.
Diffstat (limited to 'engines/wintermute/ad/ad_node_state.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_node_state.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/wintermute/ad/ad_node_state.cpp b/engines/wintermute/ad/ad_node_state.cpp index 12bd275614..fca2600884 100644 --- a/engines/wintermute/ad/ad_node_state.cpp +++ b/engines/wintermute/ad/ad_node_state.cpp @@ -139,11 +139,11 @@ bool AdNodeState::transferEntity(AdEntity *entity, bool includingSprites, bool s for (int i = 0; i < 7; i++) {
if (entity->_caption[i]) setCaption(entity->_caption[i], i);
}
- if (!entity->_region && entity->_sprite && entity->_sprite->_filename) {
- if (includingSprites) setFilename(entity->_sprite->_filename);
+ if (!entity->_region && entity->_sprite && entity->_sprite->getFilename()) {
+ if (includingSprites) setFilename(entity->_sprite->getFilename());
else setFilename("");
}
- if (entity->_cursor && entity->_cursor->_filename) setCursor(entity->_cursor->_filename);
+ if (entity->_cursor && entity->_cursor->getFilename()) setCursor(entity->_cursor->getFilename());
_alphaColor = entity->_alphaColor;
_active = entity->_active;
} else {
@@ -151,11 +151,11 @@ bool AdNodeState::transferEntity(AdEntity *entity, bool includingSprites, bool s if (_caption[i]) entity->setCaption(_caption[i], i);
}
if (_filename && !entity->_region && includingSprites && strcmp(_filename, "") != 0) {
- if (!entity->_sprite || !entity->_sprite->_filename || scumm_stricmp(entity->_sprite->_filename, _filename) != 0)
+ if (!entity->_sprite || !entity->_sprite->getFilename() || scumm_stricmp(entity->_sprite->getFilename(), _filename) != 0)
entity->setSprite(_filename);
}
if (_cursor) {
- if (!entity->_cursor || !entity->_cursor->_filename || scumm_stricmp(entity->_cursor->_filename, _cursor) != 0)
+ if (!entity->_cursor || !entity->_cursor->getFilename() || scumm_stricmp(entity->_cursor->getFilename(), _cursor) != 0)
entity->setCursor(_cursor);
}
|