LBA2:Island polygons: Difference between revisions

From LBA File Information
Jump to navigation Jump to search
[unchecked revision][checked revision]
Content deleted Content added
No edit summary
The other lines use inclusive interval ends, and the last part is 13 bytes long, see https://github.com/LBALab/lba2remake/blob/e142948d92045c103eba1c97554494f192783663/src/game/scenery/island/ground.ts#L87
 
(7 intermediate revisions by 3 users not shown)
Line 13: Line 13:
Each square has potentially 2 triangles. Each triangle is defined by a ''32 bits'' bitfield.
Each square has potentially 2 triangles. Each triangle is defined by a ''32 bits'' bitfield.


* ''Bits 0 -> 4'' = '''color''': Index in the game palette of the color to use for this triangle (if useColor flag is set)
* ''Bits 0 -> 3'' = '''color''': Index in the game palette of the color to use for this triangle (if useColor flag is set)
* ''Bits 4 -> 6'' = '''useTexture''': Whether to use texturing or not for this triangle.
* ''Bits 4 -> 4'' = '''unknown_1'''
* ''Bits 6 -> 8'' = '''useColor''': Whether to use coloring or not for this triangle. (a triangle can be both textured and colored, where there are transparent texture areas)
* ''Bits 5 -> 5'' = '''useTexture''': Whether to use texturing or not for this triangle.
* ''Bits 8 -> 12'' = '''unknown_1'''
* ''Bits 6 -> 6'' = '''unknown_2'''
* ''Bits 7 -> 7'' = '''useColor''': Whether to use coloring or not for this triangle. (a triangle can be both textured and colored, where there are transparent texture areas)
* ''Bits 12 -> 16'' = '''liquid''': Animated sea/lava squares near the shore
* ''Bits 16 -> 17'' = '''orientation''': Direction to use for "cutting" the square into 2 triangles.
* ''Bits 8 -> 11'' = '''sound''': sound for this ground
* ''Bits 17 -> 19'' = '''unknown_2'''
* ''Bits 12 -> 15'' = '''liquid''': Animated sea/lava squares near the shore
* ''Bits 19 -> 32'' = '''uvIndex''': Index of the UV entry to use for this triangle (see [[LBA2:Island texture uvs]])
* ''Bits 16 -> 16'' = '''orientation''': Direction to use for "cutting" the square into 2 triangles.
* ''Bits 17 -> 17'' = '''collision''': Determines how the surface interacts with the character.
* ''Bits 18 -> 18'' = '''unknown_3'''
* ''Bits 19 -> 31'' = '''uvIndex''': Index of the UV entry to use for this triangle (see [[LBA2:Island texture uvs]])

[[File:Island.jpg|500px]]


{{providers|[[provider::Lupin]]}}
{{providers|[[provider::Lupin]]}}

Latest revision as of 19:06, 3 February 2024

Island polygons
Extension

LPG

Occurence

LBA2

Colour
Programs supporting this format

(none)

References

Find entries of this type

The file contains the definition of the ground triangles used for an island section.

Specification[edit]

There are 64x64x2x4 bytes in the file. The grid for an island section is made of 64x64 squares.

Each square has potentially 2 triangles. Each triangle is defined by a 32 bits bitfield.

  • Bits 0 -> 3 = color: Index in the game palette of the color to use for this triangle (if useColor flag is set)
  • Bits 4 -> 4 = unknown_1
  • Bits 5 -> 5 = useTexture: Whether to use texturing or not for this triangle.
  • Bits 6 -> 6 = unknown_2
  • Bits 7 -> 7 = useColor: Whether to use coloring or not for this triangle. (a triangle can be both textured and colored, where there are transparent texture areas)
  • Bits 8 -> 11 = sound: sound for this ground
  • Bits 12 -> 15 = liquid: Animated sea/lava squares near the shore
  • Bits 16 -> 16 = orientation: Direction to use for "cutting" the square into 2 triangles.
  • Bits 17 -> 17 = collision: Determines how the surface interacts with the character.
  • Bits 18 -> 18 = unknown_3
  • Bits 19 -> 31 = uvIndex: Index of the UV entry to use for this triangle (see LBA2:Island texture uvs)

Error creating thumbnail: File missing


Information provided by: Lupin