diff options
author | Strangerke | 2012-09-02 10:34:11 +0200 |
---|---|---|
committer | Strangerke | 2012-09-02 10:34:11 +0200 |
commit | c737e6429866f18638a6b61103e4e1c7095407e6 (patch) | |
tree | f918ca5d96bd02394713f0e37c82eefa23adda90 /engines/tony/loc.cpp | |
parent | 1f41e5573175fb712e829a9c72b3e4f75afa8fdf (diff) | |
download | scummvm-rg350-c737e6429866f18638a6b61103e4e1c7095407e6.tar.gz scummvm-rg350-c737e6429866f18638a6b61103e4e1c7095407e6.tar.bz2 scummvm-rg350-c737e6429866f18638a6b61103e4e1c7095407e6.zip |
TONY: Move code from .h to .cpp files
Diffstat (limited to 'engines/tony/loc.cpp')
-rw-r--r-- | engines/tony/loc.cpp | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp index 7a151ac292..4fe19594f9 100644 --- a/engines/tony/loc.cpp +++ b/engines/tony/loc.cpp @@ -255,6 +255,13 @@ RMPattern::RMPattern() { _slots = NULL; } +/** + * Reads the position of the pattern + */ +RMPoint RMPattern::pos() { + return _curPos; +} + RMPattern::~RMPattern() { if (_slots != NULL) { delete[] _slots; @@ -400,6 +407,10 @@ void RMSfx::stop() { * RMItem Methods \****************************************************************************/ +int RMItem::getCurPattern() { + return _nCurPattern; +} + RMGfxSourceBuffer *RMItem::newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE) { if (_cm == CM_256) { RMGfxSourceBuffer8RLE *spr; @@ -627,6 +638,19 @@ void RMItem::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) { CORO_END_CODE; } +/** + * Overloaded priority: it's based on Z ordering + */ +int RMItem::priority() { + return _z; +} + +/** + * Pattern number + */ +int RMItem::numPattern() { + return _nPatterns; +} void RMItem::removeThis(CORO_PARAM, bool &result) { // Remove from the OT list if the current frame is -1 (pattern over) @@ -638,6 +662,14 @@ void RMItem::setStatus(int nStatus) { _bIsActive = (nStatus > 0); } +RMPoint RMItem::hotspot() { + return _hot; +} + +int RMItem::mpalCode() { + return _mpalCode; +} + void RMItem::setPattern(int nPattern, bool bPlayP0) { assert(nPattern >= 0 && nPattern <= _nPatterns); @@ -747,6 +779,10 @@ void RMItem::changeHotspot(const RMPoint &pt) { _hot = pt; } +void RMItem::setInitCurPattern(bool status) { + _bInitCurPattern = status; +} + void RMItem::playSfx(int nSfx) { if (nSfx < _nSfx) _sfx[nSfx].play(); @@ -1429,6 +1465,10 @@ void RMCharacter::doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) { CORO_END_CODE; } +bool RMCharacter::endOfPath() { + return _bEndOfPath; +} + void RMCharacter::stop(CORO_PARAM) { CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); @@ -1471,6 +1511,13 @@ void RMCharacter::stop(CORO_PARAM) { CORO_END_CODE; } +/** + * Check if the character is moving + */ +bool RMCharacter::isMoving() { + return _bMoving; +} + inline int RMCharacter::inWhichBox(const RMPoint &pt) { return _theBoxes->whichBox(_curLocation, pt); } @@ -1582,6 +1629,14 @@ void RMCharacter::waitForEndMovement(CORO_PARAM) { CORO_END_CODE; } +void RMCharacter::setFixedScroll(const RMPoint &fix) { + _fixedScroll = fix; +} + +void RMCharacter::setSpeed(int speed) { + _curSpeed = speed; +} + void RMCharacter::removeThis(CORO_PARAM, bool &result) { CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); @@ -1764,6 +1819,10 @@ RMBoxLoc *RMGameBoxes::getBoxes(int nLoc) { return _allBoxes[nLoc]; } +int RMGameBoxes::getLocBoxesCount() const { + return _nLocBoxes; +} + bool RMGameBoxes::isInBox(int nLoc, int nBox, const RMPoint &pt) { RMBoxLoc *cur = getBoxes(nLoc); @@ -1869,6 +1928,14 @@ RMLocation::RMLocation() { _cmode = CM_256; } +RMPoint RMLocation::TEMPGetTonyStart() { + return TEMPTonyStart; +} + +int RMLocation::TEMPGetNumLoc() { + return TEMPNumLoc; +} + /** * Load a location (.LOC) from a given data stream * @@ -2178,6 +2245,12 @@ void RMLocation::pauseSound(bool bPause) { _items[i].pauseSound(bPause); } +/** + * Read the current scroll position + */ +RMPoint RMLocation::scrollPosition() { + return _curScroll; +} /****************************************************************************\ * RMMessage Methods @@ -2230,4 +2303,20 @@ void RMMessage::parseMessage() { } } +bool RMMessage::isValid() { + return _lpMessage != NULL; +} + +int RMMessage::numPeriods() { + return _nPeriods; +} + +char *RMMessage::period(int num) { + return _lpPeriods[num]; +} + +char *RMMessage::operator[](int num) { + return _lpPeriods[num]; +} + } // End of namespace Tony |