The SGADE Documentation

the SGADE 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.


Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

SoSpriteAnimation.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00013 // ----------------------------------------------------------------------------
00014 
00015 #ifndef SO_SPRITEANIMATION_H
00016 #define SO_SPRITEANIMATION_H
00017 
00018 #ifdef __cplusplus
00019     extern "C" {
00020 #endif
00021 
00022 
00023 // ---------------------------------------------------------------------------- //! @{
00032 // ----------------------------------------------------------------------------
00033 
00034 
00035 // ----------------------------------------------------------------------------
00036 // Includes
00037 // ----------------------------------------------------------------------------
00038 
00039 #include "SoSystem.h"
00040 
00041 // ----------------------------------------------------------------------------
00042 // Typedefs
00043 // ----------------------------------------------------------------------------
00044 
00053 typedef struct
00054 {   
00055     bool    m_16Colors;     
00056     u8      m_Width;        
00057     u8      m_Height;       
00058     u8      m_NumFrames;    
00059     u8*     m_Data;         
00060 
00061 } SoSpriteAnimation;
00062 
00063 // ----------------------------------------------------------------------------
00064 // Public methods;
00065 // ----------------------------------------------------------------------------
00066 u32  SoSpriteAnimationGetSize(               const SoSpriteAnimation* a_This );
00067 u32  SoSpriteAnimationGetNumIndicesPerFrame( const SoSpriteAnimation* a_This );
00068 
00069 // u32  SoSpriteAnimationGetFrameWidth(  const SoSpriteAnimation* a_This );
00070 // u32  SoSpriteAnimationGetFrameHeight( const SoSpriteAnimation* a_This );
00071 // u32  SoSpriteAnimationGetNumFrames(    const SoSpriteAnimation* a_This );
00072 // bool SoSpriteAnimationIs16Colors(      const SoSpriteAnimation* a_This );
00073 
00074 // u8*  SoSpriteAnimationGetData(         const SoSpriteAnimation* a_This );
00075 
00077 #define SoSpriteAnimationGetFrameWidth(a_This) ((const u8)((a_This)->m_Width))
00078 
00080 #define SoSpriteAnimationGetFrameHeight(a_This)  ((const u8)((a_This)->m_Height))
00081 
00083 #define SoSpriteAnimationGetNumFrames(a_This)  ((const u8)((a_This)->m_NumFrames))
00084 
00086 #define SoSpriteAnimationIs16Colors(a_This)  ((const bool)((a_This)->m_16Colors))
00087 
00091 #define SoSpriteAnimationGetData(a_This)  ((a_This)->m_Data)
00092 
00093 
00094 // ----------------------------------------------------------------------------
00095 // EOF
00096 // ----------------------------------------------------------------------------
00097 
00099 
00100 #ifdef __cplusplus
00101 } // extern "C"
00102 #endif
00103 
00104 #endif

Copyright 2002 by the SGADE authors. See SoLicense.h or Visit the SGADE page for more information.