ScummVM API documentation
MM Namespace Reference

Classes

class  BitmapFont
 
struct  MightAndMagicGameDescription
 
class  MMEngine
 
class  StringsData
 
class  XeenFont
 

Enumerations

enum  {
  GType_MightAndMagic1, GType_Clouds, GType_DarkSide, GType_WorldOfXeen,
  GType_Swords
}
 
enum  GameFeature { GF_NONE = 0, GF_ENHANCED = 1, GF_GFX_PACK = 2 }
 
enum  MightAndMagicDebugChannels { kDebugPath = 1 << 0, kDebugScripts = 1 << 1, kDebugGraphics = 1 << 2, kDebugSound = 1 << 3 }
 

Functions

bool load_engine_data (const Common::String &subfolder, int reqMajorVersion, int reqMinorVersion, Common::U32String &errorMsg, bool useDataPrefix=false)
 
Common::String capitalize (const Common::String &str)
 
Common::String camelCase (const Common::String &str)
 
Common::String uppercase (const Common::String &str)
 
Common::String searchAndReplace (const Common::String &str, const Common::String &find, const Common::String &replace)
 
int strToInt (const Common::String &str)
 
int hexToInt (const Common::String &str)
 
Common::StringArray splitLines (const Common::String &str)
 

Variables

MMEngineg_engine
 

Detailed Description

This is the Might and Magic I engine

Provides convenient access to a subfolder within the engine data zip file for the mm engine, by mapping it into ScummVM's filesystem. You simply specify the subfolder for your game, and the contents of that folder will be mapped in so you can calling Common::File::open with their filenames directly like file1.png or data/file1.png, depending on the useDataPrefix flag passed in the function below.

The mm engine has an associated data zip file whose contents are in /devtools/create_mm/files/. Each game has their own subfolder within it, and as part of the release process, this folder will be zipped up as a file 'mm.dat', and included with ScummVM releases.

For development purposes, if you go the Game Options dialog for a game in the ScummVM launcher, and set the extra path to /devtools/create_mm, the engine will access the files directly without requiring you to keep regenerating mm.dat.

This is the namespace of the Xeen engine.

Games using this engine:

  • Might & Magic 4: Clouds of Xeen
  • Might & Magic 5: Darkside of Xeen
  • Might & Magic: World of Xeen
  • Might & Magic: Swords of Xeen

Function Documentation

◆ load_engine_data()

bool MM::load_engine_data ( const Common::String subfolder,
int  reqMajorVersion,
int  reqMinorVersion,
Common::U32String errorMsg,
bool  useDataPrefix = false 
)

Loads the engine data file and maps it into the filessystem so that the files within it can be opened as normal files.

Parameters
subfolderSubfolder in the engine data for the game
reqMajorVersionRequired major version number the folder contents need to be (as specified in version.txt)
reqMinorVersionRequired minor version
errorMsgIf an error occurs, contains a description
useDataPrefixIf true, the subfolder gets mapped into ScummVM as a 'data' subfolder, to differentiate them from files directly in the game folder. If false, the default, then filenames\