TITANIC: Cleanup of CAutoAnimate class

This commit is contained in:
Paul Gilbert 2017-07-16 15:05:56 -04:00
parent 56384fb7db
commit 6c44b5762e
2 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ END_MESSAGE_MAP()
void CAutoAnimate::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_enabled, indent);
file->writeNumberLine(_fieldE4, indent);
file->writeNumberLine(_redo, indent);
file->writeNumberLine(_repeat, indent);
CBackground::save(file, indent);
}
@ -40,7 +40,7 @@ void CAutoAnimate::save(SimpleFile *file, int indent) {
void CAutoAnimate::load(SimpleFile *file) {
file->readNumber();
_enabled = file->readNumber();
_fieldE4 = file->readNumber();
_redo = file->readNumber();
_repeat = file->readNumber();
CBackground::load(file);
}
@ -53,7 +53,7 @@ bool CAutoAnimate::EnterViewMsg(CEnterViewMsg *msg) {
else
playMovie(flags);
if (!_fieldE4)
if (!_redo)
_enabled = false;
}

View File

@ -34,11 +34,11 @@ class CAutoAnimate : public CBackground {
bool InitializeAnimMsg(CInitializeAnimMsg *msg);
private:
bool _enabled;
int _fieldE4;
bool _redo;
bool _repeat;
public:
CLASSDEF;
CAutoAnimate() : CBackground(), _enabled(true), _fieldE4(1), _repeat(false) {}
CAutoAnimate() : CBackground(), _enabled(true), _redo(true), _repeat(false) {}
/**
* Save the data for the class to file