2007-05-30 21:56:52 +00:00
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers , whose names
* are too numerous to list here . Please refer to the COPYRIGHT
* file distributed with this source distribution .
2006-05-03 14:24:48 +00:00
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 , USA .
2011-12-11 01:57:03 +01:00
*
2006-05-03 14:24:48 +00:00
*/
2019-01-26 01:31:34 +01:00
# include "kyra/engine/kyra_lok.h"
# include "kyra/engine/lol.h"
# include "kyra/engine/kyra_hof.h"
# include "kyra/engine/kyra_mr.h"
# include "kyra/engine/eob.h"
# include "kyra/engine/darkmoon.h"
2009-03-04 00:45:34 +00:00
2006-05-03 14:24:48 +00:00
# include "common/config-manager.h"
2011-04-24 11:34:27 +03:00
# include "common/system.h"
2008-03-27 18:03:00 +00:00
# include "common/savefile.h"
2012-02-29 17:06:13 +01:00
# include "common/translation.h"
2006-05-03 14:24:48 +00:00
2011-04-24 11:34:27 +03:00
# include "engines/advancedDetector.h"
2006-05-03 14:24:48 +00:00
# include "base/plugins.h"
2006-11-09 14:38:16 +00:00
struct KYRAGameDescription {
2009-01-29 22:13:01 +00:00
ADGameDescription desc ;
2006-11-09 14:38:16 +00:00
2007-01-25 21:16:57 +00:00
Kyra : : GameFlags flags ;
2006-05-03 14:24:48 +00:00
} ;
2010-06-15 10:15:51 +00:00
# include "kyra/detection_tables.h"
2006-11-09 14:38:16 +00:00
2010-08-24 13:11:12 +00:00
namespace {
2011-12-26 21:19:29 +01:00
const char * const directoryGlobs [ ] = {
2010-08-24 13:11:12 +00:00
" malcolm " ,
0
} ;
2012-02-29 17:06:13 +01:00
const ADExtraGuiOptionsMap gameGuiOptions [ ] = {
// Kyrandia 3 options
{
GAMEOPTION_KYRA3_AUDIENCE ,
{
2012-03-25 11:47:20 +03:00
// I18N: Studio audience adds an applause and cheering sounds whenever
2012-03-25 17:05:23 +03:00
// Malcolm makes a joke.
2012-02-29 17:06:13 +01:00
_s ( " Studio audience " ) ,
_s ( " Enable studio audience " ) ,
" studio_audience " ,
true
}
} ,
{
GAMEOPTION_KYRA3_SKIP ,
{
2012-03-25 11:47:20 +03:00
// I18N: This option allows the user to skip text and cutscenes.
2012-02-29 17:06:13 +01:00
_s ( " Skip support " ) ,
_s ( " Allow text and cutscenes to be skipped " ) ,
" skip_support " ,
true
}
} ,
{
GAMEOPTION_KYRA3_HELIUM ,
{
2012-03-25 11:47:20 +03:00
// I18N: Helium mode makes people sound like they've inhaled Helium.
2012-02-29 17:06:13 +01:00
_s ( " Helium mode " ) ,
_s ( " Enable helium mode " ) ,
" helium_mode " ,
false
}
} ,
# ifdef ENABLE_LOL
// LoL options
{
GAMEOPTION_LOL_SCROLLING ,
{
2012-03-25 17:05:23 +03:00
// I18N: When enabled, this option makes scrolling smoother when
// changing from one screen to another.
2012-02-29 17:06:13 +01:00
_s ( " Smooth scrolling " ) ,
_s ( " Enable smooth scrolling when walking " ) ,
" smooth_scrolling " ,
true
}
} ,
{
GAMEOPTION_LOL_CURSORS ,
{
2012-03-25 11:47:20 +03:00
// I18N: When enabled, this option changes the cursor when it floats to the
// edge of the screen to a directional arrow. The player can then click to
// walk towards that direction.
2012-02-29 17:06:13 +01:00
_s ( " Floating cursors " ) ,
_s ( " Enable floating cursors " ) ,
" floating_cursors " ,
false
}
} ,
# endif
# ifdef ENABLE_EOB
// EoB options
{
GAMEOPTION_EOB_HPGRAPHS ,
{
2012-03-25 11:47:20 +03:00
// I18N: HP stands for Hit Points
2012-02-29 17:06:13 +01:00
_s ( " HP bar graphs " ) ,
_s ( " Enable hit point bar graphs " ) ,
" hpbargraphs " ,
true
}
} ,
2019-01-23 20:31:54 +01:00
{
GAMEOPTION_EOB_MOUSESWAP ,
{
// I18N: L/R stands for Left/Right
_s ( " Fight Button L/R Swap " ) ,
_s ( " Left button to attack, right button to pick up items " ) ,
" mousebtswap " ,
false
}
} ,
2012-02-29 17:06:13 +01:00
# endif
AD_EXTRA_GUI_OPTIONS_TERMINATOR
} ;
2010-08-24 13:11:12 +00:00
} // End of anonymous namespace
2009-01-29 22:13:01 +00:00
class KyraMetaEngine : public AdvancedMetaEngine {
2008-02-02 02:35:13 +00:00
public :
2012-02-29 17:06:13 +01:00
KyraMetaEngine ( ) : AdvancedMetaEngine ( adGameDescs , sizeof ( KYRAGameDescription ) , gameList , gameGuiOptions ) {
2011-06-11 17:52:32 +02:00
_md5Bytes = 1024 * 1024 ;
_maxScanDepth = 2 ;
_directoryGlobs = directoryGlobs ;
2011-06-10 15:53:53 +02:00
}
2016-09-15 18:23:35 +02:00
const char * getEngineId ( ) const {
return " kyra " ;
}
2008-03-27 18:03:00 +00:00
const char * getName ( ) const {
2011-05-16 23:56:12 +01:00
return " Kyra " ;
2008-02-02 02:35:13 +00:00
}
2009-03-05 12:04:58 +00:00
const char * getOriginalCopyright ( ) const {
2009-05-29 12:38:41 +00:00
return " The Legend of Kyrandia (C) Westwood Studios "
# ifdef ENABLE_LOL
2011-12-26 21:19:29 +01:00
" \n Lands of Lore (C) Westwood Studios "
2011-12-18 21:08:31 +01:00
# endif
# ifdef ENABLE_EOB
2011-12-26 21:19:29 +01:00
" \n Eye of the Beholder (C) TSR, Inc., (C) Strategic Simulations, Inc. "
2009-05-29 12:38:41 +00:00
# endif
2011-12-26 21:19:29 +01:00
;
2008-02-02 02:35:13 +00:00
}
2008-09-01 18:14:55 +00:00
bool hasFeature ( MetaEngineFeature f ) const ;
2009-01-29 22:13:01 +00:00
bool createInstance ( OSystem * syst , Engine * * engine , const ADGameDescription * desc ) const ;
2008-09-01 18:14:55 +00:00
SaveStateList listSaves ( const char * target ) const ;
2008-11-09 16:13:34 +00:00
virtual int getMaximumSaveSlot ( ) const ;
2008-09-11 19:47:45 +00:00
void removeSaveState ( const char * target , int slot ) const ;
2008-09-16 14:10:55 +00:00
SaveStateDescriptor querySaveMetaInfos ( const char * target , int slot ) const ;
2020-01-28 18:44:08 +01:00
Common : : KeymapArray initKeymaps ( const char * target ) const override ;
2008-02-02 02:35:13 +00:00
} ;
2008-08-15 18:15:14 +00:00
bool KyraMetaEngine : : hasFeature ( MetaEngineFeature f ) const {
return
2011-12-26 21:19:29 +01:00
( f = = kSupportsListSaves ) | |
( f = = kSupportsLoadingDuringStartup ) | |
( f = = kSupportsDeleteSave ) | |
( f = = kSavesSupportMetaInfo ) | |
2016-07-25 14:32:04 +06:00
( f = = kSavesSupportThumbnail ) | |
( f = = kSimpleSavesNames ) ;
2008-11-04 16:11:40 +00:00
}
bool Kyra : : KyraEngine_v1 : : hasFeature ( EngineFeature f ) const {
return
2011-12-26 21:19:29 +01:00
( f = = kSupportsRTL ) | |
( f = = kSupportsLoadingDuringRuntime ) | |
( f = = kSupportsSavingDuringRuntime ) | |
( f = = kSupportsSubtitleOptions ) ;
2008-08-15 18:15:14 +00:00
}
2009-01-29 22:13:01 +00:00
bool KyraMetaEngine : : createInstance ( OSystem * syst , Engine * * engine , const ADGameDescription * desc ) const {
2008-03-14 17:31:04 +00:00
const KYRAGameDescription * gd = ( const KYRAGameDescription * ) desc ;
2007-08-13 09:00:52 +00:00
bool res = true ;
2006-05-03 14:24:48 +00:00
2007-02-13 23:37:44 +00:00
Kyra : : GameFlags flags = gd - > flags ;
2007-12-16 18:48:43 +00:00
2007-02-13 23:37:44 +00:00
flags . lang = gd - > desc . language ;
flags . platform = gd - > desc . platform ;
2007-01-25 11:32:50 +00:00
2007-01-25 21:16:57 +00:00
Common : : Platform platform = Common : : parsePlatform ( ConfMan . get ( " platform " ) ) ;
2007-04-15 16:41:20 +00:00
if ( platform ! = Common : : kPlatformUnknown )
2007-01-25 11:26:13 +00:00
flags . platform = platform ;
2007-01-25 21:16:57 +00:00
if ( flags . lang = = Common : : UNK_LANG ) {
Common : : Language lang = Common : : parseLanguage ( ConfMan . get ( " language " ) ) ;
2007-04-15 16:41:20 +00:00
if ( lang ! = Common : : UNK_LANG )
2007-01-25 11:26:13 +00:00
flags . lang = lang ;
2007-04-15 16:41:20 +00:00
else
2007-01-25 21:16:57 +00:00
flags . lang = Common : : EN_ANY ;
2007-01-25 11:26:13 +00:00
}
2007-01-25 00:07:48 +00:00
2016-01-09 22:00:51 +01:00
# ifndef USE_RGB_COLOR
flags . useHiColorMode = false ;
# endif
2007-08-13 09:00:52 +00:00
switch ( flags . gameID ) {
case Kyra : : GI_KYRA1 :
2008-05-11 22:32:37 +00:00
* engine = new Kyra : : KyraEngine_LoK ( syst , flags ) ;
2007-08-13 09:00:52 +00:00
break ;
case Kyra : : GI_KYRA2 :
2008-05-02 14:46:30 +00:00
* engine = new Kyra : : KyraEngine_HoF ( syst , flags ) ;
2007-08-13 09:00:52 +00:00
break ;
case Kyra : : GI_KYRA3 :
2008-05-02 14:46:30 +00:00
* engine = new Kyra : : KyraEngine_MR ( syst , flags ) ;
2007-08-13 09:00:52 +00:00
break ;
2009-03-04 00:45:34 +00:00
# ifdef ENABLE_LOL
2008-07-31 10:47:15 +00:00
case Kyra : : GI_LOL :
* engine = new Kyra : : LoLEngine ( syst , flags ) ;
break ;
2009-03-04 00:45:34 +00:00
# endif // ENABLE_LOL
2011-12-11 01:57:03 +01:00
# ifdef ENABLE_EOB
case Kyra : : GI_EOB1 :
2011-12-12 16:23:01 +01:00
* engine = new Kyra : : EoBEngine ( syst , flags ) ;
2011-12-11 01:57:03 +01:00
break ;
case Kyra : : GI_EOB2 :
2012-02-23 21:36:14 +01:00
if ( Common : : parseRenderMode ( ConfMan . get ( " render_mode " ) ) = = Common : : kRenderEGA )
flags . useHiRes = true ;
2016-01-09 22:00:51 +01:00
if ( platform = = Common : : kPlatformFMTowns & & ! flags . useHiColorMode )
2019-03-20 22:03:04 +01:00
error ( " EOB II FM-TOWNS requires support of 16bit color modes which has not been activated in your ScummVM build (The 'USE_RGB_COLOR' define has not been set). " ) ;
2011-12-11 01:57:03 +01:00
* engine = new Kyra : : DarkMoonEngine ( syst , flags ) ;
break ;
# endif // ENABLE_EOB
2007-08-13 09:00:52 +00:00
default :
res = false ;
2008-03-27 18:03:00 +00:00
warning ( " Kyra engine: unknown gameID " ) ;
2007-08-13 09:00:52 +00:00
}
2006-09-18 17:30:51 +00:00
2007-08-13 09:00:52 +00:00
return res ;
2006-05-03 14:24:48 +00:00
}
2008-03-27 18:03:00 +00:00
SaveStateList KyraMetaEngine : : listSaves ( const char * target ) const {
Common : : SaveFileManager * saveFileMan = g_system - > getSavefileManager ( ) ;
2008-05-11 23:16:50 +00:00
Kyra : : KyraEngine_v1 : : SaveHeader header ;
2008-03-27 18:03:00 +00:00
Common : : String pattern = target ;
2016-01-26 02:41:44 +01:00
pattern + = " .### " ;
2008-03-27 18:03:00 +00:00
2010-03-18 15:54:40 +00:00
Common : : StringArray filenames ;
2009-05-29 14:38:22 +00:00
filenames = saveFileMan - > listSavefiles ( pattern ) ;
2008-03-27 18:03:00 +00:00
SaveStateList saveList ;
2010-03-18 15:54:40 +00:00
for ( Common : : StringArray : : const_iterator file = filenames . begin ( ) ; file ! = filenames . end ( ) ; + + file ) {
2008-03-27 18:03:00 +00:00
// Obtain the last 3 digits of the filename, since they correspond to the save slot
int slotNum = atoi ( file - > c_str ( ) + file - > size ( ) - 3 ) ;
2009-01-01 15:06:43 +00:00
2008-09-16 14:10:55 +00:00
if ( slotNum > = 0 & & slotNum < = 999 ) {
2009-05-29 14:38:22 +00:00
Common : : InSaveFile * in = saveFileMan - > openForLoading ( * file ) ;
2008-03-27 18:03:00 +00:00
if ( in ) {
ALL: Load savegame thumbnail only when necessary
This commit introduces the following changes:
1. Graphics::loadThumbnail()
Now returns a boolean and takes a new argument skipThumbnail which
defaults to false. In case of true, loadThumbnail() reads past the
thumbnail data in the input stream instead of actually loading the
thumbnail. This simplifies savegame handling where, up until now,
many engines always read the whole savegame metadata (including
the thumbnail) and then threw away the thumbnail when not needed
(which is in almost all cases, the most common exception being
MetaEngine::querySaveMetaInfos() which is responsible for loading
savegame metadata for displaying it in the GUI launcher.
2. readSavegameHeader()
Engines which already implement such a method (name varies) now take
a new argument skipThumbnail (default: true) which is passed
through to loadThumbnail(). This means that the default case for
readSavegameHeader() is now _not_ loading the thumbnail from a
savegame and just reading past it. In those cases, e.g.
querySaveMetaInfos(), where we actually are interested in loading
the thumbnail readSavegameHeader() needs to explicitely be called
with skipThumbnail == false.
Engines whose readSavegameHeader() (name varies) already takes an
argument loadThumbnail have been adapted to have a similar
prototype and semantics.
I.e. readSaveHeader(in, loadThumbnail, header) now is
readSaveHeader(in, header, skipThumbnail).
3. Error handling
Engines which previously did not check the return value of
readSavegameHeader() (name varies) now do so ensuring that possibly
broken savegames (be it a broken thumbnail or something else) don't
make it into the GUI launcher list in the first place.
2018-04-06 00:06:38 +02:00
if ( Kyra : : KyraEngine_v1 : : readSaveHeader ( in , header ) = = Kyra : : KyraEngine_v1 : : kRSHENoError ) {
2009-05-29 14:58:08 +00:00
// WORKAROUND: Old savegames are using 'German' as description for kyra3 restart game save (slot 0),
// since that looks odd we replace it by "New Game".
2008-09-12 12:25:56 +00:00
if ( slotNum = = 0 & & header . gameID = = Kyra : : GI_KYRA3 )
header . description = " New Game " ;
2008-11-05 15:41:12 +00:00
saveList . push_back ( SaveStateDescriptor ( slotNum , header . description ) ) ;
2008-09-12 12:25:56 +00:00
}
2008-03-27 18:03:00 +00:00
delete in ;
}
}
}
2016-02-25 19:55:13 +01:00
// Sort saves based on slot number.
Common : : sort ( saveList . begin ( ) , saveList . end ( ) , SaveStateDescriptorSlotComparator ( ) ) ;
2008-03-27 18:03:00 +00:00
return saveList ;
}
2011-12-26 21:19:29 +01:00
int KyraMetaEngine : : getMaximumSaveSlot ( ) const {
return 999 ;
}
2008-11-09 16:13:34 +00:00
2008-09-11 19:47:45 +00:00
void KyraMetaEngine : : removeSaveState ( const char * target , int slot ) const {
2009-05-29 14:58:08 +00:00
// In Kyra games slot 0 can't be deleted, it's for restarting the game(s).
// An exception makes Lands of Lore here, it does not have any way to restart the
// game except via its main menu.
2011-08-20 13:24:36 +02:00
if ( slot = = 0 & & ! ConfMan . getDomain ( target ) - > getVal ( " gameid " ) . equalsIgnoreCase ( " lol " ) & & ! ConfMan . getDomain ( target ) - > getVal ( " gameid " ) . equalsIgnoreCase ( " eob " ) & & ! ConfMan . getDomain ( target ) - > getVal ( " gameid " ) . equalsIgnoreCase ( " eob2 " ) )
2008-09-14 14:01:24 +00:00
return ;
2008-09-14 21:41:27 +00:00
Common : : String filename = Kyra : : KyraEngine_v1 : : getSavegameFilename ( target , slot ) ;
2009-05-29 14:38:22 +00:00
g_system - > getSavefileManager ( ) - > removeSavefile ( filename ) ;
2008-09-11 19:47:45 +00:00
}
2008-09-16 14:10:55 +00:00
SaveStateDescriptor KyraMetaEngine : : querySaveMetaInfos ( const char * target , int slot ) const {
2008-09-14 21:41:27 +00:00
Common : : String filename = Kyra : : KyraEngine_v1 : : getSavegameFilename ( target , slot ) ;
2009-05-29 14:38:22 +00:00
Common : : InSaveFile * in = g_system - > getSavefileManager ( ) - > openForLoading ( filename ) ;
2011-12-12 22:23:30 +01:00
const bool nonKyraGame = ConfMan . getDomain ( target ) - > getVal ( " gameid " ) . equalsIgnoreCase ( " lol " ) | | ConfMan . getDomain ( target ) - > getVal ( " gameid " ) . equalsIgnoreCase ( " eob " ) | | ConfMan . getDomain ( target ) - > getVal ( " gameid " ) . equalsIgnoreCase ( " eob2 " ) ;
2008-09-14 21:00:24 +00:00
2008-09-16 14:10:55 +00:00
if ( in ) {
Kyra : : KyraEngine_v1 : : SaveHeader header ;
2012-11-23 02:56:26 +01:00
Kyra : : KyraEngine_v1 : : ReadSaveHeaderError error ;
2008-09-16 14:10:55 +00:00
ALL: Load savegame thumbnail only when necessary
This commit introduces the following changes:
1. Graphics::loadThumbnail()
Now returns a boolean and takes a new argument skipThumbnail which
defaults to false. In case of true, loadThumbnail() reads past the
thumbnail data in the input stream instead of actually loading the
thumbnail. This simplifies savegame handling where, up until now,
many engines always read the whole savegame metadata (including
the thumbnail) and then threw away the thumbnail when not needed
(which is in almost all cases, the most common exception being
MetaEngine::querySaveMetaInfos() which is responsible for loading
savegame metadata for displaying it in the GUI launcher.
2. readSavegameHeader()
Engines which already implement such a method (name varies) now take
a new argument skipThumbnail (default: true) which is passed
through to loadThumbnail(). This means that the default case for
readSavegameHeader() is now _not_ loading the thumbnail from a
savegame and just reading past it. In those cases, e.g.
querySaveMetaInfos(), where we actually are interested in loading
the thumbnail readSavegameHeader() needs to explicitely be called
with skipThumbnail == false.
Engines whose readSavegameHeader() (name varies) already takes an
argument loadThumbnail have been adapted to have a similar
prototype and semantics.
I.e. readSaveHeader(in, loadThumbnail, header) now is
readSaveHeader(in, header, skipThumbnail).
3. Error handling
Engines which previously did not check the return value of
readSavegameHeader() (name varies) now do so ensuring that possibly
broken savegames (be it a broken thumbnail or something else) don't
make it into the GUI launcher list in the first place.
2018-04-06 00:06:38 +02:00
error = Kyra : : KyraEngine_v1 : : readSaveHeader ( in , header , false ) ;
2008-09-16 14:10:55 +00:00
delete in ;
2009-01-01 15:06:43 +00:00
2008-09-16 14:10:55 +00:00
if ( error = = Kyra : : KyraEngine_v1 : : kRSHENoError ) {
2008-11-05 15:41:12 +00:00
SaveStateDescriptor desc ( slot , header . description ) ;
2008-09-16 14:10:55 +00:00
2009-05-29 14:58:08 +00:00
// Slot 0 is used for the 'restart game' save in all three Kyrandia games, thus
// we prevent it from being deleted.
2011-08-20 13:24:36 +02:00
desc . setDeletableFlag ( slot ! = 0 | | nonKyraGame ) ;
2009-05-29 14:58:08 +00:00
// We don't allow quick saves (slot 990 till 998) to be overwritten.
2011-10-01 17:03:29 +02:00
// The same goes for the 'Autosave', which is slot 999. Slot 0 will also
// be protected in Kyra 1-3, since it's the 'restart game' save.
2011-08-20 13:24:36 +02:00
desc . setWriteProtectedFlag ( ( slot = = 0 & & ! nonKyraGame ) | | slot > = 990 ) ;
2008-09-16 14:10:55 +00:00
desc . setThumbnail ( header . thumbnail ) ;
return desc ;
}
}
2009-01-01 15:06:43 +00:00
2011-10-01 17:03:29 +02:00
SaveStateDescriptor desc ( slot , Common : : String ( ) ) ;
// We don't allow quick saves (slot 990 till 998) to be overwritten.
// The same goes for the 'Autosave', which is slot 999. Slot 0 will also
// be protected in Kyra 1-3, since it's the 'restart game' save.
2011-08-20 13:24:36 +02:00
desc . setWriteProtectedFlag ( ( slot = = 0 & & ! nonKyraGame ) | | slot > = 990 ) ;
2011-10-01 17:03:29 +02:00
return desc ;
2008-09-14 21:00:24 +00:00
}
2020-01-28 18:44:08 +01:00
Common : : KeymapArray KyraMetaEngine : : initKeymaps ( const char * target ) const {
2020-01-23 10:50:52 +01:00
Common : : String gameId = ConfMan . get ( " gameid " , target ) ;
2020-01-27 01:28:19 +02:00
# ifdef ENABLE_LOL
2020-01-23 10:50:52 +01:00
if ( gameId . contains ( " lol " ) ) {
2020-01-28 18:44:08 +01:00
return Kyra : : LoLEngine : : initKeymaps ( ) ;
2020-01-23 10:50:52 +01:00
}
2020-01-27 01:28:19 +02:00
# endif
2020-01-23 10:50:52 +01:00
2020-01-27 01:28:19 +02:00
# ifdef ENABLE_EOB
2020-01-23 10:50:52 +01:00
if ( gameId . contains ( " eob " ) ) {
2020-01-28 18:44:08 +01:00
return Kyra : : EoBCoreEngine : : initKeymaps ( gameId ) ;
2020-01-23 10:50:52 +01:00
}
2020-01-27 01:28:19 +02:00
# endif
2020-01-23 10:50:52 +01:00
2020-01-28 18:44:08 +01:00
return AdvancedMetaEngine : : initKeymaps ( target ) ;
2020-01-23 10:50:52 +01:00
}
2008-05-06 03:00:26 +00:00
# if PLUGIN_ENABLED_DYNAMIC(KYRA)
REGISTER_PLUGIN_DYNAMIC ( KYRA , PLUGIN_TYPE_ENGINE , KyraMetaEngine ) ;
# else
REGISTER_PLUGIN_STATIC ( KYRA , PLUGIN_TYPE_ENGINE , KyraMetaEngine ) ;
# endif