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  

SoMode4PolygonRasterizer.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00013 // ----------------------------------------------------------------------------
00014 
00015 #ifndef SO_MODE_4_POLYGON_RASTERIZER_H
00016 #define SO_MODE_4_POLYGON_RASTERIZER_H
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 
00023 // ---------------------------------------------------------------------------- //! @{
00035 // ----------------------------------------------------------------------------
00036 
00037 // ----------------------------------------------------------------------------
00038 // Includes
00039 // ----------------------------------------------------------------------------
00040 
00041 #include "SoSystem.h"
00042 #include "SoVector.h"
00043 #include "SoImage.h"
00044 
00045 // --------------------------------------------------------------------------
00046 // Public functions;
00047 // --------------------------------------------------------------------------
00048 
00049 void  SoMode4PolygonRasterizerInitialize(           void );
00050 
00051 void  SoMode4PolygonRasterizerSetBuffer(            void* a_Buffer );
00052 
00053 void  SoMode4PolygonRasterizerSetTexture(           SoImage* a_Texture );
00054 
00055 void SoMode4PolygonRasterizerDrawTexturedPolygon(   u32        a_NumVertices, 
00056                                                     SoVector2* a_ScreenCoordinates, 
00057                                                     SoVector2* a_TextureCoordinates );
00058 
00059 void SoMode4PolygonRasterizerDrawSolidPolygon(      u32 a_NumVertices, SoVector2* a_ScreenCoordinates, 
00060                                                     u32 a_PaletteIndex );
00061 void SoMode4PolygonRasterizerDrawSolidTriangleC( SoVector2 a_Triangle[ 3 ], u32 a_PaletteIndex );
00062 
00063 // --------------------------------------------------------------------------
00064 // Public functions implemented in assembly. These are only documented here
00065 // only because doxygen can't handle documentation in .s files.
00066 // --------------------------------------------------------------------------
00067 
00082 void SoMode4PolygonRasterizerDrawSolidTriangle(     SoVector2 a_Triangle[ 3 ], 
00083                                                     u32       a_PaletteIndex );
00084 
00085 // --------------------------------------------------------------------------
00086 // Private attributes;
00087 // Sadly these need to be global cause we need them in the .c and in the .s
00088 // implementation. I could put them in another .h file, but that would result 
00089 // in more files which is even more ugly. Got any better ideas?
00090 // --------------------------------------------------------------------------
00091 
00105 extern u16* g_SoMode4PolygonRasterizerBuffer;
00106 
00107 
00108 // --------------------------------------------------------------------------
00109 // EOF
00110 // --------------------------------------------------------------------------
00111 
00113 
00114 #ifdef __cplusplus
00115 } // extern "C"
00116 #endif
00117 
00118 #endif

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