![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
Packs of external game media. More...
#include <ResourcePack.h>
Public Member Functions | |
| 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... | |
Packs of external game media.
Resource packs contain all the game media that's loaded externally, like graphics, fonts, languages, audio and world map.
| OpenXcom::ResourcePack::ResourcePack | ( | ) |
Create a new resource pack with a folder's contents.
Initializes a blank resource set pointing to a folder.
|
virtual |
Cleans up the resource pack.
Deletes all the loaded resources.
| Font * OpenXcom::ResourcePack::getFont | ( | const std::string & | name | ) | const |
Gets a particular font.
Returns a specific font from the resource set.
| name | Name of the font. |
| Music * OpenXcom::ResourcePack::getMusic | ( | const std::string & | name | ) | const |
Gets a particular music.
Returns a specific music from the resource set.
| name | Name of the music. |
| Palette * OpenXcom::ResourcePack::getPalette | ( | const std::string & | name | ) | const |
Gets a particular palette.
Returns a specific palette from the resource set.
| name | Name of the palette. |
| std::list< Polygon * > * OpenXcom::ResourcePack::getPolygons | ( | ) |
Gets the list of world polygons.
Returns the list of polygons in the resource set.
| std::list< Polyline * > * OpenXcom::ResourcePack::getPolylines | ( | ) |
Gets the list of world polylines.
Returns the list of polylines in the resource set.
| Music * OpenXcom::ResourcePack::getRandomMusic | ( | const std::string & | name | ) | const |
Gets a random music.
Returns a random music from the resource set.
| name | Name of the music to pick from. |
| Sound * OpenXcom::ResourcePack::getSound | ( | const std::string & | set, |
| unsigned int | sound | ||
| ) | const |
Gets a particular sound.
Returns a specific sound from the resource set.
| set | Name of the sound set. |
| sound | ID of the sound. |
| Surface * OpenXcom::ResourcePack::getSurface | ( | const std::string & | name | ) | const |
Gets a particular surface.
Returns a specific surface from the resource set.
| name | Name of the surface. |
| SurfaceSet * OpenXcom::ResourcePack::getSurfaceSet | ( | const std::string & | name | ) | const |
Gets a particular surface set.
Returns a specific surface set from the resource set.
| name | Name of the surface set. |
| std::vector< Uint16 > * OpenXcom::ResourcePack::getVoxelData | ( | ) |
Gets list of voxel data.
Returns the list of voxeldata in the resource set.
| void OpenXcom::ResourcePack::playMusic | ( | const std::string & | name, |
| bool | random = false |
||
| ) |
Plays a particular music.
Plays the specified track if it's not already playing.
| name | Name of the music. |
| random | Pick a random track? |
| void OpenXcom::ResourcePack::setPalette | ( | SDL_Color * | colors, |
| int | firstcolor = 0, |
||
| int | ncolors = 256 |
||
| ) |
Sets a new palette.
Changes the palette of all the graphics in the resource set.
| colors | Pointer to the set of colors. |
| firstcolor | Offset of the first color to replace. |
| ncolors | Amount of colors to replace. |
1.8.6