// // Binary Font (*.BP?) // (BlockSize: 0x00004000, CoderKey: 0x00000FAE) // // NOTE: Only *.BP3 (never saw a *.BP5) // struct Header { uint32_t FileSize; uint32_t OffsetCount; // 0x00000001 uint32_t OffsetTable[OffsetCount]; // 0x0000000C (not used) } struct Textures { uint32_t ObjectCount; for (ObjectCount) { struct ObjectName { uint8_t Length; uint8_t Buffer[Length]; // Coder: [i] ^= ~i } { //NOTE: This palette is *only* present in the "Fnt_Menu.bp3". // The palette values are identical to the texture’s palette. uint8_t Palette[256][3]; // BGR888 } uint32_t TextureCount; uint32_t TextureUnknown; for (TextureCount) { uint32_t TexturePartCount; for (TexturePartCount) { uint8_t TexturePartSource[32]; uint32_t TexturePartLeft; uint32_t TexturePartTop; uint32_t TexturePartRight; uint32_t TexturePartBottom; uint32_t TexturePartUnknown; } } uint8_t TexturePalette[256][3]; // BGR888 for (TextureCount) { uint8_t TextureBitmap[256][256]; // PAL8 } } } struct Fonts { { //NOTE: *Not* present in "J_Game.bp3" and "J_Menu.bp3". // In this case there is only one font (FontCount = 1). uint32_t FontCount; } for (FontCount) { { //NOTE: *Not* present in "J_Game.bp3" and "J_Menu.bp3". struct FontName { uint8_t Length; uint8_t Buffer[Length]; // Coder: [i] ^= ~i } } struct TextureObjectName { uint8_t Length; uint8_t Buffer[Length]; // Coder: [i] ^= ~i } uint32_t FontSymbolCount; for (FontSymbolCount) { uint8_t FontSymbol; // '@' -> ' ', 'à' -> '@' uint32_t TextureIndex; uint32_t TextureLeft; uint32_t TextureTop; uint32_t TextureRight; uint32_t TextureBottom; } }