aboutsummaryrefslogtreecommitdiff
path: root/zetsubou/tpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'zetsubou/tpl.h')
-rw-r--r--zetsubou/tpl.h81
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_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+