Skip to content

Bitmap_Z

widberg edited this page Apr 15, 2023 · 28 revisions

Chum World BITMAP
zouna-templates-docs rat/bitmap_z
ImFUEL Bitmap_Z

Additional reading https://docs.microsoft.com/en-us/windows/win32/direct3ddds/dds-header

struct Bitmap_Z_Header : ResourceObject_Z { // 32
    std::uint16_t multipleImages;
        // 0 for one image
        // 2 for 6 image cubemap
        // Always 0 except for 1 image in SHARED where it's 2
        // used as a loop count
        // 0, 1, 2
        // 2 - 6
        // !2 - 1
        // only 0 and 2 dont lead to a fail return
    std::uint32_t width;
    std::uint32_t height;
    std::uint32_t dataSize;
    std::uint8_t renderFlags;
        // 0, 53, 60, 181
        // Flag masks:
        //   * 0x80 unused
        //   * 0x20 unused
        //   * 0x10 unused
        //   * 0x8 unused
        //   * 0x4 something
        //   * 0x1 unused
        // If u1 & 0x4 == 0, then some bools are set in the renderer
    std::uint8_t bitmapType;
        // Unused?
        // Whether a bitmap is a diffuse, normal, specular, etc...
    std::uint16_t zero;
        // Padding?
        // Always 0
    float layer;
        // lower is higher layer
        // > 0 doesnt get drawn
        // so transparent textures show up on top
        // gets added to something in the renderer
        // usually 0
        // sometimes -1 or -2
        // x + y + u7
        // result of addition is often -1.0
    std::uint8_t inputDXTVersion;
        // Unused?
        // 14 - DXT1
        // 16 - DXT5
        // 0 - multiple input files
        // always matchs dxtVersion1 except for the cube map
    std::uint8_t mipMapCount;
    std::uint8_t four;
        // Unused?
        // Always 4
    std::uint8_t inputUnused3;
        // Unused?
        // 3 - normal
        // 0 - multiple input images
        // Always 3 except for the SHARED cubmap where it is 0
    std::uint8_t dxtVersion;
        // 14 - DXT1
        // 16 - DXT5
        // used as a loop count
    std::uint8_t rdrRelated;
        // material related
        // 0, 1, 2
        // If 1 material RdrFlag is ORed with 0x40
        // If 2 material RdrFlag is ORed with 0x20
        // Else nothing
        // material RdrFlag Masked with 0x1f
        // 0xFF for the cube map texture
};
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//------------------------------------------------

struct Bitmap_Z_Header
{
    uint32 friendly_name_crc32;
    uint16 dwCaps2;
    uint32 width;
    uint32 height;
    uint32 dataSize;
    ubyte u1;
    ubyte bitmapType;
    uint16 zero;
    float u7;
    ubyte dxtVersion0;
    ubyte mipMapCount;
    ubyte u2;
    ubyte u3;
    ubyte dxtVersion1;
    ubyte u4;
} bitmap;
struct Bitmap_Z {
    std::uint8_t data[__header.dataSize];
        // DXT1 or DXT5 compressed image data based on dxtVersion0
};

Alternate format:

struct Bitmap_Z_Header_Alt // 13
{
    std::uint32_t friendly_name_crc32;
    std::uint32_t zero0;
    std::uint8_t u3;
        // Always 3
    std::uint8_t dxtVersion0;
        // 16, 14, 7
    std::uint8_t u4;
        // 0, 2
    std::uint16_t zero1;
};
struct Bitmap_Z_Alt
{
    std::uint32_t width;
    std::uint32_t height;
    std::uint32_t zero;
    std::uint32_t unknown0;
        // 60
    std::uint16_t unknown1;
        // 7
    std::uint8_t unknown2;
        // 4
    std::uint8_t data[data_size - 19];
        // DXT1 or DXT5 compressed image data based on dxtVersion0
};

Home
FAQ

For FMTK Users and Mod Developers

Read the Docs

For FMTK Developers

Asobo BigFile Format Specification
Asobo Classes
      Animation_Z
      Binary_Z
      Bitmap_Z
      Camera_Z
      CollisionVol_Z
      Fonts_Z
      GameObj_Z
      GenWorld_Z
      GwRoad_Z
      Keyframer*_Z
      Light_Z
      LightData_Z
      Lod_Z
      LodData_Z
      Material_Z
      MaterialAnim_Z
      MaterialObj_Z
      Mesh_Z
      MeshData_Z
      Node_Z
      Omni_Z
      Particles_Z
      ParticlesData_Z
      RotShape_Z
      RotShapeData_Z
      Rtc_Z
      Skel_Z
      Skin_Z
      Sound_Z
      Spline_Z
      SplineGraph_Z
      Surface_Z
      SurfaceDatas_Z
      UserDefine_Z
      Warp_Z
      World_Z
      WorldRef_Z
Asobo File Format Idioms
Asobo CRC32
Asobo LZ Compression
Asobo Arithmetic Coding Compression
Asobo Save Game File Format Specification
Asobo Audio Formats
TotemTech/ToonTech/Zouna/ACE/BSSTech/Opal Timeline
Zouna Modding Resources
Miscellaneous

Clone this wiki locally