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.
Files | |
| file | SoMode4Renderer.c |
| file | SoMode4Renderer.h |
Functions | |
| void | SoMode4RendererEnable (void) |
| Switches the Gameboy Advance to mode 4. | |
| void | SoMode4RendererFlip (void) |
| Flips the two mode 4 buffers. | |
| void | SoMode4RendererClearFrontAndBackBuffer (void) |
| This function clears both the front and the back buffer. | |
| void * | SoMode4RendererGetBuffer (void) |
| Returns a pointer to the current backbuffer;. | |
| void | SoMode4RendererDrawImage (const SoImage *a_Image) |
| Draws the given image in the current backbuffer. | |
| void | SoMode4RendererDrawTransparentImage (const SoImage *a_Image) |
| Draws a transparent image into the current backbuffer. | |
| void | SoMode4RendererDrawCrossFadeImage (const SoImage *a_Image0, const SoImage *a_Image1, u32 a_Fade) |
| Draws a crossfaded version of two images into the backbuffer. | |
| void | SoMode4RendererDrawPixel (u32 a_X, u32 a_Y, u32 a_PalIndex) |
| Plots a single pixel into the backbuffer. | |
| void | SoMode4RendererDrawNumber (u32 a_LeftX, u32 a_RightX, u32 a_TopY, s32 a_Number, const SoImage *a_Font) |
| Draws a number with the given font in the current backbuffer;. | |
| void | SoMode4RendererDrawString (u32 a_LeftX, u32 a_RightX, u32 a_TopY, char *a_String, const SoImage *a_Font) |
| Draws a string with the given font into the current backbuffer. | |
| void | SoMode4RendererClear (void) |
| Clears the current mode4 backbuffer to palette index zero. | |
Singleton
For polygon rendering use the SoMode4PolygonRenderer
|
|
Clears the current mode4 backbuffer to palette index zero.
Remember, it's always better to just draw on the entire backbuffer, so you won't have to clear it. |
|
||||||||||||||||
|
Draws a crossfaded version of two images into the backbuffer.
destPixel = srcPixel0 * (a_Fade / SO_FADE_MAX) + srcPixel1 * (1 - (a_Fade / SO_FADE_MAX)); |
|
|
Draws the given image in the current backbuffer.
|
|
||||||||||||||||||||||||
|
Draws a number with the given font in the current backbuffer;.
|
|
||||||||||||||||
|
Plots a single pixel into the backbuffer.
|
|
||||||||||||||||||||||||
|
Draws a string with the given font into the current backbuffer.
|
|
|
Draws a transparent image into the current backbuffer.
|
|
|
Switches the Gameboy Advance to mode 4.
Use this method before you are going to use any other mode 4 rendering function. This also applies to all SoMode4PolygonRasterizer functions. Make sure you have already called SoDisplayInitialize too. |
|
|
Flips the two mode 4 buffers.
If buffer 0 is visible then buffer 1 becomes visible, and vice versa. |
|
|
Returns a pointer to the current backbuffer;.
Note that if you call SoMode4RendererFlip after using this function, the pointer you have suddenly becomes the frontbuffer. |