Skip to content

Commit

Permalink
ACCESS: Refactor most of ASurface statics to instance variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 19, 2014
1 parent 864cab5 commit 95aa9a1
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 201 deletions.
9 changes: 5 additions & 4 deletions engines/access/access.cpp
Expand Up @@ -66,6 +66,8 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_scaleT1 = 0;
_scaleMaxY = 0;
_scaleI = 0;
_scrollCol = _scrollRow = 0;
_scrollX = _scrollY = 0;
_imgUnscaled = false;
_canSaveLoad = false;
_establish = nullptr;
Expand Down Expand Up @@ -139,7 +141,6 @@ void AccessEngine::initialize() {
}

// Create sub-objects of the engine
ASurface::init();
_animation = new AnimationManager(this);
_bubbleBox = new BubbleBox(this);
_char = new CharManager(this);
Expand Down Expand Up @@ -376,9 +377,9 @@ void AccessEngine::copyRects() {

void AccessEngine::copyBF1BF2() {
_buffer2.copyRectToSurface(_buffer1, 0, 0,
Common::Rect(_buffer1._scrollX, _buffer1._scrollY,
_buffer1._scrollX + _screen->_vWindowBytesWide,
_buffer1._scrollY + _screen->_vWindowLinesTall));
Common::Rect(_scrollX, _scrollY,
_scrollX + _screen->_vWindowBytesWide,
_scrollY + _screen->_vWindowLinesTall));
}

void AccessEngine::copyBF2Vid() {
Expand Down
2 changes: 2 additions & 0 deletions engines/access/access.h
Expand Up @@ -185,6 +185,8 @@ class AccessEngine : public Engine {
int _scaleT1;
int _scaleMaxY;
int _scaleI;
int _scrollX, _scrollY;
int _scrollCol, _scrollRow;
bool _imgUnscaled;
bool _canSaveLoad;

Expand Down

0 comments on commit 95aa9a1

Please sign in to comment.