The Socrates Gameboy Advance Development Engine
The SGADE is a development library for the Nintendo Gameboy
Advance. It's free for all uses and is distributed without guarantees.
For more information visit
the SGADE page.
00001 // ---------------------------------------------------------------------------- 00013 // ---------------------------------------------------------------------------- 00014 00015 #ifndef SO_TEXTURE_H 00016 #define SO_TEXTURE_H 00017 00018 #ifdef __cplusplus 00019 extern "C" { 00020 #endif 00021 00022 00023 // ---------------------------------------------------------------------------- //! @{ 00034 // ---------------------------------------------------------------------------- 00035 00036 // ---------------------------------------------------------------------------- 00037 // Includes 00038 // ---------------------------------------------------------------------------- 00039 #include "SoSystem.h" 00040 00041 // ---------------------------------------------------------------------------- 00042 // Typedefs 00043 // ---------------------------------------------------------------------------- 00044 00052 typedef struct 00053 { 00054 u16 m_Width; 00055 u16 m_Height; 00056 00057 bool m_Palettized; 00058 00059 u16* m_Data; 00060 00061 } SoImage; 00062 00063 // ---------------------------------------------------------------------------- 00064 // Public methods; 00065 // ---------------------------------------------------------------------------- 00066 00067 // u32 SoImageGetWidth( const SoImage* a_This ); 00068 // u32 SoImageGetHeight( const SoImage* a_This ); 00069 // u16* SoImageGetData( const SoImage* a_This ); 00070 // bool SoImageIsPalettized( const SoImage* a_This ); 00071 // void SoImageInitialize( SoImage* a_This, u16 a_Width, u16 a_Height, bool a_Palettized, void* a_Data ); 00072 00073 void SoImageBkgLoad( const SoImage* a_This, u32 a_CharBase, u32 a_BaseIdx ); 00074 00076 #define SoImageGetWidth(a_This) ((const u16)((a_This)->m_Width)) 00077 00079 #define SoImageGetHeight(a_This) ((const u16)((a_This)->m_Height)) 00080 00082 #define SoImageGetData(a_This) ((a_This)->m_Data) 00083 00085 #define SoImageIsPalettized(a_This) ((const bool)((a_This)->m_Palettized)) 00086 00088 #define SoImageInitialize(a_This, a_Width, a_Height, a_Palettized, a_Data) \ 00089 { \ 00090 (a_This)->m_Width = a_Width; \ 00091 (a_This)->m_Height = a_Height; \ 00092 (a_This)->m_Palettized = a_Palettized; \ 00093 (a_This)->m_Data = a_Data; \ 00094 } 00095 00096 00097 // ---------------------------------------------------------------------------- 00098 // EOF; 00099 // ---------------------------------------------------------------------------- 00100 00102 00103 #ifdef __cplusplus 00104 } // extern "C" 00105 #endif 00106 00107 #endif