[Scummvm-cvs-logs] scummvm master -> 18df28f74da91105b8c1898bfe2351b22cbd435f

dreammaster dreammaster at scummvm.org
Sat Dec 20 05:38:01 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
18df28f74d ACCESS: Extra initialization for various classes


Commit: 18df28f74da91105b8c1898bfe2351b22cbd435f
    https://github.com/scummvm/scummvm/commit/18df28f74da91105b8c1898bfe2351b22cbd435f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-12-19T23:36:53-05:00

Commit Message:
ACCESS: Extra initialization for various classes

Changed paths:
    engines/access/access.cpp
    engines/access/amazon/amazon_game.cpp
    engines/access/amazon/amazon_logic.cpp
    engines/access/amazon/amazon_logic.h
    engines/access/animation.cpp
    engines/access/asurface.cpp
    engines/access/bubble_box.cpp
    engines/access/bubble_box.h
    engines/access/font.cpp
    engines/access/inventory.cpp
    engines/access/player.cpp
    engines/access/screen.cpp
    engines/access/scripts.cpp
    engines/access/video.cpp



diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 6ad1b22..39e6c2b 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 6c9a437..eb4fabd 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 7f802f3..d2ee17a 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 a1fb4ee..0d96248 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 548e7db..cc699a2 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 f45f121..e9a2e8a 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 e37a814..28c2119 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 0130344..0b3f139 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 da8f0b6..8af183f 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 8db62a4..df499ba 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 d547aed..bcd553c 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 d6fddb7..970a8f3 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 dfb9bd9..074c781 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 b7d5652..920c066 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() {






More information about the Scummvm-git-logs mailing list