Skip to content

Commit

Permalink
Reformat the sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Feb 24, 2017
1 parent 3cc5410 commit 2b938ea
Show file tree
Hide file tree
Showing 5,300 changed files with 197,337 additions and 175,758 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions src/Common/Compiler.inl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#endif

#if defined(__GNUC__)
#define XR_EXPORT __attribute__ ((visibility("default")))
#define XR_IMPORT __attribute__ ((visibility("default")))
#define XR_EXPORT __attribute__((visibility("default")))
#define XR_IMPORT __attribute__((visibility("default")))
#elif defined(_MSC_VER)
#define XR_EXPORT __declspec(dllexport)
#define XR_IMPORT __declspec(dllimport)
Expand Down
6 changes: 4 additions & 2 deletions src/Common/GUID.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ class xrGUID
public:
u64 g[2];

ICF bool operator==(const xrGUID& that) const { return g[0] == that.g[0] && g[1] == that.g[1]; }
ICF bool operator==(const xrGUID& that) const
{ return g[0]==that.g[0] && g[1]==that.g[1]; }

ICF bool operator!=(const xrGUID& that) const { return !(*this == that); }
ICF bool operator!=(const xrGUID& that) const
{ return !(*this==that); }

ICF void LoadLTX(CInifile& ini, const char* section, const char* name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Common/LevelGameDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ enum EWayType
};

enum ERPpointType
{ // [0..255]
{ // [0..255]
rptActorSpawn = 0,
rptArtefactSpawn,
rptItemSpawn,
Expand Down
38 changes: 16 additions & 22 deletions src/Common/LevelStructure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@

enum fsL_Chunks
{
fsL_HEADER = 1, //*
fsL_SHADERS = 2, //*
fsL_VISUALS = 3, //*
fsL_PORTALS = 4, //* - Portal polygons
fsL_LIGHT_DYNAMIC = 6, //*
fsL_GLOWS = 7, //* - All glows inside level
fsL_SECTORS = 8, //* - All sectors on level
fsL_VB = 9, //* - Static geometry
fsL_IB = 10, //*
fsL_SWIS = 11, //* - collapse info, usually for trees
fsL_HEADER = 1, //*
fsL_SHADERS = 2, //*
fsL_VISUALS = 3, //*
fsL_PORTALS = 4, //* - Portal polygons
fsL_LIGHT_DYNAMIC = 6, //*
fsL_GLOWS = 7, //* - All glows inside level
fsL_SECTORS = 8, //* - All sectors on level
fsL_VB = 9, //* - Static geometry
fsL_IB = 10, //*
fsL_SWIS = 11, //* - collapse info, usually for trees
fsL_forcedword = 0xFFFFFFFF
};

enum fsESectorChunks
{
fsP_Portals = 1, // - portal polygons
fsP_Root = 2, // - geometry root
fsP_Portals = 1, // - portal polygons
fsP_Root = 2, // - geometry root
fsP_forcedword = u32(-1)
};

enum fsSLS_Chunks
{
fsSLS_Description = 1, // Name of level
fsSLS_Description = 1, // Name of level
fsSLS_ServerState = 2,
fsSLS_forcedword = u32(-1)
};
Expand Down Expand Up @@ -73,15 +73,12 @@ class NodePosition
u8 data[5];

ICF void xz(u32 value) { CopyMemory(data, &value, 3); }

ICF void y(u16 value) { CopyMemory(data + 3, &value, 2); }

public:
ICF u32 xz() const { return ((*((u32*)data)) & 0x00ffffff); }
ICF u32 x(u32 row) const { return (xz() / row); }
ICF u32 z(u32 row) const { return (xz() % row); }
ICF u32 y() const { return (*((u16*)(data + 3))); }

friend class CLevelGraph;
friend struct CNodePositionCompressor;
friend struct CNodePositionConverter;
Expand Down Expand Up @@ -121,7 +118,6 @@ struct NodeCompressed
}

ICF void light(u8 value) { data[10] |= value << 4; }

public:
struct SCover
{
Expand Down Expand Up @@ -209,7 +205,6 @@ struct NodeCompressed6
}

ICF void light(u8 value) { data[10] |= value << 4; }

public:
u16 cover0 : 4;
u16 cover1 : 4;
Expand All @@ -234,7 +229,6 @@ struct NodeCompressed6
}

ICF u8 light() const { return data[10] >> 4; }

ICF u16 cover(u8 index) const
{
switch (index)
Expand All @@ -253,7 +247,7 @@ struct NodeCompressed6
friend class CLevelGraph;
friend struct CNodeCompressed;
friend class CNodeRenumberer;
}; // 2+5+2+11 = 20b
}; // 2+5+2+11 = 20b
#endif

struct SNodePositionOld
Expand All @@ -270,8 +264,8 @@ typedef SNodePositionOld NodePosition;

const char LEVEL_GRAPH_NAME[] = "level.ai";

const u32 XRCL_CURRENT_VERSION = 18; // input
const u32 XRCL_PRODUCTION_VERSION = 14; // output
const u32 XRCL_CURRENT_VERSION = 18; // input
const u32 XRCL_PRODUCTION_VERSION = 14; // output
const u32 CFORM_CURRENT_VERSION = 4;
const u32 MAX_NODE_BIT_COUNT = 23;
const u32 XRAI_CURRENT_VERSION = 10;
Loading

0 comments on commit 2b938ea

Please sign in to comment.