Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
trs:room_geometry [2021/04/29 21:31] – [Room Light Structure] zdimensiontrs:room_geometry [2024/12/13 18:40] (current) – [Room Vertex Structure] stohrendorf
Line 287: Line 287:
         float r, g, b;       // Colour of the light         float r, g, b;       // Colour of the light
  
-       uint32_t Separator    // Dummy value = 0xCDCDCDCD+       uint32_t shadow;    // Dummy value = 0xCDCDCDCD
  
         float In;            // Cosine of the IN value for light / size of IN value         float In;            // Cosine of the IN value for light / size of IN value
Line 310: Line 310:
 { {
         float x, y, z;       // Position of light, in world coordinates         float x, y, z;       // Position of light, in world coordinates
-        float rg, b      // Colour of the light +        float radsqrad
- +        float den
-       uint32_t Separator    // Dummy value = 0xCDCDCDCD +        float r, g, b;
- +
-        float In           // Cosine of the IN value for light / size of IN value +
-        float Out          // Cosine of the OUT value for light / size of OUT value+
 }; };
  
 </code> </code>
- 
-**TODO**: investigate exact meaning of ''tr5_fog_bulb''  fields. 
  
 ''<nowiki>x,y,z</nowiki>''  values shouldn’t be used by sun type light, but sun seems to have a large ''<nowiki>x</nowiki>''  value (9 million, give or take), a zero ''<nowiki>y</nowiki>''  value, and a small ''<nowiki>z</nowiki>''  value (4..20) in the original TR5 levels. ''<nowiki>x,y,z</nowiki>''  values shouldn’t be used by sun type light, but sun seems to have a large ''<nowiki>x</nowiki>''  value (9 million, give or take), a zero ''<nowiki>y</nowiki>''  value, and a small ''<nowiki>z</nowiki>''  value (4..20) in the original TR5 levels.
Line 369: Line 364:
        int16_t Lighting;        int16_t Lighting;
       uint16_t Attributes; // A set of flags for special rendering effects       uint16_t Attributes; // A set of flags for special rendering effects
-       int16_t Lighting2 // Almost always equal to Lighting1+       int16_t RenderedLighting; // Internal field to store the actually rendered lighting
 }; };
 </code> </code>
Line 546: Line 541:
     uint16_t NumLayerVertices;   // Number of vertices in this layer (2 bytes)     uint16_t NumLayerVertices;   // Number of vertices in this layer (2 bytes)
     uint16_t NumLayerVerticesWater; // Number of underwater vertices in this layer (2 bytes)     uint16_t NumLayerVerticesWater; // Number of underwater vertices in this layer (2 bytes)
-    uint16_t UnknownL1;+    uint16_t NumLayerVerticesShore;
     uint16_t NumLayerRectangles; // Number of rectangles in this layer (2 bytes)     uint16_t NumLayerRectangles; // Number of rectangles in this layer (2 bytes)
     uint16_t NumLayerTriangles;  // Number of triangles in this layer (2 bytes)     uint16_t NumLayerTriangles;  // Number of triangles in this layer (2 bytes)
-    uint16_t UnknownL2;+    uint16_t NumLayerRectanglesWater// Number of rectangles containing water vertices 
 +    uint16_t NumLayerTrianglesWater; // Number of trianglescontaining water vertices
  
     uint16_t Filler;             // Always 0     uint16_t Filler;             // Always 0
-    uint16_t Filler2;            // Always 0 
  
     // The following 6 floats define the bounding box for the layer     // The following 6 floats define the bounding box for the layer
Line 563: Line 558:
     float    LayerBoundingBoxZ2;     float    LayerBoundingBoxZ2;
  
-    uint32_t Filler3;     // Always 0 (4 bytes)+    uint32_t Filler3;     // Always 0 (4 bytes), internal pointer
     uint32_t VerticesOffset;   // Those fields are overwritten at level loading      uint32_t VerticesOffset;   // Those fields are overwritten at level loading 
     uint32_t PolyOffset;       // by the ones present in the tr5_room struct + an offset     uint32_t PolyOffset;       // by the ones present in the tr5_room struct + an offset
-    uint32_t PolyOffset2;      // i.e. the values are not read, the fields are there for storage purposes+    uint32_t PrelightOffset;      // i.e. the values are not read, the fields are there for storage purposes
 } }
 </code> </code>
  
-''<nowiki>UnknownL2</nowiki>''  appears to be the number of double sided textures in this layer, however is sometimes 1 off (2 bytes).+''<nowiki>NumLayerVerticesShore</nowiki>''  appears to be the number of double sided textures in this layer, however is sometimes 1 off (2 bytes).
  
 ===== The Whole Room Structure ===== ===== The Whole Room Structure =====
trs/room_geometry.1619731889.txt.gz · Last modified: 2021/04/29 21:31 by zdimension
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0