Remov lots of superfluous debug output.
svn-id: r40715
This commit is contained in:
parent
136fcb3810
commit
7561bd9dfb
54 changed files with 1 additions and 662 deletions
|
@ -31,12 +31,10 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_HoF::restorePage3() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::restorePage3()");
|
||||
screen()->copyBlockToPage(2, 0, 0, 320, 144, _gamePlayBuffer);
|
||||
}
|
||||
|
||||
void KyraEngine_HoF::clearAnimObjects() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::clearAnimObjects()");
|
||||
_animObjects[0].index = 0;
|
||||
_animObjects[0].type = 0;
|
||||
_animObjects[0].enabled = 1;
|
||||
|
@ -61,7 +59,6 @@ void KyraEngine_HoF::clearAnimObjects() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::drawAnimObjects() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::drawAnimObjects()");
|
||||
for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
|
||||
if (!curObject->enabled)
|
||||
continue;
|
||||
|
@ -86,7 +83,6 @@ void KyraEngine_HoF::drawAnimObjects() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::refreshAnimObjects(int force) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::refreshAnimObjects(%d)", force);
|
||||
for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
|
||||
if (!curObject->enabled)
|
||||
continue;
|
||||
|
@ -120,7 +116,6 @@ void KyraEngine_HoF::refreshAnimObjects(int force) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::updateItemAnimations() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::updateItemAnimations()");
|
||||
bool nextFrame = false;
|
||||
|
||||
if (_itemAnimData[0].itemIndex == -1 || _inventorySaved)
|
||||
|
@ -178,7 +173,6 @@ void KyraEngine_HoF::updateItemAnimations() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::updateCharFacing() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::updateCharFacing()");
|
||||
if (_mainCharacter.x1 > _mouseX)
|
||||
_mainCharacter.facing = 5;
|
||||
else
|
||||
|
@ -190,7 +184,6 @@ void KyraEngine_HoF::updateCharFacing() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::updateCharacterAnim(int) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::updateCharacterAnim(-)");
|
||||
Character *c = &_mainCharacter;
|
||||
AnimObj *animState = _animObjects;
|
||||
|
||||
|
@ -227,7 +220,6 @@ void KyraEngine_HoF::updateCharacterAnim(int) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::updateSceneAnim(int anim, int newFrame) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::updateSceneAnim(%d, %d)", anim, newFrame);
|
||||
AnimObj *animObject = &_animObjects[1+anim];
|
||||
if (!animObject->enabled)
|
||||
return;
|
||||
|
@ -272,7 +264,6 @@ void KyraEngine_HoF::updateSceneAnim(int anim, int newFrame) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::drawSceneAnimObject(AnimObj *obj, int x, int y, int layer) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::drawSceneAnimObject(%p, %d, %d, %d)", (const void*)obj, x, y, layer);
|
||||
if (obj->type == 1) {
|
||||
if (obj->shapeIndex1 == 0xFFFF)
|
||||
return;
|
||||
|
@ -303,14 +294,12 @@ void KyraEngine_HoF::drawSceneAnimObject(AnimObj *obj, int x, int y, int layer)
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::drawCharacterAnimObject(AnimObj *obj, int x, int y, int layer) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::drawCharacterAnimObject(%p, %d, %d, %d)", (const void*)obj, x, y, layer);
|
||||
if (_drawNoShapeFlag || obj->shapeIndex1 == 0xFFFF)
|
||||
return;
|
||||
_screen->drawShape(2, getShapePtr(obj->shapeIndex1), x, y, 2, obj->flags | 4, layer, _charScale, _charScale);
|
||||
}
|
||||
|
||||
void KyraEngine_HoF::setCharacterAnimDim(int w, int h) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::setCharacterAnimDim(%d, %d)", w, h);
|
||||
restorePage3();
|
||||
|
||||
_animObj0Width = _animObjects[0].width;
|
||||
|
@ -321,7 +310,6 @@ void KyraEngine_HoF::setCharacterAnimDim(int w, int h) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::resetCharacterAnimDim() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_HoF::resetCharacterAnimDim()");
|
||||
restorePage3();
|
||||
|
||||
_animObjects[0].width = _animObj0Width;
|
||||
|
|
|
@ -55,7 +55,6 @@ Animator_LoK::~Animator_LoK() {
|
|||
}
|
||||
|
||||
void Animator_LoK::init(int actors_, int items_, int sprites_) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::init(%d, %d, %d)", actors_, items_, sprites_);
|
||||
_screenObjects = new AnimObject[actors_ + items_ + sprites_];
|
||||
assert(_screenObjects);
|
||||
memset(_screenObjects, 0, sizeof(AnimObject) * (actors_ + items_ + sprites_));
|
||||
|
@ -68,7 +67,6 @@ void Animator_LoK::init(int actors_, int items_, int sprites_) {
|
|||
}
|
||||
|
||||
void Animator_LoK::close() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::close()");
|
||||
if (_initOk) {
|
||||
_initOk = false;
|
||||
delete[] _screenObjects;
|
||||
|
@ -119,7 +117,6 @@ void Animator_LoK::initAnimStateList() {
|
|||
}
|
||||
|
||||
void Animator_LoK::preserveAllBackgrounds() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::preserveAllBackgrounds()");
|
||||
uint8 curPage = _screen->_curPage;
|
||||
_screen->_curPage = 2;
|
||||
|
||||
|
@ -135,7 +132,6 @@ void Animator_LoK::preserveAllBackgrounds() {
|
|||
}
|
||||
|
||||
void Animator_LoK::flagAllObjectsForBkgdChange() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::flagAllObjectsForBkgdChange()");
|
||||
AnimObject *curObject = _objectQueue;
|
||||
while (curObject) {
|
||||
curObject->bkgdChangeFlag = 1;
|
||||
|
@ -144,7 +140,6 @@ void Animator_LoK::flagAllObjectsForBkgdChange() {
|
|||
}
|
||||
|
||||
void Animator_LoK::flagAllObjectsForRefresh() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::flagAllObjectsForRefresh()");
|
||||
AnimObject *curObject = _objectQueue;
|
||||
while (curObject) {
|
||||
curObject->refreshFlag = 1;
|
||||
|
@ -153,7 +148,6 @@ void Animator_LoK::flagAllObjectsForRefresh() {
|
|||
}
|
||||
|
||||
void Animator_LoK::restoreAllObjectBackgrounds() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::restoreAllObjectBackground()");
|
||||
AnimObject *curObject = _objectQueue;
|
||||
_screen->_curPage = 2;
|
||||
|
||||
|
@ -170,7 +164,6 @@ void Animator_LoK::restoreAllObjectBackgrounds() {
|
|||
}
|
||||
|
||||
void Animator_LoK::preserveAnyChangedBackgrounds() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::preserveAnyChangedBackgrounds()");
|
||||
AnimObject *curObject = _objectQueue;
|
||||
_screen->_curPage = 2;
|
||||
|
||||
|
@ -186,7 +179,6 @@ void Animator_LoK::preserveAnyChangedBackgrounds() {
|
|||
}
|
||||
|
||||
void Animator_LoK::preserveOrRestoreBackground(AnimObject *obj, bool restore) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::preserveOrRestoreBackground(%p, %d)", (const void *)obj, restore);
|
||||
int x = 0, y = 0, width = obj->width, height = obj->height;
|
||||
|
||||
if (restore) {
|
||||
|
@ -218,7 +210,6 @@ void Animator_LoK::preserveOrRestoreBackground(AnimObject *obj, bool restore) {
|
|||
}
|
||||
|
||||
void Animator_LoK::prepDrawAllObjects() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::prepDrawAllObjects()");
|
||||
AnimObject *curObject = _objectQueue;
|
||||
int drawPage = 2;
|
||||
int flagUnk1 = 0, flagUnk2 = 0, flagUnk3 = 0;
|
||||
|
@ -364,7 +355,6 @@ void Animator_LoK::prepDrawAllObjects() {
|
|||
}
|
||||
|
||||
void Animator_LoK::copyChangedObjectsForward(int refreshFlag) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::copyChangedObjectsForward(%d)", refreshFlag);
|
||||
|
||||
for (AnimObject *curObject = _objectQueue; curObject; curObject = curObject->nextAnimObject) {
|
||||
if (curObject->active) {
|
||||
|
@ -405,7 +395,6 @@ void Animator_LoK::copyChangedObjectsForward(int refreshFlag) {
|
|||
}
|
||||
|
||||
void Animator_LoK::updateAllObjectShapes() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::updateAllObjectShapes()");
|
||||
restoreAllObjectBackgrounds();
|
||||
preserveAnyChangedBackgrounds();
|
||||
prepDrawAllObjects();
|
||||
|
@ -413,7 +402,6 @@ void Animator_LoK::updateAllObjectShapes() {
|
|||
}
|
||||
|
||||
void Animator_LoK::animRemoveGameItem(int index) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::animRemoveGameItem(%d)", index);
|
||||
restoreAllObjectBackgrounds();
|
||||
|
||||
AnimObject *animObj = &_items[index];
|
||||
|
@ -428,7 +416,6 @@ void Animator_LoK::animRemoveGameItem(int index) {
|
|||
}
|
||||
|
||||
void Animator_LoK::animAddGameItem(int index, uint16 sceneId) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::animRemoveGameItem(%d, %d)", index, sceneId);
|
||||
restoreAllObjectBackgrounds();
|
||||
assert(sceneId < _vm->_roomTableSize);
|
||||
Room *currentRoom = &_vm->_roomTable[sceneId];
|
||||
|
@ -454,7 +441,6 @@ void Animator_LoK::animAddGameItem(int index, uint16 sceneId) {
|
|||
}
|
||||
|
||||
void Animator_LoK::animAddNPC(int character) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::animAddNPC(%d)", character);
|
||||
restoreAllObjectBackgrounds();
|
||||
AnimObject *animObj = &_actors[character];
|
||||
const Character *ch = &_vm->_characterList[character];
|
||||
|
@ -479,7 +465,6 @@ void Animator_LoK::animAddNPC(int character) {
|
|||
}
|
||||
|
||||
Animator_LoK::AnimObject *Animator_LoK::objectRemoveQueue(AnimObject *queue, AnimObject *rem) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::objectRemoveQueue(%p, %p)", (const void *)queue, (const void *)rem);
|
||||
AnimObject *cur = queue;
|
||||
AnimObject *prev = queue;
|
||||
|
||||
|
@ -513,13 +498,11 @@ Animator_LoK::AnimObject *Animator_LoK::objectRemoveQueue(AnimObject *queue, Ani
|
|||
}
|
||||
|
||||
Animator_LoK::AnimObject *Animator_LoK::objectAddHead(AnimObject *queue, AnimObject *head) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::objectAddHead(%p, %p)", (const void *)queue, (const void *)head);
|
||||
head->nextAnimObject = queue;
|
||||
return head;
|
||||
}
|
||||
|
||||
Animator_LoK::AnimObject *Animator_LoK::objectQueue(AnimObject *queue, AnimObject *add) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::objectQueue(%p, %p)", (const void *)queue, (const void *)add);
|
||||
if (add->drawY <= queue->drawY || !queue) {
|
||||
add->nextAnimObject = queue;
|
||||
return add;
|
||||
|
@ -545,7 +528,6 @@ Animator_LoK::AnimObject *Animator_LoK::objectQueue(AnimObject *queue, AnimObjec
|
|||
}
|
||||
|
||||
void Animator_LoK::addObjectToQueue(AnimObject *object) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::addObjectToQueue(%p)", (const void *)object);
|
||||
if (!_objectQueue)
|
||||
_objectQueue = objectAddHead(0, object);
|
||||
else
|
||||
|
@ -553,7 +535,6 @@ void Animator_LoK::addObjectToQueue(AnimObject *object) {
|
|||
}
|
||||
|
||||
void Animator_LoK::refreshObject(AnimObject *object) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::refreshObject(%p)", (const void *)object);
|
||||
_objectQueue = objectRemoveQueue(_objectQueue, object);
|
||||
if (_objectQueue)
|
||||
_objectQueue = objectQueue(_objectQueue, object);
|
||||
|
@ -562,7 +543,6 @@ void Animator_LoK::refreshObject(AnimObject *object) {
|
|||
}
|
||||
|
||||
void Animator_LoK::makeBrandonFaceMouse() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::makeBrandonFaceMouse()");
|
||||
Common::Point mouse = _vm->getMousePos();
|
||||
if (mouse.x >= _vm->_currentCharacter->x1)
|
||||
_vm->_currentCharacter->facing = 3;
|
||||
|
@ -573,21 +553,18 @@ void Animator_LoK::makeBrandonFaceMouse() {
|
|||
}
|
||||
|
||||
int16 Animator_LoK::fetchAnimWidth(const uint8 *shape, int16 mult) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::fetchAnimWidth(%p, %d)", (const void *)shape, mult);
|
||||
if (_vm->gameFlags().useAltShapeHeader)
|
||||
shape += 2;
|
||||
return (((int16)READ_LE_UINT16((shape+3))) * mult) >> 8;
|
||||
}
|
||||
|
||||
int16 Animator_LoK::fetchAnimHeight(const uint8 *shape, int16 mult) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::fetchAnimHeight(%p, %d)", (const void *)shape, mult);
|
||||
if (_vm->gameFlags().useAltShapeHeader)
|
||||
shape += 2;
|
||||
return (int16)(((int8)*(shape+2)) * mult) >> 8;
|
||||
}
|
||||
|
||||
void Animator_LoK::setBrandonAnimSeqSize(int width, int height) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::setBrandonAnimSeqSize(%d, %d)", width, height);
|
||||
restoreAllObjectBackgrounds();
|
||||
_brandonAnimSeqSizeWidth = _actors[0].width;
|
||||
_brandonAnimSeqSizeHeight = _actors[0].height;
|
||||
|
@ -597,7 +574,6 @@ void Animator_LoK::setBrandonAnimSeqSize(int width, int height) {
|
|||
}
|
||||
|
||||
void Animator_LoK::resetBrandonAnimSeqSize() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::resetBrandonAnimSeqSize()");
|
||||
restoreAllObjectBackgrounds();
|
||||
_actors[0].width = _brandonAnimSeqSizeWidth;
|
||||
_actors[0].height = _brandonAnimSeqSizeHeight;
|
||||
|
@ -605,7 +581,6 @@ void Animator_LoK::resetBrandonAnimSeqSize() {
|
|||
}
|
||||
|
||||
void Animator_LoK::animRefreshNPC(int character) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::animRefreshNPC(%d)", character);
|
||||
AnimObject *animObj = &_actors[character];
|
||||
Character *ch = &_vm->characterList()[character];
|
||||
|
||||
|
@ -664,7 +639,6 @@ void Animator_LoK::animRefreshNPC(int character) {
|
|||
}
|
||||
|
||||
void Animator_LoK::setCharacterDefaultFrame(int character) {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::setCharacterDefaultFrame()");
|
||||
static const uint16 initFrameTable[] = {
|
||||
7, 41, 77, 0, 0
|
||||
};
|
||||
|
@ -677,7 +651,6 @@ void Animator_LoK::setCharacterDefaultFrame(int character) {
|
|||
}
|
||||
|
||||
void Animator_LoK::setCharactersHeight() {
|
||||
debugC(9, kDebugLevelAnimator, "Animator_LoK::setCharactersHeight()");
|
||||
static const int8 initHeightTable[] = {
|
||||
48, 40, 48, 47, 56,
|
||||
44, 42, 47, 38, 35,
|
||||
|
|
|
@ -30,12 +30,10 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_MR::restorePage3() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::restorePage3()");
|
||||
screen()->copyBlockToPage(2, 0, 0, 320, 200, _gamePlayBuffer);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::clearAnimObjects() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::clearAnimObjects()");
|
||||
|
||||
for (int i = 0; i < 67; ++i)
|
||||
_animObjects[i].enabled = false;
|
||||
|
@ -72,7 +70,6 @@ void KyraEngine_MR::clearAnimObjects() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::animSetupPaletteEntry(AnimObj *anim) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::animSetupPaletteEntry(%p)", (const void*)anim);
|
||||
int layer = _screen->getLayer(anim->xPos1, anim->yPos1) - 1;
|
||||
int16 count = 0;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
|
@ -84,7 +81,6 @@ void KyraEngine_MR::animSetupPaletteEntry(AnimObj *anim) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawAnimObjects() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::drawAnimObjects()");
|
||||
for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
|
||||
if (!curObject->enabled)
|
||||
continue;
|
||||
|
@ -108,7 +104,6 @@ void KyraEngine_MR::drawAnimObjects() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawSceneAnimObject(AnimObj *obj, int x, int y, int layer) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::drawSceneAnimObject(%p, %d, %d, %d)", (const void*)obj, x, y, layer);
|
||||
if (obj->type == 1) {
|
||||
if (obj->shapeIndex1 == 0xFFFF)
|
||||
return;
|
||||
|
@ -131,7 +126,6 @@ void KyraEngine_MR::drawSceneAnimObject(AnimObj *obj, int x, int y, int layer) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawCharacterAnimObject(AnimObj *obj, int x, int y, int layer) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::drawCharacterAnimObject(%p, %d, %d, %d)", (const void*)obj, x, y, layer);
|
||||
if (_drawNoShapeFlag)
|
||||
return;
|
||||
|
||||
|
@ -148,7 +142,6 @@ void KyraEngine_MR::drawCharacterAnimObject(AnimObj *obj, int x, int y, int laye
|
|||
}
|
||||
|
||||
void KyraEngine_MR::refreshAnimObjects(int force) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::refreshAnimObjects(%d)", force);
|
||||
for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
|
||||
if (!curObject->enabled)
|
||||
continue;
|
||||
|
@ -194,7 +187,6 @@ void KyraEngine_MR::refreshAnimObjects(int force) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateItemAnimations() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::updateItemAnimations()");
|
||||
bool nextFrame = false;
|
||||
|
||||
if (_itemAnimData[0].itemIndex == -1)
|
||||
|
@ -246,7 +238,6 @@ void KyraEngine_MR::updateItemAnimations() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateCharacterAnim(int charId) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::updateCharacterAnim(%d)", charId);
|
||||
|
||||
AnimObj *obj = &_animObjects[0];
|
||||
obj->needRefresh = true;
|
||||
|
@ -293,7 +284,6 @@ void KyraEngine_MR::updateCharacterAnim(int charId) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateSceneAnim(int anim, int newFrame) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::updateSceneAnim(%d, %d)", anim, newFrame);
|
||||
AnimObj *animObject = &_animObjects[1+anim];
|
||||
if (!animObject->enabled)
|
||||
return;
|
||||
|
@ -332,8 +322,6 @@ void KyraEngine_MR::updateSceneAnim(int anim, int newFrame) {
|
|||
|
||||
void KyraEngine_MR::setupSceneAnimObject(int animId, uint16 flags, int x, int y, int x2, int y2, int w,
|
||||
int h, int unk10, int specialSize, int unk14, int shape, const char *filename) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::setupSceneAnimObject(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, '%s')",
|
||||
animId, flags, x, y, x2, y2, w, h, unk10, specialSize, unk14, shape, filename);
|
||||
restorePage3();
|
||||
SceneAnim &anim = _sceneAnims[animId];
|
||||
anim.flags = flags;
|
||||
|
@ -413,7 +401,6 @@ void KyraEngine_MR::setupSceneAnimObject(int animId, uint16 flags, int x, int y,
|
|||
}
|
||||
|
||||
void KyraEngine_MR::removeSceneAnimObject(int anim, int refresh) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::removeSceneAnimObject(%d, %d)", anim, refresh);
|
||||
AnimObj *obj = &_animObjects[anim+1];
|
||||
restorePage3();
|
||||
obj->shapeIndex3 = 0xFFFF;
|
||||
|
@ -429,7 +416,6 @@ void KyraEngine_MR::removeSceneAnimObject(int anim, int refresh) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::setCharacterAnimDim(int w, int h) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::setCharacterAnimDim(%d, %d)", w, h);
|
||||
restorePage3();
|
||||
_charBackUpWidth = _animObjects[0].width;
|
||||
_charBackUpWidth2 = _animObjects[0].width2;
|
||||
|
@ -443,7 +429,6 @@ void KyraEngine_MR::setCharacterAnimDim(int w, int h) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::resetCharacterAnimDim() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::resetCharacterAnimDim()");
|
||||
restorePage3();
|
||||
_animObjects[0].width2 = _charBackUpWidth2;
|
||||
_animObjects[0].height2 = _charBackUpHeight2;
|
||||
|
@ -454,7 +439,6 @@ void KyraEngine_MR::resetCharacterAnimDim() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::showIdleAnim() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelAnimator, "KyraEngine_MR::showIdleAnim()");
|
||||
|
||||
if (_mainCharacter.sceneId == 20 || _mainCharacter.sceneId == 21
|
||||
|| _mainCharacter.sceneId == 12 || _mainCharacter.sceneId == 11)
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_v2::allocAnimObjects(int actors, int anims, int items) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::allocAnimObjects(%d, %d, %d)", actors, anims, items);
|
||||
_animObjects = new AnimObj[actors+anims+items];
|
||||
assert(_animObjects);
|
||||
|
||||
|
@ -44,13 +43,11 @@ void KyraEngine_v2::allocAnimObjects(int actors, int anims, int items) {
|
|||
}
|
||||
|
||||
KyraEngine_v2::AnimObj *KyraEngine_v2::initAnimList(AnimObj *list, AnimObj *entry) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::initAnimList(%p, %p)", (const void*)list, (const void*)entry);
|
||||
entry->nextObject = list;
|
||||
return entry;
|
||||
}
|
||||
|
||||
KyraEngine_v2::AnimObj *KyraEngine_v2::addToAnimListSorted(AnimObj *list, AnimObj *add) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::addToAnimListSorted(%p, %p)", (const void*)list, (const void*)add);
|
||||
add->nextObject = 0;
|
||||
|
||||
if (!list)
|
||||
|
@ -82,7 +79,6 @@ KyraEngine_v2::AnimObj *KyraEngine_v2::addToAnimListSorted(AnimObj *list, AnimOb
|
|||
}
|
||||
|
||||
KyraEngine_v2::AnimObj *KyraEngine_v2::deleteAnimListEntry(AnimObj *list, AnimObj *entry) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::addToAnimListSorted(%p, %p)", (const void*)list, (const void*)entry);
|
||||
if (!list)
|
||||
return 0;
|
||||
|
||||
|
@ -123,7 +119,6 @@ KyraEngine_v2::AnimObj *KyraEngine_v2::deleteAnimListEntry(AnimObj *list, AnimOb
|
|||
}
|
||||
|
||||
void KyraEngine_v2::refreshAnimObjectsIfNeed() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::refreshAnimObjectsIfNeed()");
|
||||
for (AnimObj *curEntry = _animList; curEntry; curEntry = curEntry->nextObject) {
|
||||
if (curEntry->enabled && curEntry->needRefresh) {
|
||||
restorePage3();
|
||||
|
@ -136,19 +131,16 @@ void KyraEngine_v2::refreshAnimObjectsIfNeed() {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::flagAnimObjsForRefresh() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::flagAnimObjsForRefresh()");
|
||||
for (AnimObj *curEntry = _animList; curEntry; curEntry = curEntry->nextObject)
|
||||
curEntry->needRefresh = 1;
|
||||
}
|
||||
|
||||
void KyraEngine_v2::flagAnimObjsSpecialRefresh() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::flagAnimObjsSpecialRefresh()");
|
||||
for (AnimObj *curEntry = _animList; curEntry; curEntry = curEntry->nextObject)
|
||||
curEntry->specialRefresh = 1;
|
||||
}
|
||||
|
||||
void KyraEngine_v2::addItemToAnimList(int item) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::addItemToAnimList(%d)", item);
|
||||
assert(item < _itemListSize);
|
||||
|
||||
restorePage3();
|
||||
|
@ -181,7 +173,6 @@ void KyraEngine_v2::addItemToAnimList(int item) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::deleteItemAnimEntry(int item) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::deleteItemAnimEntry(%d)", item);
|
||||
assert(item < _itemListSize);
|
||||
|
||||
AnimObj *animObj = _animItems + item;
|
||||
|
|
|
@ -434,7 +434,6 @@ bool MainMenu::getInput() {
|
|||
}
|
||||
|
||||
int MainMenu::handle(int dim) {
|
||||
debugC(9, kDebugLevelMain, "MainMenu::handle(%d)", dim);
|
||||
int command = -1;
|
||||
|
||||
uint8 colorMap[16];
|
||||
|
@ -516,7 +515,6 @@ int MainMenu::handle(int dim) {
|
|||
}
|
||||
|
||||
void MainMenu::draw(int select) {
|
||||
debugC(9, kDebugLevelMain, "MainMenu::draw(%d)", select);
|
||||
int top = _screen->_curDim->sy;
|
||||
top += _static.menuTable[1];
|
||||
|
||||
|
@ -528,7 +526,6 @@ void MainMenu::draw(int select) {
|
|||
}
|
||||
|
||||
void MainMenu::drawBox(int x, int y, int w, int h, int fill) {
|
||||
debugC(9, kDebugLevelMain, "MainMenu::drawBox(%d, %d, %d, %d, %d)", x, y, w, h, fill);
|
||||
--w; --h;
|
||||
|
||||
if (fill)
|
||||
|
@ -544,7 +541,6 @@ void MainMenu::drawBox(int x, int y, int w, int h, int fill) {
|
|||
}
|
||||
|
||||
void MainMenu::printString(const char *format, int x, int y, int col1, int col2, int flags, ...) {
|
||||
debugC(9, kDebugLevelMain, "MainMenu::printString('%s', %d, %d, %d, %d, %d, ...)", format, x, y, col1, col2, flags);
|
||||
if (!format)
|
||||
return;
|
||||
|
||||
|
|
|
@ -509,7 +509,6 @@ void GUI_LoK::getInput() {
|
|||
}
|
||||
|
||||
int GUI_LoK::resumeGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::resumeGame()");
|
||||
updateMenuButton(button);
|
||||
_displayMenu = false;
|
||||
|
||||
|
@ -548,7 +547,6 @@ void GUI_LoK::setupSavegames(Menu &menu, int num) {
|
|||
}
|
||||
|
||||
int GUI_LoK::saveGameMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::saveGameMenu()");
|
||||
updateSaveList();
|
||||
|
||||
updateMenuButton(button);
|
||||
|
@ -589,7 +587,6 @@ int GUI_LoK::saveGameMenu(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::loadGameMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::loadGameMenu()");
|
||||
updateSaveList();
|
||||
|
||||
if (_vm->_menuDirectlyToLoad) {
|
||||
|
@ -679,7 +676,6 @@ void GUI_LoK::updateSavegameString() {
|
|||
}
|
||||
|
||||
int GUI_LoK::saveGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::saveGame()");
|
||||
updateMenuButton(button);
|
||||
_vm->_gameToLoad = _menu[2].item[button->index-0xC].saveSlot;
|
||||
|
||||
|
@ -730,7 +726,6 @@ int GUI_LoK::saveGame(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::savegameConfirm(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::savegameConfirm()");
|
||||
updateMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
|
||||
|
@ -738,7 +733,6 @@ int GUI_LoK::savegameConfirm(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::loadGame(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::loadGame()");
|
||||
updateMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_vm->_gameToLoad = _menu[2].item[button->index-0xC].saveSlot;
|
||||
|
@ -747,7 +741,6 @@ int GUI_LoK::loadGame(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::cancelSubMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::cancelSubMenu()");
|
||||
updateMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_cancelSubMenu = true;
|
||||
|
@ -756,7 +749,6 @@ int GUI_LoK::cancelSubMenu(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::quitPlaying(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::quitPlaying()");
|
||||
updateMenuButton(button);
|
||||
|
||||
if (quitConfirm(_vm->_guiStrings[14])) { // Are you sure you want to quit playing?
|
||||
|
@ -770,7 +762,6 @@ int GUI_LoK::quitPlaying(Button *button) {
|
|||
}
|
||||
|
||||
bool GUI_LoK::quitConfirm(const char *str) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::quitConfirm()");
|
||||
|
||||
_screen->loadPageFromDisk("SEENPAGE.TMP", 0);
|
||||
_screen->savePageToDisk("SEENPAGE.TMP", 0);
|
||||
|
@ -794,7 +785,6 @@ bool GUI_LoK::quitConfirm(const char *str) {
|
|||
}
|
||||
|
||||
int GUI_LoK::quitConfirmYes(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::quitConfirmYes()");
|
||||
updateMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_cancelSubMenu = false;
|
||||
|
@ -803,7 +793,6 @@ int GUI_LoK::quitConfirmYes(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::quitConfirmNo(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::quitConfirmNo()");
|
||||
updateMenuButton(button);
|
||||
_displaySubMenu = false;
|
||||
_cancelSubMenu = true;
|
||||
|
@ -812,7 +801,6 @@ int GUI_LoK::quitConfirmNo(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::gameControlsMenu(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::gameControlsMenu()");
|
||||
|
||||
_vm->readSettings();
|
||||
|
||||
|
@ -862,7 +850,6 @@ int GUI_LoK::gameControlsMenu(Button *button) {
|
|||
}
|
||||
|
||||
void GUI_LoK::setupControls(Menu &menu) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::setupControls()");
|
||||
|
||||
switch (_vm->_configMusic) {
|
||||
case 0:
|
||||
|
@ -959,7 +946,6 @@ void GUI_LoK::setupControls(Menu &menu) {
|
|||
}
|
||||
|
||||
int GUI_LoK::controlsChangeMusic(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeMusic()");
|
||||
updateMenuButton(button);
|
||||
|
||||
_vm->_configMusic = ++_vm->_configMusic % ((_vm->gameFlags().platform == Common::kPlatformFMTowns) ? 3 : 2);
|
||||
|
@ -968,7 +954,6 @@ int GUI_LoK::controlsChangeMusic(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::controlsChangeSounds(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeSounds()");
|
||||
updateMenuButton(button);
|
||||
|
||||
_vm->_configSounds = !_vm->_configSounds;
|
||||
|
@ -977,7 +962,6 @@ int GUI_LoK::controlsChangeSounds(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::controlsChangeWalk(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeWalk()");
|
||||
updateMenuButton(button);
|
||||
|
||||
_vm->_configWalkspeed = ++_vm->_configWalkspeed % 5;
|
||||
|
@ -987,7 +971,6 @@ int GUI_LoK::controlsChangeWalk(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::controlsChangeText(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeText()");
|
||||
updateMenuButton(button);
|
||||
|
||||
_vm->_configTextspeed = ++_vm->_configTextspeed % 4;
|
||||
|
@ -996,7 +979,6 @@ int GUI_LoK::controlsChangeText(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::controlsChangeVoice(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeVoice()");
|
||||
updateMenuButton(button);
|
||||
|
||||
_vm->_configVoice = ++_vm->_configVoice % 3;
|
||||
|
@ -1005,13 +987,11 @@ int GUI_LoK::controlsChangeVoice(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::controlsApply(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::controlsApply()");
|
||||
_vm->writeSettings();
|
||||
return cancelSubMenu(button);
|
||||
}
|
||||
|
||||
int GUI_LoK::scrollUp(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::scrollUp()");
|
||||
updateMenuButton(button);
|
||||
|
||||
if (_savegameOffset > 0) {
|
||||
|
@ -1023,7 +1003,6 @@ int GUI_LoK::scrollUp(Button *button) {
|
|||
}
|
||||
|
||||
int GUI_LoK::scrollDown(Button *button) {
|
||||
debugC(9, kDebugLevelGUI, "GUI_LoK::scrollDown()");
|
||||
updateMenuButton(button);
|
||||
|
||||
_savegameOffset++;
|
||||
|
@ -1066,7 +1045,6 @@ void GUI_LoK::restorePalette() {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_LoK::drawAmulet() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawAmulet()");
|
||||
static const int16 amuletTable1[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x150, 0x155, 0x15A, 0x15F, 0x164, 0x145, -1};
|
||||
static const int16 amuletTable3[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x14F, 0x154, 0x159, 0x15E, 0x163, 0x144, -1};
|
||||
static const int16 amuletTable2[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x152, 0x157, 0x15C, 0x161, 0x166, 0x147, -1};
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_MR::loadButtonShapes() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadButtonShapes()");
|
||||
_res->exists("BUTTONS.SHP", true);
|
||||
uint8 *data = _res->fileData("BUTTONS.SHP", 0);
|
||||
assert(data);
|
||||
|
@ -108,7 +107,6 @@ int KyraEngine_MR::callbackButton3(Button *button) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::showMessage(const char *string, uint8 c0, uint8 c1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::showMessage('%s', %d, %d)", string, c0, c1);
|
||||
_shownMessage = string;
|
||||
_screen->hideMouse();
|
||||
|
||||
|
@ -129,12 +127,10 @@ void KyraEngine_MR::showMessage(const char *string, uint8 c0, uint8 c1) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::showMessageFromCCode(int string, uint8 c0, int) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::showMessageFromCCode(%d, %d, -)", string, c0);
|
||||
showMessage((const char*)getTableEntry(_cCodeFile, string), c0, 0xF0);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::updateItemCommand(int item, int str, uint8 c0) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateItemCommand(%d, %d, %d)", item, str, c0);
|
||||
char buffer[100];
|
||||
char *src = (char*)getTableEntry(_itemFile, item);
|
||||
|
||||
|
@ -152,7 +148,6 @@ void KyraEngine_MR::updateItemCommand(int item, int str, uint8 c0) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateCommandLine() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateCommandLine()");
|
||||
if (_restoreCommandLine) {
|
||||
restoreCommandLine();
|
||||
_restoreCommandLine = false;
|
||||
|
@ -160,13 +155,11 @@ void KyraEngine_MR::updateCommandLine() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::restoreCommandLine() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::restoreCommandLine()");
|
||||
int y = _inventoryState ? 144 : 188;
|
||||
_screen->copyBlockToPage(0, 0, y, 320, 12, _interfaceCommandLine);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::updateCLState() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateCLState()");
|
||||
if (_inventoryState)
|
||||
_commandLineY = 145;
|
||||
else
|
||||
|
@ -174,7 +167,6 @@ void KyraEngine_MR::updateCLState() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::showInventory() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::showInventory()");
|
||||
if (!_screen->isMouseVisible())
|
||||
return;
|
||||
if (queryGameFlag(3))
|
||||
|
@ -253,7 +245,6 @@ void KyraEngine_MR::showInventory() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::hideInventory() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::hideInventory()");
|
||||
if (queryGameFlag(3))
|
||||
return;
|
||||
|
||||
|
@ -317,7 +308,6 @@ void KyraEngine_MR::hideInventory() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawMalcolmsMoodText() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::drawMalcolmsMoodText()");
|
||||
static const int stringId[] = { 0x32, 0x37, 0x3C };
|
||||
|
||||
if (queryGameFlag(0x219))
|
||||
|
@ -352,7 +342,6 @@ void KyraEngine_MR::drawMalcolmsMoodText() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawMalcolmsMoodPointer(int frame, int page) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::drawMalcolmsMoodPointer(%d, %d)", frame, page);
|
||||
static const uint8 stateTable[] = {
|
||||
1, 6, 11
|
||||
};
|
||||
|
@ -373,7 +362,6 @@ void KyraEngine_MR::drawMalcolmsMoodPointer(int frame, int page) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawJestersStaff(int type, int page) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::drawJestersStaff(%d, %d)", type, page);
|
||||
int y = 155;
|
||||
if (page == 30) {
|
||||
page = 2;
|
||||
|
@ -385,7 +373,6 @@ void KyraEngine_MR::drawJestersStaff(int type, int page) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawScore(int page, int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::drawScore(%d, %d, %d)", page, x, y);
|
||||
if (page == 30) {
|
||||
page = 2;
|
||||
y -= 144;
|
||||
|
@ -403,7 +390,6 @@ void KyraEngine_MR::drawScore(int page, int x, int y) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawScoreCounting(int oldScore, int newScore, int drawOld, const int x) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::drawScoreCounting(%d, %d, %d, %d)", oldScore, newScore, drawOld, x);
|
||||
int y = 189;
|
||||
if (_inventoryState)
|
||||
y -= 44;
|
||||
|
@ -438,7 +424,6 @@ void KyraEngine_MR::drawScoreCounting(int oldScore, int newScore, int drawOld, c
|
|||
}
|
||||
|
||||
int KyraEngine_MR::getScoreX(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getScoreX('%s')", str);
|
||||
Screen::FontId oldFont = _screen->setFont(Screen::FID_8_FNT);
|
||||
_screen->_charWidth = -2;
|
||||
|
||||
|
@ -451,7 +436,6 @@ int KyraEngine_MR::getScoreX(const char *str) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::redrawInventory(int page) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::redrawInventory(%d)", page);
|
||||
int yOffset = 0;
|
||||
|
||||
if (page == 30) {
|
||||
|
@ -479,7 +463,6 @@ void KyraEngine_MR::redrawInventory(int page) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::clearInventorySlot(int slot, int page) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::clearInventorySlot(%d, %d)", slot, page);
|
||||
int yOffset = 0;
|
||||
if (page == 30) {
|
||||
page = 2;
|
||||
|
@ -490,7 +473,6 @@ void KyraEngine_MR::clearInventorySlot(int slot, int page) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::drawInventorySlot(int page, int item, int slot) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::drawInventorySlot(%d, %d, %d)", page, item, slot);
|
||||
int yOffset = 0;
|
||||
if (page == 30) {
|
||||
page = 2;
|
||||
|
@ -501,7 +483,6 @@ void KyraEngine_MR::drawInventorySlot(int page, int item, int slot) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::buttonInventory(Button *button) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::buttonInventory(%p)", (const void*)button);
|
||||
setNextIdleAnimTimer();
|
||||
if (!_enableInventory || !_inventoryState || !_screen->isMouseVisible())
|
||||
return 0;
|
||||
|
@ -555,7 +536,6 @@ int KyraEngine_MR::buttonInventory(Button *button) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::buttonMoodChange(Button *button) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::buttonMoodChange(%p)", (const void*)button);
|
||||
if (queryGameFlag(0x219)) {
|
||||
snd_playSoundEffect(0x0D, 0xC8);
|
||||
return 0;
|
||||
|
@ -623,7 +603,6 @@ int KyraEngine_MR::buttonMoodChange(Button *button) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::buttonShowScore(Button *button) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::buttonShowScore(%p)", (const void*)button);
|
||||
strcpy(_stringBuffer, (const char*)getTableEntry(_cCodeFile, 18));
|
||||
|
||||
char *buffer = _stringBuffer;
|
||||
|
@ -647,7 +626,6 @@ int KyraEngine_MR::buttonShowScore(Button *button) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::buttonJesterStaff(Button *button) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::buttonJesterStaff(%p)", (const void*)button);
|
||||
makeCharFacingMouse();
|
||||
if (_itemInHand == 27) {
|
||||
_screen->hideMouse();
|
||||
|
@ -679,7 +657,6 @@ int KyraEngine_MR::buttonJesterStaff(Button *button) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::showAlbum() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::showAlbum()");
|
||||
if (!_screen->isMouseVisible() || queryGameFlag(4) || _mouseState != -1)
|
||||
return;
|
||||
|
||||
|
@ -744,7 +721,6 @@ void KyraEngine_MR::showAlbum() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadAlbumPage() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadAlbumPage()");
|
||||
|
||||
char filename[16];
|
||||
int num = _album.curPage / 2;
|
||||
|
@ -764,7 +740,6 @@ void KyraEngine_MR::loadAlbumPage() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadAlbumPageWSA() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadAlbumPageWSA()");
|
||||
char filename[16];
|
||||
|
||||
_album.leftPage.curFrame = 0;
|
||||
|
@ -789,7 +764,6 @@ void KyraEngine_MR::loadAlbumPageWSA() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::printAlbumPageText() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::printAlbumPageText()");
|
||||
|
||||
static const uint8 posY[] = {
|
||||
0x41, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5A, 0x5A,
|
||||
|
@ -815,7 +789,6 @@ void KyraEngine_MR::printAlbumPageText() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::printAlbumText(int page, const char *str, int x, int y, uint8 c0) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::printAlbumText(%d, '%s', %d, %d, %d)", page, str, x, y, c0);
|
||||
int oldPage = _screen->_curPage;
|
||||
_screen->_curPage = page;
|
||||
|
||||
|
@ -833,7 +806,6 @@ void KyraEngine_MR::printAlbumText(int page, const char *str, int x, int y, uint
|
|||
}
|
||||
|
||||
void KyraEngine_MR::processAlbum() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::processAlbum()");
|
||||
Button albumButtons[5];
|
||||
|
||||
GUI_V2_BUTTON(albumButtons[0], 36, 0, 0, 1, 1, 1, 0x4487, 0, 130, 190, 10, 10, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0);
|
||||
|
@ -898,7 +870,6 @@ void KyraEngine_MR::processAlbum() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumNewPage() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumNewPage()");
|
||||
int page = _album.nextPage / 2;
|
||||
if (!queryGameFlag(0x84+page)) {
|
||||
albumAnim1();
|
||||
|
@ -923,7 +894,6 @@ void KyraEngine_MR::albumNewPage() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumUpdateAnims() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumUpdateAnims()");
|
||||
if (_album.nextPage == 14 && !_album.isPage14)
|
||||
return;
|
||||
|
||||
|
@ -966,7 +936,6 @@ void KyraEngine_MR::albumUpdateAnims() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumAnim1() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumAnim1()");
|
||||
|
||||
for (int i = 6; i >= 3; --i) {
|
||||
albumRestoreRect();
|
||||
|
@ -982,7 +951,6 @@ void KyraEngine_MR::albumAnim1() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumAnim2() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumAnim2()");
|
||||
|
||||
for (int i = 3; i <= 6; ++i) {
|
||||
albumRestoreRect();
|
||||
|
@ -997,23 +965,19 @@ void KyraEngine_MR::albumAnim2() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumBackUpRect() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumBackUpRect()");
|
||||
_screen->copyRegionToBuffer(2, 0, 146, 62, 50, _album.backUpRect);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::albumRestoreRect() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumRestoreRect()");
|
||||
_screen->copyBlockToPage(2, 0, 146, 62, 50, _album.backUpRect);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::albumUpdateRect() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumUpdateRect()");
|
||||
_screen->copyRegion(0, 146, 0, 146, 62, 50, 2, 0, Screen::CR_NO_P_CHECK);
|
||||
_screen->updateScreen();
|
||||
}
|
||||
|
||||
void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int srcPage) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumSwitchPages(%d, %d, %d)", oldPage, newPage, srcPage);
|
||||
if (newPage > oldPage) {
|
||||
_screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x64, 0xBA, srcPage, 0, 2);
|
||||
|
||||
|
@ -1072,7 +1036,6 @@ void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int srcPage) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::albumNextPage(Button *caller) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumNextPage(%p)", (const void *)caller);
|
||||
_album.nextPage = _album.curPage + 2;
|
||||
if (_album.nextPage >= 16) {
|
||||
_album.nextPage -= 2;
|
||||
|
@ -1082,7 +1045,6 @@ int KyraEngine_MR::albumNextPage(Button *caller) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::albumPrevPage(Button *caller) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumPrevPage(%p)", (const void *)caller);
|
||||
_album.nextPage = _album.curPage - 2;
|
||||
if (_album.nextPage < 0) {
|
||||
_album.nextPage = 0;
|
||||
|
@ -1092,7 +1054,6 @@ int KyraEngine_MR::albumPrevPage(Button *caller) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::albumClose(Button *caller) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumClose(%p)", (const void *)caller);
|
||||
_album.running = false;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
int KyraEngine_HoF::checkItemCollision(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::checkItemCollision(%d, %d)", x, y);
|
||||
int itemPos = -1, yPos = -1;
|
||||
|
||||
for (int i = 0; i < 30; ++i) {
|
||||
|
@ -59,7 +58,6 @@ int KyraEngine_HoF::checkItemCollision(int x, int y) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::updateWaterFlasks() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::updateWaterFlasks()");
|
||||
for (int i = 22; i < 24; i++) {
|
||||
if (_itemInHand == i)
|
||||
setHandItem(i - 1);
|
||||
|
@ -82,7 +80,6 @@ void KyraEngine_HoF::updateWaterFlasks() {
|
|||
}
|
||||
|
||||
bool KyraEngine_HoF::dropItem(int unk1, uint16 item, int x, int y, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::dropItem(%d, %u, %d, %d, %d)", unk1, item, x, y, unk2);
|
||||
if (_mouseState <= -1)
|
||||
return false;
|
||||
|
||||
|
@ -97,7 +94,6 @@ bool KyraEngine_HoF::dropItem(int unk1, uint16 item, int x, int y, int unk2) {
|
|||
}
|
||||
|
||||
bool KyraEngine_HoF::processItemDrop(uint16 sceneId, uint16 item, int x, int y, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::processItemDrop(%u, %u, %d, %d, %d, %d)", sceneId, item, x, y, unk1, unk2);
|
||||
int itemPos = checkItemCollision(x, y);
|
||||
|
||||
if (unk1)
|
||||
|
@ -205,7 +201,6 @@ bool KyraEngine_HoF::processItemDrop(uint16 sceneId, uint16 item, int x, int y,
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, int itemSlot, uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::itemDropDown(%d, %d, %d, %d, %d, %u)", startX, startY, dstX, dstY, itemSlot, item);
|
||||
uint8 *itemShape = getShapePtr(item + 64);
|
||||
|
||||
if (startX == dstX && startY == dstY) {
|
||||
|
@ -310,7 +305,6 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::exchangeMouseItem(int itemPos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::exchangeMouseItem(%d)", itemPos);
|
||||
_screen->hideMouse();
|
||||
|
||||
deleteItemAnimEntry(itemPos);
|
||||
|
@ -334,7 +328,6 @@ void KyraEngine_HoF::exchangeMouseItem(int itemPos) {
|
|||
}
|
||||
|
||||
bool KyraEngine_HoF::pickUpItem(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::pickUpItem(%d, %d)", x, y);
|
||||
int itemPos = checkItemCollision(x, y);
|
||||
|
||||
if (itemPos <= -1)
|
||||
|
@ -365,7 +358,6 @@ bool KyraEngine_HoF::pickUpItem(int x, int y) {
|
|||
}
|
||||
|
||||
bool KyraEngine_HoF::isDropable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::isDropable(%d, %d)", x, y);
|
||||
if (x < 14 || x > 304 || y < 14 || y > 136)
|
||||
return false;
|
||||
|
||||
|
@ -381,7 +373,6 @@ bool KyraEngine_HoF::isDropable(int x, int y) {
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::getItemCommandStringDrop(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::getItemCommandStringDrop(%u)", item);
|
||||
assert(item < _itemStringMapSize);
|
||||
int stringId = _itemStringMap[item];
|
||||
|
||||
|
@ -394,7 +385,6 @@ int KyraEngine_HoF::getItemCommandStringDrop(uint16 item) {
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::getItemCommandStringPickUp(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::getItemCommandStringPickUp(%u)", item);
|
||||
assert(item < _itemStringMapSize);
|
||||
int stringId = _itemStringMap[item];
|
||||
|
||||
|
@ -407,7 +397,6 @@ int KyraEngine_HoF::getItemCommandStringPickUp(uint16 item) {
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::getItemCommandStringInv(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::getItemCommandStringInv(%u)", item);
|
||||
assert(item < _itemStringMapSize);
|
||||
int stringId = _itemStringMap[item];
|
||||
|
||||
|
@ -420,7 +409,6 @@ int KyraEngine_HoF::getItemCommandStringInv(uint16 item) {
|
|||
}
|
||||
|
||||
bool KyraEngine_HoF::itemIsFlask(int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::itemIsFlask(%d)", item);
|
||||
for (int i = 0; _flaskTable[i] != -1; ++i) {
|
||||
if (_flaskTable[i] == item)
|
||||
return true;
|
||||
|
@ -430,7 +418,6 @@ bool KyraEngine_HoF::itemIsFlask(int item) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::setMouseCursor(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::setMouseCursor(%u)", item);
|
||||
int shape = 0;
|
||||
int hotX = 1;
|
||||
int hotY = 1;
|
||||
|
|
|
@ -56,7 +56,6 @@ int KyraEngine_LoK::findDuplicateItemShape(int shape) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::addToNoDropRects(int x, int y, int w, int h) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::addToNoDropRects(%d, %d, %d, %d)", x, y, w, h);
|
||||
for (int rect = 0; rect < ARRAYSIZE(_noDropRects); ++rect) {
|
||||
if (_noDropRects[rect].top == -1) {
|
||||
_noDropRects[rect].left = x;
|
||||
|
@ -69,12 +68,10 @@ void KyraEngine_LoK::addToNoDropRects(int x, int y, int w, int h) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::clearNoDropRects() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::clearNoDropRects()");
|
||||
memset(_noDropRects, -1, sizeof(_noDropRects));
|
||||
}
|
||||
|
||||
byte KyraEngine_LoK::findFreeItemInScene(int scene) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::findFreeItemInScene(%d)", scene);
|
||||
assert(scene < _roomTableSize);
|
||||
Room *room = &_roomTable[scene];
|
||||
for (int i = 0; i < 12; ++i) {
|
||||
|
@ -85,7 +82,6 @@ byte KyraEngine_LoK::findFreeItemInScene(int scene) {
|
|||
}
|
||||
|
||||
byte KyraEngine_LoK::findItemAtPos(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::findItemAtPos(%d, %d)", x, y);
|
||||
assert(_currentCharacter->sceneId < _roomTableSize);
|
||||
const uint8 *itemsTable = _roomTable[_currentCharacter->sceneId].itemsTable;
|
||||
const uint16 *xposOffset = _roomTable[_currentCharacter->sceneId].itemsXPos;
|
||||
|
@ -121,7 +117,6 @@ byte KyraEngine_LoK::findItemAtPos(int x, int y) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::placeItemInGenericMapScene(int item, int index) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::placeItemInGenericMapScene(%d, %d)", item, index);
|
||||
static const uint16 itemMapSceneMinTable[] = {
|
||||
0x0000, 0x0011, 0x006D, 0x0025, 0x00C7, 0x0000
|
||||
};
|
||||
|
@ -176,7 +171,6 @@ void KyraEngine_LoK::placeItemInGenericMapScene(int item, int index) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setHandItem(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setHandItem(%u)", item);
|
||||
_screen->hideMouse();
|
||||
setMouseItem(item);
|
||||
_itemInHand = item;
|
||||
|
@ -184,7 +178,6 @@ void KyraEngine_LoK::setHandItem(uint16 item) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::removeHandItem() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::removeHandItem()");
|
||||
_screen->hideMouse();
|
||||
_screen->setMouseCursor(1, 1, _shapes[0]);
|
||||
_itemInHand = -1;
|
||||
|
@ -192,7 +185,6 @@ void KyraEngine_LoK::removeHandItem() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setMouseItem(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setMouseItem(%u)", item);
|
||||
if (item == 0xFFFF)
|
||||
_screen->setMouseCursor(1, 1, _shapes[6]);
|
||||
else
|
||||
|
@ -200,7 +192,6 @@ void KyraEngine_LoK::setMouseItem(uint16 item) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::wipeDownMouseItem(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::wipeDownMouseItem(%d, %d)", xpos, ypos);
|
||||
if (_itemInHand == -1)
|
||||
return;
|
||||
xpos -= 8;
|
||||
|
@ -227,7 +218,6 @@ void KyraEngine_LoK::wipeDownMouseItem(int xpos, int ypos) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setupSceneItems() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupSceneItems()");
|
||||
uint16 sceneId = _currentCharacter->sceneId;
|
||||
assert(sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[sceneId];
|
||||
|
@ -265,7 +255,6 @@ void KyraEngine_LoK::setupSceneItems() {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::countItemsInScene(uint16 sceneId) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::countItemsInScene(%d)", sceneId);
|
||||
assert(sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[sceneId];
|
||||
|
||||
|
@ -280,7 +269,6 @@ int KyraEngine_LoK::countItemsInScene(uint16 sceneId) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::processItemDrop(%d, %d, %d, %d, %d, %d)", sceneId, item, x, y, unk1, unk2);
|
||||
int freeItem = -1;
|
||||
uint8 itemIndex = findItemAtPos(x, y);
|
||||
if (unk1)
|
||||
|
@ -433,7 +421,6 @@ int KyraEngine_LoK::processItemDrop(uint16 sceneId, uint8 item, int x, int y, in
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::exchangeItemWithMouseItem(%d, %d)", sceneId, itemIndex);
|
||||
_screen->hideMouse();
|
||||
_animator->animRemoveGameItem(itemIndex);
|
||||
assert(sceneId < _roomTableSize);
|
||||
|
@ -453,7 +440,6 @@ void KyraEngine_LoK::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::addItemToRoom(%d, %d, %d, %d, %d)", sceneId, item, itemIndex, x, y);
|
||||
assert(sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[sceneId];
|
||||
currentRoom->itemsTable[itemIndex] = item;
|
||||
|
@ -463,7 +449,6 @@ void KyraEngine_LoK::addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, in
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::checkNoDropRects(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::checkNoDropRects(%d, %d)", x, y);
|
||||
if (_lastProcessedItemHeight < 1 || _lastProcessedItemHeight > 16)
|
||||
_lastProcessedItemHeight = 16;
|
||||
if (_noDropRects[0].left == -1)
|
||||
|
@ -493,7 +478,6 @@ int KyraEngine_LoK::checkNoDropRects(int x, int y) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::isDropable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::isDropable(%d, %d)", x, y);
|
||||
x -= 8;
|
||||
y -= 1;
|
||||
|
||||
|
@ -508,7 +492,6 @@ int KyraEngine_LoK::isDropable(int x, int y) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::itemDropDown(int x, int y, int destX, int destY, byte freeItem, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemDropDown(%d, %d, %d, %d, %d, %d)", x, y, destX, destY, freeItem, item);
|
||||
assert(_currentCharacter->sceneId < _roomTableSize);
|
||||
Room *currentRoom = &_roomTable[_currentCharacter->sceneId];
|
||||
if (x == destX && y == destY) {
|
||||
|
@ -592,7 +575,6 @@ void KyraEngine_LoK::itemDropDown(int x, int y, int destX, int destY, byte freeI
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::dropItem(int unk1, int item, int x, int y, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::dropItem(%d, %d, %d, %d, %d)", unk1, item, x, y, unk2);
|
||||
if (processItemDrop(_currentCharacter->sceneId, item, x, y, unk1, unk2))
|
||||
return;
|
||||
snd_playSoundEffect(54);
|
||||
|
@ -604,7 +586,6 @@ void KyraEngine_LoK::dropItem(int unk1, int item, int x, int y, int unk2) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::itemSpecialFX(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemSpecialFX(%d, %d, %d)", x, y, item);
|
||||
if (item == 41)
|
||||
itemSpecialFX1(x, y, item);
|
||||
else
|
||||
|
@ -612,7 +593,6 @@ void KyraEngine_LoK::itemSpecialFX(int x, int y, int item) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::itemSpecialFX1(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemSpecialFX1(%d, %d, %d)", x, y, item);
|
||||
uint8 *shape = _shapes[216+item];
|
||||
x -= 8;
|
||||
int startY = y;
|
||||
|
@ -633,7 +613,6 @@ void KyraEngine_LoK::itemSpecialFX1(int x, int y, int item) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::itemSpecialFX2(int x, int y, int item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemSpecialFX2(%d, %d, %d)", x, y, item);
|
||||
x -= 8;
|
||||
y -= 15;
|
||||
int yAdd = (int8)(((16 - _itemTable[item].height) >> 1) & 0xFF);
|
||||
|
@ -661,7 +640,6 @@ void KyraEngine_LoK::itemSpecialFX2(int x, int y, int item) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::magicOutMouseItem(int animIndex, int itemPos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::magicOutMouseItem(%d, %d)", animIndex, itemPos);
|
||||
int videoPageBackUp = _screen->_curPage;
|
||||
_screen->_curPage = 0;
|
||||
int x = 0, y = 0;
|
||||
|
@ -745,7 +723,6 @@ void KyraEngine_LoK::magicOutMouseItem(int animIndex, int itemPos) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::magicInMouseItem(int animIndex, int item, int itemPos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::magicInMouseItem(%d, %d, %d)", animIndex, item, itemPos);
|
||||
int videoPageBackUp = _screen->_curPage;
|
||||
_screen->_curPage = 0;
|
||||
int x = 0, y = 0;
|
||||
|
@ -818,7 +795,6 @@ void KyraEngine_LoK::magicInMouseItem(int animIndex, int item, int itemPos) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::specialMouseItemFX(int shape, int x, int y, int animIndex, int tableIndex, int loopStart, int maxLoops) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::specialMouseItemFX(%d, %d, %d, %d, %d, %d, %d)", shape, x, y, animIndex, tableIndex, loopStart, maxLoops);
|
||||
static const uint8 table1[] = {
|
||||
0x23, 0x45, 0x55, 0x72, 0x84, 0xCF, 0x00, 0x00
|
||||
};
|
||||
|
@ -841,7 +817,6 @@ void KyraEngine_LoK::specialMouseItemFX(int shape, int x, int y, int animIndex,
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::processSpecialMouseItemFX(%d, %d, %d, %d, %d, %d)", shape, x, y, tableValue, loopStart, maxLoops);
|
||||
uint8 shapeColorTable[16];
|
||||
uint8 *shapePtr = _shapes[shape] + 10;
|
||||
if (_flags.useAltShapeHeader)
|
||||
|
@ -860,7 +835,6 @@ void KyraEngine_LoK::processSpecialMouseItemFX(int shape, int x, int y, int tabl
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::updatePlayerItemsForScene() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::updatePlayerItemsForScene()");
|
||||
if (_itemInHand >= 29 && _itemInHand < 33) {
|
||||
++_itemInHand;
|
||||
if (_itemInHand > 33)
|
||||
|
@ -917,25 +891,21 @@ void KyraEngine_LoK::redrawInventory(int page) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::backUpItemRect0(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::backUpItemRect0(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 3<<3, 24);
|
||||
_screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]);
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::restoreItemRect0(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::restoreItemRect0(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 3<<3, 24);
|
||||
_screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]);
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::backUpItemRect1(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::backUpItemRect1(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 4<<3, 32);
|
||||
_screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]);
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::restoreItemRect1(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::restoreItemRect1(%d, %d)", xpos, ypos);
|
||||
_screen->rectClip(xpos, ypos, 4<<3, 32);
|
||||
_screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_MR::removeTrashItems() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::removeTrashItems()");
|
||||
for (int i = 0; _trashItemList[i] != 0xFF; ++i) {
|
||||
for (int item = findItem(_trashItemList[i]); item != -1; item = findItem(_trashItemList[i])) {
|
||||
if (_itemList[item].sceneId != _mainCharacter.sceneId)
|
||||
|
@ -41,7 +40,6 @@ void KyraEngine_MR::removeTrashItems() {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::findFreeInventorySlot() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::findFreeInventorySlot()");
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
if (_mainCharacter.inventory[i] == 0xFFFF)
|
||||
return i;
|
||||
|
@ -50,7 +48,6 @@ int KyraEngine_MR::findFreeInventorySlot() {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::checkItemCollision(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::checkItemCollision(%d, %d)", x, y);
|
||||
int itemIndex = -1;
|
||||
int maxItemY = -1;
|
||||
|
||||
|
@ -80,7 +77,6 @@ int KyraEngine_MR::checkItemCollision(int x, int y) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::setMouseCursor(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::setMouseCursor(%u)", item);
|
||||
int shape = 0;
|
||||
int hotX = 1;
|
||||
int hotY = 1;
|
||||
|
@ -96,7 +92,6 @@ void KyraEngine_MR::setMouseCursor(uint16 item) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::setItemMouseCursor() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::setItemMouseCursor()");
|
||||
_mouseState = _itemInHand;
|
||||
if (_itemInHand == -1)
|
||||
_screen->setMouseCursor(0, 0, _gameShapes[0]);
|
||||
|
@ -105,7 +100,6 @@ void KyraEngine_MR::setItemMouseCursor() {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::dropItem(int unk1, uint16 item, int x, int y, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::dropItem(%d, %d, %d, %d, %d)", unk1, item, x, y, unk2);
|
||||
|
||||
if (_mouseState <= -1)
|
||||
return false;
|
||||
|
@ -130,7 +124,6 @@ bool KyraEngine_MR::dropItem(int unk1, uint16 item, int x, int y, int unk2) {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::processItemDrop(uint16 sceneId, uint16 item, int x, int y, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::processItemDrop(%d, %d, %d, %d, %d, %d)", sceneId, item, x, y, unk1, unk2);
|
||||
|
||||
int itemPos = checkItemCollision(x, y);
|
||||
|
||||
|
@ -236,7 +229,6 @@ bool KyraEngine_MR::processItemDrop(uint16 sceneId, uint16 item, int x, int y, i
|
|||
}
|
||||
|
||||
void KyraEngine_MR::itemDropDown(int startX, int startY, int dstX, int dstY, int itemSlot, uint16 item, int remove) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::itemDropDown(%d, %d, %d, %d, %d, %u, %d)", startX, startY, dstX, dstY, itemSlot, item, remove);
|
||||
if (startX == dstX && startY == dstY) {
|
||||
_itemList[itemSlot].x = dstX;
|
||||
_itemList[itemSlot].y = dstY;
|
||||
|
@ -321,7 +313,6 @@ void KyraEngine_MR::itemDropDown(int startX, int startY, int dstX, int dstY, int
|
|||
}
|
||||
|
||||
void KyraEngine_MR::exchangeMouseItem(int itemPos, int runScript) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::exchangeMouseItem(%d, %d)", itemPos, runScript);
|
||||
|
||||
if (itemListMagic(_itemInHand, itemPos))
|
||||
return;
|
||||
|
@ -354,7 +345,6 @@ void KyraEngine_MR::exchangeMouseItem(int itemPos, int runScript) {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::pickUpItem(int x, int y, int runScript) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::pickUpItem(%d, %d, %d)", x, y, runScript);
|
||||
int itemPos = checkItemCollision(x, y);
|
||||
|
||||
if (itemPos <= -1)
|
||||
|
@ -386,7 +376,6 @@ bool KyraEngine_MR::pickUpItem(int x, int y, int runScript) {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::isDropable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::isDropable(%d, %d)", x, y);
|
||||
if (y < 14 || y > 187)
|
||||
return false;
|
||||
|
||||
|
@ -401,7 +390,6 @@ bool KyraEngine_MR::isDropable(int x, int y) {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::itemListMagic(int handItem, int itemSlot) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::itemListMagic(%d, %d)", handItem, itemSlot);
|
||||
|
||||
uint16 item = _itemList[itemSlot].id;
|
||||
if (_currentChapter == 1 && handItem == 3 && item == 3 && queryGameFlag(0x76)) {
|
||||
|
@ -481,7 +469,6 @@ bool KyraEngine_MR::itemListMagic(int handItem, int itemSlot) {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::itemInventoryMagic(int handItem, int invSlot) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::itemInventoryMagic(%d, %d)", handItem, invSlot);
|
||||
|
||||
uint16 item = _mainCharacter.inventory[invSlot];
|
||||
if (_currentChapter == 1 && handItem == 3 && item == 3 && queryGameFlag(0x76)) {
|
||||
|
@ -542,21 +529,18 @@ bool KyraEngine_MR::itemInventoryMagic(int handItem, int invSlot) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::getItemCommandStringDrop(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getItemCommandStringDrop(%u)", item);
|
||||
assert(item < _itemStringMapSize);
|
||||
int stringId = _itemStringMap[item];
|
||||
return _itemStringDrop[stringId];
|
||||
}
|
||||
|
||||
int KyraEngine_MR::getItemCommandStringPickUp(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getItemCommandStringPickUp(%u)", item);
|
||||
assert(item < _itemStringMapSize);
|
||||
int stringId = _itemStringMap[item];
|
||||
return _itemStringPickUp[stringId];
|
||||
}
|
||||
|
||||
int KyraEngine_MR::getItemCommandStringInv(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getItemCommandStringInv(%u)", item);
|
||||
assert(item < _itemStringMapSize);
|
||||
int stringId = _itemStringMap[item];
|
||||
return _itemStringInv[stringId];
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_v2::initItemList(int size) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::initItemList(%d)", size);
|
||||
delete[] _itemList;
|
||||
|
||||
_itemList = new Item[size];
|
||||
|
@ -41,7 +40,6 @@ void KyraEngine_v2::initItemList(int size) {
|
|||
}
|
||||
|
||||
int KyraEngine_v2::findFreeItem() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::findFreeItem()");
|
||||
for (int i = 0; i < _itemListSize; ++i) {
|
||||
if (_itemList[i].id == 0xFFFF)
|
||||
return i;
|
||||
|
@ -50,7 +48,6 @@ int KyraEngine_v2::findFreeItem() {
|
|||
}
|
||||
|
||||
int KyraEngine_v2::countAllItems() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::countAllItems()");
|
||||
int num = 0;
|
||||
for (int i = 0; i < _itemListSize; ++i) {
|
||||
if (_itemList[i].id != 0xFFFF)
|
||||
|
@ -60,7 +57,6 @@ int KyraEngine_v2::countAllItems() {
|
|||
}
|
||||
|
||||
int KyraEngine_v2::findItem(uint16 sceneId, uint16 id) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::findItem(%u, %u)", sceneId, id);
|
||||
for (int i = 0; i < _itemListSize; ++i) {
|
||||
if (_itemList[i].id == id && _itemList[i].sceneId == sceneId)
|
||||
return i;
|
||||
|
@ -69,7 +65,6 @@ int KyraEngine_v2::findItem(uint16 sceneId, uint16 id) {
|
|||
}
|
||||
|
||||
int KyraEngine_v2::findItem(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::findItem(%u)", item);
|
||||
for (int i = 0; i < _itemListSize; ++i) {
|
||||
if (_itemList[i].id == item)
|
||||
return i;
|
||||
|
@ -78,13 +73,11 @@ int KyraEngine_v2::findItem(uint16 item) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::resetItemList() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::resetItemList()");
|
||||
for (int i = 0; i < _itemListSize; ++i)
|
||||
resetItem(i);
|
||||
}
|
||||
|
||||
void KyraEngine_v2::resetItem(int index) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::resetItem(%d)", index);
|
||||
_itemList[index].id = 0xFFFF;
|
||||
_itemList[index].sceneId = 0xFFFF;
|
||||
_itemList[index].x = 0;
|
||||
|
@ -92,7 +85,6 @@ void KyraEngine_v2::resetItem(int index) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::setHandItem(uint16 item) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::setHandItem(%u)", item);
|
||||
Screen *scr = screen();
|
||||
scr->hideMouse();
|
||||
|
||||
|
@ -107,7 +99,6 @@ void KyraEngine_v2::setHandItem(uint16 item) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::removeHandItem() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::removeHandItem()");
|
||||
Screen *scr = screen();
|
||||
scr->hideMouse();
|
||||
scr->setMouseCursor(0, 0, getShapePtr(0));
|
||||
|
|
|
@ -1453,7 +1453,6 @@ void KyraEngine_HoF::restoreGfxRect32x32(int x, int y) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_HoF::openTalkFile(int newFile) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_HoF::openTalkFile(%d)", newFile);
|
||||
char talkFilename[16];
|
||||
|
||||
if (_oldTalkFile > 0) {
|
||||
|
@ -1481,7 +1480,6 @@ void KyraEngine_HoF::openTalkFile(int newFile) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::snd_playVoiceFile(int id) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_HoF::snd_playVoiceFile(%d)", id);
|
||||
char vocFile[9];
|
||||
assert(id >= 0 && id <= 9999999);
|
||||
sprintf(vocFile, "%07d", id);
|
||||
|
@ -1498,7 +1496,6 @@ void KyraEngine_HoF::snd_playVoiceFile(int id) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::snd_loadSoundFile(int id) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_HoF::snd_loadSoundFile(%d)", id);
|
||||
if (id < 0 || !_trackMap)
|
||||
return;
|
||||
|
||||
|
@ -1509,7 +1506,6 @@ void KyraEngine_HoF::snd_loadSoundFile(int id) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::playVoice(int high, int low) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_HoF::playVoice(%d, %d)", high, low);
|
||||
if (!_flags.isTalkie)
|
||||
return;
|
||||
int vocFile = high * 10000 + low * 10;
|
||||
|
@ -1518,7 +1514,6 @@ void KyraEngine_HoF::playVoice(int high, int low) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_HoF::snd_playSoundEffect(%d, %d)", track, volume);
|
||||
|
||||
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
|
||||
if (track == 10)
|
||||
|
|
|
@ -316,7 +316,6 @@ Common::Error KyraEngine_LoK::go() {
|
|||
|
||||
|
||||
void KyraEngine_LoK::startup() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::startup()");
|
||||
static const uint8 colorMap[] = { 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0 };
|
||||
_screen->setTextColorMap(colorMap);
|
||||
_sound->setSoundList(&_soundData[kMusicIngame]);
|
||||
|
@ -399,7 +398,6 @@ void KyraEngine_LoK::startup() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::mainLoop() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::mainLoop()");
|
||||
|
||||
_eventList.clear();
|
||||
|
||||
|
@ -532,7 +530,6 @@ void KyraEngine_LoK::delayWithTicks(int ticks) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_LoK::setupShapes123(const Shape *shapeTable, int endShape, int flags) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupShapes123(%p, %d, %d)", (const void *)shapeTable, endShape, flags);
|
||||
|
||||
for (int i = 123; i <= 172; ++i)
|
||||
_shapes[i] = 0;
|
||||
|
@ -561,7 +558,6 @@ void KyraEngine_LoK::setupShapes123(const Shape *shapeTable, int endShape, int f
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::freeShapes123() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::freeShapes123()");
|
||||
|
||||
for (int i = 123; i <= 172; ++i) {
|
||||
delete[] _shapes[i];
|
||||
|
@ -581,7 +577,6 @@ Movie *KyraEngine_LoK::createWSAMovie() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setBrandonPoisonFlags(int reset) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setBrandonPoisonFlags(%d)", reset);
|
||||
_brandonStatusBit |= 1;
|
||||
|
||||
if (reset)
|
||||
|
@ -598,7 +593,6 @@ void KyraEngine_LoK::setBrandonPoisonFlags(int reset) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::resetBrandonPoisonFlags() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::resetBrandonPoisonFlags()");
|
||||
_brandonStatusBit = 0;
|
||||
|
||||
for (int i = 0; i < 0x100; ++i)
|
||||
|
@ -610,7 +604,6 @@ void KyraEngine_LoK::resetBrandonPoisonFlags() {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_LoK::processInput(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::processInput(%d, %d)", xpos, ypos);
|
||||
|
||||
if (processInputHelper(xpos, ypos))
|
||||
return;
|
||||
|
@ -662,7 +655,6 @@ void KyraEngine_LoK::processInput(int xpos, int ypos) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::processInputHelper(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::processInputHelper(%d, %d)", xpos, ypos);
|
||||
uint8 item = findItemAtPos(xpos, ypos);
|
||||
if (item != 0xFF) {
|
||||
if (_itemInHand == -1) {
|
||||
|
@ -689,7 +681,6 @@ int KyraEngine_LoK::processInputHelper(int xpos, int ypos) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::clickEventHandler(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::clickEventHandler(%d, %d)", xpos, ypos);
|
||||
_emc->init(&_scriptClick, &_scriptClickData);
|
||||
_scriptClick.regs[1] = xpos;
|
||||
_scriptClick.regs[2] = ypos;
|
||||
|
@ -816,7 +807,6 @@ void KyraEngine_LoK::updateMousePointer(bool forceUpdate) {
|
|||
}
|
||||
|
||||
bool KyraEngine_LoK::hasClickedOnExit(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::hasClickedOnExit(%d, %d)", xpos, ypos);
|
||||
if (xpos < 16 || xpos >= 304)
|
||||
return true;
|
||||
|
||||
|
@ -830,7 +820,6 @@ bool KyraEngine_LoK::hasClickedOnExit(int xpos, int ypos) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::clickEventHandler2() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::clickEventHandler2()");
|
||||
|
||||
Common::Point mouse = getMousePos();
|
||||
|
||||
|
@ -846,7 +835,6 @@ void KyraEngine_LoK::clickEventHandler2() {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::checkForNPCScriptRun(int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::checkForNPCScriptRun(%d, %d)", xpos, ypos);
|
||||
int returnValue = -1;
|
||||
const Character *currentChar = _currentCharacter;
|
||||
int charLeft = 0, charRight = 0, charTop = 0, charBottom = 0;
|
||||
|
@ -895,7 +883,6 @@ int KyraEngine_LoK::checkForNPCScriptRun(int xpos, int ypos) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::runNpcScript(int func) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::runNpcScript(%d)", func);
|
||||
_emc->init(&_npcScript, &_npcScriptData);
|
||||
_emc->start(&_npcScript, func);
|
||||
_npcScript.regs[0] = _currentCharacter->sceneId;
|
||||
|
@ -907,7 +894,6 @@ void KyraEngine_LoK::runNpcScript(int func) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::checkAmuletAnimFlags() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::checkSpecialAnimFlags()");
|
||||
|
||||
if (_brandonStatusBit & 2) {
|
||||
seq_makeBrandonNormal2();
|
||||
|
|
|
@ -365,7 +365,6 @@ void KyraEngine_MR::uninitMainMenu() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::playVQA(const char *name) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::playVQA('%s')", name);
|
||||
|
||||
VQAMovie vqa(this, _system);
|
||||
|
||||
|
@ -406,7 +405,6 @@ void KyraEngine_MR::playVQA(const char *name) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::playMenuAudioFile() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::playMenuAudioFile()");
|
||||
if (_soundDigital->isPlaying(_musicSoundChannel))
|
||||
return;
|
||||
|
||||
|
@ -414,7 +412,6 @@ void KyraEngine_MR::playMenuAudioFile() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playWanderScoreViaMap(%d, %d)", track, force);
|
||||
|
||||
if (_musicSoundChannel != -1 && !_soundDigital->isPlaying(_musicSoundChannel))
|
||||
force = 1;
|
||||
|
@ -438,7 +435,6 @@ void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::stopMusicTrack() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::stopMusicTrack()");
|
||||
|
||||
if (_musicSoundChannel != -1 && _soundDigital->isPlaying(_musicSoundChannel))
|
||||
_soundDigital->stopSound(_musicSoundChannel);
|
||||
|
@ -448,7 +444,6 @@ void KyraEngine_MR::stopMusicTrack() {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::musicUpdate(int forceRestart) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::musicUpdate(%d)", forceRestart);
|
||||
|
||||
static uint32 mTimer = 0;
|
||||
static uint16 lock = 0;
|
||||
|
@ -475,7 +470,6 @@ int KyraEngine_MR::musicUpdate(int forceRestart) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::fadeOutMusic(int ticks) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::fadeOutMusic(%d)", ticks);
|
||||
if (_musicSoundChannel >= 0) {
|
||||
_fadeOutMusicChannel = _musicSoundChannel;
|
||||
_soundDigital->beginFadeOut(_musicSoundChannel, ticks);
|
||||
|
@ -484,7 +478,6 @@ void KyraEngine_MR::fadeOutMusic(int ticks) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::snd_playSoundEffect(int item, int volume) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playSoundEffect(%d, %d)", item, volume);
|
||||
if (_sfxFileMap[item*2+0] != 0xFF) {
|
||||
char filename[16];
|
||||
assert(_sfxFileMap[item*2+0] < _sfxFileListSize);
|
||||
|
@ -496,12 +489,10 @@ void KyraEngine_MR::snd_playSoundEffect(int item, int volume) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::playVoice(int high, int low) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::playVoice(%d, %d)", high, low);
|
||||
snd_playVoiceFile(high * 1000 + low);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::snd_playVoiceFile(int file) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playVoiceFile(%d)", file);
|
||||
char filename[16];
|
||||
snprintf(filename, 16, "%.08u", (uint)file);
|
||||
|
||||
|
@ -510,18 +501,15 @@ void KyraEngine_MR::snd_playVoiceFile(int file) {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::snd_voiceIsPlaying() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_voiceIsPlaying()");
|
||||
return _soundDigital->isPlaying(_voiceSoundChannel);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::snd_stopVoice() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_stopVoice()");
|
||||
if (_voiceSoundChannel != -1)
|
||||
_soundDigital->stopSound(_voiceSoundChannel);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::playStudioSFX(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::playStudioSFX('%s')", str);
|
||||
if (!_configStudio)
|
||||
return;
|
||||
|
||||
|
@ -541,7 +529,6 @@ void KyraEngine_MR::playStudioSFX(const char *str) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::preinit() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::preinit()");
|
||||
|
||||
_itemBuffer1 = new int8[72];
|
||||
_itemBuffer2 = new int8[144];
|
||||
|
@ -552,7 +539,6 @@ void KyraEngine_MR::preinit() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::initMouseShapes() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::initMouseShapes()");
|
||||
uint8 *data = _res->fileData("MOUSE.SHP", 0);
|
||||
assert(data);
|
||||
for (int i = 0; i <= 6; ++i)
|
||||
|
@ -561,7 +547,6 @@ void KyraEngine_MR::initMouseShapes() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::startup() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::startup()");
|
||||
|
||||
_album.wsa = new WSAMovie_v2(this, _screen);
|
||||
assert(_album.wsa);
|
||||
|
@ -701,7 +686,6 @@ void KyraEngine_MR::startup() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadCostPal() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadCostPal()");
|
||||
_res->exists("_COSTPAL.DAT", true);
|
||||
uint32 size = 0;
|
||||
_costPalBuffer = _res->fileData("_COSTPAL.DAT", &size);
|
||||
|
@ -710,13 +694,11 @@ void KyraEngine_MR::loadCostPal() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadShadowShape() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadShadowShape()");
|
||||
_screen->loadBitmap("SHADOW.CSH", 3, 3, 0);
|
||||
addShapeToPool(_screen->getCPagePtr(3), 421, 0);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::loadExtrasShapes() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadExtrasShapes()");
|
||||
_screen->loadBitmap("EXTRAS.CSH", 3, 3, 0);
|
||||
for (int i = 0; i < 20; ++i)
|
||||
addShapeToPool(_screen->getCPagePtr(3), i+433, i);
|
||||
|
@ -725,21 +707,18 @@ void KyraEngine_MR::loadExtrasShapes() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadInterfaceShapes() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadInterfaceShapes()");
|
||||
_screen->loadBitmap("INTRFACE.CSH", 3, 3, 0);
|
||||
for (int i = 422; i <= 432; ++i)
|
||||
addShapeToPool(_screen->getCPagePtr(3), i, i-422);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::loadInterface() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadInterface()");
|
||||
_screen->loadBitmap("INTRFACE.CPS", 3, 3, 0);
|
||||
memcpy(_interface, _screen->getCPagePtr(3), 17920);
|
||||
memcpy(_interfaceCommandLine, _screen->getCPagePtr(3), 3840);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::initItems() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::initItems()");
|
||||
|
||||
_screen->loadBitmap("ITEMS.CSH", 3, 3, 0);
|
||||
|
||||
|
@ -765,7 +744,6 @@ void KyraEngine_MR::initItems() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::runStartupScript(int script, int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::runStartupScript(%d, %d)", script, unk1);
|
||||
EMCState state;
|
||||
EMCData data;
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
@ -786,7 +764,6 @@ void KyraEngine_MR::runStartupScript(int script, int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::openTalkFile(int file) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::openTalkFile(%d)", file);
|
||||
char talkFilename[16];
|
||||
|
||||
if (file == 0) {
|
||||
|
@ -814,7 +791,6 @@ void KyraEngine_MR::openTalkFile(int file) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::loadCharacterShapes(int newShapes) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadCharacterShapes(%d)", newShapes);
|
||||
static const uint8 numberOffset[] = { 3, 3, 4, 4, 3, 3 };
|
||||
static const uint8 startShape[] = { 0x32, 0x58, 0x78, 0x98, 0xB8, 0xD8 };
|
||||
static const uint8 endShape[] = { 0x57, 0x77, 0x97, 0xB7, 0xD7, 0xF7 };
|
||||
|
@ -860,7 +836,6 @@ void KyraEngine_MR::loadCharacterShapes(int newShapes) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateMalcolmShapes() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateMalcolmShapes()");
|
||||
assert(_characterShapeFile >= 0 && _characterShapeFile < _shapeDescsSize);
|
||||
_malcolmShapeXOffset = _shapeDescs[_characterShapeFile].xOffset;
|
||||
_malcolmShapeYOffset = _shapeDescs[_characterShapeFile].yOffset;
|
||||
|
@ -875,7 +850,6 @@ int KyraEngine_MR::getCharacterWalkspeed() const {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateCharAnimFrame(int character, int *table) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateCharPos(%d, %p)", character, (const void*)table);
|
||||
++_mainCharacter.animFrame;
|
||||
int facing = _mainCharacter.facing;
|
||||
|
||||
|
@ -931,7 +905,6 @@ void KyraEngine_MR::updateCharAnimFrame(int character, int *table) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateCharPal(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateCharPal(%d)", unk1);
|
||||
int layer = _screen->getLayer(_mainCharacter.x1, _mainCharacter.y1) - 1;
|
||||
const uint8 *src = _costPalBuffer + _characterShapeFile * 72;
|
||||
uint8 *dst = _screen->getPalette(0) + 432;
|
||||
|
@ -977,7 +950,6 @@ void KyraEngine_MR::updateCharPal(int unk1) {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::checkCharCollision(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::checkCharCollision(%d, %d)", x, y);
|
||||
|
||||
int scale = getScale(_mainCharacter.x1, _mainCharacter.y1);
|
||||
int width = (scale * 37) >> 8;
|
||||
|
@ -996,7 +968,6 @@ bool KyraEngine_MR::checkCharCollision(int x, int y) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::runLoop() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::runLoop()");
|
||||
|
||||
_eventList.clear();
|
||||
|
||||
|
@ -1035,7 +1006,6 @@ void KyraEngine_MR::runLoop() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::handleInput(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::handleInput(%d, %d)", x, y);
|
||||
if (_inventoryState)
|
||||
return;
|
||||
setNextIdleAnimTimer();
|
||||
|
@ -1108,7 +1078,6 @@ void KyraEngine_MR::handleInput(int x, int y) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::inputSceneChange(int x, int y, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::inputSceneChange(%d, %d, %d, %d)", x, y, unk1, unk2);
|
||||
uint16 curScene = _mainCharacter.sceneId;
|
||||
_pathfinderFlag = 15;
|
||||
|
||||
|
@ -1160,7 +1129,6 @@ int KyraEngine_MR::inputSceneChange(int x, int y, int unk1, int unk2) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::update() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::update()");
|
||||
updateInput();
|
||||
|
||||
musicUpdate(0);
|
||||
|
@ -1176,7 +1144,6 @@ void KyraEngine_MR::update() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateWithText() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::update()");
|
||||
updateInput();
|
||||
|
||||
musicUpdate(0);
|
||||
|
@ -1200,7 +1167,6 @@ void KyraEngine_MR::updateWithText() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateMouse() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateMouse()");
|
||||
int shape = 0, offsetX = 0, offsetY = 0;
|
||||
Common::Point mouse = getMousePos();
|
||||
bool hasItemCollision = checkItemCollision(mouse.x, mouse.y) != -1;
|
||||
|
@ -1321,7 +1287,6 @@ void KyraEngine_MR::updateMouse() {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::makeCharFacingMouse() {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::makeCharFacingMouse()");
|
||||
if (_mainCharacter.x1 > _mouseX)
|
||||
_mainCharacter.facing = 5;
|
||||
else
|
||||
|
@ -1334,33 +1299,28 @@ void KyraEngine_MR::makeCharFacingMouse() {
|
|||
#pragma mark -
|
||||
|
||||
int KyraEngine_MR::getDrawLayer(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getDrawLayer(%d, %d)", x, y);
|
||||
int layer = _screen->getLayer(x, y) - 1;
|
||||
layer = _sceneDatLayerTable[layer];
|
||||
return MAX(0, MIN(layer, 6));
|
||||
}
|
||||
|
||||
int KyraEngine_MR::getScale(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getScale(%d, %d)", x, y);
|
||||
return _scaleTable[_screen->getLayer(x, y) - 1];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::backUpGfxRect32x32(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::backUpGfxRect32x32(%d, %d)", x, y);
|
||||
_screen->copyRegionToBuffer(_screen->_curPage, x, y, 32, 32, _gfxBackUpRect);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::restoreGfxRect32x32(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::restoreGfxRect32x32(%d, %d)", x, y);
|
||||
_screen->copyBlockToPage(_screen->_curPage, x, y, 32, 32, _gfxBackUpRect);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
char *KyraEngine_MR::appendLanguage(char *buf, int lang, int bufSize) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::appendLanguage([%p|'%s'], %d, %d)", (const void*)buf, buf, lang, bufSize);
|
||||
assert(lang < _languageExtensionSize);
|
||||
|
||||
int size = strlen(buf) + strlen(_languageExtension[lang]);
|
||||
|
@ -1379,7 +1339,6 @@ char *KyraEngine_MR::appendLanguage(char *buf, int lang, int bufSize) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::loadLanguageFile(const char *file, uint8 *&buffer) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadLanguageFile('%s', %p)", file, (const void*)buffer);
|
||||
|
||||
delete[] buffer;
|
||||
buffer = 0;
|
||||
|
@ -1393,7 +1352,6 @@ int KyraEngine_MR::loadLanguageFile(const char *file, uint8 *&buffer) {
|
|||
}
|
||||
|
||||
uint8 *KyraEngine_MR::getTableEntry(uint8 *buffer, int id) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getTableEntry(%p, %d)", (const void*)buffer, id);
|
||||
uint16 tableEntries = READ_LE_UINT16(buffer);
|
||||
const uint16 *indexTable = (const uint16*)(buffer + 2);
|
||||
const uint16 *offsetTable = indexTable + tableEntries;
|
||||
|
@ -1408,7 +1366,6 @@ uint8 *KyraEngine_MR::getTableEntry(uint8 *buffer, int id) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::getTableEntry(Common::SeekableReadStream *stream, int id, char *dst) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::getTableEntry(%p, %d, %p)", (const void*)stream, id, (const void*)dst);
|
||||
stream->seek(0, SEEK_SET);
|
||||
uint16 tableEntries = stream->readUint16LE();
|
||||
|
||||
|
@ -1427,7 +1384,6 @@ void KyraEngine_MR::getTableEntry(Common::SeekableReadStream *stream, int id, ch
|
|||
#pragma mark -
|
||||
|
||||
bool KyraEngine_MR::talkObjectsInCurScene() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::talkObjectsInCurScene()");
|
||||
|
||||
for (int i = 0; i < 88; ++i) {
|
||||
if (_talkObjectList[i].sceneId == _mainCharacter.sceneId)
|
||||
|
@ -1440,7 +1396,6 @@ bool KyraEngine_MR::talkObjectsInCurScene() {
|
|||
#pragma mark -
|
||||
|
||||
bool KyraEngine_MR::updateScore(int scoreId, int strId) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateScore(%d, %d)", scoreId, strId);
|
||||
|
||||
int scoreIndex = (scoreId >> 3);
|
||||
int scoreBit = scoreId & 7;
|
||||
|
@ -1466,7 +1421,6 @@ bool KyraEngine_MR::updateScore(int scoreId, int strId) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::scoreIncrease(int count, const char *str) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::scoreIncrease(%d, '%s')", count, str);
|
||||
int drawOld = 1;
|
||||
_screen->hideMouse();
|
||||
|
||||
|
@ -1498,7 +1452,6 @@ void KyraEngine_MR::scoreIncrease(int count, const char *str) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::changeChapter(int newChapter, int sceneId, int malcolmShapes, int facing) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::changeChapter(%d, %d, %d, %d)", newChapter, sceneId, malcolmShapes, facing);
|
||||
resetItemList();
|
||||
|
||||
_currentChapter = newChapter;
|
||||
|
@ -1534,7 +1487,6 @@ void KyraEngine_MR::resetSkipFlag(bool removeEvent) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_MR::registerDefaultSettings() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::registerDefaultSettings()");
|
||||
KyraEngine_v1::registerDefaultSettings();
|
||||
|
||||
// Most settings already have sensible defaults. This one, however, is
|
||||
|
@ -1546,7 +1498,6 @@ void KyraEngine_MR::registerDefaultSettings() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::writeSettings() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::writeSettings()");
|
||||
switch (_lang) {
|
||||
case 1:
|
||||
_flags.lang = Common::FR_FRA;
|
||||
|
@ -1575,7 +1526,6 @@ void KyraEngine_MR::writeSettings() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::readSettings() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::readSettings()");
|
||||
KyraEngine_v1::readSettings();
|
||||
|
||||
_configStudio = ConfMan.getBool("studio_audience");
|
||||
|
|
|
@ -226,7 +226,6 @@ void KyraEngine_v1::setMousePos(int x, int y) {
|
|||
}
|
||||
|
||||
int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::checkInput(%p, %d)", (const void*)buttonList, mainLoop);
|
||||
_isSaveAllowed = mainLoop;
|
||||
updateInput();
|
||||
_isSaveAllowed = false;
|
||||
|
|
|
@ -144,7 +144,6 @@ void KyraEngine_v2::pauseEngineIntern(bool pause) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::delay(uint32 amount, bool updateGame, bool isMainLoop) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::delay(%u, %d, %d)", amount, updateGame, isMainLoop);
|
||||
|
||||
uint32 start = _system->getMillis();
|
||||
do {
|
||||
|
@ -170,13 +169,11 @@ bool KyraEngine_v2::checkSpecialSceneExit(int num, int x, int y) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::addShapeToPool(const uint8 *data, int realIndex, int shape) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::addShapeToPool(%p, %d, %d)", data, realIndex, shape);
|
||||
remShapeFromPool(realIndex);
|
||||
_gameShapes[realIndex] = screen_v2()->makeShapeCopy(data, shape);
|
||||
}
|
||||
|
||||
void KyraEngine_v2::addShapeToPool(uint8 *shpData, int index) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::addShapeToPool(%p, %d)", shpData, index);
|
||||
remShapeFromPool(index);
|
||||
_gameShapes[index] = shpData;
|
||||
}
|
||||
|
@ -190,7 +187,6 @@ void KyraEngine_v2::remShapeFromPool(int idx) {
|
|||
}
|
||||
|
||||
uint8 *KyraEngine_v2::getShapePtr(int shape) const {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::getShapePtr(%d)", shape);
|
||||
ShapeMap::iterator iter = _gameShapes.find(shape);
|
||||
if (iter == _gameShapes.end())
|
||||
return 0;
|
||||
|
@ -198,7 +194,6 @@ uint8 *KyraEngine_v2::getShapePtr(int shape) const {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::moveCharacter(int facing, int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::moveCharacter(%d, %d, %d)", facing, x, y);
|
||||
x &= ~3;
|
||||
y &= ~1;
|
||||
_mainCharacter.facing = facing;
|
||||
|
@ -233,13 +228,11 @@ void KyraEngine_v2::moveCharacter(int facing, int x, int y) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::updateCharPosWithUpdate() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::updateCharPosWithUpdate()");
|
||||
updateCharPos(0, 0);
|
||||
update();
|
||||
}
|
||||
|
||||
int KyraEngine_v2::updateCharPos(int *table, int force) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::updateCharPos(%p, %d)", (const void*)table, force);
|
||||
if (_updateCharPosNextUpdate > _system->getMillis() && !force)
|
||||
return 0;
|
||||
_mainCharacter.x1 += _charAddXPosTable[_mainCharacter.facing];
|
||||
|
|
|
@ -598,7 +598,6 @@ Common::Error LoLEngine::go() {
|
|||
#pragma mark - Initialization
|
||||
|
||||
void LoLEngine::preInit() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::preInit()");
|
||||
|
||||
_res->loadPakFile("GENERAL.PAK");
|
||||
if (_flags.isTalkie)
|
||||
|
@ -619,7 +618,6 @@ void LoLEngine::preInit() {
|
|||
}
|
||||
|
||||
void LoLEngine::loadItemIconShapes() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::loadItemIconShapes()");
|
||||
|
||||
if (_itemIconShapes) {
|
||||
for (int i = 0; i < _numItemIconShapes; i++)
|
||||
|
@ -687,7 +685,6 @@ uint8 *LoLEngine::getItemIconShapePtr(int index) {
|
|||
}
|
||||
|
||||
int LoLEngine::mainMenu() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::mainMenu()");
|
||||
|
||||
bool hasSave = saveFileLoadable(0);
|
||||
|
||||
|
@ -925,7 +922,6 @@ void LoLEngine::update() {
|
|||
#pragma mark - Localization
|
||||
|
||||
char *LoLEngine::getLangString(uint16 id) {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::getLangString(0x%.04X)", id);
|
||||
|
||||
if (id == 0xFFFF)
|
||||
return 0;
|
||||
|
@ -958,7 +954,6 @@ char *LoLEngine::getLangString(uint16 id) {
|
|||
}
|
||||
|
||||
uint8 *LoLEngine::getTableEntry(uint8 *buffer, uint16 id) {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::getTableEntry(%p, %d)", (const void *)buffer, id);
|
||||
if (!buffer)
|
||||
return 0;
|
||||
|
||||
|
@ -1803,7 +1798,6 @@ void LoLEngine::snd_stopSpeech(bool setFlag) {
|
|||
}
|
||||
|
||||
void LoLEngine::snd_playSoundEffect(int track, int volume) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "LoLEngine::snd_playSoundEffect(%d, %d)", track, volume);
|
||||
|
||||
if (track == 1 && (_lastSfxTrack == -1 || _lastSfxTrack == 1))
|
||||
return;
|
||||
|
|
|
@ -127,7 +127,6 @@ KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::Seekab
|
|||
}
|
||||
|
||||
Common::SeekableReadStream *KyraEngine_v1::openSaveForReading(const char *filename, SaveHeader &header) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForReading('%s', -)", filename);
|
||||
|
||||
Common::SeekableReadStream *in = 0;
|
||||
if (!(in = _saveFileMan->openForLoading(filename)))
|
||||
|
@ -178,7 +177,6 @@ Common::SeekableReadStream *KyraEngine_v1::openSaveForReading(const char *filena
|
|||
}
|
||||
|
||||
Common::WriteStream *KyraEngine_v1::openSaveForWriting(const char *filename, const char *saveName, const Graphics::Surface *thumbnail) const {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForWriting('%s', '%s', %p)", filename, saveName, (const void *)thumbnail);
|
||||
if (shouldQuit())
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
Common::Error KyraEngine_HoF::saveGameState(int slot, const char *saveName, const Graphics::Surface *thumb) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::saveGame(%d, '%s', %p)", slot, saveName, (const void *)thumb);
|
||||
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
|
||||
|
@ -130,7 +129,6 @@ Common::Error KyraEngine_HoF::saveGameState(int slot, const char *saveName, cons
|
|||
}
|
||||
|
||||
Common::Error KyraEngine_HoF::loadGameState(int slot) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::loadGame(%d)", slot);
|
||||
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
Common::Error KyraEngine_LoK::loadGameState(int slot) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::loadGame(%d)", slot);
|
||||
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
|
||||
|
@ -220,7 +219,6 @@ Common::Error KyraEngine_LoK::loadGameState(int slot) {
|
|||
}
|
||||
|
||||
Common::Error KyraEngine_LoK::saveGameState(int slot, const char *saveName, const Graphics::Surface *thumb) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::saveGame(%d, '%s', %p)", slot, saveName, (const void *)thumb);
|
||||
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
Common::Error LoLEngine::loadGameState(int slot) {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::loadGameState(%d)", slot);
|
||||
|
||||
const uint16 *cdf[] = { _charDefsMan, _charDefsWoman, _charDefsKieran, _charDefsMan, _charDefsAkshel };
|
||||
|
||||
|
@ -251,7 +250,6 @@ Common::Error LoLEngine::loadGameState(int slot) {
|
|||
}
|
||||
|
||||
Common::Error LoLEngine::saveGameState(int slot, const char *saveName, const Graphics::Surface *thumbnail) {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::saveGameState(%d, '%s', %p)", slot, saveName, (const void *)thumbnail);
|
||||
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
Common::Error KyraEngine_MR::saveGameState(int slot, const char *saveName, const Graphics::Surface *thumb) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::saveGame(%d, '%s', %p)", slot, saveName, (const void *)thumb);
|
||||
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
|
||||
|
@ -124,7 +123,6 @@ Common::Error KyraEngine_MR::saveGameState(int slot, const char *saveName, const
|
|||
}
|
||||
|
||||
Common::Error KyraEngine_MR::loadGameState(int slot) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadGame(%d)", slot);
|
||||
|
||||
const char *fileName = getSavegameFilename(slot);
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_HoF::enterNewScene(uint16 newScene, int facing, int unk1, int unk2, int unk3) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::enterNewScene(%d, %d, %d, %d, %d)", newScene, facing, unk1, unk2, unk3);
|
||||
if (_newChapterFile != _currentTalkFile) {
|
||||
_currentTalkFile = _newChapterFile;
|
||||
if (_flags.isTalkie) {
|
||||
|
@ -148,7 +147,6 @@ void KyraEngine_HoF::enterNewScene(uint16 newScene, int facing, int unk1, int un
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::enterNewSceneUnk1(int facing, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::enterNewSceneUnk1(%d, %d, %d)", facing, unk1, unk2);
|
||||
int x = 0, y = 0;
|
||||
int x2 = 0, y2 = 0;
|
||||
bool needProc = true;
|
||||
|
@ -244,7 +242,6 @@ void KyraEngine_HoF::enterNewSceneUnk1(int facing, int unk1, int unk2) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::enterNewSceneUnk2(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::enterNewSceneUnk2(%d)", unk1);
|
||||
_unk3 = -1;
|
||||
|
||||
if (_flags.isTalkie) {
|
||||
|
@ -273,7 +270,6 @@ void KyraEngine_HoF::enterNewSceneUnk2(int unk1) {
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::trySceneChange(int *moveTable, int unk1, int updateChar) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::trySceneChange(%p, %d, %d)", (const void*)moveTable, unk1, updateChar);
|
||||
bool running = true;
|
||||
bool unkFlag = false;
|
||||
int8 updateType = -1;
|
||||
|
@ -342,7 +338,6 @@ int KyraEngine_HoF::trySceneChange(int *moveTable, int unk1, int updateChar) {
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::checkSceneChange() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::checkSceneChange()");
|
||||
SceneDesc &curScene = _sceneList[_mainCharacter.sceneId];
|
||||
int charX = _mainCharacter.x1, charY = _mainCharacter.y1;
|
||||
int facing = 0;
|
||||
|
@ -396,14 +391,12 @@ int KyraEngine_HoF::checkSceneChange() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::unloadScene() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::unloadScene()");
|
||||
_emc->unload(&_sceneScriptData);
|
||||
freeSceneShapePtrs();
|
||||
freeSceneAnims();
|
||||
}
|
||||
|
||||
void KyraEngine_HoF::loadScenePal() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::loadScenePal()");
|
||||
uint16 sceneId = _mainCharacter.sceneId;
|
||||
memcpy(_screen->getPalette(1), _screen->getPalette(0), 768);
|
||||
|
||||
|
@ -417,7 +410,6 @@ void KyraEngine_HoF::loadScenePal() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::loadSceneMsc() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::loadSceneMsc()");
|
||||
uint16 sceneId = _mainCharacter.sceneId;
|
||||
char filename[14];
|
||||
strcpy(filename, _sceneList[sceneId].filename1);
|
||||
|
@ -426,7 +418,6 @@ void KyraEngine_HoF::loadSceneMsc() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::startSceneScript(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::startSceneScript(%d)", unk1);
|
||||
uint16 sceneId = _mainCharacter.sceneId;
|
||||
char filename[14];
|
||||
|
||||
|
@ -487,7 +478,6 @@ void KyraEngine_HoF::startSceneScript(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::runSceneScript2() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::runSceneScript2()");
|
||||
_emc->init(&_sceneScriptState, &_sceneScriptData);
|
||||
_sceneScriptState.regs[4] = _itemInHand;
|
||||
_emc->start(&_sceneScriptState, 2);
|
||||
|
@ -497,7 +487,6 @@ void KyraEngine_HoF::runSceneScript2() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::runSceneScript4(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::runSceneScript4(%d)", unk1);
|
||||
_sceneScriptState.regs[4] = _itemInHand;
|
||||
_sceneScriptState.regs[5] = unk1;
|
||||
|
||||
|
@ -507,7 +496,6 @@ void KyraEngine_HoF::runSceneScript4(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::runSceneScript7() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::runSceneScript7()");
|
||||
int oldPage = _screen->_curPage;
|
||||
_screen->_curPage = 2;
|
||||
|
||||
|
@ -519,7 +507,6 @@ void KyraEngine_HoF::runSceneScript7() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::initSceneAnims(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::initSceneAnims(%d)", unk1);
|
||||
for (int i = 0; i < 41; ++i)
|
||||
_animObjects[i].enabled = 0;
|
||||
|
||||
|
@ -678,7 +665,6 @@ void KyraEngine_HoF::initSceneAnims(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::initSceneScreen(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::initSceneScreen(%d)", unk1);
|
||||
if (_unkSceneScreenFlag1) {
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 144, 2, 0, Screen::CR_NO_P_CHECK);
|
||||
return;
|
||||
|
@ -705,14 +691,12 @@ void KyraEngine_HoF::initSceneScreen(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::freeSceneShapePtrs() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::freeSceneShapePtrs()");
|
||||
for (int i = 0; i < ARRAYSIZE(_sceneShapeTable); ++i)
|
||||
delete[] _sceneShapeTable[i];
|
||||
memset(_sceneShapeTable, 0, sizeof(_sceneShapeTable));
|
||||
}
|
||||
|
||||
void KyraEngine_HoF::fadeScenePal(int srcIndex, int delayTime) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::fadeScenePal(%d, %d)", srcIndex, delayTime);
|
||||
uint8 *dst = _screen->getPalette(0) + 336;
|
||||
const uint8 *src = _scenePal + (srcIndex << 4)*3;
|
||||
memcpy(dst, src, 48);
|
||||
|
@ -725,7 +709,6 @@ void KyraEngine_HoF::fadeScenePal(int srcIndex, int delayTime) {
|
|||
#pragma mark -
|
||||
|
||||
bool KyraEngine_HoF::lineIsPassable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::lineIsPassable(%d, %d)", x, y);
|
||||
static const int widthTable[] = { 1, 1, 1, 1, 1, 2, 4, 6, 8 };
|
||||
|
||||
if (_pathfinderFlag & 2) {
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_LoK::enterNewScene(int sceneId, int facing, int unk1, int unk2, int brandonAlive) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::enterNewScene(%d, %d, %d, %d, %d)", sceneId, facing, unk1, unk2, brandonAlive);
|
||||
int unkVar1 = 1;
|
||||
_screen->hideMouse();
|
||||
|
||||
|
@ -193,7 +192,6 @@ void KyraEngine_LoK::enterNewScene(int sceneId, int facing, int unk1, int unk2,
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::transcendScenes(int roomIndex, int roomName) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::transcendScenes(%d, %d)", roomIndex, roomName);
|
||||
assert(roomIndex < _roomTableSize);
|
||||
|
||||
if (_flags.isTalkie) {
|
||||
|
@ -219,13 +217,11 @@ void KyraEngine_LoK::transcendScenes(int roomIndex, int roomName) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setSceneFile(int roomIndex, int roomName) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setSceneFile(%d, %d)", roomIndex, roomName);
|
||||
assert(roomIndex < _roomTableSize);
|
||||
_roomTable[roomIndex].nameIndex = roomName;
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::moveCharacterToPos(int character, int facing, int xpos, int ypos) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::moveCharacterToPos(%d, %d, %d, %d)", character, facing, xpos, ypos);
|
||||
Character *ch = &_characterList[character];
|
||||
ch->facing = facing;
|
||||
_screen->hideMouse();
|
||||
|
@ -280,7 +276,6 @@ void KyraEngine_LoK::moveCharacterToPos(int character, int facing, int xpos, int
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setCharacterPositionWithUpdate(int character) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPositionWithUpdate(%d)", character);
|
||||
setCharacterPosition(character, 0);
|
||||
_sprites->updateSceneAnims();
|
||||
_timer->update();
|
||||
|
@ -292,7 +287,6 @@ void KyraEngine_LoK::setCharacterPositionWithUpdate(int character) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::setCharacterPosition(int character, int *facingTable) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPosition(%d, %p)", character, (const void *)facingTable);
|
||||
|
||||
if (character == 0) {
|
||||
_currentCharacter->x1 += _charAddXPosTable[_currentCharacter->facing];
|
||||
|
@ -309,7 +303,6 @@ int KyraEngine_LoK::setCharacterPosition(int character, int *facingTable) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setCharacterPositionHelper(int character, int *facingTable) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPositionHelper(%d, %p)", character, (const void *)facingTable);
|
||||
Character *ch = &_characterList[character];
|
||||
++ch->currentAnimFrame;
|
||||
int facing = ch->facing;
|
||||
|
@ -405,7 +398,6 @@ void KyraEngine_LoK::loadSceneMsc() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::startSceneScript(int brandonAlive) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::startSceneScript(%d)", brandonAlive);
|
||||
assert(_currentCharacter->sceneId < _roomTableSize);
|
||||
int tableId = _roomTable[_currentCharacter->sceneId].nameIndex;
|
||||
assert(tableId < _roomFilenameTableSize);
|
||||
|
@ -439,7 +431,6 @@ void KyraEngine_LoK::startSceneScript(int brandonAlive) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::initSceneData(int facing, int unk1, int brandonAlive) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::initSceneData(%d, %d, %d)", facing, unk1, brandonAlive);
|
||||
|
||||
int16 xpos2 = 0;
|
||||
int setFacing = 1;
|
||||
|
@ -609,7 +600,6 @@ void KyraEngine_LoK::initSceneData(int facing, int unk1, int brandonAlive) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::initSceneObjectList(int brandonAlive) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::initSceneObjectList(%d)", brandonAlive);
|
||||
for (int i = 0; i < 28; ++i)
|
||||
_animator->actors()[i].active = 0;
|
||||
|
||||
|
@ -850,7 +840,6 @@ void KyraEngine_LoK::initSceneScreen(int brandonAlive) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::handleSceneChange(int xpos, int ypos, int unk1, int frameReset) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::handleSceneChange(%d, %d, %d, %d)", xpos, ypos, unk1, frameReset);
|
||||
if (queryGameFlag(0xEF))
|
||||
unk1 = 0;
|
||||
|
||||
|
@ -910,7 +899,6 @@ int KyraEngine_LoK::handleSceneChange(int xpos, int ypos, int unk1, int frameRes
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::processSceneChange(int *table, int unk1, int frameReset) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::processSceneChange(%p, %d, %d)", (const void *)table, unk1, frameReset);
|
||||
if (queryGameFlag(0xEF))
|
||||
unk1 = 0;
|
||||
|
||||
|
@ -992,7 +980,6 @@ int KyraEngine_LoK::processSceneChange(int *table, int unk1, int frameReset) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::changeScene(int facing) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::changeScene(%d)", facing);
|
||||
if (queryGameFlag(0xEF)) {
|
||||
if (_currentCharacter->sceneId == 5)
|
||||
return 0;
|
||||
|
@ -1154,7 +1141,6 @@ void KyraEngine_LoK::setCharactersPositions(int character) {
|
|||
#pragma mark -
|
||||
|
||||
int KyraEngine_LoK::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize);
|
||||
int ret = KyraEngine_v1::findWay(x, y, toX, toY, moveTable, moveTableSize);
|
||||
if (ret == 0x7D00)
|
||||
return 0;
|
||||
|
@ -1162,7 +1148,6 @@ int KyraEngine_LoK::findWay(int x, int y, int toX, int toY, int *moveTable, int
|
|||
}
|
||||
|
||||
bool KyraEngine_LoK::lineIsPassable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::lineIsPassable(%d, %d)", x, y);
|
||||
if (queryGameFlag(0xEF)) {
|
||||
if (_currentCharacter->sceneId == 5)
|
||||
return true;
|
||||
|
@ -1223,7 +1208,6 @@ bool KyraEngine_LoK::lineIsPassable(int x, int y) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_LoK::setupSceneResource(int sceneId) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupSceneResource(%d)", sceneId);
|
||||
if (!_flags.isTalkie)
|
||||
return;
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_MR::enterNewScene(uint16 sceneId, int facing, int unk1, int unk2, int unk3) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::enterNewScene('%d, %d, %d, %d, %d)", sceneId, facing, unk1, unk2, unk3);
|
||||
++_enterNewSceneLock;
|
||||
_screen->hideMouse();
|
||||
|
||||
|
@ -196,7 +195,6 @@ void KyraEngine_MR::enterNewScene(uint16 sceneId, int facing, int unk1, int unk2
|
|||
}
|
||||
|
||||
void KyraEngine_MR::enterNewSceneUnk1(int facing, int unk1, int unk2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::enterNewSceneUnk1(%d, %d, %d)", facing, unk1, unk2);
|
||||
int x = 0, y = 0;
|
||||
int x2 = 0, y2 = 0;
|
||||
bool needProc = true;
|
||||
|
@ -294,7 +292,6 @@ void KyraEngine_MR::enterNewSceneUnk1(int facing, int unk1, int unk2) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::enterNewSceneUnk2(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::enterNewSceneUnk2(%d)", unk1);
|
||||
_unk3 = -1;
|
||||
if (_mainCharX == -1 && _mainCharY == -1 && !unk1) {
|
||||
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
|
||||
|
@ -312,7 +309,6 @@ void KyraEngine_MR::enterNewSceneUnk2(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::unloadScene() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::unloadScene()");
|
||||
delete[] _sceneStrings;
|
||||
_sceneStrings = 0;
|
||||
musicUpdate(0);
|
||||
|
@ -325,7 +321,6 @@ void KyraEngine_MR::unloadScene() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::freeSceneShapes() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::freeSceneShapes()");
|
||||
for (uint i = 0; i < ARRAYSIZE(_sceneShapes); ++i) {
|
||||
delete[] _sceneShapes[i];
|
||||
_sceneShapes[i] = 0;
|
||||
|
@ -333,7 +328,6 @@ void KyraEngine_MR::freeSceneShapes() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadScenePal() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadScenePal()");
|
||||
char filename[16];
|
||||
memcpy(_screen->getPalette(2), _screen->getPalette(0), 768);
|
||||
strcpy(filename, _sceneList[_mainCharacter.sceneId].filename1);
|
||||
|
@ -357,7 +351,6 @@ void KyraEngine_MR::loadScenePal() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadSceneMsc() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadSceneMsc()");
|
||||
char filename[16];
|
||||
strcpy(filename, _sceneList[_mainCharacter.sceneId].filename1);
|
||||
strcat(filename, ".MSC");
|
||||
|
@ -390,7 +383,6 @@ void KyraEngine_MR::loadSceneMsc() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::initSceneScript(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::initSceneScript(%d)", unk1);
|
||||
const SceneDesc &scene = _sceneList[_mainCharacter.sceneId];
|
||||
musicUpdate(0);
|
||||
|
||||
|
@ -495,7 +487,6 @@ void KyraEngine_MR::initSceneScript(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::initSceneAnims(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::initSceneAnims(%d)", unk1);
|
||||
for (int i = 0; i < 67; ++i)
|
||||
_animObjects[i].enabled = false;
|
||||
|
||||
|
@ -611,7 +602,6 @@ void KyraEngine_MR::initSceneAnims(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::initSceneScreen(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::initSceneScreen(%d)", unk1);
|
||||
_screen->copyBlockToPage(2, 0, 188, 320, 12, _interfaceCommandLine);
|
||||
|
||||
if (_unkSceneScreenFlag1) {
|
||||
|
@ -649,7 +639,6 @@ void KyraEngine_MR::initSceneScreen(int unk1) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::trySceneChange(int *moveTable, int unk1, int updateChar) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::trySceneChange(%p, %d, %d)", (const void*)moveTable, unk1, updateChar);
|
||||
bool running = true;
|
||||
bool unkFlag = false;
|
||||
int changedScene = 0;
|
||||
|
@ -709,7 +698,6 @@ int KyraEngine_MR::trySceneChange(int *moveTable, int unk1, int updateChar) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::checkSceneChange() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::checkSceneChange()");
|
||||
const SceneDesc &curScene = _sceneList[_mainCharacter.sceneId];
|
||||
int charX = _mainCharacter.x1, charY = _mainCharacter.y1;
|
||||
int facing = 0;
|
||||
|
@ -762,7 +750,6 @@ int KyraEngine_MR::checkSceneChange() {
|
|||
return 1;
|
||||
}
|
||||
int KyraEngine_MR::runSceneScript1(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::runSceneScript1(%d, %d)", x, y);
|
||||
if (y > 187 && _unk3 > -4)
|
||||
return 0;
|
||||
if (_deathHandler >= 0)
|
||||
|
@ -782,7 +769,6 @@ int KyraEngine_MR::runSceneScript1(int x, int y) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::runSceneScript2() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::runSceneScript2()");
|
||||
_sceneScriptState.regs[1] = _mouseX;
|
||||
_sceneScriptState.regs[2] = _mouseY;
|
||||
_sceneScriptState.regs[3] = 0;
|
||||
|
@ -796,7 +782,6 @@ int KyraEngine_MR::runSceneScript2() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::runSceneScript4(int unk1) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::runSceneScript4(%d)", unk1);
|
||||
_sceneScriptState.regs[4] = _itemInHand;
|
||||
_sceneScriptState.regs[5] = unk1;
|
||||
_sceneScriptState.regs[3] = 0;
|
||||
|
@ -811,7 +796,6 @@ void KyraEngine_MR::runSceneScript4(int unk1) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::runSceneScript8() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::runSceneScript8()");
|
||||
_emc->start(&_sceneScriptState, 8);
|
||||
while (_emc->isValid(&_sceneScriptState)) {
|
||||
musicUpdate(0);
|
||||
|
@ -820,7 +804,6 @@ void KyraEngine_MR::runSceneScript8() {
|
|||
}
|
||||
|
||||
bool KyraEngine_MR::lineIsPassable(int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::lineIsPassable(%d, %d)", x, y);
|
||||
static const uint8 widthTable[] = { 1, 1, 1, 1, 1, 2, 4, 6, 8 };
|
||||
|
||||
if ((_pathfinderFlag & 2) && x >= 320)
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
int KyraEngine_v1::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize);
|
||||
x &= 0xFFFC; toX &= 0xFFFC;
|
||||
y &= 0xFFFE; toY &= 0xFFFE;
|
||||
x = (int16)x; y = (int16)y; toX = (int16)toX; toY = (int16)toY;
|
||||
|
@ -144,7 +143,6 @@ int KyraEngine_v1::findWay(int x, int y, int toX, int toY, int *moveTable, int m
|
|||
}
|
||||
|
||||
int KyraEngine_v1::findSubPath(int x, int y, int toX, int toY, int *moveTable, int start, int end) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::findSubPath(%d, %d, %d, %d, %p, %d, %d)", x, y, toX, toY, (const void *)moveTable, start, end);
|
||||
// only used for debug specific code
|
||||
//static uint16 unkTable[] = { 8, 5 };
|
||||
static const int8 facingTable1[] = { 7, 0, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 0 };
|
||||
|
@ -213,7 +211,6 @@ int KyraEngine_v1::findSubPath(int x, int y, int toX, int toY, int *moveTable, i
|
|||
}
|
||||
|
||||
int KyraEngine_v1::getFacingFromPointToPoint(int x, int y, int toX, int toY) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::getFacingFromPointToPoint(%d, %d, %d, %d)", x, y, toX, toY);
|
||||
static const int facingTable[] = {
|
||||
1, 0, 1, 2, 3, 4, 3, 2, 7, 0, 7, 6, 5, 4, 5, 6
|
||||
};
|
||||
|
@ -257,7 +254,6 @@ int KyraEngine_v1::getFacingFromPointToPoint(int x, int y, int toX, int toY) {
|
|||
|
||||
|
||||
int KyraEngine_v1::getOppositeFacingDirection(int dir) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::getOppositeFacingDirection(%d)", dir);
|
||||
switch (dir) {
|
||||
case 0:
|
||||
return 2;
|
||||
|
@ -280,13 +276,11 @@ int KyraEngine_v1::getOppositeFacingDirection(int dir) {
|
|||
}
|
||||
|
||||
void KyraEngine_v1::changePosTowardsFacing(int &x, int &y, int facing) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::changePosTowardsFacing(%d, %d, %d)", x, y, facing);
|
||||
x += _addXPosTable[facing];
|
||||
y += _addYPosTable[facing];
|
||||
}
|
||||
|
||||
int KyraEngine_v1::getMoveTableSize(int *moveTable) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v1::getMoveTableSize(%p)", (const void *)moveTable);
|
||||
int retValue = 0;
|
||||
if (moveTable[0] == 8)
|
||||
return 0;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_v2::freeSceneAnims() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::freeSceneAnims()");
|
||||
|
||||
for (int i = 0; i < ARRAYSIZE(_sceneAnims); ++i)
|
||||
_sceneAnims[i].flags = 0;
|
||||
|
@ -41,7 +40,6 @@ void KyraEngine_v2::freeSceneAnims() {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::updateSpecialSceneScripts() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::updateSpecialSceneScripts()");
|
||||
uint32 nextTime = _system->getMillis() + _tickLength;
|
||||
const int startScript = _lastProcessedSceneScript;
|
||||
|
||||
|
@ -71,7 +69,6 @@ void KyraEngine_v2::updateSpecialSceneScripts() {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::runSceneScript6() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::runSceneScript6()");
|
||||
_emc->init(&_sceneScriptState, &_sceneScriptData);
|
||||
|
||||
_sceneScriptState.regs[0] = _mainCharacter.sceneId;
|
||||
|
@ -87,7 +84,6 @@ void KyraEngine_v2::runSceneScript6() {
|
|||
#pragma mark - pathfinder
|
||||
|
||||
int KyraEngine_v2::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize);
|
||||
x &= ~3; toX &= ~3;
|
||||
y &= ~1; toY &= ~1;
|
||||
int size = KyraEngine_v1::findWay(x, y, toX, toY, moveTable, moveTableSize);
|
||||
|
@ -103,7 +99,6 @@ int KyraEngine_v2::findWay(int x, int y, int toX, int toY, int *moveTable, int m
|
|||
}
|
||||
|
||||
bool KyraEngine_v2::directLinePassable(int x, int y, int toX, int toY) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::directLinePassable(%d, %d, %d, %d)", x, y, toX, toY);
|
||||
Screen *scr = screen();
|
||||
|
||||
while (x != toX || y != toY) {
|
||||
|
@ -118,7 +113,6 @@ bool KyraEngine_v2::directLinePassable(int x, int y, int toX, int toY) {
|
|||
}
|
||||
|
||||
int KyraEngine_v2::pathfinderInitPositionTable(int *moveTable) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::pathfinderInitPositionTable(%p)", (const void*)moveTable);
|
||||
bool breakLoop = false;
|
||||
int *moveTableCur = moveTable;
|
||||
int oldEntry = *moveTableCur, curEntry = *moveTableCur;
|
||||
|
@ -169,7 +163,6 @@ int KyraEngine_v2::pathfinderInitPositionTable(int *moveTable) {
|
|||
}
|
||||
|
||||
int KyraEngine_v2::pathfinderAddToPositionTable(int index, int v1, int v2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::pathfinderAddToPositionTable(%d, %d, %d)", index, v1, v2);
|
||||
_pathfinderPositionTable[index<<1] = v1;
|
||||
_pathfinderPositionTable[(index<<1)+1] = v2;
|
||||
++index;
|
||||
|
@ -179,7 +172,6 @@ int KyraEngine_v2::pathfinderAddToPositionTable(int index, int v1, int v2) {
|
|||
}
|
||||
|
||||
int KyraEngine_v2::pathfinderInitPositionIndexTable(int tableLen, int x, int y) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::pathfinderInitPositionIndexTable(%d, %d, %d)", tableLen, x, y);
|
||||
int x1 = 0, y1 = 0;
|
||||
int x2 = 0, y2 = 0;
|
||||
int lastEntry = 0;
|
||||
|
@ -208,7 +200,6 @@ int KyraEngine_v2::pathfinderInitPositionIndexTable(int tableLen, int x, int y)
|
|||
}
|
||||
|
||||
int KyraEngine_v2::pathfinderAddToPositionIndexTable(int index, int v) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::pathfinderAddToPositionIndexTable(%d, %d)", index, v);
|
||||
_pathfinderPositionIndexTable[index] = v;
|
||||
++index;
|
||||
if (index >= 199)
|
||||
|
@ -217,7 +208,6 @@ int KyraEngine_v2::pathfinderAddToPositionIndexTable(int index, int v) {
|
|||
}
|
||||
|
||||
void KyraEngine_v2::pathfinderFinializePath(int *moveTable, int tableLen, int x, int y, int moveTableSize) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::pathfinderFinializePath(%p, %d, %d, %d, %d)", (void *)moveTable, tableLen, x, y, moveTableSize);
|
||||
int x1 = 0, y1 = 0;
|
||||
int x2 = 0, y2 = 0;
|
||||
int index1 = 0, index2 = 0;
|
||||
|
|
|
@ -66,7 +66,6 @@ Screen::~Screen() {
|
|||
}
|
||||
|
||||
bool Screen::init() {
|
||||
debugC(9, kDebugLevelScreen, "Screen::init()");
|
||||
_disableScreen = false;
|
||||
_debugEnabled = false;
|
||||
|
||||
|
@ -207,7 +206,6 @@ void Screen::setResolution() {
|
|||
}
|
||||
|
||||
void Screen::updateScreen() {
|
||||
debugC(9, kDebugLevelScreen, "Screen::updateScreen()");
|
||||
if (_disableScreen)
|
||||
return;
|
||||
|
||||
|
@ -303,19 +301,16 @@ void Screen::mergeOverlay(int x, int y, int w, int h) {
|
|||
}
|
||||
|
||||
uint8 *Screen::getPagePtr(int pageNum) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getPagePtr(%d)", pageNum);
|
||||
assert(pageNum < SCREEN_PAGE_NUM);
|
||||
return _pagePtrs[pageNum];
|
||||
}
|
||||
|
||||
const uint8 *Screen::getCPagePtr(int pageNum) const {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getCPagePtr(%d)", pageNum);
|
||||
assert(pageNum < SCREEN_PAGE_NUM);
|
||||
return _pagePtrs[pageNum];
|
||||
}
|
||||
|
||||
uint8 *Screen::getPageRect(int pageNum, int x, int y, int w, int h) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getPageRect(%d, %d, %d, %d, %d)", pageNum, x, y, w, h);
|
||||
assert(pageNum < SCREEN_PAGE_NUM);
|
||||
if (pageNum == 0 || pageNum == 1)
|
||||
addDirtyRect(x, y, w, h);
|
||||
|
@ -323,7 +318,6 @@ uint8 *Screen::getPageRect(int pageNum, int x, int y, int w, int h) {
|
|||
}
|
||||
|
||||
void Screen::clearPage(int pageNum) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::clearPage(%d)", pageNum);
|
||||
assert(pageNum < SCREEN_PAGE_NUM);
|
||||
if (pageNum == 0 || pageNum == 1)
|
||||
_forceFullUpdate = true;
|
||||
|
@ -332,7 +326,6 @@ void Screen::clearPage(int pageNum) {
|
|||
}
|
||||
|
||||
int Screen::setCurPage(int pageNum) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setCurPage(%d)", pageNum);
|
||||
assert(pageNum < SCREEN_PAGE_NUM);
|
||||
int previousPage = _curPage;
|
||||
_curPage = pageNum;
|
||||
|
@ -340,7 +333,6 @@ int Screen::setCurPage(int pageNum) {
|
|||
}
|
||||
|
||||
void Screen::clearCurPage() {
|
||||
debugC(9, kDebugLevelScreen, "Screen::clearCurPage()");
|
||||
if (_curPage == 0 || _curPage == 1)
|
||||
_forceFullUpdate = true;
|
||||
memset(getPagePtr(_curPage), 0, SCREEN_PAGE_SIZE);
|
||||
|
@ -348,14 +340,12 @@ void Screen::clearCurPage() {
|
|||
}
|
||||
|
||||
uint8 Screen::getPagePixel(int pageNum, int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getPagePixel(%d, %d, %d)", pageNum, x, y);
|
||||
assert(pageNum < SCREEN_PAGE_NUM);
|
||||
assert(x >= 0 && x < SCREEN_W && y >= 0 && y < SCREEN_H);
|
||||
return _pagePtrs[pageNum][y * SCREEN_W + x];
|
||||
}
|
||||
|
||||
void Screen::setPagePixel(int pageNum, int x, int y, uint8 color) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setPagePixel(%d, %d, %d, %d)", pageNum, x, y, color);
|
||||
assert(pageNum < SCREEN_PAGE_NUM);
|
||||
assert(x >= 0 && x < SCREEN_W && y >= 0 && y < SCREEN_H);
|
||||
if (pageNum == 0 || pageNum == 1)
|
||||
|
@ -364,19 +354,16 @@ void Screen::setPagePixel(int pageNum, int x, int y, uint8 color) {
|
|||
}
|
||||
|
||||
void Screen::fadeFromBlack(int delay, const UpdateFunctor *upFunc) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::fadeFromBlack(%d, %p)", delay, (const void*)upFunc);
|
||||
fadePalette(_currentPalette, delay, upFunc);
|
||||
}
|
||||
|
||||
void Screen::fadeToBlack(int delay, const UpdateFunctor *upFunc) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::fadeToBlack(%d, %p)", delay, (const void*)upFunc);
|
||||
uint8 blackPal[768];
|
||||
memset(blackPal, 0, 768);
|
||||
fadePalette(blackPal, delay, upFunc);
|
||||
}
|
||||
|
||||
void Screen::fadePalette(const uint8 *palData, int delay, const UpdateFunctor *upFunc) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::fadePalette(%p, %d, %p)", (const void *)palData, delay, (const void*)upFunc);
|
||||
updateScreen();
|
||||
|
||||
int diff = 0, delayInc = 0;
|
||||
|
@ -410,7 +397,6 @@ void Screen::fadePalette(const uint8 *palData, int delay, const UpdateFunctor *u
|
|||
}
|
||||
|
||||
void Screen::getFadeParams(const uint8 *palette, int delay, int &delayInc, int &diff) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getFadeParams(%p, %d, %p, %p)", (const void *)palette, delay, (const void *)&delayInc, (const void *)&diff);
|
||||
uint8 maxDiff = 0;
|
||||
|
||||
const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256) * 3;
|
||||
|
@ -432,7 +418,6 @@ void Screen::getFadeParams(const uint8 *palette, int delay, int &delayInc, int &
|
|||
}
|
||||
|
||||
int Screen::fadePalStep(const uint8 *palette, int diff) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::fadePalStep(%p, %d)", (const void *)palette, diff);
|
||||
|
||||
const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : (_use16ColorMode ? 16 : 256)) * 3;
|
||||
|
||||
|
@ -469,7 +454,6 @@ int Screen::fadePalStep(const uint8 *palette, int diff) {
|
|||
}
|
||||
|
||||
void Screen::setPaletteIndex(uint8 index, uint8 red, uint8 green, uint8 blue) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setPaletteIndex(%u, %u, %u, %u)", index, red, green, blue);
|
||||
_currentPalette[index * 3 + 0] = red;
|
||||
_currentPalette[index * 3 + 1] = green;
|
||||
_currentPalette[index * 3 + 2] = blue;
|
||||
|
@ -477,7 +461,6 @@ void Screen::setPaletteIndex(uint8 index, uint8 red, uint8 green, uint8 blue) {
|
|||
}
|
||||
|
||||
void Screen::getRealPalette(int num, uint8 *dst) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getRealPalette(%d, %p)", num, (const void *)dst);
|
||||
const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256);
|
||||
const uint8 *palData = getPalette(num);
|
||||
|
||||
|
@ -496,7 +479,6 @@ void Screen::getRealPalette(int num, uint8 *dst) {
|
|||
}
|
||||
|
||||
void Screen::setScreenPalette(const uint8 *palData) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setScreenPalette(%p)", (const void *)palData);
|
||||
|
||||
const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256);
|
||||
|
||||
|
@ -532,7 +514,6 @@ void Screen::setScreenPalette(const uint8 *palData) {
|
|||
}
|
||||
|
||||
void Screen::copyToPage0(int y, int h, uint8 page, uint8 *seqBuf) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyToPage0(%d, %d, %d, %p)", y, h, page, (const void *)seqBuf);
|
||||
assert(y + h <= SCREEN_H);
|
||||
const uint8 *src = getPagePtr(page) + y * SCREEN_W;
|
||||
uint8 *dstPage = getPagePtr(0) + y * SCREEN_W;
|
||||
|
@ -557,7 +538,6 @@ void Screen::copyToPage0(int y, int h, uint8 page, uint8 *seqBuf) {
|
|||
}
|
||||
|
||||
void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage, int flags) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyRegion(%d, %d, %d, %d, %d, %d, %d, %d, %d)", x1, y1, x2, y2, w, h, srcPage, dstPage, flags);
|
||||
|
||||
if (x2 < 0) {
|
||||
if (x2 <= -w)
|
||||
|
@ -610,7 +590,6 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
|
|||
}
|
||||
|
||||
void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *dest) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyRegionToBuffer(%d, %d, %d, %d, %d)", pageNum, x, y, w, h);
|
||||
if (y < 0) {
|
||||
dest += (-y) * w;
|
||||
h += y;
|
||||
|
@ -637,7 +616,6 @@ void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *
|
|||
}
|
||||
|
||||
void Screen::copyPage(uint8 srcPage, uint8 dstPage) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyPage(%d, %d)", srcPage, dstPage);
|
||||
|
||||
uint8 *src = getPagePtr(srcPage);
|
||||
uint8 *dst = getPagePtr(dstPage);
|
||||
|
@ -649,7 +627,6 @@ void Screen::copyPage(uint8 srcPage, uint8 dstPage) {
|
|||
}
|
||||
|
||||
void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyBlockToPage(%d, %d, %d, %d, %d, %p)", pageNum, x, y, w, h, (const void *)src);
|
||||
if (y < 0) {
|
||||
src += (-y) * w;
|
||||
h += y;
|
||||
|
@ -684,7 +661,6 @@ void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint
|
|||
}
|
||||
|
||||
void Screen::copyFromCurPageBlock(int x, int y, int w, int h, const uint8 *src) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyFromCurPageBlock(%d, %d, %d, %d, %p)", x, y, w, h, (const void *)src);
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
else if (x >= 40)
|
||||
|
@ -716,7 +692,6 @@ void Screen::copyFromCurPageBlock(int x, int y, int w, int h, const uint8 *src)
|
|||
}
|
||||
|
||||
void Screen::copyCurPageBlock(int x, int y, int w, int h, uint8 *dst) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyCurPageBlock(%d, %d, %d, %d, %p)", x, y, w, h, (const void *)dst);
|
||||
assert(dst);
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
|
@ -743,7 +718,6 @@ void Screen::copyCurPageBlock(int x, int y, int w, int h, uint8 *dst) {
|
|||
}
|
||||
|
||||
void Screen::shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPage, int ticks, bool transparent) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::shuffleScreen(%d, %d, %d, %d, %d, %d, %d, %d)", sx, sy, w, h, srcPage, dstPage, ticks, transparent);
|
||||
assert(sx >= 0 && w <= SCREEN_W);
|
||||
int x;
|
||||
uint16 x_offs[SCREEN_W];
|
||||
|
@ -800,7 +774,6 @@ void Screen::shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPag
|
|||
}
|
||||
|
||||
void Screen::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum, bool xored) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::fillRect(%d, %d, %d, %d, %d, %d, %d)", x1, y1, x2, y2, color, pageNum, xored);
|
||||
assert(x2 < SCREEN_W && y2 < SCREEN_H);
|
||||
if (pageNum == -1)
|
||||
pageNum = _curPage;
|
||||
|
@ -827,7 +800,6 @@ void Screen::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum,
|
|||
}
|
||||
|
||||
void Screen::drawBox(int x1, int y1, int x2, int y2, int color) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::drawBox(%i, %i, %i, %i, %i)", x1, y1, x2, y2, color);
|
||||
|
||||
drawClippedLine(x1, y1, x2, y1, color);
|
||||
drawClippedLine(x1, y1, x1, y2, color);
|
||||
|
@ -836,7 +808,6 @@ void Screen::drawBox(int x1, int y1, int x2, int y2, int color) {
|
|||
}
|
||||
|
||||
void Screen::drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::drawShadedBox(%i, %i, %i, %i, %i, %i)", x1, y1, x2, y2, color1, color2);
|
||||
assert(x1 >= 0 && y1 >= 0);
|
||||
hideMouse();
|
||||
|
||||
|
@ -852,7 +823,6 @@ void Screen::drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color
|
|||
}
|
||||
|
||||
void Screen::drawClippedLine(int x1, int y1, int x2, int y2, int color) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::drawClippedLine(%i, %i, %i, %i, %i)", x1, y1, x2, y2, color);
|
||||
|
||||
if (x1 < 0)
|
||||
x1 = 0;
|
||||
|
@ -887,7 +857,6 @@ void Screen::drawClippedLine(int x1, int y1, int x2, int y2, int color) {
|
|||
}
|
||||
|
||||
void Screen::drawLine(bool vertical, int x, int y, int length, int color) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::drawLine(%i, %i, %i, %i, %i)", vertical, x, y, length, color);
|
||||
|
||||
uint8 *ptr = getPagePtr(_curPage) + y * SCREEN_W + x;
|
||||
|
||||
|
@ -911,7 +880,6 @@ void Screen::drawLine(bool vertical, int x, int y, int length, int color) {
|
|||
}
|
||||
|
||||
void Screen::setAnimBlockPtr(int size) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setAnimBlockPtr(%d)", size);
|
||||
delete[] _animBlockPtr;
|
||||
_animBlockPtr = new uint8[size];
|
||||
assert(_animBlockPtr);
|
||||
|
@ -920,12 +888,10 @@ void Screen::setAnimBlockPtr(int size) {
|
|||
}
|
||||
|
||||
void Screen::setTextColor(const uint8 *cmap, int a, int b) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setTextColor(%p, %d, %d)", (const void *)cmap, a, b);
|
||||
memcpy(&_textColorsMap[a], cmap, b-a+1);
|
||||
}
|
||||
|
||||
bool Screen::loadFont(FontId fontId, const char *filename) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::loadFont(%d, '%s')", fontId, filename);
|
||||
Font *fnt = &_fonts[fontId];
|
||||
|
||||
// FIXME: add font support for amiga version
|
||||
|
@ -959,7 +925,6 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
|
|||
}
|
||||
|
||||
Screen::FontId Screen::setFont(FontId fontId) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setFont(%d)", fontId);
|
||||
FontId prev = _currentFont;
|
||||
_currentFont = fontId;
|
||||
return prev;
|
||||
|
@ -983,7 +948,6 @@ int Screen::getCharWidth(uint16 c) const {
|
|||
// FIXME: add font support for amiga version
|
||||
if (_vm->gameFlags().platform == Common::kPlatformAmiga)
|
||||
return 0;
|
||||
debugC(9, kDebugLevelScreen, "Screen::getCharWidth('%c'|%d)", c & 0xFF, c);
|
||||
if (c & 0xFF00)
|
||||
return SJIS_CHARSIZE >> 1;
|
||||
return (int)_fonts[_currentFont].charWidthTable[c] + _charWidth;
|
||||
|
@ -993,7 +957,6 @@ int Screen::getTextWidth(const char *str) const {
|
|||
// FIXME: add font support for amiga version
|
||||
if (_vm->gameFlags().platform == Common::kPlatformAmiga)
|
||||
return 0;
|
||||
debugC(9, kDebugLevelScreen, "Screen::getTextWidth('%s')", str);
|
||||
|
||||
int curLineLen = 0;
|
||||
int maxLineLen = 0;
|
||||
|
@ -1025,7 +988,6 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2
|
|||
// FIXME: add font support for amiga version
|
||||
if (_vm->gameFlags().platform == Common::kPlatformAmiga)
|
||||
return;
|
||||
debugC(9, kDebugLevelScreen, "Screen::printText('%s', %d, %d, 0x%X, 0x%X)", str, x, y, color1, color2);
|
||||
uint8 cmap[2];
|
||||
cmap[0] = color2;
|
||||
cmap[1] = color1;
|
||||
|
@ -1079,7 +1041,6 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2
|
|||
}
|
||||
|
||||
void Screen::drawCharANSI(uint8 c, int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::drawChar('%c', %d, %d)", c, x, y);
|
||||
Font *fnt = &_fonts[_currentFont];
|
||||
uint8 *dst = getPagePtr(_curPage) + y * SCREEN_W + x;
|
||||
|
||||
|
@ -1145,7 +1106,6 @@ void Screen::drawCharANSI(uint8 c, int x, int y) {
|
|||
}
|
||||
|
||||
void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags, ...) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::drawShape(%d, %p, %d, %d, %d, 0x%.04X, ...)", pageNum, (const void *)shapeData, x, y, sd, flags);
|
||||
if (!shapeData)
|
||||
return;
|
||||
|
||||
|
@ -1900,7 +1860,6 @@ void Screen::drawShapePlotType52(uint8 *dst, uint8 cmd) {
|
|||
}
|
||||
|
||||
void Screen::decodeFrame3(const uint8 *src, uint8 *dst, uint32 size) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::decodeFrame3(%p, %p, %u)", (const void *)src, (const void *)dst, size);
|
||||
const uint8 *dstEnd = dst + size;
|
||||
while (dst < dstEnd) {
|
||||
int8 code = *src++;
|
||||
|
@ -1921,7 +1880,6 @@ void Screen::decodeFrame3(const uint8 *src, uint8 *dst, uint32 size) {
|
|||
}
|
||||
|
||||
uint Screen::decodeFrame4(const uint8 *src, uint8 *dst, uint32 dstSize) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::decodeFrame4(%p, %p, %u)", (const void *)src, (const void *)dst, dstSize);
|
||||
uint8 *dstOrig = dst;
|
||||
uint8 *dstEnd = dst + dstSize;
|
||||
while (1) {
|
||||
|
@ -1971,7 +1929,6 @@ uint Screen::decodeFrame4(const uint8 *src, uint8 *dst, uint32 dstSize) {
|
|||
}
|
||||
|
||||
void Screen::decodeFrameDelta(uint8 *dst, const uint8 *src, bool noXor) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::decodeFrameDelta(%p, %p, %d)", (const void *)dst, (const void *)src, noXor);
|
||||
if (noXor)
|
||||
wrapped_decodeFrameDelta<true>(dst, src);
|
||||
else
|
||||
|
@ -2034,7 +1991,6 @@ void Screen::wrapped_decodeFrameDelta(uint8 *dst, const uint8 *src) {
|
|||
}
|
||||
|
||||
void Screen::decodeFrameDeltaPage(uint8 *dst, const uint8 *src, int pitch, bool noXor) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::decodeFrameDeltaPage(%p, %p, %d, %d)", (const void *)dst, (const void *)src, pitch, noXor);
|
||||
|
||||
if (noXor)
|
||||
wrapped_decodeFrameDeltaPage<true>(dst, src, pitch);
|
||||
|
@ -2220,7 +2176,6 @@ void Screen::wrapped_decodeFrameDeltaPage(uint8 *dst, const uint8 *src, int pitc
|
|||
}
|
||||
|
||||
uint8 *Screen::encodeShape(int x, int y, int w, int h, int flags) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::encodeShape(%d, %d, %d, %d, %d)", x, y, w, h, flags);
|
||||
uint8 *srcPtr = &_pagePtrs[_curPage][y * SCREEN_W + x];
|
||||
int16 shapeSize = 0;
|
||||
uint8 *tmp = srcPtr;
|
||||
|
@ -2409,7 +2364,6 @@ uint8 *Screen::encodeShape(int x, int y, int w, int h, int flags) {
|
|||
}
|
||||
|
||||
int16 Screen::encodeShapeAndCalculateSize(uint8 *from, uint8 *to, int size_to) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::encodeShapeAndCalculateSize(%p, %p, %d)", (const void *)from, (const void *)to, size_to);
|
||||
byte *fromPtrEnd = from + size_to;
|
||||
bool skipPixel = true;
|
||||
byte *tempPtr = 0;
|
||||
|
@ -2542,13 +2496,11 @@ int16 Screen::encodeShapeAndCalculateSize(uint8 *from, uint8 *to, int size_to) {
|
|||
}
|
||||
|
||||
void Screen::hideMouse() {
|
||||
debugC(9, kDebugLevelScreen, "Screen::hideMouse()");
|
||||
++_mouseLockCount;
|
||||
CursorMan.showMouse(false);
|
||||
}
|
||||
|
||||
void Screen::showMouse() {
|
||||
debugC(9, kDebugLevelScreen, "Screen::showMouse()");
|
||||
|
||||
if (_mouseLockCount == 1)
|
||||
CursorMan.showMouse(true);
|
||||
|
@ -2563,7 +2515,6 @@ bool Screen::isMouseVisible() const {
|
|||
}
|
||||
|
||||
void Screen::setShapePages(int page1, int page2, int minY, int maxY) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setShapePages(%d, %d, %d, %d)", page1, page2, minY, maxY);
|
||||
_shapePages[0] = _pagePtrs[page1];
|
||||
_shapePages[1] = _pagePtrs[page2];
|
||||
_maskMinY = minY;
|
||||
|
@ -2571,7 +2522,6 @@ void Screen::setShapePages(int page1, int page2, int minY, int maxY) {
|
|||
}
|
||||
|
||||
void Screen::setMouseCursor(int x, int y, const byte *shape) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setMouseCursor(%d, %d, %p)", x, y, (const void *)shape);
|
||||
if (!shape)
|
||||
return;
|
||||
// if mouseDisabled
|
||||
|
@ -2621,7 +2571,6 @@ void Screen::setMouseCursor(int x, int y, const byte *shape) {
|
|||
}
|
||||
|
||||
void Screen::copyScreenFromRect(int x, int y, int w, int h, const uint8 *ptr) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyScreenFromRect(%d, %d, %d, %d, %p)", x, y, w, h, (const void *)ptr);
|
||||
x <<= 3; w <<= 3;
|
||||
const uint8 *src = ptr;
|
||||
uint8 *dst = &_pagePtrs[0][y * SCREEN_W + x];
|
||||
|
@ -2636,7 +2585,6 @@ void Screen::copyScreenFromRect(int x, int y, int w, int h, const uint8 *ptr) {
|
|||
}
|
||||
|
||||
void Screen::copyScreenToRect(int x, int y, int w, int h, uint8 *ptr) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::copyScreenToRect(%d, %d, %d, %d, %p)", x, y, w, h, (const void *)ptr);
|
||||
x <<= 3; w <<= 3;
|
||||
const uint8 *src = &_pagePtrs[0][y * SCREEN_W + x];
|
||||
uint8 *dst = ptr;
|
||||
|
@ -2648,7 +2596,6 @@ void Screen::copyScreenToRect(int x, int y, int w, int h, uint8 *ptr) {
|
|||
}
|
||||
|
||||
uint8 *Screen::getPalette(int num) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getPalette(%d)", num);
|
||||
assert(num >= 0 && num < (_vm->gameFlags().platform == Common::kPlatformAmiga ? 6 : 4));
|
||||
if (num == 0)
|
||||
return _currentPalette;
|
||||
|
@ -2657,7 +2604,6 @@ uint8 *Screen::getPalette(int num) {
|
|||
}
|
||||
|
||||
byte Screen::getShapeFlag1(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getShapeFlag1(%d, %d)", x, y);
|
||||
uint8 color = _shapePages[0][y * SCREEN_W + x];
|
||||
color &= 0x80;
|
||||
color ^= 0x80;
|
||||
|
@ -2668,7 +2614,6 @@ byte Screen::getShapeFlag1(int x, int y) {
|
|||
}
|
||||
|
||||
byte Screen::getShapeFlag2(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getShapeFlag2(%d, %d)", x, y);
|
||||
uint8 color = _shapePages[0][y * SCREEN_W + x];
|
||||
color &= 0x7F;
|
||||
color &= 0x87;
|
||||
|
@ -2676,7 +2621,6 @@ byte Screen::getShapeFlag2(int x, int y) {
|
|||
}
|
||||
|
||||
int Screen::getDrawLayer(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getDrawLayer(%d, %d)", x, y);
|
||||
int xpos = x - 8;
|
||||
int ypos = y - 1;
|
||||
int layer = 1;
|
||||
|
@ -2694,7 +2638,6 @@ int Screen::getDrawLayer(int x, int y) {
|
|||
}
|
||||
|
||||
int Screen::getDrawLayer2(int x, int y, int height) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::getDrawLayer2(%d, %d, %d)", x, y, height);
|
||||
int xpos = x - 8;
|
||||
int ypos = y - 1;
|
||||
int layer = 1;
|
||||
|
@ -2715,7 +2658,6 @@ int Screen::getDrawLayer2(int x, int y, int height) {
|
|||
|
||||
|
||||
int Screen::setNewShapeHeight(uint8 *shape, int height) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setNewShapeHeight(%p, %d)", (const void *)shape, height);
|
||||
if (_vm->gameFlags().useAltShapeHeader)
|
||||
shape += 2;
|
||||
|
||||
|
@ -2725,7 +2667,6 @@ int Screen::setNewShapeHeight(uint8 *shape, int height) {
|
|||
}
|
||||
|
||||
int Screen::resetShapeHeight(uint8 *shape) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setNewShapeHeight(%p)", (const void *)shape);
|
||||
if (_vm->gameFlags().useAltShapeHeader)
|
||||
shape += 2;
|
||||
|
||||
|
@ -2735,7 +2676,6 @@ int Screen::resetShapeHeight(uint8 *shape) {
|
|||
}
|
||||
|
||||
void Screen::blockInRegion(int x, int y, int width, int height) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::blockInRegion(%d, %d, %d, %d)", x, y, width, height);
|
||||
assert(_shapePages[0]);
|
||||
byte *toPtr = _shapePages[0] + (y * 320 + x);
|
||||
for (int i = 0; i < height; ++i) {
|
||||
|
@ -2747,7 +2687,6 @@ void Screen::blockInRegion(int x, int y, int width, int height) {
|
|||
}
|
||||
|
||||
void Screen::blockOutRegion(int x, int y, int width, int height) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::blockOutRegion(%d, %d, %d, %d)", x, y, width, height);
|
||||
assert(_shapePages[0]);
|
||||
byte *toPtr = _shapePages[0] + (y * 320 + x);
|
||||
for (int i = 0; i < height; ++i) {
|
||||
|
@ -2771,7 +2710,6 @@ void Screen::rectClip(int &x, int &y, int w, int h) {
|
|||
}
|
||||
|
||||
void Screen::shakeScreen(int times) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::shakeScreen(%d)", times);
|
||||
|
||||
while (times--) {
|
||||
// seems to be 1 line (320 pixels) offset in the original
|
||||
|
@ -2784,7 +2722,6 @@ void Screen::shakeScreen(int times) {
|
|||
}
|
||||
|
||||
void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *palData, bool skip) {
|
||||
debugC(9, kDebugLevelScreen, "KyraEngine_v1::loadBitmap('%s', %d, %d, %p, %d)", filename, tempPage, dstPage, (void *)palData, skip);
|
||||
uint32 fileSize;
|
||||
uint8 *srcData = _vm->resource()->fileData(filename, &fileSize);
|
||||
|
||||
|
@ -2802,7 +2739,6 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *
|
|||
uint16 palSize = READ_LE_UINT16(srcData + 8);
|
||||
|
||||
if (palData && palSize) {
|
||||
debugC(9, kDebugLevelMain,"Loading a palette of size %i from %s", palSize, filename);
|
||||
loadPalette(srcData + 10, palData, palSize);
|
||||
}
|
||||
|
||||
|
@ -2840,14 +2776,12 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *
|
|||
}
|
||||
|
||||
bool Screen::loadPalette(const char *filename, uint8 *palData) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::loadPalette('%s' %p)", filename, (void *)palData);
|
||||
uint32 fileSize = 0;
|
||||
uint8 *srcData = _vm->resource()->fileData(filename, &fileSize);
|
||||
if (!srcData)
|
||||
return false;
|
||||
|
||||
if (palData && fileSize) {
|
||||
debugC(9, kDebugLevelScreen,"Loading a palette of size %u from '%s'", fileSize, filename);
|
||||
loadPalette(srcData, palData, fileSize);
|
||||
}
|
||||
delete[] srcData;
|
||||
|
@ -2855,7 +2789,6 @@ bool Screen::loadPalette(const char *filename, uint8 *palData) {
|
|||
}
|
||||
|
||||
void Screen::loadPalette(const byte *data, uint8 *palData, int bytes) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::loadPalette(%p, %p %d)", (const void *)data, (void *)palData, bytes);
|
||||
if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
|
||||
assert(bytes % 2 == 0);
|
||||
assert(bytes / 2 <= 256);
|
||||
|
@ -3072,7 +3005,6 @@ int SJIStoFMTChunk(int f, int s) { // copied from scumm\charset.cpp
|
|||
} // end of anonymous namespace
|
||||
|
||||
void Screen::drawCharSJIS(uint16 c, int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::drawCharSJIS('%c', %d, %d)", c, x, y);
|
||||
|
||||
int color1 = _textColorsMap[1];
|
||||
int color2 = _textColorsMap[0];
|
||||
|
|
|
@ -35,13 +35,11 @@ Screen_HoF::Screen_HoF(KyraEngine_HoF *vm, OSystem *system)
|
|||
}
|
||||
|
||||
void Screen_HoF::setScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_HoF::setScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
_curDim = &_screenDimTable[dim];
|
||||
}
|
||||
|
||||
const ScreenDim *Screen_HoF::getScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_HoF::getScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
return &_screenDimTable[dim];
|
||||
}
|
||||
|
|
|
@ -69,19 +69,16 @@ bool Screen_LoK::init() {
|
|||
}
|
||||
|
||||
void Screen_LoK::setScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::setScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
_curDim = &_screenDimTable[dim];
|
||||
}
|
||||
|
||||
const ScreenDim *Screen_LoK::getScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::getScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
return &_screenDimTable[dim];
|
||||
}
|
||||
|
||||
void Screen_LoK::fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::fadeSpecialPalette(%d, %d, %d, %d)", palIndex, startIndex, size, fadeTime);
|
||||
|
||||
assert(_vm->palTable1()[palIndex]);
|
||||
assert(_currentPalette);
|
||||
|
@ -95,7 +92,6 @@ void Screen_LoK::fadeSpecialPalette(int palIndex, int startIndex, int size, int
|
|||
}
|
||||
|
||||
void Screen_LoK::addBitBlitRect(int x, int y, int w, int h) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::addBitBlitRects(%d, %d, %d, %d)", x, y, w, h);
|
||||
if (_bitBlitNum >= kNumBitBlitRects)
|
||||
error("too many bit blit rects");
|
||||
|
||||
|
@ -107,7 +103,6 @@ void Screen_LoK::addBitBlitRect(int x, int y, int w, int h) {
|
|||
}
|
||||
|
||||
void Screen_LoK::bitBlitRects() {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::bitBlitRects()");
|
||||
Common::Rect *cur = _bitBlitRects;
|
||||
while (_bitBlitNum) {
|
||||
_bitBlitNum--;
|
||||
|
@ -117,7 +112,6 @@ void Screen_LoK::bitBlitRects() {
|
|||
}
|
||||
|
||||
void Screen_LoK::savePageToDisk(const char *file, int page) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::savePageToDisk('%s', %d)", file, page);
|
||||
if (!_saveLoadPage[page/2]) {
|
||||
_saveLoadPage[page/2] = new uint8[SCREEN_W * SCREEN_H];
|
||||
assert(_saveLoadPage[page/2]);
|
||||
|
@ -141,7 +135,6 @@ void Screen_LoK::savePageToDisk(const char *file, int page) {
|
|||
}
|
||||
|
||||
void Screen_LoK::loadPageFromDisk(const char *file, int page) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::loadPageFromDisk('%s', %d)", file, page);
|
||||
if (!_saveLoadPage[page/2]) {
|
||||
warning("trying to restore page %d, but no backup found", page);
|
||||
return;
|
||||
|
@ -165,7 +158,6 @@ void Screen_LoK::loadPageFromDisk(const char *file, int page) {
|
|||
}
|
||||
|
||||
void Screen_LoK::queryPageFromDisk(const char *file, int page, uint8 *buffer) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::queryPageFromDisk('%s', %d, %p)", file, page, (const void *)buffer);
|
||||
if (!_saveLoadPage[page/2]) {
|
||||
warning("trying to query page %d, but no backup found", page);
|
||||
return;
|
||||
|
@ -175,7 +167,6 @@ void Screen_LoK::queryPageFromDisk(const char *file, int page, uint8 *buffer) {
|
|||
}
|
||||
|
||||
void Screen_LoK::deletePageFromDisk(int page) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::deletePageFromDisk(%d)", page);
|
||||
delete[] _saveLoadPage[page/2];
|
||||
_saveLoadPage[page/2] = 0;
|
||||
|
||||
|
@ -186,7 +177,6 @@ void Screen_LoK::deletePageFromDisk(int page) {
|
|||
}
|
||||
|
||||
void Screen_LoK::copyBackgroundBlock(int x, int page, int flag) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::copyBackgroundBlock(%d, %d, %d)", x, page, flag);
|
||||
|
||||
if (x < 1)
|
||||
return;
|
||||
|
@ -228,12 +218,10 @@ void Screen_LoK::copyBackgroundBlock(int x, int page, int flag) {
|
|||
}
|
||||
|
||||
void Screen_LoK::copyBackgroundBlock2(int x) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::copyBackgroundBlock2(%d)", x);
|
||||
copyBackgroundBlock(x, 4, 1);
|
||||
}
|
||||
|
||||
void Screen_LoK::setTextColorMap(const uint8 *cmap) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoK::setTextColorMap(%p)", (const void *)cmap);
|
||||
setTextColor(cmap, 0, 11);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,14 +73,12 @@ bool Screen_LoL::init() {
|
|||
|
||||
|
||||
void Screen_LoL::setScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoL::setScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
_curDim = _customDimTable[dim] ? (const ScreenDim *)_customDimTable[dim] : &_screenDimTable[dim];
|
||||
_curDimIndex = dim;
|
||||
}
|
||||
|
||||
const ScreenDim *Screen_LoL::getScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoL::getScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
return _customDimTable[dim] ? (const ScreenDim *)_customDimTable[dim] : &_screenDimTable[dim];
|
||||
}
|
||||
|
@ -97,7 +95,6 @@ void Screen_LoL::modifyScreenDim(int dim, int x, int y, int w, int h) {
|
|||
}
|
||||
|
||||
void Screen_LoL::fprintString(const char *format, int x, int y, uint8 col1, uint8 col2, uint16 flags, ...) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoL::fprintString('%s', %d, %d, %d, %d, %d, ...)", format, x, y, col1, col2, flags);
|
||||
if (!format)
|
||||
return;
|
||||
|
||||
|
@ -127,7 +124,6 @@ void Screen_LoL::fprintString(const char *format, int x, int y, uint8 col1, uint
|
|||
}
|
||||
|
||||
void Screen_LoL::fprintStringIntro(const char *format, int x, int y, uint8 c1, uint8 c2, uint8 c3, uint16 flags, ...) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoL::fprintStringIntro('%s', %d, %d, %d, %d, %d, %d, ...)", format, x, y, c1, c2, c3, flags);
|
||||
char buffer[400];
|
||||
|
||||
va_list args;
|
||||
|
@ -848,7 +844,6 @@ bool Screen_LoL::fadePalSpecial(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, ui
|
|||
}
|
||||
|
||||
uint8 Screen_LoL::getShapePaletteSize(const uint8 *shp) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_LoL::getShapePaletteSize(%p)", (const void *)shp);
|
||||
|
||||
return shp[10];
|
||||
}
|
||||
|
|
|
@ -36,19 +36,16 @@ Screen_MR::~Screen_MR() {
|
|||
}
|
||||
|
||||
void Screen_MR::setScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::setScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
_curDim = &_screenDimTable[dim];
|
||||
}
|
||||
|
||||
const ScreenDim *Screen_MR::getScreenDim(int dim) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::getScreenDim(%d)", dim);
|
||||
assert(dim < _screenDimTableCount);
|
||||
return &_screenDimTable[dim];
|
||||
}
|
||||
|
||||
int Screen_MR::getLayer(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::getLayer(%d, %d)", x, y);
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
else if (x >= 320)
|
||||
|
@ -73,7 +70,6 @@ int Screen_MR::getLayer(int x, int y) {
|
|||
}
|
||||
|
||||
byte Screen_MR::getShapeFlag1(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::getShapeFlag1(%d, %d)", x, y);
|
||||
if (y < _maskMinY || y > _maskMaxY)
|
||||
return 0;
|
||||
|
||||
|
@ -87,7 +83,6 @@ byte Screen_MR::getShapeFlag1(int x, int y) {
|
|||
}
|
||||
|
||||
byte Screen_MR::getShapeFlag2(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::getShapeFlag2(%d, %d)", x, y);
|
||||
if (y < _maskMinY || y > _maskMaxY)
|
||||
return 0;
|
||||
|
||||
|
@ -98,7 +93,6 @@ byte Screen_MR::getShapeFlag2(int x, int y) {
|
|||
}
|
||||
|
||||
int Screen_MR::getDrawLayer(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::getDrawLayer(%d, %d)", x, y);
|
||||
int xpos = x - 8;
|
||||
int ypos = y;
|
||||
int layer = 1;
|
||||
|
@ -116,7 +110,6 @@ int Screen_MR::getDrawLayer(int x, int y) {
|
|||
}
|
||||
|
||||
int Screen_MR::getDrawLayer2(int x, int y, int height) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::getDrawLayer2(%d, %d, %d)", x, y, height);
|
||||
int xpos = x - 8;
|
||||
int ypos = y;
|
||||
int layer = 1;
|
||||
|
@ -136,7 +129,6 @@ int Screen_MR::getDrawLayer2(int x, int y, int height) {
|
|||
}
|
||||
|
||||
void Screen_MR::drawFilledBox(int x1, int y1, int x2, int y2, uint8 c1, uint8 c2, uint8 c3) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_MR::drawFilledBox(%d, %d, %d, %d, %d, %d, %d,)", x1, y1, x2, y2, c1, c2, c3);
|
||||
|
||||
fillRect(x1, y1, x2, y2, c1);
|
||||
|
||||
|
|
|
@ -115,7 +115,6 @@ int Screen_v2::findLeastDifferentColor(const uint8 *paletteEntry, const uint8 *p
|
|||
}
|
||||
|
||||
void Screen_v2::getFadeParams(const uint8 *palette, int delay, int &delayInc, int &diff) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getFadeParams(%p, %d, %p, %p)", (const void *)palette, delay, (const void *)&delayInc, (const void *)&diff);
|
||||
|
||||
int maxDiff = 0;
|
||||
diff = 0;
|
||||
|
@ -282,7 +281,6 @@ void Screen_v2::copyWsaRect(int x, int y, int w, int h, int dimState, int plotFu
|
|||
}
|
||||
|
||||
const uint8 *Screen_v2::getPtrToShape(const uint8 *shpFile, int shape) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getPtrToShape(%p, %d)", (const void *)shpFile, shape);
|
||||
uint16 shapes = READ_LE_UINT16(shpFile);
|
||||
|
||||
if (shapes <= shape)
|
||||
|
@ -294,7 +292,6 @@ const uint8 *Screen_v2::getPtrToShape(const uint8 *shpFile, int shape) {
|
|||
}
|
||||
|
||||
uint8 *Screen_v2::getPtrToShape(uint8 *shpFile, int shape) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getPtrToShape(%p, %d)", (void *)shpFile, shape);
|
||||
uint16 shapes = READ_LE_UINT16(shpFile);
|
||||
|
||||
if (shapes <= shape)
|
||||
|
@ -306,25 +303,21 @@ uint8 *Screen_v2::getPtrToShape(uint8 *shpFile, int shape) {
|
|||
}
|
||||
|
||||
int Screen_v2::getShapeScaledWidth(const uint8 *shpFile, int scale) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getShapeScaledWidth(%p, %d)", (const void*)shpFile, scale);
|
||||
int width = READ_LE_UINT16(shpFile+3);
|
||||
return (width * scale) >> 8;
|
||||
}
|
||||
|
||||
int Screen_v2::getShapeScaledHeight(const uint8 *shpFile, int scale) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getShapeScaledHeight(%p, %d)", (const void*)shpFile, scale);
|
||||
int height = shpFile[2];
|
||||
return (height * scale) >> 8;
|
||||
}
|
||||
|
||||
uint16 Screen_v2::getShapeSize(const uint8 *shp) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getShapeSize(%p)", (const void *)shp);
|
||||
|
||||
return READ_LE_UINT16(shp+6);
|
||||
}
|
||||
|
||||
uint8 *Screen_v2::makeShapeCopy(const uint8 *src, int index) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::makeShapeCopy(%p, %d)", (const void *)src, index);
|
||||
|
||||
const uint8 *shape = getPtrToShape(src, index);
|
||||
if (!shape)
|
||||
|
@ -340,7 +333,6 @@ uint8 *Screen_v2::makeShapeCopy(const uint8 *src, int index) {
|
|||
}
|
||||
|
||||
int Screen_v2::getLayer(int x, int y) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getLayer(%d, %d)", x, y);
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
else if (x >= 320)
|
||||
|
@ -362,14 +354,12 @@ int Screen_v2::getLayer(int x, int y) {
|
|||
}
|
||||
|
||||
int Screen_v2::getRectSize(int w, int h) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::getRectSize(%d, %d)", w, h);
|
||||
if (w > 320 || h > 200)
|
||||
return 0;
|
||||
return w*h;
|
||||
}
|
||||
|
||||
void Screen_v2::setTextColorMap(const uint8 *cmap) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::setTextColorMap(%p)", (const void *)cmap);
|
||||
setTextColor(cmap, 0, 15);
|
||||
}
|
||||
|
||||
|
@ -490,7 +480,6 @@ bool Screen_v2::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, i
|
|||
}
|
||||
|
||||
void Screen_v2::checkedPageUpdate(int srcPage, int dstPage) {
|
||||
debugC(9, kDebugLevelScreen, "Screen_v2::checkedPageUpdate(%d, %d)", srcPage, dstPage);
|
||||
|
||||
const uint32 *src = (const uint32 *)getPagePtr(srcPage);
|
||||
uint32 *dst = (uint32 *)getPagePtr(dstPage);
|
||||
|
|
|
@ -1080,7 +1080,7 @@ int KyraEngine_MR::o3_customChatFinish(EMCState *script) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::o3_setupSceneAnimObject(EMCState *script) {
|
||||
debugC(9, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_setupSceneAnimObject(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, '%s')", (const void *)script,
|
||||
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_setupSceneAnimObject(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s)", (const void *)script,
|
||||
stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8), stackPos(9),
|
||||
stackPos(10), stackPos(11), stackPosString(12));
|
||||
musicUpdate(0);
|
||||
|
|
|
@ -70,7 +70,6 @@ SeqPlayer::~SeqPlayer() {
|
|||
}
|
||||
|
||||
uint8 *SeqPlayer::setPanPages(int pageNum, int shape) {
|
||||
debugC(9, kDebugLevelSequence, "SeqPlayer::setPanPages(%d, %d)", pageNum, shape);
|
||||
uint8 *panPage = 0;
|
||||
const uint8 *data = _screen->getCPagePtr(pageNum);
|
||||
uint16 numShapes = READ_LE_UINT16(data);
|
||||
|
@ -93,7 +92,6 @@ uint8 *SeqPlayer::setPanPages(int pageNum, int shape) {
|
|||
}
|
||||
|
||||
void SeqPlayer::makeHandShapes() {
|
||||
debugC(9, kDebugLevelSequence, "SeqPlayer::makeHandShapes()");
|
||||
_screen->loadBitmap("WRITING.CPS", 3, 3, _screen->_currentPalette);
|
||||
if (_vm->gameFlags().platform == Common::kPlatformMacintosh || _vm->gameFlags().platform == Common::kPlatformAmiga) {
|
||||
freeHandShapes();
|
||||
|
@ -118,7 +116,6 @@ void SeqPlayer::makeHandShapes() {
|
|||
}
|
||||
|
||||
void SeqPlayer::freeHandShapes() {
|
||||
debugC(9, kDebugLevelSequence, "SeqPlayer::freeHandShapes()");
|
||||
for (int i = 0; i < ARRAYSIZE(_handShapes); ++i) {
|
||||
delete[] _handShapes[i];
|
||||
_handShapes[i] = 0;
|
||||
|
@ -494,7 +491,6 @@ void SeqPlayer::s1_prefetchVocFile() {
|
|||
}
|
||||
|
||||
bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) {
|
||||
debugC(9, kDebugLevelSequence, "SeqPlayer::seq_playSequence(%p, %d)", (const void *)seqData, skipSeq);
|
||||
assert(seqData);
|
||||
|
||||
static const SeqEntry floppySeqProcs[] = {
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_playSequences(%i, %i)", startSeq, endSeq);
|
||||
seq_init();
|
||||
|
||||
bool allowSkip = (!(_flags.isDemo && !_flags.isTalkie) && (startSeq == kSequenceTitle)) ? false : true;
|
||||
|
@ -331,7 +330,6 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introWestwood(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm);
|
||||
|
||||
if (frm == -2) {
|
||||
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
|
||||
|
@ -344,7 +342,6 @@ int KyraEngine_HoF::seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introTitle(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm);
|
||||
|
||||
if (frm == 1) {
|
||||
_sound->playTrack(3);
|
||||
|
@ -366,7 +363,6 @@ int KyraEngine_HoF::seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introOverview(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm);
|
||||
|
||||
uint8 *tmpPal = &(_screen->getPalette(3)[0x101]);
|
||||
memset(tmpPal, 0, 256);
|
||||
|
@ -467,7 +463,6 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm
|
|||
}
|
||||
|
||||
int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introLibrary(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm);
|
||||
|
||||
switch (_seqFrameCounter) {
|
||||
case 0:
|
||||
|
@ -543,7 +538,6 @@ int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm)
|
|||
|
||||
|
||||
int KyraEngine_HoF::seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introHand(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm);
|
||||
|
||||
switch (_seqFrameCounter) {
|
||||
case 0:
|
||||
|
@ -2155,7 +2149,6 @@ void KyraEngine_HoF::seq_cmpFadeFrame(const char *cmpFile) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::seq_playTalkText(uint8 chatNum) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_playTalkText(%i)", chatNum);
|
||||
|
||||
assert(chatNum < _sequenceSoundListSize);
|
||||
|
||||
|
@ -2167,7 +2160,6 @@ void KyraEngine_HoF::seq_playTalkText(uint8 chatNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::seq_waitForTextsTimeout() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_waitForTextsTimeout()");
|
||||
|
||||
uint32 longest = seq_activeTextsTimeLeft() + _system->getMillis();
|
||||
uint32 now = _system->getMillis();
|
||||
|
@ -2184,13 +2176,11 @@ void KyraEngine_HoF::seq_waitForTextsTimeout() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::seq_resetAllTextEntries() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_resetAllTextEntries()");
|
||||
for (int i = 0; i < 10; i++)
|
||||
_activeText[i].duration = -1;
|
||||
}
|
||||
|
||||
int KyraEngine_HoF::seq_setTextEntry(uint16 strIndex, uint16 posX, uint16 posY, int duration, uint16 width) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_setTextEntry(%i, %i, %i, %i, %i)", strIndex, posX, posY, duration, width);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if (_activeText[i].duration != -1) {
|
||||
|
@ -2214,7 +2204,6 @@ int KyraEngine_HoF::seq_setTextEntry(uint16 strIndex, uint16 posX, uint16 posY,
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::seq_loadNestedSequence(int wsaNum, int seqNum) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_loadNestedSequence(%i, %i)", wsaNum, seqNum);
|
||||
|
||||
if (_activeWSA[wsaNum].flags != -1)
|
||||
return;
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_LoK::seq_demo() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_demo()");
|
||||
|
||||
snd_playTheme(0, 2);
|
||||
|
||||
|
@ -90,7 +89,6 @@ void KyraEngine_LoK::seq_demo() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_intro() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_intro()");
|
||||
|
||||
if (_flags.isTalkie)
|
||||
_res->loadPakFile("INTRO.VRM");
|
||||
|
@ -131,7 +129,6 @@ void KyraEngine_LoK::seq_intro() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_introLogos() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introLogos()");
|
||||
|
||||
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
|
||||
_screen->loadBitmap("LOGO.CPS", 3, 3, _screen->_currentPalette);
|
||||
|
@ -233,7 +230,6 @@ void KyraEngine_LoK::seq_introLogos() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_introStory() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introStory()");
|
||||
_screen->clearPage(3);
|
||||
_screen->clearPage(0);
|
||||
|
||||
|
@ -280,14 +276,12 @@ void KyraEngine_LoK::seq_introStory() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_introMalcolmTree() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introMalcolmTree()");
|
||||
_screen->_curPage = 0;
|
||||
_screen->clearPage(3);
|
||||
_seq->playSequence(_seq_MalcolmTree, true);
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::seq_introKallakWriting() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introKallakWriting()");
|
||||
_seq->makeHandShapes();
|
||||
_screen->setAnimBlockPtr(5060);
|
||||
_screen->_charWidth = -2;
|
||||
|
@ -296,13 +290,11 @@ void KyraEngine_LoK::seq_introKallakWriting() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_introKallakMalcolm() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introKallakMalcolm()");
|
||||
_screen->clearPage(3);
|
||||
_seq->playSequence(_seq_KallakMalcolm, true);
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::seq_createAmuletJewel(int jewel, int page, int noSound, int drawOnly) {
|
||||
debugC(9, kDebugLevelMain, "seq_createAmuletJewel(%d, %d, %d, %d)", jewel, page, noSound, drawOnly);
|
||||
static const uint16 specialJewelTable[] = {
|
||||
0x167, 0x162, 0x15D, 0x158, 0x153, 0xFFFF
|
||||
};
|
||||
|
@ -362,7 +354,6 @@ void KyraEngine_LoK::seq_createAmuletJewel(int jewel, int page, int noSound, int
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_brandonHealing() {
|
||||
debugC(9, kDebugLevelMain, "seq_brandonHealing()");
|
||||
if (!(_deathHandler & 8))
|
||||
return;
|
||||
if (_currentCharacter->sceneId == 210) {
|
||||
|
@ -393,7 +384,6 @@ void KyraEngine_LoK::seq_brandonHealing() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_brandonHealing2() {
|
||||
debugC(9, kDebugLevelMain, "seq_brandonHealing2()");
|
||||
_screen->hideMouse();
|
||||
checkAmuletAnimFlags();
|
||||
assert(_healingShape2Table);
|
||||
|
@ -417,7 +407,6 @@ void KyraEngine_LoK::seq_brandonHealing2() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_poisonDeathNow(int now) {
|
||||
debugC(9, kDebugLevelMain, "seq_poisonDeathNow(%d)", now);
|
||||
if (!(_brandonStatusBit & 1))
|
||||
return;
|
||||
++_poisonDeathCounter;
|
||||
|
@ -438,7 +427,6 @@ void KyraEngine_LoK::seq_poisonDeathNow(int now) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_poisonDeathNowAnim() {
|
||||
debugC(9, kDebugLevelMain, "seq_poisonDeathNowAnim()");
|
||||
_screen->hideMouse();
|
||||
checkAmuletAnimFlags();
|
||||
assert(_posionDeathShapeTable);
|
||||
|
@ -479,7 +467,6 @@ void KyraEngine_LoK::seq_poisonDeathNowAnim() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_playFluteAnimation() {
|
||||
debugC(9, kDebugLevelMain, "seq_playFluteAnimation()");
|
||||
_screen->hideMouse();
|
||||
checkAmuletAnimFlags();
|
||||
setupShapes123(_fluteAnimShapeTable, 36, 0);
|
||||
|
@ -533,7 +520,6 @@ void KyraEngine_LoK::seq_playFluteAnimation() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_winterScroll1() {
|
||||
debugC(9, kDebugLevelMain, "seq_winterScroll1()");
|
||||
_screen->hideMouse();
|
||||
checkAmuletAnimFlags();
|
||||
assert(_winterScrollTable);
|
||||
|
@ -614,7 +600,6 @@ void KyraEngine_LoK::seq_winterScroll1() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_winterScroll2() {
|
||||
debugC(9, kDebugLevelMain, "seq_winterScroll2()");
|
||||
_screen->hideMouse();
|
||||
checkAmuletAnimFlags();
|
||||
assert(_winterScrollTable);
|
||||
|
@ -643,7 +628,6 @@ void KyraEngine_LoK::seq_winterScroll2() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_makeBrandonInv() {
|
||||
debugC(9, kDebugLevelMain, "seq_makeBrandonInv()");
|
||||
if (_deathHandler == 8)
|
||||
return;
|
||||
|
||||
|
@ -669,7 +653,6 @@ void KyraEngine_LoK::seq_makeBrandonInv() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_makeBrandonNormal() {
|
||||
debugC(9, kDebugLevelMain, "seq_makeBrandonNormal()");
|
||||
_screen->hideMouse();
|
||||
_brandonStatusBit |= 0x40;
|
||||
snd_playSoundEffect(0x77);
|
||||
|
@ -685,7 +668,6 @@ void KyraEngine_LoK::seq_makeBrandonNormal() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_makeBrandonNormal2() {
|
||||
debugC(9, kDebugLevelMain, "seq_makeBrandonNormal2()");
|
||||
_screen->hideMouse();
|
||||
assert(_brandonToWispTable);
|
||||
setupShapes123(_brandonToWispTable, 26, 0);
|
||||
|
@ -711,7 +693,6 @@ void KyraEngine_LoK::seq_makeBrandonNormal2() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_makeBrandonWisp() {
|
||||
debugC(9, kDebugLevelMain, "seq_makeBrandonWisp()");
|
||||
if (_deathHandler == 8)
|
||||
return;
|
||||
|
||||
|
@ -753,7 +734,6 @@ void KyraEngine_LoK::seq_makeBrandonWisp() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_dispelMagicAnimation() {
|
||||
debugC(9, kDebugLevelMain, "seq_dispelMagicAnimation()");
|
||||
if (_deathHandler == 8)
|
||||
return;
|
||||
if (_currentCharacter->sceneId == 210) {
|
||||
|
@ -795,7 +775,6 @@ void KyraEngine_LoK::seq_dispelMagicAnimation() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_fillFlaskWithWater(int item, int type) {
|
||||
debugC(9, kDebugLevelMain, "seq_fillFlaskWithWater(%d, %d)", item, type);
|
||||
int newItem = -1;
|
||||
static const uint8 flaskTable1[] = { 0x46, 0x48, 0x4A, 0x4C };
|
||||
static const uint8 flaskTable2[] = { 0x47, 0x49, 0x4B, 0x4D };
|
||||
|
@ -828,7 +807,6 @@ void KyraEngine_LoK::seq_fillFlaskWithWater(int item, int type) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_playDrinkPotionAnim(int item, int unk2, int flags) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playDrinkPotionAnim(%d, %d, %d)", item, unk2, flags);
|
||||
uint8 red, green, blue;
|
||||
|
||||
switch (item) {
|
||||
|
@ -920,7 +898,6 @@ void KyraEngine_LoK::seq_playDrinkPotionAnim(int item, int unk2, int flags) {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::seq_playEnd() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playEnd()");
|
||||
if (_endSequenceSkipFlag)
|
||||
return 0;
|
||||
|
||||
|
@ -1011,7 +988,6 @@ int KyraEngine_LoK::seq_playEnd() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_brandonToStone() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_brandonToStone()");
|
||||
_screen->hideMouse();
|
||||
assert(_brandonStoneTable);
|
||||
setupShapes123(_brandonStoneTable, 14, 0);
|
||||
|
@ -1027,7 +1003,6 @@ void KyraEngine_LoK::seq_brandonToStone() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_playEnding() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playEnding()");
|
||||
if (shouldQuit())
|
||||
return;
|
||||
_screen->hideMouse();
|
||||
|
@ -1053,7 +1028,6 @@ void KyraEngine_LoK::seq_playEnding() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::seq_playCredits() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playCredits()");
|
||||
static const uint8 colorMap[] = { 0, 0, 0xC, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
static const char stringTerms[] = { 0x5, 0xd, 0x0};
|
||||
static const int numStrings = 250;
|
||||
|
@ -1210,12 +1184,10 @@ void KyraEngine_LoK::seq_playCredits() {
|
|||
}
|
||||
|
||||
bool KyraEngine_LoK::seq_skipSequence() const {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_skipSequence()");
|
||||
return shouldQuit() || _abortIntroFlag;
|
||||
}
|
||||
|
||||
int KyraEngine_LoK::handleMalcolmFlag() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::handleMalcolmFlag()");
|
||||
static uint16 frame = 0;
|
||||
static uint32 timer1 = 0;
|
||||
static uint32 timer2 = 0;
|
||||
|
@ -1363,7 +1335,6 @@ int KyraEngine_LoK::handleMalcolmFlag() {
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::handleBeadState() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::handleBeadState()");
|
||||
static uint32 timer1 = 0;
|
||||
static uint32 timer2 = 0;
|
||||
static BeadState beadState1 = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
@ -1580,7 +1551,6 @@ int KyraEngine_LoK::handleBeadState() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::initBeadState(int x, int y, int x2, int y2, int unk, BeadState *ptr) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::initBeadState(%d, %d, %d, %d, %d, %p)", x, y, x2, y2, unk, (const void *)ptr);
|
||||
ptr->unk9 = unk;
|
||||
int xDiff = x2 - x;
|
||||
int yDiff = y2 - y;
|
||||
|
@ -1614,7 +1584,6 @@ void KyraEngine_LoK::initBeadState(int x, int y, int x2, int y2, int unk, BeadSt
|
|||
}
|
||||
|
||||
int KyraEngine_LoK::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::processBead(%d, %d, %p, %p, %p)", x, y, (const void *)&x2, (const void *)&y2, (const void *)ptr);
|
||||
if (x == ptr->dstX && y == ptr->dstY)
|
||||
return 1;
|
||||
|
||||
|
@ -1651,7 +1620,6 @@ int KyraEngine_LoK::processBead(int x, int y, int &x2, int &y2, BeadState *ptr)
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setupPanPages() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupPanPages()");
|
||||
_screen->savePageToDisk("BKGD.PG", 2);
|
||||
_screen->loadBitmap("BEAD.CPS", 3, 3, 0);
|
||||
if (_flags.platform == Common::kPlatformMacintosh || _flags.platform == Common::kPlatformAmiga) {
|
||||
|
@ -1682,7 +1650,6 @@ void KyraEngine_LoK::setupPanPages() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::freePanPages() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::freePanPages()");
|
||||
delete[] _endSequenceBackUpRect;
|
||||
_endSequenceBackUpRect = 0;
|
||||
for (int i = 0; i <= 19; ++i) {
|
||||
|
@ -1692,7 +1659,6 @@ void KyraEngine_LoK::freePanPages() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::closeFinalWsa() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::closeFinalWsa()");
|
||||
delete _finalA;
|
||||
_finalA = 0;
|
||||
delete _finalB;
|
||||
|
@ -1774,7 +1740,6 @@ void KyraEngine_LoK::updateKyragemFading() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::drawJewelPress(int jewel, int drawSpecial) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawJewelPress(%d, %d)", jewel, drawSpecial);
|
||||
_screen->hideMouse();
|
||||
int shape = 0;
|
||||
|
||||
|
@ -1799,7 +1764,6 @@ void KyraEngine_LoK::drawJewelPress(int jewel, int drawSpecial) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::drawJewelsFadeOutStart() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawJewelsFadeOutStart()");
|
||||
static const uint16 jewelTable1[] = { 0x164, 0x15F, 0x15A, 0x155, 0x150, 0xFFFF };
|
||||
static const uint16 jewelTable2[] = { 0x163, 0x15E, 0x159, 0x154, 0x14F, 0xFFFF };
|
||||
static const uint16 jewelTable3[] = { 0x166, 0x160, 0x15C, 0x157, 0x152, 0xFFFF };
|
||||
|
@ -1819,7 +1783,6 @@ void KyraEngine_LoK::drawJewelsFadeOutStart() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::drawJewelsFadeOutEnd(int jewel) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawJewelsFadeOutEnd(%d)", jewel);
|
||||
static const uint16 jewelTable[] = { 0x153, 0x158, 0x15D, 0x162, 0x148, 0xFFFF };
|
||||
int newDelay = 0;
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ namespace Kyra {
|
|||
#pragma mark - Intro
|
||||
|
||||
int LoLEngine::processPrologue() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::processPrologue()");
|
||||
|
||||
setupPrologueData(true);
|
||||
|
||||
|
@ -118,7 +117,6 @@ int LoLEngine::processPrologue() {
|
|||
}
|
||||
|
||||
void LoLEngine::setupPrologueData(bool load) {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::setupPrologueData(%d)", load);
|
||||
|
||||
static const char * const fileListCD[] = {
|
||||
"GENERAL.PAK", "INTROVOC.PAK", "STARTUP.PAK", "INTRO1.PAK",
|
||||
|
@ -200,7 +198,6 @@ void LoLEngine::setupPrologueData(bool load) {
|
|||
}
|
||||
|
||||
void LoLEngine::showIntro() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::showIntro()");
|
||||
|
||||
_tim = new TIMInterpreter(this, _screen, _system);
|
||||
assert(_tim);
|
||||
|
@ -269,7 +266,6 @@ void LoLEngine::showIntro() {
|
|||
}
|
||||
|
||||
int LoLEngine::chooseCharacter() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::chooseCharacter()");
|
||||
|
||||
_tim = new TIMInterpreter(this, _screen, _system);
|
||||
assert(_tim);
|
||||
|
@ -366,7 +362,6 @@ int LoLEngine::chooseCharacter() {
|
|||
}
|
||||
|
||||
void LoLEngine::kingSelectionIntro() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::kingSelectionIntro()");
|
||||
|
||||
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
|
||||
int y = 38;
|
||||
|
@ -410,7 +405,6 @@ void LoLEngine::kingSelectionIntro() {
|
|||
}
|
||||
|
||||
void LoLEngine::kingSelectionReminder() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::kingSelectionReminder()");
|
||||
|
||||
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
|
||||
int y = 48;
|
||||
|
@ -445,7 +439,6 @@ void LoLEngine::kingSelectionReminder() {
|
|||
}
|
||||
|
||||
void LoLEngine::kingSelectionOutro() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::kingSelectionOutro()");
|
||||
|
||||
_sound->voicePlay("KING03");
|
||||
|
||||
|
@ -476,7 +469,6 @@ void LoLEngine::kingSelectionOutro() {
|
|||
}
|
||||
|
||||
void LoLEngine::processCharacterSelection() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::processCharacterSelection()");
|
||||
|
||||
_charSelection = -1;
|
||||
while (!shouldQuit() && _charSelection == -1) {
|
||||
|
@ -494,7 +486,6 @@ void LoLEngine::processCharacterSelection() {
|
|||
}
|
||||
|
||||
void LoLEngine::updateSelectionAnims() {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::updateSelectionAnims()");
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (_system->getMillis() < _selectionAnimTimers[i])
|
||||
|
@ -517,7 +508,6 @@ void LoLEngine::updateSelectionAnims() {
|
|||
}
|
||||
|
||||
int LoLEngine::selectionCharInfo(int character) {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::selectionCharInfo(%d)", character);
|
||||
if (character < 0)
|
||||
return -1;
|
||||
|
||||
|
@ -597,7 +587,6 @@ int LoLEngine::selectionCharInfo(int character) {
|
|||
}
|
||||
|
||||
void LoLEngine::selectionCharInfoIntro(char *file) {
|
||||
debugC(9, kDebugLevelMain, "LoLEngine::selectionCharInfoIntro(%p)", (const void *)file);
|
||||
int index = 0;
|
||||
file[4] = '0';
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_MR::showBadConscience() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::showBadConscience()");
|
||||
if (_badConscienceShown)
|
||||
return;
|
||||
|
||||
|
@ -91,7 +90,6 @@ void KyraEngine_MR::showBadConscience() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::hideBadConscience() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::hideBadConscience()");
|
||||
if (!_badConscienceShown)
|
||||
return;
|
||||
|
||||
|
@ -110,7 +108,6 @@ void KyraEngine_MR::hideBadConscience() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::showGoodConscience() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::showGoodConscience()");
|
||||
|
||||
if (_goodConscienceShown)
|
||||
return;
|
||||
|
@ -165,7 +162,6 @@ void KyraEngine_MR::showGoodConscience() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::hideGoodConscience() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::hideGoodConscience()");
|
||||
if (!_goodConscienceShown)
|
||||
return;
|
||||
|
||||
|
@ -184,7 +180,6 @@ void KyraEngine_MR::hideGoodConscience() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::eelScript() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::eelScript()");
|
||||
if (_chatText)
|
||||
return;
|
||||
_screen->hideMouse();
|
||||
|
@ -230,7 +225,6 @@ void KyraEngine_MR::eelScript() {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::initAnimationShapes(uint8 *filedata) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::initAnimationShapes(%p)", (const void*)filedata);
|
||||
const int lastEntry = MIN(_animShapeLastEntry, 41);
|
||||
for (int i = 0; i < lastEntry; ++i)
|
||||
_gameShapes[9+i] = _screen->getPtrToShape(filedata, i);
|
||||
|
@ -238,7 +232,6 @@ int KyraEngine_MR::initAnimationShapes(uint8 *filedata) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::uninitAnimationShapes(int count, uint8 *filedata) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_MR::uninitAnimationShapes(%d, %p)", count, (const void*)filedata);
|
||||
for (int i = 0; i < count; ++i)
|
||||
_gameShapes[9+i] = 0;
|
||||
delete[] filedata;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_v2::runAnimationScript(const char *filename, int allowSkip, int resetChar, int newShapes, int shapeUnload) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_v2::runAnimationScript('%s', %d, %d, %d, %d)", filename, allowSkip, resetChar, newShapes, shapeUnload);
|
||||
memset(&_animationScriptData, 0, sizeof(_animationScriptData));
|
||||
memset(&_animationScriptState, 0, sizeof(_animationScriptState));
|
||||
|
||||
|
@ -77,7 +76,6 @@ void KyraEngine_v2::runAnimationScript(const char *filename, int allowSkip, int
|
|||
}
|
||||
|
||||
void KyraEngine_v2::processAnimationScript(int allowSkip, int resetChar) {
|
||||
debugC(9, kDebugLevelAnimator, "KyraEngine_v2::processAnimationScript(%d, %d)", allowSkip, resetChar);
|
||||
setCharacterAnimDim(_animShapeWidth, _animShapeHeight);
|
||||
|
||||
_emc->init(&_animationScriptState, &_animationScriptData);
|
||||
|
|
|
@ -210,7 +210,6 @@ uint32 Sound::voicePlayedTime(const char *file) {
|
|||
#pragma mark -
|
||||
|
||||
void KyraEngine_v1::snd_playTheme(int file, int track) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playTheme(%d, %d)", file, track);
|
||||
if (_curMusicTheme == file)
|
||||
return;
|
||||
|
||||
|
@ -228,12 +227,10 @@ void KyraEngine_v1::snd_playTheme(int file, int track) {
|
|||
}
|
||||
|
||||
void KyraEngine_v1::snd_playSoundEffect(int track, int volume) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playSoundEffect(%d, %d)", track, volume);
|
||||
_sound->playSoundEffect(track);
|
||||
}
|
||||
|
||||
void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playWanderScoreViaMap(%d, %d)", command, restart);
|
||||
if (restart)
|
||||
_lastMusicCommand = -1;
|
||||
|
||||
|
@ -277,7 +274,6 @@ void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) {
|
|||
}
|
||||
|
||||
void KyraEngine_v1::snd_stopVoice() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_stopVoice()");
|
||||
if (!_speechFile.empty()) {
|
||||
_sound->voiceStop(_speechFile.c_str());
|
||||
_speechFile.clear();
|
||||
|
@ -285,7 +281,6 @@ void KyraEngine_v1::snd_stopVoice() {
|
|||
}
|
||||
|
||||
bool KyraEngine_v1::snd_voiceIsPlaying() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_voiceIsPlaying()");
|
||||
return _speechFile.empty() ? false : _sound->voiceIsPlaying(_speechFile.c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_LoK::snd_playSoundEffect(int track, int volume) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_playSoundEffect(%d, %d)", track, volume);
|
||||
if ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) && track == 49) {
|
||||
snd_playWanderScoreViaMap(56, 1);
|
||||
return;
|
||||
|
@ -39,7 +38,6 @@ void KyraEngine_LoK::snd_playSoundEffect(int track, int volume) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_playWanderScoreViaMap(%d, %d)", command, restart);
|
||||
if (restart)
|
||||
_lastMusicCommand = -1;
|
||||
|
||||
|
@ -72,7 +70,6 @@ void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::snd_playVoiceFile(int id) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_playVoiceFile(%d)", id);
|
||||
char vocFile[9];
|
||||
snprintf(vocFile, sizeof(vocFile), "%03d", id);
|
||||
_speechFile = vocFile;
|
||||
|
@ -80,7 +77,6 @@ void KyraEngine_LoK::snd_playVoiceFile(int id) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::snd_voiceWaitForFinish(bool ingame) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_voiceWaitForFinish(%d)", ingame);
|
||||
while (_sound->voiceIsPlaying() && !skipFlag()) {
|
||||
if (ingame)
|
||||
delay(10, true);
|
||||
|
@ -90,7 +86,6 @@ void KyraEngine_LoK::snd_voiceWaitForFinish(bool ingame) {
|
|||
}
|
||||
|
||||
uint32 KyraEngine_LoK::snd_getVoicePlayTime() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_getVoicePlayTime()");
|
||||
if (!snd_voiceIsPlaying())
|
||||
return 0;
|
||||
return (_speechPlayTime != -1 ? _speechPlayTime : 0);
|
||||
|
|
|
@ -60,7 +60,6 @@ Sprites::~Sprites() {
|
|||
}
|
||||
|
||||
void Sprites::setupSceneAnims() {
|
||||
debugC(9, kDebugLevelSprites, "Sprites::setupSceneAnims()");
|
||||
uint8 *data;
|
||||
|
||||
for (int i = 0; i < MAX_NUM_ANIMS; i++) {
|
||||
|
@ -130,7 +129,6 @@ void Sprites::setupSceneAnims() {
|
|||
}
|
||||
|
||||
void Sprites::updateSceneAnims() {
|
||||
debugC(9, kDebugLevelSprites, "Sprites::updateSceneAnims()");
|
||||
uint32 currTime = _system->getMillis();
|
||||
bool update;
|
||||
uint8 *data;
|
||||
|
@ -171,7 +169,6 @@ void Sprites::updateSceneAnims() {
|
|||
debugC(6, kDebugLevelSprites, "Sprite index %i", READ_LE_UINT16(data));
|
||||
_anims[i].sprite = READ_LE_UINT16(data);
|
||||
data += 2;
|
||||
//debugC(9, kDebugLevelSprites, "Unused %i", READ_LE_UINT16(data));
|
||||
data += 2;
|
||||
debugC(6, kDebugLevelSprites, "X %i", READ_LE_UINT16(data));
|
||||
_anims[i].x = READ_LE_UINT16(data);
|
||||
|
@ -401,7 +398,6 @@ void Sprites::updateSceneAnims() {
|
|||
}
|
||||
|
||||
void Sprites::loadDat(const char *filename, SceneExits &exits) {
|
||||
debugC(9, kDebugLevelSprites, "Sprites::loadDat('%s')", filename);
|
||||
uint32 fileSize;
|
||||
|
||||
delete[] _dat;
|
||||
|
@ -512,7 +508,6 @@ void Sprites::loadDat(const char *filename, SceneExits &exits) {
|
|||
}
|
||||
|
||||
void Sprites::freeSceneShapes() {
|
||||
debugC(9, kDebugLevelSprites, "Sprites::freeSceneShapes()");
|
||||
for (int i = 0; i < ARRAYSIZE(_sceneShapes); i++ ) {
|
||||
delete[] _sceneShapes[i];
|
||||
_sceneShapes[i] = 0;
|
||||
|
@ -520,7 +515,6 @@ void Sprites::freeSceneShapes() {
|
|||
}
|
||||
|
||||
void Sprites::loadSceneShapes() {
|
||||
debugC(9, kDebugLevelSprites, "Sprites::loadSceneShapes()");
|
||||
uint8 *data = _spriteDefStart;
|
||||
int spriteNum, x, y, width, height;
|
||||
|
||||
|
@ -546,13 +540,11 @@ void Sprites::loadSceneShapes() {
|
|||
height = READ_LE_UINT16(data);
|
||||
data += 2;
|
||||
_sceneShapes[spriteNum] = _screen->encodeShape(x, y, width, height, 2);
|
||||
debugC(9, kDebugLevelSprites, "Sprite %i is at (%i, %i), width %i, height %i", spriteNum, x, y, width, height);
|
||||
}
|
||||
_screen->_curPage = bakPage;
|
||||
}
|
||||
|
||||
void Sprites::refreshSceneAnimObject(uint8 animNum, uint8 shapeNum, uint16 x, uint16 y, bool flipX, bool unkFlag) {
|
||||
debugC(9, kDebugLevelSprites, "Sprites::refreshSceneAnimObject(%i, %i, %i, %i, %i, %i", animNum, shapeNum, x, y, flipX, unkFlag);
|
||||
Animator_LoK::AnimObject &anim = _vm->animator()->sprites()[animNum];
|
||||
anim.refreshFlag = 1;
|
||||
anim.bkgdChangeFlag = 1;
|
||||
|
@ -574,7 +566,6 @@ void Sprites::refreshSceneAnimObject(uint8 animNum, uint8 shapeNum, uint16 x, ui
|
|||
}
|
||||
|
||||
int Sprites::getDrawLayer(int y) {
|
||||
debugC(9, kDebugLevelSprites, "getDrawLayer(%d)", y);
|
||||
uint8 returnValue = 0;
|
||||
for (int i = 0; i < ARRAYSIZE(_drawLayerTable); ++i) {
|
||||
uint8 temp = _drawLayerTable[i];
|
||||
|
|
|
@ -45,12 +45,10 @@ TextDisplayer::TextDisplayer(KyraEngine_v1 *vm, Screen *screen) {
|
|||
}
|
||||
|
||||
void TextDisplayer::setTalkCoords(uint16 y) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::setTalkCoords(%d)", y);
|
||||
_talkCoords.y = y;
|
||||
}
|
||||
|
||||
int TextDisplayer::getCenterStringX(const char *str, int x1, int x2) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::getCenterStringX('%s', %d, %d)", str, x1, x2);
|
||||
_screen->_charWidth = -2;
|
||||
Screen::FontId curFont = _screen->setFont(Screen::FID_8_FNT);
|
||||
int strWidth = _screen->getTextWidth(str);
|
||||
|
@ -61,7 +59,6 @@ int TextDisplayer::getCenterStringX(const char *str, int x1, int x2) {
|
|||
}
|
||||
|
||||
int TextDisplayer::getCharLength(const char *str, int len) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::getCharLength('%s', %d)", str, len);
|
||||
int charsCount = 0;
|
||||
if (*str) {
|
||||
_screen->_charWidth = -2;
|
||||
|
@ -84,7 +81,6 @@ int TextDisplayer::getCharLength(const char *str, int len) {
|
|||
}
|
||||
|
||||
int TextDisplayer::dropCRIntoString(char *str, int offs) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::dropCRIntoString('%s', %d)", str, offs);
|
||||
int pos = 0;
|
||||
str += offs;
|
||||
while (*str) {
|
||||
|
@ -99,7 +95,6 @@ int TextDisplayer::dropCRIntoString(char *str, int offs) {
|
|||
}
|
||||
|
||||
char *TextDisplayer::preprocessString(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::preprocessString('%s')", str);
|
||||
if (str != _talkBuffer) {
|
||||
assert(strlen(str) < sizeof(_talkBuffer) - 1);
|
||||
strcpy(_talkBuffer, str);
|
||||
|
@ -136,7 +131,6 @@ char *TextDisplayer::preprocessString(const char *str) {
|
|||
}
|
||||
|
||||
int TextDisplayer::buildMessageSubstrings(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::buildMessageSubstrings('%s')", str);
|
||||
int currentLine = 0;
|
||||
int pos = 0;
|
||||
while (*str) {
|
||||
|
@ -158,7 +152,6 @@ int TextDisplayer::buildMessageSubstrings(const char *str) {
|
|||
}
|
||||
|
||||
int TextDisplayer::getWidestLineWidth(int linesCount) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::getWidestLineWidth(%d)", linesCount);
|
||||
int maxWidth = 0;
|
||||
Screen::FontId curFont = _screen->setFont(Screen::FID_8_FNT);
|
||||
_screen->_charWidth = -2;
|
||||
|
@ -174,7 +167,6 @@ int TextDisplayer::getWidestLineWidth(int linesCount) {
|
|||
}
|
||||
|
||||
void TextDisplayer::calcWidestLineBounds(int &x1, int &x2, int w, int cx) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::calcWidestLineBounds(%d, %d)", w, cx);
|
||||
x1 = cx - w / 2;
|
||||
if (x1 + w >= Screen::SCREEN_W - 12) {
|
||||
x1 = Screen::SCREEN_W - 12 - w - 1;
|
||||
|
@ -185,7 +177,6 @@ void TextDisplayer::calcWidestLineBounds(int &x1, int &x2, int w, int cx) {
|
|||
}
|
||||
|
||||
void TextDisplayer::restoreTalkTextMessageBkgd(int srcPage, int dstPage) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::restoreTalkTextMessageBkgd(%d, %d)", srcPage, dstPage);
|
||||
if (_talkMessagePrinted) {
|
||||
_talkMessagePrinted = false;
|
||||
_screen->copyRegion(_talkCoords.x, _talkCoords.y, _talkCoords.x, _talkMessageY, _talkCoords.w, _talkMessageH, srcPage, dstPage);
|
||||
|
@ -193,7 +184,6 @@ void TextDisplayer::restoreTalkTextMessageBkgd(int srcPage, int dstPage) {
|
|||
}
|
||||
|
||||
void TextDisplayer::printTalkTextMessage(const char *text, int x, int y, uint8 color, int srcPage, int dstPage) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::printTalkTextMessage('%s', %d, %d, %d, %d, %d)", text, x, y, color, srcPage, dstPage);
|
||||
char *str = preprocessString(text);
|
||||
int lineCount = buildMessageSubstrings(str);
|
||||
int top = y - lineCount * 10;
|
||||
|
@ -221,8 +211,6 @@ void TextDisplayer::printTalkTextMessage(const char *text, int x, int y, uint8 c
|
|||
}
|
||||
|
||||
void TextDisplayer::printIntroTextMessage(const char *text, int x, int y, uint8 col1, uint8 col2, uint8 col3, int dstPage, Screen::FontId font) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::printIntroTextMessage('%s', %d, %d, %d, %d, %d, %d, %d)",
|
||||
text, x, y, col1, col2, col3, dstPage, font);
|
||||
char *str = preprocessString(text);
|
||||
int lineCount = buildMessageSubstrings(str);
|
||||
int top = y - lineCount * 10;
|
||||
|
@ -249,7 +237,6 @@ void TextDisplayer::printIntroTextMessage(const char *text, int x, int y, uint8
|
|||
}
|
||||
|
||||
void TextDisplayer::printText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2, Screen::FontId font) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::printText('%s', %d, %d, %d, %d, %d)", str, x, y, c0, c1, c2);
|
||||
uint8 colorMap[] = { 0, 15, 12, 12 };
|
||||
colorMap[3] = c1;
|
||||
_screen->setTextColor(colorMap, 0, 3);
|
||||
|
@ -261,7 +248,6 @@ void TextDisplayer::printText(const char *str, int x, int y, uint8 c0, uint8 c1,
|
|||
}
|
||||
|
||||
void TextDisplayer::printCharacterText(const char *text, int8 charNum, int charX) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer::printCharacterText('%s', %d, %d)", text, charNum, charX);
|
||||
uint8 colorTable[] = {0x0F, 0x9, 0x0C9, 0x80, 0x5, 0x81, 0x0E, 0xD8, 0x55, 0x3A, 0x3a};
|
||||
int top, left, x1, x2, w, x;
|
||||
char *msg;
|
||||
|
|
|
@ -87,7 +87,6 @@ void TextDisplayer_HoF::printCustomCharacterText(const char *text, int x, int y,
|
|||
}
|
||||
|
||||
char *TextDisplayer_HoF::preprocessString(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer_HoF::preprocessString('%s')", str);
|
||||
|
||||
if (str != _talkBuffer) {
|
||||
assert(strlen(str) < sizeof(_talkBuffer) - 1);
|
||||
|
@ -129,7 +128,6 @@ char *TextDisplayer_HoF::preprocessString(const char *str) {
|
|||
}
|
||||
|
||||
void TextDisplayer_HoF::calcWidestLineBounds(int &x1, int &x2, int w, int x) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer_HoF::calcWidestLineBounds(%d, %d)", w, x);
|
||||
x1 = x;
|
||||
x1 -= (w >> 1);
|
||||
x2 = x1 + w + 1;
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
namespace Kyra {
|
||||
|
||||
void KyraEngine_LoK::waitForChatToFinish(int vocFile, int16 chatDuration, const char *chatStr, uint8 charNum) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::waitForChatToFinish(%i, %s, %i)", chatDuration, chatStr, charNum);
|
||||
bool hasUpdatedNPCs = false;
|
||||
bool runLoop = true;
|
||||
bool drawText = textEnabled();
|
||||
|
@ -245,7 +244,6 @@ int KyraEngine_LoK::initCharacterChat(int8 charNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNum, int8 chatDuration) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::characterSays('%s', %i, %d)", chatStr, charNum, chatDuration);
|
||||
uint8 startAnimFrames[] = { 0x10, 0x32, 0x56, 0x0, 0x0, 0x0 };
|
||||
|
||||
uint16 chatTicks;
|
||||
|
@ -327,7 +325,6 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawSentenceCommand('%s', %i)", sentence, color);
|
||||
_screen->hideMouse();
|
||||
_screen->fillRect(8, 143, 311, 152, 12);
|
||||
|
||||
|
@ -347,7 +344,6 @@ void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::updateSentenceCommand(const char *str1, const char *str2, int color) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::updateSentenceCommand('%s', '%s', %i)", str1, str2, color);
|
||||
char sentenceCommand[500];
|
||||
strncpy(sentenceCommand, str1, 500);
|
||||
if (str2)
|
||||
|
@ -358,7 +354,6 @@ void KyraEngine_LoK::updateSentenceCommand(const char *str1, const char *str2, i
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::updateTextFade() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_LoK::updateTextFade()");
|
||||
if (!_fadeText)
|
||||
return;
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ TextDisplayer_MR::TextDisplayer_MR(KyraEngine_MR *vm, Screen_MR *screen)
|
|||
}
|
||||
|
||||
char *TextDisplayer_MR::preprocessString(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer_MR::preprocessString('%s')", str);
|
||||
if (_talkBuffer != str)
|
||||
strncpy(_talkBuffer, str, sizeof(_talkBuffer));
|
||||
|
||||
|
@ -83,7 +82,6 @@ char *TextDisplayer_MR::preprocessString(const char *str) {
|
|||
}
|
||||
|
||||
int TextDisplayer_MR::dropCRIntoString(char *str, int minOffs, int maxOffs) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer_MR::dropCRIntoString('%s', %d, %d)", str, maxOffs, minOffs);
|
||||
|
||||
int offset = 0;
|
||||
char *proc = str + minOffs;
|
||||
|
@ -131,7 +129,6 @@ int TextDisplayer_MR::dropCRIntoString(char *str, int minOffs, int maxOffs) {
|
|||
}
|
||||
|
||||
void TextDisplayer_MR::printText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2, Screen::FontId font) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer_MR::printText('%s', %d, %d, %d, %d, %d)", str, x, y, c0, c1, c2);
|
||||
if (_vm->_albumChatActive) {
|
||||
c0 = 0xEE;
|
||||
c1 = 0xE3;
|
||||
|
@ -149,7 +146,6 @@ void TextDisplayer_MR::printText(const char *str, int x, int y, uint8 c0, uint8
|
|||
}
|
||||
|
||||
void TextDisplayer_MR::restoreScreen() {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer_MR::restoreScreen()");
|
||||
_vm->restorePage3();
|
||||
_vm->drawAnimObjects();
|
||||
_screen->hideMouse();
|
||||
|
@ -160,7 +156,6 @@ void TextDisplayer_MR::restoreScreen() {
|
|||
}
|
||||
|
||||
void TextDisplayer_MR::calcWidestLineBounds(int &x1, int &x2, int w, int x) {
|
||||
debugC(9, kDebugLevelMain, "TextDisplayer_MR::calcWidestLineBounds(%d, %d)", w, x);
|
||||
x1 = x;
|
||||
x1 -= (w >> 1);
|
||||
x2 = x1 + w + 1;
|
||||
|
@ -177,7 +172,6 @@ void TextDisplayer_MR::calcWidestLineBounds(int &x1, int &x2, int w, int x) {
|
|||
#pragma mark -
|
||||
|
||||
int KyraEngine_MR::chatGetType(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::chatGetType('%s')", str);
|
||||
while (*str)
|
||||
++str;
|
||||
--str;
|
||||
|
@ -198,12 +192,10 @@ int KyraEngine_MR::chatGetType(const char *str) {
|
|||
}
|
||||
|
||||
int KyraEngine_MR::chatCalcDuration(const char *str) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::chatCalcDuration('%s')", str);
|
||||
return MAX<int>(120, strlen(str)*6);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::objectChat(const char *str, int object, int vocHigh, int vocLow) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::objectChat('%s', %d, %d, %d)", str, object, vocHigh, vocLow);
|
||||
|
||||
if (_mainCharacter.animFrame == 87 || _mainCharacter.animFrame == 0xFFFF || _mainCharacter.x1 <= 0 || _mainCharacter.y1 <= 0)
|
||||
return;
|
||||
|
@ -247,7 +239,6 @@ void KyraEngine_MR::objectChat(const char *str, int object, int vocHigh, int voc
|
|||
}
|
||||
|
||||
void KyraEngine_MR::objectChatInit(const char *str, int object, int vocHigh, int vocLow) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::objectChatInit('%s', %d, %d, %d)", str, object, vocHigh, vocLow);
|
||||
str = _text->preprocessString(str);
|
||||
int lineNum = _text->buildMessageSubstrings(str);
|
||||
|
||||
|
@ -294,7 +285,6 @@ void KyraEngine_MR::objectChatInit(const char *str, int object, int vocHigh, int
|
|||
}
|
||||
|
||||
void KyraEngine_MR::objectChatPrintText(const char *str, int object) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::objectChatPrintText('%s', %d)", str, object);
|
||||
int c1 = _talkObjectList[object].color;
|
||||
str = _text->preprocessString(str);
|
||||
int lineNum = _text->buildMessageSubstrings(str);
|
||||
|
@ -314,7 +304,6 @@ void KyraEngine_MR::objectChatPrintText(const char *str, int object) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::objectChatProcess(const char *script) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::objectChatProcess('%s')", script);
|
||||
|
||||
memset(&_chatScriptData, 0, sizeof(_chatScriptData));
|
||||
memset(&_chatScriptState, 0, sizeof(_chatScriptState));
|
||||
|
@ -338,7 +327,6 @@ void KyraEngine_MR::objectChatProcess(const char *script) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::objectChatWaitToFinish() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::objectChatWaitToFinish()");
|
||||
int charAnimFrame = _mainCharacter.animFrame;
|
||||
setCharacterAnimDim(_animShapeWidth, _animShapeHeight);
|
||||
|
||||
|
@ -388,7 +376,6 @@ void KyraEngine_MR::objectChatWaitToFinish() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::badConscienceChat(const char *str, int vocHigh, int vocLow) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::badConscienceChat('%s', %d, %d)", str, vocHigh, vocLow);
|
||||
if (!_badConscienceShown)
|
||||
return;
|
||||
|
||||
|
@ -406,7 +393,6 @@ void KyraEngine_MR::badConscienceChat(const char *str, int vocHigh, int vocLow)
|
|||
}
|
||||
|
||||
void KyraEngine_MR::badConscienceChatWaitToFinish() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::badConscienceChatWaitToFinish()");
|
||||
if (_chatVocHigh) {
|
||||
playVoice(_chatVocHigh, _chatVocLow);
|
||||
_chatVocHigh = _chatVocLow = -1;
|
||||
|
@ -446,7 +432,6 @@ void KyraEngine_MR::badConscienceChatWaitToFinish() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::goodConscienceChat(const char *str, int vocHigh, int vocLow) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::goodConscienceChat('%s', %d, %d)", str, vocHigh, vocLow);
|
||||
if (!_goodConscienceShown)
|
||||
return;
|
||||
|
||||
|
@ -464,7 +449,6 @@ void KyraEngine_MR::goodConscienceChat(const char *str, int vocHigh, int vocLow)
|
|||
}
|
||||
|
||||
void KyraEngine_MR::goodConscienceChatWaitToFinish() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::goodConscienceChatWaitToFinish()");
|
||||
if (_chatVocHigh) {
|
||||
playVoice(_chatVocHigh, _chatVocLow);
|
||||
_chatVocHigh = _chatVocLow = -1;
|
||||
|
@ -504,7 +488,6 @@ void KyraEngine_MR::goodConscienceChatWaitToFinish() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumChat(const char *str, int vocHigh, int vocLow) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumChat('%s', %d, %d)", str, vocHigh, vocLow);
|
||||
|
||||
_talkObjectList[1].x = 190;
|
||||
_talkObjectList[1].y = 188;
|
||||
|
@ -525,7 +508,6 @@ void KyraEngine_MR::albumChat(const char *str, int vocHigh, int vocLow) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumChatInit(const char *str, int object, int vocHigh, int vocLow) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumChatInit('%s', %d, %d, %d)", str, object, vocHigh, vocLow);
|
||||
Common::String realString;
|
||||
|
||||
while (*str) {
|
||||
|
@ -585,7 +567,6 @@ void KyraEngine_MR::albumChatInit(const char *str, int object, int vocHigh, int
|
|||
}
|
||||
|
||||
void KyraEngine_MR::albumChatWaitToFinish() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::albumChatWaitToFinish()");
|
||||
if (_chatVocHigh) {
|
||||
playVoice(_chatVocHigh, _chatVocLow);
|
||||
_chatVocHigh = _chatVocLow = -1;
|
||||
|
@ -628,7 +609,6 @@ void KyraEngine_MR::albumChatWaitToFinish() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::malcolmSceneStartupChat() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::malcolmSceneStartupChat()");
|
||||
|
||||
if (_noStartupChat)
|
||||
return;
|
||||
|
@ -653,7 +633,6 @@ void KyraEngine_MR::malcolmSceneStartupChat() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateDlgBuffer() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateDlgBuffer()");
|
||||
char dlgFile[16];
|
||||
char cnvFile[16];
|
||||
|
||||
|
@ -679,7 +658,6 @@ void KyraEngine_MR::updateDlgBuffer() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::loadDlgHeader(int &vocHighBase, int &vocHighIndex, int &index1, int &index2) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadDlgHeader(-, -, -, -)");
|
||||
assert(_cnvFile);
|
||||
vocHighIndex = _cnvFile->readSint16LE();
|
||||
vocHighBase = _cnvFile->readSint16LE();
|
||||
|
@ -688,7 +666,6 @@ void KyraEngine_MR::loadDlgHeader(int &vocHighBase, int &vocHighIndex, int &inde
|
|||
}
|
||||
|
||||
void KyraEngine_MR::setDlgIndex(int index) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::setDlgIndex(%d)", index);
|
||||
if (_mainCharacter.dlgIndex != index) {
|
||||
memset(_newSceneDlgState, 0, sizeof(_newSceneDlgState));
|
||||
memset(_conversationState, -1, sizeof(_conversationState));
|
||||
|
@ -698,7 +675,6 @@ void KyraEngine_MR::setDlgIndex(int index) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::updateDlgIndex() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::updateDlgIndex()");
|
||||
uint16 dlgIndex = _mainCharacter.dlgIndex;
|
||||
|
||||
if (_currentChapter == 1) {
|
||||
|
@ -738,7 +714,6 @@ void KyraEngine_MR::updateDlgIndex() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::processDialog(int vocHighIndex, int vocHighBase, int funcNum) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::processDialog(%d, %d, %d)", vocHighIndex, vocHighBase, funcNum);
|
||||
bool running = true;
|
||||
int script = -1;
|
||||
int vocHigh = -1, vocLow = -1;
|
||||
|
@ -799,7 +774,6 @@ void KyraEngine_MR::processDialog(int vocHighIndex, int vocHighBase, int funcNum
|
|||
}
|
||||
|
||||
void KyraEngine_MR::dialogStartScript(int object, int funcNum) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::dialogStartScript(%d, %d)", object, funcNum);
|
||||
_dialogSceneAnim = _talkObjectList[object].sceneAnim;
|
||||
_dialogSceneScript = _talkObjectList[object].sceneScript;
|
||||
if (_dialogSceneAnim >= 0 && _dialogSceneScript >= 0) {
|
||||
|
@ -820,7 +794,6 @@ void KyraEngine_MR::dialogStartScript(int object, int funcNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::dialogEndScript(int object) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::dialogEndScript(%d)", object);
|
||||
|
||||
_emc->init(&_dialogScriptState, &_dialogScriptData);
|
||||
_emc->start(&_dialogScriptState, _dialogScriptFuncEnd);
|
||||
|
@ -837,7 +810,6 @@ void KyraEngine_MR::dialogEndScript(int object) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::npcChatSequence(const char *str, int object, int vocHigh, int vocLow) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::npcChatSequence('%s', %d, %d, %d)", str, object, vocHigh, vocLow);
|
||||
|
||||
_chatText = str;
|
||||
_chatObject = object;
|
||||
|
@ -876,7 +848,6 @@ void KyraEngine_MR::npcChatSequence(const char *str, int object, int vocHigh, in
|
|||
}
|
||||
|
||||
void KyraEngine_MR::randomSceneChat() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::randomSceneChat()");
|
||||
updateDlgBuffer();
|
||||
|
||||
int index = (_mainCharacter.sceneId - _chapterLowestScene[_currentChapter]) * 2;
|
||||
|
@ -896,7 +867,6 @@ void KyraEngine_MR::randomSceneChat() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::runDialog(int dlgIndex, int funcNum) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine_MR::runDialog(%d, %d)", dlgIndex, funcNum);
|
||||
|
||||
switch (_currentChapter-2) {
|
||||
case 0:
|
||||
|
|
|
@ -93,7 +93,6 @@ void TimerManager::reset() {
|
|||
}
|
||||
|
||||
void TimerManager::addTimer(uint8 id, TimerFunc *func, int countdown, bool enabled) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::addTimer(%d, %p, %d, %d)", id, (const void*)func, countdown, enabled);
|
||||
|
||||
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end()) {
|
||||
|
@ -114,7 +113,6 @@ void TimerManager::addTimer(uint8 id, TimerFunc *func, int countdown, bool enabl
|
|||
}
|
||||
|
||||
void TimerManager::update() {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::update()");
|
||||
|
||||
if (_system->getMillis() < _nextRun || _isPaused)
|
||||
return;
|
||||
|
@ -139,7 +137,6 @@ void TimerManager::update() {
|
|||
}
|
||||
|
||||
void TimerManager::resync() {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::resync()");
|
||||
|
||||
const uint32 curTime = _isPaused ? _pauseStart : _system->getMillis();
|
||||
|
||||
|
@ -148,12 +145,10 @@ void TimerManager::resync() {
|
|||
}
|
||||
|
||||
void TimerManager::resetNextRun() {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::resetNextRun()");
|
||||
_nextRun = 0;
|
||||
}
|
||||
|
||||
void TimerManager::setCountdown(uint8 id, int32 countdown) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::setCountdown(%d, %d)", id, countdown);
|
||||
|
||||
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end()) {
|
||||
|
@ -172,7 +167,6 @@ void TimerManager::setCountdown(uint8 id, int32 countdown) {
|
|||
}
|
||||
|
||||
void TimerManager::setDelay(uint8 id, int32 countdown) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::setDelay(%d, %d)", id, countdown);
|
||||
|
||||
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end())
|
||||
|
@ -182,7 +176,6 @@ void TimerManager::setDelay(uint8 id, int32 countdown) {
|
|||
}
|
||||
|
||||
int32 TimerManager::getDelay(uint8 id) const {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::getDelay(%d)", id);
|
||||
|
||||
CIterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end())
|
||||
|
@ -193,7 +186,6 @@ int32 TimerManager::getDelay(uint8 id) const {
|
|||
}
|
||||
|
||||
void TimerManager::setNextRun(uint8 id, uint32 nextRun) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::setNextRun(%d, %u)", id, nextRun);
|
||||
|
||||
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end()) {
|
||||
|
@ -205,7 +197,6 @@ void TimerManager::setNextRun(uint8 id, uint32 nextRun) {
|
|||
}
|
||||
|
||||
uint32 TimerManager::getNextRun(uint8 id) const {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::getNextRun(%d)", id);
|
||||
|
||||
CIterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end())
|
||||
|
@ -216,7 +207,6 @@ uint32 TimerManager::getNextRun(uint8 id) const {
|
|||
}
|
||||
|
||||
void TimerManager::pauseSingleTimer(uint8 id, bool p) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::pauseSingleTimer(%d, %d)", id, (int) p);
|
||||
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
|
||||
if (timer == _timers.end()) {
|
||||
|
@ -238,7 +228,6 @@ void TimerManager::pauseSingleTimer(uint8 id, bool p) {
|
|||
}
|
||||
|
||||
bool TimerManager::isEnabled(uint8 id) const {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::isEnabled(%d)", id);
|
||||
|
||||
CIterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end())
|
||||
|
@ -249,7 +238,6 @@ bool TimerManager::isEnabled(uint8 id) const {
|
|||
}
|
||||
|
||||
void TimerManager::enable(uint8 id) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::enable(%d)", id);
|
||||
|
||||
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end())
|
||||
|
@ -259,7 +247,6 @@ void TimerManager::enable(uint8 id) {
|
|||
}
|
||||
|
||||
void TimerManager::disable(uint8 id) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::disable(%d)", id);
|
||||
|
||||
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
|
||||
if (timer != _timers.end())
|
||||
|
@ -269,7 +256,6 @@ void TimerManager::disable(uint8 id) {
|
|||
}
|
||||
|
||||
void TimerManager::loadDataFromFile(Common::SeekableReadStream &file, int version) {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::loadDataFromFile(%p, %d)", (const void *)&file, version);
|
||||
|
||||
const uint32 loadTime = _isPaused ? _pauseStart : _system->getMillis();
|
||||
|
||||
|
@ -317,7 +303,6 @@ void TimerManager::loadDataFromFile(Common::SeekableReadStream &file, int versio
|
|||
}
|
||||
|
||||
void TimerManager::saveDataToFile(Common::WriteStream &file) const {
|
||||
debugC(9, kDebugLevelTimer, "TimerManager::saveDataToFile(%p)", (const void *)&file);
|
||||
|
||||
const uint32 saveTime = _isPaused ? _pauseStart : _system->getMillis();
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ namespace Kyra {
|
|||
#define TimerV2(x) new Common::Functor1Mem<int, void, KyraEngine_HoF>(this, &KyraEngine_HoF::x)
|
||||
|
||||
void KyraEngine_HoF::setupTimers() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::setupTimers()");
|
||||
|
||||
_timer->addTimer(0, 0, 5, 1);
|
||||
_timer->addTimer(1, TimerV2(timerFadeOutMessage), -1, 1);
|
||||
|
@ -42,13 +41,11 @@ void KyraEngine_HoF::setupTimers() {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::timerFadeOutMessage(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::timerFadeOutMessage(%d)", arg);
|
||||
if (_shownMessage)
|
||||
_fadeMessagePalette = 1;
|
||||
}
|
||||
|
||||
void KyraEngine_HoF::timerCauldronAnimation(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::timerCauldronAnimation(%d)", arg);
|
||||
int animation = -1;
|
||||
|
||||
// HACK: We don't allow inventory animations while the inventory is backed off, which means not shown usually.
|
||||
|
@ -69,13 +66,11 @@ void KyraEngine_HoF::timerCauldronAnimation(int arg) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::timerFunc4(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::timerFunc4(%d)", arg);
|
||||
_timer->disable(3);
|
||||
setGameFlag(0xD8);
|
||||
}
|
||||
|
||||
void KyraEngine_HoF::timerFunc5(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::timerFunc5(%d)", arg);
|
||||
_timer->disable(4);
|
||||
_screen->hideMouse();
|
||||
_specialSceneScriptState[5] = 1;
|
||||
|
@ -87,7 +82,6 @@ void KyraEngine_HoF::timerFunc5(int arg) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::timerBurnZanthia(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::timerBurnZanthia(%d)", arg);
|
||||
_timer->disable(5);
|
||||
_screen->hideMouse();
|
||||
snd_playSoundEffect(0x2D);
|
||||
|
@ -97,7 +91,6 @@ void KyraEngine_HoF::timerBurnZanthia(int arg) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::setTimer1DelaySecs(int secs) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::setTimer1DelaySecs(%d)", secs);
|
||||
|
||||
if (secs == -1)
|
||||
secs = 32000;
|
||||
|
@ -106,7 +99,6 @@ void KyraEngine_HoF::setTimer1DelaySecs(int secs) {
|
|||
}
|
||||
|
||||
void KyraEngine_HoF::setWalkspeed(uint8 newSpeed) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_HoF::setWalkspeed(%i)", newSpeed);
|
||||
|
||||
if (newSpeed < 5)
|
||||
newSpeed = 3;
|
||||
|
|
|
@ -36,7 +36,6 @@ namespace Kyra {
|
|||
#define TimerV1(x) new Common::Functor1Mem<int, void, KyraEngine_LoK>(this, &KyraEngine_LoK::x)
|
||||
|
||||
void KyraEngine_LoK::setupTimers() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::setupTimers()");
|
||||
|
||||
for (int i = 0; i <= 4; ++i)
|
||||
_timer->addTimer(i, 0, -1, 1);
|
||||
|
@ -74,7 +73,6 @@ void KyraEngine_LoK::setupTimers() {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::timerUpdateHeadAnims(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerUpdateHeadAnims(%i)", timerNum);
|
||||
static int8 currentFrame = 0;
|
||||
static const int8 frameTable[] = {4, 5, 4, 5, 4, 5, 0, 1, 4, 5,
|
||||
4, 4, 6, 4, 8, 1, 9, 4, -1};
|
||||
|
@ -93,7 +91,6 @@ void KyraEngine_LoK::timerUpdateHeadAnims(int timerNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::timerSetFlags1(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerSetFlags(%i)", timerNum);
|
||||
if (_currentCharacter->sceneId == 0x1C)
|
||||
return;
|
||||
|
||||
|
@ -112,26 +109,22 @@ void KyraEngine_LoK::timerSetFlags1(int timerNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::timerFadeText(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerFadeText(%i)", timerNum);
|
||||
_fadeText = true;
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::updateAnimFlag1(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::updateAnimFlag1(%d)", timerNum);
|
||||
if (_brandonStatusBit & 2) {
|
||||
_brandonStatusBit0x02Flag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::updateAnimFlag2(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::updateAnimFlag2(%d)", timerNum);
|
||||
if (_brandonStatusBit & 0x20) {
|
||||
_brandonStatusBit0x20Flag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::setTextFadeTimerCountdown(int16 countdown) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::setTextFadeTimerCountdown(%i)", countdown);
|
||||
if (countdown == -1)
|
||||
countdown = 32000;
|
||||
|
||||
|
@ -139,13 +132,11 @@ void KyraEngine_LoK::setTextFadeTimerCountdown(int16 countdown) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::timerSetFlags2(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerSetFlags2(%i)", timerNum);
|
||||
if (!((uint32*)(_flagsTable+0x2D))[timerNum])
|
||||
((uint32*)(_flagsTable+0x2D))[timerNum] = 1;
|
||||
}
|
||||
|
||||
void KyraEngine_LoK::timerCheckAnimFlag1(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerCheckAnimFlag1(%i)", timerNum);
|
||||
if (_brandonStatusBit & 0x20) {
|
||||
checkAmuletAnimFlags();
|
||||
_timer->setCountdown(18, -1);
|
||||
|
@ -153,7 +144,6 @@ void KyraEngine_LoK::timerCheckAnimFlag1(int timerNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::timerCheckAnimFlag2(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerCheckAnimFlag2(%i)", timerNum);
|
||||
if (_brandonStatusBit & 0x2) {
|
||||
checkAmuletAnimFlags();
|
||||
_timer->setCountdown(14, -1);
|
||||
|
@ -161,7 +151,6 @@ void KyraEngine_LoK::timerCheckAnimFlag2(int timerNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::timerRedrawAmulet(int timerNum) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerRedrawAmulet(%i)", timerNum);
|
||||
if (queryGameFlag(0xF1)) {
|
||||
drawAmulet();
|
||||
_timer->setCountdown(19, -1);
|
||||
|
@ -169,7 +158,6 @@ void KyraEngine_LoK::timerRedrawAmulet(int timerNum) {
|
|||
}
|
||||
|
||||
void KyraEngine_LoK::setWalkspeed(uint8 newSpeed) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::setWalkspeed(%i)", newSpeed);
|
||||
static const uint8 speeds[] = { 11, 9, 6, 5, 3 };
|
||||
|
||||
assert(newSpeed < ARRAYSIZE(speeds));
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace Kyra {
|
|||
#define TimerV2(x) new Common::Functor1Mem<int, void, LoLEngine>(this, &LoLEngine::x)
|
||||
|
||||
void LoLEngine::setupTimers() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "LoLEngine::setupTimers()");
|
||||
|
||||
_timer->addTimer(0, TimerV2(timerProcessDoors), 15, true);
|
||||
_timer->addTimer(0x10, TimerV2(timerProcessMonsters), 6, true);
|
||||
|
|
|
@ -31,7 +31,6 @@ namespace Kyra {
|
|||
#define TimerV3(x) new Common::Functor1Mem<int, void, KyraEngine_MR>(this, &KyraEngine_MR::x)
|
||||
|
||||
void KyraEngine_MR::setupTimers() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::setupTimers()");
|
||||
|
||||
_timer->addTimer(0, TimerV3(timerRestoreCommandLine), -1, 1);
|
||||
for (int i = 1; i <= 3; ++i)
|
||||
|
@ -44,13 +43,11 @@ void KyraEngine_MR::setupTimers() {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::timerRestoreCommandLine(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::timerRestoreCommandLine(%d)", arg);
|
||||
if (_shownMessage)
|
||||
_restoreCommandLine = true;
|
||||
}
|
||||
|
||||
void KyraEngine_MR::timerRunSceneScript7(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::timerRunSceneScript7(%d)", arg);
|
||||
_emc->init(&_sceneScriptState, &_sceneScriptData);
|
||||
_sceneScriptState.regs[1] = _mouseX;
|
||||
_sceneScriptState.regs[2] = _mouseY;
|
||||
|
@ -63,7 +60,6 @@ void KyraEngine_MR::timerRunSceneScript7(int arg) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::timerFleaDeath(int arg) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::timerFleaDeath(%d)", arg);
|
||||
_timer->setCountdown(4, 5400);
|
||||
saveGameState(999, "Autosave", 0);
|
||||
_screen->hideMouse();
|
||||
|
@ -86,7 +82,6 @@ void KyraEngine_MR::timerFleaDeath(int arg) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::setWalkspeed(uint8 speed) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::setWalkspeed(%d)", speed);
|
||||
|
||||
if (speed < 5)
|
||||
speed = 3;
|
||||
|
@ -97,14 +92,12 @@ void KyraEngine_MR::setWalkspeed(uint8 speed) {
|
|||
}
|
||||
|
||||
void KyraEngine_MR::setCommandLineRestoreTimer(int secs) {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::setCommandLineRestoreTimer(%d)", secs);
|
||||
if (secs == -1)
|
||||
secs = 32000;
|
||||
_timer->setCountdown(0, secs*60);
|
||||
}
|
||||
|
||||
void KyraEngine_MR::setNextIdleAnimTimer() {
|
||||
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::setNextIdleAnimTimer()");
|
||||
_nextIdleAnim = _system->getMillis() + _rnd.getRandomNumberRng(10, 15) * 1000;
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,6 @@ void VQAMovie::decodeSND1(byte *inbuf, uint32 insize, byte *outbuf, uint32 outsi
|
|||
}
|
||||
|
||||
bool VQAMovie::open(const char *filename) {
|
||||
debugC(9, kDebugLevelMovie, "VQAMovie::open('%s')", filename);
|
||||
close();
|
||||
|
||||
_file = _vm->resource()->createReadStream(filename);
|
||||
|
@ -355,7 +354,6 @@ bool VQAMovie::open(const char *filename) {
|
|||
}
|
||||
|
||||
void VQAMovie::close() {
|
||||
debugC(9, kDebugLevelMovie, "VQAMovie::close()");
|
||||
if (_opened) {
|
||||
delete[] _frameInfo;
|
||||
delete[] _frame;
|
||||
|
@ -384,7 +382,6 @@ void VQAMovie::close() {
|
|||
}
|
||||
|
||||
void VQAMovie::displayFrame(uint frameNum) {
|
||||
debugC(9, kDebugLevelMovie, "VQAMovie::displayFrame(%d)", frameNum);
|
||||
if (frameNum >= _header.numFrames || !_opened)
|
||||
return;
|
||||
|
||||
|
@ -633,7 +630,6 @@ void VQAMovie::play() {
|
|||
break;
|
||||
|
||||
case MKID_BE('CMDS'): // Unused tag, always empty in kyra3
|
||||
debugC(9, kDebugLevelMovie, "VQAMovie::play: skipping CMDS tag");
|
||||
_file->seek(size, SEEK_CUR);
|
||||
break;
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ WSAMovie_v1::WSAMovie_v1(KyraEngine_v1 *vm) : Movie(vm) {}
|
|||
WSAMovie_v1::~WSAMovie_v1() { close(); }
|
||||
|
||||
int WSAMovie_v1::open(const char *filename, int offscreenDecode, uint8 *palBuf) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovie_v1::open('%s', %d, %p)", filename, offscreenDecode, (const void *)palBuf);
|
||||
close();
|
||||
|
||||
uint32 flags = 0;
|
||||
|
@ -124,7 +123,6 @@ int WSAMovie_v1::open(const char *filename, int offscreenDecode, uint8 *palBuf)
|
|||
}
|
||||
|
||||
void WSAMovie_v1::close() {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovie_v1::close()");
|
||||
if (_opened) {
|
||||
delete[] _deltaBuffer;
|
||||
delete[] _offscreenBuffer;
|
||||
|
@ -135,7 +133,6 @@ void WSAMovie_v1::close() {
|
|||
}
|
||||
|
||||
void WSAMovie_v1::displayFrame(int frameNum, int pageNum, int x, int y, ...) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovie_v1::displayFrame(%d, %d, %d, %d, ...)", frameNum, pageNum, x, y);
|
||||
if (frameNum >= _numFrames || !_opened)
|
||||
return;
|
||||
|
||||
|
@ -203,7 +200,6 @@ void WSAMovie_v1::displayFrame(int frameNum, int pageNum, int x, int y, ...) {
|
|||
}
|
||||
|
||||
void WSAMovie_v1::processFrame(int frameNum, uint8 *dst) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovie_v1::processFrame(%d, %p)", frameNum, (const void *)dst);
|
||||
if (!_opened)
|
||||
return;
|
||||
assert(frameNum <= _numFrames);
|
||||
|
@ -220,7 +216,6 @@ void WSAMovie_v1::processFrame(int frameNum, uint8 *dst) {
|
|||
WSAMovieAmiga::WSAMovieAmiga(KyraEngine_v1 *vm) : WSAMovie_v1(vm), _buffer(0) {}
|
||||
|
||||
int WSAMovieAmiga::open(const char *filename, int offscreenDecode, uint8 *palBuf) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovieAmiga::open('%s', %d, %p)", filename, offscreenDecode, (const void *)palBuf);
|
||||
int res = WSAMovie_v1::open(filename, offscreenDecode, palBuf);
|
||||
|
||||
if (!res)
|
||||
|
@ -232,7 +227,6 @@ int WSAMovieAmiga::open(const char *filename, int offscreenDecode, uint8 *palBuf
|
|||
}
|
||||
|
||||
void WSAMovieAmiga::close() {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovieAmiga::close()");
|
||||
if (_opened) {
|
||||
delete[] _buffer;
|
||||
_buffer = 0;
|
||||
|
@ -241,7 +235,6 @@ void WSAMovieAmiga::close() {
|
|||
}
|
||||
|
||||
void WSAMovieAmiga::displayFrame(int frameNum, int pageNum, int x, int y, ...) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovieAmiga::displayFrame(%d, %d, %d, %d,...)", frameNum, pageNum, x, y);
|
||||
if (frameNum >= _numFrames || frameNum < 0 || !_opened)
|
||||
return;
|
||||
|
||||
|
@ -318,7 +311,6 @@ void WSAMovieAmiga::displayFrame(int frameNum, int pageNum, int x, int y, ...) {
|
|||
}
|
||||
|
||||
void WSAMovieAmiga::processFrame(int frameNum, uint8 *dst) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovieAmiga::processFrame(%d, %p)", frameNum, (const void *)dst);
|
||||
if (!_opened)
|
||||
return;
|
||||
assert(frameNum <= _numFrames);
|
||||
|
@ -353,7 +345,6 @@ void WSAMovieAmiga::processFrame(int frameNum, uint8 *dst) {
|
|||
WSAMovie_v2::WSAMovie_v2(KyraEngine_v1 *vm, Screen_v2 *screen) : WSAMovie_v1(vm), _screen(screen), _xAdd(0), _yAdd(0) {}
|
||||
|
||||
int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovie_v2::open('%s', %d, %p)", filename, unk1, (const void *)palBuf);
|
||||
close();
|
||||
|
||||
uint32 flags = 0;
|
||||
|
@ -457,7 +448,6 @@ int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) {
|
|||
}
|
||||
|
||||
void WSAMovie_v2::displayFrame(int frameNum, int pageNum, int x, int y, ...) {
|
||||
debugC(9, kDebugLevelMovie, "WSAMovie_v2::displayFrame(%d, %d, %d, %d,...)", frameNum, pageNum, x, y);
|
||||
if (frameNum >= _numFrames || frameNum < 0 || !_opened)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue