Changes

Jump to navigation Jump to search
Add details of collision data
Line 500: Line 500:  
| 0x24
 
| 0x24
 
| 0x4
 
| 0x4
| Start address of collision floating points
+
| Start address of collision data
 
|-
 
|-
 
| 0x28
 
| 0x28
 
| 0x4
 
| 0x4
| End address of collision floating points
+
| End address of collision data
 
|-
 
|-
 
| 0x2C
 
| 0x2C
Line 532: Line 532:  
| 0x80 + 2 * (w * h)
 
| 0x80 + 2 * (w * h)
 
|  
 
|  
| Collision floating points
+
| [[#Collision data|Collision data]]
 
|}
 
|}
   Line 772: Line 772:  
| 0x1C
 
| 0x1C
 
| 0x4
 
| 0x4
| Start address of collision floating points
+
| Start address of collision data
 
|-
 
|-
 
| 0x20
 
| 0x20
 
| 0x4
 
| 0x4
| End address of collision floating points
+
| End address of collision data
 
|-
 
|-
 
| 0x24
 
| 0x24
Line 800: Line 800:  
| 0x80 + (w * h)
 
| 0x80 + (w * h)
 
|  
 
|  
| Collision floating points
+
| [[#Collision data|Collision data]]
 
|}
 
|}
   Line 866: Line 866:  
| 0x34
 
| 0x34
 
| 0x4
 
| 0x4
| Start address of collision floating points
+
| Start address of collision data
 
|-
 
|-
 
| 0x38
 
| 0x38
 
| 0x4
 
| 0x4
| End address of collision floating points (stuck at 0x45XX, but correct value works)
+
| End address of collision data (stuck at 0x45XX, but correct value works)
 
|-
 
|-
 
| 0x3C
 
| 0x3C
Line 942: Line 942:  
|  
 
|  
 
|  
 
|  
| Collision floating points
+
| [[#Collision data|Collision data]]
 
|}
 
|}
   Line 1,031: Line 1,031:  
# Unknown
 
# Unknown
 
# Unknown
 
# Unknown
 +
 +
== Collision data ==
 +
The collision of an object is defined by a set of polygons combined together.
 +
 +
The polygons are represented using the vertices of each polygon, and those vertices are represented using their coordinates according to the in game image resolution.
 +
 +
{| class="wikitable"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Number of polygons
 +
|-
 +
| 0x4
 +
| 0x44
 +
| Polygon data
 +
|-
 +
|
 +
| 0x44
 +
| Additional polygons data
 +
|}
 +
 +
=== Polygon data ===
 +
The data of a polygon starts with the number of vertices. The coordinates of each vertice are then stored as float32 values on an allocated 0x40 byte section.
 +
 +
If the coordinates don't fill the 0x40 byte section, the remaining data is set to null bytes.
 +
 +
{| class="wikitable"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Number of vertices
 +
|-
 +
| 0x4
 +
| 0x4
 +
| X coordinate of vertice
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Y coordinate of vertice
 +
|-
 +
|
 +
| 0x4
 +
| X coordinate of additional vertices
 +
|-
 +
|
 +
| 0x4
 +
| Y coordinate of additional vertices
 +
|}
106

edits

Navigation menu