Browse Source

Started documenting TombRaider.h

Thomas Buck 10 years ago
parent
commit
7f08e5f072
1 changed files with 174 additions and 289 deletions
  1. 174
    289
      include/TombRaider.h

+ 174
- 289
include/TombRaider.h View File

@@ -74,65 +74,52 @@
74 74
 
75 75
 //#include "TombRaider1.h"
76 76
 
77
-typedef enum
78
-{
77
+typedef enum {
79 78
   TR_VERSION_UNKNOWN,
80 79
   TR_VERSION_1,
81 80
   TR_VERSION_2,
82 81
   TR_VERSION_3,
83 82
   TR_VERSION_4,
84 83
   TR_VERSION_5
85
-
86 84
 } tr2_version_type;
87 85
 
88 86
 
89
-typedef enum
90
-{
87
+typedef enum {
91 88
     TR_FREAD_NORMAL = 0,
92 89
     TR_FREAD_COMPRESSED
93
-
94 90
 } tr_fread_mode_t;
95 91
 
96 92
 
97
-typedef enum
98
-{
93
+typedef enum {
99 94
     tombraiderLight_typeDirectional   = 1,
100 95
     tombraiderLight_typeSpot          = 2,
101 96
     tombraiderLight_typePoint         = 3
102
-
103 97
 } tombraiderLightType;
104 98
 
105
-typedef enum
106
-{
99
+typedef enum {
107 100
     tombraiderLight_useCutoff         = 1,
108 101
     tombraiderLight_useAttenuation    = 2
109
-
110 102
 } tombraiderLightFlags;
111 103
 
112
-typedef enum
113
-{
104
+typedef enum {
114 105
     tombraiderRoom_underWater         = 1
115 106
 } tombraiderRoomFlags;
116 107
 
117
-typedef enum
118
-{
108
+typedef enum {
119 109
     tombraiderSector_wall = 1
120 110
 } tombraiderSectorFlags;
121 111
 
122
-typedef enum
123
-{
112
+typedef enum {
124 113
     tombraiderFace_Alpha          = 1,
125 114
     tombraiderFace_Colored        = 2,
126 115
     tombraiderFace_PartialAlpha   = 4
127
-
128 116
 } tombraiderFace_Flags;
129 117
 
130 118
 
131 119
 #define TR_SOUND_FOOTSTEP0    1
132 120
 #define TR_SOUND_F_PISTOL    12
133 121
 
134
-enum TR4_Objects
135
-{
122
+enum TR4_Objects {
136 123
     TR4_LARA = 0,
137 124
     TR4_PISTOLS_ANIM = 1,
138 125
     TR4_UZI_ANIM = 2,
@@ -168,35 +155,35 @@ enum TR4_Objects
168 155
 #define TR_ANIAMTION_GRAB_LEDGE       96
169 156
 #define TR_ANIAMTION_PULLING_UP       97
170 157
 
171
-/*---------------------------------------------------------------
172
- * Basic 24-bit colour structure
173
- * (although it appears that only 6 bits
174
- * per colour are actually used, making it 18-bit colour)
175
- ---------------------------------------------------------------*/
176
-typedef struct tr2_colour_s
177
-{
178
-  unsigned char r;
179
-  unsigned char g;
180
-  unsigned char b;
181
-}  __attribute__ ((packed)) tr2_colour_t;
182
-
183
-
184
-/*--------------------------------------------------------------
185
- * Basic vertex structure.
158
+/*!
159
+ * \brief Basic 24-bit colour structure.
160
+ *
161
+ * It appears that only 6 bits per colour are actually
162
+ * used, making it 18-bit colour.
163
+ */
164
+typedef struct {
165
+    unsigned char r; //!< Red part
166
+    unsigned char g; //!< Green part
167
+    unsigned char b; //!< Blue part
168
+} __attribute__ ((packed)) tr2_colour_t;
169
+
170
+
171
+/*!
172
+ * \brief Basic vertex structure.
173
+ *
186 174
  * Note that all vertices are relative coordinates;
187 175
  * each mesh (room, object, etc.) has its own offset by
188 176
  * which the vertex coordinates are translated.
189
- --------------------------------------------------------------*/
190
-typedef struct tr2_vertex_s
191
-{
192
-  short x;
193
-  short y;
194
-  short z;
195
-}  __attribute__ ((packed))   tr2_vertex_t;
196
-
197
-
198
-/*--------------------------------------------------------------
199
- * A rectangular (quad) face definition.
177
+ */
178
+typedef struct {
179
+    short x;
180
+    short y;
181
+    short z;
182
+} __attribute__ ((packed)) tr2_vertex_t;
183
+
184
+/*!
185
+ * \brief A rectangular (quad) face definition.
186
+ *
200 187
  * Four vertices (the values are indices into the
201 188
  * appropriate vertex list) and a texture (an index
202 189
  * into the texture list) or colour (index into 8-bit palette).
@@ -204,22 +191,26 @@ typedef struct tr2_vertex_s
204 191
  * I've seen a few coloured polygons where Texture is
205 192
  * greater than 255, but ANDing the value with 0xFF
206 193
  * seems to produce acceptable results.
207
- --------------------------------------------------------------*/
208
-typedef struct tr2_quad_s /* was tr2_face4  */
209
-{
210
-  unsigned short vertices[4];
211
-  unsigned short texture;
212
-}  __attribute__ ((packed))   tr2_quad_t;
213
-
214
-typedef struct tr4_quad_s
215
-{
216
-    unsigned short vertices[4];  // The 4 vertices of a quad
217
-    unsigned short texture;      // Object-texture index
218
-    unsigned short lighting;     // transparency flag & strength of
219
-                                 // the hilight
220
-    // Bit 0: if set, alpha channel = intensity (same meaning that when the Attribute field of tr2_object_texture is 2. Cf TRosetta stone document)
221
-    // Bit 1-7: strength of the hilight. In TR4, objects can exhibit some kind of light reflection when seen from some particular angles. These bits give the strength of this effect: the more bigger the value is, the more visible is the effect.
222
-}  __attribute__ ((packed))   tr4_quad_t;
194
+ */
195
+typedef struct {
196
+    unsigned short vertices[4];
197
+    unsigned short texture;
198
+} __attribute__ ((packed)) tr2_quad_t; // was tr2_face4
199
+
200
+typedef struct {
201
+    unsigned short vertices[4]; //!< The 4 vertices of a quad
202
+    unsigned short texture;     //!< Object-texture index
203
+    unsigned short lighting;    //!< Transparency flag & strength of the highlight
204
+    /*!<
205
+     * Bit 0: if set, alpha channel = intensity (same meaning that when the
206
+     * Attribute field of tr2_object_texture is 2. Cf TRosetta stone document)
207
+     *
208
+     * Bit 1-7: strength of the highlight. In TR4, objects can exhibit some kind
209
+     * of light reflection when seen from some particular angles. These bits give
210
+     * the strength of this effect:
211
+     * the more bigger the value is, the more visible is the effect.
212
+     */
213
+} __attribute__ ((packed)) tr4_quad_t;
223 214
 
224 215
 /*--------------------------------------------------------------
225 216
  * A triangular face definition.
@@ -1371,8 +1362,7 @@ typedef struct tr5_animation_s // ( 40 bytes ) ( same as old structure but has 8
1371 1362
 
1372 1363
 } tr5_animation_t;
1373 1364
 
1374
-typedef struct tr5_cinematic_frame_s
1375
-{
1365
+typedef struct {
1376 1366
     unsigned int unknown[24];
1377 1367
 } tr5_cinematic_frame_t;
1378 1368
 
@@ -1380,35 +1370,18 @@ typedef struct tr5_cinematic_frame_s
1380 1370
 #pragma pack(pop, tr2_h, 1)
1381 1371
 #endif
1382 1372
 
1383
-class TombRaider
1384
-{
1373
+class TombRaider {
1385 1374
 public:
1386 1375
 
1387
-    ////////////////////////////////////////////////////////////
1388
-    // Constructors
1389
-    ////////////////////////////////////////////////////////////
1390
-
1376
+    /*!
1377
+     * \brief Constructs an object of TombRaider
1378
+     */
1391 1379
     TombRaider();
1392
-    /*------------------------------------------------------
1393
-     * Pre  :
1394
-     * Post : Constructs an object of TombRaider
1395
-     *
1396
-     *-- History ------------------------------------------
1397
-     *
1398
-     * 2000.05.13:
1399
-     * Mongoose - Created
1400
-     ------------------------------------------------------*/
1401 1380
 
1381
+    /*!
1382
+     * \brief Deconstructs an object of TombRaider
1383
+     */
1402 1384
     ~TombRaider();
1403
-    /*------------------------------------------------------
1404
-     * Pre  : TombRaider object is allocated
1405
-     * Post : Deconstructs an object of TombRaider
1406
-     *
1407
-     *-- History ------------------------------------------
1408
-     *
1409
-     * 2000.05.13:
1410
-     * Mongoose - Created
1411
-     ------------------------------------------------------*/
1412 1385
 
1413 1386
     ////////////////////////////////////////////////////////////
1414 1387
     // Wash me -- not part of cleaned API
@@ -1420,16 +1393,11 @@ public:
1420 1393
 
1421 1394
     int NumTextures();
1422 1395
 
1396
+    /*!
1397
+     * \brief Get number of _special_ textures/images
1398
+     * \returns number of special textures/images
1399
+     */
1423 1400
     int NumSpecialTextures();
1424
-    /*------------------------------------------------------
1425
-     * Pre  :
1426
-     * Post : Returns number of "special" textures/images
1427
-     *
1428
-     *-- History ------------------------------------------
1429
-     *
1430
-     * 2001.06.19:
1431
-     * Mongoose - Created
1432
-     ------------------------------------------------------*/
1433 1401
 
1434 1402
     int NumAnimations();
1435 1403
 
@@ -1453,16 +1421,11 @@ public:
1453 1421
 
1454 1422
     tr2_object_texture_t *ObjectTextures();
1455 1423
 
1424
+    /*!
1425
+     * \brief Get number of boxes
1426
+     * \returns number of boxes
1427
+     */
1456 1428
     unsigned int getNumBoxes();
1457
-    /*------------------------------------------------------
1458
-     * Pre  :
1459
-     * Post : returns number of boxes
1460
-     *
1461
-     *-- History ------------------------------------------
1462
-     *
1463
-     * 200?.??.??:
1464
-     * Mongoose - Created
1465
-     ------------------------------------------------------*/
1466 1429
 
1467 1430
     tr2_box_t *Box();
1468 1431
 
@@ -1611,16 +1574,11 @@ public:
1611 1574
      * Mongoose - Created
1612 1575
      ------------------------------------------------------*/
1613 1576
 
1577
+    /*!
1578
+     * \brief Get number of bump maps in loaded pak
1579
+     * \returns number of bump maps
1580
+     */
1614 1581
     int getBumpMapCount();
1615
-    /*------------------------------------------------------
1616
-     * Pre  :
1617
-     * Post : Returns number of bump maps in loaded pak
1618
-     *
1619
-     *-- History ------------------------------------------
1620
-     *
1621
-     * 2002.12.24:
1622
-     * Mongoose - Created
1623
-     ------------------------------------------------------*/
1624 1582
 
1625 1583
     void getColor(int index, float color[4]);
1626 1584
 
@@ -1640,16 +1598,11 @@ public:
1640 1598
      * Mongoose - Created
1641 1599
      ------------------------------------------------------*/
1642 1600
 
1601
+    /*!
1602
+     * \brief Get SIGNED mesh count (TR encoded < 0 errors)
1603
+     * \returns signed mesh count
1604
+     */
1643 1605
     int getMeshCount();
1644
-    /*------------------------------------------------------
1645
-     * Pre  :
1646
-     * Post : Returns SIGNED mesh count ( TR encoded < 0 errs )
1647
-     *
1648
-     *-- History ------------------------------------------
1649
-     *
1650
-     * 2000.05.13:
1651
-     * Mongoose - Created
1652
-     ------------------------------------------------------*/
1653 1606
 
1654 1607
     void getMeshColoredRectangle(unsigned int meshIndex,
1655 1608
                                           unsigned int faceIndex,
@@ -1779,25 +1732,21 @@ public:
1779 1732
      * Mongoose - Created
1780 1733
      ------------------------------------------------------*/
1781 1734
 
1735
+    /*!
1736
+     * \brief Get number of collision boxes in room (unified)
1737
+     * \param roomIndex room index
1738
+     * \returns number of collision boxes in room
1739
+     */
1782 1740
     unsigned int getRoomBoxCount(unsigned int roomIndex);
1783
-    /*------------------------------------------------------
1784
-     * Pre  :
1785
-     * Post : Returns number of collision boxes in room ( unified )
1786
-     *
1787
-     *-- History ------------------------------------------
1788
-     *
1789
-     * 2003.05.24:
1790
-     * Mongoose - Created
1791
-     ------------------------------------------------------*/
1792 1741
 
1793 1742
     void getRoomInfo(unsigned int index,
1794
-                          unsigned int *flags, float pos[3],
1795
-                          float bboxMin[3], float bboxMax[3]);
1743
+                        unsigned int *flags, float pos[3],
1744
+                        float bboxMin[3], float bboxMax[3]);
1796 1745
 
1797 1746
     int getRoomLight(unsigned int roomIndex, unsigned int index,
1798
-                          float pos[4], float color[4], float dir[3],
1799
-                          float *attenuation, float *cutoffAngle,
1800
-                          unsigned int *type, unsigned int *flags);
1747
+                        float pos[4], float color[4], float dir[3],
1748
+                        float *attenuation, float *cutoffAngle,
1749
+                        unsigned int *type, unsigned int *flags);
1801 1750
     /*------------------------------------------------------
1802 1751
      * Pre  : All parms are allocated
1803 1752
      * Post : Returns a single light from a room ( unified )
@@ -1808,19 +1757,15 @@ public:
1808 1757
      * Mongoose - Created
1809 1758
      ------------------------------------------------------*/
1810 1759
 
1760
+    /*!
1761
+     * \brief Get number of lights in room (unified)
1762
+     * \param roomIndex room index
1763
+     * \returns number of lights in room
1764
+     */
1811 1765
     unsigned int getRoomLightCount(unsigned int roomIndex);
1812
-    /*------------------------------------------------------
1813
-     * Pre  :
1814
-     * Post : Returns number of lights in room ( unified )
1815
-     *
1816
-     *-- History ------------------------------------------
1817
-     *
1818
-     * 2003.05.24:
1819
-     * Mongoose - Created
1820
-     ------------------------------------------------------*/
1821 1766
 
1822 1767
     int getRoomModel(unsigned int roomIndex, unsigned int index,
1823
-                          int *modelIndex, float pos[3], float *yaw);
1768
+                        int *modelIndex, float pos[3], float *yaw);
1824 1769
     /*------------------------------------------------------
1825 1770
      * Pre  : All parms are allocated
1826 1771
      * Post : Returns a single model info from a room ( unified )
@@ -1831,19 +1776,15 @@ public:
1831 1776
      * Mongoose - Created
1832 1777
      ------------------------------------------------------*/
1833 1778
 
1779
+    /*!
1780
+     * \brief Get number of room models in room (unified)
1781
+     * \param roomIndex room index
1782
+     * \returns number of room models in room
1783
+     */
1834 1784
     unsigned int getRoomModelCount(unsigned int roomIndex);
1835
-    /*------------------------------------------------------
1836
-     * Pre  :
1837
-     * Post : Returns number of room models in room ( unified )
1838
-     *
1839
-     *-- History ------------------------------------------
1840
-     *
1841
-     * 2003.05.24:
1842
-     * Mongoose - Created
1843
-     ------------------------------------------------------*/
1844 1785
 
1845 1786
     int getRoomPortal(unsigned int roomIndex, unsigned int index,
1846
-                            int *adjoiningRoom, float normal[3], float vertices[12]);
1787
+                        int *adjoiningRoom, float normal[3], float vertices[12]);
1847 1788
     /*------------------------------------------------------
1848 1789
      * Pre  :
1849 1790
      * Post : Returns a single portal from room ( unified )
@@ -1854,20 +1795,16 @@ public:
1854 1795
      * Mongoose - Created
1855 1796
      ------------------------------------------------------*/
1856 1797
 
1798
+    /*!
1799
+     * \brief Get number of portals from room (unified)
1800
+     * \param roomIndex room index
1801
+     * \returns number of portals from room
1802
+     */
1857 1803
     unsigned int getRoomPortalCount(unsigned int roomIndex);
1858
-    /*------------------------------------------------------
1859
-     * Pre  :
1860
-     * Post : Returns number of portals from room ( unified )
1861
-     *
1862
-     *-- History ------------------------------------------
1863
-     *
1864
-     * 2003.05.24:
1865
-     * Mongoose - Created
1866
-     ------------------------------------------------------*/
1867 1804
 
1868 1805
     void getRoomRectangle(unsigned int roomIndex, unsigned int rectangleIndex,
1869
-                                 unsigned int *indices, float *texCoords, int *texture,
1870
-                                 unsigned int *flags);
1806
+                            unsigned int *indices, float *texCoords, int *texture,
1807
+                            unsigned int *flags);
1871 1808
     /*------------------------------------------------------
1872 1809
      * Pre  :
1873 1810
      * Post : Gets rectangle data with texCoords for non-matching
@@ -1879,21 +1816,17 @@ public:
1879 1816
      * Mongoose - Created
1880 1817
      ------------------------------------------------------*/
1881 1818
 
1819
+    /*!
1820
+     * \brief Get number of rectangles from room (unified)
1821
+     * \param roomIndex room index
1822
+     * \returns number of rectangles from room
1823
+     */
1882 1824
     unsigned int getRoomRectangleCount(unsigned int roomIndex);
1883
-    /*------------------------------------------------------
1884
-     * Pre  :
1885
-     * Post : Returns number of rectangles from room ( unified )
1886
-     *
1887
-     *-- History ------------------------------------------
1888
-     *
1889
-     * 2003.05.24:
1890
-     * Mongoose - Created
1891
-     ------------------------------------------------------*/
1892 1825
 
1893 1826
     int getRoomSector(unsigned int roomIndex, unsigned int index,
1894
-                            unsigned int *flags, float *ceiling, float *floor,
1895
-                            int *floorDataIndex, int *boxIndex,
1896
-                            int *roomBelow, int *roomAbove);
1827
+                        unsigned int *flags, float *ceiling, float *floor,
1828
+                        int *floorDataIndex, int *boxIndex,
1829
+                        int *roomBelow, int *roomAbove);
1897 1830
     /*------------------------------------------------------
1898 1831
      * Pre  :
1899 1832
      * Post : Returns a single sector from room ( unified )
@@ -1905,8 +1838,8 @@ public:
1905 1838
      ------------------------------------------------------*/
1906 1839
 
1907 1840
     unsigned int getRoomSectorCount(unsigned int roomIndex,
1908
-                                              unsigned int *zSectorsCount,
1909
-                                              unsigned int *xSectorsCount);
1841
+                                    unsigned int *zSectorsCount,
1842
+                                    unsigned int *xSectorsCount);
1910 1843
     /*------------------------------------------------------
1911 1844
      * Pre  :
1912 1845
      * Post : Returns number of sectors in room ( unified )
@@ -1920,23 +1853,19 @@ public:
1920 1853
      ------------------------------------------------------*/
1921 1854
 
1922 1855
     void getRoomSprite(unsigned int roomIndex, unsigned int index,
1923
-                             float scale, int *texture,
1924
-                             float *pos, float *vertices, float *texcoords);
1925
-
1856
+                        float scale, int *texture,
1857
+                        float *pos, float *vertices, float *texcoords);
1858
+
1859
+    /*!
1860
+     * \brief Get number of sprites in room (unified)
1861
+     * \param roomIndex room index
1862
+     * \returns number of sprites in room
1863
+     */
1926 1864
     unsigned int getRoomSpriteCount(unsigned int roomIndex);
1927
-    /*------------------------------------------------------
1928
-     * Pre  :
1929
-     * Post : Returns number of sprites in room ( unified )
1930
-     *
1931
-     *-- History ------------------------------------------
1932
-     *
1933
-     * 2003.05.24:
1934
-     * Mongoose - Created
1935
-     ------------------------------------------------------*/
1936 1865
 
1937 1866
     void getRoomTriangle(unsigned int roomIndex, unsigned int triangleIndex,
1938
-                                unsigned int *indices, float *texCoords, int *texture,
1939
-                                unsigned int *flags);
1867
+                            unsigned int *indices, float *texCoords, int *texture,
1868
+                            unsigned int *flags);
1940 1869
     /*------------------------------------------------------
1941 1870
      * Pre  :
1942 1871
      * Post : Gets triangle data with texCoords for non-matching
@@ -1949,9 +1878,9 @@ public:
1949 1878
      ------------------------------------------------------*/
1950 1879
 
1951 1880
     void getRoomTriangles(unsigned int index, int textureOffset,
1952
-                                 unsigned int *count, unsigned int **indices,
1953
-                                 float **texCoords, int **textures,
1954
-                                 unsigned int **flags);
1881
+                            unsigned int *count, unsigned int **indices,
1882
+                            float **texCoords, int **textures,
1883
+                            unsigned int **flags);
1955 1884
     /*------------------------------------------------------
1956 1885
      * Pre  :
1957 1886
      * Post : Gets triangle data with texCoords for non-matching
@@ -1968,10 +1897,10 @@ public:
1968 1897
      ------------------------------------------------------*/
1969 1898
 
1970 1899
     void getRoomTriangles(unsigned int roomIndex, int textureOffset,
1971
-                                 unsigned int *count,
1972
-                                 unsigned int **indices, float **vertices,
1973
-                                 float **texCoords, float **colors,
1974
-                                 int **textures, unsigned int **flags);
1900
+                            unsigned int *count,
1901
+                            unsigned int **indices, float **vertices,
1902
+                            float **texCoords, float **colors,
1903
+                            int **textures, unsigned int **flags);
1975 1904
     /*------------------------------------------------------
1976 1905
      * Pre  :
1977 1906
      * Post : Gets triangle data with duplicated
@@ -1987,19 +1916,15 @@ public:
1987 1916
      * Mongoose - Created
1988 1917
      ------------------------------------------------------*/
1989 1918
 
1919
+    /*!
1920
+     * \brief Get number of triangles from room (unified)
1921
+     * \param roomIndex room index
1922
+     * \returns number of triangles from room
1923
+     */
1990 1924
     unsigned int getRoomTriangleCount(unsigned int roomIndex);
1991
-    /*------------------------------------------------------
1992
-     * Pre  :
1993
-     * Post : Returns number of triangles from room ( unified )
1994
-     *
1995
-     *-- History ------------------------------------------
1996
-     *
1997
-     * 2003.05.24:
1998
-     * Mongoose - Created
1999
-     ------------------------------------------------------*/
2000 1925
 
2001 1926
     void getRoomVertex(unsigned int roomIndex, unsigned int vertexIndex,
2002
-                             float *xyz, float *rgba);
1927
+                        float *xyz, float *rgba);
2003 1928
     /*------------------------------------------------------
2004 1929
      * Pre  : Given room index and vertex index and
2005 1930
      *         xyz is allocated float[3]
@@ -2014,9 +1939,9 @@ public:
2014 1939
      ------------------------------------------------------*/
2015 1940
 
2016 1941
     void getRoomVertexArrays(unsigned int roomIndex,
2017
-                                     unsigned int *vertexCount, float **vertices,
2018
-                                     unsigned int *normalCount, float **normals,
2019
-                                     unsigned int *colorCount, float **colors);
1942
+                                unsigned int *vertexCount, float **vertices,
1943
+                                unsigned int *normalCount, float **normals,
1944
+                                unsigned int *colorCount, float **colors);
2020 1945
     /*------------------------------------------------------
2021 1946
      * Pre  : Given room index
2022 1947
      *
@@ -2043,21 +1968,16 @@ public:
2043 1968
      * Mongoose - Created
2044 1969
      ------------------------------------------------------*/
2045 1970
 
1971
+    /*!
1972
+     * \brief Get sky mesh ID
1973
+     * \returns moveable id of sky mesh or -1 if none
1974
+     */
2046 1975
     int getSkyModelId();
2047
-    /*------------------------------------------------------
2048
-     * Pre  :
2049
-     * Post : Returns moveable id of sky mesh or -1 if none
2050
-     *
2051
-     *-- History ------------------------------------------
2052
-     *
2053
-     * 2001.05.28:
2054
-     * Mongoose - Created
2055
-     ------------------------------------------------------*/
2056 1976
 
2057 1977
     void getSprites();
2058 1978
 
2059 1979
     void getSoundSample(unsigned int index,
2060
-                              unsigned int *bytes, unsigned char **data);
1980
+                        unsigned int *bytes, unsigned char **data);
2061 1981
     /*------------------------------------------------------
2062 1982
      * Pre  :
2063 1983
      * Post : Returns a copy of a sound sample and
@@ -2069,16 +1989,11 @@ public:
2069 1989
      * Mongoose - Created
2070 1990
      ------------------------------------------------------*/
2071 1991
 
1992
+    /*!
1993
+     * \brief Get number of loaded sound samples
1994
+     * \returns number of sound samples loaded
1995
+     */
2072 1996
     unsigned int getSoundSamplesCount();
2073
-    /*------------------------------------------------------
2074
-     * Pre  :
2075
-     * Post : Returns number of sound samples loaded
2076
-     *
2077
-     *-- History ------------------------------------------
2078
-     *
2079
-     * 2003.05.10:
2080
-     * Mongoose - Created
2081
-     ------------------------------------------------------*/
2082 1997
 
2083 1998
     bool isMeshValid(int index);
2084 1999
     /*------------------------------------------------------
@@ -2091,71 +2006,41 @@ public:
2091 2006
      * Mongoose - Created
2092 2007
      ------------------------------------------------------*/
2093 2008
 
2009
+    /*!
2010
+     * \brief Check if a room is valid (TRC support)
2011
+     * \param index room index
2012
+     * \returns true if room is valid
2013
+     */
2094 2014
     bool isRoomValid(int index);
2095
-    /*------------------------------------------------------
2096
-     * Pre  :
2097
-     * Post : Returns true if room is valid ( TRC support )
2098
-     *
2099
-     *-- History ------------------------------------------
2100
-     *
2101
-     * 2003.05.24:
2102
-     * Mongoose - Created
2103
-     ------------------------------------------------------*/
2104
-
2105
-
2106
-    ////////////////////////////////////////////////////////////
2107
-    // Public Mutators
2108
-    ////////////////////////////////////////////////////////////
2109 2015
 
2016
+    /*!
2017
+     * \brief Load an external sound pak for TR2 and TR3
2018
+     * \param filename pak to load
2019
+     * \returns < 0 on error
2020
+     */
2110 2021
     int loadSFX(char *filename);
2111
-    /*------------------------------------------------------
2112
-     * Pre  :
2113
-     * Post : Loads an external sound pak for TR2 and TR3
2114
-     *        games.  Returns < 0 if error.
2115
-     *
2116
-     *-- History ------------------------------------------
2117
-     *
2118
-     * 2003.05.12:
2119
-     * Mongoose - Created
2120
-     ------------------------------------------------------*/
2121 2022
 
2122 2023
     void reset();
2123 2024
 
2124 2025
     void setDebug(bool toggle);
2125 2026
 
2027
+    /*!
2028
+     * \brief Sets lighting factor for each vertex color per room in TR3 paks
2029
+     * \param f new lighting factor
2030
+     */
2126 2031
     void setRoomVertexLightingFactor(float f);
2127
-    /*------------------------------------------------------
2128
-     * Pre  :
2129
-     * Post : Sets lighting factor for each vertex color per
2130
-     *        room in TR3 paks
2131
-     *
2132
-     *-- History ------------------------------------------
2133
-     *
2134
-     * 2003.05.13:
2135
-     * Mongoose - Created
2136
-     ------------------------------------------------------*/
2137 2032
 
2033
+    /*!
2034
+     * \brief Set scaling for sprite texel alignment, etc.
2035
+     * \param f new scaling factor
2036
+     */
2138 2037
     void setTexelScalingFactor(float f);
2139
-    /*------------------------------------------------------
2140
-     * Pre  :
2141
-     * Post : Sets scaling for sprite texel alignment, etc
2142
-     *
2143
-     *-- History ------------------------------------------
2144
-     *
2145
-     * 2003.05.22:
2146
-     * Mongoose - Created
2147
-     ------------------------------------------------------*/
2148
-
2149 2038
 
2150 2039
 private:
2151 2040
 
2152
-    ////////////////////////////////////////////////////////////
2153
-    // Private Accessors
2154
-    ////////////////////////////////////////////////////////////
2155
-
2156 2041
     void extractMeshes(unsigned char *mesh_data,
2157
-                             unsigned int num_mesh_pointers,
2158
-                             unsigned int *mesh_pointers);
2042
+                        unsigned int num_mesh_pointers,
2043
+                        unsigned int *mesh_pointers);
2159 2044
 
2160 2045
     int Fread(void *buffer, size_t size, size_t count, FILE *f);
2161 2046
 
@@ -2172,7 +2057,7 @@ private:
2172 2057
      ------------------------------------------------------*/
2173 2058
 
2174 2059
     void getRiffDataTR4(unsigned int index,
2175
-                              unsigned int *bytes, unsigned char **data);
2060
+                        unsigned int *bytes, unsigned char **data);
2176 2061
     /*------------------------------------------------------
2177 2062
      * Pre  :
2178 2063
      * Post : Returns a copy of a TR4 sound sample
@@ -2185,7 +2070,7 @@ private:
2185 2070
      ------------------------------------------------------*/
2186 2071
 
2187 2072
     int getRiffOffsets(unsigned char *riffData, unsigned int riffDataBytes,
2188
-                             unsigned int **offsets, unsigned int numOffsets);
2073
+                        unsigned int **offsets, unsigned int numOffsets);
2189 2074
     /*------------------------------------------------------
2190 2075
      * Pre  :
2191 2076
      * Post : Returns an array of offsets for a contigous

Loading…
Cancel
Save