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.
#include "SoSystem.h"#include "SoMode4Renderer.h"#include "SoTables.h"#include "SoMath.h"#include "SoVector.h"#include "SoMode4PolygonRasterizer.h"#include "SoDisplay.h"#include "SoFont.h"#include "SoDebug.h"#include "SoPalette.h"Data Structures | |
| struct | SoEdgeTableEntry |
| Structure to contain starting or ending values for a horizontal scanline slice of a polygon. More... | |
Functions | |
| void | SoMode4PolygonRasterizerDrawTexturedPolygonFromEdgeTables (void) |
| Draws a textured polygon from the information in the edge tables. | |
| void | SoMode4PolygonRasterizerDrawSolidPolygonFromEdgeTables (u32 a_PaletteIndex) |
| Draws a solid polygon from the information in the edge tables. | |
| void | SoMode4PolygonRasterizerDraw4x4TriangleFromCode (void *a_4x4WordAddress, u32 a_WordOffset, u32 a_QuadPaletteIndex, u32 a_TriangleCode) |
| Draws a 4 by 4 triangle from the given 10 bit code. | |
| void | SoMode4PolygonRasterizerSetBuffer (void *a_Buffer) |
| Sets the backbuffer the rasterizer will render to. | |
| void | SoMode4PolygonRasterizerSetTexture (SoImage *a_Texture) |
| Sets the texture the rasterizer should use for textured polygons. | |
| void | SoMode4PolygonRasterizerInitialize (void) |
| Initializes the rasterizer. | |
| void | SoMode4PolygonRasterizerDrawTexturedPolygon (u32 a_NumVertices, SoVector2 *a_ScreenCoordinates, SoVector2 *a_TextureCoordinates) |
| Draws a textured polygon. | |
| void | SoMode4PolygonRasterizerDrawSolidPolygon (u32 a_NumVertices, SoVector2 *a_ScreenCoordinates, u32 a_PaletteIndex) |
| Draws a solid single color polygon. | |
| void | SoMode4PolygonRasterizerDrawSolidTriangleC (SoVector2 a_Triangle[3], u32 a_PaletteIndex) |
| C version of the assembly solid triangle rasterizer;. | |
Variables | |
| u8 * | s_TextureData |
| Current texture data used to draw a polygon. | |
| s32 | s_TextureUShift |
| 2log( texture width ) | |
| s32 | s_TextureVShift |
| 2log( texture height ) | |
| s32 | s_TextureUMask |
| Used for texture coord wrapping;. | |
| s32 | s_TextureVMask |
| Used for texture coord wrapping;. | |
| s32 | s_PolygonMinY |
| Maximum screen Y of a polygon. | |
| s32 | s_PolygonMaxY |
| Minimum screen Y of a polygon. | |
| SoEdgeTableEntry | s_EdgeTableL [SO_SCREEN_HEIGHT] |
| Table containing the info of the left side. | |
| SoEdgeTableEntry | s_EdgeTableR [SO_SCREEN_HEIGHT] |
| bool | s_Initialized |
| True once SoMode4PolygonRasterizerInitialize is called. | |
| u16 * | g_SoMode4PolygonRasterizerBuffer |
| Pointer the polygon routines will render to. | |
|
||||||||||||||||||||
|
Draws a 4 by 4 triangle from the given 10 bit code.
For internal use only. Only called from within SoMode4PolygonRasterizerDraw4x4Triangle
|
|
|
Draws a solid polygon from the information in the edge tables.
For internal use only.
This function is called by SoMode4PoygonRasterizerDrawSolidPolygon after that function has filled the edge tables. |
|
|
Draws a textured polygon from the information in the edge tables.
For internal use only.
This function is called by SoMode4PoygonRasterizerDrawTexturedPolygon after that function has filled the edge tables. |
|
|
Table containing the info of the left side.
For internal use only.
|
|
|
For internal use only. Table containing the info of the right side of the polygon for every horizontal scanline. |
|
|
Minimum screen Y of a polygon.
For internal use only.
|
|
|
Maximum screen Y of a polygon.
For internal use only.
|
|
|
Current texture data used to draw a polygon.
For internal use only.
|
|
|
Used for texture coord wrapping;.
For internal use only.
|
|
|
2log( texture width )
For internal use only.
|
|
|
Used for texture coord wrapping;.
For internal use only.
|
|
|
2log( texture height )
For internal use only.
|