Ares
Public Member Functions | Public Attributes

CustomPalette Class Reference

#include <src/Utilities/Constructs.h>

List of all members.

Public Member Functions

 CustomPalette ()
 ~CustomPalette ()
bool LoadFromINI (CCINIClass *pINI, const char *pSection, const char *pKey, const char *pDefault="")

Public Attributes

ConvertClass * Convert
BytePalette * Palette

Constructor & Destructor Documentation

CustomPalette::CustomPalette ( ) [inline]
                        :
                Convert(NULL),
                Palette(NULL)
        {};
CustomPalette::~CustomPalette ( ) [inline]
                         {
                GAME_DEALLOC(this->Convert);
                GAME_DEALLOC(this->Palette);
        }

Member Function Documentation

bool CustomPalette::LoadFromINI ( CCINIClass *  pINI,
const char *  pSection,
const char *  pKey,
const char *  pDefault = "" 
) [inline]
                                                                                                            {
                if(pINI->ReadString(pSection, pKey, pDefault, Ares::readBuffer, Ares::readLength)) {
                        if(char * suffix = strstr(Ares::readBuffer, "~~~")) {
                                const char * theaterSpecific = Theater::Array[ScenarioClass::Instance->Theater].Extension;
                                suffix[0] = theaterSpecific[0];
                                suffix[1] = theaterSpecific[1];
                                suffix[2] = theaterSpecific[2];
                        }
                        GAME_DEALLOC(this->Palette);
                        GAME_DEALLOC(this->Convert);
                        this->Palette = NULL;
                        this->Convert = NULL;
                        ConvertClass::CreateFromFile(Ares::readBuffer, &this->Palette, &this->Convert);
                        return !!this->Convert;
                }
                return false;
        };

Member Data Documentation

ConvertClass* CustomPalette::Convert
BytePalette* CustomPalette::Palette

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines