aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-11 23:16:50 +0000
committerJohannes Schickel2008-05-11 23:16:50 +0000
commitbb035967442df0f9cb7de3e3da3d73ce2f4ce5d2 (patch)
treea27c1f8806b2b17ed04041677e4d167fd5beb22a /engines/kyra
parentea301f9c7bbf02e0fc67fbc1447aac5a489db70b (diff)
downloadscummvm-rg350-bb035967442df0f9cb7de3e3da3d73ce2f4ce5d2.tar.gz
scummvm-rg350-bb035967442df0f9cb7de3e3da3d73ce2f4ce5d2.tar.bz2
scummvm-rg350-bb035967442df0f9cb7de3e3da3d73ce2f4ce5d2.zip
- Renamed KyraEngine to KyraEngine_v1
- kyra.* -> kyra_v1.* - scene.cpp -> scene_v1.cpp svn-id: r32044
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/debugger.cpp2
-rw-r--r--engines/kyra/debugger.h6
-rw-r--r--engines/kyra/detection.cpp6
-rw-r--r--engines/kyra/gui.cpp4
-rw-r--r--engines/kyra/gui.h10
-rw-r--r--engines/kyra/gui_hof.cpp18
-rw-r--r--engines/kyra/gui_lok.cpp2
-rw-r--r--engines/kyra/gui_mr.cpp10
-rw-r--r--engines/kyra/gui_v2.cpp2
-rw-r--r--engines/kyra/kyra_hof.cpp12
-rw-r--r--engines/kyra/kyra_lok.cpp10
-rw-r--r--engines/kyra/kyra_lok.h8
-rw-r--r--engines/kyra/kyra_mr.cpp12
-rw-r--r--engines/kyra/kyra_v1.cpp (renamed from engines/kyra/kyra.cpp)44
-rw-r--r--engines/kyra/kyra_v1.h (renamed from engines/kyra/kyra.h)10
-rw-r--r--engines/kyra/kyra_v2.cpp2
-rw-r--r--engines/kyra/kyra_v2.h4
-rw-r--r--engines/kyra/module.mk4
-rw-r--r--engines/kyra/resource.cpp2
-rw-r--r--engines/kyra/resource.h10
-rw-r--r--engines/kyra/saveload.cpp18
-rw-r--r--engines/kyra/scene_lok.cpp2
-rw-r--r--engines/kyra/scene_v1.cpp (renamed from engines/kyra/scene.cpp)26
-rw-r--r--engines/kyra/scene_v2.cpp2
-rw-r--r--engines/kyra/screen.cpp6
-rw-r--r--engines/kyra/screen.h6
-rw-r--r--engines/kyra/screen_v2.cpp2
-rw-r--r--engines/kyra/screen_v2.h2
-rw-r--r--engines/kyra/script.cpp4
-rw-r--r--engines/kyra/script.h7
-rw-r--r--engines/kyra/script_tim.cpp2
-rw-r--r--engines/kyra/script_tim.h6
-rw-r--r--engines/kyra/sequences_hof.cpp2
-rw-r--r--engines/kyra/sound.cpp24
-rw-r--r--engines/kyra/sound.h16
-rw-r--r--engines/kyra/sound_adlib.cpp2
-rw-r--r--engines/kyra/sound_lok.cpp4
-rw-r--r--engines/kyra/sound_towns.cpp4
-rw-r--r--engines/kyra/staticres.cpp6
-rw-r--r--engines/kyra/text.cpp4
-rw-r--r--engines/kyra/text.h6
-rw-r--r--engines/kyra/timer.cpp4
-rw-r--r--engines/kyra/timer.h6
-rw-r--r--engines/kyra/timer_lok.cpp2
-rw-r--r--engines/kyra/vqa.cpp2
-rw-r--r--engines/kyra/vqa.h6
-rw-r--r--engines/kyra/wsamovie.cpp8
-rw-r--r--engines/kyra/wsamovie.h12
48 files changed, 185 insertions, 184 deletions
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 932f5aa7dd..0d170dbf05 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -36,7 +36,7 @@
namespace Kyra {
-Debugger::Debugger(KyraEngine *vm)
+Debugger::Debugger(KyraEngine_v1 *vm)
: ::GUI::Debugger() {
_vm = vm;
diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h
index 7b1d870daa..7cdfa26e93 100644
--- a/engines/kyra/debugger.h
+++ b/engines/kyra/debugger.h
@@ -30,18 +30,18 @@
namespace Kyra {
-class KyraEngine;
+class KyraEngine_v1;
class KyraEngine_LoK;
class KyraEngine_v2;
class KyraEngine_HoF;
class Debugger : public ::GUI::Debugger {
public:
- Debugger(KyraEngine *vm);
+ Debugger(KyraEngine_v1 *vm);
virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
protected:
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
bool cmd_setScreenDebug(int argc, const char **argv);
bool cmd_loadPalette(int argc, const char **argv);
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 2b272fd7d7..6a11ca9a34 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -22,7 +22,7 @@
* $Id$
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_lok.h"
#include "kyra/kyra_hof.h"
#include "kyra/kyra_mr.h"
@@ -524,7 +524,7 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common
SaveStateList KyraMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Kyra::KyraEngine::SaveHeader header;
+ Kyra::KyraEngine_v1::SaveHeader header;
Common::String pattern = target;
pattern += ".???";
@@ -540,7 +540,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const {
if (slotNum >= 0 && slotNum <= 999) {
Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str());
if (in) {
- if (Kyra::KyraEngine::readSaveHeader(in, header) == Kyra::KyraEngine::kRSHENoError)
+ if (Kyra::KyraEngine_v1::readSaveHeader(in, header) == Kyra::KyraEngine_v1::kRSHENoError)
saveList.push_back(SaveStateDescriptor(slotNum, header.description, *file));
delete in;
}
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index 407be7a73a..96ea233025 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -33,7 +33,7 @@
namespace Kyra {
-GUI::GUI(KyraEngine *kyra)
+GUI::GUI(KyraEngine_v1 *kyra)
: _vm(kyra), _screen(kyra->screen()), _text(kyra->text()) {
_menuButtonList = 0;
@@ -339,7 +339,7 @@ int GUI::getNextSavegameSlot() {
#pragma mark -
-MainMenu::MainMenu(KyraEngine *vm) : _vm(vm), _screen(0) {
+MainMenu::MainMenu(KyraEngine_v1 *vm) : _vm(vm), _screen(0) {
_screen = _vm->screen();
_nextUpdate = 0;
_system = g_system;
diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h
index 8023cc4810..1361bdb399 100644
--- a/engines/kyra/gui.h
+++ b/engines/kyra/gui.h
@@ -26,7 +26,7 @@
#ifndef KYRA_GUI_H
#define KYRA_GUI_H
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "common/ptr.h"
#include "common/array.h"
@@ -135,7 +135,7 @@ class TextDisplayer;
class GUI {
public:
- GUI(KyraEngine *vm);
+ GUI(KyraEngine_v1 *vm);
virtual ~GUI() {}
// button specific
@@ -154,7 +154,7 @@ public:
void processHighlights(Menu &menu, int mouseX, int mouseY);
protected:
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
Screen *_screen;
TextDisplayer *_text;
@@ -196,7 +196,7 @@ class Movie;
class MainMenu {
public:
- MainMenu(KyraEngine *vm);
+ MainMenu(KyraEngine_v1 *vm);
virtual ~MainMenu() {}
struct Animation {
@@ -219,7 +219,7 @@ public:
void init(StaticData data, Animation anim);
int handle(int dim);
private:
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
Screen *_screen;
OSystem *_system;
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index 12e4065ec6..d60b353de3 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -23,7 +23,7 @@
*
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_hof.h"
#include "kyra/screen.h"
#include "kyra/wsamovie.h"
@@ -827,10 +827,10 @@ void GUI_HoF::drawSliderBar(int slider, const uint8 *shape) {
int position = 0;
if (_vm->gameFlags().isTalkie) {
- position = _vm->getVolume(KyraEngine::kVolumeEntry(slider));
+ position = _vm->getVolume(KyraEngine_v1::kVolumeEntry(slider));
} else {
if (slider < 2)
- position = _vm->getVolume(KyraEngine::kVolumeEntry(slider));
+ position = _vm->getVolume(KyraEngine_v1::kVolumeEntry(slider));
else if (slider == 2)
position = (_vm->_configWalkspeed == 3) ? 97 : 2;
else if (slider == 3)
@@ -900,7 +900,7 @@ int GUI_HoF::audioOptions(Button *caller) {
restorePage1(_vm->_screenBuffer);
backUpPage1(_vm->_screenBuffer);
- if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine::kVolumeSpeech) == 2)) {
+ if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine_v1::kVolumeSpeech) == 2)) {
_vm->_configVoice = 0;
choiceDialog(0x1D, 0);
}
@@ -978,7 +978,7 @@ int GUI_HoF::gameOptionsTalkie(Button *caller) {
if (textEnabled && !_vm->textEnabled() && !_vm->speechEnabled()) {
_vm->_configVoice = 1;
- _vm->setVolume(KyraEngine::kVolumeSpeech, 75);
+ _vm->setVolume(KyraEngine_v1::kVolumeSpeech, 75);
choiceDialog(0x1E, 0);
}
@@ -1054,10 +1054,10 @@ int GUI_HoF::sliderHandler(Button *caller) {
int oldVolume = 0;
if (_vm->gameFlags().isTalkie) {
- oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button));
+ oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button));
} else {
if (button < 2)
- oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button));
+ oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button));
else if (button == 2)
oldVolume = (_vm->_configWalkspeed == 3) ? 97 : 2;
else if (button == 3)
@@ -1092,7 +1092,7 @@ int GUI_HoF::sliderHandler(Button *caller) {
_vm->_configVoice = 1;
}
- _vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume);
+ _vm->setVolume(KyraEngine_v1::kVolumeEntry(button), newVolume);
switch (button) {
case 0:
@@ -1112,7 +1112,7 @@ int GUI_HoF::sliderHandler(Button *caller) {
}
} else {
if (button < 2) {
- _vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume);
+ _vm->setVolume(KyraEngine_v1::kVolumeEntry(button), newVolume);
if (button == 0)
lastMusicCommand = _vm->_lastMusicCommand;
else
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index 844574c5be..feacde683c 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -544,7 +544,7 @@ void GUI_LoK::setupSavegames(Menu &menu, int num) {
for (int i = startSlot; i < num; ++i)
menu.item[i].enabled = 0;
- KyraEngine::SaveHeader header;
+ KyraEngine_v1::SaveHeader header;
for (int i = startSlot; i < num && uint(_savegameOffset + i) < _saveSlots.size(); i++) {
if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i + _savegameOffset]), header))) {
strncpy(savenames[i], header.description.c_str(), 31);
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index 74f6451e28..d0a39df0b2 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -1444,7 +1444,7 @@ int GUI_MR::gameOptions(Button *caller) {
if (textEnabled && !_vm->textEnabled() && !_vm->speechEnabled()) {
_vm->_configVoice = 1;
- _vm->setVolume(KyraEngine::kVolumeSpeech, 75);
+ _vm->setVolume(KyraEngine_v1::kVolumeSpeech, 75);
choiceDialog(0x1E, 0);
}
@@ -1597,7 +1597,7 @@ int GUI_MR::audioOptions(Button *caller) {
restorePage1(_vm->_screenBuffer);
backUpPage1(_vm->_screenBuffer);
- if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine::kVolumeSpeech) == 2)) {
+ if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine_v1::kVolumeSpeech) == 2)) {
_vm->_configVoice = 0;
choiceDialog(0x1D, 0);
}
@@ -1620,7 +1620,7 @@ int GUI_MR::sliderHandler(Button *caller) {
assert(button >= 0 && button <= 3);
- int oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button));
+ int oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button));
int newVolume = oldVolume;
if (caller->index >= 24 && caller->index <= 27)
@@ -1648,7 +1648,7 @@ int GUI_MR::sliderHandler(Button *caller) {
_vm->_configVoice = 1;
}
- _vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume);
+ _vm->setVolume(KyraEngine_v1::kVolumeEntry(button), newVolume);
switch (button) {
case 0:
@@ -1685,7 +1685,7 @@ void GUI_MR::drawSliderBar(int slider, const uint8 *shape) {
int x = menuX + _sliderBarsPosition[slider*2+0] + 10;
int y = menuY + _sliderBarsPosition[slider*2+1];
- int position = _vm->getVolume(KyraEngine::kVolumeEntry(slider));
+ int position = _vm->getVolume(KyraEngine_v1::kVolumeEntry(slider));
position = MAX(2, position);
position = MIN(97, position);
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 6ee6b1e4a5..2819c4f077 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -451,7 +451,7 @@ void GUI_v2::setupSavegameNames(Menu &menu, int num) {
if (_isSaveMenu && _savegameOffset == 0)
startSlot = 1;
- KyraEngine::SaveHeader header;
+ KyraEngine_v1::SaveHeader header;
Common::InSaveFile *in;
for (int i = startSlot; i < num && uint(_savegameOffset + i) < _saveSlots.size(); ++i) {
if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i + _savegameOffset]), header)) != 0) {
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 5a2d36d612..f1b74a7bdb 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -23,7 +23,7 @@
*
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_hof.h"
#include "kyra/screen.h"
#include "kyra/resource.h"
@@ -182,7 +182,7 @@ int KyraEngine_HoF::init() {
assert(_screen);
_screen->setResolution();
- KyraEngine::init();
+ KyraEngine_v1::init();
initStaticResource();
_debugger = new Debugger_HoF(this);
@@ -1526,7 +1526,7 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
else if (_flags.platform == Common::kPlatformPC)
// TODO ?? Maybe there is a way to let users select whether they want
// voc, midi or adl sfx (even though it makes no sense to choose anything but voc).
- KyraEngine::snd_playSoundEffect(track);
+ KyraEngine_v1::snd_playSoundEffect(track);
}
#pragma mark -
@@ -1954,7 +1954,7 @@ void KyraEngine_HoF::playTim(const char *filename) {
#pragma mark -
void KyraEngine_HoF::registerDefaultSettings() {
- KyraEngine::registerDefaultSettings();
+ KyraEngine_v1::registerDefaultSettings();
// Most settings already have sensible defaults. This one, however, is
// specific to the Kyra engine.
@@ -1985,13 +1985,13 @@ void KyraEngine_HoF::writeSettings() {
ConfMan.set("language", Common::getLanguageCode(_flags.lang));
- KyraEngine::writeSettings();
+ KyraEngine_v1::writeSettings();
}
void KyraEngine_HoF::readSettings() {
int talkspeed = ConfMan.getInt("talkspeed");
_configTextspeed = (talkspeed*95)/255 + 2;
- KyraEngine::readSettings();
+ KyraEngine_v1::readSettings();
}
} // end of namespace Kyra
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 175a635157..6ab2db5492 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -47,7 +47,7 @@
namespace Kyra {
KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags)
- : KyraEngine(system, flags) {
+ : KyraEngine_v1(system, flags) {
_skipFlag = false;
_seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm =
@@ -156,7 +156,7 @@ int KyraEngine_LoK::init() {
assert(_screen);
_screen->setResolution();
- KyraEngine::init();
+ KyraEngine_v1::init();
_sprites = new Sprites(this, _system);
assert(_sprites);
@@ -994,7 +994,7 @@ void KyraEngine_LoK::checkAmuletAnimFlags() {
#pragma mark -
void KyraEngine_LoK::registerDefaultSettings() {
- KyraEngine::registerDefaultSettings();
+ KyraEngine_v1::registerDefaultSettings();
// Most settings already have sensible defaults. This one, however, is
// specific to the Kyra engine.
@@ -1015,7 +1015,7 @@ void KyraEngine_LoK::readSettings() {
else
_configTextspeed = 2; // Fast
- KyraEngine::readSettings();
+ KyraEngine_v1::readSettings();
}
void KyraEngine_LoK::writeSettings() {
@@ -1038,7 +1038,7 @@ void KyraEngine_LoK::writeSettings() {
ConfMan.setInt("talkspeed", talkspeed);
- KyraEngine::writeSettings();
+ KyraEngine_v1::writeSettings();
}
} // end of namespace Kyra
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index fe742a1da9..eed2f71ab0 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -23,10 +23,10 @@
*
*/
-#ifndef KYRA_KYRA_V1_H
-#define KYRA_KYRA_V1_H
+#ifndef KYRA_KYRA_LOK_H
+#define KYRA_KYRA_LOK_H
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/script.h"
#include "kyra/screen_lok.h"
#include "kyra/gui_lok.h"
@@ -104,7 +104,7 @@ struct BeadState {
int16 tableIndex;
};
-class KyraEngine_LoK : public KyraEngine {
+class KyraEngine_LoK : public KyraEngine_v1 {
friend class MusicPlayer;
friend class Debugger_LoK;
friend class Animator_LoK;
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 6eca24fe98..f53192d68a 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -23,7 +23,7 @@
*
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_mr.h"
#include "kyra/screen_mr.h"
#include "kyra/wsamovie.h"
@@ -205,7 +205,7 @@ int KyraEngine_MR::init() {
assert(_screen);
_screen->setResolution();
- KyraEngine::init();
+ KyraEngine_v1::init();
_debugger = new Debugger_v2(this);
assert(_debugger);
@@ -214,7 +214,7 @@ int KyraEngine_MR::init() {
assert(_soundDigital);
if (!_soundDigital->init())
error("_soundDigital->init() failed");
- KyraEngine::_text = _text = new TextDisplayer_MR(this, _screen);
+ KyraEngine_v1::_text = _text = new TextDisplayer_MR(this, _screen);
assert(_text);
_gui = new GUI_MR(this);
assert(_gui);
@@ -1509,7 +1509,7 @@ void KyraEngine_MR::resetSkipFlag(bool removeEvent) {
void KyraEngine_MR::registerDefaultSettings() {
debugC(9, kDebugLevelMain, "KyraEngine_MR::registerDefaultSettings()");
- KyraEngine::registerDefaultSettings();
+ KyraEngine_v1::registerDefaultSettings();
// Most settings already have sensible defaults. This one, however, is
// specific to the Kyra engine.
@@ -1542,12 +1542,12 @@ void KyraEngine_MR::writeSettings() {
ConfMan.setBool("skip_support", _configSkip);
ConfMan.setBool("helium_mode", _configHelium);
- KyraEngine::writeSettings();
+ KyraEngine_v1::writeSettings();
}
void KyraEngine_MR::readSettings() {
debugC(9, kDebugLevelMain, "KyraEngine_MR::readSettings()");
- KyraEngine::readSettings();
+ KyraEngine_v1::readSettings();
_configStudio = ConfMan.getBool("studio_audience");
_configSkip = ConfMan.getBool("skip_support");
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra_v1.cpp
index e35e91731d..8109ab0e26 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -28,7 +28,7 @@
#include "sound/mididrv.h"
#include "sound/mixer.h"
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/sound.h"
#include "kyra/resource.h"
#include "kyra/screen.h"
@@ -39,7 +39,7 @@
namespace Kyra {
-KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags)
+KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
: Engine(system), _flags(flags) {
_res = 0;
_sound = 0;
@@ -80,11 +80,11 @@ KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags)
system->getEventManager()->registerRandomSource(_rnd, "kyra");
}
-::GUI::Debugger *KyraEngine::getDebugger() {
+::GUI::Debugger *KyraEngine_v1::getDebugger() {
return _debugger;
}
-int KyraEngine::init() {
+int KyraEngine_v1::init() {
registerDefaultSettings();
// Setup mixer
@@ -196,7 +196,7 @@ int KyraEngine::init() {
return 0;
}
-KyraEngine::~KyraEngine() {
+KyraEngine_v1::~KyraEngine_v1() {
for (Common::Array<const Opcode*>::iterator i = _opcodes.begin(); i != _opcodes.end(); ++i)
delete *i;
_opcodes.clear();
@@ -210,13 +210,13 @@ KyraEngine::~KyraEngine() {
delete _debugger;
}
-void KyraEngine::quitGame() {
- debugC(9, kDebugLevelMain, "KyraEngine::quitGame()");
+void KyraEngine_v1::quitGame() {
+ debugC(9, kDebugLevelMain, "KyraEngine_v1::quitGame()");
_quitFlag = true;
// Nothing to do here
}
-Common::Point KyraEngine::getMousePos() const {
+Common::Point KyraEngine_v1::getMousePos() const {
Common::Point mouse = _eventMan->getMousePos();
if (_flags.useHiResOverlay) {
@@ -227,7 +227,7 @@ Common::Point KyraEngine::getMousePos() const {
return mouse;
}
-void KyraEngine::setMousePos(int x, int y) {
+void KyraEngine_v1::setMousePos(int x, int y) {
if (_flags.useHiResOverlay) {
x <<= 1;
y <<= 1;
@@ -235,41 +235,41 @@ void KyraEngine::setMousePos(int x, int y) {
_system->warpMouse(x, y);
}
-int KyraEngine::setGameFlag(int flag) {
+int KyraEngine_v1::setGameFlag(int flag) {
_flagsTable[flag >> 3] |= (1 << (flag & 7));
return 1;
}
-int KyraEngine::queryGameFlag(int flag) const {
+int KyraEngine_v1::queryGameFlag(int flag) const {
return ((_flagsTable[flag >> 3] >> (flag & 7)) & 1);
}
-int KyraEngine::resetGameFlag(int flag) {
+int KyraEngine_v1::resetGameFlag(int flag) {
_flagsTable[flag >> 3] &= ~(1 << (flag & 7));
return 0;
}
-void KyraEngine::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
+void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
while (_system->getMillis() < timestamp && !_quitFlag) {
if (timestamp - _system->getMillis() >= 10)
delay(10, update, isMainLoop);
}
}
-void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) {
+void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) {
_system->delayMillis(amount);
}
-void KyraEngine::delayWithTicks(int ticks) {
+void KyraEngine_v1::delayWithTicks(int ticks) {
delay(ticks * _tickLength);
}
-void KyraEngine::registerDefaultSettings() {
+void KyraEngine_v1::registerDefaultSettings() {
if (_flags.gameID != GI_KYRA3)
ConfMan.registerDefault("cdaudio", (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98));
}
-void KyraEngine::readSettings() {
+void KyraEngine_v1::readSettings() {
_configWalkspeed = ConfMan.getInt("walkspeed");
_configMusic = 0;
@@ -298,7 +298,7 @@ void KyraEngine::readSettings() {
setWalkspeed(_configWalkspeed);
}
-void KyraEngine::writeSettings() {
+void KyraEngine_v1::writeSettings() {
bool speechMute, subtitles;
ConfMan.setInt("walkspeed", _configWalkspeed);
@@ -335,11 +335,11 @@ void KyraEngine::writeSettings() {
ConfMan.flushToDisk();
}
-bool KyraEngine::speechEnabled() {
+bool KyraEngine_v1::speechEnabled() {
return _flags.isTalkie && (_configVoice == 1 || _configVoice == 2);
}
-bool KyraEngine::textEnabled() {
+bool KyraEngine_v1::textEnabled() {
return !_flags.isTalkie || (_configVoice == 0 || _configVoice == 2);
}
@@ -352,7 +352,7 @@ inline int convertValueFromMixer(int value) {
return (value * 95) / Audio::Mixer::kMaxMixerVolume + 2;
}
-void KyraEngine::setVolume(kVolumeEntry vol, uint8 value) {
+void KyraEngine_v1::setVolume(kVolumeEntry vol, uint8 value) {
switch (vol) {
case kVolumeMusic:
ConfMan.setInt("music_volume", convertValueToMixer(value));
@@ -375,7 +375,7 @@ void KyraEngine::setVolume(kVolumeEntry vol, uint8 value) {
_sound->updateVolumeSettings();
}
-uint8 KyraEngine::getVolume(kVolumeEntry vol) {
+uint8 KyraEngine_v1::getVolume(kVolumeEntry vol) {
switch (vol) {
case kVolumeMusic:
return convertValueFromMixer(ConfMan.getInt("music_volume"));
diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra_v1.h
index 66ecb2704c..076c6bbd54 100644
--- a/engines/kyra/kyra.h
+++ b/engines/kyra/kyra_v1.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef KYRA_KYRA_H
-#define KYRA_KYRA_H
+#ifndef KYRA_KYRA_V1_H
+#define KYRA_KYRA_V1_H
#include "engines/engine.h"
@@ -99,13 +99,13 @@ class StaticResource;
class TimerManager;
class Debugger;
-class KyraEngine : public Engine {
+class KyraEngine_v1 : public Engine {
friend class Debugger;
friend class ::KyraMetaEngine;
friend class GUI;
public:
- KyraEngine(OSystem *system, const GameFlags &flags);
- virtual ~KyraEngine();
+ KyraEngine_v1(OSystem *system, const GameFlags &flags);
+ virtual ~KyraEngine_v1();
::GUI::Debugger *getDebugger();
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 1e1a30dec8..b2c44981ec 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -29,7 +29,7 @@
namespace Kyra {
-KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc) : KyraEngine(system, flags), _desc(desc) {
+KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc) : KyraEngine_v1(system, flags), _desc(desc) {
memset(&_sceneAnims, 0, sizeof(_sceneAnims));
memset(&_sceneAnimMovie, 0, sizeof(_sceneAnimMovie));
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 484e044ac7..f487799744 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -26,7 +26,7 @@
#ifndef KYRA_KYRA_V2_H
#define KYRA_KYRA_V2_H
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/gui.h"
#include "kyra/wsamovie.h"
@@ -53,7 +53,7 @@ struct ActiveItemAnim {
class Screen_v2;
-class KyraEngine_v2 : public KyraEngine {
+class KyraEngine_v2 : public KyraEngine_v1 {
friend class Debugger_v2;
friend class GUI_v2;
public:
diff --git a/engines/kyra/module.mk b/engines/kyra/module.mk
index 2a0e2adf41..b027459613 100644
--- a/engines/kyra/module.mk
+++ b/engines/kyra/module.mk
@@ -16,7 +16,7 @@ MODULE_OBJS := \
items_v2.o \
items_hof.o \
items_mr.o \
- kyra.o \
+ kyra_v1.o \
kyra_lok.o \
kyra_v2.o \
kyra_hof.o \
@@ -26,7 +26,7 @@ MODULE_OBJS := \
saveload_lok.o \
saveload_hof.o \
saveload_mr.o \
- scene.o \
+ scene_v1.o \
scene_lok.o \
scene_v2.o \
scene_hof.o \
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index b2564221fc..58756ca430 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -36,7 +36,7 @@
namespace Kyra {
-Resource::Resource(KyraEngine *vm) : _loaders(), _map(), _vm(vm) {
+Resource::Resource(KyraEngine_v1 *vm) : _loaders(), _map(), _vm(vm) {
initializeLoaders();
}
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index f414cacee8..843b0b423d 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -36,7 +36,7 @@
#include "common/stream.h"
#include "common/ptr.h"
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_hof.h"
namespace Kyra {
@@ -88,7 +88,7 @@ protected:
class Resource {
public:
- Resource(KyraEngine *vm);
+ Resource(KyraEngine_v1 *vm);
~Resource();
bool reset();
@@ -122,7 +122,7 @@ protected:
LoaderList _loaders;
ResFileMap _map;
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
};
// TODO?: maybe prefix all things here with 'kKyra1' instead of 'k'
@@ -239,7 +239,7 @@ class StaticResource {
public:
static const Common::String staticDataFilename() { return "kyra.dat"; }
- StaticResource(KyraEngine *vm) : _vm(vm), _resList(), _fileLoader(0), _builtIn(0), _filenameTable(0) {}
+ StaticResource(KyraEngine_v1 *vm) : _vm(vm), _resList(), _fileLoader(0), _builtIn(0), _filenameTable(0) {}
~StaticResource() { deinit(); }
static bool checkKyraDat();
@@ -265,7 +265,7 @@ public:
private:
void outputError();
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
struct FilenameTable;
struct ResData;
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index 590d40f2e3..22f934ba69 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -27,7 +27,7 @@
#include "common/savefile.h"
#include "common/system.h"
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#define CURRENT_SAVE_VERSION 13
@@ -37,7 +37,7 @@
namespace Kyra {
-KyraEngine::kReadSaveHeaderError KyraEngine::readSaveHeader(Common::InSaveFile *in, SaveHeader &header) {
+KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::InSaveFile *in, SaveHeader &header) {
uint32 type = in->readUint32BE();
header.originalSave = false;
header.oldHeader = false;
@@ -108,14 +108,14 @@ KyraEngine::kReadSaveHeaderError KyraEngine::readSaveHeader(Common::InSaveFile *
return (in->ioFailed() ? kRSHEIoError : kRSHENoError);
}
-Common::InSaveFile *KyraEngine::openSaveForReading(const char *filename, SaveHeader &header) {
- debugC(9, kDebugLevelMain, "KyraEngine::openSaveForReading('%s', -)", filename);
+Common::InSaveFile *KyraEngine_v1::openSaveForReading(const char *filename, SaveHeader &header) {
+ debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForReading('%s', -)", filename);
Common::InSaveFile *in = 0;
if (!(in = _saveFileMan->openForLoading(filename)))
return 0;
- kReadSaveHeaderError errorCode = KyraEngine::readSaveHeader(in, header);
+ kReadSaveHeaderError errorCode = KyraEngine_v1::readSaveHeader(in, header);
if (errorCode != kRSHENoError) {
if (errorCode == kRSHEInvalidType)
warning("No ScummVM Kyra engine savefile header.");
@@ -159,8 +159,8 @@ Common::InSaveFile *KyraEngine::openSaveForReading(const char *filename, SaveHea
return in;
}
-Common::OutSaveFile *KyraEngine::openSaveForWriting(const char *filename, const char *saveName) const {
- debugC(9, kDebugLevelMain, "KyraEngine::openSaveForWriting('%s', '%s')", filename, saveName);
+Common::OutSaveFile *KyraEngine_v1::openSaveForWriting(const char *filename, const char *saveName) const {
+ debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForWriting('%s', '%s')", filename, saveName);
if (_quitFlag)
return 0;
@@ -191,7 +191,7 @@ Common::OutSaveFile *KyraEngine::openSaveForWriting(const char *filename, const
return out;
}
-const char *KyraEngine::getSavegameFilename(int num) {
+const char *KyraEngine_v1::getSavegameFilename(int num) {
static Common::String filename;
assert(num >= 0 && num <= 999);
@@ -204,7 +204,7 @@ const char *KyraEngine::getSavegameFilename(int num) {
return filename.c_str();
}
-bool KyraEngine::saveFileLoadable(int slot) {
+bool KyraEngine_v1::saveFileLoadable(int slot) {
if (slot < 0 || slot > 999)
return false;
diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp
index 36535eba60..085332b525 100644
--- a/engines/kyra/scene_lok.cpp
+++ b/engines/kyra/scene_lok.cpp
@@ -1166,7 +1166,7 @@ void KyraEngine_LoK::setCharactersPositions(int character) {
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::findWay(x, y, toX, toY, moveTable, moveTableSize);
+ int ret = KyraEngine_v1::findWay(x, y, toX, toY, moveTable, moveTableSize);
if (ret == 0x7D00)
return 0;
return getMoveTableSize(moveTable);
diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene_v1.cpp
index e96a44cb2e..65171ad831 100644
--- a/engines/kyra/scene.cpp
+++ b/engines/kyra/scene_v1.cpp
@@ -23,13 +23,13 @@
*
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/screen.h"
namespace Kyra {
-int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) {
- debugC(9, kDebugLevelMain, "KyraEngine::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize);
+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;
@@ -143,8 +143,8 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move
return lastUsedEntry;
}
-int KyraEngine::findSubPath(int x, int y, int toX, int toY, int *moveTable, int start, int end) {
- debugC(9, kDebugLevelMain, "KyraEngine::findSubPath(%d, %d, %d, %d, %p, %d, %d)", x, y, toX, toY, (const void *)moveTable, start, end);
+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 };
@@ -212,8 +212,8 @@ int KyraEngine::findSubPath(int x, int y, int toX, int toY, int *moveTable, int
return 0x7D00;
}
-int KyraEngine::getFacingFromPointToPoint(int x, int y, int toX, int toY) {
- debugC(9, kDebugLevelMain, "KyraEngine::getFacingFromPointToPoint(%d, %d, %d, %d)", x, y, toX, toY);
+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
};
@@ -256,8 +256,8 @@ int KyraEngine::getFacingFromPointToPoint(int x, int y, int toX, int toY) {
}
-int KyraEngine::getOppositeFacingDirection(int dir) {
- debugC(9, kDebugLevelMain, "KyraEngine::getOppositeFacingDirection(%d)", dir);
+int KyraEngine_v1::getOppositeFacingDirection(int dir) {
+ debugC(9, kDebugLevelMain, "KyraEngine_v1::getOppositeFacingDirection(%d)", dir);
switch (dir) {
case 0:
return 2;
@@ -279,14 +279,14 @@ int KyraEngine::getOppositeFacingDirection(int dir) {
return 0;
}
-void KyraEngine::changePosTowardsFacing(int &x, int &y, int facing) {
- debugC(9, kDebugLevelMain, "KyraEngine::changePosTowardsFacing(%d, %d, %d)", x, y, facing);
+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::getMoveTableSize(int *moveTable) {
- debugC(9, kDebugLevelMain, "KyraEngine::getMoveTableSize(%p)", (const void *)moveTable);
+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;
diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp
index 5d811bcf44..7072cfc9a5 100644
--- a/engines/kyra/scene_v2.cpp
+++ b/engines/kyra/scene_v2.cpp
@@ -90,7 +90,7 @@ int KyraEngine_v2::findWay(int x, int y, int toX, int toY, int *moveTable, int m
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::findWay(x, y, toX, toY, moveTable, moveTableSize);
+ int size = KyraEngine_v1::findWay(x, y, toX, toY, moveTable, moveTableSize);
static bool usePostProcess = false;
if (size && !usePostProcess) {
usePostProcess = true;
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 568befac1e..6e250f292a 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -28,12 +28,12 @@
#include "common/system.h"
#include "graphics/cursorman.h"
#include "kyra/screen.h"
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/resource.h"
namespace Kyra {
-Screen::Screen(KyraEngine *vm, OSystem *system)
+Screen::Screen(KyraEngine_v1 *vm, OSystem *system)
: _system(system), _vm(vm), _sjisInvisibleColor(0) {
_debugEnabled = false;
}
@@ -2644,7 +2644,7 @@ void Screen::shakeScreen(int times) {
}
void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *palData, bool skip) {
- debugC(9, kDebugLevelScreen, "KyraEngine::loadBitmap('%s', %d, %d, %p, %d)", filename, tempPage, dstPage, (void *)palData, 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);
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index bf23747daf..f8c85a2bac 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -35,7 +35,7 @@ namespace Kyra {
typedef Common::Functor0<void> UpdateFunctor;
-class KyraEngine;
+class KyraEngine_v1;
struct Rect {
int x, y;
@@ -96,7 +96,7 @@ public:
FID_NUM
};
- Screen(KyraEngine *vm, OSystem *system);
+ Screen(KyraEngine_v1 *vm, OSystem *system);
virtual ~Screen();
// init
@@ -301,7 +301,7 @@ protected:
void addDirtyRect(int x, int y, int w, int h);
OSystem *_system;
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
// shape
int drawShapeMarginNoScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt);
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 13186b0167..e26ef87bad 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -29,7 +29,7 @@
namespace Kyra {
-Screen_v2::Screen_v2(KyraEngine *vm, OSystem *system) : Screen(vm, system), _wsaFrameAnimBuffer(0) {
+Screen_v2::Screen_v2(KyraEngine_v1 *vm, OSystem *system) : Screen(vm, system), _wsaFrameAnimBuffer(0) {
_wsaFrameAnimBuffer = new uint8[1024];
assert(_wsaFrameAnimBuffer);
}
diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h
index caec6af992..f624228445 100644
--- a/engines/kyra/screen_v2.h
+++ b/engines/kyra/screen_v2.h
@@ -33,7 +33,7 @@ namespace Kyra {
class Screen_v2 : public Screen {
public:
- Screen_v2(KyraEngine *vm, OSystem *system);
+ Screen_v2(KyraEngine_v1 *vm, OSystem *system);
~Screen_v2();
// screen page handling
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index e00ac6878d..ef3e259cfa 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -28,12 +28,12 @@
#include "common/stream.h"
#include "common/util.h"
#include "common/system.h"
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/resource.h"
#include "kyra/script.h"
namespace Kyra {
-EMCInterpreter::EMCInterpreter(KyraEngine *vm) : _vm(vm) {
+EMCInterpreter::EMCInterpreter(KyraEngine_v1 *vm) : _vm(vm) {
#define COMMAND(x) { &EMCInterpreter::x, #x }
static CommandEntry commandProcs[] = {
// 0x00
diff --git a/engines/kyra/script.h b/engines/kyra/script.h
index df86ec79c3..de52093f66 100644
--- a/engines/kyra/script.h
+++ b/engines/kyra/script.h
@@ -27,6 +27,7 @@
#define KYRA_SCRIPT_H
#include "common/stream.h"
+#include "common/array.h"
#include "common/func.h"
namespace Kyra {
@@ -63,7 +64,7 @@ struct EMCState {
#define AVTL_CHUNK 0x4C545641
class Resource;
-class KyraEngine;
+class KyraEngine_v1;
class ScriptFileParser {
public:
@@ -89,7 +90,7 @@ private:
class EMCInterpreter {
public:
- EMCInterpreter(KyraEngine *vm);
+ EMCInterpreter(KyraEngine_v1 *vm);
bool load(const char *filename, EMCData *data, const Common::Array<const Opcode*> *opcodes);
void unload(EMCData *data);
@@ -101,7 +102,7 @@ public:
bool run(EMCState *script);
protected:
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
int16 _parameter;
typedef void (EMCInterpreter::*CommandProc)(EMCState*);
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index fa9d54e8be..66390047b4 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -31,7 +31,7 @@
namespace Kyra {
-TIMInterpreter::TIMInterpreter(KyraEngine *vm, OSystem *system) : _vm(vm), _system(system), _currentTim(0) {
+TIMInterpreter::TIMInterpreter(KyraEngine_v1 *vm, OSystem *system) : _vm(vm), _system(system), _currentTim(0) {
#define COMMAND(x) { &TIMInterpreter::x, #x }
#define COMMAND_UNIMPL() { 0, 0 }
static CommandEntry commandProcs[] = {
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index 2ffbf89d65..957bffcc3c 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -26,7 +26,7 @@
#ifndef KYRA_SCRIPT_TIM_H
#define KYRA_SCRIPT_TIM_H
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "common/array.h"
#include "common/func.h"
@@ -57,7 +57,7 @@ struct TIM {
class TIMInterpreter {
public:
- TIMInterpreter(KyraEngine *vm, OSystem *system);
+ TIMInterpreter(KyraEngine_v1 *vm, OSystem *system);
TIM *load(const char *filename, const Common::Array<const TIMOpcode*> *opcodes);
void unload(TIM *&tim) const;
@@ -70,7 +70,7 @@ public:
void play(const char *filename);
private:
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
OSystem *_system;
TIM *_currentTim;
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index fc0959f444..d34014ef33 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -23,7 +23,7 @@
*
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_hof.h"
#include "kyra/screen.h"
#include "kyra/wsamovie.h"
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 90cbd5e539..a8566a7309 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -40,7 +40,7 @@
namespace Kyra {
-Sound::Sound(KyraEngine *vm, Audio::Mixer *mixer)
+Sound::Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: _vm(vm), _mixer(mixer), _soundChannels(), _musicEnabled(1),
_sfxEnabled(true), _soundDataList(0) {
}
@@ -145,7 +145,7 @@ bool Sound::voiceIsPlaying(const char *file) {
#pragma mark -
-SoundMidiPC::SoundMidiPC(KyraEngine *vm, Audio::Mixer *mixer, MidiDriver *driver) : Sound(vm, mixer) {
+SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *driver) : Sound(vm, mixer) {
_driver = driver;
_passThrough = false;
@@ -467,8 +467,8 @@ void SoundMidiPC::beginFadeOut() {
#pragma mark -
-void KyraEngine::snd_playTheme(int file, int track) {
- debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playTheme(%d, %d)", file, track);
+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;
@@ -478,13 +478,13 @@ void KyraEngine::snd_playTheme(int file, int track) {
_sound->playTrack(track);
}
-void KyraEngine::snd_playSoundEffect(int track, int volume) {
- debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playSoundEffect(%d, %d)", track, volume);
+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::snd_playWanderScoreViaMap(int command, int restart) {
- debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playWanderScoreViaMap(%d, %d)", command, restart);
+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;
@@ -527,13 +527,13 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) {
_lastMusicCommand = command;
}
-void KyraEngine::snd_stopVoice() {
- debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_stopVoice()");
+void KyraEngine_v1::snd_stopVoice() {
+ debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_stopVoice()");
_sound->voiceStop(_speechFile.empty() ? 0 : _speechFile.c_str());
}
-bool KyraEngine::snd_voiceIsPlaying() {
- debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_voiceIsPlaying()");
+bool KyraEngine_v1::snd_voiceIsPlaying() {
+ debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_voiceIsPlaying()");
return _sound->voiceIsPlaying(_speechFile.empty() ? 0 : _speechFile.c_str());
}
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index e1ae29cba3..595619c7e9 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -42,7 +42,7 @@
#ifndef KYRA_SOUND_H
#define KYRA_SOUND_H
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "common/scummsys.h"
#include "common/file.h"
@@ -66,7 +66,7 @@ namespace Kyra {
*/
class Sound {
public:
- Sound(KyraEngine *vm, Audio::Mixer *mixer);
+ Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer);
virtual ~Sound();
enum kType {
@@ -209,7 +209,7 @@ protected:
int _currentTheme;
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
Audio::Mixer *_mixer;
private:
@@ -243,7 +243,7 @@ class AdlibDriver;
*/
class SoundAdlibPC : public Sound {
public:
- SoundAdlibPC(KyraEngine *vm, Audio::Mixer *mixer);
+ SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer);
~SoundAdlibPC();
kType getMusicType() const { return kAdlib; }
@@ -298,7 +298,7 @@ private:
*/
class SoundMidiPC : public MidiDriver, public Sound {
public:
- SoundMidiPC(KyraEngine *vm, Audio::Mixer *mixer, MidiDriver *driver);
+ SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *driver);
~SoundMidiPC();
kType getMusicType() const { return isMT32() ? kMidiMT32 : kMidiGM; }
@@ -378,7 +378,7 @@ private:
class SoundTowns_EuphonyDriver;
class SoundTowns : public MidiDriver, public Sound {
public:
- SoundTowns(KyraEngine *vm, Audio::Mixer *mixer);
+ SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer);
~SoundTowns();
kType getMusicType() const { return kTowns; }
@@ -435,7 +435,7 @@ private:
//class SoundTowns_v2_TwnDriver;
class SoundTowns_v2 : public Sound {
public:
- SoundTowns_v2(KyraEngine *vm, Audio::Mixer *mixer);
+ SoundTowns_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer);
~SoundTowns_v2();
kType getMusicType() const { return kTowns; }
@@ -463,7 +463,7 @@ private:
class MixedSoundDriver : public Sound {
public:
- MixedSoundDriver(KyraEngine *vm, Audio::Mixer *mixer, Sound *music, Sound *sfx) : Sound(vm, mixer), _music(music), _sfx(sfx) {}
+ MixedSoundDriver(KyraEngine_v1 *vm, Audio::Mixer *mixer, Sound *music, Sound *sfx) : Sound(vm, mixer), _music(music), _sfx(sfx) {}
~MixedSoundDriver() { delete _music; delete _sfx; }
kType getMusicType() const { return _music->getMusicType(); }
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index e227d1fc46..68a2f0be9c 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -2210,7 +2210,7 @@ const int SoundAdlibPC::_kyra1SoundTriggers[] = {
const int SoundAdlibPC::_kyra1NumSoundTriggers = ARRAYSIZE(SoundAdlibPC::_kyra1SoundTriggers);
-SoundAdlibPC::SoundAdlibPC(KyraEngine *vm, Audio::Mixer *mixer)
+SoundAdlibPC::SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: Sound(vm, mixer), _driver(0), _trackEntries(), _soundDataPtr(0) {
memset(_trackEntries, 0, sizeof(_trackEntries));
_v2 = (_vm->gameFlags().gameID == GI_KYRA2);
diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp
index 398ac085c4..728013cdaa 100644
--- a/engines/kyra/sound_lok.cpp
+++ b/engines/kyra/sound_lok.cpp
@@ -35,7 +35,7 @@ void KyraEngine_LoK::snd_playSoundEffect(int track, int volume) {
return;
}
- KyraEngine::snd_playSoundEffect(track);
+ KyraEngine_v1::snd_playSoundEffect(track);
}
void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) {
@@ -57,7 +57,7 @@ void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) {
_sound->haltTrack();
}
} else {
- KyraEngine::snd_playWanderScoreViaMap(command, restart);
+ KyraEngine_v1::snd_playWanderScoreViaMap(command, restart);
}
}
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index d2ce48f452..3d8c7becae 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -1084,7 +1084,7 @@ void SoundTowns_EuphonyTrackQueue::initDriver() {
_driver->send(0x79B0);
}
-SoundTowns::SoundTowns(KyraEngine *vm, Audio::Mixer *mixer)
+SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: Sound(vm, mixer), _lastTrack(-1), _currentSFX(0), _sfxFileData(0),
_sfxFileIndex((uint)-1), _sfxWDTable(0), _sfxBTTable(0), _parser(0) {
@@ -1357,7 +1357,7 @@ float SoundTowns::semitoneAndSampleRate_to_sampleStep(int8 semiTone, int8 semiTo
// KYRA 2
-SoundTowns_v2::SoundTowns_v2(KyraEngine *vm, Audio::Mixer *mixer)
+SoundTowns_v2::SoundTowns_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: Sound(vm, mixer), _lastTrack(-1), _currentSFX(0), /*_driver(0),*/
_twnTrackData(0) {
}
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index dbe181b84f..2ac960dc75 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -26,7 +26,7 @@
#include "common/endian.h"
#include "common/md5.h"
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_lok.h"
#include "kyra/kyra_v2.h"
#include "kyra/kyra_hof.h"
@@ -1338,11 +1338,11 @@ const ScreenDim Screen_MR::_screenDimTable[] = {
const int Screen_MR::_screenDimTableCount = ARRAYSIZE(Screen_MR::_screenDimTable);
-const int8 KyraEngine::_addXPosTable[] = {
+const int8 KyraEngine_v1::_addXPosTable[] = {
4, 4, 0, -4, -4, -4, 0, 4
};
-const int8 KyraEngine::_addYPosTable[] = {
+const int8 KyraEngine_v1::_addYPosTable[] = {
0, -2, -2, -2, 0, 2, 2, 2
};
diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp
index 980b762b23..931c5fe1c9 100644
--- a/engines/kyra/text.cpp
+++ b/engines/kyra/text.cpp
@@ -25,7 +25,7 @@
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/screen.h"
#include "kyra/text.h"
@@ -35,7 +35,7 @@
namespace Kyra {
-TextDisplayer::TextDisplayer(KyraEngine *vm, Screen *screen) {
+TextDisplayer::TextDisplayer(KyraEngine_v1 *vm, Screen *screen) {
_screen = screen;
_vm = vm;
diff --git a/engines/kyra/text.h b/engines/kyra/text.h
index 5ae37e32ef..d45e5f9242 100644
--- a/engines/kyra/text.h
+++ b/engines/kyra/text.h
@@ -31,11 +31,11 @@
#include "kyra/screen.h"
namespace Kyra {
-class KyraEngine;
+class KyraEngine_v1;
class TextDisplayer {
public:
- TextDisplayer(KyraEngine *vm, Screen *screen);
+ TextDisplayer(KyraEngine_v1 *vm, Screen *screen);
virtual ~TextDisplayer() {}
int maxSubstringLen() const { return TALK_SUBSTRING_LEN; }
@@ -60,7 +60,7 @@ public:
bool printed() const { return _talkMessagePrinted; }
protected:
Screen *_screen;
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
struct TalkCoords {
uint16 y, x, w;
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index b20d9510cc..777871d65a 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -23,7 +23,7 @@
*
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/timer.h"
#include "common/func.h"
@@ -34,7 +34,7 @@ namespace Kyra {
namespace {
struct TimerResync : public Common::UnaryFunction<TimerEntry&, void> {
uint32 _tickLength, _curTime;
- TimerResync(KyraEngine *vm, uint32 curTime) : _tickLength(vm->tickLength()), _curTime(curTime) {}
+ TimerResync(KyraEngine_v1 *vm, uint32 curTime) : _tickLength(vm->tickLength()), _curTime(curTime) {}
void operator()(TimerEntry &entry) const {
if (entry.lastUpdate < 0) {
diff --git a/engines/kyra/timer.h b/engines/kyra/timer.h
index 264590845e..691bac3fb5 100644
--- a/engines/kyra/timer.h
+++ b/engines/kyra/timer.h
@@ -26,7 +26,7 @@
#ifndef KYRA_TIMER_H
#define KYRA_TIMER_H
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "common/list.h"
#include "common/stream.h"
@@ -49,7 +49,7 @@ struct TimerEntry {
class TimerManager {
public:
- TimerManager(KyraEngine *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0), _isPaused(0), _pauseStart(0) {}
+ TimerManager(KyraEngine_v1 *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0), _isPaused(0), _pauseStart(0) {}
~TimerManager() { reset(); }
void pause(bool p);
@@ -79,7 +79,7 @@ public:
private:
void resync();
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
OSystem *_system;
Common::List<TimerEntry> _timers;
uint32 _nextRun;
diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp
index 91081a36b3..69b93b54c3 100644
--- a/engines/kyra/timer_lok.cpp
+++ b/engines/kyra/timer_lok.cpp
@@ -23,7 +23,7 @@
*
*/
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_lok.h"
#include "kyra/screen.h"
#include "kyra/animator_lok.h"
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index f4eadee4e2..cea52e911e 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -42,7 +42,7 @@
namespace Kyra {
-VQAMovie::VQAMovie(KyraEngine *vm, OSystem *system) {
+VQAMovie::VQAMovie(KyraEngine_v1 *vm, OSystem *system) {
_system = system;
_vm = vm;
_opened = false;
diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h
index 35f7d78004..f600f008b7 100644
--- a/engines/kyra/vqa.h
+++ b/engines/kyra/vqa.h
@@ -30,11 +30,11 @@ class OSystem;
namespace Kyra {
-class KyraEngine;
+class KyraEngine_v1;
class VQAMovie {
public:
- VQAMovie(KyraEngine *vm, OSystem *system);
+ VQAMovie(KyraEngine_v1 *vm, OSystem *system);
~VQAMovie();
bool opened() { return _opened; }
@@ -54,7 +54,7 @@ public:
protected:
OSystem *_system;
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
bool _opened;
int _x, _y;
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp
index 42159478dd..110755c3ba 100644
--- a/engines/kyra/wsamovie.cpp
+++ b/engines/kyra/wsamovie.cpp
@@ -27,7 +27,7 @@
#include "common/endian.h"
#include "common/system.h"
-#include "kyra/kyra.h"
+#include "kyra/kyra_v1.h"
#include "kyra/kyra_v2.h"
#include "kyra/screen.h"
#include "kyra/screen_v2.h"
@@ -35,7 +35,7 @@
#include "kyra/resource.h"
namespace Kyra {
-WSAMovie_v1::WSAMovie_v1(KyraEngine *vm) : Movie(vm) {}
+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) {
@@ -213,7 +213,7 @@ void WSAMovie_v1::processFrame(int frameNum, uint8 *dst) {
#pragma mark -
-WSAMovieAmiga::WSAMovieAmiga(KyraEngine *vm) : WSAMovie_v1(vm), _buffer(0) {}
+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);
@@ -342,7 +342,7 @@ void WSAMovieAmiga::processFrame(int frameNum, uint8 *dst) {
#pragma mark -
-WSAMovie_v2::WSAMovie_v2(KyraEngine *vm, Screen_v2 *screen) : WSAMovie_v1(vm), _screen(screen), _xAdd(0), _yAdd(0) {}
+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);
diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h
index cc3a188eea..36cd75b1ab 100644
--- a/engines/kyra/wsamovie.h
+++ b/engines/kyra/wsamovie.h
@@ -32,12 +32,12 @@ class SoundHandle;
} // end of namespace Audio
namespace Kyra {
-class KyraEngine;
+class KyraEngine_v1;
class Screen_v2;
class Movie {
public:
- Movie(KyraEngine *vm) : _vm(vm), _opened(false), _x(-1), _y(-1), _drawPage(-1) {}
+ Movie(KyraEngine_v1 *vm) : _vm(vm), _opened(false), _x(-1), _y(-1), _drawPage(-1) {}
virtual ~Movie() {}
virtual bool opened() { return _opened; }
@@ -53,7 +53,7 @@ public:
virtual void setY(int y) { _y = y; }
virtual void setDrawPage(int page) { _drawPage = page; }
protected:
- KyraEngine *_vm;
+ KyraEngine_v1 *_vm;
bool _opened;
int _x, _y;
@@ -62,7 +62,7 @@ protected:
class WSAMovie_v1 : public Movie {
public:
- WSAMovie_v1(KyraEngine *vm);
+ WSAMovie_v1(KyraEngine_v1 *vm);
virtual ~WSAMovie_v1();
virtual int open(const char *filename, int offscreen, uint8 *palette);
@@ -96,7 +96,7 @@ protected:
class WSAMovieAmiga : public WSAMovie_v1 {
public:
- WSAMovieAmiga(KyraEngine *vm);
+ WSAMovieAmiga(KyraEngine_v1 *vm);
int open(const char *filename, int offscreen, uint8 *palette);
void close();
@@ -109,7 +109,7 @@ private:
class WSAMovie_v2 : public WSAMovie_v1 {
public:
- WSAMovie_v2(KyraEngine *vm, Screen_v2 *scren);
+ WSAMovie_v2(KyraEngine_v1 *vm, Screen_v2 *scren);
int open(const char *filename, int unk1, uint8 *palette);