Difference between revisions of "Camera Properties Crash 2/3"

From Crash Bandicoot Hacking Wiki
Jump to navigation Jump to search
(category Crash 2/3)
(Layout)
Line 1: Line 1:
This property consists of 4-byte words, with the 'path beginning/ending' as the main building block.
+
== First camera item ==
 +
=== Property 0x109: path links ===
  
Path beginning/ending:
+
This property contains information about which (neighbouring) paths and zones the current path is linked with. It consists of 4-byte words, with the 'path beginning/ending' as the main building block.
  
MMZZPP**
+
The property can have different lengths and formats depending on the type of situation. A path can begin where another one ends/end where another begins, be the very end/beginning of the level or converge from/split up in muliple paths.
  
MM = begin/end flag, 01 is for beginnings, 02 for endings
+
'''Path beginning/ending'''
  
ZZ = (neighbouring) zone index where this path begins if (MM=01) / ends if (MM=02)
+
<u>MMZZPP**</u>
 +
* MM = begin/end flag, 01 is for beginnings, 02 for endings
 +
* ZZ = (neighbouring) zone index where this path begins if (MM=01) / ends if (MM=02)
 +
* PP = (neighbouring) zone's path index where this path begins if (MM=01) / ends if (MM=02)
 +
* <nowiki>**</nowiki> = unknown; (neighbouring) zone's path's point index where this path begins if (MM=01) / ends if (MM=02) ?
 +
'''Type 1 and 2: (first word == 1)'''
  
PP = (neighbouring) zone's path index where this path begins if (MM=01) / ends if (MM=02)
+
'''Type 1:''' path with single end and beginning '''(MM second word == 00)''' 
 
 
<nowiki>**</nowiki> = unknown; (neighbouring) zone's path's point index where this path begins if (MM=01) / ends if (MM=02) ?
 
 
 
Type 1 and 2: (first word == 1)
 
 
 
Type 1: path with single end and beginning (MM second word == 00) 
 
  
 
00000001 0000CCCC 01ZZPP** 02ZZPP**
 
00000001 0000CCCC 01ZZPP** 02ZZPP**
 
+
* CCCC = count of path points
CCCC = count of path points
+
'''Type 2:''' path with single beginning '''(MM second word == 01)''' 
 
 
Type 2: path with single beginning (MM second word == 01) 
 
  
 
00000001 01ZZPP**
 
00000001 01ZZPP**
  
 +
'''Type 3 and 4: (first word !== 1)'''
  
 
+
'''Type 3:''' path with single end '''(CCCC == pathcount)''' 
Type 3 and 4: (first word !== 1)
 
 
 
Type 3: path with single end (CCCC == pathcount) 
 
  
 
CCCC0001 02ZZPP**
 
CCCC0001 02ZZPP**
 
+
* CCCC = count of path points
CCCC = count of path points
+
'''Type 4:''' path with multiple endings/beginnings '''(CCCC !== pathcount)''' 
 
 
Type 4: path with multiple endings/beginnings (CCCC !== pathcount) 
 
  
 
EEEEBBBB CCCC0000 
 
EEEEBBBB CCCC0000 
Line 42: Line 36:
  
 
followed by BBBB times: 02ZZPP**
 
followed by BBBB times: 02ZZPP**
 
+
* EEEE = count of endings
EEEE = count of endings
+
* BBBB = count of beginnings
 
+
* CCCC = count of path points
BBBB = count of beginnings
 
 
 
CCCC = count of path points
 
 
[[Category:Crash 2/3]]
 
[[Category:Crash 2/3]]

Revision as of 16:02, 12 December 2018

 First camera item

Property 0x109: path links 

This property contains information about which (neighbouring) paths and zones the current path is linked with. It consists of 4-byte words, with the 'path beginning/ending' as the main building block.

The property can have different lengths and formats depending on the type of situation. A path can begin where another one ends/end where another begins, be the very end/beginning of the level or converge from/split up in muliple paths.

Path beginning/ending

MMZZPP**

  • MM = begin/end flag, 01 is for beginnings, 02 for endings
  • ZZ = (neighbouring) zone index where this path begins if (MM=01) / ends if (MM=02)
  • PP = (neighbouring) zone's path index where this path begins if (MM=01) / ends if (MM=02)
  • ** = unknown; (neighbouring) zone's path's point index where this path begins if (MM=01) / ends if (MM=02) ?

Type 1 and 2: (first word == 1)

Type 1: path with single end and beginning (MM second word == 00) 

00000001 0000CCCC 01ZZPP** 02ZZPP**

  • CCCC = count of path points

Type 2: path with single beginning (MM second word == 01) 

00000001 01ZZPP**

Type 3 and 4: (first word !== 1)

Type 3: path with single end (CCCC == pathcount) 

CCCC0001 02ZZPP**

  • CCCC = count of path points

Type 4: path with multiple endings/beginnings (CCCC !== pathcount) 

EEEEBBBB CCCC0000 

followed by EEEE times: 01ZZPP** 

followed by BBBB times: 02ZZPP**

  • EEEE = count of endings
  • BBBB = count of beginnings
  • CCCC = count of path points