aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-12-19 23:36:53 -0500
committerPaul Gilbert2014-12-19 23:36:53 -0500
commit18df28f74da91105b8c1898bfe2351b22cbd435f (patch)
treeebf240f70843c9541f3ca7cbb82a695185dbcdf7
parent37b5ee24f520e46eae28c703d189939e0b18c65b (diff)
downloadscummvm-rg350-18df28f74da91105b8c1898bfe2351b22cbd435f.tar.gz
scummvm-rg350-18df28f74da91105b8c1898bfe2351b22cbd435f.tar.bz2
scummvm-rg350-18df28f74da91105b8c1898bfe2351b22cbd435f.zip
ACCESS: Extra initialization for various classes
-rw-r--r--engines/access/access.cpp3
-rw-r--r--engines/access/amazon/amazon_game.cpp9
-rw-r--r--engines/access/amazon/amazon_logic.cpp12
-rw-r--r--engines/access/amazon/amazon_logic.h2
-rw-r--r--engines/access/animation.cpp1
-rw-r--r--engines/access/asurface.cpp3
-rw-r--r--engines/access/bubble_box.cpp7
-rw-r--r--engines/access/bubble_box.h4
-rw-r--r--engines/access/font.cpp2
-rw-r--r--engines/access/inventory.cpp1
-rw-r--r--engines/access/player.cpp6
-rw-r--r--engines/access/screen.cpp1
-rw-r--r--engines/access/scripts.cpp2
-rw-r--r--engines/access/video.cpp8
14 files changed, 50 insertions, 11 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 6ad1b22408..39e6c2b530 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -41,6 +41,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_events = nullptr;
_files = nullptr;
_inventory = nullptr;
+ _midi = nullptr;
_player = nullptr;
_room = nullptr;
_screen = nullptr;
@@ -92,6 +93,8 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_vidX = _vidY = 0;
_cheatFl = false;
_restartFl = false;
+ _et = 0;
+ _printEnd = 0;
}
AccessEngine::~AccessEngine() {
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 6c9a437e77..eb4fabdad9 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -61,9 +61,16 @@ AmazonEngine::AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_helpTbl[1] = _help2;
_helpTbl[2] = _help3;
+ _chapter = 0;
+ _rawInactiveX = _rawInactiveY = 0;
+ _inactiveYOff = 0;
+ _hintLevel = 0;
+ _updateChapter = 0;
+ _oldTitleChapter = 0;
+ _iqValue = 0;
+
_chapterCells.push_back(CellIdent(0, 96, 17));
_inactive._spritesPtr = nullptr;
- _inactive._altSpritesPtr = nullptr;
_inactive._flags = _inactive._frameNumber = _inactive._offsetY = 0;
_inactive._position = Common::Point(0, 0);
}
diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp
index 7f802f3cde..d2ee17a230 100644
--- a/engines/access/amazon/amazon_logic.cpp
+++ b/engines/access/amazon/amazon_logic.cpp
@@ -1371,6 +1371,18 @@ River::River(AmazonEngine *vm) : PannedScene(vm) {
_deathCount = 0;
_oldScrollCol = 0;
_maxHits = 0;
+ _mapPtr = nullptr;
+ _canoeMoveCount = 0;
+ _canoeVXPos = 0;
+ _canoeFrame = 0;
+ _canoeDir = 0;
+ _canoeLane = 0;
+ _canoeYPos = 0;
+ _hitCount = 0;
+ _riverIndex = 0;
+ _topList = _botList = nullptr;
+ _deathType = 0;
+ _hitSafe = 0;
}
void River::setRiverPan() {
diff --git a/engines/access/amazon/amazon_logic.h b/engines/access/amazon/amazon_logic.h
index a1fb4eef77..0d962483e6 100644
--- a/engines/access/amazon/amazon_logic.h
+++ b/engines/access/amazon/amazon_logic.h
@@ -242,6 +242,8 @@ public:
class InactivePlayer : public ImageEntry {
public:
SpriteResource *_altSpritesPtr;
+
+ InactivePlayer() { _altSpritesPtr = nullptr; }
};
} // End of namespace Amazon
diff --git a/engines/access/animation.cpp b/engines/access/animation.cpp
index 548e7db02d..cc699a27e3 100644
--- a/engines/access/animation.cpp
+++ b/engines/access/animation.cpp
@@ -63,6 +63,7 @@ Animation::Animation(AccessEngine *vm, Common::SeekableReadStream *stream) : Man
_countdownTicks = stream->readUint16LE();
_currentLoopCount = stream->readSint16LE();
stream->readUint16LE(); // unk
+ _field10 = 0;
Common::Array<uint16> frameOffsets;
uint16 ofs;
diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp
index f45f121db4..e9a2e8a427 100644
--- a/engines/access/asurface.cpp
+++ b/engines/access/asurface.cpp
@@ -102,7 +102,7 @@ void ImageEntryList::addToList(ImageEntry &ie) {
int ASurface::_clipWidth;
int ASurface::_clipHeight;
-ASurface::ASurface() {
+ASurface::ASurface(): Graphics::Surface() {
_leftSkip = _rightSkip = 0;
_topSkip = _bottomSkip = 0;
_lastBoundsX = _lastBoundsY = 0;
@@ -110,6 +110,7 @@ ASurface::ASurface() {
_orgX1 = _orgY1 = 0;
_orgX2 = _orgY2 = 0;
_lColor = 0;
+ _maxChars = 0;
}
ASurface::~ASurface() {
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp
index e37a8142e8..28c211991c 100644
--- a/engines/access/bubble_box.cpp
+++ b/engines/access/bubble_box.cpp
@@ -27,13 +27,12 @@
namespace Access {
BubbleBox::BubbleBox(AccessEngine *vm) : Manager(vm) {
+ _startItem = 0;
+ _startBox = 0;
+ _charCol = _rowOff = 0;
_type = TYPE_2;
_bounds = Common::Rect(64, 32, 64 + 130, 32 + 122);
_bubbleDisplStr = "";
- _fieldD = 0;
- _fieldE = 0;
- _fieldF = 0;
- _field10 = 0;
}
void BubbleBox::load(Common::SeekableReadStream *stream) {
diff --git a/engines/access/bubble_box.h b/engines/access/bubble_box.h
index 0130344c7e..0b3f139520 100644
--- a/engines/access/bubble_box.h
+++ b/engines/access/bubble_box.h
@@ -49,10 +49,6 @@ public:
Common::StringArray _nameIndex;
Common::String _bubbleTitle;
Common::String _bubbleDisplStr;
- int _fieldD;
- int _fieldE;
- int _fieldF;
- int _field10;
Common::Array<Common::Rect> _bubbles;
public:
diff --git a/engines/access/font.cpp b/engines/access/font.cpp
index da8f0b6ec5..8af183f193 100644
--- a/engines/access/font.cpp
+++ b/engines/access/font.cpp
@@ -27,6 +27,8 @@ namespace Access {
byte Font::_fontColors[4];
Font::Font() {
+ _bitWidth = 0;
+ _height = 0;
}
Font::~Font() {
diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp
index 8db62a45fc..df499ba705 100644
--- a/engines/access/inventory.cpp
+++ b/engines/access/inventory.cpp
@@ -57,6 +57,7 @@ InventoryManager::InventoryManager(AccessEngine *vm) : Manager(vm) {
_startAboutItem = 0;
_startTravelItem = 0;
_iconDisplayFlag = true;
+ _boxNum = 0;
const char *const *names;
const int *combineP;
diff --git a/engines/access/player.cpp b/engines/access/player.cpp
index d547aedc1d..bcd553c6dc 100644
--- a/engines/access/player.cpp
+++ b/engines/access/player.cpp
@@ -73,6 +73,12 @@ Player::Player(AccessEngine *vm) : Manager(vm), ImageEntry() {
_playerDirection = NONE;
_xFlag = _yFlag = 0;
_inactiveYOff = 0;
+
+ _sideWalkMin = _sideWalkMax = 0;
+ _upWalkMin = _upWalkMax = 0;
+ _downWalkMin = _downWalkMax = 0;
+ _diagUpWalkMin = _diagUpWalkMax = 0;
+ _diagDownWalkMin = _diagDownWalkMax = 0;
}
Player::~Player() {
diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp
index d6fddb73b2..970a8f3079 100644
--- a/engines/access/screen.cpp
+++ b/engines/access/screen.cpp
@@ -56,6 +56,7 @@ Screen::Screen(AccessEngine *vm) : _vm(vm) {
_bufferBytesWide = _vWindowBytesWide = this->w;
_vWindowLinesTall = this->h;
+ _vWindowWidth = _vWindowHeight = 0;
_clipWidth = _vWindowBytesWide - 1;
_clipHeight = _vWindowLinesTall - 1;
_startCycle = 0;
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index dfb9bd963f..074c781352 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -29,10 +29,12 @@ namespace Access {
Scripts::Scripts(AccessEngine *vm) : Manager(vm) {
_resource = nullptr;
+ _specialFunction = -1;
_data = nullptr;
_sequence = 0;
_endFlag = false;
_returnCode = 0;
+ _scriptCommand = 0;
_choice = 0;
_choiceStart = 0;
_charsOrg = Common::Point(0, 0);
diff --git a/engines/access/video.cpp b/engines/access/video.cpp
index b7d5652e5b..920c066898 100644
--- a/engines/access/video.cpp
+++ b/engines/access/video.cpp
@@ -27,10 +27,16 @@ namespace Access {
VideoPlayer::VideoPlayer(AccessEngine *vm) : Manager(vm) {
_vidSurface = nullptr;
+ _videoData = nullptr;
+ _startCoord = nullptr;
+ _frameCount = 0;
+ _xCount = 0;
+ _scanCount = 0;
+ _frameSize = 0;
_videoFrame = 0;
_soundFlag = false;
_soundFrame = 0;
- _videoData = nullptr;
+ _videoEnd = false;
}
VideoPlayer::~VideoPlayer() {