File Hosting Not logged in.
Login Register Emblem CTGP-Nitro
234 users
User list
Online users

NCGR (File Format)

The NCLR format is a format for storing character data (Nitro Character Graphics for Runtime), and is the runtime version of NCG. It can store graphics in tiles, or as a bitmap. In the case of tiles, they are each 8x8, and are stored sequentially in these blocks. In the case of a bitmap, there is no such grouping.

File Structure

The NCGR file uses the generic Nitro header. It can have one or two sections.

CHAR Section
The CHAR section stores the main data of an NCGR file, though its exact meaning depends on some of the header fields. The fields are as follows:
0x00000x0004Section magic "RAHC"
0x00040x0004Section size, including headers
0x00080x0002Characters X. This is -1 for a 1D NCGR.
0x000A0x0002Characters Y. This is -1 for a 1D NCGR.
0x000C0x0004Bit depth. This is 3 for a 4bpp graphic, and 4 for an 8bpp graphic. Other pixel formats are invalid.
0x00100x0004Dimension. This is 0 for 2D NCGRs, and 0x10 for 1D NCGRs.
0x00140x0004Type. Set to 0 for a character-based NCGR, set to 1 for a bitmap-based NCGR.
0x00180x0004Size of graphics data.
0x001C0x0004Offset of graphics data, relative to the start of the section plus 8.

In a character based file, the graphics are split into 8x8 characters. In a 4bpp graphic, each takes up 32 bytes. In an 8bpp graphic, they take up 64 bytes. Palette indices are stored from top to bottom, left to right, as if as an 8x8 bitmap. Then each character is stored in that same order, like a bitmap made of smaller bitmaps. Though in the case of a bitmap format file, it is only stored as a regular bitmap. These files can have the extension NCBR.

CPOS Section
The CPOS section stores the position of characters in the file.

Last edit by Garhoogin on Thu Mar 25 22:15:53 CDT 2021