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
|
|
rgb2c
Syntax
rgb2c [-m name] [-f fmt] [-o output]
[-s bits] [-t citype] [-l r,g,b]
[-h r,g,b] [-F] [-P] [-Q]
[-S smask] [-X] [-b] [-r]
infile.rgb
Explanation
It converts an .rgb file to a C data structure. Specifically, it reads an SGI RGB image file and generates a C data structure to standard output. The input image can have from 1 to 4 planes:
- A 1-plane input file is assumed to be intensity only.
- A 2-plane input file is assumed to be intensity/alpha.
- A 3-plane input file is treated as RGB.
- A 4-plane input file is treated as RGBA.
The currently supported output formats are:
- Intensity (4/8 bit)
- Intensity/Alpha (4/8/16 bit)
- RGBA (16/32 bit)
Any other specified
combination of type and bit size is mapped to one of these three choices.
Command Line Options
- -m name Is the name of the C data structure; it defaults to texture.
- -f fmt Specifies the format of the output. Choices are I, IA, or RGBA.
- -o output Specifies the format of output text. Choices are C for .c output, MIP for mip-mapped .c output, MIPSUPPLIED for mip-mapped .c output with the different levels
supplied, or RAW for raw ASCII format. When you use MIPSUPPLIED, name the texture files name0.rgb, name1.rgb, name2.rgb, and so on where name0.rgb is the top level image and each successive image is exactly
half the size (in x and y) of the preceding one.
- -s bits Specifies the bit size of the output data. Choices are 4, 8, 16, or 32.
- -t citype Specifies the bit size of the output data. Choices are 4, 8, 16, or 32.
- -l r,g,b Specifies the low colors for interpolation. It defaults to 0, 0, 0.
- -h r,g,b Specifies the high colors for interpolation. It defaults to 255, 255, 255.
- -F Flips the image vertically.
- -P Toggles padding of texel rows for use with gDPLoadBlock. The default is padding on.
- -Q Quadricates (replicates each entry four times) the lookup table that is output for CI type textures. Use this option
when loading TLUTs using the load_block command
(as is done for version 1 of the hardware).
- -S smask Swaps 32-bit words on odd lines, toggling bit smask in texels.
- -X Adds extra padding to make all declared objects a multiple of 32 bytes long.
- -b Toggles shifting each tile by 0.5. This is necessary when MIP map levels are supplied (output type
MIPSUPPLIED), when the shift has been performed, and when the
lower levels were filtered. Ususlly you don't need to use this
option.
- -r Excludes the raw data. This can be used when the
output type is MIP or MIPSUPPLIED to avoid including
extraneous data that will eat memory space. Do not use
this option with C output.
See Also
flt2c
|
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 March 1998
|
|