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;
|
char **_roomFilenameTable;
|
||||||
int _roomFilenameTableSize;
|
int _roomFilenameTableSize;
|
||||||
|
|
||||||
|
uint8 *_amuleteAnim;
|
||||||
|
|
||||||
Timer _timers[34];
|
Timer _timers[34];
|
||||||
uint32 _timerNextRun;
|
uint32 _timerNextRun;
|
||||||
static const char *_xmidiFiles[];
|
static const char *_xmidiFiles[];
|
||||||
|
@ -724,7 +726,6 @@ protected:
|
||||||
|
|
||||||
static const uint16 _amuletX[];
|
static const uint16 _amuletX[];
|
||||||
static const uint16 _amuletY[];
|
static const uint16 _amuletY[];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Kyra
|
} // End of namespace Kyra
|
||||||
|
|
|
@ -1326,7 +1326,41 @@ int KyraEngine::cmd_drinkPotionAnimation(ScriptState *script) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int KyraEngine::cmd_makeAmuletAppear(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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
namespace Kyra {
|
namespace Kyra {
|
||||||
|
|
||||||
#define RESFILE_VERSION 4
|
#define RESFILE_VERSION 5
|
||||||
|
|
||||||
#define GAME_FLAGS (GF_FLOPPY | GF_TALKIE | GF_DEMO | GF_AUDIOCD)
|
#define GAME_FLAGS (GF_FLOPPY | GF_TALKIE | GF_DEMO | GF_AUDIOCD)
|
||||||
#define LANGUAGE_FLAGS (GF_ENGLISH | GF_FRENCH | GF_GERMAN | GF_SPANISH | GF_LNGUNK)
|
#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("PLACED.", &resFile, (byte***)&_placedList, &_placedList_Size, loadNativeLanguage);
|
||||||
res_loadLangTable("DROPPED.", &resFile, (byte***)&_droppedList, &_droppedList_Size, loadNativeLanguage);
|
res_loadLangTable("DROPPED.", &resFile, (byte***)&_droppedList, &_droppedList_Size, loadNativeLanguage);
|
||||||
res_loadLangTable("NODROP.", &resFile, (byte***)&_noDropList, &_noDropList_Size, loadNativeLanguage);
|
res_loadLangTable("NODROP.", &resFile, (byte***)&_noDropList, &_noDropList_Size, loadNativeLanguage);
|
||||||
|
|
||||||
|
loadRawFile(resFile, "AMULETEANIM.SEQ", _amuleteAnim);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef loadRooms
|
#undef loadRooms
|
||||||
|
@ -299,6 +301,9 @@ void KyraEngine::res_unloadResources(int type) {
|
||||||
delete [] _noDropList;
|
delete [] _noDropList;
|
||||||
_noDropList_Size = 0;
|
_noDropList_Size = 0;
|
||||||
_noDropList = 0;
|
_noDropList = 0;
|
||||||
|
|
||||||
|
delete [] _amuleteAnim;
|
||||||
|
_amuleteAnim = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,7 +632,6 @@ const int8 KyraEngine::_addYPosTable[] = {
|
||||||
0, -2, -2, -2, 0, 2, 2, 2
|
0, -2, -2, -2, 0, 2, 2, 2
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16 KyraEngine::_amuletX[] = {231, 275, 253, 253};
|
const uint16 KyraEngine::_amuletX[] = { 231, 275, 253, 253 };
|
||||||
const uint16 KyraEngine::_amuletY[] = {170, 170, 159, 181};
|
const uint16 KyraEngine::_amuletY[] = { 170, 170, 159, 181 };
|
||||||
|
|
||||||
} // End of namespace Kyra
|
} // End of namespace Kyra
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue