diff options
author | Max Horn | 2003-07-27 23:45:43 +0000 |
---|---|---|
committer | Max Horn | 2003-07-27 23:45:43 +0000 |
commit | ff988094be7b5c3c96c7b304bec7c2439a8cccf4 (patch) | |
tree | 984a4a951c47a02f3fceeac2fa42c512b4434b18 /scumm | |
parent | 77c8eec439928964c230559569c38ef0fffed0c9 (diff) | |
download | scummvm-rg350-ff988094be7b5c3c96c7b304bec7c2439a8cccf4.tar.gz scummvm-rg350-ff988094be7b5c3c96c7b304bec7c2439a8cccf4.tar.bz2 scummvm-rg350-ff988094be7b5c3c96c7b304bec7c2439a8cccf4.zip |
init walkdata (fix for bug #770306); move Actor::Actor constructor from header to source file
svn-id: r9205
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/actor.cpp | 23 | ||||
-rw-r--r-- | scumm/actor.h | 22 |
2 files changed, 24 insertions, 21 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 2b0cd5d0ab..94dd4c0d1a 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -44,6 +44,29 @@ void Actor::initActorClass(Scumm *scumm) { } } +Actor::Actor() { + assert(_vm != 0); + top = bottom = 0; + number = 0; + needRedraw = needBgReset = costumeNeedsInit = visible = false; + flip = false; + speedx = 8; + speedy = 2; + frame = 0; + walkbox = 0; + animProgress = 0; + memset(animVariable, 0, sizeof(animVariable)); + memset(palette, 0, sizeof(palette)); + memset(sound, 0, sizeof(sound)); + memset(&cost, 0, sizeof(CostumeData)); + memset(&walkdata, 0, sizeof(ActorWalkData)); + walkdata.point3x = 32000; + + walkScript = 0; + + initActor(1); +} + void Actor::initActor(int mode) { if (mode == 1) { costume = 0; diff --git a/scumm/actor.h b/scumm/actor.h index 5748f557ee..a4d8f0466a 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -121,27 +121,7 @@ protected: public: - // Constructor, sets all data to 0 - Actor() { - assert(_vm != 0); - top = bottom = 0; - number = 0; - needRedraw = needBgReset = costumeNeedsInit = visible = false; - flip = false; - speedx = 8; - speedy = 2; - frame = 0; - walkbox = 0; - animProgress = 0; - memset(animVariable, 0, sizeof(animVariable)); - memset(palette, 0, sizeof(palette)); - memset(sound, 0, sizeof(sound)); - memset(&cost, 0, sizeof(CostumeData)); - - walkScript = 0; - - initActor(1); - } + Actor(); //protected: void hideActor(); |