Changes

Jump to navigation Jump to search
m
no edit summary
Line 74: Line 74:  
Everytime a string is assigned to an Id, this string is placed into a global 2-dimensional table with its position depending on its hash (if it wasn't already in the table). This position is then stored in the Id. Because of this mechanism, Ids can be used for very fast string comparisons (like a hash) while still being reversible.
 
Everytime a string is assigned to an Id, this string is placed into a global 2-dimensional table with its position depending on its hash (if it wasn't already in the table). This position is then stored in the Id. Because of this mechanism, Ids can be used for very fast string comparisons (like a hash) while still being reversible.
   −
  struct Id
+
  struct MwId
 
  {
 
  {
 
     int value;
 
     int value;
Line 83: Line 83:  
* If bits 30 and 31 are set, the Id is empty (null). Typically ''value'' is -1 in this case.
 
* If bits 30 and 31 are set, the Id is empty (null). Typically ''value'' is -1 in this case.
   −
Ids are managed by class CMwId.
+
Ids are managed by the class CMwId.
    
===Identifier===
 
===Identifier===
Line 90: Line 90:  
  struct SGameCtnIdentifier
 
  struct SGameCtnIdentifier
 
  {
 
  {
     Id uid;        // Name. Could be the name of a map, name of a block, path of a file etc.
+
     MwId uid;        // Name. Could be the name of a map, name of a block, path of a file etc.
     Id collection;  // Environment. In ManiaPlanet, 0xC = Canyon and 0xCA = Storm.
+
     MwId collection;  // Environment. In ManiaPlanet, 0xC = Canyon and 0xCA = Storm.
     Id author;      // Author name (typically "Nadeo")
+
     MwId author;      // Author name (typically "Nadeo")
 
  };
 
  };
   −
Identifier are managed by class SGameCtnIdentifier.
+
Identifier are managed by the class SGameCtnIdentifier.
    
===Delegate===
 
===Delegate===
Line 114: Line 114:  
     int g;
 
     int g;
 
     int b;
 
     int b;
    int a;
   
  };
 
  };
   Line 120: Line 119:  
ManiaPlanet of course has several vector types:
 
ManiaPlanet of course has several vector types:
   −
  struct int2     // And uint2 for unsigned int
+
  struct Int2     // And Nat2 for unsigned int
 
  {
 
  {
 
     int x;
 
     int x;
Line 126: Line 125:  
  };
 
  };
   −
  struct int3     // And uint3 for unsigned int
+
  struct Int3     // And Nat3 for unsigned int
 
  {
 
  {
 
     int x;
 
     int x;
Line 133: Line 132:  
  };
 
  };
   −
  struct Vec2D
+
  struct Vec2
 
  {
 
  {
     float fX;
+
     float x;
     float fY;
+
     float y;
 
  };
 
  };
   −
  struct Vec3D
+
  struct Vec3
 
  {
 
  {
     float fX;
+
     float x;
     float fY;
+
     float y;
     float fZ;
+
     float z;
 
  };
 
  };
   −
  struct Vec4D
+
  struct Vec4
 
  {
 
  {
     float fX;
+
     float x;
     float fY;
+
     float y;
     float fZ;
+
     float z;
     float fW;
+
     float w;
 
  };
 
  };
   −
  struct Quaternion    // Structure is uncertain
+
  struct Quat
 
  {
 
  {
     float fAngle;
+
     float w;
     Vec3D vecAxis;
+
     float x;
 +
    float y;
 +
    float z;
 
  };
 
  };
   −
  struct Matrix33
+
  struct Iso3
 
  {
 
  {
     Vec3D rotRow1;
+
     const float AxeXx;
     Vec3D rotRow2;
+
     const float AxeXy;
     Vec3D rotRow3;
+
     const float AxeYx;
 +
    const float AxeYy;
 +
    float tx;
 +
    float ty;
 
  };
 
  };
   −
  struct Matrix34 : public Matrix33
+
  struct Iso4
 
  {
 
  {
     Vec3D position;
+
     const float AxeXx;
 +
    const float AxeXy;
 +
    const float AxeXz;
 +
    const float AxeYx;
 +
    const float AxeYy;
 +
    const float AxeYz;
 +
    const float AxeZx;
 +
    const float AxeZy;
 +
    const float AxeZz;
 +
    float tx;
 +
    float ty;
 +
    float tz;
 
  };
 
  };
   Line 295: Line 310:  
         INTBUFFERCAT,
 
         INTBUFFERCAT,
 
         INTRANGE,
 
         INTRANGE,
         ISO4,            // Matrix34
+
         ISO4,            // Iso4
 
         ISO4ARRAY,
 
         ISO4ARRAY,
 
         ISO4BUFFER,
 
         ISO4BUFFER,
 
         ISO4BUFFERCAT,
 
         ISO4BUFFERCAT,
         ISO3,            // Matrix33
+
         ISO3,            // Iso3
 
         ISO3ARRAY,
 
         ISO3ARRAY,
 
         ISO3BUFFER,
 
         ISO3BUFFER,
Line 325: Line 340:  
         STRINGINTBUFFER,
 
         STRINGINTBUFFER,
 
         STRINGINTBUFFERCAT,
 
         STRINGINTBUFFERCAT,
         VEC2,            // Vec2D
+
         VEC2,            // Vec2
 
         VEC2ARRAY,
 
         VEC2ARRAY,
 
         VEC2BUFFER,
 
         VEC2BUFFER,
 
         VEC2BUFFERCAT,
 
         VEC2BUFFERCAT,
         VEC3,            // Vec3D
+
         VEC3,            // Vec3
 
         VEC3ARRAY,
 
         VEC3ARRAY,
 
         VEC3BUFFER,
 
         VEC3BUFFER,
 
         VEC3BUFFERCAT,
 
         VEC3BUFFERCAT,
         VEC4,            // Vec4D
+
         VEC4,            // Vec4
 
         VEC4ARRAY,
 
         VEC4ARRAY,
 
         VEC4BUFFER,
 
         VEC4BUFFER,
 
         VEC4BUFFERCAT,
 
         VEC4BUFFERCAT,
         INT3,            // int3
+
         INT3,            // Int3
 
         INT3ARRAY,
 
         INT3ARRAY,
 
         INT3BUFFER,
 
         INT3BUFFER,
 
         INT3BUFFERCAT,
 
         INT3BUFFERCAT,
         NAT3,            // uint3
+
         NAT3,            // Nat3
 
         NAT3ARRAY,
 
         NAT3ARRAY,
 
         NAT3BUFFER,
 
         NAT3BUFFER,
Line 474: Line 489:  
         ITEM_OBJECT    = 0x10000002,  // CMwNod*
 
         ITEM_OBJECT    = 0x10000002,  // CMwNod*
 
         ITEM_ENUM      = 0x10000003,
 
         ITEM_ENUM      = 0x10000003,
         ITEM_ISO4      = 0x10000004,  // Matrix34*
+
         ITEM_ISO4      = 0x10000004,  // Iso4*
 
         ITEM_VEC2      = 0x10000005,
 
         ITEM_VEC2      = 0x10000005,
 
         ITEM_VEC3      = 0x10000006,
 
         ITEM_VEC3      = 0x10000006,

Navigation menu