mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 09:18:00 +03:00
resolving namespace std conflicts
This commit is contained in:
parent
a4e4bd702d
commit
2b4d1ca2e8
25 changed files with 233 additions and 234 deletions
|
@ -288,8 +288,8 @@ short AIGuard(CREATURE_INFO* creature);
|
||||||
void AlertNearbyGuards(ITEM_INFO* item);
|
void AlertNearbyGuards(ITEM_INFO* item);
|
||||||
void AlertAllGuards(short itemNumber);
|
void AlertAllGuards(short itemNumber);
|
||||||
void CreatureKill(ITEM_INFO* item, int killAnim, int killState, short laraAnim);
|
void CreatureKill(ITEM_INFO* item, int killAnim, int killState, short laraAnim);
|
||||||
short CreatureEffect2(ITEM_INFO* item, BITE_INFO* bite, short damage, short angle, function<CreatureEffectFunction> func);
|
short CreatureEffect2(ITEM_INFO* item, BITE_INFO* bite, short damage, short angle, std::function<CreatureEffectFunction> func);
|
||||||
short CreatureEffect(ITEM_INFO* item, BITE_INFO* bite, function<CreatureEffectFunction> func);
|
short CreatureEffect(ITEM_INFO* item, BITE_INFO* bite, std::function<CreatureEffectFunction> func);
|
||||||
void CreatureUnderwater(ITEM_INFO* item, int depth);
|
void CreatureUnderwater(ITEM_INFO* item, int depth);
|
||||||
void CreatureFloat(short itemNumber);
|
void CreatureFloat(short itemNumber);
|
||||||
void CreatureJoint(ITEM_INFO* item, short joint, short required);
|
void CreatureJoint(ITEM_INFO* item, short joint, short required);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
#include "trmath.h"
|
#include "trmath.h"
|
||||||
|
using std::vector;
|
||||||
ShatterImpactInfo ShatterImpactData;
|
ShatterImpactInfo ShatterImpactData;
|
||||||
SHATTER_ITEM ShatterItem;
|
SHATTER_ITEM ShatterItem;
|
||||||
short SmashedMeshCount;
|
short SmashedMeshCount;
|
||||||
|
|
|
@ -40,7 +40,7 @@ typedef struct ShatterImpactInfo
|
||||||
typedef struct DebrisMesh
|
typedef struct DebrisMesh
|
||||||
{
|
{
|
||||||
RENDERER_BUCKETS bucket;
|
RENDERER_BUCKETS bucket;
|
||||||
array<RendererVertex, 3> vertices;
|
std::array<RendererVertex, 3> vertices;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct DebrisFragment
|
typedef struct DebrisFragment
|
||||||
|
@ -85,7 +85,7 @@ typedef struct DEBRIS_STRUCT
|
||||||
};
|
};
|
||||||
|
|
||||||
extern SHATTER_ITEM ShatterItem;
|
extern SHATTER_ITEM ShatterItem;
|
||||||
extern vector<DebrisFragment> DebrisFragments;
|
extern std::vector<DebrisFragment> DebrisFragments;
|
||||||
extern ShatterImpactInfo ShatterImpactData;
|
extern ShatterImpactInfo ShatterImpactData;
|
||||||
extern short SmashedMeshCount;
|
extern short SmashedMeshCount;
|
||||||
extern MESH_INFO* SmashedMesh[32];
|
extern MESH_INFO* SmashedMesh[32];
|
||||||
|
|
|
@ -20,7 +20,7 @@ struct FX_INFO
|
||||||
short flag2;
|
short flag2;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern function<EffectFunction> effect_routines[];
|
extern std::function<EffectFunction> effect_routines[];
|
||||||
extern FX_INFO* Effects;
|
extern FX_INFO* Effects;
|
||||||
|
|
||||||
bool ItemNearLara(PHD_3DPOS* pos, int radius);
|
bool ItemNearLara(PHD_3DPOS* pos, int radius);
|
||||||
|
|
|
@ -333,7 +333,7 @@ private:
|
||||||
float m_deltaMovement;
|
float m_deltaMovement;
|
||||||
InventoryObjectDefinition m_objectsTable[INVENTORY_TABLE_SIZE];
|
InventoryObjectDefinition m_objectsTable[INVENTORY_TABLE_SIZE];
|
||||||
int m_type;
|
int m_type;
|
||||||
vector<InventoryObjectCombination> m_combinations;
|
std::vector<InventoryObjectCombination> m_combinations;
|
||||||
int m_activeGui;
|
int m_activeGui;
|
||||||
float m_cameraY;
|
float m_cameraY;
|
||||||
float m_cameraTilt;
|
float m_cameraTilt;
|
||||||
|
|
|
@ -24,8 +24,8 @@ extern byte LaraNodeUnderwater[NUM_LARA_MESHES];
|
||||||
#define INIT_LARA_MESHES(mesh, to, from) Lara.meshPtrs[mesh] = LARA_MESHES(to, mesh) = LARA_MESHES(from, mesh)
|
#define INIT_LARA_MESHES(mesh, to, from) Lara.meshPtrs[mesh] = LARA_MESHES(to, mesh) = LARA_MESHES(from, mesh)
|
||||||
|
|
||||||
#define LaraRoutineFunction void(ITEM_INFO* item, COLL_INFO* coll)
|
#define LaraRoutineFunction void(ITEM_INFO* item, COLL_INFO* coll)
|
||||||
extern function<LaraRoutineFunction> lara_control_routines[NUM_LARA_STATES + 1];
|
extern std::function<LaraRoutineFunction> lara_control_routines[NUM_LARA_STATES + 1];
|
||||||
extern function<LaraRoutineFunction> lara_collision_routines[NUM_LARA_STATES + 1];
|
extern std::function<LaraRoutineFunction> lara_collision_routines[NUM_LARA_STATES + 1];
|
||||||
///extern function<LaraRoutineFunction> lara_camera_routines[NUM_LARA_STATES + 1];
|
///extern function<LaraRoutineFunction> lara_camera_routines[NUM_LARA_STATES + 1];
|
||||||
|
|
||||||
void lara_as_pbleapoff(ITEM_INFO* item, COLL_INFO* coll);
|
void lara_as_pbleapoff(ITEM_INFO* item, COLL_INFO* coll);
|
||||||
|
|
|
@ -47,7 +47,7 @@ typedef struct SAVEGAME_INFO
|
||||||
|
|
||||||
typedef struct SaveGameHeader
|
typedef struct SaveGameHeader
|
||||||
{
|
{
|
||||||
string LevelName;
|
std::string LevelName;
|
||||||
int Days;
|
int Days;
|
||||||
int Hours;
|
int Hours;
|
||||||
int Minutes;
|
int Minutes;
|
||||||
|
|
|
@ -218,7 +218,7 @@ LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname,
|
||||||
** ===================================================================
|
** ===================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* print a string */
|
/* print a std::string */
|
||||||
#if !defined(lua_writestring)
|
#if !defined(lua_writestring)
|
||||||
#define lua_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
|
#define lua_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -160,7 +160,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** LUA_PATH_SEP is the character that separates templates in a path.
|
** LUA_PATH_SEP is the character that separates templates in a path.
|
||||||
** LUA_PATH_MARK is the string that marks the substitution points in a
|
** LUA_PATH_MARK is the std::string that marks the substitution points in a
|
||||||
** template.
|
** template.
|
||||||
** LUA_EXEC_DIR in a Windows path is replaced by the executable's
|
** LUA_EXEC_DIR in a Windows path is replaced by the executable's
|
||||||
** directory.
|
** directory.
|
||||||
|
@ -427,7 +427,7 @@
|
||||||
@@ lua_number2str converts a float to a string.
|
@@ lua_number2str converts a float to a string.
|
||||||
@@ l_mathop allows the addition of an 'l' or 'f' to all math operations.
|
@@ l_mathop allows the addition of an 'l' or 'f' to all math operations.
|
||||||
@@ l_floor takes the floor of a float.
|
@@ l_floor takes the floor of a float.
|
||||||
@@ lua_str2number converts a decimal numeric string to a number.
|
@@ lua_str2number converts a decimal numeric std::string to a number.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ lua_strx2number converts an hexadecimal numeric string to a number.
|
@@ lua_strx2number converts an hexadecimal numeric std::string to a number.
|
||||||
** In C99, 'strtod' does that conversion. Otherwise, you can
|
** In C99, 'strtod' does that conversion. Otherwise, you can
|
||||||
** leave 'lua_strx2number' undefined and Lua will provide its own
|
** leave 'lua_strx2number' undefined and Lua will provide its own
|
||||||
** implementation.
|
** implementation.
|
||||||
|
|
|
@ -168,7 +168,7 @@ extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
||||||
char *szComment,
|
char *szComment,
|
||||||
uLong uSizeBuf));
|
uLong uSizeBuf));
|
||||||
/*
|
/*
|
||||||
Get the global comment string of the ZipFile, in the szComment buffer.
|
Get the global comment std::string of the ZipFile, in the szComment buffer.
|
||||||
uSizeBuf is the size of the szComment buffer.
|
uSizeBuf is the size of the szComment buffer.
|
||||||
return the number of byte copied or an error code <0
|
return the number of byte copied or an error code <0
|
||||||
*/
|
*/
|
||||||
|
@ -215,12 +215,12 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
|
||||||
Get Info about the current file
|
Get Info about the current file
|
||||||
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
|
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
|
||||||
the current file
|
the current file
|
||||||
if szFileName!=NULL, the filemane string will be copied in szFileName
|
if szFileName!=NULL, the filemane std::string will be copied in szFileName
|
||||||
(fileNameBufferSize is the size of the buffer)
|
(fileNameBufferSize is the size of the buffer)
|
||||||
if extraField!=NULL, the extra field information will be copied in extraField
|
if extraField!=NULL, the extra field information will be copied in extraField
|
||||||
(extraFieldBufferSize is the size of the buffer).
|
(extraFieldBufferSize is the size of the buffer).
|
||||||
This is the Central-header version of the extra field
|
This is the Central-header version of the extra field
|
||||||
if szComment!=NULL, the comment string of the file will be copied in szComment
|
if szComment!=NULL, the comment std::string of the file will be copied in szComment
|
||||||
(commentBufferSize is the size of the buffer)
|
(commentBufferSize is the size of the buffer)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
|
||||||
deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
|
deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
|
||||||
stream state was inconsistent, Z_DATA_ERROR if the stream was freed
|
stream state was inconsistent, Z_DATA_ERROR if the stream was freed
|
||||||
prematurely (some input or output was discarded). In the error case,
|
prematurely (some input or output was discarded). In the error case,
|
||||||
msg may be set but then points to a static string (which must not be
|
msg may be set but then points to a static std::string (which must not be
|
||||||
deallocated).
|
deallocated).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
||||||
|
|
||||||
inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
|
inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
|
||||||
was inconsistent. In the error case, msg may be set but then points to a
|
was inconsistent. In the error case, msg may be set but then points to a
|
||||||
static string (which must not be deallocated).
|
static std::string (which must not be deallocated).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Advanced functions */
|
/* Advanced functions */
|
||||||
|
@ -427,10 +427,10 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
||||||
The strategy parameter is used to tune the compression algorithm. Use the
|
The strategy parameter is used to tune the compression algorithm. Use the
|
||||||
value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
|
value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
|
||||||
filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
|
filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
|
||||||
string match). Filtered data consists mostly of small values with a
|
std::string match). Filtered data consists mostly of small values with a
|
||||||
somewhat random distribution. In this case, the compression algorithm is
|
somewhat random distribution. In this case, the compression algorithm is
|
||||||
tuned to compress them better. The effect of Z_FILTERED is to force more
|
tuned to compress them better. The effect of Z_FILTERED is to force more
|
||||||
Huffman coding and less string matching; it is somewhat intermediate
|
Huffman coding and less std::string matching; it is somewhat intermediate
|
||||||
between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
|
between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
|
||||||
the compression ratio but not the correctness of the compressed output even
|
the compression ratio but not the correctness of the compressed output even
|
||||||
if it is not set appropriately.
|
if it is not set appropriately.
|
||||||
|
@ -718,7 +718,7 @@ ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
|
||||||
|
|
||||||
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
||||||
/*
|
/*
|
||||||
Writes the given null-terminated string to the compressed file, excluding
|
Writes the given null-terminated std::string to the compressed file, excluding
|
||||||
the terminating null character.
|
the terminating null character.
|
||||||
gzputs returns the number of characters written, or -1 in case of error.
|
gzputs returns the number of characters written, or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
|
@ -727,7 +727,7 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
|
||||||
/*
|
/*
|
||||||
Reads bytes from the compressed file until len-1 characters are read, or
|
Reads bytes from the compressed file until len-1 characters are read, or
|
||||||
a newline character is read and transferred to buf, or an end-of-file
|
a newline character is read and transferred to buf, or an end-of-file
|
||||||
condition is encountered. The string is then terminated with a null
|
condition is encountered. The std::string is then terminated with a null
|
||||||
character.
|
character.
|
||||||
gzgets returns buf, or Z_NULL in case of error.
|
gzgets returns buf, or Z_NULL in case of error.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "Lara.h"
|
#include "Lara.h"
|
||||||
#include "switch.h"
|
#include "switch.h"
|
||||||
#include "tomb4fx.h"
|
#include "tomb4fx.h"
|
||||||
|
using std::vector;
|
||||||
BaboonRespawnClass BaboonRespawn;
|
BaboonRespawnClass BaboonRespawn;
|
||||||
static BITE_INFO baboonBite = { 10, 10, 11, 4 };
|
static BITE_INFO baboonBite = { 10, 10, 11, 4 };
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ struct BaboonRespawnStruct
|
||||||
class BaboonRespawnClass
|
class BaboonRespawnClass
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
vector<BaboonRespawnStruct> baboonRespawnArray;
|
std::vector<BaboonRespawnStruct> baboonRespawnArray;
|
||||||
public:
|
public:
|
||||||
void Free(void);
|
void Free(void);
|
||||||
void Add(ITEM_INFO* item, int max_count);
|
void Add(ITEM_INFO* item, int max_count);
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "ShadowLightBuffer.h"
|
#include "ShadowLightBuffer.h"
|
||||||
#include "RoomBuffer.h"
|
#include "RoomBuffer.h"
|
||||||
#include "ItemBuffer.h"
|
#include "ItemBuffer.h"
|
||||||
#include "CameraMatrixBuffer.h"
|
|
||||||
#include "Frustum.h"
|
#include "Frustum.h"
|
||||||
|
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
|
@ -16,6 +15,7 @@
|
||||||
#include <IndexBuffer.h>
|
#include <IndexBuffer.h>
|
||||||
#include "VertexBuffer.h"
|
#include "VertexBuffer.h"
|
||||||
#include "RenderTarget2D.h"
|
#include "RenderTarget2D.h"
|
||||||
|
#include <Renderer\CameraMatrixBuffer.h>
|
||||||
|
|
||||||
class RenderTarget2D;
|
class RenderTarget2D;
|
||||||
|
|
||||||
|
@ -42,17 +42,17 @@ struct RendererDisplayMode
|
||||||
};
|
};
|
||||||
struct RendererVideoAdapter
|
struct RendererVideoAdapter
|
||||||
{
|
{
|
||||||
string Name;
|
std::string Name;
|
||||||
int Index;
|
int Index;
|
||||||
vector<RendererDisplayMode> DisplayModes;
|
std::vector<RendererDisplayMode> DisplayModes;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererVertex
|
struct RendererVertex
|
||||||
{
|
{
|
||||||
Vector3 Position;
|
DirectX::SimpleMath::Vector3 Position;
|
||||||
Vector3 Normal;
|
DirectX::SimpleMath::Vector3 Normal;
|
||||||
Vector2 UV;
|
DirectX::SimpleMath::Vector2 UV;
|
||||||
Vector4 Color;
|
DirectX::SimpleMath::Vector4 Color;
|
||||||
float Bone;
|
float Bone;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ struct RendererHUDBar
|
||||||
| | |
|
| | |
|
||||||
6-----------7-----------8
|
6-----------7-----------8
|
||||||
*/
|
*/
|
||||||
RendererHUDBar(ID3D11Device* m_device, int x, int y, int w, int h, int borderSize, array<Vector4, 9> colors);
|
RendererHUDBar(ID3D11Device* m_device, int x, int y, int w, int h, int borderSize, std::array<DirectX::SimpleMath::Vector4, 9> colors);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererStringToDraw
|
struct RendererStringToDraw
|
||||||
|
@ -159,8 +159,8 @@ struct RendererStringToDraw
|
||||||
float X;
|
float X;
|
||||||
float Y;
|
float Y;
|
||||||
int Flags;
|
int Flags;
|
||||||
wstring String;
|
std::wstring String;
|
||||||
Vector3 Color;
|
DirectX::SimpleMath::Vector3 Color;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererPolygon
|
struct RendererPolygon
|
||||||
|
@ -174,32 +174,32 @@ struct RendererPolygon
|
||||||
|
|
||||||
struct RendererBone
|
struct RendererBone
|
||||||
{
|
{
|
||||||
Vector3 Translation;
|
DirectX::SimpleMath::Vector3 Translation;
|
||||||
Matrix GlobalTransform;
|
DirectX::SimpleMath::Matrix GlobalTransform;
|
||||||
Matrix Transform;
|
DirectX::SimpleMath::Matrix Transform;
|
||||||
Vector3 GlobalTranslation;
|
DirectX::SimpleMath::Vector3 GlobalTranslation;
|
||||||
vector<RendererBone*> Children;
|
std::vector<RendererBone*> Children;
|
||||||
RendererBone* Parent;
|
RendererBone* Parent;
|
||||||
int Index;
|
int Index;
|
||||||
Vector3 ExtraRotation;
|
DirectX::SimpleMath::Vector3 ExtraRotation;
|
||||||
byte ExtraRotationFlags;
|
byte ExtraRotationFlags;
|
||||||
|
|
||||||
RendererBone(int index)
|
RendererBone(int index)
|
||||||
{
|
{
|
||||||
Index = index;
|
Index = index;
|
||||||
ExtraRotationFlags = 0;
|
ExtraRotationFlags = 0;
|
||||||
Translation = Vector3(0, 0, 0);
|
Translation = DirectX::SimpleMath::Vector3(0, 0, 0);
|
||||||
ExtraRotation = Vector3(0, 0, 0);
|
ExtraRotation = DirectX::SimpleMath::Vector3(0, 0, 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererLight
|
struct RendererLight
|
||||||
{
|
{
|
||||||
Vector3 Position;
|
DirectX::SimpleMath::Vector3 Position;
|
||||||
float Type;
|
float Type;
|
||||||
Vector3 Color;
|
DirectX::SimpleMath::Vector3 Color;
|
||||||
bool Dynamic;
|
bool Dynamic;
|
||||||
Vector4 Direction;
|
DirectX::SimpleMath::Vector4 Direction;
|
||||||
float Intensity;
|
float Intensity;
|
||||||
float In;
|
float In;
|
||||||
float Out;
|
float Out;
|
||||||
|
@ -213,21 +213,21 @@ struct RendererLight
|
||||||
struct RendererAnimatedTexture
|
struct RendererAnimatedTexture
|
||||||
{
|
{
|
||||||
int Id;
|
int Id;
|
||||||
Vector2 UV[4];
|
DirectX::SimpleMath::Vector2 UV[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererAnimatedTextureSet
|
struct RendererAnimatedTextureSet
|
||||||
{
|
{
|
||||||
int NumTextures;
|
int NumTextures;
|
||||||
vector<RendererAnimatedTexture> Textures;
|
std::vector<RendererAnimatedTexture> Textures;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererBucket
|
struct RendererBucket
|
||||||
{
|
{
|
||||||
vector<RendererVertex> Vertices;
|
std::vector<RendererVertex> Vertices;
|
||||||
vector<int> Indices;
|
std::vector<int> Indices;
|
||||||
vector<RendererPolygon> Polygons;
|
std::vector<RendererPolygon> Polygons;
|
||||||
vector<RendererPolygon> AnimatedPolygons;
|
std::vector<RendererPolygon> AnimatedPolygons;
|
||||||
int StartVertex;
|
int StartVertex;
|
||||||
int StartIndex;
|
int StartIndex;
|
||||||
int NumTriangles;
|
int NumTriangles;
|
||||||
|
@ -240,41 +240,41 @@ struct RendererStatic
|
||||||
int Id;
|
int Id;
|
||||||
short RoomIndex;
|
short RoomIndex;
|
||||||
MESH_INFO* Mesh;
|
MESH_INFO* Mesh;
|
||||||
Matrix World;
|
DirectX::SimpleMath::Matrix World;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererRoom
|
struct RendererRoom
|
||||||
{
|
{
|
||||||
ROOM_INFO* Room;
|
ROOM_INFO* Room;
|
||||||
Vector4 AmbientLight;
|
DirectX::SimpleMath::Vector4 AmbientLight;
|
||||||
RendererBucket Buckets[NUM_BUCKETS];
|
RendererBucket Buckets[NUM_BUCKETS];
|
||||||
RendererBucket AnimatedBuckets[NUM_BUCKETS];
|
RendererBucket AnimatedBuckets[NUM_BUCKETS];
|
||||||
vector<RendererLight> Lights;
|
std::vector<RendererLight> Lights;
|
||||||
vector<RendererStatic> Statics;
|
std::vector<RendererStatic> Statics;
|
||||||
bool Visited;
|
bool Visited;
|
||||||
float Distance;
|
float Distance;
|
||||||
int RoomNumber;
|
int RoomNumber;
|
||||||
vector<RendererLight*> LightsToDraw;
|
std::vector<RendererLight*> LightsToDraw;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererRoomNode
|
struct RendererRoomNode
|
||||||
{
|
{
|
||||||
short From;
|
short From;
|
||||||
short To;
|
short To;
|
||||||
Vector4 ClipPort;
|
DirectX::SimpleMath::Vector4 ClipPort;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererItem
|
struct RendererItem
|
||||||
{
|
{
|
||||||
int Id;
|
int Id;
|
||||||
ITEM_INFO* Item;
|
ITEM_INFO* Item;
|
||||||
Matrix World;
|
DirectX::SimpleMath::Matrix World;
|
||||||
Matrix Translation;
|
DirectX::SimpleMath::Matrix Translation;
|
||||||
Matrix Rotation;
|
DirectX::SimpleMath::Matrix Rotation;
|
||||||
Matrix Scale;
|
DirectX::SimpleMath::Matrix Scale;
|
||||||
Matrix AnimationTransforms[32];
|
DirectX::SimpleMath::Matrix AnimationTransforms[32];
|
||||||
int NumMeshes;
|
int NumMeshes;
|
||||||
vector<RendererLight*> Lights;
|
std::vector<RendererLight*> Lights;
|
||||||
bool DoneAnimations;
|
bool DoneAnimations;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -283,26 +283,26 @@ struct RendererMesh
|
||||||
BoundingSphere Sphere;
|
BoundingSphere Sphere;
|
||||||
RendererBucket Buckets[NUM_BUCKETS];
|
RendererBucket Buckets[NUM_BUCKETS];
|
||||||
RendererBucket AnimatedBuckets[NUM_BUCKETS];
|
RendererBucket AnimatedBuckets[NUM_BUCKETS];
|
||||||
vector<Vector3> Positions;
|
std::vector<DirectX::SimpleMath::Vector3> Positions;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererEffect
|
struct RendererEffect
|
||||||
{
|
{
|
||||||
int Id;
|
int Id;
|
||||||
FX_INFO* Effect;
|
FX_INFO* Effect;
|
||||||
Matrix World;
|
DirectX::SimpleMath::Matrix World;
|
||||||
RendererMesh* Mesh;
|
RendererMesh* Mesh;
|
||||||
vector<RendererLight*> Lights;
|
std::vector<RendererLight*> Lights;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererObject
|
struct RendererObject
|
||||||
{
|
{
|
||||||
int Id;
|
int Id;
|
||||||
vector<RendererMesh*> ObjectMeshes;
|
std::vector<RendererMesh*> ObjectMeshes;
|
||||||
RendererBone* Skeleton;
|
RendererBone* Skeleton;
|
||||||
vector<Matrix> AnimationTransforms;
|
std::vector<DirectX::SimpleMath::Matrix> AnimationTransforms;
|
||||||
vector<Matrix> BindPoseTransforms;
|
std::vector<DirectX::SimpleMath::Matrix> BindPoseTransforms;
|
||||||
vector<RendererBone*> LinearizedBones;
|
std::vector<RendererBone*> LinearizedBones;
|
||||||
bool DoNotDraw;
|
bool DoNotDraw;
|
||||||
bool HasDataInBucket[NUM_BUCKETS];
|
bool HasDataInBucket[NUM_BUCKETS];
|
||||||
bool HasDataInAnimatedBucket[NUM_BUCKETS];
|
bool HasDataInAnimatedBucket[NUM_BUCKETS];
|
||||||
|
@ -320,13 +320,13 @@ struct RendererSprite
|
||||||
{
|
{
|
||||||
int Width;
|
int Width;
|
||||||
int Height;
|
int Height;
|
||||||
Vector2 UV[4];
|
DirectX::SimpleMath::Vector2 UV[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererSpriteSequence
|
struct RendererSpriteSequence
|
||||||
{
|
{
|
||||||
int Id;
|
int Id;
|
||||||
vector<RendererSprite*> SpritesList;
|
std::vector<RendererSprite*> SpritesList;
|
||||||
int NumSprites;
|
int NumSprites;
|
||||||
|
|
||||||
RendererSpriteSequence()
|
RendererSpriteSequence()
|
||||||
|
@ -339,7 +339,7 @@ struct RendererSpriteSequence
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
NumSprites = num;
|
NumSprites = num;
|
||||||
SpritesList = vector<RendererSprite*>(NumSprites);
|
SpritesList = std::vector<RendererSprite*>(NumSprites);
|
||||||
}
|
}
|
||||||
|
|
||||||
RendererSpriteSequence(const RendererSpriteSequence& rhs)
|
RendererSpriteSequence(const RendererSpriteSequence& rhs)
|
||||||
|
@ -355,7 +355,7 @@ struct RendererSpriteSequence
|
||||||
{
|
{
|
||||||
Id = other.Id;
|
Id = other.Id;
|
||||||
NumSprites = other.NumSprites;
|
NumSprites = other.NumSprites;
|
||||||
SpritesList = vector<RendererSprite*>(NumSprites);
|
SpritesList = std::vector<RendererSprite*>(NumSprites);
|
||||||
std::copy(other.SpritesList.begin(), other.SpritesList.end(),back_inserter(SpritesList));
|
std::copy(other.SpritesList.begin(), other.SpritesList.end(),back_inserter(SpritesList));
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -368,24 +368,24 @@ struct RendererSpriteToDraw
|
||||||
RendererSprite* Sprite;
|
RendererSprite* Sprite;
|
||||||
float Distance;
|
float Distance;
|
||||||
float Scale;
|
float Scale;
|
||||||
Vector3 pos;
|
DirectX::SimpleMath::Vector3 pos;
|
||||||
Vector3 vtx1;
|
DirectX::SimpleMath::Vector3 vtx1;
|
||||||
Vector3 vtx2;
|
DirectX::SimpleMath::Vector3 vtx2;
|
||||||
Vector3 vtx3;
|
DirectX::SimpleMath::Vector3 vtx3;
|
||||||
Vector3 vtx4;
|
DirectX::SimpleMath::Vector3 vtx4;
|
||||||
Vector4 color;
|
DirectX::SimpleMath::Vector4 color;
|
||||||
float Rotation;
|
float Rotation;
|
||||||
float Width;
|
float Width;
|
||||||
float Height;
|
float Height;
|
||||||
BLEND_MODES BlendMode;
|
BLEND_MODES BlendMode;
|
||||||
Vector3 ConstrainAxis;
|
DirectX::SimpleMath::Vector3 ConstrainAxis;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererLine3D
|
struct RendererLine3D
|
||||||
{
|
{
|
||||||
Vector3 start;
|
DirectX::SimpleMath::Vector3 start;
|
||||||
Vector3 end;
|
DirectX::SimpleMath::Vector3 end;
|
||||||
Vector4 color;
|
DirectX::SimpleMath::Vector4 color;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RendererWeatherParticle
|
struct RendererWeatherParticle
|
||||||
|
@ -409,8 +409,8 @@ struct RendererUnderwaterDustParticle
|
||||||
|
|
||||||
struct RendererLine2D
|
struct RendererLine2D
|
||||||
{
|
{
|
||||||
Vector2 Vertices[2];
|
DirectX::SimpleMath::Vector2 Vertices[2];
|
||||||
Vector4 Color;
|
DirectX::SimpleMath::Vector4 Color;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Renderer11
|
class Renderer11
|
||||||
|
@ -428,7 +428,7 @@ private:
|
||||||
D3D11_VIEWPORT m_viewport;
|
D3D11_VIEWPORT m_viewport;
|
||||||
D3D11_VIEWPORT m_shadowMapViewport;
|
D3D11_VIEWPORT m_shadowMapViewport;
|
||||||
Viewport* m_viewportToolkit;
|
Viewport* m_viewportToolkit;
|
||||||
vector<RendererVideoAdapter> m_adapters;
|
std::vector<RendererVideoAdapter> m_adapters;
|
||||||
|
|
||||||
// Main back buffer
|
// Main back buffer
|
||||||
ID3D11RenderTargetView* m_backBufferRTV;
|
ID3D11RenderTargetView* m_backBufferRTV;
|
||||||
|
@ -496,7 +496,7 @@ private:
|
||||||
// Text and sprites
|
// Text and sprites
|
||||||
SpriteFont* m_gameFont;
|
SpriteFont* m_gameFont;
|
||||||
SpriteBatch* m_spriteBatch;
|
SpriteBatch* m_spriteBatch;
|
||||||
vector<RendererStringToDraw> m_strings;
|
std::vector<RendererStringToDraw> m_strings;
|
||||||
int m_blinkColorValue;
|
int m_blinkColorValue;
|
||||||
int m_blinkColorDirection;
|
int m_blinkColorDirection;
|
||||||
PrimitiveBatch<RendererVertex>* m_primitiveBatch;
|
PrimitiveBatch<RendererVertex>* m_primitiveBatch;
|
||||||
|
@ -519,22 +519,22 @@ private:
|
||||||
IndexBuffer m_moveablesIndexBuffer;
|
IndexBuffer m_moveablesIndexBuffer;
|
||||||
VertexBuffer m_staticsVertexBuffer;
|
VertexBuffer m_staticsVertexBuffer;
|
||||||
IndexBuffer m_staticsIndexBuffer;
|
IndexBuffer m_staticsIndexBuffer;
|
||||||
vector<RendererRoom> m_rooms;
|
std::vector<RendererRoom> m_rooms;
|
||||||
Matrix m_hairsMatrices[12];
|
DirectX::SimpleMath::Matrix m_hairsMatrices[12];
|
||||||
short m_numHairVertices;
|
short m_numHairVertices;
|
||||||
short m_numHairIndices;
|
short m_numHairIndices;
|
||||||
vector<RendererVertex> m_hairVertices;
|
std::vector<RendererVertex> m_hairVertices;
|
||||||
vector<short> m_hairIndices;
|
std::vector<short> m_hairIndices;
|
||||||
vector<RendererRoom*> m_roomsToDraw;
|
std::vector<RendererRoom*> m_roomsToDraw;
|
||||||
vector<RendererItem*> m_itemsToDraw;
|
std::vector<RendererItem*> m_itemsToDraw;
|
||||||
vector<RendererEffect*> m_effectsToDraw;
|
std::vector<RendererEffect*> m_effectsToDraw;
|
||||||
vector<RendererStatic*> m_staticsToDraw;
|
std::vector<RendererStatic*> m_staticsToDraw;
|
||||||
vector<RendererLight*> m_lightsToDraw;
|
std::vector<RendererLight*> m_lightsToDraw;
|
||||||
vector<RendererLight*> m_dynamicLights;
|
std::vector<RendererLight*> m_dynamicLights;
|
||||||
vector<RendererSpriteToDraw*> m_spritesToDraw;
|
std::vector<RendererSpriteToDraw*> m_spritesToDraw;
|
||||||
vector<RendererLine3D*> m_lines3DToDraw;
|
std::vector<RendererLine3D*> m_lines3DToDraw;
|
||||||
vector<RendererLine2D*> m_lines2DToDraw;
|
std::vector<RendererLine2D*> m_lines2DToDraw;
|
||||||
vector<RendererLight*> m_tempItemLights;
|
std::vector<RendererLight*> m_tempItemLights;
|
||||||
RendererSpriteToDraw* m_spritesBuffer;
|
RendererSpriteToDraw* m_spritesBuffer;
|
||||||
int m_nextSprite;
|
int m_nextSprite;
|
||||||
RendererLine3D* m_lines3DBuffer;
|
RendererLine3D* m_lines3DBuffer;
|
||||||
|
@ -549,15 +549,15 @@ private:
|
||||||
int m_numStatics;
|
int m_numStatics;
|
||||||
int m_numSprites;
|
int m_numSprites;
|
||||||
int m_numSpritesSequences;
|
int m_numSpritesSequences;
|
||||||
vector<RendererSpriteSequence> m_spriteSequences;
|
std::vector<RendererSpriteSequence> m_spriteSequences;
|
||||||
unordered_map<unsigned int, RendererMesh*> m_meshPointersToMesh;
|
std::unordered_map<unsigned int, RendererMesh*> m_meshPointersToMesh;
|
||||||
Matrix m_LaraWorldMatrix;
|
DirectX::SimpleMath::Matrix m_LaraWorldMatrix;
|
||||||
vector<RendererAnimatedTextureSet> m_animatedTextureSets;
|
std::vector<RendererAnimatedTextureSet> m_animatedTextureSets;
|
||||||
int m_numAnimatedTextureSets;
|
int m_numAnimatedTextureSets;
|
||||||
int m_currentCausticsFrame;
|
int m_currentCausticsFrame;
|
||||||
RendererUnderwaterDustParticle m_underwaterDustParticles[NUM_UNDERWATER_DUST_PARTICLES];
|
RendererUnderwaterDustParticle m_underwaterDustParticles[NUM_UNDERWATER_DUST_PARTICLES];
|
||||||
bool m_firstUnderwaterDustParticles = true;
|
bool m_firstUnderwaterDustParticles = true;
|
||||||
vector<RendererMesh*> m_meshes;
|
std::vector<RendererMesh*> m_meshes;
|
||||||
|
|
||||||
// Debug variables
|
// Debug variables
|
||||||
int m_numDrawCalls = 0;
|
int m_numDrawCalls = 0;
|
||||||
|
@ -597,13 +597,13 @@ private:
|
||||||
int getAnimatedTextureInfo(short textureId);
|
int getAnimatedTextureInfo(short textureId);
|
||||||
void initialiseHairRemaps();
|
void initialiseHairRemaps();
|
||||||
RendererMesh* getRendererMeshFromTrMesh(RendererObject* obj, short* meshPtr, short boneIndex, int isJoints, int isHairs);
|
RendererMesh* getRendererMeshFromTrMesh(RendererObject* obj, short* meshPtr, short boneIndex, int isJoints, int isHairs);
|
||||||
void fromTrAngle(Matrix* matrix, short* frameptr, int index);
|
void fromTrAngle(DirectX::SimpleMath::Matrix* matrix, short* frameptr, int index);
|
||||||
void buildHierarchy(RendererObject* obj);
|
void buildHierarchy(RendererObject* obj);
|
||||||
void buildHierarchyRecursive(RendererObject* obj, RendererBone* node, RendererBone* parentNode);
|
void buildHierarchyRecursive(RendererObject* obj, RendererBone* node, RendererBone* parentNode);
|
||||||
void updateAnimation(RendererItem* item, RendererObject* obj, short** frmptr, short frac, short rate, int mask,bool useObjectWorldRotation = false);
|
void updateAnimation(RendererItem* item, RendererObject* obj, short** frmptr, short frac, short rate, int mask,bool useObjectWorldRotation = false);
|
||||||
bool printDebugMessage(int x, int y, int alpha, byte r, byte g, byte b, LPCSTR Message);
|
bool printDebugMessage(int x, int y, int alpha, byte r, byte g, byte b, LPCSTR Message);
|
||||||
bool checkPortal(short roomIndex, short* portal, Vector4* viewPort, Vector4* clipPort);
|
bool checkPortal(short roomIndex, short* portal, DirectX::SimpleMath::Vector4* viewPort, DirectX::SimpleMath::Vector4* clipPort);
|
||||||
void getVisibleRooms(int from, int to, Vector4* viewPort, bool water, int count);
|
void getVisibleRooms(int from, int to, DirectX::SimpleMath::Vector4* viewPort, bool water, int count);
|
||||||
void collectRooms();
|
void collectRooms();
|
||||||
void collectItems(short roomNumber);
|
void collectItems(short roomNumber);
|
||||||
void collectStatics(short roomNumber);
|
void collectStatics(short roomNumber);
|
||||||
|
@ -618,7 +618,7 @@ private:
|
||||||
void updateEffects();
|
void updateEffects();
|
||||||
int getFrame(short animation, short frame, short** framePtr, int* rate);
|
int getFrame(short animation, short frame, short** framePtr, int* rate);
|
||||||
bool drawAmbientCubeMap(short roomNumber);
|
bool drawAmbientCubeMap(short roomNumber);
|
||||||
bool sphereBoxIntersection(Vector3 boxMin, Vector3 boxMax, Vector3 sphereCentre, float sphereRadius);
|
bool sphereBoxIntersection(DirectX::SimpleMath::Vector3 boxMin, DirectX::SimpleMath::Vector3 boxMax, DirectX::SimpleMath::Vector3 sphereCentre, float sphereRadius);
|
||||||
bool drawHorizonAndSky();
|
bool drawHorizonAndSky();
|
||||||
bool drawRooms(bool transparent, bool animated);
|
bool drawRooms(bool transparent, bool animated);
|
||||||
bool drawStatics(bool transparent);
|
bool drawStatics(bool transparent);
|
||||||
|
@ -655,17 +655,17 @@ private:
|
||||||
int drawInventoryScene();
|
int drawInventoryScene();
|
||||||
int drawFinalPass();
|
int drawFinalPass();
|
||||||
void updateAnimatedTextures();
|
void updateAnimatedTextures();
|
||||||
void createBillboardMatrix(Matrix* out, Vector3* particlePos, Vector3* cameraPos, float rotation);
|
void createBillboardMatrix(DirectX::SimpleMath::Matrix* out, DirectX::SimpleMath::Vector3* particlePos, DirectX::SimpleMath::Vector3* cameraPos, float rotation);
|
||||||
void drawShockwaves();
|
void drawShockwaves();
|
||||||
void drawRipples();
|
void drawRipples();
|
||||||
void drawUnderwaterDust();
|
void drawUnderwaterDust();
|
||||||
bool doRain();
|
bool doRain();
|
||||||
bool doSnow();
|
bool doSnow();
|
||||||
bool drawFullScreenQuad(ID3D11ShaderResourceView* texture, Vector3 color, bool cinematicBars);
|
bool drawFullScreenQuad(ID3D11ShaderResourceView* texture, DirectX::SimpleMath::Vector3 color, bool cinematicBars);
|
||||||
bool drawFullScreenImage(ID3D11ShaderResourceView* texture, float fade);
|
bool drawFullScreenImage(ID3D11ShaderResourceView* texture, float fade);
|
||||||
bool isRoomUnderwater(short roomNumber);
|
bool isRoomUnderwater(short roomNumber);
|
||||||
bool isInRoom(int x, int y, int z, short roomNumber);
|
bool isInRoom(int x, int y, int z, short roomNumber);
|
||||||
bool drawColoredQuad(int x, int y, int w, int h, Vector4 color);
|
bool drawColoredQuad(int x, int y, int w, int h, DirectX::SimpleMath::Vector4 color);
|
||||||
bool initialiseScreen(int w, int h, int refreshRate, bool windowed, HWND handle, bool reset);
|
bool initialiseScreen(int w, int h, int refreshRate, bool windowed, HWND handle, bool reset);
|
||||||
bool initialiseBars();
|
bool initialiseBars();
|
||||||
bool drawSmokeParticles();
|
bool drawSmokeParticles();
|
||||||
|
@ -673,9 +673,9 @@ private:
|
||||||
bool drawDripParticles();
|
bool drawDripParticles();
|
||||||
bool drawExplosionParticles();
|
bool drawExplosionParticles();
|
||||||
public:
|
public:
|
||||||
Matrix View;
|
DirectX::SimpleMath::Matrix View;
|
||||||
Matrix Projection;
|
DirectX::SimpleMath::Matrix Projection;
|
||||||
Matrix ViewProjection;
|
DirectX::SimpleMath::Matrix ViewProjection;
|
||||||
float FieldOfView;
|
float FieldOfView;
|
||||||
int ScreenWidth;
|
int ScreenWidth;
|
||||||
int ScreenHeight;
|
int ScreenHeight;
|
||||||
|
@ -705,26 +705,26 @@ public:
|
||||||
void DrawLoadingScreen(char* fileName);
|
void DrawLoadingScreen(char* fileName);
|
||||||
void UpdateProgress(float value);
|
void UpdateProgress(float value);
|
||||||
bool IsFading();
|
bool IsFading();
|
||||||
void GetLaraBonePosition(Vector3* pos, int bone);
|
void GetLaraBonePosition(DirectX::SimpleMath::Vector3* pos, int bone);
|
||||||
bool ToggleFullScreen();
|
bool ToggleFullScreen();
|
||||||
bool IsFullsScreen();
|
bool IsFullsScreen();
|
||||||
vector<RendererVideoAdapter>* GetAdapters();
|
std::vector<RendererVideoAdapter>* GetAdapters();
|
||||||
bool DoTitleImage();
|
bool DoTitleImage();
|
||||||
void AddLine2D(int x1, int y1, int x2, int y2, byte r, byte g, byte b, byte a);
|
void AddLine2D(int x1, int y1, int x2, int y2, byte r, byte g, byte b, byte a);
|
||||||
void AddSpriteBillboard(RendererSprite* sprite, Vector3 pos,Vector4 color, float rotation, float scale, float width, float height, BLEND_MODES blendMode);
|
void AddSpriteBillboard(RendererSprite* sprite, DirectX::SimpleMath::Vector3 pos,DirectX::SimpleMath::Vector4 color, float rotation, float scale, float width, float height, BLEND_MODES blendMode);
|
||||||
void AddSpriteBillboardConstrained(RendererSprite* sprite, Vector3 pos, Vector4 color, float rotation, float scale, float width, float height, BLEND_MODES blendMode, Vector3 constrainAxis);
|
void AddSpriteBillboardConstrained(RendererSprite* sprite, DirectX::SimpleMath::Vector3 pos, DirectX::SimpleMath::Vector4 color, float rotation, float scale, float width, float height, BLEND_MODES blendMode, DirectX::SimpleMath::Vector3 constrainAxis);
|
||||||
void AddSprite3D(RendererSprite* sprite, Vector3 vtx1, Vector3 vtx2, Vector3 vtx3, Vector3 vtx4, Vector4 color, float rotation, float scale, float width, float height, BLEND_MODES blendMode);
|
void AddSprite3D(RendererSprite* sprite, DirectX::SimpleMath::Vector3 vtx1, DirectX::SimpleMath::Vector3 vtx2, DirectX::SimpleMath::Vector3 vtx3, DirectX::SimpleMath::Vector3 vtx4, DirectX::SimpleMath::Vector4 color, float rotation, float scale, float width, float height, BLEND_MODES blendMode);
|
||||||
void AddLine3D(Vector3 start, Vector3 end, Vector4 color);
|
void AddLine3D(DirectX::SimpleMath::Vector3 start, DirectX::SimpleMath::Vector3 end, DirectX::SimpleMath::Vector4 color);
|
||||||
bool ChangeScreenResolution(int width, int height, int frequency, bool windowed);
|
bool ChangeScreenResolution(int width, int height, int frequency, bool windowed);
|
||||||
bool DrawBar(float percent, const RendererHUDBar* const bar);
|
bool DrawBar(float percent, const RendererHUDBar* const bar);
|
||||||
void FlipRooms(short roomNumber1, short roomNumber2);
|
void FlipRooms(short roomNumber1, short roomNumber2);
|
||||||
void ResetAnimations();
|
void ResetAnimations();
|
||||||
void UpdateLaraAnimations(bool force);
|
void UpdateLaraAnimations(bool force);
|
||||||
void UpdateItemAnimations(int itemNumber, bool force);
|
void UpdateItemAnimations(int itemNumber, bool force);
|
||||||
void GetLaraAbsBonePosition(Vector3* pos, int joint);
|
void GetLaraAbsBonePosition(DirectX::SimpleMath::Vector3* pos, int joint);
|
||||||
void GetItemAbsBonePosition(int itemNumber, Vector3* pos, int joint);
|
void GetItemAbsBonePosition(int itemNumber, DirectX::SimpleMath::Vector3* pos, int joint);
|
||||||
int GetSpheres(short itemNumber, BoundingSphere* ptr, char worldSpace, Matrix local);
|
int GetSpheres(short itemNumber, BoundingSphere* ptr, char worldSpace, DirectX::SimpleMath::Matrix local);
|
||||||
void GetBoneMatrix(short itemNumber, int joint, Matrix* outMatrix);
|
void GetBoneMatrix(short itemNumber, int joint, DirectX::SimpleMath::Matrix* outMatrix);
|
||||||
|
|
||||||
RendererMesh* getMeshFromMeshPtr(unsigned int meshp);
|
RendererMesh* getMeshFromMeshPtr(unsigned int meshp);
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -11,7 +11,7 @@ RendererHUDBar* g_SFXVolumeBar;
|
||||||
|
|
||||||
bool Renderer11::initialiseBars()
|
bool Renderer11::initialiseBars()
|
||||||
{
|
{
|
||||||
array<Vector4, 9> healthColors = {
|
std::array<Vector4, 9> healthColors = {
|
||||||
//top
|
//top
|
||||||
Vector4(82 / 255.0f,0,0,1),
|
Vector4(82 / 255.0f,0,0,1),
|
||||||
Vector4(36 / 255.0f,46 / 255.0f,0,1),
|
Vector4(36 / 255.0f,46 / 255.0f,0,1),
|
||||||
|
@ -26,7 +26,7 @@ bool Renderer11::initialiseBars()
|
||||||
Vector4(0,82 / 255.0f,0,1),
|
Vector4(0,82 / 255.0f,0,1),
|
||||||
};
|
};
|
||||||
|
|
||||||
array<Vector4, 9> airColors = {
|
std::array<Vector4, 9> airColors = {
|
||||||
//top
|
//top
|
||||||
Vector4(0 ,0,90 / 255.0f,1),
|
Vector4(0 ,0,90 / 255.0f,1),
|
||||||
Vector4(0 / 255.0f,28 / 255.0f,84 / 255.0f,1),
|
Vector4(0 / 255.0f,28 / 255.0f,84 / 255.0f,1),
|
||||||
|
@ -41,7 +41,7 @@ bool Renderer11::initialiseBars()
|
||||||
Vector4(0 ,47 / 255.0f,96 / 255.0f,1),
|
Vector4(0 ,47 / 255.0f,96 / 255.0f,1),
|
||||||
};
|
};
|
||||||
|
|
||||||
array<Vector4, 9> dashColors = {
|
std::array<Vector4, 9> dashColors = {
|
||||||
//top
|
//top
|
||||||
Vector4(78 / 255.0f,4 / 255.0f,0,1),
|
Vector4(78 / 255.0f,4 / 255.0f,0,1),
|
||||||
Vector4(161 / 255.0f,25 / 255.0f,84 / 255.0f,1),
|
Vector4(161 / 255.0f,25 / 255.0f,84 / 255.0f,1),
|
||||||
|
@ -55,7 +55,7 @@ bool Renderer11::initialiseBars()
|
||||||
Vector4(161 / 255.0f,25 / 255.0f,84 / 255.0f,1),
|
Vector4(161 / 255.0f,25 / 255.0f,84 / 255.0f,1),
|
||||||
Vector4(136 / 255.0f,117 / 255.0f,5 / 255.0f,1),
|
Vector4(136 / 255.0f,117 / 255.0f,5 / 255.0f,1),
|
||||||
};
|
};
|
||||||
array<Vector4, 9> soundSettingColors = {
|
std::array<Vector4, 9> soundSettingColors = {
|
||||||
//top
|
//top
|
||||||
Vector4(0.18f,0.3f,0.72f,1),
|
Vector4(0.18f,0.3f,0.72f,1),
|
||||||
Vector4(0.18f,0.3f,0.72f,1),
|
Vector4(0.18f,0.3f,0.72f,1),
|
||||||
|
|
|
@ -35,7 +35,7 @@ struct GameScriptSettings
|
||||||
bool EnableDynamicShadows;
|
bool EnableDynamicShadows;
|
||||||
bool EnableWaterCaustics;
|
bool EnableWaterCaustics;
|
||||||
bool Windowed;
|
bool Windowed;
|
||||||
string WindowTitle;
|
std::string WindowTitle;
|
||||||
int DrawingDistance;
|
int DrawingDistance;
|
||||||
bool ShowRendererSteps;
|
bool ShowRendererSteps;
|
||||||
bool ShowDebugInfo;
|
bool ShowDebugInfo;
|
||||||
|
@ -111,10 +111,10 @@ struct GameScriptMirror
|
||||||
struct GameScriptLevel
|
struct GameScriptLevel
|
||||||
{
|
{
|
||||||
int NameStringIndex;
|
int NameStringIndex;
|
||||||
string FileName;
|
std::string FileName;
|
||||||
string ScriptFileName;
|
std::string ScriptFileName;
|
||||||
string LoadScreenFileName;
|
std::string LoadScreenFileName;
|
||||||
string Background;
|
std::string Background;
|
||||||
int Name;
|
int Name;
|
||||||
int Soundtrack;
|
int Soundtrack;
|
||||||
GameScriptSkyLayer Layer1;
|
GameScriptSkyLayer Layer1;
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#define LUA_VARIABLE_TYPE_STRING 3
|
#define LUA_VARIABLE_TYPE_STRING 3
|
||||||
|
|
||||||
typedef struct LuaFunction {
|
typedef struct LuaFunction {
|
||||||
string Name;
|
std::string Name;
|
||||||
string Code;
|
std::string Code;
|
||||||
bool Executed;
|
bool Executed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,18 +106,18 @@ class LuaVariables
|
||||||
public:
|
public:
|
||||||
map<string, sol::object> variables;
|
map<string, sol::object> variables;
|
||||||
|
|
||||||
sol::object GetVariable(string key);
|
sol::object GetVariable(std::string key);
|
||||||
void SetVariable(string key, sol::object value);
|
void SetVariable(std::string key, sol::object value);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct LuaVariable
|
typedef struct LuaVariable
|
||||||
{
|
{
|
||||||
bool IsGlobal;
|
bool IsGlobal;
|
||||||
string Name;
|
std::string Name;
|
||||||
int Type;
|
int Type;
|
||||||
float FloatValue;
|
float FloatValue;
|
||||||
int IntValue;
|
int IntValue;
|
||||||
string StringValue;
|
std::string StringValue;
|
||||||
bool BoolValue;
|
bool BoolValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ public:
|
||||||
void FreeLevelScripts();
|
void FreeLevelScripts();
|
||||||
void AddTrigger(LuaFunction* function);
|
void AddTrigger(LuaFunction* function);
|
||||||
void AddLuaId(int luaId, short itemNumber);
|
void AddLuaId(int luaId, short itemNumber);
|
||||||
void AddLuaName(string luaName, short itemNumber);
|
void AddLuaName(std::string luaName, short itemNumber);
|
||||||
void AssignItemsAndLara();
|
void AssignItemsAndLara();
|
||||||
void ResetVariables();
|
void ResetVariables();
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ public:
|
||||||
void AddOneSecret();
|
void AddOneSecret();
|
||||||
void MakeItemInvisible(short id);
|
void MakeItemInvisible(short id);
|
||||||
unique_ptr<GameScriptItem> GetItemById(int id);
|
unique_ptr<GameScriptItem> GetItemById(int id);
|
||||||
unique_ptr<GameScriptItem> GetItemByName(string name);
|
unique_ptr<GameScriptItem> GetItemByName(std::string name);
|
||||||
void PlaySoundEffectAtPosition(short id, int x, int y, int z, int flags);
|
void PlaySoundEffectAtPosition(short id, int x, int y, int z, int flags);
|
||||||
void PlaySoundEffect(short id, int flags);
|
void PlaySoundEffect(short id, int flags);
|
||||||
GameScriptPosition CreatePosition(float x, float y, float z);
|
GameScriptPosition CreatePosition(float x, float y, float z);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "framework.h"
|
#include "framework.h"
|
||||||
#include "LanguageScript.h"
|
#include "LanguageScript.h"
|
||||||
|
using std::string;
|
||||||
LanguageScript::LanguageScript(char* name)
|
LanguageScript::LanguageScript(char* name)
|
||||||
{
|
{
|
||||||
Name = string(name);
|
Name = string(name);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Define string ids
|
// Define std::string ids
|
||||||
#define STRING_PASSPORT 1
|
#define STRING_PASSPORT 1
|
||||||
#define STRING_LARA_HOME 2
|
#define STRING_LARA_HOME 2
|
||||||
#define STRING_CONTROLS 3
|
#define STRING_CONTROLS 3
|
||||||
|
@ -104,8 +104,8 @@
|
||||||
class LanguageScript
|
class LanguageScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
string Name;
|
std::string Name;
|
||||||
vector<string> Strings;
|
std::vector<std::string> Strings;
|
||||||
|
|
||||||
LanguageScript(char* name);
|
LanguageScript(char* name);
|
||||||
~LanguageScript();
|
~LanguageScript();
|
||||||
|
|
|
@ -102,8 +102,8 @@ extern int NumMeshPointers;
|
||||||
extern int* MeshTrees;
|
extern int* MeshTrees;
|
||||||
extern int NumObjects;
|
extern int NumObjects;
|
||||||
extern int NumStaticObjects;
|
extern int NumStaticObjects;
|
||||||
extern vector<int> MoveablesIds;
|
extern std::vector<int> MoveablesIds;
|
||||||
extern vector<int> StaticObjectsIds;
|
extern std::vector<int> StaticObjectsIds;
|
||||||
extern int* RawMeshPointers;
|
extern int* RawMeshPointers;
|
||||||
extern short* RawMeshData;
|
extern short* RawMeshData;
|
||||||
extern int NumObjectTextures;
|
extern int NumObjectTextures;
|
||||||
|
|
|
@ -59,7 +59,7 @@ private:
|
||||||
ChunkId* m_chunkFloorData = ChunkId::FromString("T5MFloorData");
|
ChunkId* m_chunkFloorData = ChunkId::FromString("T5MFloorData");
|
||||||
|
|
||||||
int m_magicNumber = 0x4D355254;
|
int m_magicNumber = 0x4D355254;
|
||||||
string m_filename;
|
std::string m_filename;
|
||||||
ChunkReader* m_reader;
|
ChunkReader* m_reader;
|
||||||
FileStream* m_stream;
|
FileStream* m_stream;
|
||||||
int m_numSamples = 0;
|
int m_numSamples = 0;
|
||||||
|
@ -94,7 +94,7 @@ private:
|
||||||
bool readSample();
|
bool readSample();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LevelLoader(string filename);
|
LevelLoader(std::string filename);
|
||||||
~LevelLoader();
|
~LevelLoader();
|
||||||
bool Load();
|
bool Load();
|
||||||
bool FillLegacyData();
|
bool FillLegacyData();
|
||||||
|
|
|
@ -13,7 +13,7 @@ struct TrTexturePage
|
||||||
|
|
||||||
struct TrPolygon
|
struct TrPolygon
|
||||||
{
|
{
|
||||||
vector<int> indices;
|
std::vector<int> indices;
|
||||||
int animatedSequence;
|
int animatedSequence;
|
||||||
int frame;
|
int frame;
|
||||||
};
|
};
|
||||||
|
@ -28,13 +28,13 @@ struct TrMaterial
|
||||||
struct TrBucket
|
struct TrBucket
|
||||||
{
|
{
|
||||||
TrMaterial material;
|
TrMaterial material;
|
||||||
vector<Vector3> positions;
|
std::vector<Vector3> positions;
|
||||||
vector<Vector3> colors;
|
std::vector<Vector3> colors;
|
||||||
vector<Vector2> textureCoords;
|
std::vector<Vector2> textureCoords;
|
||||||
vector<Vector3> normals;
|
std::vector<Vector3> normals;
|
||||||
vector<int> verticesEffects;
|
std::vector<int> verticesEffects;
|
||||||
vector<int> bones;
|
std::vector<int> bones;
|
||||||
vector<TrPolygon> polygons;
|
std::vector<TrPolygon> polygons;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrVolume
|
struct TrVolume
|
||||||
|
@ -44,7 +44,7 @@ struct TrVolume
|
||||||
Quaternion rotation;
|
Quaternion rotation;
|
||||||
BoundingBox box;
|
BoundingBox box;
|
||||||
BoundingSphere sphere;
|
BoundingSphere sphere;
|
||||||
string script;
|
std::string script;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrClimbVolume : TrVolume
|
struct TrClimbVolume : TrVolume
|
||||||
|
@ -68,7 +68,7 @@ struct TrSector
|
||||||
int roomAbove;
|
int roomAbove;
|
||||||
int floor;
|
int floor;
|
||||||
int ceiling;
|
int ceiling;
|
||||||
vector<int> floorData;
|
std::vector<int> floorData;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrLight
|
struct TrLight
|
||||||
|
@ -88,7 +88,7 @@ struct TrLight
|
||||||
|
|
||||||
struct TrRoomStatic
|
struct TrRoomStatic
|
||||||
{
|
{
|
||||||
string name;
|
std::string name;
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
Quaternion rotation;
|
Quaternion rotation;
|
||||||
Vector3 scale;
|
Vector3 scale;
|
||||||
|
@ -97,14 +97,14 @@ struct TrRoomStatic
|
||||||
bool receiveShadows;
|
bool receiveShadows;
|
||||||
bool castShadows;
|
bool castShadows;
|
||||||
int flags;
|
int flags;
|
||||||
string script;
|
std::string script;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrPortal
|
struct TrPortal
|
||||||
{
|
{
|
||||||
int adjoiningRoom;
|
int adjoiningRoom;
|
||||||
Vector3 normal;
|
Vector3 normal;
|
||||||
vector<Vector3> vertices;
|
std::vector<Vector3> vertices;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrRoom
|
struct TrRoom
|
||||||
|
@ -123,13 +123,13 @@ struct TrRoom
|
||||||
int alternatGroup;
|
int alternatGroup;
|
||||||
int flags;
|
int flags;
|
||||||
Vector3 ambient;
|
Vector3 ambient;
|
||||||
vector<TrBucket> buckets;
|
std::vector<TrBucket> buckets;
|
||||||
vector<TrLight> lights;
|
std::vector<TrLight> lights;
|
||||||
vector<TrRoomStatic> statics;
|
std::vector<TrRoomStatic> statics;
|
||||||
vector<TrSector> sectors;
|
std::vector<TrSector> sectors;
|
||||||
vector<TrPortal> portals;
|
std::vector<TrPortal> portals;
|
||||||
vector<TrTriggerVolume> triggers;
|
std::vector<TrTriggerVolume> triggers;
|
||||||
vector<TrClimbVolume> climbVolumes;
|
std::vector<TrClimbVolume> climbVolumes;
|
||||||
int itemNumber;
|
int itemNumber;
|
||||||
int fxNumber;
|
int fxNumber;
|
||||||
};
|
};
|
||||||
|
@ -137,7 +137,7 @@ struct TrRoom
|
||||||
struct TrMesh
|
struct TrMesh
|
||||||
{
|
{
|
||||||
BoundingSphere sphere;
|
BoundingSphere sphere;
|
||||||
vector<TrBucket> buckets;
|
std::vector<TrBucket> buckets;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrBone
|
struct TrBone
|
||||||
|
@ -150,14 +150,14 @@ struct TrKeyFrame
|
||||||
{
|
{
|
||||||
Vector3 origin;
|
Vector3 origin;
|
||||||
BoundingBox boundingBox;
|
BoundingBox boundingBox;
|
||||||
vector<Quaternion> angles;
|
std::vector<Quaternion> angles;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrAnimCommand
|
struct TrAnimCommand
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
int frame;
|
int frame;
|
||||||
vector<int> params;
|
std::vector<int> params;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrAnimDispatch
|
struct TrAnimDispatch
|
||||||
|
@ -173,7 +173,7 @@ struct TrStateChange
|
||||||
int state;
|
int state;
|
||||||
int dispatchIndex;
|
int dispatchIndex;
|
||||||
int dispatchCount;
|
int dispatchCount;
|
||||||
vector<TrAnimDispatch> dispatches;
|
std::vector<TrAnimDispatch> dispatches;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrAnimation
|
struct TrAnimation
|
||||||
|
@ -194,9 +194,9 @@ struct TrAnimation
|
||||||
int changesCount;
|
int changesCount;
|
||||||
int commandsIndex;
|
int commandsIndex;
|
||||||
int commandsCount;
|
int commandsCount;
|
||||||
vector<TrKeyFrame> keyframes;
|
std::vector<TrKeyFrame> keyframes;
|
||||||
vector<TrStateChange> changes;
|
std::vector<TrStateChange> changes;
|
||||||
vector<TrAnimCommand> commands;
|
std::vector<TrAnimCommand> commands;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrMoveable
|
struct TrMoveable
|
||||||
|
@ -208,9 +208,9 @@ struct TrMoveable
|
||||||
int meshCount;
|
int meshCount;
|
||||||
int bonesIndex;
|
int bonesIndex;
|
||||||
int bonesCount;
|
int bonesCount;
|
||||||
vector<TrMesh> meshes;
|
std::vector<TrMesh> meshes;
|
||||||
vector<TrBone> bones;
|
std::vector<TrBone> bones;
|
||||||
vector<TrAnimation> animations;
|
std::vector<TrAnimation> animations;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrStatic
|
struct TrStatic
|
||||||
|
@ -220,13 +220,13 @@ struct TrStatic
|
||||||
BoundingBox collisionBox;
|
BoundingBox collisionBox;
|
||||||
int meshNumber;
|
int meshNumber;
|
||||||
int meshCount;
|
int meshCount;
|
||||||
vector<TrMesh> meshes;
|
std::vector<TrMesh> meshes;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrAnimatedTexturesFrame
|
struct TrAnimatedTexturesFrame
|
||||||
{
|
{
|
||||||
int texture;
|
int texture;
|
||||||
vector<Vector2> textureCoords;
|
std::vector<Vector2> textureCoords;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrAnimatedTexturesSequence
|
struct TrAnimatedTexturesSequence
|
||||||
|
@ -234,12 +234,12 @@ struct TrAnimatedTexturesSequence
|
||||||
byte animationType;
|
byte animationType;
|
||||||
float fps;
|
float fps;
|
||||||
int uvRotate;
|
int uvRotate;
|
||||||
vector<TrAnimatedTexturesFrame> frames;
|
std::vector<TrAnimatedTexturesFrame> frames;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrItem
|
struct TrItem
|
||||||
{
|
{
|
||||||
string name;
|
std::string name;
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
Quaternion rotation;
|
Quaternion rotation;
|
||||||
float angle;
|
float angle;
|
||||||
|
@ -247,22 +247,22 @@ struct TrItem
|
||||||
Vector3 color;
|
Vector3 color;
|
||||||
int roomNumber;
|
int roomNumber;
|
||||||
int objectNumber;
|
int objectNumber;
|
||||||
string script;
|
std::string script;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrCamera
|
struct TrCamera
|
||||||
{
|
{
|
||||||
string name;
|
std::string name;
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
int roomNumber;
|
int roomNumber;
|
||||||
int type;
|
int type;
|
||||||
int flags;
|
int flags;
|
||||||
string script;
|
std::string script;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrSoundSource
|
struct TrSoundSource
|
||||||
{
|
{
|
||||||
string name;
|
std::string name;
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
int roomNumber;
|
int roomNumber;
|
||||||
float volume;
|
float volume;
|
||||||
|
@ -272,7 +272,7 @@ struct TrSoundSource
|
||||||
|
|
||||||
struct TrSink
|
struct TrSink
|
||||||
{
|
{
|
||||||
string name;
|
std::string name;
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
int roomNumber;
|
int roomNumber;
|
||||||
float strength;
|
float strength;
|
||||||
|
@ -293,7 +293,7 @@ struct TrBox
|
||||||
int flags;
|
int flags;
|
||||||
int overlapsIndex;
|
int overlapsIndex;
|
||||||
int overlapsCount;
|
int overlapsCount;
|
||||||
vector<TrOverlap> overlaps;
|
std::vector<TrOverlap> overlaps;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrSample
|
struct TrSample
|
||||||
|
@ -313,12 +313,12 @@ struct TrSoundDetails
|
||||||
bool randomizeGain;
|
bool randomizeGain;
|
||||||
bool noPanoramic;
|
bool noPanoramic;
|
||||||
byte loop;
|
byte loop;
|
||||||
vector<TrSample> samples;
|
std::vector<TrSample> samples;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrFlybyCamera
|
struct TrFlybyCamera
|
||||||
{
|
{
|
||||||
string name;
|
std::string name;
|
||||||
int sequence;
|
int sequence;
|
||||||
int number;
|
int number;
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
|
@ -329,13 +329,13 @@ struct TrFlybyCamera
|
||||||
int timer;
|
int timer;
|
||||||
int roomNumber;
|
int roomNumber;
|
||||||
int flags;
|
int flags;
|
||||||
string script;
|
std::string script;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrSprite
|
struct TrSprite
|
||||||
{
|
{
|
||||||
int texture;
|
int texture;
|
||||||
vector<Vector2> textureCoords;
|
std::vector<Vector2> textureCoords;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrSpriteSequence
|
struct TrSpriteSequence
|
||||||
|
@ -343,36 +343,36 @@ struct TrSpriteSequence
|
||||||
int id;
|
int id;
|
||||||
int spritesIndex;
|
int spritesIndex;
|
||||||
int spritesCount;
|
int spritesCount;
|
||||||
vector<TrSprite> sprites;
|
std::vector<TrSprite> sprites;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrLevel
|
struct TrLevel
|
||||||
{
|
{
|
||||||
vector<TrTexturePage> textures;
|
std::vector<TrTexturePage> textures;
|
||||||
vector<TrRoom> rooms;
|
std::vector<TrRoom> rooms;
|
||||||
vector<int> floorData;
|
std::vector<int> floorData;
|
||||||
vector<TrMesh> meshes;
|
std::vector<TrMesh> meshes;
|
||||||
vector<TrAnimation> animations;
|
std::vector<TrAnimation> animations;
|
||||||
vector<TrBone> bones;
|
std::vector<TrBone> bones;
|
||||||
vector<TrStateChange> changes;
|
std::vector<TrStateChange> changes;
|
||||||
vector<TrAnimDispatch> dispatches;
|
std::vector<TrAnimDispatch> dispatches;
|
||||||
vector<TrKeyFrame> frames;
|
std::vector<TrKeyFrame> frames;
|
||||||
vector<TrAnimCommand> commands;
|
std::vector<TrAnimCommand> commands;
|
||||||
vector<TrAnimatedTexturesSequence> animatedTextures;
|
std::vector<TrAnimatedTexturesSequence> animatedTextures;
|
||||||
vector<TrSprite> sprites;
|
std::vector<TrSprite> sprites;
|
||||||
vector<TrSpriteSequence> spriteSequences;
|
std::vector<TrSpriteSequence> spriteSequences;
|
||||||
vector<int> soundMap;
|
std::vector<int> soundMap;
|
||||||
vector<TrSoundDetails> soundDetails;
|
std::vector<TrSoundDetails> soundDetails;
|
||||||
vector<TrSample> samples;
|
std::vector<TrSample> samples;
|
||||||
vector<TrItem> items;
|
std::vector<TrItem> items;
|
||||||
vector<TrItem> aiItems;
|
std::vector<TrItem> aiItems;
|
||||||
vector<TrMoveable> moveables;
|
std::vector<TrMoveable> moveables;
|
||||||
vector<TrStatic> statics;
|
std::vector<TrStatic> statics;
|
||||||
vector<TrBox> boxes;
|
std::vector<TrBox> boxes;
|
||||||
vector<TrOverlap> overlaps;
|
std::vector<TrOverlap> overlaps;
|
||||||
vector<int> zones[5][2];
|
std::vector<int> zones[5][2];
|
||||||
vector<TrSink> sinks;
|
std::vector<TrSink> sinks;
|
||||||
vector<TrCamera> cameras;
|
std::vector<TrCamera> cameras;
|
||||||
vector<TrSoundSource> soundSources;
|
std::vector<TrSoundSource> soundSources;
|
||||||
vector<TrFlybyCamera> flybyCameras;
|
std::vector<TrFlybyCamera> flybyCameras;
|
||||||
};
|
};
|
|
@ -18,13 +18,13 @@ typedef struct ObjectInfo
|
||||||
short meshIndex;
|
short meshIndex;
|
||||||
int boneIndex;
|
int boneIndex;
|
||||||
short* frameBase;
|
short* frameBase;
|
||||||
function<void(short itemNumber)> initialise;
|
std::function<void(short itemNumber)> initialise;
|
||||||
function<void(short itemNumber)> control;
|
std::function<void(short itemNumber)> control;
|
||||||
function<void(ITEM_INFO* item, int x, int y, int z, int* height)> floor;
|
std::function<void(ITEM_INFO* item, int x, int y, int z, int* height)> floor;
|
||||||
function<void(ITEM_INFO* item, int x, int y, int z, int* height)> ceiling;
|
std::function<void(ITEM_INFO* item, int x, int y, int z, int* height)> ceiling;
|
||||||
function<void(ITEM_INFO* item)> drawRoutine;
|
std::function<void(ITEM_INFO* item)> drawRoutine;
|
||||||
function<void(ITEM_INFO* item)> drawRoutineExtra;
|
std::function<void(ITEM_INFO* item)> drawRoutineExtra;
|
||||||
function<void(short item_num, ITEM_INFO* laraitem, COLL_INFO* coll)> collision;
|
std::function<void(short item_num, ITEM_INFO* laraitem, COLL_INFO* coll)> collision;
|
||||||
ZoneType zoneType;
|
ZoneType zoneType;
|
||||||
short animIndex;
|
short animIndex;
|
||||||
short hitPoints;
|
short hitPoints;
|
||||||
|
|
|
@ -27,7 +27,7 @@ extern HWND WindowsHandle;
|
||||||
#define BeginThread(function, threadid) _beginthreadex(0, 0, &function, 0, 0, &threadid)
|
#define BeginThread(function, threadid) _beginthreadex(0, 0, &function, 0, 0, &threadid)
|
||||||
#define EndThread() _endthreadex(1)
|
#define EndThread() _endthreadex(1)
|
||||||
|
|
||||||
int lua_exception_handler(lua_State* L, sol::optional<const exception&> maybe_exception, sol::string_view description);
|
int lua_exception_handler(lua_State* L, sol::optional<const std::exception&> maybe_exception, sol::string_view description);
|
||||||
void WinProcMsg();
|
void WinProcMsg();
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
|
||||||
void WinClose();
|
void WinClose();
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
#include "bass_fx.h"
|
#include "bass_fx.h"
|
||||||
#include "sol.hpp"
|
#include "sol.hpp"
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
using namespace DirectX;
|
using namespace DirectX;
|
||||||
using namespace DirectX::SimpleMath;
|
using namespace DirectX::SimpleMath;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue