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  

SoBkgCreditScroll.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00013 // ----------------------------------------------------------------------------
00014 
00015 #ifndef SO_BKG_CREDIT_SCROLL_H
00016 #define SO_BKG_CREDIT_SCROLL_H
00017 
00018 #ifdef __cplusplus
00019     extern "C" {
00020 #endif
00021 
00022 // ---------------------------------------------------------------------------- //! @{
00032 // ----------------------------------------------------------------------------
00033 
00034 // ----------------------------------------------------------------------------
00035 // Includes
00036 // ----------------------------------------------------------------------------
00037 
00038 #include "SoSystem.h"
00039 #include "SoBkg.h"
00040 #include "SoDisplay.h"
00041 #include "SoTileMap.h"
00042 
00043 // ----------------------------------------------------------------------------
00044 // Defines
00045 // ----------------------------------------------------------------------------
00046 
00047 #define SO_CREDIT_CODE_TEXT         0x0000  
00048 
00049 #define SO_CREDIT_CODE_SPACE        0x0001  
00050 #define SO_CREDIT_CODE_SPEED        0x0002  
00051 #define SO_CREDIT_CODE_PAUSE        0x0003  
00052 #define SO_CREDIT_CODE_FONT         0x0004  
00053 
00054 #define SO_CREDIT_CODE_ALIGNLEFT    0x4000  
00055 #define SO_CREDIT_CODE_ALIGNRIGHT   0x8000  
00056 #define SO_CREDIT_CODE_ALIGNCENTER  0xc000  
00057 
00058 
00059 //#define SO_BKG_CREDIT_MODE_RAW      0x0000  //!< flag - raw mode display
00060 //#define SO_BKG_CREDIT_MODE_DYNAMIC  0x0001  //!< flag - dynamic mode display
00061 
00062 
00063 // ----------------------------------------------------------------------------
00064 // Typedefs
00065 // ----------------------------------------------------------------------------
00066 
00069 typedef struct {
00070     u32         m_Code; 
00071     const char *m_Data; 
00072 } SoBkgCreditLine;
00073 
00080 typedef struct
00081 {
00082     u16        m_Mode;          
00083     u16        m_Bkg;           
00084     u16        m_ScrollPos;     
00085     u16        m_UpdSpeed;      
00086     u16        m_FrameCnt;      
00087     u16        m_LineCnt;       
00088     u16        m_LineNum;       
00089     u16        m_LineArg;       
00090     const SoBkgCreditLine *m_Lines; 
00091 } SoBkgCreditScroll;
00092 
00093 
00094 // ----------------------------------------------------------------------------
00095 // Public methods;
00096 // ----------------------------------------------------------------------------
00097 
00098 //#define SoBkgCreditScrollIsDynamic(a_This)      ((a_This)->m_Mode & SO_BKG_CREDIT_MODE_DYNAMIC)
00099 
00101 #define SoBkgCreditScrollGetBackground(a_This)  ((const u16)((a_This)->m_Bkg))
00102 
00103 void SoBkgCreditScrollInit(SoBkgCreditScroll *a_This, u16 a_Bkg, u16 a_LineCnt, const SoBkgCreditLine *a_Lines);
00104 bool SoBkgCreditScrollUpdate(SoBkgCreditScroll *a_This);
00105 bool SoBkgCreditScrollDone(SoBkgCreditScroll *a_This);
00106 
00107 // ----------------------------------------------------------------------------
00108 // EOF
00109 // ----------------------------------------------------------------------------
00110 
00112 
00113 #ifdef __cplusplus
00114 } // extern "C"
00115 #endif
00116 
00117 #endif // SO_BKG_CREDIT_SCROLL_H

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