diff options
| author | Alex Marshall <SquidMan72@gmail.com> | 2009-03-21 01:15:00 -0700 |
|---|---|---|
| committer | Alex Marshall <SquidMan72@gmail.com> | 2009-03-21 01:15:00 -0700 |
| commit | 41f312b1a3e703edd56627342fdd358c22890480 (patch) | |
| tree | efea223fd1df1395add826c0765af2f6c22649a1 /zetsubou/tpl.h | |
| parent | 33dbada8f9c9fc97222ee3b0bfa0defc1f554c9f (diff) | |
Updated Zetsubou a lot. Now has CMP support (waiting on segher's approval), output to PNG (BUGGY. COLOR IS WASHED OUT, BUT WHEN WRITING TO BMP, STILL LOOKS FINE), and probably more stuff.
Diffstat (limited to '')
| -rw-r--r-- | zetsubou/tpl.h | 81 |
1 files changed, 52 insertions, 29 deletions
diff --git a/zetsubou/tpl.h b/zetsubou/tpl.h index 633e60e..0398888 100644 --- a/zetsubou/tpl.h +++ b/zetsubou/tpl.h @@ -50,46 +50,69 @@ typedef struct texthead { - u16 height; // Height of the TPL image. - u16 width; // Width of the TPL image. - u32 format; // Format of the TPL image. (Use #defines pl0x.) - u32 offs; // Offset to actual image data. - u32 wrap_s; // Wrap S. - u32 wrap_t; // Wrap T. - u32 min; // Min filter. - u32 mag; // Mag filter. - f32 lod_bias; // LOD Bias? - u8 edge_lod; // Edge LOD? - u8 min_lod; // Minimum LOD? - u8 max_lod; // Maximum LOD? - u8 unpacked; // Unpacked? + u16 height; // Height of the TPL image. + u16 width; // Width of the TPL image. + u32 format; // Format of the TPL image. (Use #defines pl0x.) + u32 offs; // Offset to actual image data. + u32 wrap_s; // Wrap S. + u32 wrap_t; // Wrap T. + u32 min; // Min filter. + u32 mag; // Mag filter. + f32 lod_bias; // LOD Bias? + u8 edge_lod; // Edge LOD? + u8 min_lod; // Minimum LOD? + u8 max_lod; // Maximum LOD? + u8 unpacked; // Unpacked? } TPL_header; typedef struct bmphead { - u16 magic; // 0x42 0x4D (ASCII for `BM') - u32 size; // The size of the file - u16 reserved1; // Reserved. (We'll stuff `TP' here) - u16 reserved2; // Reserved. (We'll stuff `LB' here) - u32 offset; // Offset to actual bitmap. + u16 magic; // 0x42 0x4D (ASCII for `BM') + u32 size; // The size of the file + u16 reserved1; // Reserved. (We'll stuff `TP' here) + u16 reserved2; // Reserved. (We'll stuff `LB' here) + u32 offset; // Offset to actual bitmap. } TPL_BMPHeader; typedef struct bmpv3infohead { - u32 headersize; // Size of this header (40 bytes) - s32 width; // Width in pixels. - s32 height; // Height in pixels. - u16 colorplanes; // Number of color planes. Always 1. - u16 bpp; // Bits per pixel. - u32 compression; // Compression method. Just use 0, kthx. - u32 bitmapsize; // Size of the bitmap itself. - u32 hres; // Horizontal resolution. Just use 0, kthx. - u32 vres; // Vertical resolution. Just use 0, kthx. - u32 colorpalette; // Number of colors in palette. Just use 0, kthx. - u32 importantcolors; // Number of important colors. Just use 0, kthx. + u32 headersize; // Size of this header (40 bytes) + s32 width; // Width in pixels. + s32 height; // Height in pixels. + u16 colorplanes; // Number of color planes. Always 1. + u16 bpp; // Bits per pixel. + u32 compression; // Compression method. Just use 0, kthx. + u32 bitmapsize; // Size of the bitmap itself. + u32 hres; // Horizontal resolution. Just use 0, kthx. + u32 vres; // Vertical resolution. Just use 0, kthx. + u32 colorpalette; // Number of colors in palette. Just use 0, kthx. + u32 importantcolors; // Number of important colors. Just use 0, kthx. } TPL_BMPInfoHeaderV3; int TPL_ConvertToBMP(u8* tplbuf, u32 tplsize, char basename[]); +int TPL_ConvertToGD(u8* tplbuf, u32 tplsize, char basename[], u32 format); int TPL_ConvertFromBMPs(const u32 count, char *bmps[], char outname[], u32 format); +int TPL_ConvertFromGDs(const u32 count, char *gds[], char outname[], u32 format, u32 typeformat); #endif //_TPL_H_ + + + + + + + + + + + + + + + + + + + + + |
