G2D Demos

# G2D Sample Demos

## Location

`$NitroSystem/build/demos/g2d`

## Compilation

Move to the `$NitroSystem/build/demos/g2d` and enter

> `% make`

Executable (`.nef`, `.srl`) files will be generated in

> `$NitroSystem/build/demos/g2d/samples/sample_name/bin/platform/target`

For example:

> `$NitroSystem/build/demos/g2d/samples/Cell_simple/bin/ARM9-TS/Release/`

## Execution

Move to the `$NitroSystem/build/demos/g2d/[samples | bg | Text]/sample_name/bin/platform/target/` directory and perform one of the following:

- Execute `*.srl` with ensata.
- Load and execute a `*.nlf` file with IS-NITRO-DEBUGGER.
- Execute a `*.srl` file with IS-NITRO-DEBUGGER.

## Description

#### OBJ Samples

`Cell_Simple` | This sample draws a simple cell. It uses a low-level API.
`CellAnimation` | This sample draws and updates cell animation.
`Entity` | This sample uses an entity to display cell animation. It also switches the color palette.
`MultiCellAnimation` | This sample draws and updates multicell animation.
`OamManagerEx` | This is an extended OAM manager sample. It displays more than 128 OBJ in time division and displays OBJ using the OBJ drawing order specifications and the display priority.
`OamManagerEx2` | This is an extended OAM manager sample. This sample of the application combines OAM manager and extends OAM manager.
`OamManagerEx3` | This sample uses the extended OAM manager in combination with the renderer.
`Renderer_2LCD` | This sample uses the renderer module to display two screens. The screen display area can be changed.
`Renderer_Simple` | This sample draws cell animation using the renderer module.
`SoftwareSprite` | This is a software sprite drawing sample. It displays many sprites on the screen.
`SoftwareSprite2` | This is a software sprite drawing sample. It uses various attributes to display sprites on the screen.
`VRamAnimation` | This sample draws VRAM transfer animation.
`Renderer_Callback1` | The user can costumize this sample using the callback function of the renderer.
``Renderer_Callback2`` | This sample performs visible calling of each OBJ by using the callback function of the renderer.
``Renderer_Callback2`` | This sample evaluates the performance of the renderer.
``RendererCore`` | This sample shows how to use the renderer core by itself.
`RendererCore2` | This sample shows how to use the renderer core API. It also evaluates performance.
`OamSoftwareSpriteDraw` | This sample compares the performance of each OAM for the software sprite drawing API.
`Renderer_CharChange` | This sample renders by changing image proxies used by the renderer. Uses the partial character-data conversion with the -cr option of the converter.
`UserExAttribute` | This demo uses the user extended attribute.
`MultiCell_UILayout` | This demo uses multicell to perform the user interface process.

#### BG Samples

`MinimumBG` | Displays BG on the upper and lower screens.
`ShareBG` | Displays BG that shares character and color palette.
`BgEx` | Displays the BG that uses the extended palette and partial character data.

#### Text Drawing Samples

`BGText` | Displays text strings on a text BG.
`BGAffine` | Displays text strings on an affine BG.
`OBJ1D` | Displays text strings on a 1D mapping OBJ.
`OBJ2DRect` | Displays text strings on a 2D mapping OBJ.
`CanvasCell` | Displays CharCanvas as a cell.
`ShiftJISText` | Displays ShiftJIS text strings.
`UTF16Text` | Displays UTF16 text strings.
`UTF8Text` | Displays UTF8 text strings.
`DoubleBuffering` | Displays text strings using an off-screen buffer.
`DrawLetter` | Sample that uses text drawing function.
`DrawLetters` | Sample that uses text-string drawing function.
`DrawTaggedText` | Sample using `NNS_G2dTextCanvasDrawTaggedText`.
`MinimumCanvas` | Dynamically constructs CharCanvas to match the text strings.
`SimpleFontView` | Simply displays of glyph image in the font resource.

## Operating Environment

Normal operation for all of the samples using the IS-NITRO-EMULATOR and ensata have been confirmed.

## See Also

`G2D Function List`

## Revision History

09/01/2005 Added the sample Renderer_CharChange UserExAttribute MultiCell_UILayout. 07/12/2005 Added the sample CanvasCell. 06/27/2005 Added the sample BgEx. 06/06/2005 Added the sample Renderer_CharChange. 05/25/2005 Added text drawing samples
03/28/2005 Added `OamManagerEx3`.
01/24/2005 Deleted the description of IS-NITRO-EMULATOR in the Execution section, deleted the description of TEG in the Operating Environment section, and changed TS to IS-NITRO-EMULATOR 12/06/2004 Added `OamManagerEx2` sample
11/10/2004 Added six samples: `Renderer_Callback1` `Renderer_Callback2` `Renderer_PerfCheck` `RendererCore` `RendererCore2` `OamSoftwareSpriteDraw` 09/02/2004 Added `BG` samples.
08/02/2004 Initial version.