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  

SoMode4Renderer.c File Reference

#include "SoMode4Renderer.h"
#include "SoTables.h"
#include "SoMath.h"
#include "SoDisplay.h"
#include "SoFont.h"
#include "SoDMA.h"
#include "SoBkgManager.h"
#include "SoDebug.h"

Defines

#define SO_SCREEN_BUFFER_0
 Pointer to the first mode 4 buffer.

#define SO_SCREEN_BUFFER_1
 Pointer to the second mode 4 buffer.


Functions

void SoMode4RendererEnable (void)
 Switches the Gameboy Advance to mode 4.

void SoMode4RendererFlip (void)
 Flips the two mode 4 buffers.

void * SoMode4RendererGetBuffer (void)
 Returns a pointer to the current backbuffer;.

void SoMode4RendererDrawPixel (u32 a_X, u32 a_Y, u32 a_PalIndex)
 Plots a single pixel into the 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 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 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 SoMode4RendererClearFrontAndBackBuffer (void)
 This function clears both the front and the back buffer.


Variables

u16s_SoMode4RendererBackBuffer

Detailed Description

Copyright (C) 2002 by the SGADE authors For conditions of distribution and use, see copyright notice in SoLicense.txt

Author:
Jaap Suter, Gabriele Scibilia, Mark T. Price
Date:
June 28, 2003
See the SoMode4Renderer module for more information.


Define Documentation

#define SO_SCREEN_BUFFER_0
 

Pointer to the first mode 4 buffer.

For internal use only.

#define SO_SCREEN_BUFFER_1
 

Pointer to the second mode 4 buffer.

For internal use only.


Variable Documentation

u16* s_SoMode4RendererBackBuffer
 

For internal use only.

Pointer to the current mode 4 backbuffer. Not static because we need it in an assembly file too.


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