NNS_G2dCharCanvasMakeCell*

C Specification

#include <nnsys/g2d/g2d_CharCanvas.h>

void NNS_G2dCharCanvasMakeCell1D(
NNSG2dCellData*         pCell,
const NNSG2dCharCanvas* pCC,
int x,
int y,
int priority,
GXOamMode mode,
BOOL mosaic,
GXOamEffect effect,
GXOamColorMode color,
int charName,
int cParam,
NNSG2dOBJVramMode       vramMode,
BOOL makeBR
);

void NNS_G2dCharCanvasMakeCell2DRect(
NNSG2dCellData*         pCell,
const NNSG2dCharCanvas* pCC,
int x,
int y,
int priority,
GXOamMode mode,
BOOL mosaic,
GXOamEffect effect,
GXOamColorMode color,
int charName,
int cParam,
BOOL makeBR
);

Arguments

pCell [OUT] Pointer to the buffer that stores the cell data.
pCC [IN] Pointer to CharCanvas.
x [IN] Center coordinates of cell (in CharCanvas coordinate system).
y [IN] Center coordinates of cell (in CharCanvas coordinate system).
priority [IN] The cell priority
mode [IN] Cell OBJ mode
mosaic [IN] With or without cell mosaic
effect [IN] Cell effect
color [IN] CharCanvas color mode
charName [IN] Starting character name that CharCanvas uses
cParam [IN] Color palette number
vramMode [IN] OBJ VRAM capacity
makeBR [IN] Specifies whether bounding rectangle information should be attached.

Return Values

None.

Description

Constructs a cell for actually displaying CharCanvas initialized using NNS_G2dCharCanvasInitForOBJ1D() and NNS_G2dCharCanvasInitForOBJ2DRect() on screen. By using the G2D renderer to draw the cell constructed by this function, CharCanvas can be easily rotated/scaled/translated for display.

For pCell, allocate a buffer that will be large enough to store the cell data and the various information that will be referenced from the cell data and specify it. The necessary size of this buffer can be obtained using NNS_G2dCharCanvasCalcCellDataSize1D() or NNS_G2dCharCanvasCalcCellDataSize2DRect().

For pCC, specify the pointer to the CharCanvas displayed as the cell.

The center coordinates (x, y) serve as the reference point when using the renderer to draw a cell. The axis point when the image is rotated.

For the OBJ VRAM capacity vramMode, specify one of the following based on the maximum VRAM capacity setting of the hardware.

NNS_G2D_OBJVRAMMODE_32K Maximum capacity of OBJ VRAM that can be used is 32KB
NNS_G2D_OBJVRAMMODE_64K Maximum capacity of OBJ VRAM that can be used is 64KB
NNS_G2D_OBJVRAMMODE_128K Maximum capacity of OBJ VRAM that can be used is 128KB
NNS_G2D_OBJVRAMMODE_256K Maximum capacity of OBJ VRAM that can be used is 256KB

makeBR specifies if bounding rectangle information should be attached. Functions in the same ways as the -br option of g2dcvtr.

For further information about arguments, see G2_SetOBJAttr() in the SDK API Reference.

This function secures an internal work buffer in the stack. The size of this work buffer is relatively large (around 4/3 of the buffer size required for pCell). Be careful to avoid stack overflows.

See Also

Revision History

07/12/2005 Initial version.