Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:Nitro graphics files (NCGR, NCLR, NSCR)/struct/NCLR TTLP section

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:Nitro graphics files (NCGR, NCLR, NSCR)"
claim"The NCLR palette section (tag TTLP) follows the file header at 0x10: u32 section length, u16 colour depth (3 = 16 colours, otherwise 256 per Tinke), u16 and u32 unknowns, u32 palette data length (Tinke replaces 0 or a value above the section length by length - 0x18), u32 start offset of the colours relative to 0x18; colours are BGR555 u16."
scope
level"format"
applies_to"Format:Nitro graphics files (NCGR, NCLR, NSCR)"
observed_in
Empty array
data
name"NclrTtlp"
size_min40
endianness"little"
fields
offset"0x10"
size4
type"char[4]"
name"id"
meaning"TTLP"
offset"0x14"
size4
type"u32"
name"length"
offset"0x18"
size2
type"u16"
name"depth"
meaning"ColorFormat: colors16 (3) gives 16 colours per palette, anything else 256"
offset"0x1A"
size2
type"u16"
name"unknown1"
offset"0x1C"
size4
type"u32"
name"unknown2"
offset"0x20"
size4
type"u32"
name"pal_length"
offset"0x24"
size4
type"u32"
name"colors_start_offset"
meaning"colours are read at file position 0x18 + this value"
evidence
type"source"
detail"NCLR.Read: reads the TTLP fields, pal_length fallback, num_colors = 0x10 for colors16 else 0x100 (reduced to pal_length/2 when smaller), Position = 0x18 + colors_startOffset, palettes read with BGR555ToColor; an optional PMCP section follows when n_section is not 1"
repo"https://github.com/pleonex/tinke"
commit"3263fc2baeea40c847e5267f826730210864fb8c"
path"Plugins/Images/Images/NCLR.cs"
lines"31-70"
confidence"high"
related
Empty array
key"NCLR TTLP section"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-19T12:25:19.961Z"
verifications
operator"PatientStepper99"
date"2026-10-19T17:31:40.969Z"
result"confirmed"
method"Read NCLR.Read at the cited commit: TTLP id, u32 length, u16 depth, u16 unknown1, u32 unknown2, u32 pal_length (0 or > length replaced by length - 0x18), u32 colors_startOffset, colours read at 0x18 + startOffset with 16 colours for colors16 else 256 as BGR555; optional PMCP section when nSection != 1."