mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 20:46:47 +03:00
Merge branch 'master' of https://github.com/MontyTRC89/TR5Main
This commit is contained in:
commit
d6f45db5ec
55 changed files with 26453 additions and 22588 deletions
|
@ -262,7 +262,7 @@ void CreatureKill(ITEM_INFO* item, int killAnim, int killState, short laraKillSt
|
|||
*/
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
PHD_VECTOR pos;
|
||||
pos.x = bite->x;
|
||||
|
@ -272,7 +272,7 @@ short CreatureEffect2(ITEM_INFO* item, BITE_INFO* bite, short damage, short angl
|
|||
return func(pos.x, pos.y, pos.z, damage, angle, item->roomNumber);
|
||||
}
|
||||
|
||||
short CreatureEffect(ITEM_INFO* item, BITE_INFO* bite, function<CreatureEffectFunction> func)
|
||||
short CreatureEffect(ITEM_INFO* item, BITE_INFO* bite, std::function<CreatureEffectFunction> func)
|
||||
{
|
||||
PHD_VECTOR pos;
|
||||
pos.x = bite->x;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "control.h"
|
||||
#include "trmath.h"
|
||||
#include "objectslist.h"
|
||||
|
||||
using std::vector;
|
||||
extern vector<BUBBLE_STRUCT> Bubbles = vector<BUBBLE_STRUCT>(MAX_BUBBLES);
|
||||
|
||||
void UpdateBubbles()
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "setup.h"
|
||||
#include "sound.h"
|
||||
#include "trmath.h"
|
||||
|
||||
using std::vector;
|
||||
char LM[] =
|
||||
{
|
||||
LM_HIPS,
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "spark.h"
|
||||
#include "explosion.h"
|
||||
#include "drip.h"
|
||||
using std::vector;
|
||||
using namespace T5M::Effects::Explosion;
|
||||
using namespace T5M::Effects::Spark;
|
||||
using namespace T5M::Effects::Smoke;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "tr5_bats_emitter.h"
|
||||
#include "tr5_spider_emitter.h"
|
||||
#include "pickup.h"
|
||||
|
||||
using std::function;
|
||||
constexpr auto ITEM_RADIUS_YMAX = SECTOR(3);
|
||||
int wf = 256;
|
||||
using namespace T5M::Effects::Footprints;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
namespace T5M {
|
||||
namespace Effects {
|
||||
namespace Footprints {
|
||||
using std::deque;
|
||||
std::deque<FOOTPRINT_STRUCT> footprints = deque<FOOTPRINT_STRUCT>();
|
||||
|
||||
bool CheckFootOnFloor(ITEM_INFO& const item, int mesh, PHD_3DPOS& outFootprintPosition) {
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
#include "input.h"
|
||||
|
||||
#include "level.h"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
SavegameInfo g_SavegameInfos[MAX_SAVEGAMES];
|
||||
SaveGameHeader g_NewSavegameInfos[MAX_SAVEGAMES];
|
||||
vector<string> g_NewStrings;
|
||||
|
|
|
@ -34,7 +34,7 @@ struct GAMEFLOW
|
|||
};
|
||||
|
||||
extern SavegameInfo g_SavegameInfos[MAX_SAVEGAMES];
|
||||
extern vector<string> g_NewStrings;
|
||||
extern std::vector<std::string> g_NewStrings;
|
||||
extern SaveGameHeader g_NewSavegameInfos[MAX_SAVEGAMES];
|
||||
|
||||
int LoadSavegameInfos();
|
|
@ -16,7 +16,7 @@
|
|||
#include "lara2gun.h"
|
||||
#include "level.h"
|
||||
#include "input.h"
|
||||
|
||||
using std::vector;
|
||||
Inventory g_Inventory;
|
||||
extern GameFlow* g_GameFlow;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "upv.h"
|
||||
#include "kayak.h"
|
||||
#include "minecart.h"
|
||||
|
||||
using std::function;
|
||||
static short LeftClimbTab[4] = // offset 0xA0638
|
||||
{
|
||||
0x0200, 0x0400, 0x0800, 0x0100
|
||||
|
@ -691,13 +691,13 @@ void lara_as_stop(ITEM_INFO* item, COLL_INFO* coll)
|
|||
return;
|
||||
}
|
||||
|
||||
if (height >= -STEP_SIZE || fheight >= -STEP_SIZE)
|
||||
{
|
||||
// if (height >= -STEP_SIZE || fheight >= -STEP_SIZE)
|
||||
// {
|
||||
if (TrInput & IN_WALK)
|
||||
lara_as_walk(item, coll);
|
||||
else
|
||||
lara_as_run(item, coll);
|
||||
}
|
||||
/* }
|
||||
else
|
||||
{
|
||||
Lara.moveAngle = item->pos.yRot;
|
||||
|
@ -715,7 +715,7 @@ void lara_as_stop(ITEM_INFO* item, COLL_INFO* coll)
|
|||
coll->radius = LARA_RAD;
|
||||
item->goalAnimState = STATE_LARA_STOP;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (TrInput & IN_BACK)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "level.h"
|
||||
#include "lara.h"
|
||||
#include "draw.h"
|
||||
|
||||
using std::vector;
|
||||
short GF(short animIndex, short frameToStart)
|
||||
{
|
||||
return Anims[animIndex].frameBase + frameToStart;
|
||||
|
|
|
@ -24,4 +24,4 @@ CREATURE_INFO* GetCreatureInfo(ITEM_INFO* item);
|
|||
void TargetNearestEntity(ITEM_INFO* item, CREATURE_INFO* creature);
|
||||
|
||||
void GetRoomList(short roomNumber, short* roomArray, short* numRooms); // return the value via roomArray and numRooms
|
||||
void GetRoomList(short roomNumber, vector<short>* DestRoomList); // return the value via DestRoomList
|
||||
void GetRoomList(short roomNumber, std::vector<short>* DestRoomList); // return the value via DestRoomList
|
|
@ -943,9 +943,9 @@ void PickupCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
|||
}*/
|
||||
}
|
||||
|
||||
/* item->pos.xRot = oldXrot;
|
||||
item->pos.xRot = oldXrot;
|
||||
item->pos.yRot = oldYrot;
|
||||
item->pos.zRot = oldZrot;*/
|
||||
item->pos.zRot = oldZrot;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
#include "tr5_rats_emitter.h"
|
||||
#include "tr5_bats_emitter.h"
|
||||
#include "tr5_spider_emitter.h"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
FileStream* SaveGame::m_stream;
|
||||
ChunkReader* SaveGame::m_reader;
|
||||
ChunkWriter* SaveGame::m_writer;
|
||||
|
|
|
@ -67,7 +67,7 @@ private:
|
|||
static FileStream* m_stream;
|
||||
static ChunkReader* m_reader;
|
||||
static ChunkWriter* m_writer;
|
||||
static vector<LuaVariable> m_luaVariables;
|
||||
static std::vector<LuaVariable> m_luaVariables;
|
||||
|
||||
static ChunkId* m_chunkGameStatus;
|
||||
static ChunkId* m_chunkItems;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "configuration.h"
|
||||
#include "level.h"
|
||||
#include "winmain.h"
|
||||
|
||||
using std::vector;
|
||||
HSTREAM BASS_3D_Mixdown;
|
||||
HFX BASS_FXHandler[NUM_SOUND_FILTERS];
|
||||
SoundTrackSlot BASS_Soundtrack[NUM_SOUND_TRACK_TYPES];
|
||||
|
|
|
@ -2041,9 +2041,7 @@ typedef struct AudioTrack
|
|||
byte Mask;
|
||||
};
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern vector<AudioTrack> g_AudioTracks;
|
||||
extern std::vector<AudioTrack> g_AudioTracks;
|
||||
extern short SampleLUT[SOUND_NEW_SOUNDMAP_MAX_SIZE];
|
||||
extern short SoundMapSize;
|
||||
extern int NumSamplesInfos;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lauxlib.h,v 1.131 2016/12/06 14:54:31 roberto Exp $
|
||||
** $Id: lauxlib.h,v 1.131.1.1 2017/04/19 17:20:42 roberto Exp $
|
||||
** Auxiliary functions for building Lua libraries
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -218,7 +218,7 @@ LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname,
|
|||
** ===================================================================
|
||||
*/
|
||||
|
||||
/* print a std::string */
|
||||
/* print a string */
|
||||
#if !defined(lua_writestring)
|
||||
#define lua_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lua.h,v 1.332 2016/12/22 15:51:20 roberto Exp $
|
||||
** $Id: lua.h,v 1.332.1.2 2018/06/13 16:58:17 roberto Exp $
|
||||
** Lua - A Scripting Language
|
||||
** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
|
||||
** See Copyright Notice at the end of this file
|
||||
|
@ -19,11 +19,11 @@
|
|||
#define LUA_VERSION_MAJOR "5"
|
||||
#define LUA_VERSION_MINOR "3"
|
||||
#define LUA_VERSION_NUM 503
|
||||
#define LUA_VERSION_RELEASE "4"
|
||||
#define LUA_VERSION_RELEASE "5"
|
||||
|
||||
#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
|
||||
#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE
|
||||
#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2017 Lua.org, PUC-Rio"
|
||||
#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2018 Lua.org, PUC-Rio"
|
||||
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
|
||||
|
||||
|
||||
|
@ -460,7 +460,7 @@ struct lua_Debug {
|
|||
|
||||
|
||||
/******************************************************************************
|
||||
* Copyright (C) 1994-2017 Lua.org, PUC-Rio.
|
||||
* Copyright (C) 1994-2018 Lua.org, PUC-Rio.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: luaconf.h,v 1.259 2016/12/22 13:08:50 roberto Exp $
|
||||
** $Id: luaconf.h,v 1.259.1.1 2017/04/19 17:29:57 roberto Exp $
|
||||
** Configuration file for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -160,7 +160,7 @@
|
|||
|
||||
/*
|
||||
** LUA_PATH_SEP is the character that separates templates in a path.
|
||||
** LUA_PATH_MARK is the std::string that marks the substitution points in a
|
||||
** LUA_PATH_MARK is the string that marks the substitution points in a
|
||||
** template.
|
||||
** LUA_EXEC_DIR in a Windows path is replaced by the executable's
|
||||
** directory.
|
||||
|
@ -427,7 +427,7 @@
|
|||
@@ lua_number2str converts a float to a string.
|
||||
@@ l_mathop allows the addition of an 'l' or 'f' to all math operations.
|
||||
@@ l_floor takes the floor of a float.
|
||||
@@ lua_str2number converts a decimal numeric std::string to a number.
|
||||
@@ lua_str2number converts a decimal numeric string to a number.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -612,7 +612,7 @@
|
|||
|
||||
|
||||
/*
|
||||
@@ lua_strx2number converts an hexadecimal numeric std::string to a number.
|
||||
@@ lua_strx2number converts an hexadecimal numeric string to a number.
|
||||
** In C99, 'strtod' does that conversion. Otherwise, you can
|
||||
** leave 'lua_strx2number' undefined and Lua will provide its own
|
||||
** implementation.
|
||||
|
@ -622,6 +622,13 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ lua_pointer2str converts a pointer to a readable string in a
|
||||
** non-specified way.
|
||||
*/
|
||||
#define lua_pointer2str(buff,sz,p) l_sprintf(buff,sz,"%p",p)
|
||||
|
||||
|
||||
/*
|
||||
@@ lua_number2strx converts a float to an hexadecimal numeric string.
|
||||
** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lualib.h,v 1.45 2017/01/12 17:14:26 roberto Exp $
|
||||
** $Id: lualib.h,v 1.45.1.1 2017/04/19 17:20:42 roberto Exp $
|
||||
** Lua standard libraries
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
25838
TR5Main/Libs/sol/sol.hpp
Normal file
25838
TR5Main/Libs/sol/sol.hpp
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@
|
|||
#include "level.h"
|
||||
#include "input.h"
|
||||
#include "sound.h"
|
||||
|
||||
using std::vector;
|
||||
// TODO: recreate the DrawSkidoo for the snowmobile.
|
||||
|
||||
enum SKIDOO_STATE { SKID_SIT, SKID_GETON, SKID_LEFT, SKID_RIGHT, SKID_FALL, SKID_HIT, SKID_GETONL, SKID_GETOFFL, SKID_STILL, SKID_GETOFF, SKID_LETGO, SKID_DEATH, SKID_FALLOFF };
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "level.h"
|
||||
#include "setup.h"
|
||||
#include "input.h"
|
||||
|
||||
using std::vector;
|
||||
#define MAX_SPEED 0x380000
|
||||
#define KAYAK_COLLIDE 64
|
||||
#define GETOFF_DIST CLICK(3) // minimum collision distance
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "setup.h"
|
||||
#include "input.h"
|
||||
#include "sound.h"
|
||||
|
||||
using std::vector;
|
||||
typedef enum MINECART_STATE {
|
||||
CART_GETIN,
|
||||
CART_GETOUT,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "level.h"
|
||||
#include "input.h"
|
||||
#include "sound.h"
|
||||
|
||||
using std::vector;
|
||||
typedef enum QUAD_EFFECTS_POSITIONS {
|
||||
EXHAUST_LEFT = 0,
|
||||
EXHAUST_RIGHT,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "sound.h"
|
||||
#include "setup.h"
|
||||
#include "level.h"
|
||||
|
||||
using std::vector;
|
||||
typedef struct JEEP_INFO
|
||||
{
|
||||
short rot1;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "level.h"
|
||||
#include "tr5_smashobject.h"
|
||||
#include "tr5_pushableblock.h"
|
||||
|
||||
using std::function;
|
||||
void InitSmashObject(ObjectInfo* obj, int objectNumber)
|
||||
{
|
||||
obj = &Objects[objectNumber];
|
||||
|
|
|
@ -9,7 +9,7 @@ void InitPuzzleHole(ObjectInfo* obj, int objectNumber);
|
|||
void InitPuzzleDone(ObjectInfo* obj, int objectNumber);
|
||||
void InitAnimating(ObjectInfo* obj, int objectNumber);
|
||||
void InitPickup(ObjectInfo* obj, int objectNumber);
|
||||
void InitPickupItem(ObjectInfo* obj, function<InitFunction> func, int objectNumber, bool useDrawAnimItem = false);
|
||||
void InitProjectile(ObjectInfo* obj, function<InitFunction> func, int objectNumber, bool noLoad = false);
|
||||
void InitPickupItem(ObjectInfo* obj, std::function<InitFunction> func, int objectNumber, bool useDrawAnimItem = false);
|
||||
void InitProjectile(ObjectInfo* obj, std::function<InitFunction> func, int objectNumber, bool noLoad = false);
|
||||
void InitSearchObject(ObjectInfo* obj, int objectNumber);
|
||||
void InitPushableObject(ObjectInfo* obj, int objectNumber);
|
|
@ -9,7 +9,8 @@
|
|||
#include "lara.h"
|
||||
#include "sphere.h"
|
||||
#include "GameFlowScript.h"
|
||||
|
||||
using std::vector;
|
||||
using std::pair;
|
||||
extern GameConfiguration g_Configuration;
|
||||
extern GameFlow* g_GameFlow;
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "Utils.h"
|
||||
#include "VertexBuffer.h"
|
||||
using namespace T5M::Renderer::Utils;
|
||||
using std::array;
|
||||
Renderer11* g_Renderer;
|
||||
Renderer11::Renderer11()
|
||||
{
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
#include "setup.h"
|
||||
#include "control.h"
|
||||
#include "objects.h"
|
||||
|
||||
using std::vector;
|
||||
using std::stack;
|
||||
bool Renderer11::PrepareDataForTheRenderer()
|
||||
{
|
||||
m_moveableObjects = (RendererObject * *)malloc(sizeof(RendererObject*) * ID_NUMBER_OBJECTS);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "tr5_spider_emitter.h"
|
||||
#include "CameraMatrixBuffer.h"
|
||||
using namespace T5M::Renderer;
|
||||
|
||||
using namespace std::chrono;
|
||||
extern GUNSHELL_STRUCT Gunshells[MAX_GUNSHELL];
|
||||
extern RendererHUDBar* g_DashBar;
|
||||
extern RendererHUDBar* g_SFXVolumeBar;
|
||||
|
@ -1903,8 +1903,8 @@ int Renderer11::DrawInventory()
|
|||
|
||||
bool Renderer11::drawScene(bool dump)
|
||||
{
|
||||
using ns = chrono::nanoseconds;
|
||||
using get_time = chrono::steady_clock;
|
||||
using ns = std::chrono::nanoseconds;
|
||||
using get_time = std::chrono::steady_clock;
|
||||
m_timeUpdate = 0;
|
||||
m_timeDraw = 0;
|
||||
m_timeFrame = 0;
|
||||
|
@ -1925,7 +1925,7 @@ bool Renderer11::drawScene(bool dump)
|
|||
m_stLights.CameraPosition = Vector3(Camera.pos.x, Camera.pos.y, Camera.pos.z);
|
||||
|
||||
// Prepare the scene to draw
|
||||
auto time1 = chrono::high_resolution_clock::now();
|
||||
auto time1 = std::chrono::high_resolution_clock::now();
|
||||
prepareCameraForFrame();
|
||||
ProcessClosedDoors();
|
||||
|
||||
|
@ -1948,8 +1948,8 @@ bool Renderer11::drawScene(bool dump)
|
|||
if (GnFrameCounter % 2 == 0)
|
||||
updateAnimatedTextures();
|
||||
|
||||
auto time2 = chrono::high_resolution_clock::now();
|
||||
m_timeUpdate = (chrono::duration_cast<ns>(time2 - time1)).count() / 1000000;
|
||||
auto time2 = std::chrono::high_resolution_clock::now();
|
||||
m_timeUpdate = (std::chrono::duration_cast<ns>(time2 - time1)).count() / 1000000;
|
||||
time1 = time2;
|
||||
|
||||
// Draw shadow map
|
||||
|
@ -2040,8 +2040,8 @@ bool Renderer11::drawScene(bool dump)
|
|||
drawSprites();
|
||||
drawLines3D();
|
||||
|
||||
time2 = chrono::high_resolution_clock::now();
|
||||
m_timeFrame = (chrono::duration_cast<ns>(time2 - time1)).count() / 1000000;
|
||||
time2 = std::chrono::high_resolution_clock::now();
|
||||
m_timeFrame = (std::chrono::duration_cast<ns>(time2 - time1)).count() / 1000000;
|
||||
time1 = time2;
|
||||
|
||||
// Bars
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "explosion.h"
|
||||
using namespace T5M::Renderer;
|
||||
using namespace T5M::Effects::Footprints;
|
||||
using std::vector;
|
||||
extern BLOOD_STRUCT Blood[MAX_SPARKS_BLOOD];
|
||||
extern FIRE_SPARKS FireSparks[MAX_SPARKS_FIRE];
|
||||
extern SMOKE_SPARKS SmokeSparks[MAX_SPARKS_SMOKE];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "winmain.h"
|
||||
#include "GameFlowScript.h"
|
||||
using namespace T5M::Renderer;
|
||||
|
||||
using std::vector;
|
||||
extern GameConfiguration g_Configuration;
|
||||
extern GameFlow* g_GameFlow;
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
#include "sound.h"
|
||||
#include "savegame.h"
|
||||
#include "draw.h"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
ChunkId* ChunkGameFlowFlags = ChunkId::FromString("Tr5MainFlags");
|
||||
ChunkId* ChunkGameFlowLevel = ChunkId::FromString("Tr5MainLevel");
|
||||
ChunkId* ChunkGameFlowLevelFlags = ChunkId::FromString("Tr5MainLevelFlags");
|
||||
|
@ -328,6 +329,8 @@ bool __cdecl LoadScript()
|
|||
|
||||
string GameFlow::loadScriptFromFile(char* luaFilename)
|
||||
{
|
||||
using std::ifstream;
|
||||
using std::ios;
|
||||
ifstream ifs(luaFilename, ios::in | ios::binary | ios::ate);
|
||||
|
||||
ifstream::pos_type fileSize = ifs.tellg();
|
||||
|
|
|
@ -163,8 +163,8 @@ private:
|
|||
sol::state* m_lua;
|
||||
GameScriptSettings m_settings;
|
||||
|
||||
string loadScriptFromFile(char* luaFilename);
|
||||
map<short, short> m_itemsMap;
|
||||
std::string loadScriptFromFile(char* luaFilename);
|
||||
std::map<short, short> m_itemsMap;
|
||||
|
||||
public:
|
||||
Vector3 SkyColorLayer1;
|
||||
|
@ -188,8 +188,8 @@ public:
|
|||
|
||||
// Selected language set
|
||||
LanguageScript* CurrentStrings;
|
||||
vector<LanguageScript*> Strings;
|
||||
vector<GameScriptLevel*> Levels;
|
||||
std::vector<LanguageScript*> Strings;
|
||||
std::vector<GameScriptLevel*> Levels;
|
||||
|
||||
GameFlow(sol::state* lua);
|
||||
~GameFlow();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "sound.h"
|
||||
#include "setup.h"
|
||||
#include "level.h"
|
||||
|
||||
using namespace std;
|
||||
extern GameFlow* g_GameFlow;
|
||||
GameScript* g_GameScript;
|
||||
bool WarningsAsErrors = false;
|
||||
|
|
|
@ -34,16 +34,16 @@ private:
|
|||
float xPos;
|
||||
float yPos;
|
||||
float zPos;
|
||||
function<float()> readXPos;
|
||||
function<void(float)> writeXPos;
|
||||
function<float()> readYPos;
|
||||
function<void(float)> writeYPos;
|
||||
function<float()> readZPos;
|
||||
function<void(float)> writeZPos;
|
||||
std::function<float()> readXPos;
|
||||
std::function<void(float)> writeXPos;
|
||||
std::function<float()> readYPos;
|
||||
std::function<void(float)> writeYPos;
|
||||
std::function<float()> readZPos;
|
||||
std::function<void(float)> writeZPos;
|
||||
|
||||
public:
|
||||
GameScriptPosition(float x, float y, float z);
|
||||
GameScriptPosition(function<float()> readX, function<void(float)> writeX, function<float()> readY, function<void(float)> writeY, function<float()> readZ, function<void(float)> writeZ);
|
||||
GameScriptPosition(std::function<float()> readX, std::function<void(float)> writeX, std::function<float()> readY, std::function<void(float)> writeY, std::function<float()> readZ, std::function<void(float)> writeZ);
|
||||
|
||||
float GetXPos();
|
||||
void SetXPos(float x);
|
||||
|
@ -58,16 +58,16 @@ private:
|
|||
float xRot;
|
||||
float yRot;
|
||||
float zRot;
|
||||
function<float()> readXRot;
|
||||
function<void(float)> writeXRot;
|
||||
function<float()> readYRot;
|
||||
function<void(float)> writeYRot;
|
||||
function<float()> readZRot;
|
||||
function<void(float)> writeZRot;
|
||||
std::function<float()> readXRot;
|
||||
std::function<void(float)> writeXRot;
|
||||
std::function<float()> readYRot;
|
||||
std::function<void(float)> writeYRot;
|
||||
std::function<float()> readZRot;
|
||||
std::function<void(float)> writeZRot;
|
||||
|
||||
public:
|
||||
GameScriptRotation(float x, float y, float z);
|
||||
GameScriptRotation(function<float()> readX, function<void(float)> writeX, function<float()> readY, function<void(float)> writeY, function<float()> readZ, function<void(float)> writeZ);
|
||||
GameScriptRotation(std::function<float()> readX, std::function<void(float)> writeX, std::function<float()> readY, std::function<void(float)> writeY, std::function<float()> readZ, std::function<void(float)> writeZ);
|
||||
|
||||
float GetXRot();
|
||||
void SetXRot(float x);
|
||||
|
@ -104,7 +104,7 @@ public:
|
|||
class LuaVariables
|
||||
{
|
||||
public:
|
||||
map<string, sol::object> variables;
|
||||
std::map<std::string, sol::object> variables;
|
||||
|
||||
sol::object GetVariable(std::string key);
|
||||
void SetVariable(std::string key, sol::object value);
|
||||
|
@ -127,15 +127,15 @@ private:
|
|||
sol::state* m_lua;
|
||||
LuaVariables m_globals;
|
||||
LuaVariables m_locals;
|
||||
map<int, short> m_itemsMapId;
|
||||
map<string, short> m_itemsMapName;
|
||||
vector<LuaFunction*> m_triggers;
|
||||
std::map<int, short> m_itemsMapId;
|
||||
std::map<std::string, short> m_itemsMapName;
|
||||
std::vector<LuaFunction*> m_triggers;
|
||||
|
||||
public:
|
||||
GameScript(sol::state* lua);
|
||||
|
||||
bool ExecuteScript(const string& luaFilename, string& message);
|
||||
bool ExecuteString(const string& command, string& message);
|
||||
bool ExecuteScript(const std::string& luaFilename, std::string& message);
|
||||
bool ExecuteString(const std::string& command, std::string& message);
|
||||
void FreeLevelScripts();
|
||||
void AddTrigger(LuaFunction* function);
|
||||
void AddLuaId(int luaId, short itemNumber);
|
||||
|
@ -144,9 +144,9 @@ public:
|
|||
void ResetVariables();
|
||||
|
||||
template <typename T>
|
||||
void GetVariables(map<string, T>& locals, map<string, T>& globals);
|
||||
void GetVariables(std::map<std::string, T>& locals, std::map<std::string, T>& globals);
|
||||
template <typename T>
|
||||
void SetVariables(map<string, T>& locals, map<string, T>& globals);
|
||||
void SetVariables(std::map<std::string, T>& locals, std::map<std::string, T>& globals);
|
||||
void PlayAudioTrack(short track);
|
||||
void ChangeAmbientSoundTrack(short track);
|
||||
bool ExecuteTrigger(short index);
|
||||
|
@ -155,8 +155,8 @@ public:
|
|||
void SetSecretsCount(int secretsNum);
|
||||
void AddOneSecret();
|
||||
void MakeItemInvisible(short id);
|
||||
unique_ptr<GameScriptItem> GetItemById(int id);
|
||||
unique_ptr<GameScriptItem> GetItemByName(std::string name);
|
||||
std::unique_ptr<GameScriptItem> GetItemById(int id);
|
||||
std::unique_ptr<GameScriptItem> GetItemByName(std::string name);
|
||||
void PlaySoundEffectAtPosition(short id, int x, int y, int z, int flags);
|
||||
void PlaySoundEffect(short id, int flags);
|
||||
GameScriptPosition CreatePosition(float x, float y, float z);
|
||||
|
|
54
TR5Main/Specific/IO/ChunkId.cpp
Normal file
54
TR5Main/Specific/IO/ChunkId.cpp
Normal file
|
@ -0,0 +1,54 @@
|
|||
#include "framework.h"
|
||||
#include "ChunkId.h"
|
||||
using std::string;
|
||||
ChunkId::ChunkId(char* bytes, int length) {
|
||||
if (length == 0) {
|
||||
m_chunkBytes = NULL;
|
||||
m_length = 0;
|
||||
} else {
|
||||
m_chunkBytes = (byte*)malloc(length);
|
||||
memcpy(m_chunkBytes, bytes, length);
|
||||
m_length = length;
|
||||
}
|
||||
}
|
||||
|
||||
ChunkId::~ChunkId() {
|
||||
if (m_chunkBytes != NULL)
|
||||
delete m_chunkBytes;
|
||||
}
|
||||
|
||||
ChunkId* ChunkId::FromString(const char* str) {
|
||||
return new ChunkId((char*)str, strlen(str));
|
||||
}
|
||||
|
||||
ChunkId* ChunkId::FromString(string* str) {
|
||||
return new ChunkId((char*)str->c_str(), str->length());
|
||||
}
|
||||
|
||||
ChunkId* ChunkId::FromStream(BaseStream* stream) {
|
||||
int idLength = LEB128::ReadInt32(stream);
|
||||
char* buffer = (char*)malloc(idLength);
|
||||
stream->Read(buffer, idLength);
|
||||
ChunkId* chunk = new ChunkId(buffer, idLength);
|
||||
free(buffer);
|
||||
return chunk;
|
||||
}
|
||||
|
||||
void ChunkId::ToStream(BaseStream* stream) {
|
||||
LEB128::Write(stream, m_length);
|
||||
stream->WriteBytes(m_chunkBytes, m_length);
|
||||
}
|
||||
|
||||
byte* ChunkId::GetBytes() {
|
||||
return m_chunkBytes;
|
||||
}
|
||||
|
||||
int ChunkId::GetLength() {
|
||||
return m_length;
|
||||
}
|
||||
|
||||
bool ChunkId::EqualsTo(ChunkId* other) {
|
||||
if (m_length != other->GetLength())
|
||||
return false;
|
||||
return (strncmp((const char*)m_chunkBytes, (const char*)other->GetBytes(), m_length) == 0);
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
#include "LEB128.h"
|
||||
#include "Streams.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef struct ChunkId
|
||||
{
|
||||
|
@ -11,67 +10,21 @@ private:
|
|||
int m_length;
|
||||
|
||||
public:
|
||||
ChunkId(char* bytes, int length)
|
||||
{
|
||||
if (length == 0)
|
||||
{
|
||||
m_chunkBytes = NULL;
|
||||
m_length = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_chunkBytes = (byte*)malloc(length);
|
||||
memcpy(m_chunkBytes, bytes, length);
|
||||
m_length = length;
|
||||
}
|
||||
}
|
||||
ChunkId(char* bytes, int length);
|
||||
|
||||
~ChunkId()
|
||||
{
|
||||
if (m_chunkBytes != NULL)
|
||||
delete m_chunkBytes;
|
||||
}
|
||||
~ChunkId();
|
||||
|
||||
static ChunkId* FromString(const char* str)
|
||||
{
|
||||
return new ChunkId((char*)str, strlen(str));
|
||||
}
|
||||
static ChunkId* FromString(const char* str);
|
||||
|
||||
static ChunkId* FromString(string* str)
|
||||
{
|
||||
return new ChunkId((char*)str->c_str(), str->length());
|
||||
}
|
||||
static ChunkId* FromString(std::string* str);
|
||||
|
||||
static ChunkId* FromStream(BaseStream* stream)
|
||||
{
|
||||
int idLength = LEB128::ReadInt32(stream);
|
||||
char* buffer = (char*)malloc(idLength);
|
||||
stream->Read(buffer, idLength);
|
||||
ChunkId* chunk = new ChunkId(buffer, idLength);
|
||||
free(buffer);
|
||||
return chunk;
|
||||
}
|
||||
static ChunkId* FromStream(BaseStream* stream);
|
||||
|
||||
void ToStream(BaseStream* stream)
|
||||
{
|
||||
LEB128::Write(stream, m_length);
|
||||
stream->WriteBytes(m_chunkBytes, m_length);
|
||||
}
|
||||
void ToStream(BaseStream* stream);
|
||||
|
||||
byte* GetBytes()
|
||||
{
|
||||
return m_chunkBytes;
|
||||
}
|
||||
byte* GetBytes();
|
||||
|
||||
int GetLength()
|
||||
{
|
||||
return m_length;
|
||||
}
|
||||
int GetLength();
|
||||
|
||||
bool EqualsTo(ChunkId* other)
|
||||
{
|
||||
if (m_length != other->GetLength())
|
||||
return false;
|
||||
return (strncmp((const char*)m_chunkBytes, (const char*)other->GetBytes(), m_length) == 0);
|
||||
}
|
||||
bool EqualsTo(ChunkId* other);
|
||||
};
|
133
TR5Main/Specific/IO/ChunkReader.cpp
Normal file
133
TR5Main/Specific/IO/ChunkReader.cpp
Normal file
|
@ -0,0 +1,133 @@
|
|||
#include "framework.h"
|
||||
#include "ChunkReader.h"
|
||||
|
||||
int ChunkReader::readInt32() {
|
||||
int value = 0;
|
||||
m_stream->Read(reinterpret_cast<char*>(&value), 4);
|
||||
return value;
|
||||
}
|
||||
|
||||
short ChunkReader::readInt16() {
|
||||
short value = 0;
|
||||
m_stream->Read(reinterpret_cast<char*>(&value), 2);
|
||||
return value;
|
||||
}
|
||||
|
||||
ChunkReader::ChunkReader(int expectedMagicNumber, BaseStream* stream) {
|
||||
m_isValid = false;
|
||||
|
||||
if (stream == NULL)
|
||||
return;
|
||||
|
||||
m_stream = stream;
|
||||
|
||||
// Check the magic number
|
||||
int magicNumber = readInt32();
|
||||
if (magicNumber != expectedMagicNumber)
|
||||
return;
|
||||
|
||||
// TODO: future use for compression
|
||||
m_stream->Seek(4, SeekOrigin::CURRENT);
|
||||
m_emptyChunk = new ChunkId(NULL, 0);
|
||||
m_isValid = true;
|
||||
}
|
||||
|
||||
ChunkReader::~ChunkReader() {
|
||||
delete m_emptyChunk;
|
||||
}
|
||||
|
||||
bool ChunkReader::IsValid() {
|
||||
return m_isValid;
|
||||
}
|
||||
|
||||
bool ChunkReader::ReadChunks(bool(*func)(ChunkId* parentChunkId, int maxSize, int arg), int arg) {
|
||||
do {
|
||||
ChunkId* chunkId = ChunkId::FromStream(m_stream);
|
||||
if (chunkId->EqualsTo(m_emptyChunk)) // End reached
|
||||
break;
|
||||
|
||||
// Read up to a 64 bit number for the chunk size
|
||||
__int64 chunkSize = LEB128::ReadLong(m_stream);
|
||||
|
||||
// Try loading chunk content
|
||||
bool chunkRecognized = false;
|
||||
int startPos = m_stream->GetCurrentPosition();
|
||||
|
||||
chunkRecognized = func(chunkId, chunkSize, arg);
|
||||
int readDataCount = m_stream->GetCurrentPosition() - startPos;
|
||||
|
||||
// Adjust _stream position if necessary
|
||||
if (readDataCount != chunkSize)
|
||||
m_stream->Seek(chunkSize - readDataCount, SeekOrigin::CURRENT);
|
||||
} while (true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChunkReader::ReadChunks(std::function<bool(ChunkId*, long, int)> func, int arg) {
|
||||
do {
|
||||
ChunkId* chunkId = ChunkId::FromStream(m_stream);
|
||||
if (chunkId->EqualsTo(m_emptyChunk)) // End reached
|
||||
break;
|
||||
|
||||
// Read up to a 64 bit number for the chunk size
|
||||
__int64 chunkSize = LEB128::ReadLong(m_stream);
|
||||
|
||||
// Try loading chunk content
|
||||
bool chunkRecognized = false;
|
||||
int startPos = m_stream->GetCurrentPosition();
|
||||
|
||||
chunkRecognized = func(chunkId, chunkSize, arg);
|
||||
int readDataCount = m_stream->GetCurrentPosition() - startPos;
|
||||
|
||||
// Adjust _stream position if necessary
|
||||
if (readDataCount != chunkSize)
|
||||
m_stream->Seek(chunkSize - readDataCount, SeekOrigin::CURRENT);
|
||||
} while (true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
char* ChunkReader::ReadChunkArrayOfBytes(__int64 length) {
|
||||
char* value = (char*)malloc(length);
|
||||
m_stream->Read(value, length);
|
||||
return value;
|
||||
}
|
||||
|
||||
bool ChunkReader::ReadChunkBool(__int64 length) {
|
||||
return (LEB128::ReadByte(m_stream) != 0);
|
||||
}
|
||||
|
||||
__int64 ChunkReader::ReadChunkLong(__int64 length) {
|
||||
return LEB128::ReadLong(m_stream);
|
||||
}
|
||||
|
||||
int ChunkReader::ReadChunkInt32(__int64 length) {
|
||||
return LEB128::ReadInt32(m_stream);
|
||||
}
|
||||
|
||||
unsigned int ChunkReader::ReadChunkUInt32(__int64 length) {
|
||||
return LEB128::ReadUInt32(m_stream);
|
||||
}
|
||||
|
||||
short ChunkReader::ReadChunkInt16(__int64 length) {
|
||||
return LEB128::ReadInt16(m_stream);
|
||||
}
|
||||
|
||||
unsigned short ChunkReader::ReadChunkUInt16(__int64 length) {
|
||||
return LEB128::ReadUInt16(m_stream);
|
||||
}
|
||||
|
||||
byte ChunkReader::ReadChunkByte(__int64 length) {
|
||||
return LEB128::ReadByte(m_stream);
|
||||
}
|
||||
|
||||
char* ChunkReader::ReadChunkString(long length) {
|
||||
char* value = (char*)malloc(length);
|
||||
memcpy(value, LevelDataPtr, length);
|
||||
return value;
|
||||
}
|
||||
|
||||
BaseStream* ChunkReader::GetRawStream() {
|
||||
return m_stream;
|
||||
}
|
|
@ -3,7 +3,6 @@
|
|||
#include "LEB128.h"
|
||||
#include "Streams.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class ChunkReader
|
||||
{
|
||||
|
@ -12,154 +11,38 @@ private:
|
|||
ChunkId* m_emptyChunk = nullptr;
|
||||
BaseStream* m_stream = nullptr;
|
||||
|
||||
int readInt32()
|
||||
{
|
||||
int value = 0;
|
||||
m_stream->Read(reinterpret_cast<char *>(&value), 4);
|
||||
return value;
|
||||
}
|
||||
int readInt32();
|
||||
|
||||
short readInt16()
|
||||
{
|
||||
short value = 0;
|
||||
m_stream->Read(reinterpret_cast<char *>(&value), 2);
|
||||
return value;
|
||||
}
|
||||
short readInt16();
|
||||
|
||||
public:
|
||||
ChunkReader(int expectedMagicNumber, BaseStream* stream)
|
||||
{
|
||||
m_isValid = false;
|
||||
ChunkReader(int expectedMagicNumber, BaseStream* stream);
|
||||
|
||||
if (stream == NULL)
|
||||
return;
|
||||
~ChunkReader();
|
||||
|
||||
m_stream = stream;
|
||||
bool IsValid();
|
||||
|
||||
// Check the magic number
|
||||
int magicNumber = readInt32();
|
||||
if (magicNumber != expectedMagicNumber)
|
||||
return;
|
||||
bool ReadChunks(bool(*func)(ChunkId* parentChunkId, int maxSize, int arg), int arg);
|
||||
|
||||
// TODO: future use for compression
|
||||
m_stream->Seek(4, SeekOrigin::CURRENT);
|
||||
m_emptyChunk = new ChunkId(NULL, 0);
|
||||
m_isValid = true;
|
||||
}
|
||||
bool ReadChunks(std::function<bool(ChunkId*, long, int)> func, int arg);
|
||||
|
||||
~ChunkReader()
|
||||
{
|
||||
delete m_emptyChunk;
|
||||
}
|
||||
char* ReadChunkArrayOfBytes(__int64 length);
|
||||
|
||||
bool IsValid()
|
||||
{
|
||||
return m_isValid;
|
||||
}
|
||||
bool ReadChunkBool(__int64 length);
|
||||
|
||||
bool ReadChunks(bool(*func)(ChunkId* parentChunkId, int maxSize, int arg), int arg)
|
||||
{
|
||||
do
|
||||
{
|
||||
ChunkId* chunkId = ChunkId::FromStream(m_stream);
|
||||
if (chunkId->EqualsTo(m_emptyChunk)) // End reached
|
||||
break;
|
||||
__int64 ReadChunkLong(__int64 length);
|
||||
|
||||
// Read up to a 64 bit number for the chunk size
|
||||
__int64 chunkSize = LEB128::ReadLong(m_stream);
|
||||
int ReadChunkInt32(__int64 length);
|
||||
|
||||
// Try loading chunk content
|
||||
bool chunkRecognized = false;
|
||||
int startPos = m_stream->GetCurrentPosition();
|
||||
unsigned int ReadChunkUInt32(__int64 length);
|
||||
|
||||
chunkRecognized = func(chunkId, chunkSize, arg);
|
||||
int readDataCount = m_stream->GetCurrentPosition() - startPos;
|
||||
short ReadChunkInt16(__int64 length);
|
||||
|
||||
// Adjust _stream position if necessary
|
||||
if (readDataCount != chunkSize)
|
||||
m_stream->Seek(chunkSize - readDataCount, SeekOrigin::CURRENT);
|
||||
} while (true);
|
||||
unsigned short ReadChunkUInt16(__int64 length);
|
||||
|
||||
return true;
|
||||
}
|
||||
byte ReadChunkByte(__int64 length);
|
||||
|
||||
bool ReadChunks(std::function<bool(ChunkId*, long, int)> func, int arg)
|
||||
{
|
||||
do
|
||||
{
|
||||
ChunkId* chunkId = ChunkId::FromStream(m_stream);
|
||||
if (chunkId->EqualsTo(m_emptyChunk)) // End reached
|
||||
break;
|
||||
char* ReadChunkString(long length);
|
||||
|
||||
// Read up to a 64 bit number for the chunk size
|
||||
__int64 chunkSize = LEB128::ReadLong(m_stream);
|
||||
|
||||
// Try loading chunk content
|
||||
bool chunkRecognized = false;
|
||||
int startPos = m_stream->GetCurrentPosition();
|
||||
|
||||
chunkRecognized = func(chunkId, chunkSize, arg);
|
||||
int readDataCount = m_stream->GetCurrentPosition() - startPos;
|
||||
|
||||
// Adjust _stream position if necessary
|
||||
if (readDataCount != chunkSize)
|
||||
m_stream->Seek(chunkSize - readDataCount, SeekOrigin::CURRENT);
|
||||
} while (true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
char* ReadChunkArrayOfBytes(__int64 length)
|
||||
{
|
||||
char* value = (char*)malloc(length);
|
||||
m_stream->Read(value, length);
|
||||
return value;
|
||||
}
|
||||
|
||||
bool ReadChunkBool(__int64 length)
|
||||
{
|
||||
return (LEB128::ReadByte(m_stream) != 0);
|
||||
}
|
||||
|
||||
__int64 ReadChunkLong(__int64 length)
|
||||
{
|
||||
return LEB128::ReadLong(m_stream);
|
||||
}
|
||||
|
||||
int ReadChunkInt32(__int64 length)
|
||||
{
|
||||
return LEB128::ReadInt32(m_stream);
|
||||
}
|
||||
|
||||
unsigned int ReadChunkUInt32(__int64 length)
|
||||
{
|
||||
return LEB128::ReadUInt32(m_stream);
|
||||
}
|
||||
|
||||
short ReadChunkInt16(__int64 length)
|
||||
{
|
||||
return LEB128::ReadInt16(m_stream);
|
||||
}
|
||||
|
||||
unsigned short ReadChunkUInt16(__int64 length)
|
||||
{
|
||||
return LEB128::ReadUInt16(m_stream);
|
||||
}
|
||||
|
||||
byte ReadChunkByte(__int64 length)
|
||||
{
|
||||
return LEB128::ReadByte(m_stream);
|
||||
}
|
||||
|
||||
char* ReadChunkString(long length)
|
||||
{
|
||||
char* value = (char*)malloc(length);
|
||||
memcpy(value, LevelDataPtr, length);
|
||||
return value;
|
||||
}
|
||||
|
||||
BaseStream* GetRawStream()
|
||||
{
|
||||
return m_stream;
|
||||
}
|
||||
BaseStream* GetRawStream();
|
||||
};
|
||||
|
|
234
TR5Main/Specific/IO/Streams.cpp
Normal file
234
TR5Main/Specific/IO/Streams.cpp
Normal file
|
@ -0,0 +1,234 @@
|
|||
#include "framework.h"
|
||||
#include "Streams.h"
|
||||
using std::ios;
|
||||
using std::string;
|
||||
using std::ifstream;
|
||||
using std::fstream;
|
||||
using std::ofstream;
|
||||
bool BaseStream::ReadBytes(byte* value, int length) {
|
||||
return Read(reinterpret_cast<char*>(value), length);
|
||||
}
|
||||
|
||||
bool BaseStream::ReadByte(byte* value) {
|
||||
return Read(reinterpret_cast<char*>(value), 1);
|
||||
}
|
||||
|
||||
bool BaseStream::ReadBool(bool* value) {
|
||||
return Read(reinterpret_cast<char*>(value), 1);
|
||||
}
|
||||
|
||||
bool BaseStream::ReadInt16(short* value) {
|
||||
return Read(reinterpret_cast<char*>(value), 2);
|
||||
}
|
||||
|
||||
bool BaseStream::ReadInt32(int* value) {
|
||||
return Read(reinterpret_cast<char*>(value), 4);
|
||||
}
|
||||
|
||||
bool BaseStream::ReadFloat(float* value) {
|
||||
return Read(reinterpret_cast<char*>(value), 4);
|
||||
}
|
||||
|
||||
bool BaseStream::ReadString(char** value) {
|
||||
int length;
|
||||
ReadInt32(&length);
|
||||
*value = (char*)malloc(length + 1);
|
||||
Read(*value, length);
|
||||
(*value)[length] = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::ReadString(string* value) {
|
||||
int length;
|
||||
ReadInt32(&length);
|
||||
char* buffer = (char*)malloc(length + 1);
|
||||
Read(buffer, length);
|
||||
buffer[length] = NULL;
|
||||
*value = string(buffer);
|
||||
free(buffer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::ReadVector2(Vector2* value) {
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::ReadVector3(Vector3* value) {
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
ReadFloat(&value->z);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::ReadVector4(Vector4* value) {
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
ReadFloat(&value->z);
|
||||
ReadFloat(&value->w);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::ReadQuaternion(Quaternion* value) {
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
ReadFloat(&value->z);
|
||||
ReadFloat(&value->w);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::ReadBoundingBox(BoundingBox* value) {
|
||||
Vector3 minPos;
|
||||
Vector3 maxPos;
|
||||
|
||||
ReadVector3(&minPos);
|
||||
ReadVector3(&maxPos);
|
||||
|
||||
BoundingBox::CreateFromPoints(*value, minPos, maxPos);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::ReadBoundingSphere(BoundingSphere* sphere) {
|
||||
Vector3 center;
|
||||
float radius;
|
||||
|
||||
ReadVector3(¢er);
|
||||
ReadFloat(&radius);
|
||||
|
||||
sphere->Center = center;
|
||||
sphere->Radius = radius;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseStream::WriteBytes(byte* value, int length) {
|
||||
return Write(reinterpret_cast<char*>(value), length);
|
||||
}
|
||||
|
||||
bool BaseStream::WriteByte(byte value) {
|
||||
return Write(reinterpret_cast<char*>(&value), 1);
|
||||
}
|
||||
|
||||
bool BaseStream::WriteInt16(short value) {
|
||||
return Write(reinterpret_cast<char*>(&value), 2);
|
||||
}
|
||||
|
||||
bool BaseStream::WriteInt32(int value) {
|
||||
return Write(reinterpret_cast<char*>(&value), 4);
|
||||
}
|
||||
|
||||
bool BaseStream::WriteBool(bool value) {
|
||||
return Write(reinterpret_cast<char*>(&value), 1);
|
||||
}
|
||||
|
||||
bool BaseStream::WriteFloat(float value) {
|
||||
return Write(reinterpret_cast<char*>(&value), 4);
|
||||
}
|
||||
|
||||
bool BaseStream::WriteString(char* str) {
|
||||
int length = (int)strlen(str);
|
||||
WriteInt32(length);
|
||||
Write(str, length);
|
||||
return true;
|
||||
}
|
||||
|
||||
MemoryStream::MemoryStream(char* buffer, int size) {
|
||||
m_buffer = (char*)malloc(size);
|
||||
m_startBuffer = m_buffer;
|
||||
memcpy(m_buffer, buffer, size);
|
||||
m_size = size;
|
||||
}
|
||||
|
||||
MemoryStream::MemoryStream(int size) {
|
||||
m_buffer = (char*)malloc(size);
|
||||
m_startBuffer = m_buffer;
|
||||
m_size = size;
|
||||
}
|
||||
|
||||
MemoryStream::~MemoryStream() {
|
||||
free(m_startBuffer);
|
||||
}
|
||||
|
||||
bool MemoryStream::Read(char* buffer, int length) {
|
||||
memcpy(buffer, m_buffer, length);
|
||||
m_buffer += length;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MemoryStream::Write(char* buffer, int length) {
|
||||
memcpy(m_buffer, buffer, length);
|
||||
m_buffer += length;
|
||||
return true;
|
||||
}
|
||||
|
||||
int MemoryStream::GetCurrentPosition() {
|
||||
return (m_buffer - m_startBuffer);
|
||||
}
|
||||
|
||||
bool MemoryStream::Seek(int seek, SeekOrigin origin) {
|
||||
if (origin == SeekOrigin::BEGIN)
|
||||
m_buffer = m_startBuffer + seek;
|
||||
else
|
||||
m_buffer += seek;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MemoryStream::IsEOF() {
|
||||
return (GetCurrentPosition() > m_size);
|
||||
}
|
||||
|
||||
bool MemoryStream::Close() {
|
||||
return true;
|
||||
}
|
||||
|
||||
FileStream::FileStream(char* fileName, bool read, bool write) {
|
||||
int mode = 0;
|
||||
if (read)
|
||||
mode |= ifstream::binary | fstream::in;
|
||||
if (write)
|
||||
mode |= ofstream::binary | fstream::out | fstream::trunc;
|
||||
|
||||
m_stream.open(fileName, mode);
|
||||
bool opened = m_stream.is_open();
|
||||
}
|
||||
|
||||
FileStream::~FileStream() {
|
||||
m_stream.close();
|
||||
}
|
||||
|
||||
bool FileStream::Read(char* buffer, int length) {
|
||||
m_stream.read(buffer, length);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FileStream::Write(char* buffer, int length) {
|
||||
m_stream.write(buffer, length);
|
||||
return true;
|
||||
}
|
||||
|
||||
int FileStream::GetCurrentPosition() {
|
||||
return (int)(m_stream.tellg());
|
||||
}
|
||||
|
||||
bool FileStream::Seek(int seek, SeekOrigin origin) {
|
||||
m_stream.seekg(seek, (origin == SeekOrigin::BEGIN ? m_stream.beg : m_stream.cur));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FileStream::IsEOF() {
|
||||
return (m_stream.eof());
|
||||
}
|
||||
|
||||
bool FileStream::Close() {
|
||||
m_stream.flush();
|
||||
m_stream.close();
|
||||
return true;
|
||||
}
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
using namespace DirectX;
|
||||
using namespace DirectX::SimpleMath;
|
||||
using namespace std;
|
||||
|
||||
enum SeekOrigin {
|
||||
BEGIN,
|
||||
|
@ -26,161 +25,47 @@ public:
|
|||
virtual bool IsEOF() = 0;
|
||||
virtual bool Close() = 0;
|
||||
|
||||
bool ReadBytes(byte* value, int length)
|
||||
{
|
||||
return Read(reinterpret_cast<char*>(value), length);
|
||||
}
|
||||
bool ReadBytes(byte* value, int length);
|
||||
|
||||
bool ReadByte(byte* value)
|
||||
{
|
||||
return Read(reinterpret_cast<char*>(value), 1);
|
||||
}
|
||||
bool ReadByte(byte* value);
|
||||
|
||||
bool ReadBool(bool* value)
|
||||
{
|
||||
return Read(reinterpret_cast<char*>(value), 1);
|
||||
}
|
||||
bool ReadBool(bool* value);
|
||||
|
||||
bool ReadInt16(short* value)
|
||||
{
|
||||
return Read(reinterpret_cast<char*>(value), 2);
|
||||
}
|
||||
bool ReadInt16(short* value);
|
||||
|
||||
bool ReadInt32(int* value)
|
||||
{
|
||||
return Read(reinterpret_cast<char*>(value), 4);
|
||||
}
|
||||
bool ReadInt32(int* value);
|
||||
|
||||
bool ReadFloat(float* value)
|
||||
{
|
||||
return Read(reinterpret_cast<char*>(value), 4);
|
||||
}
|
||||
bool ReadFloat(float* value);
|
||||
|
||||
bool ReadString(char** value)
|
||||
{
|
||||
int length;
|
||||
ReadInt32(&length);
|
||||
*value = (char*)malloc(length + 1);
|
||||
Read(*value, length);
|
||||
(*value)[length] = NULL;
|
||||
bool ReadString(char** value);
|
||||
|
||||
return true;
|
||||
}
|
||||
bool ReadString(std::string* value);
|
||||
|
||||
bool ReadString(string* value)
|
||||
{
|
||||
int length;
|
||||
ReadInt32(&length);
|
||||
char* buffer = (char*)malloc(length + 1);
|
||||
Read(buffer, length);
|
||||
buffer[length] = NULL;
|
||||
*value = string(buffer);
|
||||
free(buffer);
|
||||
bool ReadVector2(Vector2* value);
|
||||
|
||||
return true;
|
||||
}
|
||||
bool ReadVector3(Vector3* value);
|
||||
|
||||
bool ReadVector2(Vector2* value)
|
||||
{
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
bool ReadVector4(Vector4* value);
|
||||
|
||||
return true;
|
||||
}
|
||||
bool ReadQuaternion(Quaternion* value);
|
||||
|
||||
bool ReadVector3(Vector3* value)
|
||||
{
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
ReadFloat(&value->z);
|
||||
bool ReadBoundingBox(BoundingBox* value);
|
||||
|
||||
return true;
|
||||
}
|
||||
bool ReadBoundingSphere(BoundingSphere* sphere);
|
||||
|
||||
bool ReadVector4(Vector4* value)
|
||||
{
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
ReadFloat(&value->z);
|
||||
ReadFloat(&value->w);
|
||||
bool WriteBytes(byte* value, int length);
|
||||
|
||||
return true;
|
||||
}
|
||||
bool WriteByte(byte value);
|
||||
|
||||
bool ReadQuaternion(Quaternion* value)
|
||||
{
|
||||
ReadFloat(&value->x);
|
||||
ReadFloat(&value->y);
|
||||
ReadFloat(&value->z);
|
||||
ReadFloat(&value->w);
|
||||
bool WriteInt16(short value);
|
||||
|
||||
return true;
|
||||
}
|
||||
bool WriteInt32(int value);
|
||||
|
||||
bool ReadBoundingBox(BoundingBox* value)
|
||||
{
|
||||
Vector3 minPos;
|
||||
Vector3 maxPos;
|
||||
bool WriteBool(bool value);
|
||||
|
||||
ReadVector3(&minPos);
|
||||
ReadVector3(&maxPos);
|
||||
bool WriteFloat(float value);
|
||||
|
||||
BoundingBox::CreateFromPoints(*value, minPos, maxPos);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReadBoundingSphere(BoundingSphere* sphere)
|
||||
{
|
||||
Vector3 center;
|
||||
float radius;
|
||||
|
||||
ReadVector3(¢er);
|
||||
ReadFloat(&radius);
|
||||
|
||||
sphere->Center = center;
|
||||
sphere->Radius = radius;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WriteBytes(byte* value, int length)
|
||||
{
|
||||
return Write(reinterpret_cast<char*>(value), length);
|
||||
}
|
||||
|
||||
bool WriteByte(byte value)
|
||||
{
|
||||
return Write(reinterpret_cast<char*>(&value), 1);
|
||||
}
|
||||
|
||||
bool WriteInt16(short value)
|
||||
{
|
||||
return Write(reinterpret_cast<char*>(&value), 2);
|
||||
}
|
||||
|
||||
bool WriteInt32(int value)
|
||||
{
|
||||
return Write(reinterpret_cast<char*>(&value), 4);
|
||||
}
|
||||
|
||||
bool WriteBool(bool value)
|
||||
{
|
||||
return Write(reinterpret_cast<char*>(&value), 1);
|
||||
}
|
||||
|
||||
bool WriteFloat(float value)
|
||||
{
|
||||
return Write(reinterpret_cast<char*>(&value), 4);
|
||||
}
|
||||
|
||||
bool WriteString(char* str)
|
||||
{
|
||||
int length = (int)strlen(str);
|
||||
WriteInt32(length);
|
||||
Write(str, length);
|
||||
return true;
|
||||
}
|
||||
bool WriteString(char* str);
|
||||
};
|
||||
|
||||
class MemoryStream : public BaseStream {
|
||||
|
@ -190,119 +75,43 @@ private:
|
|||
int m_size;
|
||||
|
||||
public:
|
||||
MemoryStream(char* buffer, int size)
|
||||
{
|
||||
m_buffer = (char*)malloc(size);
|
||||
m_startBuffer = m_buffer;
|
||||
memcpy(m_buffer, buffer, size);
|
||||
m_size = size;
|
||||
}
|
||||
MemoryStream(char* buffer, int size);
|
||||
|
||||
MemoryStream(int size)
|
||||
{
|
||||
m_buffer = (char*)malloc(size);
|
||||
m_startBuffer = m_buffer;
|
||||
m_size = size;
|
||||
}
|
||||
MemoryStream(int size);
|
||||
|
||||
~MemoryStream()
|
||||
{
|
||||
free(m_startBuffer);
|
||||
}
|
||||
~MemoryStream();
|
||||
|
||||
bool Read(char* buffer, int length)
|
||||
{
|
||||
memcpy(buffer, m_buffer, length);
|
||||
m_buffer += length;
|
||||
return true;
|
||||
}
|
||||
bool Read(char* buffer, int length);
|
||||
|
||||
bool Write(char* buffer, int length)
|
||||
{
|
||||
memcpy(m_buffer, buffer, length);
|
||||
m_buffer += length;
|
||||
return true;
|
||||
}
|
||||
bool Write(char* buffer, int length);
|
||||
|
||||
int GetCurrentPosition()
|
||||
{
|
||||
return (m_buffer - m_startBuffer);
|
||||
}
|
||||
int GetCurrentPosition();
|
||||
|
||||
bool Seek(int seek, SeekOrigin origin)
|
||||
{
|
||||
if (origin == SeekOrigin::BEGIN)
|
||||
m_buffer = m_startBuffer + seek;
|
||||
else
|
||||
m_buffer += seek;
|
||||
return true;
|
||||
}
|
||||
bool Seek(int seek, SeekOrigin origin);
|
||||
|
||||
bool IsEOF()
|
||||
{
|
||||
return (GetCurrentPosition() > m_size);
|
||||
}
|
||||
bool IsEOF();
|
||||
|
||||
bool Close()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool Close();
|
||||
};
|
||||
|
||||
class FileStream : public BaseStream {
|
||||
private:
|
||||
fstream m_stream;
|
||||
std::fstream m_stream;
|
||||
|
||||
public:
|
||||
FileStream(char* fileName, bool read, bool write)
|
||||
{
|
||||
int mode = 0;
|
||||
if (read)
|
||||
mode |= ifstream::binary | fstream::in;
|
||||
if (write)
|
||||
mode |= ofstream::binary | fstream::out | fstream::trunc;
|
||||
FileStream(char* fileName, bool read, bool write);
|
||||
|
||||
m_stream.open(fileName, mode);
|
||||
bool opened = m_stream.is_open();
|
||||
}
|
||||
~FileStream();
|
||||
|
||||
~FileStream()
|
||||
{
|
||||
m_stream.close();
|
||||
}
|
||||
bool Read(char* buffer, int length);
|
||||
|
||||
bool Read(char* buffer, int length)
|
||||
{
|
||||
m_stream.read(buffer, length);
|
||||
return true;
|
||||
}
|
||||
bool Write(char* buffer, int length);
|
||||
|
||||
bool Write(char* buffer, int length)
|
||||
{
|
||||
m_stream.write(buffer, length);
|
||||
return true;
|
||||
}
|
||||
int GetCurrentPosition();
|
||||
|
||||
int GetCurrentPosition()
|
||||
{
|
||||
return (int)(m_stream.tellg());
|
||||
}
|
||||
bool Seek(int seek, SeekOrigin origin);
|
||||
|
||||
bool Seek(int seek, SeekOrigin origin)
|
||||
{
|
||||
m_stream.seekg(seek, (origin == SeekOrigin::BEGIN ? m_stream.beg : m_stream.cur));
|
||||
return true;
|
||||
}
|
||||
bool IsEOF();
|
||||
|
||||
bool IsEOF()
|
||||
{
|
||||
return (m_stream.eof());
|
||||
}
|
||||
|
||||
bool Close()
|
||||
{
|
||||
m_stream.flush();
|
||||
m_stream.close();
|
||||
return true;
|
||||
}
|
||||
bool Close();
|
||||
};
|
|
@ -7,7 +7,7 @@
|
|||
#include "GameFlowScript.h"
|
||||
#include "configuration.h"
|
||||
#include "sound.h"
|
||||
|
||||
using std::vector;
|
||||
extern GameFlow* g_GameFlow;
|
||||
GameConfiguration g_Configuration;
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
#include "sound.h"
|
||||
#include "levelloader.h"
|
||||
#include "GameFlowScript.h"
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
ChunkId* ChunkTriggersList = ChunkId::FromString("Tr5Triggers");
|
||||
ChunkId* ChunkTrigger = ChunkId::FromString("Tr5Trigger");
|
||||
ChunkId* ChunkLuaIds = ChunkId::FromString("Tr5LuaIds");
|
||||
|
|
|
@ -113,7 +113,7 @@ extern int g_NumSpritesSequences;
|
|||
extern short* MeshBase;
|
||||
extern short** Meshes;
|
||||
extern int NumItems;
|
||||
extern vector<OBJECT_TEXTURE> ObjectTextures;
|
||||
extern std::vector<OBJECT_TEXTURE> ObjectTextures;
|
||||
extern ITEM_INFO* Items;
|
||||
extern int LevelItems;
|
||||
extern std::vector<ROOM_INFO> Rooms;
|
||||
|
@ -129,10 +129,10 @@ extern int nAIObjects;
|
|||
extern AIOBJECT* AIObjects;
|
||||
extern SPRITE* Sprites;
|
||||
|
||||
extern vector<TEXTURE> RoomTextures;
|
||||
extern vector<TEXTURE> MoveablesTextures;
|
||||
extern vector<TEXTURE> StaticsTextures;
|
||||
extern vector<TEXTURE> SpritesTextures;
|
||||
extern std::vector<TEXTURE> RoomTextures;
|
||||
extern std::vector<TEXTURE> MoveablesTextures;
|
||||
extern std::vector<TEXTURE> StaticsTextures;
|
||||
extern std::vector<TEXTURE> SpritesTextures;
|
||||
extern TEXTURE MiscTextures;
|
||||
|
||||
extern TrLevel g_Level;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "ChunkReader.h"
|
||||
#include "level.h"
|
||||
#include <Specific\setup.h>
|
||||
|
||||
using std::string;
|
||||
LevelLoader::LevelLoader(string filename)
|
||||
{
|
||||
m_filename = filename;
|
||||
|
|
|
@ -6,7 +6,7 @@ struct TEXTURE
|
|||
int width;
|
||||
int height;
|
||||
int size;
|
||||
vector<byte> data;
|
||||
std::vector<byte> data;
|
||||
};
|
||||
|
||||
struct TrTexturePage
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
#include "level.h"
|
||||
#include "configuration.h"
|
||||
#include "Renderer11.h"
|
||||
|
||||
using std::exception;
|
||||
using std::string;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
WINAPP App;
|
||||
unsigned int ThreadID;
|
||||
uintptr_t ThreadHandle;
|
||||
|
|
|
@ -47,14 +47,14 @@
|
|||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(ProjectDir)..\Build\</OutDir>
|
||||
<ExecutablePath>$(ExecutablePath);$(DXSDK_DIR)Utilities\bin\x86</ExecutablePath>
|
||||
<IncludePath>$(SolutionDir)TR5Main\Libs\bass;$(SolutionDir)TR5Main\Libs\lua;$(SolutionDir)TR5Main\Libs\sol2;$(SolutionDir)\TR5Main\Libs\zlib;$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir)TR5Main\Libs\bass;$(SolutionDir)TR5Main\Libs\lua;$(SolutionDir)TR5Main\Libs\sol;$(SolutionDir)\TR5Main\Libs\zlib;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)TR5Main\Libs\zlib\dll32;$(LibraryPath);$(DXSDK_DIR)Lib\x86;$(SolutionDir)TR5Main\Libs\bass;$(SolutionDir)TR5Main\Libs\lua</LibraryPath>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<ExecutablePath>$(ExecutablePath);$(DXSDK_DIR)Utilities\bin\x86</ExecutablePath>
|
||||
<IncludePath>$(SolutionDir)TR5Main\Libs\bass;$(SolutionDir)TR5Main\Libs\lua;$(SolutionDir)TR5Main\Libs\sol2;$(SolutionDir)\TR5Main\Libs\zlib;$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir)TR5Main\Libs\bass;$(SolutionDir)TR5Main\Libs\lua;$(SolutionDir)TR5Main\Libs\sol;$(SolutionDir)\TR5Main\Libs\zlib;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)TR5Main\Libs\zlib\dll32;$(LibraryPath);$(DXSDK_DIR)Lib\x86;$(SolutionDir)TR5Main\Libs\bass;$(SolutionDir)TR5Main\Libs\lua</LibraryPath>
|
||||
<OutDir>$(ProjectDir)..\Build\</OutDir>
|
||||
</PropertyGroup>
|
||||
|
@ -71,7 +71,7 @@
|
|||
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<PrecompiledHeaderFile>framework.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -105,7 +105,7 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts"</Command>
|
|||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<PrecompiledHeaderFile>framework.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -617,6 +617,9 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts"</Command>
|
|||
<ClCompile Include="Specific\configuration.cpp" />
|
||||
<ClCompile Include="Specific\Init.cpp" />
|
||||
<ClCompile Include="Specific\input.cpp" />
|
||||
<ClCompile Include="Specific\IO\ChunkId.cpp" />
|
||||
<ClCompile Include="Specific\IO\ChunkReader.cpp" />
|
||||
<ClCompile Include="Specific\IO\Streams.cpp" />
|
||||
<ClCompile Include="Specific\level.cpp" />
|
||||
<ClCompile Include="Specific\levelloader.cpp" />
|
||||
<ClCompile Include="Specific\setup.cpp" />
|
||||
|
|
|
@ -1493,6 +1493,15 @@
|
|||
<ClCompile Include="Renderer\RenderTarget2D.cpp">
|
||||
<Filter>File di origine</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Specific\IO\Streams.cpp">
|
||||
<Filter>File di origine</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Specific\IO\ChunkId.cpp">
|
||||
<Filter>File di origine</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Specific\IO\ChunkReader.cpp">
|
||||
<Filter>File di origine</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue