WINTERMUTE: Privatize members in AdSceneState

This commit is contained in:
Einar Johan Trøan Sømåen 2012-12-09 17:06:13 +01:00
parent 4985a89b36
commit 8f33a2ea0b
3 changed files with 6 additions and 1 deletions

View File

@ -1599,7 +1599,7 @@ AdSceneState *AdGame::getSceneState(const char *filename, bool saving) {
}
for (uint32 i = 0; i < _sceneStates.size(); i++) {
if (scumm_stricmp(_sceneStates[i]->_filename, filenameCor) == 0) {
if (scumm_stricmp(_sceneStates[i]->getFilename(), filenameCor) == 0) {
delete[] filenameCor;
return _sceneStates[i];
}

View File

@ -72,6 +72,9 @@ void AdSceneState::setFilename(const char *filename) {
}
}
const char *AdSceneState::getFilename() const {
return _filename;
}
//////////////////////////////////////////////////////////////////////////
AdNodeState *AdSceneState::getNodeState(const char *name, bool saving) {

View File

@ -39,9 +39,11 @@ class AdSceneState : public BaseClass {
public:
AdNodeState *getNodeState(const char *name, bool saving);
void setFilename(const char *filename);
const char *getFilename() const;
DECLARE_PERSISTENT(AdSceneState, BaseClass)
AdSceneState(BaseGame *inGame);
virtual ~AdSceneState();
private:
char *_filename;
BaseArray<AdNodeState *> _nodeStates;
};