Skip to content

loadsprite3D() Usage

Ferdian edited this page Aug 26, 2020 · 2 revisions

Description

Quick Load gfx and pallete to RAM and VRAM3D for Sprite3D.
Use only gfx with base 2 size (example: 32x64, 32x128, 16x128) maximum size is 1024x1024
Sprite3D Required to use 8-bit color (256 color)

Values

void loadsprite3D(
    int ramslot,        // RAM slot number
    int vramslot,       // VRAM3D slot number
    int width,          // gfx width
    int height,         // gfx height
    const char *dir,    // gfx file location
    const char *dir2,   // pallete file location
    bool transflag      // keepframes
)

Example:

loadsprite3D(1, 1, 16, 16, "loading/loading1", "loading/loadingpal", false);

load "loading/loading1" gfx to ram slot number 1 and upload to vram3D number 1.
load "loading/loadingpal" pallete to ram slot number 1 and upload to vram3D number 1.


To display Sprite3D

NF_Create3dSprite(0, 1, 1, 10, 10);

create Sprite3D with id 0 using gfx stored in slot vram3D number 1 and pallete stored in slot vram3D number 1.
the sprite is created at the coordinate x:10 y:10

Clone this wiki locally