OpenXcom
1.0
Open-source clone of the original X-Com
|
Resource pack for the X-Com: UFO Defense game. More...
#include <XcomResourcePack.h>
Public Member Functions | |
XcomResourcePack (std::vector< std::pair< std::string, ExtraSprites * > > extraSprites, std::vector< std::pair< std::string, ExtraSounds * > > extraSounds) | |
Creates the X-Com ruleset. More... | |
~XcomResourcePack () | |
Cleans up the X-Com ruleset. | |
void | loadBattlescapeResources () |
Loads battlescape specific resources. More... | |
bool | isImageFile (std::string extension) |
Checks if an extension is a valid image file. More... | |
Music * | loadMusic (MusicFormat fmt, const std::string &file, int track, float volume, CatFile *adlibcat, CatFile *aintrocat, GMCatFile *gmcat) |
Loads a specified music file. More... | |
Public Member Functions inherited from OpenXcom::ResourcePack | |
ResourcePack () | |
Create a new resource pack with a folder's contents. More... | |
virtual | ~ResourcePack () |
Cleans up the resource pack. More... | |
Font * | getFont (const std::string &name) const |
Gets a particular font. More... | |
Surface * | getSurface (const std::string &name) const |
Gets a particular surface. More... | |
SurfaceSet * | getSurfaceSet (const std::string &name) const |
Gets a particular surface set. More... | |
std::list< Polygon * > * | getPolygons () |
Gets the list of world polygons. More... | |
std::list< Polyline * > * | getPolylines () |
Gets the list of world polylines. More... | |
Music * | getMusic (const std::string &name) const |
Gets a particular music. More... | |
Music * | getRandomMusic (const std::string &name) const |
Gets a random music. More... | |
void | playMusic (const std::string &name, bool random=false) |
Plays a particular music. More... | |
Sound * | getSound (const std::string &set, unsigned int sound) const |
Gets a particular sound. More... | |
Palette * | getPalette (const std::string &name) const |
Gets a particular palette. More... | |
void | setPalette (SDL_Color *colors, int firstcolor=0, int ncolors=256) |
Sets a new palette. More... | |
std::vector< Uint16 > * | getVoxelData () |
Gets list of voxel data. More... | |
Resource pack for the X-Com: UFO Defense game.
OpenXcom::XcomResourcePack::XcomResourcePack | ( | std::vector< std::pair< std::string, ExtraSprites * > > | extraSprites, |
std::vector< std::pair< std::string, ExtraSounds * > > | extraSounds | ||
) |
Creates the X-Com ruleset.
Initializes the resource pack by loading all the resources contained in the original game folder.
extraSprites | List of mod extra sprites. |
extraSounds | List of mod extra sounds. |
bool OpenXcom::XcomResourcePack::isImageFile | ( | std::string | extension | ) |
Checks if an extension is a valid image file.
Determines if an image file is an acceptable format for the game.
extension | Image file extension. |
void OpenXcom::XcomResourcePack::loadBattlescapeResources | ( | ) |
Loads battlescape specific resources.
Loads the resources required by the Battlescape.
Music * OpenXcom::XcomResourcePack::loadMusic | ( | MusicFormat | fmt, |
const std::string & | file, | ||
int | track, | ||
float | volume, | ||
CatFile * | adlibcat, | ||
CatFile * | aintrocat, | ||
GMCatFile * | gmcat | ||
) |
Loads a specified music file.
Loads the specified music file format.
fmt | Format of the music. |
file | Filename of the music. |
track | Track number of the music, if stored in a CAT. |
volume | Volume modifier of the music, if stored in a CAT. |
adlibcat | Pointer to ADLIB.CAT if available. |
aintrocat | Pointer to AINTRO.CAT if available. |
gmcat | Pointer to GM.CAT if available. |