Add file format structures page

ABelliqueux 2021-08-04 11:00:49 +02:00
parent a48d7d0c24
commit eaa2346d4c

@ -0,0 +1,39 @@
## File formats structures
### TIM
See http://psx.arthus.net/sdk/Psy-Q/DOCS/FileFormat47.pdf , p.179
```c
typedef struct RGB_PIX {
u_int R:5, G:5, B:5, STP:1;
} RGB_PIX;
// Some structures to handle TIM files
typedef struct PIXEL {
u_long bnum;
u_short DX, DY;
u_short W, H;
RGB_PIX data[];
} PIXEL;
typedef struct CLUT {
u_long bnum;
u_short DX, DY;
u_short W, H;
u_short clut[];
} CLUT;
typedef struct TIM_FILE_CLUT{
u_long ID;
u_long flag;
u_long clut;
PIXEL pixel[];
} TIM_FILE_CLUT;
typedef struct TIM_FILE{
u_long ID;
u_long flag;
PIXEL pixel[];
} TIM_FILE;
```