Add 'isWall' flag, TMD wip
parent
eaa2346d4c
commit
354ddb3ed9
@ -37,3 +37,51 @@ typedef struct TIM_FILE{
|
||||
PIXEL pixel[];
|
||||
} TIM_FILE;
|
||||
```
|
||||
|
||||
### TMD
|
||||
|
||||
**WIP**
|
||||
|
||||
See http://psx.arthus.net/sdk/Psy-Q/DOCS/FileFormat47.pdf , p.71
|
||||
|
||||
```c
|
||||
typedef struct TMD_HEADER {
|
||||
u_long ID; // TMD file version - current is 0x00000041
|
||||
u_long flags; // LSB (FIXP) is either 0 or 1, all other bits are 0
|
||||
u_long nobj; // Number of objects in TMD
|
||||
} TMD_HEADER;
|
||||
|
||||
struct TMD_OBJECT {
|
||||
u_long *vert_top; // Start address of a vertex - if FIXP is 1, absolute address, else, relative to object's block address
|
||||
u_long n_vert; // Number of vertices
|
||||
u_long *normal top; // Start address of a normal - if FIXP is 1, absolute address, else, relative to object's block address
|
||||
u_long n_normal; // Number of normals
|
||||
u_long *primitive top; // Start address of a primitive - if FIXP is 1, absolute address, else, relative to object's block address
|
||||
u_long n_primitive; // Number of primitives
|
||||
long scale; // Scaling factor - scale value is scale factor^2 . -1 is 1/2.
|
||||
} TMD_OBJECT;
|
||||
|
||||
struct TMD_PACKET {
|
||||
u_short mode, flag;
|
||||
u_short ilen; // data section length in words
|
||||
u_short olen; // word length
|
||||
u_long data;
|
||||
} TMD_PACKET;
|
||||
struct TMD_VERTEX {
|
||||
short vx, vy, vz;
|
||||
short pad;
|
||||
} TMD_VERTEX;
|
||||
|
||||
struct TMD_NORMAL {
|
||||
short vx, vy, vz; // fixed point value with scale 1.0 == 4096
|
||||
short pad;
|
||||
} TMD_NORMAL;
|
||||
|
||||
typedef struct TMD_FILE {
|
||||
TMD_HEADER header;
|
||||
TMD_OBJECT objTable[]; // objTable has length TMD_HEADER.nobj
|
||||
TMD_PACKET primitive[]; // primtive has length TM_PACKET.ilen
|
||||
TMD_VERTEX vertex;
|
||||
TMD_NORMAL normal;
|
||||
} TMD_FILE;
|
||||
```
|
||||
|
7
Flags.md
7
Flags.md
@ -2,10 +2,12 @@
|
||||
|
||||
**Remember this is WIP, so these might change !**
|
||||
|
||||
Flags are set in the 'Data' tab of the blender objects.
|
||||
Flags are custom properties set in the 'Data' tab of the blender objects.
|
||||
|
||||
![Flags](https://wiki.arthus.net/assets/flags.jpg)
|
||||
|
||||
A [small blender addon](https://github.com/ABelliqueux/blender_io_export_psx_mesh/blob/main/copy_custom_prop.py) is provided that facilitates copying [flags](https://github.com/ABelliqueux/blender_io_export_psx_mesh/wiki/Flags) between several objects in your scene.
|
||||
|
||||
## Objects flags
|
||||
|
||||
### Physics
|
||||
@ -16,6 +18,7 @@ Flags are set in the 'Data' tab of the blender objects.
|
||||
<tr><td>isRound </td><td> 0 </td><td> boolean </td><td>Object should roll when pushed.</td></tr>
|
||||
<tr><td>isStaticBody </td><td> 0 </td><td> boolean </td><td>Object does not collide with actor.</td></tr>
|
||||
<tr><td>isLevel </td><td> 0 </td><td> boolean </td><td>Designate the level planes. Used for BSP and collisions.</td></tr>
|
||||
<tr><td>isWall </td><td> 0 </td><td> boolean </td><td>Designate the level walls. Used for collisions.</td></tr>
|
||||
<tr><td>mass </td><td> 1 </td><td> integer </td><td>Object's mass</td></tr>
|
||||
<tr><td>restitution </td><td> 0 </td><td> integer </td><td>Object's restitution</td></tr>
|
||||
</table>
|
||||
@ -59,4 +62,4 @@ Flags are set in the 'Data' tab of the blender objects.
|
||||
<table>
|
||||
<tr><th>Flag</th><th>Default value</th><th>Value type</th><th>Desc.</th></tr>
|
||||
<tr><td>isPortal </td><td> 0 </td><td> boolean </td><td>Is a <a href="https://github.com/ABelliqueux/blender_io_export_psx_mesh/wiki/Portals">portal object.</a></td></tr>
|
||||
</table>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user