Skip to content

Commit

Permalink
Delete unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Nov 4, 2015
1 parent 9d51bc3 commit d9e6913
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 2,167 deletions.
39 changes: 0 additions & 39 deletions src/utils/xrAI/alife_artefact_order.cpp

This file was deleted.

25 changes: 0 additions & 25 deletions src/utils/xrAI/alife_artefact_order.h

This file was deleted.

92 changes: 0 additions & 92 deletions src/utils/xrAI/buffer_vector.cpp

This file was deleted.

73 changes: 3 additions & 70 deletions src/utils/xrAI/compiler.cpp
Original file line number Diff line number Diff line change
@@ -1,58 +1,14 @@
#include "stdafx.h"
#include "compiler.h"

#include "xrCDB/Intersect.hpp"

CDB::MODEL Level;
CDB::COLLIDER XRC;

Nodes g_nodes;
xr_vector<SCover> g_covers_palette;

Lights g_lights;
SAIParams g_params;
Fbox LevelBB;
//Vectors Emitters;

void vertex::PointLF(Fvector& D)
{
Fvector d; d.set(0,-1,0);
Fvector v = Pos;
float s = g_params.fPatchSize/2;
v.x -= s;
v.z += s;
Plane.intersectRayPoint(v,d,D);
}

void vertex::PointFR(Fvector& D)
{
Fvector d; d.set(0,-1,0);
Fvector v = Pos;
float s = g_params.fPatchSize/2;
v.x += s;
v.z += s;
Plane.intersectRayPoint(v,d,D);
}

void vertex::PointRB(Fvector& D)
{
Fvector d; d.set(0,-1,0);
Fvector v = Pos;
float s = g_params.fPatchSize/2;
v.x += s;
v.z -= s;
Plane.intersectRayPoint(v,d,D);
}

void vertex::PointBL(Fvector& D)
{
Fvector d; d.set(0,-1,0);
Fvector v = Pos;
float s = g_params.fPatchSize/2;
v.x -= s;
v.z -= s;
Plane.intersectRayPoint(v,d,D);
}

void mem_Optimize ()
{
Expand All @@ -64,36 +20,13 @@ void xrCompiler (LPCSTR name, bool draft_mode, bool pure_covers, LPCSTR out_name
{
Logger.Phase("Loading level...");
xrLoad (name,draft_mode);
mem_Optimize();

// Phase("Building nodes...");
// xrBuildNodes();
// Msg("%d nodes created",int(g_nodes.size()));
// mem_Optimize();
//
// Phase("Smoothing nodes...");
// xrSmoothNodes();
// mem_Optimize();

if (!draft_mode) {
Logger.Phase("Lighting nodes...");
xrLight ();
// xrDisplay ();
mem_Optimize();

mem_Optimize();
if (!draft_mode)
{
Logger.Phase("Calculating coverage...");
xrCover (pure_covers);
mem_Optimize();
}
/////////////////////////////////////

// Phase("Palettizing cover values...");
// xrPalettizeCovers();
// mem_Optimize();

// Phase("Visualizing nodes...");
// xrDisplay ();

Logger.Phase("Saving nodes...");
xrSaveNodes (name,out_name);
mem_Optimize();
Expand Down
19 changes: 0 additions & 19 deletions src/utils/xrAI/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ struct vertex // definition of "patch" or "node"
};

DEF_VECTOR(DWORDs,u32);
//struct NodeMerged
//{
// DWORDs neighbours; // list of neighbours
// DWORDs contains; // while merging - contains list of elementar nodes
// Fplane plane;
// Fvector P; // min
// WORD sector;
// BYTE light;
// float cover[4];
//};

#include "level_graph.h"

Expand Down Expand Up @@ -89,7 +79,6 @@ struct SCover {
};

DEF_VECTOR(Nodes,vertex );
//DEF_VECTOR(Merged,NodeMerged );
DEF_VECTOR(Vectors,Fvector );
DEF_VECTOR(Marks,BYTE );
DEF_VECTOR(Lights,R_Light );
Expand All @@ -102,7 +91,6 @@ extern SAIParams g_params;
extern CDB::MODEL Level;
extern CDB::COLLIDER XRC;
extern Fbox LevelBB;
//extern Vectors Emitters;

struct b_BuildTexture : public b_texture
{
Expand Down Expand Up @@ -137,14 +125,7 @@ extern xr_vector<b_rc_face> g_rc_faces ;

// phases
void xrLoad (LPCSTR name, bool draft_mode);
//void xrBuildNodes ();
void xrSmoothNodes ();
void xrLight ();
void xrCover (bool pure_covers);
void xrMerge ();
void xrConvertAndLink();
void xrDisplay ();
//void xrPalettizeCovers();
void xrSaveNodes (LPCSTR name, LPCSTR out_name);

// constants
Expand Down
Loading

0 comments on commit d9e6913

Please sign in to comment.