Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Image Class Reference

#include <Image.h>

Inherits MemoryPoolObject.

Public Member Functions

 Image (void)
 
void setName (AsciiString name)
 set image name
 
AsciiString getName (void) const
 return name
 
void setFilename (AsciiString filename)
 set filename
 
AsciiString getFilename (void) const
 return filename
 
void setUV (Region2D *uv)
 set UV coord range
 
const Region2DgetUV (void) const
 get UV coords
 
void setTextureWidth (Int width)
 set width of texture page this image is on
 
void setTextureHeight (Int height)
 set height of texture page this image is on
 
const ICoord2DgetTextureSize (void) const
 return the texture size defined
 
void setImageSize (ICoord2D *size)
 set image width and height
 
const ICoord2DgetImageSize (void) const
 get size
 
Int getImageWidth (void) const
 get width
 
Int getImageHeight (void) const
 get height
 
void setRawTextureData (void *data)
 set raw texture data
 
const void * getRawTextureData (void) const
 get raw texture data
 
UnsignedInt setStatus (UnsignedInt bit)
 set status bit
 
UnsignedInt clearStatus (UnsignedInt bit)
 clear status bit
 
UnsignedInt getStatus (void) const
 get status bits
 
const FieldParsegetFieldParse (void) const
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Static Public Member Functions

static void parseImageCoords (INI *ini, void *instance, void *store, const void *)
 
static void parseImageStatus (INI *ini, void *instance, void *store, const void *)
 

Protected Attributes

AsciiString m_name
 name for this image
 
AsciiString m_filename
 texture filename this image is in
 
ICoord2D m_textureSize
 size of the texture this image is a part of
 
Region2D m_UVCoords
 texture UV coords for image
 
ICoord2D m_imageSize
 dimensions of image
 
void * m_rawTextureData
 raw texture data
 
UnsignedInt m_status
 status bits from ImageStatus
 

Static Protected Attributes

static const FieldParse m_imageFieldParseTable []
 the parse table for INI definition
 

Friends

class ImageCollection
 

Additional Inherited Members

- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

Image bitmap information

Definition at line 66 of file Image.h.

Constructor & Destructor Documentation

◆ Image()

Image::Image ( void )

Definition at line 142 of file Image.cpp.

Member Function Documentation

◆ clearStatus()

UnsignedInt Image::clearStatus ( UnsignedInt bit)

clear status bit

Clear a status bit from the existing status, return the previous status bit collection from before the clear

Definition at line 184 of file Image.cpp.

◆ getFieldParse()

const FieldParse * Image::getFieldParse ( void ) const
inline

Definition at line 97 of file Image.h.

◆ getFilename()

AsciiString Image::getFilename ( void ) const
inline

return filename

Definition at line 156 of file Image.h.

◆ getImageHeight()

Int Image::getImageHeight ( void ) const
inline

get height

Definition at line 165 of file Image.h.

◆ getImageSize()

const ICoord2D * Image::getImageSize ( void ) const
inline

get size

Definition at line 162 of file Image.h.

◆ getImageWidth()

Int Image::getImageWidth ( void ) const
inline

get width

Definition at line 164 of file Image.h.

◆ getName()

AsciiString Image::getName ( void ) const
inline

return name

Definition at line 154 of file Image.h.

◆ getRawTextureData()

const void * Image::getRawTextureData ( void ) const
inline

get raw texture data

Definition at line 167 of file Image.h.

◆ getStatus()

UnsignedInt Image::getStatus ( void ) const
inline

get status bits

Definition at line 168 of file Image.h.

◆ getTextureSize()

const ICoord2D * Image::getTextureSize ( void ) const
inline

return the texture size defined

Definition at line 163 of file Image.h.

◆ getUV()

const Region2D * Image::getUV ( void ) const
inline

get UV coords

Definition at line 158 of file Image.h.

◆ parseImageCoords()

void Image::parseImageCoords ( INI * ini,
void * instance,
void * store,
const void *  )
static

Parse an image coordinates in the form of

COORDS = Left:AAA Top:BBB Right:CCC Bottom:DDD

Definition at line 64 of file Image.cpp.

◆ parseImageStatus()

void Image::parseImageStatus ( INI * ini,
void * instance,
void * store,
const void *  )
static

Parse the image status line

Definition at line 112 of file Image.cpp.

◆ setFilename()

void Image::setFilename ( AsciiString filename)
inline

set filename

Definition at line 155 of file Image.h.

◆ setImageSize()

void Image::setImageSize ( ICoord2D * size)
inline

set image width and height

Definition at line 161 of file Image.h.

◆ setName()

void Image::setName ( AsciiString name)
inline

set image name

Definition at line 153 of file Image.h.

◆ setRawTextureData()

void Image::setRawTextureData ( void * data)
inline

set raw texture data

Definition at line 166 of file Image.h.

◆ setStatus()

UnsignedInt Image::setStatus ( UnsignedInt bit)

set status bit

Set a status bit into the existing status, return the previous status bit collection from before the set

Definition at line 171 of file Image.cpp.

◆ setTextureHeight()

void Image::setTextureHeight ( Int height)
inline

set height of texture page this image is on

Definition at line 160 of file Image.h.

◆ setTextureWidth()

void Image::setTextureWidth ( Int width)
inline

set width of texture page this image is on

Definition at line 159 of file Image.h.

◆ setUV()

void Image::setUV ( Region2D * uv)
inline

set UV coord range

Definition at line 157 of file Image.h.

Friends And Related Symbol Documentation

◆ ImageCollection

friend class ImageCollection
friend

Definition at line 103 of file Image.h.

Member Data Documentation

◆ m_filename

AsciiString Image::m_filename
protected

texture filename this image is in

Definition at line 106 of file Image.h.

◆ m_imageFieldParseTable

const FieldParse Image::m_imageFieldParseTable
staticprotected
Initial value:
=
{
{ "Texture", INI::parseAsciiString, NULL, offsetof( Image, m_filename ) },
{ "TextureWidth", INI::parseInt, NULL, offsetof( Image, m_textureSize.x ) },
{ "TextureHeight", INI::parseInt, NULL, offsetof( Image, m_textureSize.y ) },
{ "Coords", Image::parseImageCoords, NULL, offsetof( Image, m_UVCoords ) },
{ "Status", Image::parseImageStatus, NULL, offsetof( Image, m_status ) },
{ NULL, NULL, NULL, 0 }
}
#define NULL
Definition BaseType.h:92
static void parseInt(INI *ini, void *instance, void *store, const void *userData)
Definition INI.cpp:538
static void parseAsciiString(INI *ini, void *instance, void *store, const void *userData)
Definition INI.cpp:653
Definition Image.h:67
static void parseImageStatus(INI *ini, void *instance, void *store, const void *)
Definition Image.cpp:112
static void parseImageCoords(INI *ini, void *instance, void *store, const void *)
Definition Image.cpp:64
Image(void)
Definition Image.cpp:142
ICoord2D m_textureSize
size of the texture this image is a part of
Definition Image.h:107
Region2D m_UVCoords
texture UV coords for image
Definition Image.h:108
AsciiString m_filename
texture filename this image is in
Definition Image.h:106
UnsignedInt m_status
status bits from ImageStatus
Definition Image.h:111

the parse table for INI definition

Definition at line 45 of file Image.h.

◆ m_imageSize

ICoord2D Image::m_imageSize
protected

dimensions of image

Definition at line 109 of file Image.h.

◆ m_name

AsciiString Image::m_name
protected

name for this image

Definition at line 105 of file Image.h.

◆ m_rawTextureData

void* Image::m_rawTextureData
protected

raw texture data

Definition at line 110 of file Image.h.

◆ m_status

UnsignedInt Image::m_status
protected

status bits from ImageStatus

Definition at line 111 of file Image.h.

◆ m_textureSize

ICoord2D Image::m_textureSize
protected

size of the texture this image is a part of

Definition at line 107 of file Image.h.

◆ m_UVCoords

Region2D Image::m_UVCoords
protected

texture UV coords for image

Definition at line 108 of file Image.h.


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