Game Develop Core: gd::RessourcesLoader Class Reference

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
gd::RessourcesLoader Class Reference

Class that is used by games to load resources from an Game Develop Executable ( DatFile ) or from an external file. More...

`#include <RessourcesLoader.h>`

## Public Member Functions

sf::Texture * | LoadSFMLTexture (const std::string &filename)
sf::Font * | LoadFont (const std::string &filename)
sf::SoundBuffer | LoadSoundBuffer (const std::string &filename)
std::string | LoadPlainText (const std::string &filename)
char * | LoadBinaryFile (const std::string &filename)
long int | GetBinaryFileSize (const std::string &filename)

## Static Public Member Functions

static RessourcesLoader * | GetInstance ()
static void | DestroySingleton ()

## Detailed Description

Class that is used by games to load resources from an Game Develop Executable ( DatFile ) or from an external file.

Todo:
  Rename and refactor this class.

## Member Function Documentation

long int gd::RessourcesLoader::GetBinaryFileSize | ( | const std::string & | filename) |  |

Get the size of a file

char * gd::RessourcesLoader::LoadBinaryFile | ( | const std::string & | filename) |  |

Get a buffer for file. Be careful, the buffer will be invalided by any subsequent call to Load[Something]. Make a copy of the buffer if you want it to stay alive longer.

Load a binary text file

sf::Font * gd::RessourcesLoader::LoadFont | ( | const std::string & | filename) |  |

Load a SFML Font

std::string gd::RessourcesLoader::LoadPlainText | ( | const std::string & | filename) |  |

Load a plain text file

sf::Texture * gd::RessourcesLoader::LoadSFMLTexture | ( | const std::string & | filename) |  |

Load a SFML image

sf::SoundBuffer gd::RessourcesLoader::LoadSoundBuffer | ( | const std::string & | filename) |  |

Load a SFML Sound Buffer

The documentation for this class was generated from the following files:

- RessourcesLoader.h
- RessourcesLoader.cpp