Implemented cmd_makeAmuletAppear.
svn-id: r19815
This commit is contained in:
parent
f241049961
commit
df493c63c4
3 changed files with 45 additions and 6 deletions
|
@ -712,6 +712,8 @@ protected:
|
|||
char **_roomFilenameTable;
|
||||
int _roomFilenameTableSize;
|
||||
|
||||
uint8 *_amuleteAnim;
|
||||
|
||||
Timer _timers[34];
|
||||
uint32 _timerNextRun;
|
||||
static const char *_xmidiFiles[];
|
||||
|
@ -724,7 +726,6 @@ protected:
|
|||
|
||||
static const uint16 _amuletX[];
|
||||
static const uint16 _amuletY[];
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace Kyra
|
||||
|
|
|
@ -1326,7 +1326,41 @@ int KyraEngine::cmd_drinkPotionAnimation(ScriptState *script) {
|
|||
}
|
||||
|
||||
int KyraEngine::cmd_makeAmuletAppear(ScriptState *script) {
|
||||
warning("STUB: cmd_makeAmuletAppear");
|
||||
debug(3, "cmd_makeAmuletAppear(0x%X) ()", script);
|
||||
WSAMovieV1 *amulet = wsa_open("AMULET.WSA", 1, 0);
|
||||
if (amulet) {
|
||||
assert(_amuleteAnim);
|
||||
_screen->hideMouse();
|
||||
// snd_kyraPlaySound(0x70);
|
||||
uint32 nextTime = 0;
|
||||
for (int i = 0; _amuleteAnim[i] != 0xFF; ++i) {
|
||||
nextTime = _system->getMillis() + 5 * _tickLength;
|
||||
|
||||
uint8 code = _amuleteAnim[i];
|
||||
if (code == 3 || code == 7) {
|
||||
// snd_kyraPlaySound(0x71);
|
||||
}
|
||||
|
||||
if (code == 5) {
|
||||
// snd_kyraPlaySound(0x72);
|
||||
}
|
||||
|
||||
if (code == 14) {
|
||||
// snd_kyraPlaySound(0x73);
|
||||
}
|
||||
|
||||
wsa_play(amulet, code, 224, 152, 0);
|
||||
_updateScreen = true;
|
||||
|
||||
while (_system->getMillis() < nextTime) {
|
||||
_sprites->updateSceneAnims();
|
||||
updateAllObjectShapes();
|
||||
}
|
||||
}
|
||||
_screen->showMouse();
|
||||
}
|
||||
wsa_close(amulet);
|
||||
setGameFlag(0x2D);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
namespace Kyra {
|
||||
|
||||
#define RESFILE_VERSION 4
|
||||
#define RESFILE_VERSION 5
|
||||
|
||||
#define GAME_FLAGS (GF_FLOPPY | GF_TALKIE | GF_DEMO | GF_AUDIOCD)
|
||||
#define LANGUAGE_FLAGS (GF_ENGLISH | GF_FRENCH | GF_GERMAN | GF_SPANISH | GF_LNGUNK)
|
||||
|
@ -194,6 +194,8 @@ void KyraEngine::res_loadResources(int type) {
|
|||
res_loadLangTable("PLACED.", &resFile, (byte***)&_placedList, &_placedList_Size, loadNativeLanguage);
|
||||
res_loadLangTable("DROPPED.", &resFile, (byte***)&_droppedList, &_droppedList_Size, loadNativeLanguage);
|
||||
res_loadLangTable("NODROP.", &resFile, (byte***)&_noDropList, &_noDropList_Size, loadNativeLanguage);
|
||||
|
||||
loadRawFile(resFile, "AMULETEANIM.SEQ", _amuleteAnim);
|
||||
}
|
||||
|
||||
#undef loadRooms
|
||||
|
@ -299,6 +301,9 @@ void KyraEngine::res_unloadResources(int type) {
|
|||
delete [] _noDropList;
|
||||
_noDropList_Size = 0;
|
||||
_noDropList = 0;
|
||||
|
||||
delete [] _amuleteAnim;
|
||||
_amuleteAnim = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -629,5 +634,4 @@ const int8 KyraEngine::_addYPosTable[] = {
|
|||
|
||||
const uint16 KyraEngine::_amuletX[] = { 231, 275, 253, 253 };
|
||||
const uint16 KyraEngine::_amuletY[] = { 170, 170, 159, 181 };
|
||||
|
||||
} // End of namespace Kyra
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue