TOLTECS: Fix bugs
- Save scene parameters before playing a movie and restore them afterwards (fixes crash) - Fix text disappearing too fast - Implement script function sfGetCameraChanged - Replace nop script functions with stubs which print debug info when called - Some cleanup, remove obsolete TODOs
This commit is contained in:
parent
e1fefefff2
commit
acd4d4098f
13 changed files with 59 additions and 24 deletions
|
@ -147,7 +147,6 @@ void AnimationPlayer::saveState(Common::WriteStream *out) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationPlayer::loadState(Common::ReadStream *in) {
|
void AnimationPlayer::loadState(Common::ReadStream *in) {
|
||||||
|
|
||||||
_resIndex = in->readUint16LE();
|
_resIndex = in->readUint16LE();
|
||||||
_width = in->readUint16LE();
|
_width = in->readUint16LE();
|
||||||
_height = in->readUint16LE();
|
_height = in->readUint16LE();
|
||||||
|
@ -160,7 +159,6 @@ void AnimationPlayer::loadState(Common::ReadStream *in) {
|
||||||
_firstCurFrameSize = in->readUint32LE();
|
_firstCurFrameSize = in->readUint32LE();
|
||||||
_firstNextFrameSize = in->readUint32LE();
|
_firstNextFrameSize = in->readUint32LE();
|
||||||
_firstNextFrameOffset = in->readUint32LE();
|
_firstNextFrameOffset = in->readUint32LE();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of namespace Toltecs
|
} // End of namespace Toltecs
|
||||||
|
|
|
@ -94,7 +94,6 @@ protected:
|
||||||
struct Item {
|
struct Item {
|
||||||
Common::Rect rect;
|
Common::Rect rect;
|
||||||
ItemID id;
|
ItemID id;
|
||||||
//const byte *caption;
|
|
||||||
Common::String caption;
|
Common::String caption;
|
||||||
byte defaultColor, activeColor;
|
byte defaultColor, activeColor;
|
||||||
int x, y, w;
|
int x, y, w;
|
||||||
|
|
|
@ -41,7 +41,12 @@ MoviePlayer::~MoviePlayer() {
|
||||||
|
|
||||||
void MoviePlayer::playMovie(uint resIndex) {
|
void MoviePlayer::playMovie(uint resIndex) {
|
||||||
|
|
||||||
uint32 subtitleSlot;
|
const uint32 subtitleSlot = kMaxScriptSlots - 1;
|
||||||
|
int16 savedSceneWidth = _vm->_sceneWidth;
|
||||||
|
int16 savedSceneHeight = _vm->_sceneHeight;
|
||||||
|
int16 savedCameraHeight = _vm->_cameraHeight;
|
||||||
|
int16 savedCameraX = _vm->_cameraX;
|
||||||
|
int16 savedCameraY = _vm->_cameraY;
|
||||||
byte moviePalette[768];
|
byte moviePalette[768];
|
||||||
|
|
||||||
_vm->_isSaveAllowed = false;
|
_vm->_isSaveAllowed = false;
|
||||||
|
@ -53,8 +58,6 @@ void MoviePlayer::playMovie(uint resIndex) {
|
||||||
|
|
||||||
_vm->_arc->openResource(resIndex);
|
_vm->_arc->openResource(resIndex);
|
||||||
|
|
||||||
subtitleSlot = kMaxScriptSlots - 1;
|
|
||||||
|
|
||||||
_frameCount = _vm->_arc->readUint32LE();
|
_frameCount = _vm->_arc->readUint32LE();
|
||||||
_chunkCount = _vm->_arc->readUint32LE();
|
_chunkCount = _vm->_arc->readUint32LE();
|
||||||
|
|
||||||
|
@ -170,6 +173,12 @@ void MoviePlayer::playMovie(uint resIndex) {
|
||||||
|
|
||||||
debug(0, "playMovie() done");
|
debug(0, "playMovie() done");
|
||||||
|
|
||||||
|
_vm->_sceneWidth = savedSceneWidth;
|
||||||
|
_vm->_sceneHeight = savedSceneHeight;
|
||||||
|
_vm->_cameraHeight = savedCameraHeight;
|
||||||
|
_vm->_cameraX = savedCameraX;
|
||||||
|
_vm->_cameraY = savedCameraY;
|
||||||
|
|
||||||
_vm->_isSaveAllowed = true;
|
_vm->_isSaveAllowed = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -187,7 +196,7 @@ void MoviePlayer::fetchAudioChunks() {
|
||||||
byte chunkType = _vm->_arc->readByte();
|
byte chunkType = _vm->_arc->readByte();
|
||||||
uint32 chunkSize = _vm->_arc->readUint32LE();
|
uint32 chunkSize = _vm->_arc->readUint32LE();
|
||||||
if (chunkType == 4) {
|
if (chunkType == 4) {
|
||||||
byte *chunkBuffer = new byte[chunkSize];
|
byte *chunkBuffer = (byte*)malloc(chunkSize);
|
||||||
_vm->_arc->read(chunkBuffer, chunkSize);
|
_vm->_arc->read(chunkBuffer, chunkSize);
|
||||||
_audioStream->queueBuffer(chunkBuffer, chunkSize, DisposeAfterUse::YES, Audio::FLAG_UNSIGNED);
|
_audioStream->queueBuffer(chunkBuffer, chunkSize, DisposeAfterUse::YES, Audio::FLAG_UNSIGNED);
|
||||||
chunkBuffer = NULL;
|
chunkBuffer = NULL;
|
||||||
|
|
|
@ -73,7 +73,6 @@ void RenderQueue::addSprite(SpriteDrawItem &sprite) {
|
||||||
|
|
||||||
void RenderQueue::addText(int16 x, int16 y, byte color, uint fontResIndex, byte *text, int len) {
|
void RenderQueue::addText(int16 x, int16 y, byte color, uint fontResIndex, byte *text, int len) {
|
||||||
|
|
||||||
// TODO: Font caching?
|
|
||||||
Font font(_vm->_res->load(fontResIndex)->data);
|
Font font(_vm->_res->load(fontResIndex)->data);
|
||||||
|
|
||||||
RenderQueueItem item;
|
RenderQueueItem item;
|
||||||
|
@ -248,8 +247,6 @@ RenderQueueItem *RenderQueue::findItemInQueue(RenderQueueArray *queue, const Ren
|
||||||
|
|
||||||
bool RenderQueue::hasItemChanged(const RenderQueueItem &item1, const RenderQueueItem &item2) {
|
bool RenderQueue::hasItemChanged(const RenderQueueItem &item1, const RenderQueueItem &item2) {
|
||||||
|
|
||||||
// TODO: Clean up.
|
|
||||||
|
|
||||||
if (item1.type != item1.type)
|
if (item1.type != item1.type)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,6 @@ uint32 ArchiveReader::openResource(uint resIndex) {
|
||||||
void ArchiveReader::closeResource() {
|
void ArchiveReader::closeResource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32 ArchiveReader::getResourceSize(uint resIndex) {
|
uint32 ArchiveReader::getResourceSize(uint resIndex) {
|
||||||
return _offsets[resIndex + 1] - _offsets[resIndex];
|
return _offsets[resIndex + 1] - _offsets[resIndex];
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
namespace Toltecs {
|
namespace Toltecs {
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
- Saveload is working so far but only one slot is supported until the game menu is implemented
|
|
||||||
- Save with F7; Load with F9
|
- Save with F7; Load with F9
|
||||||
- Saving during an animation (AnimationPlayer) is not working correctly yet
|
- Saving during an animation (AnimationPlayer) is not working correctly yet
|
||||||
- Maybe switch to SCUMM/Tinsel serialization approach?
|
- Maybe switch to SCUMM/Tinsel serialization approach?
|
||||||
|
|
|
@ -125,7 +125,7 @@ void Screen::drawGuiImage(int16 x, int16 y, uint resIndex) {
|
||||||
int16 height = imageData[3];
|
int16 height = imageData[3];
|
||||||
int16 workWidth = width, workHeight = height;
|
int16 workWidth = width, workHeight = height;
|
||||||
imageData += headerSize;
|
imageData += headerSize;
|
||||||
|
|
||||||
byte *dest = _frontScreen + x + (y + _vm->_cameraHeight) * 640;
|
byte *dest = _frontScreen + x + (y + _vm->_cameraHeight) * 640;
|
||||||
|
|
||||||
//debug(0, "Screen::drawGuiImage() x = %d; y = %d; w = %d; h = %d; resIndex = %d", x, y, width, height, resIndex);
|
//debug(0, "Screen::drawGuiImage() x = %d; y = %d; w = %d; h = %d; resIndex = %d", x, y, width, height, resIndex);
|
||||||
|
@ -444,9 +444,8 @@ void Screen::updateTalkText(int16 slotIndex, int16 slotOffset) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int16 textDurationMultiplier = item->duration + 8;
|
int16 textDurationMultiplier = item->duration + 8;
|
||||||
// TODO: Check sound/text flags
|
if (_vm->_doSpeech && *textData == 0xFE) {
|
||||||
if (*textData == 0xFE) {
|
textDurationMultiplier += 100;
|
||||||
//textDurationMultiplier += 100;
|
|
||||||
}
|
}
|
||||||
item->duration = 4 * textDurationMultiplier * durationModifier;
|
item->duration = 4 * textDurationMultiplier * durationModifier;
|
||||||
|
|
||||||
|
@ -478,7 +477,8 @@ void Screen::addTalkTextItemsToRenderQueue() {
|
||||||
if (item->fontNum == -1 || item->duration == 0)
|
if (item->fontNum == -1 || item->duration == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
item->duration -= _vm->_counter01;
|
//item->duration -= _vm->_counter01;
|
||||||
|
item->duration--;
|
||||||
if (item->duration < 0)
|
if (item->duration < 0)
|
||||||
item->duration = 0;
|
item->duration = 0;
|
||||||
|
|
||||||
|
|
|
@ -66,71 +66,85 @@ typedef Common::Functor0Mem<void, ScriptInterpreter> ScriptFunctionF;
|
||||||
_scriptFuncNames.push_back(#x);
|
_scriptFuncNames.push_back(#x);
|
||||||
void ScriptInterpreter::setupScriptFunctions() {
|
void ScriptInterpreter::setupScriptFunctions() {
|
||||||
|
|
||||||
|
// 0
|
||||||
RegisterScriptFunction(sfNop);
|
RegisterScriptFunction(sfNop);
|
||||||
RegisterScriptFunction(sfNop);
|
RegisterScriptFunction(sfNop);
|
||||||
RegisterScriptFunction(sfGetGameVar);
|
RegisterScriptFunction(sfGetGameVar);
|
||||||
RegisterScriptFunction(sfSetGameVar);
|
RegisterScriptFunction(sfSetGameVar);
|
||||||
RegisterScriptFunction(sfUpdateScreen);
|
RegisterScriptFunction(sfUpdateScreen);
|
||||||
|
// 5
|
||||||
RegisterScriptFunction(sfGetRandomNumber);
|
RegisterScriptFunction(sfGetRandomNumber);
|
||||||
RegisterScriptFunction(sfDrawGuiTextMulti);
|
RegisterScriptFunction(sfDrawGuiTextMulti);
|
||||||
RegisterScriptFunction(sfUpdateVerbLine);
|
RegisterScriptFunction(sfUpdateVerbLine);
|
||||||
RegisterScriptFunction(sfSetFontColor);
|
RegisterScriptFunction(sfSetFontColor);
|
||||||
RegisterScriptFunction(sfGetTalkTextDuration);
|
RegisterScriptFunction(sfGetTalkTextDuration);
|
||||||
|
// 10
|
||||||
RegisterScriptFunction(sfTalk);
|
RegisterScriptFunction(sfTalk);
|
||||||
RegisterScriptFunction(sfFindPaletteFragment);
|
RegisterScriptFunction(sfFindPaletteFragment);
|
||||||
RegisterScriptFunction(sfClearPaletteFragments);
|
RegisterScriptFunction(sfClearPaletteFragments);
|
||||||
RegisterScriptFunction(sfAddPaletteFragment);
|
RegisterScriptFunction(sfAddPaletteFragment);
|
||||||
RegisterScriptFunction(sfSetDeltaAnimPalette);
|
RegisterScriptFunction(sfSetDeltaAnimPalette);
|
||||||
RegisterScriptFunction(sfNop); // TODO
|
// 15
|
||||||
|
RegisterScriptFunction(sfSetUnkPaletteEffect);
|
||||||
RegisterScriptFunction(sfBuildColorTransTable);
|
RegisterScriptFunction(sfBuildColorTransTable);
|
||||||
RegisterScriptFunction(sfSetDeltaMainPalette);
|
RegisterScriptFunction(sfSetDeltaMainPalette);
|
||||||
RegisterScriptFunction(sfLoadScript);
|
RegisterScriptFunction(sfLoadScript);
|
||||||
RegisterScriptFunction(sfRegisterFont);
|
RegisterScriptFunction(sfRegisterFont);
|
||||||
|
// 20
|
||||||
RegisterScriptFunction(sfLoadAddPalette);
|
RegisterScriptFunction(sfLoadAddPalette);
|
||||||
RegisterScriptFunction(sfLoadScene);
|
RegisterScriptFunction(sfLoadScene);
|
||||||
RegisterScriptFunction(sfSetGuiHeight);
|
RegisterScriptFunction(sfSetGuiHeight);
|
||||||
RegisterScriptFunction(sfFindMouseInRectIndex1);
|
RegisterScriptFunction(sfFindMouseInRectIndex1);
|
||||||
RegisterScriptFunction(sfFindMouseInRectIndex2);
|
RegisterScriptFunction(sfFindMouseInRectIndex2);
|
||||||
|
// 25
|
||||||
RegisterScriptFunction(sfDrawGuiImage);
|
RegisterScriptFunction(sfDrawGuiImage);
|
||||||
RegisterScriptFunction(sfAddAnimatedSpriteNoLoop);
|
RegisterScriptFunction(sfAddAnimatedSpriteNoLoop);
|
||||||
RegisterScriptFunction(sfAddAnimatedSprite);
|
RegisterScriptFunction(sfAddAnimatedSprite);
|
||||||
RegisterScriptFunction(sfAddStaticSprite);
|
RegisterScriptFunction(sfAddStaticSprite);
|
||||||
RegisterScriptFunction(sfAddAnimatedSpriteScaled);
|
RegisterScriptFunction(sfAddAnimatedSpriteScaled);
|
||||||
|
// 30
|
||||||
RegisterScriptFunction(sfFindPath);
|
RegisterScriptFunction(sfFindPath);
|
||||||
RegisterScriptFunction(sfWalk);
|
RegisterScriptFunction(sfWalk);
|
||||||
RegisterScriptFunction(sfScrollCameraUp);
|
RegisterScriptFunction(sfScrollCameraUp);
|
||||||
RegisterScriptFunction(sfScrollCameraDown);
|
RegisterScriptFunction(sfScrollCameraDown);
|
||||||
RegisterScriptFunction(sfScrollCameraLeft);
|
RegisterScriptFunction(sfScrollCameraLeft);
|
||||||
|
// 35
|
||||||
RegisterScriptFunction(sfScrollCameraRight);
|
RegisterScriptFunction(sfScrollCameraRight);
|
||||||
RegisterScriptFunction(sfScrollCameraUpEx);
|
RegisterScriptFunction(sfScrollCameraUpEx);
|
||||||
RegisterScriptFunction(sfScrollCameraDownEx);
|
RegisterScriptFunction(sfScrollCameraDownEx);
|
||||||
RegisterScriptFunction(sfScrollCameraLeftEx);
|
RegisterScriptFunction(sfScrollCameraLeftEx);
|
||||||
RegisterScriptFunction(sfScrollCameraRightEx);
|
RegisterScriptFunction(sfScrollCameraRightEx);
|
||||||
|
// 40
|
||||||
RegisterScriptFunction(sfSetCamera);
|
RegisterScriptFunction(sfSetCamera);
|
||||||
RegisterScriptFunction(sfNop); // TODO
|
RegisterScriptFunction(sfGetCameraChanged);
|
||||||
RegisterScriptFunction(sfGetRgbModifiertAtPoint);
|
RegisterScriptFunction(sfGetRgbModifiertAtPoint);
|
||||||
RegisterScriptFunction(sfStartAnim);
|
RegisterScriptFunction(sfStartAnim);
|
||||||
RegisterScriptFunction(sfAnimNextFrame);
|
RegisterScriptFunction(sfAnimNextFrame);
|
||||||
|
// 45
|
||||||
RegisterScriptFunction(sfNop);
|
RegisterScriptFunction(sfNop);
|
||||||
RegisterScriptFunction(sfGetAnimFrameNumber);
|
RegisterScriptFunction(sfGetAnimFrameNumber);
|
||||||
RegisterScriptFunction(sfGetAnimStatus);
|
RegisterScriptFunction(sfGetAnimStatus);
|
||||||
RegisterScriptFunction(sfStartShakeScreen);
|
RegisterScriptFunction(sfStartShakeScreen);
|
||||||
RegisterScriptFunction(sfStopShakeScreen);
|
RegisterScriptFunction(sfStopShakeScreen);
|
||||||
|
// 50
|
||||||
RegisterScriptFunction(sfStartSequence);
|
RegisterScriptFunction(sfStartSequence);
|
||||||
RegisterScriptFunction(sfEndSequence);
|
RegisterScriptFunction(sfEndSequence);
|
||||||
RegisterScriptFunction(sfSetSequenceVolume);
|
RegisterScriptFunction(sfSetSequenceVolume);
|
||||||
RegisterScriptFunction(sfPlayPositionalSound);
|
RegisterScriptFunction(sfPlayPositionalSound);
|
||||||
RegisterScriptFunction(sfPlaySound2);
|
RegisterScriptFunction(sfPlaySound2);
|
||||||
|
// 55
|
||||||
RegisterScriptFunction(sfClearScreen);
|
RegisterScriptFunction(sfClearScreen);
|
||||||
RegisterScriptFunction(sfNop);
|
RegisterScriptFunction(sfNop);
|
||||||
RegisterScriptFunction(sfHandleInput);
|
RegisterScriptFunction(sfHandleInput);
|
||||||
RegisterScriptFunction(sfRunOptionsScreen);
|
RegisterScriptFunction(sfRunOptionsScreen);
|
||||||
RegisterScriptFunction(sfPrecacheSprites);
|
RegisterScriptFunction(sfPrecacheSprites);
|
||||||
|
// 60
|
||||||
RegisterScriptFunction(sfPrecacheSounds1);
|
RegisterScriptFunction(sfPrecacheSounds1);
|
||||||
RegisterScriptFunction(sfDeletePrecachedFiles);
|
RegisterScriptFunction(sfDeletePrecachedFiles);
|
||||||
RegisterScriptFunction(sfPrecacheSounds2);
|
RegisterScriptFunction(sfPrecacheSounds2);
|
||||||
RegisterScriptFunction(sfRestoreStackPtr);
|
RegisterScriptFunction(sfRestoreStackPtr);
|
||||||
RegisterScriptFunction(sfSaveStackPtr);
|
RegisterScriptFunction(sfSaveStackPtr);
|
||||||
|
// 65
|
||||||
RegisterScriptFunction(sfPlayMovie);
|
RegisterScriptFunction(sfPlayMovie);
|
||||||
RegisterScriptFunction(sfNop);
|
RegisterScriptFunction(sfNop);
|
||||||
|
|
||||||
|
@ -849,6 +863,11 @@ void ScriptInterpreter::sfSetDeltaAnimPalette() {
|
||||||
_vm->_palette->setDeltaPalette(_vm->_palette->getAnimPalette(), arg8(6), (char)arg8(5), arg8(4), arg8(3));
|
_vm->_palette->setDeltaPalette(_vm->_palette->getAnimPalette(), arg8(6), (char)arg8(5), arg8(4), arg8(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptInterpreter::sfSetUnkPaletteEffect() {
|
||||||
|
// TODO
|
||||||
|
debug("ScriptInterpreter::sfSetUnkPaletteEffect");
|
||||||
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfBuildColorTransTable() {
|
void ScriptInterpreter::sfBuildColorTransTable() {
|
||||||
_vm->_palette->buildColorTransTable(arg8(4), (char)arg8(3), arg8(5));
|
_vm->_palette->buildColorTransTable(arg8(4), (char)arg8(3), arg8(5));
|
||||||
}
|
}
|
||||||
|
@ -977,6 +996,10 @@ void ScriptInterpreter::sfSetCamera() {
|
||||||
_vm->setCamera(arg16(5), arg16(3));
|
_vm->setCamera(arg16(5), arg16(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptInterpreter::sfGetCameraChanged() {
|
||||||
|
localWrite16(arg16(3), _vm->getCameraChanged() ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfGetRgbModifiertAtPoint() {
|
void ScriptInterpreter::sfGetRgbModifiertAtPoint() {
|
||||||
byte *rgb = getSlotData(arg16(11)) + arg16(9);
|
byte *rgb = getSlotData(arg16(11)) + arg16(9);
|
||||||
_vm->_segmap->getRgbModifiertAtPoint(arg16(5), arg16(3), arg16(7), rgb[0], rgb[1], rgb[2]);
|
_vm->_segmap->getRgbModifiertAtPoint(arg16(5), arg16(3), arg16(7), rgb[0], rgb[1], rgb[2]);
|
||||||
|
@ -1012,15 +1035,21 @@ void ScriptInterpreter::sfStopShakeScreen() {
|
||||||
|
|
||||||
void ScriptInterpreter::sfStartSequence() {
|
void ScriptInterpreter::sfStartSequence() {
|
||||||
// TODO
|
// TODO
|
||||||
//_vm->_arc->dump(arg16(3));
|
// DEBUG: Dump music so we know what's in there
|
||||||
|
int16 sequenceResIndex = arg16(3);
|
||||||
|
debug("ScriptInterpreter::sfStartSequence(%d)", sequenceResIndex);
|
||||||
|
if (sequenceResIndex >= 0)
|
||||||
|
_vm->_arc->dump(sequenceResIndex, "music");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfEndSequence() {
|
void ScriptInterpreter::sfEndSequence() {
|
||||||
// TODO
|
// TODO
|
||||||
|
debug("ScriptInterpreter::sfEndSequence");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfSetSequenceVolume() {
|
void ScriptInterpreter::sfSetSequenceVolume() {
|
||||||
// TODO
|
// TODO
|
||||||
|
//debug("ScriptInterpreter::sfSetSequenceVolume");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfPlayPositionalSound() {
|
void ScriptInterpreter::sfPlayPositionalSound() {
|
||||||
|
@ -1033,6 +1062,7 @@ void ScriptInterpreter::sfPlaySound2() {
|
||||||
|
|
||||||
void ScriptInterpreter::sfClearScreen() {
|
void ScriptInterpreter::sfClearScreen() {
|
||||||
// TODO
|
// TODO
|
||||||
|
debug("ScriptInterpreter::sfClearScreen");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptInterpreter::sfHandleInput() {
|
void ScriptInterpreter::sfHandleInput() {
|
||||||
|
|
|
@ -126,6 +126,7 @@ protected:
|
||||||
void sfClearPaletteFragments();
|
void sfClearPaletteFragments();
|
||||||
void sfAddPaletteFragment();
|
void sfAddPaletteFragment();
|
||||||
void sfSetDeltaAnimPalette();
|
void sfSetDeltaAnimPalette();
|
||||||
|
void sfSetUnkPaletteEffect();
|
||||||
void sfBuildColorTransTable();
|
void sfBuildColorTransTable();
|
||||||
void sfSetDeltaMainPalette();
|
void sfSetDeltaMainPalette();
|
||||||
void sfLoadScript();
|
void sfLoadScript();
|
||||||
|
@ -151,6 +152,7 @@ protected:
|
||||||
void sfScrollCameraLeftEx();
|
void sfScrollCameraLeftEx();
|
||||||
void sfScrollCameraRightEx();
|
void sfScrollCameraRightEx();
|
||||||
void sfSetCamera();
|
void sfSetCamera();
|
||||||
|
void sfGetCameraChanged();
|
||||||
void sfGetRgbModifiertAtPoint();
|
void sfGetRgbModifiertAtPoint();
|
||||||
void sfStartAnim();
|
void sfStartAnim();
|
||||||
void sfAnimNextFrame();
|
void sfAnimNextFrame();
|
||||||
|
|
|
@ -36,8 +36,6 @@ SegmentMap::~SegmentMap() {
|
||||||
|
|
||||||
void SegmentMap::load(byte *source) {
|
void SegmentMap::load(byte *source) {
|
||||||
|
|
||||||
// TODO: Use MemoryReadStream
|
|
||||||
|
|
||||||
freeSegmapMaskRectSurfaces();
|
freeSegmapMaskRectSurfaces();
|
||||||
_maskRects.clear();
|
_maskRects.clear();
|
||||||
_pathRects.clear();
|
_pathRects.clear();
|
||||||
|
|
|
@ -51,7 +51,7 @@ void Sound::playSound(int16 resIndex, int16 type, int16 volume) {
|
||||||
|
|
||||||
// TODO: Use the right volumes
|
// TODO: Use the right volumes
|
||||||
|
|
||||||
debug("playSound(%d, %d, %d)", resIndex, type, volume);
|
debug(0, "playSound(%d, %d, %d)", resIndex, type, volume);
|
||||||
|
|
||||||
if (volume == -1 || type == -2) {
|
if (volume == -1 || type == -2) {
|
||||||
if (type == kChannelTypeBackground) {
|
if (type == kChannelTypeBackground) {
|
||||||
|
|
|
@ -214,7 +214,6 @@ void ToltecsEngine::requestLoadgame(int slotNum) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToltecsEngine::loadScene(uint resIndex) {
|
void ToltecsEngine::loadScene(uint resIndex) {
|
||||||
// TODO
|
|
||||||
|
|
||||||
Resource *sceneResource = _res->load(resIndex);
|
Resource *sceneResource = _res->load(resIndex);
|
||||||
byte *scene = sceneResource->data;
|
byte *scene = sceneResource->data;
|
||||||
|
@ -431,6 +430,10 @@ void ToltecsEngine::setCamera(int16 x, int16 y) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ToltecsEngine::getCameraChanged() {
|
||||||
|
return _cameraX != _newCameraX || _cameraY != _newCameraY;
|
||||||
|
}
|
||||||
|
|
||||||
void ToltecsEngine::scrollCameraUp(int16 delta) {
|
void ToltecsEngine::scrollCameraUp(int16 delta) {
|
||||||
if (_newCameraY > 0) {
|
if (_newCameraY > 0) {
|
||||||
if (_newCameraY < delta)
|
if (_newCameraY < delta)
|
||||||
|
|
|
@ -112,6 +112,7 @@ public:
|
||||||
void setGuiHeight(int16 guiHeight);
|
void setGuiHeight(int16 guiHeight);
|
||||||
|
|
||||||
void setCamera(int16 x, int16 y);
|
void setCamera(int16 x, int16 y);
|
||||||
|
bool getCameraChanged();
|
||||||
void scrollCameraUp(int16 delta);
|
void scrollCameraUp(int16 delta);
|
||||||
void scrollCameraDown(int16 delta);
|
void scrollCameraDown(int16 delta);
|
||||||
void scrollCameraLeft(int16 delta);
|
void scrollCameraLeft(int16 delta);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue