G2D-test

Description

This sample game demo uses the G2D library. This game demo demonstrates the following:

For details about this library, refer to the 2D Graphics Library (G2D) in the Revolution Graphics Programmer's Guide.

Coverage

Functions Parameters Description
G2DinitSprite sprite Pointer to the G2DSprite structure.
G2DDrawSprite sprite Pointer to the G2DSprite structure.
po Pointer to the G2DPosOri structure to which the position and orientation of the sprite have been passed.
G2DDrawLayer layer Pointer to the G2DLayer structure.
aSortBuffer Pointer to work buffer.
G2DSetCamera po Pointer to the G2DPosOri structure to which the position and orientation of the camera have been passed.
G2DInitWorld nWorldX Width of world space in pixels.
nWorldY Height of world space in pixels.
G2DSetViewport nLeft The left side of the screen space coordinates for viewport.
nTop The upper side of the screen space coordinates for viewport.
nWidth Width of viewport in screen space coordinates.
nHeight Height of viewport in screen space coordinates.
GXPosition2f32 X, Z x- and z-coordinates of vertex (used by G2D.c rather than the sample demo).

Using the Demo

The following is a summary of the control methods:

Button Normal / Bounce Mode
START Exits the demo.
Control Stick Move ship.
L and R Rotate ship.
A No function.
B Brake ship.
Y Cycles mode.
X No function.

Snapshot

g2d-test-1.jpg (101393 bytes)

Required Data Files

Requires g2d-00.tpl from the $REVOLUTION_SDK_ROOT/dvddata/gxTests directory.

Revision History

2006/03/01 Initial version.


CONFIDENTIAL