GameData Class Reference

#include <GameData.h>

List of all members.

Public Types

 OTHER = 0
 MAINSHAPES = 1
 GUMPS = 2
enum  ShapeFlexId { OTHER = 0, MAINSHAPES = 1, GUMPS = 2 }

Public Member Functions

 GameData ()
 ~GameData ()
void loadU8Data ()
void loadRemorseData ()
void setupFontOverrides ()
UsecodegetMainUsecode () const
MainShapeArchivegetMainShapes () const
RawArchivegetFixed () const
MapGlobgetGlob (uint32 glob) const
FontShapeArchivegetFonts () const
GumpShapeArchivegetGumps () const
ShapegetMouse () const
MusicFlexgetMusic () const
WpnOvlayDatgetWeaponOverlay () const
SoundFlexgetSoundFlex () const
SpeechFlexgetSpeechFlex (uint32 shapenum)
ShapeArchivegetShapeFlex (uint16 flexId) const
ShapegetShape (FrameID frameid) const
ShapeFramegetFrame (FrameID frameid) const
std::string translate (std::string text)
FrameID translate (FrameID frame)

Static Public Member Functions

static GameDataget_instance ()

Private Member Functions

void loadTranslation ()
void setupTTFOverrides (const char *configkey, bool SJIS)
void setupJPOverrides ()

Private Attributes

RawArchivefixed
MainShapeArchivemainshapes
Usecodemainusecode
std::vector< MapGlob * > globs
FontShapeArchivefonts
GumpShapeArchivegumps
Shapemouse
MusicFlexmusic
WpnOvlayDatweaponoverlay
SoundFlexsoundflex
std::vector< SpeechFlex ** > speech

Static Private Attributes

static GameDatagamedata = 0


Detailed Description

Definition at line 39 of file GameData.h.


Member Enumeration Documentation

enum GameData::ShapeFlexId

Enumerator:
OTHER 
MAINSHAPES 
GUMPS 

Definition at line 70 of file GameData.h.


Constructor & Destructor Documentation

GameData::GameData (  ) 

Definition at line 47 of file GameData.cpp.

References con, gamedata, MM_INFO, and Console::Print().

GameData::~GameData (  ) 

Definition at line 57 of file GameData.cpp.

References con, fixed, fonts, gamedata, globs, gumps, mainshapes, mainusecode, MM_INFO, mouse, music, Console::Print(), soundflex, speech, and weaponoverlay.


Member Function Documentation

static GameData* GameData::get_instance (  )  [inline, static]

Definition at line 45 of file GameData.h.

References gamedata.

Referenced by FontManager::addJPOverride(), ItemSorter::BeginDisplayList(), ButtonWidget::ButtonWidget(), Item::callUsecodeEvent(), AudioProcess::continueSpeech(), ItemFactory::createItem(), Actor::die(), UCProcess::dumpInfo(), GlobEgg::enterFastArea(), FontManager::getGameFont(), Item::getShapeInfoFromGameInstance(), Item::getShapeObject(), AudioProcess::getSpeechLength(), MainActor::getWeaponOverlay(), Actor::giveTreasure(), AnimationTracker::init(), U8SaveGump::InitGump(), SliderGump::InitGump(), ScrollGump::InitGump(), ReadableGump::InitGump(), QuitGump::InitGump(), PagedGump::InitGump(), MiniStatsGump::InitGump(), MenuGump::InitGump(), BookGump::InitGump(), WpnOvlayDat::load(), AnimationTracker::load(), TypeFlags::loadArmourInfo(), Gump::loadData(), ButtonWidget::loadData(), U8Game::loadFiles(), RemorseGame::loadFiles(), Map::loadFixedFormatObjects(), TimidityMidiDriver::open(), FMOplMidiDriver::open(), Item::openGump(), ItemSorter::PaintSortItem(), ShapeViewerGump::PaintThis(), PaperdollGump::PaintThis(), ContainerGump::PaintThis(), MusicProcess::playMusic_internal(), AudioProcess::playSFX(), AudioProcess::playSpeech(), MusicProcess::run(), Gump::SetShape(), World::switchMap(), ShapeViewerGump::U8ShapeViewer(), and UCProcess::UCProcess().

RawArchive* GameData::getFixed (  )  const [inline]

Definition at line 53 of file GameData.h.

References fixed.

Referenced by World::switchMap().

FontShapeArchive* GameData::getFonts (  )  const [inline]

Definition at line 55 of file GameData.h.

References fonts.

Referenced by FontManager::addJPOverride(), FontManager::getGameFont(), and ShapeViewerGump::U8ShapeViewer().

ShapeFrame * GameData::getFrame ( FrameID  frameid  )  const

Definition at line 131 of file GameData.cpp.

References frame, FrameID::framenum, Shape::getFrame(), and getShape().

MapGlob * GameData::getGlob ( uint32  glob  )  const

Definition at line 102 of file GameData.cpp.

References globs.

Referenced by GlobEgg::enterFastArea().

GumpShapeArchive* GameData::getGumps (  )  const [inline]

Definition at line 56 of file GameData.h.

References gumps.

Referenced by SliderGump::InitGump(), ScrollGump::InitGump(), ReadableGump::InitGump(), QuitGump::InitGump(), PagedGump::InitGump(), MiniStatsGump::InitGump(), MenuGump::InitGump(), BookGump::InitGump(), Item::openGump(), and ShapeViewerGump::U8ShapeViewer().

MainShapeArchive* GameData::getMainShapes (  )  const [inline]

Definition at line 52 of file GameData.h.

References mainshapes.

Referenced by ItemSorter::BeginDisplayList(), ItemFactory::createItem(), Actor::die(), Item::getShapeInfoFromGameInstance(), Item::getShapeObject(), Actor::giveTreasure(), AnimationTracker::init(), WpnOvlayDat::load(), AnimationTracker::load(), TypeFlags::loadArmourInfo(), Map::loadFixedFormatObjects(), ItemSorter::PaintSortItem(), PaperdollGump::PaintThis(), ContainerGump::PaintThis(), and ShapeViewerGump::U8ShapeViewer().

Usecode* GameData::getMainUsecode (  )  const [inline]

Definition at line 51 of file GameData.h.

References mainusecode.

Referenced by Item::callUsecodeEvent(), UCProcess::dumpInfo(), and UCProcess::UCProcess().

Shape* GameData::getMouse (  )  const [inline]

Definition at line 57 of file GameData.h.

References mouse.

Referenced by GUIApp::CreateHWCursors(), GUIApp::myWindowProc(), and GUIApp::paint().

MusicFlex* GameData::getMusic (  )  const [inline]

Definition at line 58 of file GameData.h.

References music.

Referenced by TimidityMidiDriver::open(), FMOplMidiDriver::open(), MusicProcess::playMusic_internal(), and MusicProcess::run().

Shape * GameData::getShape ( FrameID  frameid  )  const

Definition at line 123 of file GameData.cpp.

References FrameID::flexid, ShapeArchive::getShape(), getShapeFlex(), and FrameID::shapenum.

Referenced by ButtonWidget::ButtonWidget(), getFrame(), U8SaveGump::InitGump(), SliderGump::InitGump(), QuitGump::InitGump(), and Gump::SetShape().

ShapeArchive * GameData::getShapeFlex ( uint16  flexId  )  const

Definition at line 110 of file GameData.cpp.

References gumps, GUMPS, mainshapes, and MAINSHAPES.

Referenced by getShape(), Gump::loadData(), and ButtonWidget::loadData().

SoundFlex* GameData::getSoundFlex (  )  const [inline]

Definition at line 60 of file GameData.h.

References soundflex.

Referenced by AudioProcess::playSFX().

SpeechFlex * GameData::getSpeechFlex ( uint32  shapenum  ) 

Definition at line 468 of file GameData.cpp.

References CoreApp::get_instance(), FileSystem::get_instance(), CoreApp::getGameInfo(), GameInfo::getLanguageFileLetter(), perr, FileSystem::ReadFile(), snprintf(), and speech.

Referenced by AudioProcess::continueSpeech(), AudioProcess::getSpeechLength(), and AudioProcess::playSpeech().

WpnOvlayDat* GameData::getWeaponOverlay (  )  const [inline]

Definition at line 59 of file GameData.h.

References weaponoverlay.

Referenced by MainActor::getWeaponOverlay().

void GameData::loadRemorseData (  ) 

Definition at line 502 of file GameData.cpp.

References CrusaderShapeFormat, fixed, fonts, RawArchive::get_datasource(), ConfigFileManager::get_instance(), PaletteManager::get_instance(), CoreApp::get_instance(), FileSystem::get_instance(), Pentagram::Archive::getCount(), CoreApp::getGameInfo(), GameInfo::getLanguageUsecodeLetter(), IDataSource::getSize(), globs, GUMPS, gumps, WpnOvlayDat::load(), MainShapeArchive::loadAnimDat(), GumpShapeArchive::loadGumpage(), loadTranslation(), MainShapeArchive::loadTypeFlags(), MAINSHAPES, mainshapes, mainusecode, mouse, music, OTHER, PaletteManager::Pal_Game, perr, pout, IDataSource::read(), ConfigFileManager::readConfigFile(), FileSystem::ReadFile(), FontShapeArchive::setHVLeads(), Shape::setPalette(), soundflex, and weaponoverlay.

Referenced by RemorseGame::loadFiles().

void GameData::loadTranslation (  )  [private]

Definition at line 139 of file GameData.cpp.

References GameInfo::GAME_U8, GameInfo::GAMELANG_ENGLISH, GameInfo::GAMELANG_FRENCH, GameInfo::GAMELANG_GERMAN, GameInfo::GAMELANG_JAPANESE, GameInfo::GAMELANG_SPANISH, CoreApp::get_instance(), ConfigFileManager::get_instance(), CoreApp::getGameInfo(), GameInfo::language, perr, pout, ConfigFileManager::readConfigFile(), and GameInfo::type.

Referenced by loadRemorseData(), and loadU8Data().

void GameData::loadU8Data (  ) 

Definition at line 229 of file GameData.cpp.

References fixed, fonts, RawArchive::get_datasource(), ConfigFileManager::get_instance(), PaletteManager::get_instance(), CoreApp::get_instance(), FileSystem::get_instance(), Pentagram::Archive::getCount(), CoreApp::getGameInfo(), GameInfo::getLanguageUsecodeLetter(), IDataSource::getSize(), globs, GUMPS, gumps, WpnOvlayDat::load(), MainShapeArchive::loadAnimDat(), GumpShapeArchive::loadGumpage(), loadTranslation(), MainShapeArchive::loadTypeFlags(), MAINSHAPES, mainshapes, mainusecode, mouse, music, OTHER, PaletteManager::Pal_Game, perr, pout, IDataSource::read(), ConfigFileManager::readConfigFile(), FileSystem::ReadFile(), FontShapeArchive::setHVLeads(), Shape::setPalette(), soundflex, and weaponoverlay.

Referenced by U8Game::loadFiles().

void GameData::setupFontOverrides (  ) 

Definition at line 383 of file GameData.cpp.

References GameInfo::GAMELANG_JAPANESE, CoreApp::get_instance(), CoreApp::getGameInfo(), GameInfo::language, setupJPOverrides(), and setupTTFOverrides().

Referenced by GUIApp::startupGame().

void GameData::setupJPOverrides (  )  [private]

Definition at line 392 of file GameData.cpp.

References FontManager::addJPOverride(), SettingManager::get(), FontManager::get_instance(), ConfigFileManager::get_instance(), SettingManager::get_instance(), ConfigFileManager::listKeyValues(), perr, setupTTFOverrides(), and Pentagram::SplitString().

Referenced by setupFontOverrides().

void GameData::setupTTFOverrides ( const char *  configkey,
bool  SJIS 
) [private]

Definition at line 429 of file GameData.cpp.

References FontManager::addTTFOverride(), SettingManager::get(), FontManager::get_instance(), SettingManager::get_instance(), ConfigFileManager::get_instance(), ConfigFileManager::listKeyValues(), perr, and Pentagram::SplitString().

Referenced by setupFontOverrides(), and setupJPOverrides().

FrameID GameData::translate ( FrameID  frame  ) 

Definition at line 192 of file GameData.cpp.

References ConfigFileManager::exists(), FrameID::flexid, FrameID::framenum, ConfigFileManager::get(), ConfigFileManager::get_instance(), GUMPS, n, perr, and FrameID::shapenum.

std::string GameData::translate ( std::string  text  ) 

Definition at line 178 of file GameData.cpp.

References ConfigFileManager::exists(), ConfigFileManager::get(), and ConfigFileManager::get_instance().


Member Data Documentation

RawArchive* GameData::fixed [private]

Definition at line 80 of file GameData.h.

Referenced by getFixed(), loadRemorseData(), loadU8Data(), and ~GameData().

FontShapeArchive* GameData::fonts [private]

Definition at line 84 of file GameData.h.

Referenced by getFonts(), loadRemorseData(), loadU8Data(), and ~GameData().

GameData * GameData::gamedata = 0 [static, private]

Definition at line 93 of file GameData.h.

Referenced by GameData(), get_instance(), and ~GameData().

std::vector<MapGlob*> GameData::globs [private]

Definition at line 83 of file GameData.h.

Referenced by getGlob(), loadRemorseData(), loadU8Data(), and ~GameData().

GumpShapeArchive* GameData::gumps [private]

Definition at line 85 of file GameData.h.

Referenced by getGumps(), getShapeFlex(), loadRemorseData(), loadU8Data(), and ~GameData().

MainShapeArchive* GameData::mainshapes [private]

Definition at line 81 of file GameData.h.

Referenced by getMainShapes(), getShapeFlex(), loadRemorseData(), loadU8Data(), and ~GameData().

Usecode* GameData::mainusecode [private]

Definition at line 82 of file GameData.h.

Referenced by getMainUsecode(), loadRemorseData(), loadU8Data(), and ~GameData().

Shape* GameData::mouse [private]

Definition at line 86 of file GameData.h.

Referenced by getMouse(), loadRemorseData(), loadU8Data(), and ~GameData().

MusicFlex* GameData::music [private]

Definition at line 87 of file GameData.h.

Referenced by getMusic(), loadRemorseData(), loadU8Data(), and ~GameData().

SoundFlex* GameData::soundflex [private]

Definition at line 90 of file GameData.h.

Referenced by getSoundFlex(), loadRemorseData(), loadU8Data(), and ~GameData().

std::vector<SpeechFlex**> GameData::speech [private]

Definition at line 91 of file GameData.h.

Referenced by getSpeechFlex(), and ~GameData().

WpnOvlayDat* GameData::weaponoverlay [private]

Definition at line 88 of file GameData.h.

Referenced by getWeaponOverlay(), loadRemorseData(), loadU8Data(), and ~GameData().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:16 2007 for pentagram by  doxygen 1.4.7