User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blast_corps:levels [2016/04/14 14:50]
queueram created
blast_corps:levels [2017/06/23 10:34] (current)
shygoo ↷ Links adapted because of a move operation
Line 6: Line 6:
 The level data begins with a header that contains the offsets in the file for all of the level information (RDUs, buildings, vehicles, etc.). The level data file also contains vertices and other data used by the display list that are loaded into segment 08. The level data begins with a header that contains the offsets in the file for all of the level information (RDUs, buildings, vehicles, etc.). The level data file also contains vertices and other data used by the display list that are loaded into segment 08.
  
-The display list contains mostly raw F3D commands. The exception is 0xFD G_SETTIMG command which contain indexes to a [[bc:​textures#​texture_table|texture table]]. At run-time, after the display list is copied to RAM, the texture indexes in the G_SETTIMG are replaced with texture offsets in segment 0x00.+The display list contains mostly raw F3D commands. The exception is 0xFD G_SETTIMG command which contain indexes to a [[blast_corps:​textures#​texture_table|texture table]]. At run-time, after the display list is copied to RAM, the texture indexes in the G_SETTIMG are replaced with texture offsets in segment 0x00.
  
 ===== List of Levels ===== ===== List of Levels =====
Line 92: Line 92:
 | 0x1C | 4 | unsigned | (1: normal, 0: dip, level18, level20, level34, level43, level9), stored to byte 0x803BE739 | | 0x1C | 4 | unsigned | (1: normal, 0: dip, level18, level20, level34, level43, level9), stored to byte 0x803BE739 |
 | 0x20 | 4 | unsigned | Ammo boxes (Ballista and Sideswipe) | | 0x20 | 4 | unsigned | Ammo boxes (Ballista and Sideswipe) |
-| 0x24 | 4 | unsigned | Collision ​fixes |+| 0x24 | 4 | unsigned | Collision |
 | 0x28 | 4 | unsigned | Communication Point | | 0x28 | 4 | unsigned | Communication Point |
-| 0x2C | 4 | unsigned | TODO Animated textures (water, lava, barricades) | +| 0x2C | 4 | unsigned | Animated textures (water, lava, barricades) | 
-| 0x30 | 4 | unsigned | TODO Terrain ​data? |+| 0x30 | 4 | unsigned | Terrain |
 | 0x34 | 4 | unsigned | RDUs | | 0x34 | 4 | unsigned | RDUs |
 | 0x38 | 4 | unsigned | TNT crates | | 0x38 | 4 | unsigned | TNT crates |
 | 0x3C | 4 | unsigned | Square blocks and holes | | 0x3C | 4 | unsigned | Square blocks and holes |
-| 0x40 | 4 | unsigned | TODO Bounding boxes? | +| 0x40 | 4 | unsigned | Bounding boxes? | 
-| 0x44 | 4 | unsigned | TODO Bounding boxes? |+| 0x44 | 4 | unsigned | Bounding boxes? |
 | 0x48 | 4 | unsigned | TODO | | 0x48 | 4 | unsigned | TODO |
-| 0x4C | 4 | unsigned | TODO Level bounds? |+| 0x4C | 4 | unsigned | Level bounds? |
 | 0x50 | 4 | unsigned | Vehicles | | 0x50 | 4 | unsigned | Vehicles |
 | 0x54 | 4 | unsigned | Missile carrier settings | | 0x54 | 4 | unsigned | Missile carrier settings |
-| 0x58 | 4 | unsigned | TODO |+| 0x58 | 4 | unsigned | Unused? (only in lagp and level26) ​|
 | 0x5C | 4 | unsigned | Buildings | | 0x5C | 4 | unsigned | Buildings |
-| 0x60 | 4 | unsigned | TODO Bridge related? ​+| 0x60 | 4 | unsigned | Unused (only in chimp and lagp) 
-| 0x64 | 4 | unsigned | TODO Walls? ​|+| 0x64 | 4 | unsigned | X/Z Collision (prevent walking over ledge) ​|
 | 0x68 | 4 | unsigned | Train platform and stopping zones | | 0x68 | 4 | unsigned | Train platform and stopping zones |
 | 0x6C | 4 | unsigned | X/Z Collision (level perimeter, trees, walls) | | 0x6C | 4 | unsigned | X/Z Collision (level perimeter, trees, walls) |
Line 148: Line 148:
   0AA6 002C 1379 0000   0AA6 002C 1379 0000
  
-==== 0x24: Collision ==== +==== 0x24: Collision ==== 
-These look like collision triangles set up to prevent J-Bomb from clipping through structures from above. In levels that contain the J-Bomb, triangles are drawn around the semi, tunnels, and other things it probably shouldn'​t mess with from above. Also, the large gray area surrounding the crane in Ironstone Mine is defined with these.+These are additional ​collision triangles set up to prevent J-Bomb from clipping through structures from above. In levels that contain the J-Bomb, triangles are drawn around the semi, tunnels, and other things it probably shouldn'​t mess with from above. Also, the large gray area surrounding the crane in Ironstone Mine is defined with these.
  
   [X1 X1] [Y1 Y1] [Z1 Z1] [X2 X2] [Y2 Y2] [Z2 Z2] [X3 X3] [Y3 Y3] [Z3 Z3] [?? ??]   [X1 X1] [Y1 Y1] [Z1 Z1] [X2 X2] [Y2 Y2] [Z2 Z2] [X3 X3] [Y3 Y3] [Z3 Z3] [?? ??]
  
-|X,Y,Z/1,2,| three 3D coordinates that define a triangle |+|X1,Y1,Z1 \\ X2,Y2,Z2 \\ X3,​Y3,​Z3 ​| three 3D coordinates that define a triangle |
 | ? | TODO padding? always 0 | | ? | TODO padding? always 0 |
  
Line 167: Line 167:
  
 | X,Y,Z | position of communication point | | X,Y,Z | position of communication point |
-| A | Always 0, if set to 1 animates spinning dish by default ​|+| A | Always 0, if 1 animates spinning dish before touched ​|
  
 Example Argent Towers / level10: 010470-010480 Example Argent Towers / level10: 010470-010480
Line 234: Line 234:
  
 ==== 0x30: Terrain ==== ==== 0x30: Terrain ====
 +Two halfwords from 0x08 and 0x0A in the level header are multiplied to get the count of the number of groups in this list. Each group contains multiple triangles and is stored to an array at 0x803BDB10. Triangles are overlapped between groups.
  
   [EE EE EE EE] {[X1 X1] [Y1 Y1] [Z1 Z1] [X2 X2] [Y2 Y2] [Z2 Z2] [X3 X3] [Y3 Y3] [Z3 Z3] [AA] [BB]}   [EE EE EE EE] {[X1 X1] [Y1 Y1] [Z1 Z1] [X2 X2] [Y2 Y2] [Z2 Z2] [X3 X3] [Y3 Y3] [Z3 Z3] [AA] [BB]}
  
-| Eend offset of this group of triangles +| E end offset of this group of triangles ​| 
-X/Y/Z,1/​2/​3: ​triangle vertices for terrain data +X1,Y1,Z1 \\ X2,Y2,Z2 \\ X3,Y3,Z3 | triangle vertices for terrain data | 
-| A | TODO byte at offset 0x12 terrain ​type\\ +| A | Terrain ​type \\ 01: low traction / dirt \\ 02: high traction, high speed / roads, rails \\ 03: high traction, medium speed / grass \\ 05: slow speed / ponds \\ 67: high traction, high speed / gravel lots (similar to roads?) | 
-  ​01: low traction / dirt \\ +| B | TODO byte at offset 0x13 flag? |
-  ​02: high traction, high speed / roads, rails \\ +
-  ​03: high traction, medium speed / grass \\ +
-  ​05: slow speed / ponds \\ +
-  ​67: high traction, high speed / gravel lots (similar to roads?) | +
-| B | TODO byte at offset 0x13 flag? +
- +
- +
-Two halfwords from 0x08 and 0x0A in the level header are multiplied to get the count of the number of groups in this list. Each group contains multiple triangles and is stored to an array at 0x803BDB10. Triangles are overlapped between groups.+
  
 proc_802A4464() proc_802A4464()
Line 294: Line 287:
   ...   ...
  
-==== 0x38: CNT crates ====+==== 0x38: TNT crates ====
  
-  [XX XX] [YY YY] [ZZ ZZ] [B6] [TT] [H8 H8] [HA HA]+  [XX XX] [YY YY] [ZZ ZZ] [EE] [TT] [H8 H8] [PP PP]
  
 | X,Y,Z | position of TNT crate | | X,Y,Z | position of TNT crate |
-B6 TODO stored to byte (T6 + 0x8039B07E) ​+texture ​
-| T | explosion timer (~2-2.5s * this value) \\ +| T | explosion timer (~2-2.5s * this value) \\ (T * 60) stored to halfword (T9 + 0x8039B080) |
-(T * 60) stored to halfword (T9 + 0x8039B080) |+
 | H8 | TODO halfword stored to (T1 + 0x8039B08A) | | H8 | TODO halfword stored to (T1 + 0x8039B08A) |
-HA TODO halfword stored to (T3 + 0x8039B08C) |+power of TNT (also affects blast radius) |
  
 proc_8028D4C0(A0,​ A1) proc_8028D4C0(A0,​ A1)
Line 315: Line 307:
   [NN NN] {[XX XX] [YY YY] [ZZ ZZ] [T1] [T2] (HH HH) {[X1 X1] [Y1 Y1] [Z1 Z1]... [AA] [BB] [CC] [DD]}}   [NN NN] {[XX XX] [YY YY] [ZZ ZZ] [T1] [T2] (HH HH) {[X1 X1] [Y1 Y1] [Z1 Z1]... [AA] [BB] [CC] [DD]}}
  
-| N | number of square blocks ​to in this group, stored as word to 0x8039C710 |+| N | number of square blocks in group, stored as word to 0x8039C710 |
 | X | << 5 stored to 0x8039C550 + 56*SP[1C] | | X | << 5 stored to 0x8039C550 + 56*SP[1C] |
 | Y | << 5 stored to 0x8039C554 + 56*SP[1C] | | Y | << 5 stored to 0x8039C554 + 56*SP[1C] |
Line 322: Line 314:
 | T2 | block = 0/1/2, hole = 8 | | T2 | block = 0/1/2, hole = 8 |
 | H | TODO if '​T2'​ is 8, this flag is present (either 1 or 0) | | H | TODO if '​T2'​ is 8, this flag is present (either 1 or 0) |
-XYZ123 ​| if '​T2'​ is 8, then eight triangles follow | +X1,Y1,Z1 \\ X2,Y2,Z2 \\ X3,​Y3,​Z3 ​| if '​T2'​ is 8, then eight triangles follow | 
-ABCD | TODO flags? normals? |+A,​B,​C,​D ​| TODO flags? normals? |
  
 proc_8028FDA0() proc_8028FDA0()
Line 365: Line 357:
     07 FD 00 00     07 FD 00 00
  
-==== 0x40: TODO ====+==== 0x40: Bounding Boxes ====
 some bounding boxes some bounding boxes
  
Line 440: Line 432:
   0AFA 041A 0C8A 0C4E 012F   0AFA 041A 0C8A 0C4E 012F
  
-==== 0x44: TODO ====+==== 0x44: Bounding Boxes ====
 some bounding boxes some bounding boxes
  
Line 503: Line 495:
 | T | vehicle type (see vehicles) | | T | vehicle type (see vehicles) |
 | X,Y,Z | position of vehicle | | X,Y,Z | position of vehicle |
-| H | heading ​(N/+Z: 0x0W/+X: 0x400S/-Z: 0x800E/-X: 0xC00|+| H | heading ​\\ N/+Z: 0x0 \\ W/+X: 0x400 \\ S/-Z: 0x800 \\ E/-X: 0xC00 |
  
 proc_802A350C() -> proc_802A396C(T3=id) proc_802A350C() -> proc_802A396C(T3=id)
Line 520: Line 512:
 | S| speed | | S| speed |
 | X,Z | X,Z start position | | X,Z | X,Z start position |
-| H | heading ​(N/+Z: 0x0W/+X: 0x400S/-Z: 0x800E/-X: 0xC00|+| H | heading ​\\ N/+Z: 0x0 \\ W/+X: 0x400 \\ S/-Z: 0x800 \\ E/-X: 0xC00 |
 | D | distance carrier travel to complete level | | D | distance carrier travel to complete level |
 | ? | unused? | | ? | unused? |
Line 527: Line 519:
   1C 07BC 07E2 0000 0BB8 00   1C 07BC 07E2 0000 0BB8 00
  
-==== 0x58: TODO ====+==== 0x58: Unused? ​====
 8 bytes of data, only used in two levels, both with same data 8 bytes of data, only used in two levels, both with same data
  
Line 545: Line 537:
 | C | if 1, increase '​destroyed buildings'​ counter | | C | if 1, increase '​destroyed buildings'​ counter |
 | B9 | TODO stored to t4->b6 | | B9 | TODO stored to t4->b6 |
-| B | behavior ​(1: vertical2: circle3: horizontal4: follow player5: rotation 90|+| B | behavior ​\\ 1: vertical ​\\ 2: circle ​\\ 3: horizontal ​\\ 4: follow player ​\\ 5: rotation 90 |
 | S | speed (for moving objects) | | S | speed (for moving objects) |
  
Line 567: Line 559:
   ...   ...
  
-==== 0x60: TODO ==== +==== 0x60: Unused? ​==== 
-Could be unused. Data in chimp shows 5 points under bridge. Data in lagp looks like zig-zag lamp post pattern.+Probably ​unused. Data in chimp shows 5 points under bridge. Data in lagp looks like zig-zag lamp post pattern.
 first byte stored to 0x80364a6e, variable length records after that first byte stored to 0x80364a6e, variable length records after that
  
Line 596: Line 588:
   077D 0053 083A 002D 01 03 {04 08 FF} 00 96   077D 0053 083A 002D 01 03 {04 08 FF} 00 96
  
-Example Angel City / lagp: 014694-0148A9 +==== 0x64: X/Z Collision ​Walls ====
-  DC +
-  06FE 0040 0666 0020 02 02 {04 05} 00 00  +
-  06D9 0040 06B0 0020 02 02 {04 05} 00 00  +
-  03DD 0040 043F 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  03B6 0040 048B 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  03DE 0040 04D8 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  03B6 0040 0523 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  03DE 0040 056F 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  03B6 0040 05BA 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  03DE 0040 0604 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05D4 0040 03AE 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05B4 0040 03F4 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05D3 0040 0443 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05B1 0040 048F 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05D5 0040 04D7 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05B0 0040 0523 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05D5 0040 0570 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05B1 0040 05BE 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  05D7 0040 0605 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  01DE 0040 02A2 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  0171 0040 02E6 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  01DB 0040 032D 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  016F 0040 0371 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  01DD 0040 03B6 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  0171 0040 03F9 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  01DC 0040 0442 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  016E 0040 0489 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  01DD 0040 04D0 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  016F 0040 0511 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  01DC 0040 0559 0028 02 06 {00 01 02 03 04 05} 00 00  +
-  0171 0040 059D 0028 02 06 {00 01 02 03 04 05} 00 00 +
- +
-==== 0x64: Walls ====+
 Walls to restrict player movement off edges. Walls to restrict player movement off edges.
  
Line 660: Line 619:
   146E 03D4 0C3C    146E 03D4 0C3C 
   143D 03D4 0C3C 07 FF   143D 03D4 0C3C 07 FF
- 
-Example Beeton Tracks / level18: 17231 +81 
-  00 02 04 0D  
-  04  
-  0681 0078 0F95  
-  0681 0064 0F95  
-  0681 0064 0F6D 0B FF  
-  0681 0078 0F95  
-  0681 0064 0F6D  
-  0681 0078 0F6D 0B FF  
-  041A 0078 0F6C  
-  041A 0064 0F6C  
-  041A 0064 0F94 0B FE  
-  041A 0078 0F6C  
-  041A 0064 0F94  
-  041A 0078 0F94 0B FE  
-  00 01 06  
-  02  
-  0578 0064 0FF8  
-  0578 0080 0FF8  
-  050A 0080 0FF8 07 FF  
-  0578 0064 0FF8  
-  050A 0080 0FF8  
-  050A 0064 0FF8 07 FF 
  
 ==== 0x68: Train Platform ==== ==== 0x68: Train Platform ====
Line 697: Line 632:
 | B1 | if non-zero, skip B2 (TODO: does something else) | | B1 | if non-zero, skip B2 (TODO: does something else) |
 | B2 | count of 6 int16s to follow, stored to T3->bC6 | | B2 | count of 6 int16s to follow, stored to T3->bC6 |
-X,Z[1-3] ​| valid stopping zone (smiley face): constructed by '​B2'​ # triangles |+X1,Z1 \\ X2,Z2 \\ X3,Z3 | valid stopping zone (smiley face): constructed by '​B2'​ # triangles |
 | W | TODO stored to T6 | | W | TODO stored to T6 |
 | A | count of records to follow, stored to T3->bC7, handled by proc_802A41B0() | | A | count of records to follow, stored to T3->bC7, handled by proc_802A41B0() |
Line 755: Line 690:
  
 | E | end offset current collision group | | E | end offset current collision group |
-X/Y/Z,1/2/3 | triangle vertices for collision data |+X1,Y1,Z1 \\ X2,Y2,Z2 \\ X3,​Y3,​Z3 ​| triangle vertices for collision data |
 | A | TODO: stored to 0x4c(T4) in proc_802A41B0 | | A | TODO: stored to 0x4c(T4) in proc_802A41B0 |
 | B | TODO: passed through T7 to proc_802A41B0 | | B | TODO: passed through T7 to proc_802A41B0 |
Line 796: Line 731:
  
 | E | end offset current, added to T1, compared with T5 inner loop | | E | end offset current, added to T1, compared with T5 inner loop |
-X/Y/Z,1/2/3 | triangle vertices for collision data |+X1,Y1,Z1 \\ X2,Y2,Z2 \\ X3,​Y3,​Z3 ​| triangle vertices for collision data |
 | A | TODO: stored to 0x4c(T4) in proc_802A41B0 | | A | TODO: stored to 0x4c(T4) in proc_802A41B0 |
 | B | passed through T7 to proc_802A41B0 | | B | passed through T7 to proc_802A41B0 |