DSC Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
DSC::AssetData Class Reference
Inheritance diagram for DSC::AssetData:
DSC::ReadOnlyData

Public Member Functions

 __attribute__ ((packed)) short width
 
 __attribute__ ((packed)) short height
 asset width (divided by 8)
 
 AssetData ()
 asset height (divided by 8)

 
int get_color_depth () const
 gets color bit depth of the asset More...
 
bool is_bitmap () const
 checks if the asset is a tileset or a bitmap More...
 
int get_gfx_length () const
 
int get_pal_length () const
 
int get_pal_count () const
 
void extract_gfx (void *destination) const
 
void extract_palette (void *destination) const
 
int get_metatile_width () const
 gets the width of an asset's metatile. If no metatile data is provided, the width of a single 8x8 tile is provided. More...
 
int get_metatile_height () const
 gets the height of an asset's metatile. If no metatile data is provided, the height of a single 8x8 tile is provided. More...
 
int get_metatile_size () const
 gets the size in bytes of an asset's metatile. If no metatile data is provided, the size of a single 8x8 tile is provided. More...
 
- Public Member Functions inherited from DSC::ReadOnlyData
 __attribute__ ((packed)) short header_size
 Some technical observations to account for during implementation:

 
 __attribute__ ((packed)) int data_length
 equilavent of sizeof(*this), but foresees class inheritance
 
 __attribute__ ((packed)) char *data_source
 size in bytes of the actual data

 
 __attribute__ ((packed)) unsigned short flags
 
 ReadOnlyData (int header_size=sizeof(ReadOnlyData))
 
void extract (void *destination) const
 writes all binary data to the given address More...
 
void extract (void *destination, int offset, int length) const
 writes binary data sequence to the given address More...
 
 ReadOnlyData (const ReadOnlyData &)=delete
 
 ReadOnlyData (ReadOnlyData &&)=delete
 
ReadOnlyData operator= (const ReadOnlyData &)=delete
 
ReadOnlyData operator= (ReadOnlyData &&)=delete
 
bool is_file () const
 checks if data is written to file More...
 

Static Public Attributes

static const int ROA_IS_BITMAP
 
static const int ROA_COLOR_DEPTH
 
static const int ROA_METATILE_WIDTH
 
static const int ROA_METATILE_HEIGHT
 

Member Function Documentation

◆ get_color_depth()

int DSC::AssetData::get_color_depth ( ) const

gets color bit depth of the asset

Returns
color depth (4,8 or 16)

◆ get_metatile_height()

int DSC::AssetData::get_metatile_height ( ) const

gets the height of an asset's metatile. If no metatile data is provided, the height of a single 8x8 tile is provided.

Returns
If the asset is a tileset, the height of the metatile measured in 8x8 tiles is returned. If the asset is a bitmap, the height of the metatile measured in pixels is returned

◆ get_metatile_size()

int DSC::AssetData::get_metatile_size ( ) const

gets the size in bytes of an asset's metatile. If no metatile data is provided, the size of a single 8x8 tile is provided.

Returns
The size in bytes of a metatile

◆ get_metatile_width()

int DSC::AssetData::get_metatile_width ( ) const

gets the width of an asset's metatile. If no metatile data is provided, the width of a single 8x8 tile is provided.

Returns
If the asset is a tileset, the width of the metatile measured in 8x8 tiles is returned. If the asset is a bitmap, the width of the metatile measured in pixels is returned

◆ is_bitmap()

bool DSC::AssetData::is_bitmap ( ) const

checks if the asset is a tileset or a bitmap

Returns
true if it is bitmap, false otherwise

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