Skip to content
Permalink
Browse files

ACCESS: Extra initialization for various classes

  • Loading branch information
dreammaster committed Dec 20, 2014
1 parent 37b5ee2 commit 18df28f74da91105b8c1898bfe2351b22cbd435f
@@ -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() {
@@ -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);
}
@@ -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() {
@@ -242,6 +242,8 @@ class Ant : public AmazonManager {
class InactivePlayer : public ImageEntry {
public:
SpriteResource *_altSpritesPtr;

InactivePlayer() { _altSpritesPtr = nullptr; }
};

} // End of namespace Amazon
@@ -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;
@@ -102,14 +102,15 @@ 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;
_lastBoundsW = _lastBoundsH = 0;
_orgX1 = _orgY1 = 0;
_orgX2 = _orgY2 = 0;
_lColor = 0;
_maxChars = 0;
}

ASurface::~ASurface() {
@@ -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) {
@@ -49,10 +49,6 @@ class BubbleBox : public Manager {
Common::StringArray _nameIndex;
Common::String _bubbleTitle;
Common::String _bubbleDisplStr;
int _fieldD;
int _fieldE;
int _fieldF;
int _field10;

Common::Array<Common::Rect> _bubbles;
public:
@@ -27,6 +27,8 @@ namespace Access {
byte Font::_fontColors[4];

Font::Font() {
_bitWidth = 0;
_height = 0;
}

Font::~Font() {
@@ -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;
@@ -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() {
@@ -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;
@@ -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);
@@ -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() {

0 comments on commit 18df28f

Please sign in to comment.
You can’t perform that action at this time.