N64® Functions Menu
|
al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive
|
|
mksprite
mksprite32
mkisprite
Format
mksprite spname img.rgb tx ty overlap > ../sp_spname.h
mksprite32 spname img.rgb tx ty overlap > ../sp_spname.h
mkisprite spname img.rgb tx ty overlap > ../sp_spname.h
What These Tools Do
They convert .rgb files to the C Sprite data structure. Specifically, the mksprite family of programs converts large images into smaller pieces
(tiles) that can be loaded individually into TMEM and drawn next to each
other using the sprite library of functions (see sp). Currently
there are two fully functional texel types supported: 32-bit RGBA (use
mksprite32), and 16-bit RGBA (5:5:5:1) (use mksprite). Also supported
for small image sizes (single tiles), is 8-bit Color Index (CI) mode (use
mkisprite). Support for other texel types could be added, but because these commands are just csh scripts, customization is relatively easy.
The current application framework assumes that sprite textures are stored
in a subdirectory called Texture. These commands are assumed to be run
in this subdirectory, in which case, their output file ../sp_basename.h
will be in the application directory.
Command Line Options
- spname All created files and declared structures and arrays are
prefixed with this basename. This keeps the names of
sprite components distinct.
- img.rgb Is the SGI format image file. This is the basic texture that is drawn when the generated sprite is drawn. If
this is a 4-channel (RGBA) image, then the indicated
alpha will be used, otherwise it is assumed that
alpha=1.0 for the while image.
- tx Is the width of the basic tile. This does not include the
overlap, if any, with the horizontally adjacent tile.
Also, the rightmost column of tiles may have a smaller
width.
- ty Is the height of the basic tile. This does not include the
overlap, if any, with the vertically adjacent tile.
Also, the bottommost row of tiles may have a smaller
height.
- overlap This parameter indicates how many extra texels will be
added to the right and bottom of each tile. Sprites
that will be used in SP_FASTCOPY mode should use overlap
of 0. Sprites that will be scaled or shifted by
fractional amounts should have an overlap of 1 to ensure
seamless transitions from one tile to the next.
- ../sp_spname.h This is the recommended filename for the generated Sprite structure.
See Also
rgb2c
sp
|
Nintendo® Confidential
Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998
|
|