diff --git a/SQCSim2021.sln b/SQCSim2021.sln
index a4beb16..13eae87 100644
--- a/SQCSim2021.sln
+++ b/SQCSim2021.sln
@@ -1,31 +1,20 @@

-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.31624.102
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SQCSim2021", "SQCSim2021\SQCSim2021.vcxproj", "{90AE3964-E572-47EC-A7FB-B550481DC822}"
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mcclone", "mcclone\mcclone.vcxproj", "{A21FD938-1FEA-4687-AB86-0EABAC30877B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|x64 = Release|x64
- Release|x86 = Release|x86
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x64.ActiveCfg = Debug|x64
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x64.Build.0 = Debug|x64
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x86.ActiveCfg = Debug|Win32
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Debug|x86.Build.0 = Debug|Win32
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x64.ActiveCfg = Release|x64
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x64.Build.0 = Release|x64
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x86.ActiveCfg = Release|Win32
- {90AE3964-E572-47EC-A7FB-B550481DC822}.Release|x86.Build.0 = Release|Win32
+ {A21FD938-1FEA-4687-AB86-0EABAC30877B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A21FD938-1FEA-4687-AB86-0EABAC30877B}.Debug|Win32.Build.0 = Debug|Win32
+ {A21FD938-1FEA-4687-AB86-0EABAC30877B}.Release|Win32.ActiveCfg = Release|Win32
+ {A21FD938-1FEA-4687-AB86-0EABAC30877B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {422CB8A4-C8D4-44CC-9478-D867DE3AFFDA}
- EndGlobalSection
EndGlobal
diff --git a/SQCSim2021/SQCSim2021.vcxproj b/SQCSim2021/SQCSim2021.vcxproj
deleted file mode 100644
index 35d96b4..0000000
--- a/SQCSim2021/SQCSim2021.vcxproj
+++ /dev/null
@@ -1,160 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- 16.0
- Win32Proj
- {90ae3964-e572-47ec-a7fb-b550481dc822}
- SQCSim2021
- 10.0
-
-
-
- Application
- true
- v142
- Unicode
-
-
- Application
- false
- v142
- true
- Unicode
-
-
- Application
- true
- v142
- Unicode
-
-
- Application
- false
- v142
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
-
-
- true
-
-
- false
-
-
-
- Level3
- true
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
- true
- true
-
-
-
-
- Level3
- true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SQCSim2021/SQCSim2021.vcxproj.filters b/SQCSim2021/SQCSim2021.vcxproj.filters
deleted file mode 100644
index f06cd67..0000000
--- a/SQCSim2021/SQCSim2021.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SQCSim2021/blockarray3d.cpp b/SQCSim2021/blockarray3d.cpp
deleted file mode 100644
index 78b866a..0000000
--- a/SQCSim2021/blockarray3d.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "blockarray3d.h"
-
-BlockArray3d::BlockArray3d(int x, int y, int z) : m_x(x), m_y(y), m_z(z) {
- m_blocks = new BlockType[x * y * z];
- Reset(BTYPE_AIR);
-}
-
-BlockArray3d::BlockArray3d(BlockArray3d& ba) : m_x(ba.m_x), m_y(ba.m_y), m_z(ba.m_z) {
- m_blocks = new BlockType[ba.m_x*ba.m_y*ba.m_z];
-
- for (int index = 0; index < (m_x * m_y * m_z); ++index)
- m_blocks[index] = ba.m_blocks[index];
-}
-
-BlockArray3d::~BlockArray3d() { delete[] m_blocks; }
-
-void BlockArray3d::Set(int x, int y, int z, BlockType type) { m_blocks[GetPosition(x, y, z)] = type; }
-
-BlockType BlockArray3d::Get(int x, int y, int z) const { return m_blocks[GetPosition(x, y, z)]; }
-
-void BlockArray3d::Reset(BlockType type) {
- for (int index = 0; index < (m_x * m_y * m_z); ++index)
- m_blocks[index] = type;
-}
-
-int BlockArray3d::GetPosition(int x, int y, int z) const { return x + (z * m_x) + (y * m_z * m_x); }
diff --git a/SQCSim2021/blockarray3d.h b/SQCSim2021/blockarray3d.h
deleted file mode 100644
index f169cf2..0000000
--- a/SQCSim2021/blockarray3d.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef BLOCKARRAY3D_H__
-#define BLOCKARRAY3D_H__
-
-#include "define.h"
-
-class BlockArray3d {
-public:
- BlockArray3d(int x, int y, int z);
- BlockArray3d(BlockArray3d& ba);
- virtual ~BlockArray3d();
-
- void Set(int x, int y, int z, BlockType type);
- BlockType Get(int x, int y, int z) const;
- void Reset(BlockType type);
-
-private:
- BlockType* m_blocks;
- int m_x;
- int m_y;
- int m_z;
-
- int GetPosition(int x, int y, int z) const;
-};
-#endif
\ No newline at end of file
diff --git a/SQCSim2021/blockinfo.cpp b/SQCSim2021/blockinfo.cpp
deleted file mode 100644
index 9205100..0000000
--- a/SQCSim2021/blockinfo.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "blockinfo.h"
-
-BlockInfo::BlockInfo(BlockType type, const std::string& name): m_name(name), m_type(type) { m_durability = 0; }
-
-BlockInfo::~BlockInfo() { }
-
-BlockType BlockInfo::GetType() const { return m_type; }
-
-void BlockInfo::SetDurability(int durability) { m_durability = durability; }
-
-int BlockInfo::GetDurability() const { return m_durability; }
-
-void BlockInfo::Show() const { std::cout << "Name: " << m_name << "; Type " << m_type << "; Durability: " << m_durability << std::endl; }
diff --git a/SQCSim2021/blockinfo.h b/SQCSim2021/blockinfo.h
deleted file mode 100644
index 9ef279f..0000000
--- a/SQCSim2021/blockinfo.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef BLOCKINFO_H__
-#define BLOCKINFO_H__
-
-#include "define.h"
-
-class BlockInfo {
-public:
- BlockInfo(BlockType type, const std::string& name);
- ~BlockInfo();
-
- BlockType GetType() const;
-
- void SetDurability(int durability);
- int GetDurability() const;
- void Show() const;
-
-private:
- std::string m_name;
- int m_durability;
- BlockType m_type;
-};
-#endif
-
diff --git a/SQCSim2021/chunk.cpp b/SQCSim2021/chunk.cpp
deleted file mode 100644
index 579e355..0000000
--- a/SQCSim2021/chunk.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "chunk.h"
-
-Chunk::Chunk(): BlockArray3d(CHUNK_SIZE_X, CHUNK_SIZE_Y, CHUNK_SIZE_Z) {}
-
-Chunk::Chunk(Chunk& chk) : BlockArray3d(chk) {}
-
-Chunk::~Chunk() {}
-
-void Chunk::RemoveBlock(int x, int y, int z) { Set(x, y, z, BTYPE_AIR); }
-
-void Chunk::SetBlock(int x, int y, int z, BlockType type) { Set(x, y, z, type); }
-
-BlockType Chunk::GetBlock(int x, int y, int z) const { return Get(x, y, z); }
diff --git a/SQCSim2021/chunk.h b/SQCSim2021/chunk.h
deleted file mode 100644
index 4045b1a..0000000
--- a/SQCSim2021/chunk.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef CHUNK_H__
-#define CHUNK_H__
-
-#include "define.h"
-#include "blockarray3d.h"
-
-class Chunk : public BlockArray3d {
-public:
- Chunk();
- Chunk(Chunk& chk);
- virtual ~Chunk();
-
- void RemoveBlock(int x, int y, int z);
- void SetBlock(int x, int y, int z, BlockType type);
- BlockType GetBlock(int x, int y, int z) const;
-
-};
-
-#endif
-
diff --git a/SQCSim2021/define.h b/SQCSim2021/define.h
deleted file mode 100644
index d4413d5..0000000
--- a/SQCSim2021/define.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef DEFINE_H__
-#define DEFINE_H__
-
-#include
-#include
-
-#define CHUNK_SIZE_X 16
-#define CHUNK_SIZE_Y 128
-#define CHUNK_SIZE_Z 16
-
-enum BlockType {
- BTYPE_AIR,
- BTYPE_DIRT,
- BTYPE_GRASS
-};
-
-#endif
diff --git a/SQCSim2021/main.cpp b/SQCSim2021/main.cpp
deleted file mode 100644
index 920ebbf..0000000
--- a/SQCSim2021/main.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "main.h"
-
-int main() {
-
- Chunk* testchunk = new Chunk();
- std::vector testblock;
-
- std::cout << "-Test 1-------BlockInfo------------------" << std::endl;
-
- testblock.push_back(new BlockInfo(BTYPE_AIR, "The air in the sky"));
- testblock.push_back(new BlockInfo(BTYPE_DIRT, "The dirt on the ground"));
- testblock.push_back(new BlockInfo(BTYPE_GRASS, "The grass on the dirt"));
-
- testblock[1]->SetDurability(5);
- testblock[2]->SetDurability(6);
-
- for (int index = 0; index < testblock.size(); ++index)
- testblock[index]->Show();
-
- std::cout << "GetDurability: " << testblock[0]->GetDurability() << " and " << testblock[1]->GetDurability() << " and " << testblock[2]->GetDurability() << std::endl;
- std::cout << "GetType: " << testblock[0]->GetType() << " and " << testblock[1]->GetType() << " and " << testblock[2]->GetType() << std::endl;
-
- std::cout << std::endl;
- std::cout << "-Test 2--------Chunk/BlockArray3D---------" << std::endl;
- testchunk->SetBlock(1, 0, 0, BTYPE_DIRT);
- testchunk->SetBlock(2, 0, 0, BTYPE_GRASS);
- testblock.push_back(new BlockInfo(testchunk->GetBlock(0, 0, 0), "A new block in the chunk"));
- testblock.push_back(new BlockInfo(testchunk->GetBlock(1, 0, 0), "A dirty block in the chunk"));
- testblock.push_back(new BlockInfo(testchunk->GetBlock(2, 0, 0), "A grassy block in the chunk"));
-
- for (int index = 3; index < testblock.size(); ++index)
- testblock[index]->Show();
-
- std::cout << std::endl;
- std::cout << "-Test 3--------Chunk Copy------------------" << std::endl;
- Chunk testchunkcopy(*testchunk);
-
- delete testchunk;
-
- testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(0, 0, 0), "A block in a copied chunk"));
- testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(1, 0, 0), "A dirty block in a copied chunk"));
- testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(1, 0, 0), "A grassy block in a copied chunk"));
-
- for (int index = 6; index < testblock.size(); ++index)
- testblock[index]->Show();
-
- std::cout << std::endl;
- std::cout << "-Test 3--------Chunk Reset/Remove Block-----" << std::endl;
- testchunkcopy.Reset(BTYPE_GRASS);
- testchunkcopy.RemoveBlock(3, 0, 0);
- testchunkcopy.SetBlock(4, 0, 0, BTYPE_DIRT);
-
- testblock.clear();
-
- for (int index = 0; index < 10; ++index)
- testblock.push_back(new BlockInfo(testchunkcopy.GetBlock(index, 0, 0), "A block in a reset chunk containing lots of grass"));
-
- for (int index = 0; index < testblock.size(); ++index)
- testblock[index]->Show();
-
- testblock.clear();
-
- return 0;
-}
diff --git a/SQCSim2021/main.h b/SQCSim2021/main.h
deleted file mode 100644
index e124f29..0000000
--- a/SQCSim2021/main.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef MAIN_H__
-#define MAIN_H__
-
-#include
-
-#include "define.h"
-#include "chunk.h"
-#include "blockinfo.h"
-
-#endif
-
diff --git a/mcclone/Makefile b/mcclone/Makefile
new file mode 100644
index 0000000..5d1cc75
--- /dev/null
+++ b/mcclone/Makefile
@@ -0,0 +1,64 @@
+SRCS = $(wildcard *.cpp)
+OBJS = $(SRCS:.cpp=.o)
+BINFILE = ./mcclone
+CC = g++
+
+COMPILER_FLAGS = -I/usr/X11R6/include -I/usr/local/include -I./external/noise/include -I./external/enet-1.3.1/include -finline-functions -std=c++11
+LINKER_FLAGS = -lm -L/usr/X11R6/lib -L/usr/local/lib -lGL -lGLU -lpthread -lsfml-graphics -lsfml-window -lsfml-system -lsndfile -lopenal -lsfml-audio -lXrandr -lIL -lILU -lX11 -ldl -lGLEW
+
+# Release:
+#CFLAGS = -O3 -fomit-frame-pointer -ffast-math -w $(COMPILER_FLAGS)
+#LFLAGS = $(LINKER_FLAGS)
+
+# Debug:
+CFLAGS = -g -W -Wall $(COMPILER_FLAGS) -Wno-write-strings -Wno-unused-parameter -Wno-switch -Wno-reorder -DDEBUGMODE -DDEBUG
+LFLAGS = $(LINKER_FLAGS)
+
+# Profiling:
+#CFLAGS = -pg -W -Wall $(COMPILER_FLAGS) -Wno-write-strings
+#LFLAGS = -pg $(LINKER_FLAGS)
+
+all : $(BINFILE)
+
+$(BINFILE) : $(OBJS)
+ @echo Linking to $(BINFILE)...
+ @$(CC) $(OBJS) -o $(BINFILE) $(LFLAGS)
+
+%.o : %.cpp
+ @echo CC $@
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+%.o : %.cc
+ @echo CC $@
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+%.o : %.C
+ @echo CC $@
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+%.o : %.cxx
+ @echo CC $@
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+strip:
+ @strip $(BINFILE)
+
+clean:
+ @rm -f Makefile.bak
+ @rm -f $(OBJS)
+ @rm -f gmon.out
+ @rm -f profiler_output.txt
+ @rm -f $(BINFILE)
+
+depend:
+ @$(CC) -MM $(CFLAGS) $(SRCS) > Makefile.dep
+ @make -s clean
+
+info:
+ @echo SRCS: $(SRCS)
+ @echo OBJS: $(OBJS)
+ @echo $(BINFILE)
+
+
+include Makefile.dep
+
diff --git a/mcclone/blockarray3d.cpp b/mcclone/blockarray3d.cpp
new file mode 100644
index 0000000..fe12b35
--- /dev/null
+++ b/mcclone/blockarray3d.cpp
@@ -0,0 +1,41 @@
+#include "blockarray3d.h"
+
+BlockArray3d::BlockArray3d(int x, int y, int z) : m_x(x), m_y(y), m_z(z)
+{
+ m_blocks = new BlockType[m_x * m_y * m_z];
+
+ Reset(BTYPE_AIR);
+}
+
+BlockArray3d::~BlockArray3d()
+{
+ delete [] m_blocks;
+}
+
+BlockArray3d::BlockArray3d(const BlockArray3d& array) : m_x(array.m_x), m_y(array.m_y), m_z(array.m_z)
+{
+ m_blocks = new BlockType[m_x * m_y * m_z];
+ for(int i = 0; i < m_x * m_y * m_z; ++i)
+ m_blocks[i] = array.m_blocks[i];
+}
+
+void BlockArray3d::Set(int x, int y, int z, BlockType type)
+{
+ m_blocks[To1dIndex(x, y, z)] = type;
+}
+
+BlockType BlockArray3d::Get(int x, int y, int z) const
+{
+ return m_blocks[To1dIndex(x, y, z)];
+}
+
+void BlockArray3d::Reset(BlockType type)
+{
+ for(int i = 0; i < m_x * m_y * m_z; ++i)
+ m_blocks[i] = type;
+}
+
+int BlockArray3d::To1dIndex(int x, int y, int z) const
+{
+ return x + (z * m_x) + (y * m_z * m_x);
+}
diff --git a/mcclone/blockarray3d.h b/mcclone/blockarray3d.h
new file mode 100644
index 0000000..818eef3
--- /dev/null
+++ b/mcclone/blockarray3d.h
@@ -0,0 +1,26 @@
+#ifndef BLOCKARRAY3D_H__
+#define BLOCKARRAY3D_H__
+
+#include "define.h"
+
+class BlockArray3d
+{
+ public:
+ BlockArray3d(int x, int y, int z);
+ ~BlockArray3d();
+ BlockArray3d(const BlockArray3d& array);
+
+ void Set(int x, int y, int z, BlockType type);
+ BlockType Get(int x, int y, int z) const;
+
+ void Reset(BlockType type);
+
+ private:
+ int To1dIndex(int x, int y, int z) const;
+
+ private:
+ int m_x, m_y, m_z;
+ BlockType* m_blocks;
+};
+
+#endif // BLOCKARRAY3D_H__
diff --git a/mcclone/blockinfo.cpp b/mcclone/blockinfo.cpp
new file mode 100644
index 0000000..e4670b7
--- /dev/null
+++ b/mcclone/blockinfo.cpp
@@ -0,0 +1,34 @@
+#include "blockinfo.h"
+#include
+
+BlockInfo::BlockInfo(BlockType type, const std::string& name) : m_type(type), m_name(name), m_durability(1)
+{
+}
+
+BlockInfo::~BlockInfo()
+{
+}
+
+BlockType BlockInfo::GetType() const
+{
+ return m_type;
+}
+
+void BlockInfo::SetDurability(int durability)
+{
+ m_durability = durability;
+}
+
+int BlockInfo::GetDurability() const
+{
+ return m_durability;
+}
+
+void BlockInfo::Show() const
+{
+ std::cout << "Type: " << m_type << std::endl;
+ std::cout << "Nom: " << m_name << std::endl;
+ std::cout << "Durabilite: " << m_durability << std::endl;
+}
+
+
diff --git a/mcclone/blockinfo.h b/mcclone/blockinfo.h
new file mode 100644
index 0000000..3b6c880
--- /dev/null
+++ b/mcclone/blockinfo.h
@@ -0,0 +1,27 @@
+#ifndef BLOCKINFO_H__
+#define BLOCKINFO_H__
+
+#include
+#include "define.h"
+
+class BlockInfo
+{
+ public:
+ BlockInfo(BlockType type, const std::string& name);
+ ~BlockInfo();
+
+ BlockType GetType() const;
+
+ void SetDurability(int durability);
+ int GetDurability() const;
+
+ void Show() const;
+
+ private:
+ BlockType m_type;
+ std::string m_name;
+ int m_durability;
+
+};
+
+#endif // BLOCKINFO_H__
diff --git a/mcclone/chunk.cpp b/mcclone/chunk.cpp
new file mode 100644
index 0000000..32b8fcb
--- /dev/null
+++ b/mcclone/chunk.cpp
@@ -0,0 +1,25 @@
+#include "chunk.h"
+
+Chunk::Chunk() : BlockArray3d(CHUNK_SIZE_X, CHUNK_SIZE_Y, CHUNK_SIZE_Z)
+{
+}
+
+Chunk::~Chunk()
+{
+}
+
+void Chunk::RemoveBlock(int x, int y, int z)
+{
+ Set(x, y, z, BTYPE_AIR);
+}
+
+void Chunk::SetBlock(int x, int y, int z, BlockType type)
+{
+ Set(x, y, z, type);
+}
+
+BlockType Chunk::GetBlock(int x, int y, int z)
+{
+ return Get(x, y, z);
+}
+
diff --git a/mcclone/chunk.h b/mcclone/chunk.h
new file mode 100644
index 0000000..46030e5
--- /dev/null
+++ b/mcclone/chunk.h
@@ -0,0 +1,16 @@
+#ifndef CHUNK_H__
+#define CHUNK_H__
+#include "blockarray3d.h"
+
+class Chunk : public BlockArray3d
+{
+ public:
+ Chunk();
+ ~Chunk();
+
+ void RemoveBlock(int x, int y, int z);
+ void SetBlock(int x, int y, int z, BlockType type);
+ BlockType GetBlock(int x, int y, int z);
+};
+
+#endif // CHUNK_H__
diff --git a/mcclone/define.h b/mcclone/define.h
new file mode 100644
index 0000000..1b1f83c
--- /dev/null
+++ b/mcclone/define.h
@@ -0,0 +1,25 @@
+#ifndef DEFINE_H__
+#define DEFINE_H__
+
+#include
+#include
+
+#ifdef _WIN32
+#include
+#include
+#include
+#else
+#include
+#endif
+
+#define CHUNK_SIZE_X 16
+#define CHUNK_SIZE_Y 128
+#define CHUNK_SIZE_Z 16
+
+enum BlockType {BTYPE_AIR, BTYPE_DIRT, BTYPE_GRASS};
+
+
+#define TEXTURE_PATH "../mcclone/media/textures/"
+#define VIEW_DISTANCE 128
+
+#endif // DEFINE_H__
diff --git a/mcclone/engine.cpp b/mcclone/engine.cpp
new file mode 100644
index 0000000..74aa6b5
--- /dev/null
+++ b/mcclone/engine.cpp
@@ -0,0 +1,189 @@
+#include "engine.h"
+#include
+#include
+#include
+
+Engine::Engine()
+{
+}
+
+Engine::~Engine()
+{
+}
+
+void Engine::Init()
+{
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+ glEnable(GL_TEXTURE_2D);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ gluPerspective(45.0f, (float)Width() / (float)Height(), 0.0001f, 1000.0f);
+ glEnable(GL_DEPTH_TEST);
+ glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+ glShadeModel(GL_SMOOTH);
+ glEnable(GL_LIGHTING);
+ glEnable(GL_LINE_SMOOTH);
+
+ // Light
+ GLfloat light0Pos[4] = { 0.0f, CHUNK_SIZE_Y, 0.0f, 1.0f };
+ GLfloat light0Amb[4] = { 0.9f, 0.9f, 0.9f, 1.0f };
+ GLfloat light0Diff[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
+ GLfloat light0Spec[4] = { 0.2f, 0.2f, 0.2f, 1.0f };
+
+ glEnable(GL_LIGHT0);
+ glLightfv(GL_LIGHT0, GL_POSITION, light0Pos);
+ glLightfv(GL_LIGHT0, GL_AMBIENT, light0Amb);
+ glLightfv(GL_LIGHT0, GL_DIFFUSE, light0Diff);
+ glLightfv(GL_LIGHT0, GL_SPECULAR, light0Spec);
+
+ CenterMouse();
+ HideCursor();
+}
+
+void Engine::DeInit()
+{
+}
+
+void Engine::LoadResource()
+{
+ LoadTexture(m_textureFloor, TEXTURE_PATH "checker.png");
+}
+
+void Engine::UnloadResource()
+{
+}
+
+void Engine::Render(float elapsedTime)
+{
+ static float gameTime = elapsedTime;
+
+ gameTime += elapsedTime;
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ // Transformations initiales
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
+ // Plancher
+ // Les vertex doivent etre affiches dans le sens anti-horaire (CCW)
+ m_textureFloor.Bind();
+ float nbRep = 50.f;
+ glBegin(GL_QUADS);
+ glNormal3f(0, 1, 0); // Normal vector
+ glTexCoord2f(0, 0);
+ glVertex3f(-100.f, -2.f, 100.f);
+ glTexCoord2f(nbRep, 0);
+ glVertex3f(100.f, -2.f, 100.f);
+ glTexCoord2f(nbRep, nbRep);
+ glVertex3f(100.f, -2.f, -100.f);
+ glTexCoord2f(0, nbRep);
+ glVertex3f(-100.f, -2.f, -100.f);
+ glEnd();
+}
+
+void Engine::KeyPressEvent(unsigned char key)
+{
+ switch(key)
+ {
+ case 36: // ESC
+ Stop();
+ break;
+ case 94: // F10
+ SetFullscreen(!IsFullscreen());
+ break;
+ case 22: // W
+ if (!m_keyW) {
+ std::cout << "W " << (int)key << std::endl;
+ m_keyW = true;
+ }
+ break;
+ case 0: // A
+ if (!m_keyA) {
+ std::cout << "A " << (int)key << std::endl;
+ m_keyA = true;
+ }
+ break;
+ case 18: // S
+ if (!m_keyS) {
+ std::cout << "S " << (int)key << std::endl;
+ m_keyS = true;
+ }
+ break;
+ case 3: // D
+ if (!m_keyD) {
+ std::cout << "D " << (int)key << std::endl;
+ m_keyD = true;
+ }
+ break;
+ default:
+ std::cout << "Unhandled key: " << (int)key << std::endl;
+ }
+}
+
+void Engine::KeyReleaseEvent(unsigned char key)
+{
+ switch(key)
+ {
+ case 24: // Y
+ m_wireframe = !m_wireframe;
+ if(m_wireframe)
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ else
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ break;
+ case 22: // W
+ std::cout << "rW " << (int)key << std::endl;
+ m_keyW = false;
+ break;
+ case 0: // A
+ std::cout << "rA " << (int)key << std::endl;
+ m_keyA = false;
+ break;
+ case 18: // S
+ std::cout << "rS " << (int)key << std::endl;
+ m_keyS = false;
+ break;
+ case 3: // D
+ std::cout << "rD " << (int)key << std::endl;
+ m_keyD = false;
+ break;
+ }
+}
+
+void Engine::MouseMoveEvent(int x, int y)
+{
+ // Centrer la souris seulement si elle n'est pas déjà centrée
+ // Il est nécessaire de faire la vérification pour éviter de tomber
+ // dans une boucle infinie où l'appel à CenterMouse génère un
+ // MouseMoveEvent, qui rapelle CenterMouse qui rapelle un autre
+ // MouseMoveEvent, etc
+ if(x == (Width() / 2) && y == (Height() / 2))
+ return;
+
+ CenterMouse();
+}
+
+void Engine::MousePressEvent(const MOUSE_BUTTON& button, int x, int y)
+{
+}
+
+void Engine::MouseReleaseEvent(const MOUSE_BUTTON& button, int x, int y)
+{
+}
+
+bool Engine::LoadTexture(Texture& texture, const std::string& filename, bool stopOnError)
+{
+ texture.Load(filename);
+ if(!texture.IsValid())
+ {
+ std::cerr << "Unable to load texture (" << filename << ")" << std::endl;
+ if(stopOnError)
+ Stop();
+
+ return false;
+ }
+
+ return true;
+}
diff --git a/mcclone/engine.h b/mcclone/engine.h
new file mode 100644
index 0000000..43b8d2b
--- /dev/null
+++ b/mcclone/engine.h
@@ -0,0 +1,37 @@
+#ifndef ENGINE_H__
+#define ENGINE_H__
+#include "define.h"
+#include "openglcontext.h"
+#include "texture.h"
+
+class Engine : public OpenglContext
+{
+public:
+ Engine();
+ virtual ~Engine();
+ virtual void Init();
+ virtual void DeInit();
+ virtual void LoadResource();
+ virtual void UnloadResource();
+ virtual void Render(float elapsedTime);
+ virtual void KeyPressEvent(unsigned char key);
+ virtual void KeyReleaseEvent(unsigned char key);
+ virtual void MouseMoveEvent(int x, int y);
+ virtual void MousePressEvent(const MOUSE_BUTTON &button, int x, int y);
+ virtual void MouseReleaseEvent(const MOUSE_BUTTON &button, int x, int y);
+
+private:
+ bool LoadTexture(Texture& texture, const std::string& filename, bool stopOnError = true);
+
+private:
+ bool m_wireframe = false;
+
+ Texture m_textureFloor;
+
+ bool m_keyW = false;
+ bool m_keyA = false;
+ bool m_keyS = false;
+ bool m_keyD = false;
+};
+
+#endif // ENGINE_H__
diff --git a/mcclone/external/devil178/include/IL/config.h b/mcclone/external/devil178/include/IL/config.h
new file mode 100644
index 0000000..b9fe5dc
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/config.h
@@ -0,0 +1,140 @@
+/* include/IL/config.h. Generated by configure. */
+/* include/IL/config.h.in. Generated from configure.in by autoheader. */
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#define IL_USE_PRAGMA_LIBS
+
+// Supported image formats (IL)
+
+// #define IL_NO_BLP
+// #define IL_NO_BMP
+// #define IL_NO_CUT
+// #define IL_NO_CHEAD
+// #define IL_NO_DCX
+// #define IL_NO_DDS
+// #define IL_NO_DICOM
+// #define IL_NO_DOOM
+// #define IL_NO_EXR
+// #define IL_NO_FITS
+// #define IL_NO_FTX
+// #define IL_NO_GIF
+// #define IL_NO_HDR
+// #define IL_NO_ICO
+// #define IL_NO_ICNS
+// #define IL_NO_IWI
+// #define IL_NO_JP2
+// #define IL_NO_JPG
+// #define IL_NO_LCMS
+// #define IL_NO_LIF
+// #define IL_NO_MDL
+// #define IL_NO_MNG
+// #define IL_NO_PCD
+// #define IL_NO_PCX
+// #define IL_NO_PIC
+// #define IL_NO_PIX
+// #define IL_NO_PNG
+// #define IL_NO_PNM
+// #define IL_NO_PSD
+// #define IL_NO_PSP
+// #define IL_NO_PXR
+// #define IL_NO_RAW
+// #define IL_NO_ROT
+// #define IL_NO_SGI
+// #define IL_NO_SUN
+// #define IL_NO_TGA
+// #define IL_NO_TIF
+// #define IL_NO_TPL
+// #define IL_NO_WAL
+// #define IL_NO_WDP
+// #define IL_NO_XPM
+#define IL_USE_JPEGLIB_UNMODIFIED 1
+//#define IL_USE_DXTC_NVIDIA
+#define IL_USE_DXTC_SQUISH
+
+/* Supported api (ilut) */
+
+
+//
+// sorry just
+// cant get this one to work under windows
+// have disabled for the now
+//
+// will look at it some more later
+//
+// Kriss
+//
+#undef ILUT_USE_ALLEGRO
+
+#undef ILUT_USE_DIRECTX8
+//#define ILUT_USE_DIRECTX9
+//#define ILUT_USE_DIRECTX10
+//#define ILUT_USE_OPENGL
+//#define ILUT_USE_SDL
+//#define ILUT_USE_WIN32
+
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_UNISTD_H 1
+
+/* Name of package */
+#define IL_PACKAGE "DevIL"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define IL_PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define IL_PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define IL_PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define IL_PACKAGE_VERSION ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+//#define IL_VERSION "1.7.3"
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* If using Mac OS X uncomment this line */
+/* #include "macconfig.h" */
+
+/* Define to 1 if the X Window System is missing or not being used. */
+/* #undef X_DISPLAY_MISSING */
+#endif /* __CONFIG_H__ */
diff --git a/mcclone/external/devil178/include/IL/config.h.win b/mcclone/external/devil178/include/IL/config.h.win
new file mode 100644
index 0000000..659f4ca
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/config.h.win
@@ -0,0 +1,79 @@
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#define IL_USE_PRAGMA_LIBS // Links to only the libraries that are requested.
+#define IL_INLINE_ASM 1 // Define if you can support at least some ASM
+
+// Supported images formats (IL)
+
+// #define IL_NO_BLP
+// #define IL_NO_BMP
+// #define IL_NO_CUT
+// #define IL_NO_CHEAD
+// #define IL_NO_DCX
+// #define IL_NO_DDS
+// #define IL_NO_DICOM
+// #define IL_NO_DOOM
+// #define IL_NO_EXR
+// #define IL_NO_FITS
+// #define IL_NO_FTX
+// #define IL_NO_GIF
+// #define IL_NO_HDR
+// #define IL_NO_ICO
+// #define IL_NO_ICNS
+// #define IL_NO_IWI
+// #define IL_NO_JP2
+// #define IL_NO_JPG
+// #define IL_NO_LCMS
+// #define IL_NO_LIF
+// #define IL_NO_MDL
+// #define IL_NO_MNG
+// #define IL_NO_PCD
+// #define IL_NO_PCX
+// #define IL_NO_PIC
+// #define IL_NO_PIX
+// #define IL_NO_PNG
+// #define IL_NO_PNM
+// #define IL_NO_PSD
+// #define IL_NO_PSP
+// #define IL_NO_PXR
+// #define IL_NO_RAW
+// #define IL_NO_ROT
+// #define IL_NO_SGI
+// #define IL_NO_SUN
+// #define IL_NO_TGA
+// #define IL_NO_TIF
+// #define IL_NO_TPL
+// #define IL_NO_WAL
+// #define IL_NO_WDP
+// #define IL_NO_XPM
+
+#define IL_USE_JPEGLIB_UNMODIFIED 1
+#define IL_USE_DXTC_NVIDIA
+#define IL_USE_DXTC_SQUISH
+
+//#define IL_NO_GAMES
+
+/* Supported api (ilut) */
+
+
+//
+// sorry just
+// cant get this one to work under windows
+// have disabled for the now
+//
+// will look at it some more later
+//
+// Kriss
+//
+#undef ILUT_USE_ALLEGRO
+
+#undef ILUT_USE_DIRECTX8
+#define ILUT_USE_DIRECTX9
+#define ILUT_USE_DIRECTX10
+#define ILUT_USE_OPENGL
+#define ILUT_USE_SDL
+#define ILUT_USE_WIN32
+
+
+#endif /* __CONFIG_H__ */
diff --git a/mcclone/external/devil178/include/IL/devil_internal_exports.h b/mcclone/external/devil178/include/IL/devil_internal_exports.h
new file mode 100644
index 0000000..30b7aaa
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/devil_internal_exports.h
@@ -0,0 +1,161 @@
+//-----------------------------------------------------------------------------
+//
+// ImageLib Sources
+// Copyright (C) 2000-2009 by Denton Woods
+// Last modified: 01/06/2009
+//
+// Filename: IL/devil_internal_exports.h
+//
+// Description: Internal stuff for DevIL (IL, ILU and ILUT)
+//
+//-----------------------------------------------------------------------------
+
+#ifndef IL_EXPORTS_H
+#define IL_EXPORTS_H
+
+#include "IL/il.h"
+
+#ifdef DEBUG
+ #include
+#else
+ #define assert(x)
+#endif
+
+//#ifndef NOINLINE
+#ifndef INLINE
+#if defined(__GNUC__)
+ #define INLINE extern inline
+#elif defined(_MSC_VER) //@TODO: Get this working in MSVC++.
+ // http://www.greenend.org.uk/rjk/2003/03/inline.html
+ #define NOINLINE
+ //#define INLINE
+ /*#ifndef _WIN64 // Cannot use inline assembly in x64 target platform.
+ #define USE_WIN32_ASM
+ #endif//_WIN64*/
+ #define INLINE __inline
+#else
+ #define INLINE inline
+#endif
+#endif
+//#else
+//#define INLINE
+//#endif //NOINLINE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define IL_MAX(a,b) (((a) > (b)) ? (a) : (b))
+#define IL_MIN(a,b) (((a) < (b)) ? (a) : (b))
+
+
+//! Basic Palette struct
+typedef struct ILpal
+{
+ ILubyte* Palette; //!< the image palette (if any)
+ ILuint PalSize; //!< size of the palette (in bytes)
+ ILenum PalType; //!< the palette types in il.h (0x0500 range)
+} ILpal;
+
+
+//! The Fundamental Image structure
+/*! Every bit of information about an image is stored in this internal structure.*/
+typedef struct ILimage
+{
+ ILuint Width; //!< the image's width
+ ILuint Height; //!< the image's height
+ ILuint Depth; //!< the image's depth
+ ILubyte Bpp; //!< bytes per pixel (now number of channels)
+ ILubyte Bpc; //!< bytes per channel
+ ILuint Bps; //!< bytes per scanline (components for IL)
+ ILubyte* Data; //!< the image data
+ ILuint SizeOfData; //!< the total size of the data (in bytes)
+ ILuint SizeOfPlane; //!< SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes)
+ ILenum Format; //!< image format (in IL enum style)
+ ILenum Type; //!< image type (in IL enum style)
+ ILenum Origin; //!< origin of the image
+ ILpal Pal; //!< palette details
+ ILuint Duration; //!< length of the time to display this "frame"
+ ILenum CubeFlags; //!< cube map flags for sides present in chain
+ struct ILimage* Mipmaps; //!< mipmapped versions of this image terminated by a NULL - usu. NULL
+ struct ILimage* Next; //!< next image in the chain - usu. NULL
+ struct ILimage* Faces; //!< next cubemap face in the chain - usu. NULL
+ struct ILimage* Layers; //!< subsequent layers in the chain - usu. NULL
+ ILuint* AnimList; //!< animation list
+ ILuint AnimSize; //!< animation list size
+ void* Profile; //!< colour profile
+ ILuint ProfileSize; //!< colour profile size
+ ILuint OffX; //!< x-offset of the image
+ ILuint OffY; //!< y-offset of the image
+ ILubyte* DxtcData; //!< compressed data
+ ILenum DxtcFormat; //!< compressed data format
+ ILuint DxtcSize; //!< compressed data size
+} ILimage;
+
+
+// Memory functions
+ILAPI void* ILAPIENTRY ialloc(const ILsizei Size);
+ILAPI void ILAPIENTRY ifree(const void *Ptr);
+ILAPI void* ILAPIENTRY icalloc(const ILsizei Size, const ILsizei Num);
+#ifdef ALTIVEC_GCC
+ILAPI void* ILAPIENTRY ivec_align_buffer(void *buffer, const ILuint size);
+#endif
+
+// Internal library functions in IL
+ILAPI ILimage* ILAPIENTRY ilGetCurImage(void);
+ILAPI void ILAPIENTRY ilSetCurImage(ILimage *Image);
+ILAPI void ILAPIENTRY ilSetError(ILenum Error);
+ILAPI void ILAPIENTRY ilSetPal(ILpal *Pal);
+
+//
+// Utility functions
+//
+ILAPI ILubyte ILAPIENTRY ilGetBppFormat(ILenum Format);
+ILAPI ILenum ILAPIENTRY ilGetFormatBpp(ILubyte Bpp);
+ILAPI ILubyte ILAPIENTRY ilGetBpcType(ILenum Type);
+ILAPI ILenum ILAPIENTRY ilGetTypeBpc(ILubyte Bpc);
+ILAPI ILubyte ILAPIENTRY ilGetBppPal(ILenum PalType);
+ILAPI ILenum ILAPIENTRY ilGetPalBaseType(ILenum PalType);
+ILAPI ILuint ILAPIENTRY ilNextPower2(ILuint Num);
+ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
+ILAPI void ILAPIENTRY ilReplaceCurImage(ILimage *Image);
+ILAPI void ILAPIENTRY iMemSwap(ILubyte *, ILubyte *, const ILuint);
+
+//
+// Image functions
+//
+ILAPI void ILAPIENTRY iBindImageTemp (void);
+ILAPI ILboolean ILAPIENTRY ilClearImage_ (ILimage *Image);
+ILAPI void ILAPIENTRY ilCloseImage (ILimage *Image);
+ILAPI void ILAPIENTRY ilClosePal (ILpal *Palette);
+ILAPI ILpal* ILAPIENTRY iCopyPal (void);
+ILAPI ILboolean ILAPIENTRY ilCopyImageAttr (ILimage *Dest, ILimage *Src);
+ILAPI ILimage* ILAPIENTRY ilCopyImage_ (ILimage *Src);
+ILAPI void ILAPIENTRY ilGetClear (void *Colours, ILenum Format, ILenum Type);
+ILAPI ILuint ILAPIENTRY ilGetCurName (void);
+ILAPI ILboolean ILAPIENTRY ilIsValidPal (ILpal *Palette);
+ILAPI ILimage* ILAPIENTRY ilNewImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
+ILAPI ILimage* ILAPIENTRY ilNewImageFull (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
+ILAPI ILboolean ILAPIENTRY ilInitImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
+ILAPI ILboolean ILAPIENTRY ilResizeImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
+ILAPI ILboolean ILAPIENTRY ilTexImage_ (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
+ILAPI ILboolean ILAPIENTRY ilTexSubImage_ (ILimage *Image, void *Data);
+ILAPI void* ILAPIENTRY ilConvertBuffer (ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILpal *SrcPal, void *Buffer);
+ILAPI ILimage* ILAPIENTRY iConvertImage (ILimage *Image, ILenum DestFormat, ILenum DestType);
+ILAPI ILpal* ILAPIENTRY iConvertPal (ILpal *Pal, ILenum DestFormat);
+ILAPI ILubyte* ILAPIENTRY iGetFlipped (ILimage *Image);
+ILAPI ILboolean ILAPIENTRY iMirror();
+ILAPI void ILAPIENTRY iFlipBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num);
+ILubyte* iFlipNewBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num);
+ILAPI void ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param);
+
+// Internal library functions in ILU
+ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle);
+ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
+ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif//IL_EXPORTS_H
diff --git a/mcclone/external/devil178/include/IL/il.h b/mcclone/external/devil178/include/IL/il.h
new file mode 100644
index 0000000..540a56e
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/il.h
@@ -0,0 +1,644 @@
+//-----------------------------------------------------------------------------
+//
+// ImageLib Sources
+// Copyright (C) 2000-2009 by Denton Woods
+// Last modified: 03/07/2009
+//
+// Filename: IL/il.h
+//
+// Description: The main include file for DevIL
+//
+//-----------------------------------------------------------------------------
+
+// Doxygen comment
+/*! \file il.h
+ The main include file for DevIL
+*/
+
+#ifndef __il_h_
+#ifndef __IL_H__
+
+#define __il_h_
+#define __IL_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//this define controls if floats and doubles are clampled to [0..1]
+//during conversion. It takes a little more time, but it is the correct
+//way of doing this. If you are sure your floats are always valid,
+//you can undefine this value...
+#define CLAMP_HALF 1
+#define CLAMP_FLOATS 1
+#define CLAMP_DOUBLES 1
+
+/*#ifdef _WIN32_WCE
+ #define IL_NO_EXR
+ #define IL_NO_GIF
+ #define IL_NO_JP2
+ #define IL_NO_JPG
+ #define IL_NO_MNG
+ #define IL_NO_PNG
+ #define IL_NO_TIF
+ #define IL_NO_LCMS
+#endif //_WIN32_WCE
+
+#ifdef DJGPP
+ #define IL_NO_EXR
+ #define IL_NO_GIF
+ #define IL_NO_JP2
+ #define IL_NO_JPG
+ #define IL_NO_MNG
+ #define IL_NO_PNG
+ #define IL_NO_TIF
+ #define IL_NO_LCMS
+#endif //DJGPP*/
+
+#ifdef _WIN32
+ #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ #pragma comment(lib, "DevIL.lib")
+ #endif
+ #endif
+#endif
+
+#ifdef RESTRICT_KEYWORD
+#define RESTRICT restrict
+#define CONST_RESTRICT const restrict
+#else
+#define RESTRICT
+#define CONST_RESTRICT const
+#endif
+
+#include
+
+typedef unsigned int ILenum;
+typedef unsigned char ILboolean;
+typedef unsigned int ILbitfield;
+typedef signed char ILbyte;
+typedef signed short ILshort;
+typedef int ILint;
+typedef size_t ILsizei;
+typedef unsigned char ILubyte;
+typedef unsigned short ILushort;
+typedef unsigned int ILuint;
+typedef float ILfloat;
+typedef float ILclampf;
+typedef double ILdouble;
+typedef double ILclampd;
+
+#ifdef _MSC_VER
+typedef __int64 ILint64;
+typedef unsigned __int64 ILuint64;
+#else
+typedef long long int ILint64;
+typedef long long unsigned int ILuint64;
+#endif
+
+
+#include
+#ifdef _UNICODE
+ #ifndef _WIN32_WCE
+ #include
+ #endif
+ //if we use a define instead of a typedef,
+ //ILconst_string works as intended
+ #define ILchar wchar_t
+ #define ILstring wchar_t*
+ #define ILconst_string wchar_t const *
+#else
+ //if we use a define instead of a typedef,
+ //ILconst_string works as intended
+ #define ILchar char
+ #define ILstring char*
+ #define ILconst_string char const *
+#endif //_UNICODE
+
+#define IL_FALSE 0
+#define IL_TRUE 1
+
+// Matches OpenGL's right now.
+//! Data formats \link Formats Formats\endlink
+#define IL_COLOUR_INDEX 0x1900
+#define IL_COLOR_INDEX 0x1900
+#define IL_ALPHA 0x1906
+#define IL_RGB 0x1907
+#define IL_RGBA 0x1908
+#define IL_BGR 0x80E0
+#define IL_BGRA 0x80E1
+#define IL_LUMINANCE 0x1909
+#define IL_LUMINANCE_ALPHA 0x190A
+
+//! Data types \link Types Types\endlink
+#define IL_BYTE 0x1400
+#define IL_UNSIGNED_BYTE 0x1401
+#define IL_SHORT 0x1402
+#define IL_UNSIGNED_SHORT 0x1403
+#define IL_INT 0x1404
+#define IL_UNSIGNED_INT 0x1405
+#define IL_FLOAT 0x1406
+#define IL_DOUBLE 0x140A
+#define IL_HALF 0x140B
+
+
+#define IL_MAX_BYTE SCHAR_MAX
+#define IL_MAX_UNSIGNED_BYTE UCHAR_MAX
+#define IL_MAX_SHORT SHRT_MAX
+#define IL_MAX_UNSIGNED_SHORT USHRT_MAX
+#define IL_MAX_INT INT_MAX
+#define IL_MAX_UNSIGNED_INT UINT_MAX
+
+#define IL_LIMIT(x,m,M) (xM?M:x))
+#define IL_CLAMP(x) IL_LIMIT(x,0,1)
+
+#define IL_VENDOR 0x1F00
+#define IL_LOAD_EXT 0x1F01
+#define IL_SAVE_EXT 0x1F02
+
+
+//
+// IL-specific #define's
+//
+
+#define IL_VERSION_1_7_8 1
+#define IL_VERSION 178
+
+
+// Attribute Bits
+#define IL_ORIGIN_BIT 0x00000001
+#define IL_FILE_BIT 0x00000002
+#define IL_PAL_BIT 0x00000004
+#define IL_FORMAT_BIT 0x00000008
+#define IL_TYPE_BIT 0x00000010
+#define IL_COMPRESS_BIT 0x00000020
+#define IL_LOADFAIL_BIT 0x00000040
+#define IL_FORMAT_SPECIFIC_BIT 0x00000080
+#define IL_ALL_ATTRIB_BITS 0x000FFFFF
+
+
+// Palette types
+#define IL_PAL_NONE 0x0400
+#define IL_PAL_RGB24 0x0401
+#define IL_PAL_RGB32 0x0402
+#define IL_PAL_RGBA32 0x0403
+#define IL_PAL_BGR24 0x0404
+#define IL_PAL_BGR32 0x0405
+#define IL_PAL_BGRA32 0x0406
+
+
+// Image types
+#define IL_TYPE_UNKNOWN 0x0000
+#define IL_BMP 0x0420 //!< Microsoft Windows Bitmap - .bmp extension
+#define IL_CUT 0x0421 //!< Dr. Halo - .cut extension
+#define IL_DOOM 0x0422 //!< DooM walls - no specific extension
+#define IL_DOOM_FLAT 0x0423 //!< DooM flats - no specific extension
+#define IL_ICO 0x0424 //!< Microsoft Windows Icons and Cursors - .ico and .cur extensions
+#define IL_JPG 0x0425 //!< JPEG - .jpg, .jpe and .jpeg extensions
+#define IL_JFIF 0x0425 //!<
+#define IL_ILBM 0x0426 //!< Amiga IFF (FORM ILBM) - .iff, .ilbm, .lbm extensions
+#define IL_PCD 0x0427 //!< Kodak PhotoCD - .pcd extension
+#define IL_PCX 0x0428 //!< ZSoft PCX - .pcx extension
+#define IL_PIC 0x0429 //!< PIC - .pic extension
+#define IL_PNG 0x042A //!< Portable Network Graphics - .png extension
+#define IL_PNM 0x042B //!< Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions
+#define IL_SGI 0x042C //!< Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions
+#define IL_TGA 0x042D //!< TrueVision Targa File - .tga, .vda, .icb and .vst extensions
+#define IL_TIF 0x042E //!< Tagged Image File Format - .tif and .tiff extensions
+#define IL_CHEAD 0x042F //!< C-Style Header - .h extension
+#define IL_RAW 0x0430 //!< Raw Image Data - any extension
+#define IL_MDL 0x0431 //!< Half-Life Model Texture - .mdl extension
+#define IL_WAL 0x0432 //!< Quake 2 Texture - .wal extension
+#define IL_LIF 0x0434 //!< Homeworld Texture - .lif extension
+#define IL_MNG 0x0435 //!< Multiple-image Network Graphics - .mng extension
+#define IL_JNG 0x0435 //!<
+#define IL_GIF 0x0436 //!< Graphics Interchange Format - .gif extension
+#define IL_DDS 0x0437 //!< DirectDraw Surface - .dds extension
+#define IL_DCX 0x0438 //!< ZSoft Multi-PCX - .dcx extension
+#define IL_PSD 0x0439 //!< Adobe PhotoShop - .psd extension
+#define IL_EXIF 0x043A //!<
+#define IL_PSP 0x043B //!< PaintShop Pro - .psp extension
+#define IL_PIX 0x043C //!< PIX - .pix extension
+#define IL_PXR 0x043D //!< Pixar - .pxr extension
+#define IL_XPM 0x043E //!< X Pixel Map - .xpm extension
+#define IL_HDR 0x043F //!< Radiance High Dynamic Range - .hdr extension
+#define IL_ICNS 0x0440 //!< Macintosh Icon - .icns extension
+#define IL_JP2 0x0441 //!< Jpeg 2000 - .jp2 extension
+#define IL_EXR 0x0442 //!< OpenEXR - .exr extension
+#define IL_WDP 0x0443 //!< Microsoft HD Photo - .wdp and .hdp extension
+#define IL_VTF 0x0444 //!< Valve Texture Format - .vtf extension
+#define IL_WBMP 0x0445 //!< Wireless Bitmap - .wbmp extension
+#define IL_SUN 0x0446 //!< Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions
+#define IL_IFF 0x0447 //!< Interchange File Format - .iff extension
+#define IL_TPL 0x0448 //!< Gamecube Texture - .tpl extension
+#define IL_FITS 0x0449 //!< Flexible Image Transport System - .fit and .fits extensions
+#define IL_DICOM 0x044A //!< Digital Imaging and Communications in Medicine (DICOM) - .dcm and .dicom extensions
+#define IL_IWI 0x044B //!< Call of Duty Infinity Ward Image - .iwi extension
+#define IL_BLP 0x044C //!< Blizzard Texture Format - .blp extension
+#define IL_FTX 0x044D //!< Heavy Metal: FAKK2 Texture - .ftx extension
+#define IL_ROT 0x044E //!< Homeworld 2 - Relic Texture - .rot extension
+#define IL_TEXTURE 0x044F //!< Medieval II: Total War Texture - .texture extension
+#define IL_DPX 0x0450 //!< Digital Picture Exchange - .dpx extension
+#define IL_UTX 0x0451 //!< Unreal (and Unreal Tournament) Texture - .utx extension
+#define IL_MP3 0x0452 //!< MPEG-1 Audio Layer 3 - .mp3 extension
+
+
+#define IL_JASC_PAL 0x0475 //!< PaintShop Pro Palette
+
+
+// Error Types
+#define IL_NO_ERROR 0x0000
+#define IL_INVALID_ENUM 0x0501
+#define IL_OUT_OF_MEMORY 0x0502
+#define IL_FORMAT_NOT_SUPPORTED 0x0503
+#define IL_INTERNAL_ERROR 0x0504
+#define IL_INVALID_VALUE 0x0505
+#define IL_ILLEGAL_OPERATION 0x0506
+#define IL_ILLEGAL_FILE_VALUE 0x0507
+#define IL_INVALID_FILE_HEADER 0x0508
+#define IL_INVALID_PARAM 0x0509
+#define IL_COULD_NOT_OPEN_FILE 0x050A
+#define IL_INVALID_EXTENSION 0x050B
+#define IL_FILE_ALREADY_EXISTS 0x050C
+#define IL_OUT_FORMAT_SAME 0x050D
+#define IL_STACK_OVERFLOW 0x050E
+#define IL_STACK_UNDERFLOW 0x050F
+#define IL_INVALID_CONVERSION 0x0510
+#define IL_BAD_DIMENSIONS 0x0511
+#define IL_FILE_READ_ERROR 0x0512 // 05/12/2002: Addition by Sam.
+#define IL_FILE_WRITE_ERROR 0x0512
+
+#define IL_LIB_GIF_ERROR 0x05E1
+#define IL_LIB_JPEG_ERROR 0x05E2
+#define IL_LIB_PNG_ERROR 0x05E3
+#define IL_LIB_TIFF_ERROR 0x05E4
+#define IL_LIB_MNG_ERROR 0x05E5
+#define IL_LIB_JP2_ERROR 0x05E6
+#define IL_LIB_EXR_ERROR 0x05E7
+#define IL_UNKNOWN_ERROR 0x05FF
+
+
+// Origin Definitions
+#define IL_ORIGIN_SET 0x0600
+#define IL_ORIGIN_LOWER_LEFT 0x0601
+#define IL_ORIGIN_UPPER_LEFT 0x0602
+#define IL_ORIGIN_MODE 0x0603
+
+
+// Format and Type Mode Definitions
+#define IL_FORMAT_SET 0x0610
+#define IL_FORMAT_MODE 0x0611
+#define IL_TYPE_SET 0x0612
+#define IL_TYPE_MODE 0x0613
+
+
+// File definitions
+#define IL_FILE_OVERWRITE 0x0620
+#define IL_FILE_MODE 0x0621
+
+
+// Palette definitions
+#define IL_CONV_PAL 0x0630
+
+
+// Load fail definitions
+#define IL_DEFAULT_ON_FAIL 0x0632
+
+
+// Key colour and alpha definitions
+#define IL_USE_KEY_COLOUR 0x0635
+#define IL_USE_KEY_COLOR 0x0635
+#define IL_BLIT_BLEND 0x0636
+
+
+// Interlace definitions
+#define IL_SAVE_INTERLACED 0x0639
+#define IL_INTERLACE_MODE 0x063A
+
+
+// Quantization definitions
+#define IL_QUANTIZATION_MODE 0x0640
+#define IL_WU_QUANT 0x0641
+#define IL_NEU_QUANT 0x0642
+#define IL_NEU_QUANT_SAMPLE 0x0643
+#define IL_MAX_QUANT_INDEXS 0x0644 //XIX : ILint : Maximum number of colors to reduce to, default of 256. and has a range of 2-256
+#define IL_MAX_QUANT_INDICES 0x0644 // Redefined, since the above #define is misspelled
+
+
+// Hints
+#define IL_FASTEST 0x0660
+#define IL_LESS_MEM 0x0661
+#define IL_DONT_CARE 0x0662
+#define IL_MEM_SPEED_HINT 0x0665
+#define IL_USE_COMPRESSION 0x0666
+#define IL_NO_COMPRESSION 0x0667
+#define IL_COMPRESSION_HINT 0x0668
+
+
+// Compression
+#define IL_NVIDIA_COMPRESS 0x0670
+#define IL_SQUISH_COMPRESS 0x0671
+
+
+// Subimage types
+#define IL_SUB_NEXT 0x0680
+#define IL_SUB_MIPMAP 0x0681
+#define IL_SUB_LAYER 0x0682
+
+
+// Compression definitions
+#define IL_COMPRESS_MODE 0x0700
+#define IL_COMPRESS_NONE 0x0701
+#define IL_COMPRESS_RLE 0x0702
+#define IL_COMPRESS_LZO 0x0703
+#define IL_COMPRESS_ZLIB 0x0704
+
+
+// File format-specific values
+#define IL_TGA_CREATE_STAMP 0x0710
+#define IL_JPG_QUALITY 0x0711
+#define IL_PNG_INTERLACE 0x0712
+#define IL_TGA_RLE 0x0713
+#define IL_BMP_RLE 0x0714
+#define IL_SGI_RLE 0x0715
+#define IL_TGA_ID_STRING 0x0717
+#define IL_TGA_AUTHNAME_STRING 0x0718
+#define IL_TGA_AUTHCOMMENT_STRING 0x0719
+#define IL_PNG_AUTHNAME_STRING 0x071A
+#define IL_PNG_TITLE_STRING 0x071B
+#define IL_PNG_DESCRIPTION_STRING 0x071C
+#define IL_TIF_DESCRIPTION_STRING 0x071D
+#define IL_TIF_HOSTCOMPUTER_STRING 0x071E
+#define IL_TIF_DOCUMENTNAME_STRING 0x071F
+#define IL_TIF_AUTHNAME_STRING 0x0720
+#define IL_JPG_SAVE_FORMAT 0x0721
+#define IL_CHEAD_HEADER_STRING 0x0722
+#define IL_PCD_PICNUM 0x0723
+#define IL_PNG_ALPHA_INDEX 0x0724 //XIX : ILint : the color in the palette at this index value (0-255) is considered transparent, -1 for no trasparent color
+#define IL_JPG_PROGRESSIVE 0x0725
+#define IL_VTF_COMP 0x0726
+
+
+// DXTC definitions
+#define IL_DXTC_FORMAT 0x0705
+#define IL_DXT1 0x0706
+#define IL_DXT2 0x0707
+#define IL_DXT3 0x0708
+#define IL_DXT4 0x0709
+#define IL_DXT5 0x070A
+#define IL_DXT_NO_COMP 0x070B
+#define IL_KEEP_DXTC_DATA 0x070C
+#define IL_DXTC_DATA_FORMAT 0x070D
+#define IL_3DC 0x070E
+#define IL_RXGB 0x070F
+#define IL_ATI1N 0x0710
+#define IL_DXT1A 0x0711 // Normally the same as IL_DXT1, except for nVidia Texture Tools.
+
+// Environment map definitions
+#define IL_CUBEMAP_POSITIVEX 0x00000400
+#define IL_CUBEMAP_NEGATIVEX 0x00000800
+#define IL_CUBEMAP_POSITIVEY 0x00001000
+#define IL_CUBEMAP_NEGATIVEY 0x00002000
+#define IL_CUBEMAP_POSITIVEZ 0x00004000
+#define IL_CUBEMAP_NEGATIVEZ 0x00008000
+#define IL_SPHEREMAP 0x00010000
+
+
+// Values
+#define IL_VERSION_NUM 0x0DE2
+#define IL_IMAGE_WIDTH 0x0DE4
+#define IL_IMAGE_HEIGHT 0x0DE5
+#define IL_IMAGE_DEPTH 0x0DE6
+#define IL_IMAGE_SIZE_OF_DATA 0x0DE7
+#define IL_IMAGE_BPP 0x0DE8
+#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8
+#define IL_IMAGE_BPP 0x0DE8
+#define IL_IMAGE_BITS_PER_PIXEL 0x0DE9
+#define IL_IMAGE_FORMAT 0x0DEA
+#define IL_IMAGE_TYPE 0x0DEB
+#define IL_PALETTE_TYPE 0x0DEC
+#define IL_PALETTE_SIZE 0x0DED
+#define IL_PALETTE_BPP 0x0DEE
+#define IL_PALETTE_NUM_COLS 0x0DEF
+#define IL_PALETTE_BASE_TYPE 0x0DF0
+#define IL_NUM_FACES 0x0DE1
+#define IL_NUM_IMAGES 0x0DF1
+#define IL_NUM_MIPMAPS 0x0DF2
+#define IL_NUM_LAYERS 0x0DF3
+#define IL_ACTIVE_IMAGE 0x0DF4
+#define IL_ACTIVE_MIPMAP 0x0DF5
+#define IL_ACTIVE_LAYER 0x0DF6
+#define IL_ACTIVE_FACE 0x0E00
+#define IL_CUR_IMAGE 0x0DF7
+#define IL_IMAGE_DURATION 0x0DF8
+#define IL_IMAGE_PLANESIZE 0x0DF9
+#define IL_IMAGE_BPC 0x0DFA
+#define IL_IMAGE_OFFX 0x0DFB
+#define IL_IMAGE_OFFY 0x0DFC
+#define IL_IMAGE_CUBEFLAGS 0x0DFD
+#define IL_IMAGE_ORIGIN 0x0DFE
+#define IL_IMAGE_CHANNELS 0x0DFF
+
+# if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0))
+// __attribute__((deprecated)) is supported by GCC 3.1 and later.
+# define DEPRECATED(D) D __attribute__((deprecated))
+# elif defined _MSC_VER && _MSC_VER >= 1300
+// __declspec(deprecated) is supported by MSVC 7.0 and later.
+# define DEPRECATED(D) __declspec(deprecated) D
+# else
+# define DEPRECATED (D) D
+# endif
+
+//
+// Section shamelessly modified from the glut header.
+//
+
+// This is from Win32's
+#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
+ #define ILAPIENTRY __stdcall
+ #define IL_PACKSTRUCT
+//#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug 840364
+#elif defined( __GNUC__ )
+ // this should work for any of the above commented platforms
+ // plus any platform using GCC
+ #ifdef __MINGW32__
+ #define ILAPIENTRY __stdcall
+ #else
+ #define ILAPIENTRY
+ #endif
+ #define IL_PACKSTRUCT __attribute__ ((packed))
+#else
+ #define ILAPIENTRY
+ #define IL_PACKSTRUCT
+#endif
+
+// This is from Win32's and
+#if defined(__LCC__)
+ #define ILAPI __stdcall
+#elif defined(_WIN32) //changed 20031221 to fix bug 840421
+ #ifdef IL_STATIC_LIB
+ #define ILAPI
+ #else
+ #ifdef _IL_BUILD_LIBRARY
+ #define ILAPI __declspec(dllexport)
+ #else
+ #define ILAPI __declspec(dllimport)
+ #endif
+ #endif
+#elif __APPLE__
+ #define ILAPI extern
+#else
+ #define ILAPI
+#endif
+
+
+#define IL_SEEK_SET 0
+#define IL_SEEK_CUR 1
+#define IL_SEEK_END 2
+#define IL_EOF -1
+
+
+// Callback functions for file reading
+typedef void* ILHANDLE;
+typedef void (ILAPIENTRY *fCloseRProc)(ILHANDLE);
+typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE);
+typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE);
+typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (ILconst_string);
+typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE);
+typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint);
+typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE);
+
+// Callback functions for file writing
+typedef void (ILAPIENTRY *fCloseWProc)(ILHANDLE);
+typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string);
+typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE);
+typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint);
+typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE);
+typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE);
+
+// Callback functions for allocation and deallocation
+typedef void* (ILAPIENTRY *mAlloc)(const ILsizei);
+typedef void (ILAPIENTRY *mFree) (const void* CONST_RESTRICT);
+
+// Registered format procedures
+typedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string);
+typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string);
+
+
+// ImageLib Functions
+ILAPI ILboolean ILAPIENTRY ilActiveFace(ILuint Number);
+ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number);
+ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number);
+ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number);
+ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName);
+ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile);
+ILAPI void ILAPIENTRY ilBindImage(ILuint Image);
+ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth);
+ILAPI ILboolean ILAPIENTRY ilClampNTSC(void);
+ILAPI void ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
+ILAPI ILboolean ILAPIENTRY ilClearImage(void);
+ILAPI ILuint ILAPIENTRY ilCloneCurImage(void);
+ILAPI ILubyte* ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize);
+ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType);
+ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat);
+ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src);
+ILAPI ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);
+ILAPI ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num);
+ILAPI ILboolean ILAPIENTRY ilDefaultImage(void);
+ILAPI void ILAPIENTRY ilDeleteImage(const ILuint Num);
+ILAPI void ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images);
+ILAPI ILenum ILAPIENTRY ilDetermineType(ILconst_string FileName);
+ILAPI ILenum ILAPIENTRY ilDetermineTypeF(ILHANDLE File);
+ILAPI ILenum ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size);
+ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage(void);
+ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface(void);
+ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode);
+ILAPI void ILAPIENTRY ilFlipSurfaceDxtcData(void);
+ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode);
+ILAPI void ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images);
+ILAPI ILuint ILAPIENTRY ilGenImage(void);
+ILAPI ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type);
+ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode);
+ILAPI void ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param);
+ILAPI ILubyte* ILAPIENTRY ilGetData(void);
+ILAPI ILuint ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, ILenum DXTCFormat);
+ILAPI ILenum ILAPIENTRY ilGetError(void);
+ILAPI ILint ILAPIENTRY ilGetInteger(ILenum Mode);
+ILAPI void ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param);
+ILAPI ILuint ILAPIENTRY ilGetLumpPos(void);
+ILAPI ILubyte* ILAPIENTRY ilGetPalette(void);
+ILAPI ILconst_string ILAPIENTRY ilGetString(ILenum StringName);
+ILAPI void ILAPIENTRY ilHint(ILenum Target, ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha(void);
+ILAPI void ILAPIENTRY ilInit(void);
+ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format);
+ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image);
+ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName);
+ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File);
+ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size);
+ILAPI void ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
+ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName);
+ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File);
+ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName);
+ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size);
+ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName);
+ILAPI void ILAPIENTRY ilModAlpha(ILdouble AlphaValue);
+ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord);
+ILAPI void ILAPIENTRY ilPopAttrib(void);
+ILAPI void ILAPIENTRY ilPushAttrib(ILuint Bits);
+ILAPI void ILAPIENTRY ilRegisterFormat(ILenum Format);
+ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load);
+ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num);
+ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num);
+ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num);
+ILAPI void ILAPIENTRY ilRegisterOrigin(ILenum Origin);
+ILAPI void ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type);
+ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save);
+ILAPI void ILAPIENTRY ilRegisterType(ILenum Type);
+ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext);
+ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext);
+ILAPI void ILAPIENTRY ilResetMemory(void); // Deprecated
+ILAPI void ILAPIENTRY ilResetRead(void);
+ILAPI void ILAPIENTRY ilResetWrite(void);
+ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName);
+ILAPI ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File);
+ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName);
+ILAPI ILuint ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size);
+ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName);
+ILAPI ILboolean ILAPIENTRY ilSetAlpha(ILdouble AlphaValue);
+ILAPI ILboolean ILAPIENTRY ilSetData(void *Data);
+ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration);
+ILAPI void ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param);
+ILAPI void ILAPIENTRY ilSetMemory(mAlloc, mFree);
+ILAPI void ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);
+ILAPI void ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc);
+ILAPI void ILAPIENTRY ilSetString(ILenum Mode, const char *String);
+ILAPI void ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc);
+ILAPI void ILAPIENTRY ilShutDown(void);
+ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format);
+ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data);
+ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte* data);
+ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
+ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
+ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
+ILAPI ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
+ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName);
+
+// For all those weirdos that spell "colour" without the 'u'.
+#define ilClearColor ilClearColour
+#define ilKeyColor ilKeyColour
+
+#define imemclear(x,y) memset(x,0,y);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __IL_H__
+#endif // __il_h__
diff --git a/mcclone/external/devil178/include/IL/il_wrap.h b/mcclone/external/devil178/include/IL/il_wrap.h
new file mode 100644
index 0000000..5cf9b0e
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/il_wrap.h
@@ -0,0 +1,205 @@
+#ifndef WRAPPER_H
+#define WRAPPER_H
+
+/*#include
+#include */
+#include // Probably only have to #include this one
+
+#ifdef _MSC_VER
+ #ifndef _IL_WRAP_BUILD_LIB
+ #pragma comment(lib, "il_wrap.lib")
+ #endif
+#endif
+
+class ilImage
+{
+public:
+ ilImage();
+ ilImage(char *);
+ ilImage(const ilImage &);
+ virtual ~ilImage();
+
+ ILboolean Load(char *);
+ ILboolean Load(char *, ILenum);
+ ILboolean Save(char *);
+ ILboolean Save(char *, ILenum);
+
+
+ // ImageLib functions
+ ILboolean ActiveImage(ILuint);
+ ILboolean ActiveLayer(ILuint);
+ ILboolean ActiveMipmap(ILuint);
+ ILboolean Clear(void);
+ ILvoid ClearColour(ILclampf, ILclampf, ILclampf, ILclampf);
+ ILboolean Convert(ILenum);
+ ILboolean Copy(ILuint);
+ ILboolean Default(void);
+ ILboolean Flip(void);
+ ILboolean SwapColours(void);
+ ILboolean Resize(ILuint, ILuint, ILuint);
+ ILboolean TexImage(ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, ILvoid*);
+
+
+ // Image handling
+ ILvoid Bind(void) const;
+ ILvoid Bind(ILuint);
+ ILvoid Close(void) { this->Delete(); }
+ ILvoid Delete(void);
+ ILvoid iGenBind();
+ ILenum PaletteAlphaIndex();
+
+ // Image characteristics
+ ILuint Width(void);
+ ILuint Height(void);
+ ILuint Depth(void);
+ ILubyte Bpp(void);
+ ILubyte Bitpp(void);
+ ILenum PaletteType(void);
+ ILenum Format(void);
+ ILenum Type(void);
+ ILuint NumImages(void);
+ ILuint NumMipmaps(void);
+ ILuint GetId(void) const;
+ ILenum GetOrigin(void);
+ ILubyte *GetData(void);
+ ILubyte *GetPalette(void);
+
+
+ // Rendering
+ ILuint BindImage(void);
+ ILuint BindImage(ILenum);
+
+
+ // Operators
+ ilImage& operator = (ILuint);
+ ilImage& operator = (const ilImage &);
+
+
+protected:
+ ILuint Id;
+
+private:
+ ILvoid iStartUp();
+
+
+};
+
+
+class ilFilters
+{
+public:
+ static ILboolean Alienify(ilImage &);
+ static ILboolean BlurAvg(ilImage &, ILuint Iter);
+ static ILboolean BlurGaussian(ilImage &, ILuint Iter);
+ static ILboolean Contrast(ilImage &, ILfloat Contrast);
+ static ILboolean EdgeDetectE(ilImage &);
+ static ILboolean EdgeDetectP(ilImage &);
+ static ILboolean EdgeDetectS(ilImage &);
+ static ILboolean Emboss(ilImage &);
+ static ILboolean Gamma(ilImage &, ILfloat Gamma);
+ static ILboolean Negative(ilImage &);
+ static ILboolean Noisify(ilImage &, ILubyte Factor);
+ static ILboolean Pixelize(ilImage &, ILuint PixSize);
+ static ILboolean Saturate(ilImage &, ILfloat Saturation);
+ static ILboolean Saturate(ilImage &, ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
+ static ILboolean ScaleColours(ilImage &, ILfloat r, ILfloat g, ILfloat b);
+ static ILboolean Sharpen(ilImage &, ILfloat Factor, ILuint Iter);
+};
+
+
+#ifdef ILUT_USE_OPENGL
+class ilOgl
+{
+public:
+ static ILvoid Init(void);
+ static GLuint BindTex(ilImage &);
+ static ILboolean Upload(ilImage &, ILuint);
+ static GLuint Mipmap(ilImage &);
+ static ILboolean Screen(void);
+ static ILboolean Screenie(void);
+};
+#endif//ILUT_USE_OPENGL
+
+
+#ifdef ILUT_USE_ALLEGRO
+class ilAlleg
+{
+public:
+ static ILvoid Init(void);
+ static BITMAP *Convert(ilImage &);
+};
+#endif//ILUT_USE_ALLEGRO
+
+
+#ifdef ILUT_USE_WIN32
+class ilWin32
+{
+public:
+ static ILvoid Init(void);
+ static HBITMAP Convert(ilImage &);
+ static ILboolean GetClipboard(ilImage &);
+ static ILvoid GetInfo(ilImage &, BITMAPINFO *Info);
+ static ILubyte *GetPadData(ilImage &);
+ static HPALETTE GetPal(ilImage &);
+ static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType);
+ static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType, ILenum Type);
+ static ILboolean SetClipboard(ilImage &);
+};
+#endif//ILUT_USE_WIN32
+
+
+class ilValidate
+{
+public:
+ static ILboolean Valid(ILenum, char *);
+ static ILboolean Valid(ILenum, FILE *);
+ static ILboolean Valid(ILenum, ILvoid *, ILuint);
+
+protected:
+
+private:
+
+};
+
+
+class ilState
+{
+public:
+ static ILboolean Disable(ILenum);
+ static ILboolean Enable(ILenum);
+ static ILvoid Get(ILenum, ILboolean &);
+ static ILvoid Get(ILenum, ILint &);
+ static ILboolean GetBool(ILenum);
+ static ILint GetInt(ILenum);
+ static const char *GetString(ILenum);
+ static ILboolean IsDisabled(ILenum);
+ static ILboolean IsEnabled(ILenum);
+ static ILboolean Origin(ILenum);
+ static ILvoid Pop(void);
+ static ILvoid Push(ILuint);
+
+
+protected:
+
+private:
+
+};
+
+
+class ilError
+{
+public:
+ static ILvoid Check(ILvoid (*Callback)(const char*));
+ static ILvoid Check(ILvoid (*Callback)(ILenum));
+ static ILenum Get(void);
+ static const char *String(void);
+ static const char *String(ILenum);
+
+protected:
+
+private:
+
+};
+
+
+#endif//WRAPPER_H
diff --git a/mcclone/external/devil178/include/IL/ilu.h b/mcclone/external/devil178/include/IL/ilu.h
new file mode 100644
index 0000000..49871d7
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/ilu.h
@@ -0,0 +1,195 @@
+//-----------------------------------------------------------------------------
+//
+// ImageLib Utility Sources
+// Copyright (C) 2000-2009 by Denton Woods
+// Last modified: 03/07/2009
+//
+// Filename: IL/ilu.h
+//
+// Description: The main include file for ILU
+//
+//-----------------------------------------------------------------------------
+
+// Doxygen comment
+/*! \file ilu.h
+ The main include file for ILU
+*/
+
+#ifndef __ilu_h_
+#ifndef __ILU_H__
+
+#define __ilu_h_
+#define __ILU_H__
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef _WIN32
+ #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ #pragma comment(lib, "ILU.lib")
+ #endif
+ #endif
+#endif
+
+
+#define ILU_VERSION_1_7_8 1
+#define ILU_VERSION 178
+
+
+#define ILU_FILTER 0x2600
+#define ILU_NEAREST 0x2601
+#define ILU_LINEAR 0x2602
+#define ILU_BILINEAR 0x2603
+#define ILU_SCALE_BOX 0x2604
+#define ILU_SCALE_TRIANGLE 0x2605
+#define ILU_SCALE_BELL 0x2606
+#define ILU_SCALE_BSPLINE 0x2607
+#define ILU_SCALE_LANCZOS3 0x2608
+#define ILU_SCALE_MITCHELL 0x2609
+
+
+// Error types
+#define ILU_INVALID_ENUM 0x0501
+#define ILU_OUT_OF_MEMORY 0x0502
+#define ILU_INTERNAL_ERROR 0x0504
+#define ILU_INVALID_VALUE 0x0505
+#define ILU_ILLEGAL_OPERATION 0x0506
+#define ILU_INVALID_PARAM 0x0509
+
+
+// Values
+#define ILU_PLACEMENT 0x0700
+#define ILU_LOWER_LEFT 0x0701
+#define ILU_LOWER_RIGHT 0x0702
+#define ILU_UPPER_LEFT 0x0703
+#define ILU_UPPER_RIGHT 0x0704
+#define ILU_CENTER 0x0705
+#define ILU_CONVOLUTION_MATRIX 0x0710
+
+#define ILU_VERSION_NUM IL_VERSION_NUM
+#define ILU_VENDOR IL_VENDOR
+
+
+// Languages
+#define ILU_ENGLISH 0x0800
+#define ILU_ARABIC 0x0801
+#define ILU_DUTCH 0x0802
+#define ILU_JAPANESE 0x0803
+#define ILU_SPANISH 0x0804
+#define ILU_GERMAN 0x0805
+#define ILU_FRENCH 0x0806
+
+
+// Filters
+/*
+#define ILU_FILTER_BLUR 0x0803
+#define ILU_FILTER_GAUSSIAN_3x3 0x0804
+#define ILU_FILTER_GAUSSIAN_5X5 0x0805
+#define ILU_FILTER_EMBOSS1 0x0807
+#define ILU_FILTER_EMBOSS2 0x0808
+#define ILU_FILTER_LAPLACIAN1 0x080A
+#define ILU_FILTER_LAPLACIAN2 0x080B
+#define ILU_FILTER_LAPLACIAN3 0x080C
+#define ILU_FILTER_LAPLACIAN4 0x080D
+#define ILU_FILTER_SHARPEN1 0x080E
+#define ILU_FILTER_SHARPEN2 0x080F
+#define ILU_FILTER_SHARPEN3 0x0810
+*/
+
+
+typedef struct ILinfo
+{
+ ILuint Id; // the image's id
+ ILubyte *Data; // the image's data
+ ILuint Width; // the image's width
+ ILuint Height; // the image's height
+ ILuint Depth; // the image's depth
+ ILubyte Bpp; // bytes per pixel (not bits) of the image
+ ILuint SizeOfData; // the total size of the data (in bytes)
+ ILenum Format; // image format (in IL enum style)
+ ILenum Type; // image type (in IL enum style)
+ ILenum Origin; // origin of the image
+ ILubyte *Palette; // the image's palette
+ ILenum PalType; // palette type
+ ILuint PalSize; // palette size
+ ILenum CubeFlags; // flags for what cube map sides are present
+ ILuint NumNext; // number of images following
+ ILuint NumMips; // number of mipmaps
+ ILuint NumLayers; // number of layers
+} ILinfo;
+
+
+typedef struct ILpointf {
+ ILfloat x;
+ ILfloat y;
+} ILpointf;
+
+typedef struct ILpointi {
+ ILint x;
+ ILint y;
+} ILpointi;
+
+ILAPI ILboolean ILAPIENTRY iluAlienify(void);
+ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter);
+ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter);
+ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(void);
+ILAPI ILuint ILAPIENTRY iluColoursUsed(void);
+ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Comp);
+ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contrast);
+ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth);
+ILAPI void ILAPIENTRY iluDeleteImage(ILuint Id); // Deprecated
+ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(void);
+ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(void);
+ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(void);
+ILAPI ILboolean ILAPIENTRY iluEmboss(void);
+ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Height, ILuint Depth);
+ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim, ILfloat ZDim);
+ILAPI ILboolean ILAPIENTRY iluEqualize(void);
+ILAPI ILconst_string ILAPIENTRY iluErrorString(ILenum Error);
+ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale, ILint bias);
+ILAPI ILboolean ILAPIENTRY iluFlipImage(void);
+ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma);
+ILAPI ILuint ILAPIENTRY iluGenImage(void); // Deprecated
+ILAPI void ILAPIENTRY iluGetImageInfo(ILinfo *Info);
+ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode);
+ILAPI void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param);
+ILAPI ILstring ILAPIENTRY iluGetString(ILenum StringName);
+ILAPI void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param);
+ILAPI void ILAPIENTRY iluInit(void);
+ILAPI ILboolean ILAPIENTRY iluInvertAlpha(void);
+ILAPI ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName);
+ILAPI ILboolean ILAPIENTRY iluMirror(void);
+ILAPI ILboolean ILAPIENTRY iluNegative(void);
+ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance);
+ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSize);
+ILAPI void ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n);
+ILAPI void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n);
+ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance);
+ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle);
+ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
+ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation);
+ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
+ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuint Depth);
+ILAPI ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale);
+ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILfloat b);
+ILAPI ILboolean ILAPIENTRY iluSetLanguage(ILenum Language);
+ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter);
+ILAPI ILboolean ILAPIENTRY iluSwapColours(void);
+ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle);
+
+#define iluColorsUsed iluColoursUsed
+#define iluSwapColors iluSwapColours
+#define iluReplaceColor iluReplaceColour
+#define iluScaleColor iluScaleColour
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __ILU_H__
+#endif // __ilu_h_
diff --git a/mcclone/external/devil178/include/IL/ilu_region.h b/mcclone/external/devil178/include/IL/ilu_region.h
new file mode 100644
index 0000000..b5b3adc
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/ilu_region.h
@@ -0,0 +1,25 @@
+//-----------------------------------------------------------------------------
+//
+// ImageLib Utility Sources
+// Copyright (C) 2000-2002 by Denton Woods
+// Last modified: 07/09/2002 <--Y2K Compliant! =]
+//
+// Filename: src-ILU/src/ilu_region.h
+//
+// Description: Creates an image region.
+//
+//-----------------------------------------------------------------------------
+
+#ifndef ILU_REGION_H
+#define ILU_REGION_H
+
+typedef struct Edge
+{
+ ILint yUpper;
+ ILfloat xIntersect, dxPerScan;
+ struct Edge *next;
+} Edge;
+
+
+#endif//ILU_REGION_H
+
diff --git a/mcclone/external/devil178/include/IL/ilut.h b/mcclone/external/devil178/include/IL/ilut.h
new file mode 100644
index 0000000..4a84b84
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/ilut.h
@@ -0,0 +1,390 @@
+//-----------------------------------------------------------------------------
+//
+// ImageLib Utility Toolkit Sources
+// Copyright (C) 2000-2009 by Denton Woods
+// Last modified: 03/07/2009
+//
+// Filename: IL/ilut.h
+//
+// Description: The main include file for ILUT
+//
+//-----------------------------------------------------------------------------
+
+// Doxygen comment
+/*! \file ilut.h
+ The main include file for ILUT
+*/
+
+#ifndef __ilut_h_
+#ifndef __ILUT_H__
+
+#define __ilut_h_
+#define __ILUT_H__
+
+#include
+#include
+
+
+//-----------------------------------------------------------------------------
+// Defines
+//-----------------------------------------------------------------------------
+
+#define ILUT_VERSION_1_7_8 1
+#define ILUT_VERSION 178
+
+
+// Attribute Bits
+#define ILUT_OPENGL_BIT 0x00000001
+#define ILUT_D3D_BIT 0x00000002
+#define ILUT_ALL_ATTRIB_BITS 0x000FFFFF
+
+
+// Error Types
+#define ILUT_INVALID_ENUM 0x0501
+#define ILUT_OUT_OF_MEMORY 0x0502
+#define ILUT_INVALID_VALUE 0x0505
+#define ILUT_ILLEGAL_OPERATION 0x0506
+#define ILUT_INVALID_PARAM 0x0509
+#define ILUT_COULD_NOT_OPEN_FILE 0x050A
+#define ILUT_STACK_OVERFLOW 0x050E
+#define ILUT_STACK_UNDERFLOW 0x050F
+#define ILUT_BAD_DIMENSIONS 0x0511
+#define ILUT_NOT_SUPPORTED 0x0550
+
+
+// State Definitions
+#define ILUT_PALETTE_MODE 0x0600
+#define ILUT_OPENGL_CONV 0x0610
+#define ILUT_D3D_MIPLEVELS 0x0620
+#define ILUT_MAXTEX_WIDTH 0x0630
+#define ILUT_MAXTEX_HEIGHT 0x0631
+#define ILUT_MAXTEX_DEPTH 0x0632
+#define ILUT_GL_USE_S3TC 0x0634
+#define ILUT_D3D_USE_DXTC 0x0634
+#define ILUT_GL_GEN_S3TC 0x0635
+#define ILUT_D3D_GEN_DXTC 0x0635
+#define ILUT_S3TC_FORMAT 0x0705
+#define ILUT_DXTC_FORMAT 0x0705
+#define ILUT_D3D_POOL 0x0706
+#define ILUT_D3D_ALPHA_KEY_COLOR 0x0707
+#define ILUT_D3D_ALPHA_KEY_COLOUR 0x0707
+#define ILUT_FORCE_INTEGER_FORMAT 0x0636
+
+//This new state does automatic texture target detection
+//if enabled. Currently, only cubemap detection is supported.
+//if the current image is no cubemap, the 2d texture is chosen.
+#define ILUT_GL_AUTODETECT_TEXTURE_TARGET 0x0807
+
+
+// Values
+#define ILUT_VERSION_NUM IL_VERSION_NUM
+#define ILUT_VENDOR IL_VENDOR
+
+// The different rendering api's...more to be added later?
+#define ILUT_OPENGL 0
+#define ILUT_ALLEGRO 1
+#define ILUT_WIN32 2
+#define ILUT_DIRECT3D8 3
+#define ILUT_DIRECT3D9 4
+#define ILUT_X11 5
+#define ILUT_DIRECT3D10 6
+
+/*
+// Includes specific config
+#ifdef DJGPP
+ #define ILUT_USE_ALLEGRO
+#elif _WIN32_WCE
+ #define ILUT_USE_WIN32
+#elif _WIN32
+ //#ifdef __GNUC__ //__CYGWIN32__ (Cygwin seems to not define this with DevIL builds)
+ #define ILUT_USE_WIN32
+ #include "IL/config.h"
+
+ // Temporary fix for the SDL main() linker bug.
+ //#ifdef ILUT_USE_SDL
+ //#undef ILUT_USE_SDL
+ //#endif//ILUT_USE_SDL
+
+ //#else
+ // #define ILUT_USE_WIN32
+ // #define ILUT_USE_OPENGL
+ // #define ILUT_USE_SDL
+ // #define ILUT_USE_DIRECTX8
+ //#endif
+#elif BEOS // Don't know the #define
+ #define ILUT_USE_BEOS
+ #define ILUT_USE_OPENGL
+#elif MACOSX
+ #define ILUT_USE_OPENGL
+#else
+
+ // We are surely using a *nix so the configure script
+ // may have written the configured config.h header
+ #include "IL/config.h"
+#endif
+*/
+
+#if (defined(_WIN32) || defined(_WIN64))
+ #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ #pragma comment(lib, "ILUT.lib")
+ #endif
+ #endif
+
+ #include
+#endif
+
+
+
+//this should remain private and hidden
+//#include "IL/config.h"
+
+//////////////
+// OpenGL
+//////////////
+
+#ifdef ILUT_USE_OPENGL
+ #if defined(_MSC_VER) || defined(_WIN32)
+ //#define WIN32_LEAN_AND_MEAN
+ #include
+ #endif//_MSC_VER
+
+ #ifdef __APPLE__
+ #include
+ #include
+ #else
+ #include
+ #include
+ #endif//__APPLE__
+#endif
+
+
+#ifdef ILUT_USE_WIN32
+ //#define WIN32_LEAN_AND_MEAN
+ #ifdef _DEBUG
+ #define _CRTDBG_MAP_ALLOC
+ #include
+ #ifndef _WIN32_WCE
+ #include
+ #endif
+ #endif
+ #include
+#endif
+
+
+//
+// If we can avoid including these in all cases thing tend to break less
+// and we can keep all of them defined as available
+//
+// Kriss
+//
+
+// ImageLib Utility Toolkit's Allegro Functions
+#ifdef ILUT_USE_ALLEGRO
+// #include
+#endif//ILUT_USE_ALLEGRO
+
+#ifdef ILUT_USE_SDL
+// #include
+#endif
+
+#ifdef ILUT_USE_DIRECTX8
+ #include
+#endif//ILUT_USE_DIRECTX9
+
+#ifdef ILUT_USE_DIRECTX9
+ #include
+#endif//ILUT_USE_DIRECTX9
+
+#ifdef ILUT_USE_DIRECTX10
+ #pragma warning(push)
+ #pragma warning(disable : 4201) // Disables 'nonstandard extension used : nameless struct/union' warning
+ #include
+ #include
+ #include
+ #pragma warning(pop)
+#endif//ILUT_USE_DIRECTX10
+
+#ifdef ILUT_USE_X11
+ #include
+ #include
+#ifdef ILUT_USE_XSHM
+ #include
+ #include
+ #include
+#endif//ILUT_USE_XSHM
+#endif//ILUT_USE_X11
+
+
+
+//-----------------------------------------------------------------------------
+// Functions
+//-----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ImageLib Utility Toolkit Functions
+ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode);
+ILAPI void ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Param);
+ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode);
+ILAPI void ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param);
+ILAPI ILstring ILAPIENTRY ilutGetString(ILenum StringName);
+ILAPI void ILAPIENTRY ilutInit(void);
+ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode);
+ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode);
+ILAPI void ILAPIENTRY ilutPopAttrib(void);
+ILAPI void ILAPIENTRY ilutPushAttrib(ILuint Bits);
+ILAPI void ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param);
+
+ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer);
+
+
+// ImageLib Utility Toolkit's OpenGL Functions
+#ifdef ILUT_USE_OPENGL
+ ILAPI GLuint ILAPIENTRY ilutGLBindTexImage();
+ ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(void);
+ ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(void);
+ ILAPI GLuint ILAPIENTRY ilutGLLoadImage(ILstring FileName);
+ ILAPI ILboolean ILAPIENTRY ilutGLScreen(void);
+ ILAPI ILboolean ILAPIENTRY ilutGLScreenie(void);
+ ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(ILstring FileName, GLuint TexID);
+ ILAPI ILboolean ILAPIENTRY ilutGLSubTex2D(GLuint TexID, ILuint XOff, ILuint YOff);
+ ILAPI ILboolean ILAPIENTRY ilutGLSubTex3D(GLuint TexID, ILuint XOff, ILuint YOff, ILuint ZOff);
+ ILAPI ILboolean ILAPIENTRY ilutGLSetTex2D(GLuint TexID);
+ ILAPI ILboolean ILAPIENTRY ilutGLSetTex3D(GLuint TexID);
+ ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level);
+ ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff);
+
+ ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID); // Deprecated - use ilutGLSetTex2D.
+ ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff); // Use ilutGLSubTex2D.
+#endif//ILUT_USE_OPENGL
+
+
+// ImageLib Utility Toolkit's Allegro Functions
+#ifdef ILUT_USE_ALLEGRO
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ #include
+ #ifdef __cplusplus
+ }
+ #endif
+
+ ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName);
+ ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal);
+#endif//ILUT_USE_ALLEGRO
+
+
+// ImageLib Utility Toolkit's SDL Functions
+#ifdef ILUT_USE_SDL
+ ILAPI struct SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigned int flags);
+ ILAPI struct SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(ILstring FileName);
+ ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(struct SDL_Surface *Bitmap);
+#endif//ILUT_USE_SDL
+
+
+// ImageLib Utility Toolkit's BeOS Functions
+#ifdef ILUT_USE_BEOS
+ ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(void);
+#endif//ILUT_USE_BEOS
+
+
+// ImageLib Utility Toolkit's Win32 GDI Functions
+#ifdef ILUT_USE_WIN32
+ ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC);
+ ILAPI HBITMAP ILAPIENTRY ilutConvertSliceToHBitmap(HDC hDC, ILuint slice);
+ ILAPI void ILAPIENTRY ilutFreePaddedData(ILubyte *Data);
+ ILAPI void ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info);
+ ILAPI HPALETTE ILAPIENTRY ilutGetHPal(void);
+ ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(void);
+ ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(void);
+ ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint ID, ILstring ResourceType, ILenum Type);
+ ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap);
+ ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal);
+ ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(void);
+ ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(ILstring FileName, HDC hDC);
+ ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(ILstring Url);
+ ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC);
+ ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(ILstring FileName, HBITMAP Bitmap);
+#endif//ILUT_USE_WIN32
+
+// ImageLib Utility Toolkit's DirectX 8 Functions
+#ifdef ILUT_USE_DIRECTX8
+// ILAPI void ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels);
+ ILAPI struct IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(struct IDirect3DDevice8 *Device);
+ ILAPI struct IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(struct IDirect3DDevice8 *Device);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DTexture8 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DVolumeTexture8 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DTexture8 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture8 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DTexture8 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DVolumeTexture8 **Texture);
+ // These two are not tested yet.
+ ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture8 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture8 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(struct IDirect3DDevice8 *Device, struct IDirect3DSurface8 *Surface);
+#endif//ILUT_USE_DIRECTX8
+
+#ifdef ILUT_USE_DIRECTX9
+ #pragma warning(push)
+ #pragma warning(disable : 4115) // Disables 'named type definition in parentheses' warning
+// ILAPI void ILAPIENTRY ilutD3D9MipFunc(ILuint NumLevels);
+ ILAPI struct IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture (struct IDirect3DDevice9* Device);
+ ILAPI struct IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture (struct IDirect3DDevice9* Device);
+ ILAPI struct IDirect3DCubeTexture9* ILAPIENTRY ilutD3D9CubeTexture (struct IDirect3DDevice9* Device);
+
+ ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DCubeTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DCubeTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DCubeTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DCubeTexture9 **Texture);
+
+ ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DVolumeTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DVolumeTexture9 **Texture);
+
+ // These three are not tested yet.
+ ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DVolumeTexture9 **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(struct IDirect3DDevice9 *Device, struct IDirect3DSurface9 *Surface);
+ #pragma warning(pop)
+#endif//ILUT_USE_DIRECTX9
+
+#ifdef ILUT_USE_DIRECTX10
+ ILAPI ID3D10Texture2D* ILAPIENTRY ilutD3D10Texture(ID3D10Device *Device);
+ ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFile(ID3D10Device *Device, ILconst_string FileName, ID3D10Texture2D **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileInMemory(ID3D10Device *Device, void *Lump, ILuint Size, ID3D10Texture2D **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromResource(ID3D10Device *Device, HMODULE SrcModule, ILconst_string SrcResource, ID3D10Texture2D **Texture);
+ ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileHandle(ID3D10Device *Device, ILHANDLE File, ID3D10Texture2D **Texture);
+#endif//ILUT_USE_DIRECTX10
+
+
+
+#ifdef ILUT_USE_X11
+ ILAPI XImage * ILAPIENTRY ilutXCreateImage( Display* );
+ ILAPI Pixmap ILAPIENTRY ilutXCreatePixmap( Display*,Drawable );
+ ILAPI XImage * ILAPIENTRY ilutXLoadImage( Display*,char* );
+ ILAPI Pixmap ILAPIENTRY ilutXLoadPixmap( Display*,Drawable,char* );
+#ifdef ILUT_USE_XSHM
+ ILAPI XImage * ILAPIENTRY ilutXShmCreateImage( Display*,XShmSegmentInfo* );
+ ILAPI void ILAPIENTRY ilutXShmDestroyImage( Display*,XImage*,XShmSegmentInfo* );
+ ILAPI Pixmap ILAPIENTRY ilutXShmCreatePixmap( Display*,Drawable,XShmSegmentInfo* );
+ ILAPI void ILAPIENTRY ilutXShmFreePixmap( Display*,Pixmap,XShmSegmentInfo* );
+ ILAPI XImage * ILAPIENTRY ilutXShmLoadImage( Display*,char*,XShmSegmentInfo* );
+ ILAPI Pixmap ILAPIENTRY ilutXShmLoadPixmap( Display*,Drawable,char*,XShmSegmentInfo* );
+#endif//ILUT_USE_XSHM
+#endif//ILUT_USE_X11
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __ILUT_H__
+#endif // __ilut_h_
diff --git a/mcclone/external/devil178/include/IL/ilut_config.h b/mcclone/external/devil178/include/IL/ilut_config.h
new file mode 100644
index 0000000..2b3625b
--- /dev/null
+++ b/mcclone/external/devil178/include/IL/ilut_config.h
@@ -0,0 +1,26 @@
+#ifndef __ILUT_CONFIG_H__
+#define __ILUT_CONFIG_H__
+
+#define IL_USE_PRAGMA_LIBS
+
+// Supported APIs (ILUT)
+
+//
+// sorry just
+// cant get this one to work under windows
+// have disabled for the now
+//
+// will look at it some more later
+//
+// Kriss
+//
+#undef ILUT_USE_ALLEGRO
+
+#undef ILUT_USE_DIRECTX8
+//#define ILUT_USE_DIRECTX9
+//#define ILUT_USE_DIRECTX10
+#define ILUT_USE_OPENGL
+//#define ILUT_USE_SDL
+#define ILUT_USE_WIN32
+
+#endif//__ILUT_CONFIG_H__
diff --git a/mcclone/external/devil178/lib/DevIL.dll b/mcclone/external/devil178/lib/DevIL.dll
new file mode 100644
index 0000000..b7a4c09
Binary files /dev/null and b/mcclone/external/devil178/lib/DevIL.dll differ
diff --git a/mcclone/external/devil178/lib/DevIL.lib b/mcclone/external/devil178/lib/DevIL.lib
new file mode 100644
index 0000000..1aa82d0
Binary files /dev/null and b/mcclone/external/devil178/lib/DevIL.lib differ
diff --git a/mcclone/external/devil178/lib/ILU.dll b/mcclone/external/devil178/lib/ILU.dll
new file mode 100644
index 0000000..b5f6561
Binary files /dev/null and b/mcclone/external/devil178/lib/ILU.dll differ
diff --git a/mcclone/external/devil178/lib/ILU.lib b/mcclone/external/devil178/lib/ILU.lib
new file mode 100644
index 0000000..5124172
Binary files /dev/null and b/mcclone/external/devil178/lib/ILU.lib differ
diff --git a/mcclone/external/devil178/lib/ILUT.dll b/mcclone/external/devil178/lib/ILUT.dll
new file mode 100644
index 0000000..3317889
Binary files /dev/null and b/mcclone/external/devil178/lib/ILUT.dll differ
diff --git a/mcclone/external/devil178/lib/ILUT.lib b/mcclone/external/devil178/lib/ILUT.lib
new file mode 100644
index 0000000..99bfb61
Binary files /dev/null and b/mcclone/external/devil178/lib/ILUT.lib differ
diff --git a/mcclone/external/devil178/lib/unicode/DevIL.dll b/mcclone/external/devil178/lib/unicode/DevIL.dll
new file mode 100644
index 0000000..1b8ed4b
Binary files /dev/null and b/mcclone/external/devil178/lib/unicode/DevIL.dll differ
diff --git a/mcclone/external/devil178/lib/unicode/DevIL.lib b/mcclone/external/devil178/lib/unicode/DevIL.lib
new file mode 100644
index 0000000..40b60a9
Binary files /dev/null and b/mcclone/external/devil178/lib/unicode/DevIL.lib differ
diff --git a/mcclone/external/devil178/lib/unicode/ILU.dll b/mcclone/external/devil178/lib/unicode/ILU.dll
new file mode 100644
index 0000000..8d38082
Binary files /dev/null and b/mcclone/external/devil178/lib/unicode/ILU.dll differ
diff --git a/mcclone/external/devil178/lib/unicode/ILU.lib b/mcclone/external/devil178/lib/unicode/ILU.lib
new file mode 100644
index 0000000..d8daf83
Binary files /dev/null and b/mcclone/external/devil178/lib/unicode/ILU.lib differ
diff --git a/mcclone/external/devil178/lib/unicode/ILUT.dll b/mcclone/external/devil178/lib/unicode/ILUT.dll
new file mode 100644
index 0000000..e6cc19d
Binary files /dev/null and b/mcclone/external/devil178/lib/unicode/ILUT.dll differ
diff --git a/mcclone/external/devil178/lib/unicode/ILUT.lib b/mcclone/external/devil178/lib/unicode/ILUT.lib
new file mode 100644
index 0000000..89bc4ee
Binary files /dev/null and b/mcclone/external/devil178/lib/unicode/ILUT.lib differ
diff --git a/mcclone/external/sfml23/include/SFML/Audio.hpp b/mcclone/external/sfml23/include/SFML/Audio.hpp
new file mode 100644
index 0000000..41737cf
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio.hpp
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_AUDIO_HPP
+#define SFML_AUDIO_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+#endif // SFML_AUDIO_HPP
+
+////////////////////////////////////////////////////////////
+/// \defgroup audio Audio module
+///
+/// Sounds, streaming (musics or custom sources), recording,
+/// spatialization.
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/AlResource.hpp b/mcclone/external/sfml23/include/SFML/Audio/AlResource.hpp
new file mode 100644
index 0000000..ca5d2c0
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/AlResource.hpp
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_ALRESOURCE_HPP
+#define SFML_ALRESOURCE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Base class for classes that require an OpenAL context
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API AlResource
+{
+protected:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ ////////////////////////////////////////////////////////////
+ AlResource();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ ~AlResource();
+};
+
+} // namespace sf
+
+
+#endif // SFML_ALRESOURCE_HPP
+
+////////////////////////////////////////////////////////////
+/// \class sf::AlResource
+/// \ingroup audio
+///
+/// This class is for internal use only, it must be the base
+/// of every class that requires a valid OpenAL context in
+/// order to work.
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/Export.hpp b/mcclone/external/sfml23/include/SFML/Audio/Export.hpp
new file mode 100644
index 0000000..1ea6f42
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/Export.hpp
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_AUDIO_EXPORT_HPP
+#define SFML_AUDIO_EXPORT_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Define portable import / export macros
+////////////////////////////////////////////////////////////
+#if defined(SFML_AUDIO_EXPORTS)
+
+ #define SFML_AUDIO_API SFML_API_EXPORT
+
+#else
+
+ #define SFML_AUDIO_API SFML_API_IMPORT
+
+#endif
+
+
+#endif // SFML_AUDIO_EXPORT_HPP
diff --git a/mcclone/external/sfml23/include/SFML/Audio/InputSoundFile.hpp b/mcclone/external/sfml23/include/SFML/Audio/InputSoundFile.hpp
new file mode 100644
index 0000000..5e306ae
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/InputSoundFile.hpp
@@ -0,0 +1,250 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_INPUTSOUNDFILE_HPP
+#define SFML_INPUTSOUNDFILE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+
+
+namespace sf
+{
+class InputStream;
+class SoundFileReader;
+
+////////////////////////////////////////////////////////////
+/// \brief Provide read access to sound files
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API InputSoundFile : NonCopyable
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ ////////////////////////////////////////////////////////////
+ InputSoundFile();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ ~InputSoundFile();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a sound file from the disk for reading
+ ///
+ /// The supported audio formats are: WAV, OGG/Vorbis, FLAC.
+ ///
+ /// \param filename Path of the sound file to load
+ ///
+ /// \return True if the file was successfully opened
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openFromFile(const std::string& filename);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a sound file in memory for reading
+ ///
+ /// The supported audio formats are: WAV, OGG/Vorbis, FLAC.
+ ///
+ /// \param data Pointer to the file data in memory
+ /// \param sizeInBytes Size of the data to load, in bytes
+ ///
+ /// \return True if the file was successfully opened
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openFromMemory(const void* data, std::size_t sizeInBytes);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a sound file from a custom stream for reading
+ ///
+ /// The supported audio formats are: WAV, OGG/Vorbis, FLAC.
+ ///
+ /// \param stream Source stream to read from
+ ///
+ /// \return True if the file was successfully opened
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openFromStream(InputStream& stream);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open the sound file from the disk for writing
+ ///
+ /// \param filename Path of the sound file to write
+ /// \param channelCount Number of channels in the sound
+ /// \param sampleRate Sample rate of the sound
+ ///
+ /// \return True if the file was successfully opened
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openForWriting(const std::string& filename, unsigned int channelCount, unsigned int sampleRate);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the total number of audio samples in the file
+ ///
+ /// \return Number of samples
+ ///
+ ////////////////////////////////////////////////////////////
+ Uint64 getSampleCount() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the number of channels used by the sound
+ ///
+ /// \return Number of channels (1 = mono, 2 = stereo)
+ ///
+ ////////////////////////////////////////////////////////////
+ unsigned int getChannelCount() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the sample rate of the sound
+ ///
+ /// \return Sample rate, in samples per second
+ ///
+ ////////////////////////////////////////////////////////////
+ unsigned int getSampleRate() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the total duration of the sound file
+ ///
+ /// This function is provided for convenience, the duration is
+ /// deduced from the other sound file attributes.
+ ///
+ /// \return Duration of the sound file
+ ///
+ ////////////////////////////////////////////////////////////
+ Time getDuration() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the current read position to the given sample offset
+ ///
+ /// This function takes a sample offset to provide maximum
+ /// precision. If you need to jump to a given time, use the
+ /// other overload.
+ ///
+ /// If the given offset exceeds to total number of samples,
+ /// this function jumps to the end of the sound file.
+ ///
+ /// \param sampleOffset Index of the sample to jump to, relative to the beginning
+ ///
+ ////////////////////////////////////////////////////////////
+ void seek(Uint64 sampleOffset);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the current read position to the given time offset
+ ///
+ /// Using a time offset is handy but imprecise. If you need an accurate
+ /// result, consider using the overload which takes a sample offset.
+ ///
+ /// If the given time exceeds to total duration, this function jumps
+ /// to the end of the sound file.
+ ///
+ /// \param timeOffset Time to jump to, relative to the beginning
+ ///
+ ////////////////////////////////////////////////////////////
+ void seek(Time timeOffset);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Read audio samples from the open file
+ ///
+ /// \param samples Pointer to the sample array to fill
+ /// \param maxCount Maximum number of samples to read
+ ///
+ /// \return Number of samples actually read (may be less than \a maxCount)
+ ///
+ ////////////////////////////////////////////////////////////
+ Uint64 read(Int16* samples, Uint64 maxCount);
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Close the current file
+ ///
+ ////////////////////////////////////////////////////////////
+ void close();
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ SoundFileReader* m_reader; ///< Reader that handles I/O on the file's format
+ InputStream* m_stream; ///< Input stream used to access the file's data
+ bool m_streamOwned; ///< Is the stream internal or external?
+ Uint64 m_sampleCount; ///< Total number of samples in the file
+ unsigned int m_channelCount; ///< Number of channels of the sound
+ unsigned int m_sampleRate; ///< Number of samples per second
+};
+
+} // namespace sf
+
+
+#endif // SFML_INPUTSOUNDFILE_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::InputSoundFile
+/// \ingroup audio
+///
+/// This class decodes audio samples from a sound file. It is
+/// used internally by higher-level classes such as sf::SoundBuffer
+/// and sf::Music, but can also be useful if you want to process
+/// or analyze audio files without playing them, or if you want to
+/// implement your own version of sf::Music with more specific
+/// features.
+///
+/// Usage example:
+/// \code
+/// // Open a sound file
+/// sf::InputSoundFile file;
+/// if (!file.openFromFile("music.ogg"))
+/// /* error */;
+///
+/// // Print the sound attributes
+/// std::cout << "duration: " << file.getDuration().asSeconds() << std::endl;
+/// std::cout << "channels: " << file.getChannelCount() << std::endl;
+/// std::cout << "sample rate: " << file.getSampleRate() << std::endl;
+/// std::cout << "sample count: " << file.getSampleCount() << std::endl;
+///
+/// // Read and process batches of samples until the end of file is reached
+/// sf::Int16 samples[1024];
+/// sf::Uint64 count;
+/// do
+/// {
+/// count = file.read(samples, 1024);
+///
+/// // process, analyze, play, convert, or whatever
+/// // you want to do with the samples...
+/// }
+/// while (count > 0);
+/// \endcode
+///
+/// \see sf::SoundFileReader, sf::OutputSoundFile
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/Listener.hpp b/mcclone/external/sfml23/include/SFML/Audio/Listener.hpp
new file mode 100644
index 0000000..04e4af3
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/Listener.hpp
@@ -0,0 +1,234 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_LISTENER_HPP
+#define SFML_LISTENER_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief The audio listener is the point in the scene
+/// from where all the sounds are heard
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API Listener
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the global volume of all the sounds and musics
+ ///
+ /// The volume is a number between 0 and 100; it is combined with
+ /// the individual volume of each sound / music.
+ /// The default value for the volume is 100 (maximum).
+ ///
+ /// \param volume New global volume, in the range [0, 100]
+ ///
+ /// \see getGlobalVolume
+ ///
+ ////////////////////////////////////////////////////////////
+ static void setGlobalVolume(float volume);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current value of the global volume
+ ///
+ /// \return Current global volume, in the range [0, 100]
+ ///
+ /// \see setGlobalVolume
+ ///
+ ////////////////////////////////////////////////////////////
+ static float getGlobalVolume();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the position of the listener in the scene
+ ///
+ /// The default listener's position is (0, 0, 0).
+ ///
+ /// \param x X coordinate of the listener's position
+ /// \param y Y coordinate of the listener's position
+ /// \param z Z coordinate of the listener's position
+ ///
+ /// \see getPosition, setDirection
+ ///
+ ////////////////////////////////////////////////////////////
+ static void setPosition(float x, float y, float z);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the position of the listener in the scene
+ ///
+ /// The default listener's position is (0, 0, 0).
+ ///
+ /// \param position New listener's position
+ ///
+ /// \see getPosition, setDirection
+ ///
+ ////////////////////////////////////////////////////////////
+ static void setPosition(const Vector3f& position);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current position of the listener in the scene
+ ///
+ /// \return Listener's position
+ ///
+ /// \see setPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ static Vector3f getPosition();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the forward vector of the listener in the scene
+ ///
+ /// The direction (also called "at vector") is the vector
+ /// pointing forward from the listener's perspective. Together
+ /// with the up vector, it defines the 3D orientation of the
+ /// listener in the scene. The direction vector doesn't
+ /// have to be normalized.
+ /// The default listener's direction is (0, 0, -1).
+ ///
+ /// \param x X coordinate of the listener's direction
+ /// \param y Y coordinate of the listener's direction
+ /// \param z Z coordinate of the listener's direction
+ ///
+ /// \see getDirection, setUpVector, setPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ static void setDirection(float x, float y, float z);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the forward vector of the listener in the scene
+ ///
+ /// The direction (also called "at vector") is the vector
+ /// pointing forward from the listener's perspective. Together
+ /// with the up vector, it defines the 3D orientation of the
+ /// listener in the scene. The direction vector doesn't
+ /// have to be normalized.
+ /// The default listener's direction is (0, 0, -1).
+ ///
+ /// \param direction New listener's direction
+ ///
+ /// \see getDirection, setUpVector, setPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ static void setDirection(const Vector3f& direction);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current forward vector of the listener in the scene
+ ///
+ /// \return Listener's forward vector (not normalized)
+ ///
+ /// \see setDirection
+ ///
+ ////////////////////////////////////////////////////////////
+ static Vector3f getDirection();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the upward vector of the listener in the scene
+ ///
+ /// The up vector is the vector that points upward from the
+ /// listener's perspective. Together with the direction, it
+ /// defines the 3D orientation of the listener in the scene.
+ /// The up vector doesn't have to be normalized.
+ /// The default listener's up vector is (0, 1, 0). It is usually
+ /// not necessary to change it, especially in 2D scenarios.
+ ///
+ /// \param x X coordinate of the listener's up vector
+ /// \param y Y coordinate of the listener's up vector
+ /// \param z Z coordinate of the listener's up vector
+ ///
+ /// \see getUpVector, setDirection, setPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ static void setUpVector(float x, float y, float z);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the upward vector of the listener in the scene
+ ///
+ /// The up vector is the vector that points upward from the
+ /// listener's perspective. Together with the direction, it
+ /// defines the 3D orientation of the listener in the scene.
+ /// The up vector doesn't have to be normalized.
+ /// The default listener's up vector is (0, 1, 0). It is usually
+ /// not necessary to change it, especially in 2D scenarios.
+ ///
+ /// \param upVector New listener's up vector
+ ///
+ /// \see getUpVector, setDirection, setPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ static void setUpVector(const Vector3f& upVector);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current upward vector of the listener in the scene
+ ///
+ /// \return Listener's upward vector (not normalized)
+ ///
+ /// \see setUpVector
+ ///
+ ////////////////////////////////////////////////////////////
+ static Vector3f getUpVector();
+};
+
+} // namespace sf
+
+
+#endif // SFML_LISTENER_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::Listener
+/// \ingroup audio
+///
+/// The audio listener defines the global properties of the
+/// audio environment, it defines where and how sounds and musics
+/// are heard. If sf::View is the eyes of the user, then sf::Listener
+/// is his ears (by the way, they are often linked together --
+/// same position, orientation, etc.).
+///
+/// sf::Listener is a simple interface, which allows to setup the
+/// listener in the 3D audio environment (position, direction and
+/// up vector), and to adjust the global volume.
+///
+/// Because the listener is unique in the scene, sf::Listener only
+/// contains static functions and doesn't have to be instantiated.
+///
+/// Usage example:
+/// \code
+/// // Move the listener to the position (1, 0, -5)
+/// sf::Listener::setPosition(1, 0, -5);
+///
+/// // Make it face the right axis (1, 0, 0)
+/// sf::Listener::setDirection(1, 0, 0);
+///
+/// // Reduce the global volume
+/// sf::Listener::setGlobalVolume(50);
+/// \endcode
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/Music.hpp b/mcclone/external/sfml23/include/SFML/Audio/Music.hpp
new file mode 100644
index 0000000..76b4254
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/Music.hpp
@@ -0,0 +1,229 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_MUSIC_HPP
+#define SFML_MUSIC_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+namespace sf
+{
+class InputStream;
+
+////////////////////////////////////////////////////////////
+/// \brief Streamed music played from an audio file
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API Music : public SoundStream
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ ////////////////////////////////////////////////////////////
+ Music();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ ~Music();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a music from an audio file
+ ///
+ /// This function doesn't start playing the music (call play()
+ /// to do so).
+ /// See the documentation of sf::InputSoundFile for the list
+ /// of supported formats.
+ ///
+ /// \warning Since the music is not loaded at once but rather
+ /// streamed continuously, the file must remain accessible until
+ /// the sf::Music object loads a new music or is destroyed.
+ ///
+ /// \param filename Path of the music file to open
+ ///
+ /// \return True if loading succeeded, false if it failed
+ ///
+ /// \see openFromMemory, openFromStream
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openFromFile(const std::string& filename);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a music from an audio file in memory
+ ///
+ /// This function doesn't start playing the music (call play()
+ /// to do so).
+ /// See the documentation of sf::InputSoundFile for the list
+ /// of supported formats.
+ ///
+ /// \warning Since the music is not loaded at once but rather streamed
+ /// continuously, the \a data buffer must remain accessible until
+ /// the sf::Music object loads a new music or is destroyed. That is,
+ /// you can't deallocate the buffer right after calling this function.
+ ///
+ /// \param data Pointer to the file data in memory
+ /// \param sizeInBytes Size of the data to load, in bytes
+ ///
+ /// \return True if loading succeeded, false if it failed
+ ///
+ /// \see openFromFile, openFromStream
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openFromMemory(const void* data, std::size_t sizeInBytes);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a music from an audio file in a custom stream
+ ///
+ /// This function doesn't start playing the music (call play()
+ /// to do so).
+ /// See the documentation of sf::InputSoundFile for the list
+ /// of supported formats.
+ ///
+ /// \warning Since the music is not loaded at once but rather
+ /// streamed continuously, the \a stream must remain accessible
+ /// until the sf::Music object loads a new music or is destroyed.
+ ///
+ /// \param stream Source stream to read from
+ ///
+ /// \return True if loading succeeded, false if it failed
+ ///
+ /// \see openFromFile, openFromMemory
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openFromStream(InputStream& stream);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the total duration of the music
+ ///
+ /// \return Music duration
+ ///
+ ////////////////////////////////////////////////////////////
+ Time getDuration() const;
+
+protected:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Request a new chunk of audio samples from the stream source
+ ///
+ /// This function fills the chunk from the next samples
+ /// to read from the audio file.
+ ///
+ /// \param data Chunk of data to fill
+ ///
+ /// \return True to continue playback, false to stop
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool onGetData(Chunk& data);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the current playing position in the stream source
+ ///
+ /// \param timeOffset New playing position, from the beginning of the music
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void onSeek(Time timeOffset);
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Initialize the internal state after loading a new music
+ ///
+ ////////////////////////////////////////////////////////////
+ void initialize();
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ InputSoundFile m_file; ///< The streamed music file
+ Time m_duration; ///< Music duration
+ std::vector m_samples; ///< Temporary buffer of samples
+ Mutex m_mutex; ///< Mutex protecting the data
+};
+
+} // namespace sf
+
+
+#endif // SFML_MUSIC_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::Music
+/// \ingroup audio
+///
+/// Musics are sounds that are streamed rather than completely
+/// loaded in memory. This is especially useful for compressed
+/// musics that usually take hundreds of MB when they are
+/// uncompressed: by streaming it instead of loading it entirely,
+/// you avoid saturating the memory and have almost no loading delay.
+/// This implies that the underlying resource (file, stream or
+/// memory buffer) must remain valid for the lifetime of the
+/// sf::Music object.
+///
+/// Apart from that, a sf::Music has almost the same features as
+/// the sf::SoundBuffer / sf::Sound pair: you can play/pause/stop
+/// it, request its parameters (channels, sample rate), change
+/// the way it is played (pitch, volume, 3D position, ...), etc.
+///
+/// As a sound stream, a music is played in its own thread in order
+/// not to block the rest of the program. This means that you can
+/// leave the music alone after calling play(), it will manage itself
+/// very well.
+///
+/// Usage example:
+/// \code
+/// // Declare a new music
+/// sf::Music music;
+///
+/// // Open it from an audio file
+/// if (!music.openFromFile("music.ogg"))
+/// {
+/// // error...
+/// }
+///
+/// // Change some parameters
+/// music.setPosition(0, 1, 10); // change its 3D position
+/// music.setPitch(2); // increase the pitch
+/// music.setVolume(50); // reduce the volume
+/// music.setLoop(true); // make it loop
+///
+/// // Play it
+/// music.play();
+/// \endcode
+///
+/// \see sf::Sound, sf::SoundStream
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/OutputSoundFile.hpp b/mcclone/external/sfml23/include/SFML/Audio/OutputSoundFile.hpp
new file mode 100644
index 0000000..8f60498
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/OutputSoundFile.hpp
@@ -0,0 +1,133 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_OUTPUTSOUNDFILE_HPP
+#define SFML_OUTPUTSOUNDFILE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+
+
+namespace sf
+{
+class SoundFileWriter;
+
+////////////////////////////////////////////////////////////
+/// \brief Provide write access to sound files
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API OutputSoundFile : NonCopyable
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ ////////////////////////////////////////////////////////////
+ OutputSoundFile();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ /// Closes the file if it was still open.
+ ///
+ ////////////////////////////////////////////////////////////
+ ~OutputSoundFile();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open the sound file from the disk for writing
+ ///
+ /// The supported audio formats are: WAV, OGG/Vorbis, FLAC.
+ ///
+ /// \param filename Path of the sound file to write
+ /// \param sampleRate Sample rate of the sound
+ /// \param channelCount Number of channels in the sound
+ ///
+ /// \return True if the file was successfully opened
+ ///
+ ////////////////////////////////////////////////////////////
+ bool openFromFile(const std::string& filename, unsigned int sampleRate, unsigned int channelCount);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Write audio samples to the file
+ ///
+ /// \param samples Pointer to the sample array to write
+ /// \param count Number of samples to write
+ ///
+ ////////////////////////////////////////////////////////////
+ void write(const Int16* samples, Uint64 count);
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Close the current file
+ ///
+ ////////////////////////////////////////////////////////////
+ void close();
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ SoundFileWriter* m_writer; ///< Writer that handles I/O on the file's format
+};
+
+} // namespace sf
+
+
+#endif // SFML_OUTPUTSOUNDFILE_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::OutputSoundFile
+/// \ingroup audio
+///
+/// This class encodes audio samples to a sound file. It is
+/// used internally by higher-level classes such as sf::SoundBuffer,
+/// but can also be useful if you want to create audio files from
+/// custom data sources, like generated audio samples.
+///
+/// Usage example:
+/// \code
+/// // Create a sound file, ogg/vorbis format, 44100 Hz, stereo
+/// sf::OutputSoundFile file;
+/// if (!file.openFromFile("music.ogg", 44100, 2))
+/// /* error */;
+///
+/// while (...)
+/// {
+/// // Read or generate audio samples from your custom source
+/// std::vector samples = ...;
+///
+/// // Write them to the file
+/// file.write(samples.data(), samples.size());
+/// }
+/// \endcode
+///
+/// \see sf::SoundFileWriter, sf::InputSoundFile
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/Sound.hpp b/mcclone/external/sfml23/include/SFML/Audio/Sound.hpp
new file mode 100644
index 0000000..8b0771d
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/Sound.hpp
@@ -0,0 +1,264 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUND_HPP
+#define SFML_SOUND_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+
+
+namespace sf
+{
+class SoundBuffer;
+
+////////////////////////////////////////////////////////////
+/// \brief Regular sound that can be played in the audio environment
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API Sound : public SoundSource
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ ////////////////////////////////////////////////////////////
+ Sound();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Construct the sound with a buffer
+ ///
+ /// \param buffer Sound buffer containing the audio data to play with the sound
+ ///
+ ////////////////////////////////////////////////////////////
+ explicit Sound(const SoundBuffer& buffer);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Copy constructor
+ ///
+ /// \param copy Instance to copy
+ ///
+ ////////////////////////////////////////////////////////////
+ Sound(const Sound& copy);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ ~Sound();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Start or resume playing the sound
+ ///
+ /// This function starts the stream if it was stopped, resumes
+ /// it if it was paused, and restarts it from beginning if it
+ /// was it already playing.
+ /// This function uses its own thread so that it doesn't block
+ /// the rest of the program while the sound is played.
+ ///
+ /// \see pause, stop
+ ///
+ ////////////////////////////////////////////////////////////
+ void play();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Pause the sound
+ ///
+ /// This function pauses the sound if it was playing,
+ /// otherwise (sound already paused or stopped) it has no effect.
+ ///
+ /// \see play, stop
+ ///
+ ////////////////////////////////////////////////////////////
+ void pause();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief stop playing the sound
+ ///
+ /// This function stops the sound if it was playing or paused,
+ /// and does nothing if it was already stopped.
+ /// It also resets the playing position (unlike pause()).
+ ///
+ /// \see play, pause
+ ///
+ ////////////////////////////////////////////////////////////
+ void stop();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the source buffer containing the audio data to play
+ ///
+ /// It is important to note that the sound buffer is not copied,
+ /// thus the sf::SoundBuffer instance must remain alive as long
+ /// as it is attached to the sound.
+ ///
+ /// \param buffer Sound buffer to attach to the sound
+ ///
+ /// \see getBuffer
+ ///
+ ////////////////////////////////////////////////////////////
+ void setBuffer(const SoundBuffer& buffer);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set whether or not the sound should loop after reaching the end
+ ///
+ /// If set, the sound will restart from beginning after
+ /// reaching the end and so on, until it is stopped or
+ /// setLoop(false) is called.
+ /// The default looping state for sound is false.
+ ///
+ /// \param loop True to play in loop, false to play once
+ ///
+ /// \see getLoop
+ ///
+ ////////////////////////////////////////////////////////////
+ void setLoop(bool loop);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the current playing position of the sound
+ ///
+ /// The playing position can be changed when the sound is
+ /// either paused or playing. Changing the playing position
+ /// when the sound is stopped has no effect, since playing
+ /// the sound will reset its position.
+ ///
+ /// \param timeOffset New playing position, from the beginning of the sound
+ ///
+ /// \see getPlayingOffset
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPlayingOffset(Time timeOffset);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the audio buffer attached to the sound
+ ///
+ /// \return Sound buffer attached to the sound (can be NULL)
+ ///
+ ////////////////////////////////////////////////////////////
+ const SoundBuffer* getBuffer() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Tell whether or not the sound is in loop mode
+ ///
+ /// \return True if the sound is looping, false otherwise
+ ///
+ /// \see setLoop
+ ///
+ ////////////////////////////////////////////////////////////
+ bool getLoop() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current playing position of the sound
+ ///
+ /// \return Current playing position, from the beginning of the sound
+ ///
+ /// \see setPlayingOffset
+ ///
+ ////////////////////////////////////////////////////////////
+ Time getPlayingOffset() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current status of the sound (stopped, paused, playing)
+ ///
+ /// \return Current status of the sound
+ ///
+ ////////////////////////////////////////////////////////////
+ Status getStatus() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Overload of assignment operator
+ ///
+ /// \param right Instance to assign
+ ///
+ /// \return Reference to self
+ ///
+ ////////////////////////////////////////////////////////////
+ Sound& operator =(const Sound& right);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Reset the internal buffer of the sound
+ ///
+ /// This function is for internal use only, you don't have
+ /// to use it. It is called by the sf::SoundBuffer that
+ /// this sound uses, when it is destroyed in order to prevent
+ /// the sound from using a dead buffer.
+ ///
+ ////////////////////////////////////////////////////////////
+ void resetBuffer();
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ const SoundBuffer* m_buffer; ///< Sound buffer bound to the source
+};
+
+} // namespace sf
+
+
+#endif // SFML_SOUND_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::Sound
+/// \ingroup audio
+///
+/// sf::Sound is the class to use to play sounds.
+/// It provides:
+/// \li Control (play, pause, stop)
+/// \li Ability to modify output parameters in real-time (pitch, volume, ...)
+/// \li 3D spatial features (position, attenuation, ...).
+///
+/// sf::Sound is perfect for playing short sounds that can
+/// fit in memory and require no latency, like foot steps or
+/// gun shots. For longer sounds, like background musics
+/// or long speeches, rather see sf::Music (which is based
+/// on streaming).
+///
+/// In order to work, a sound must be given a buffer of audio
+/// data to play. Audio data (samples) is stored in sf::SoundBuffer,
+/// and attached to a sound with the setBuffer() function.
+/// The buffer object attached to a sound must remain alive
+/// as long as the sound uses it. Note that multiple sounds
+/// can use the same sound buffer at the same time.
+///
+/// Usage example:
+/// \code
+/// sf::SoundBuffer buffer;
+/// buffer.loadFromFile("sound.wav");
+///
+/// sf::Sound sound;
+/// sound.setBuffer(buffer);
+/// sound.play();
+/// \endcode
+///
+/// \see sf::SoundBuffer, sf::Music
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundBuffer.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundBuffer.hpp
new file mode 100644
index 0000000..42eda6f
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundBuffer.hpp
@@ -0,0 +1,352 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDBUFFER_HPP
+#define SFML_SOUNDBUFFER_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+namespace sf
+{
+class Sound;
+class InputSoundFile;
+class InputStream;
+
+////////////////////////////////////////////////////////////
+/// \brief Storage for audio samples defining a sound
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundBuffer : AlResource
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ ////////////////////////////////////////////////////////////
+ SoundBuffer();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Copy constructor
+ ///
+ /// \param copy Instance to copy
+ ///
+ ////////////////////////////////////////////////////////////
+ SoundBuffer(const SoundBuffer& copy);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ ~SoundBuffer();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Load the sound buffer from a file
+ ///
+ /// See the documentation of sf::InputSoundFile for the list
+ /// of supported formats.
+ ///
+ /// \param filename Path of the sound file to load
+ ///
+ /// \return True if loading succeeded, false if it failed
+ ///
+ /// \see loadFromMemory, loadFromStream, loadFromSamples, saveToFile
+ ///
+ ////////////////////////////////////////////////////////////
+ bool loadFromFile(const std::string& filename);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Load the sound buffer from a file in memory
+ ///
+ /// See the documentation of sf::InputSoundFile for the list
+ /// of supported formats.
+ ///
+ /// \param data Pointer to the file data in memory
+ /// \param sizeInBytes Size of the data to load, in bytes
+ ///
+ /// \return True if loading succeeded, false if it failed
+ ///
+ /// \see loadFromFile, loadFromStream, loadFromSamples
+ ///
+ ////////////////////////////////////////////////////////////
+ bool loadFromMemory(const void* data, std::size_t sizeInBytes);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Load the sound buffer from a custom stream
+ ///
+ /// See the documentation of sf::InputSoundFile for the list
+ /// of supported formats.
+ ///
+ /// \param stream Source stream to read from
+ ///
+ /// \return True if loading succeeded, false if it failed
+ ///
+ /// \see loadFromFile, loadFromMemory, loadFromSamples
+ ///
+ ////////////////////////////////////////////////////////////
+ bool loadFromStream(InputStream& stream);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Load the sound buffer from an array of audio samples
+ ///
+ /// The assumed format of the audio samples is 16 bits signed integer
+ /// (sf::Int16).
+ ///
+ /// \param samples Pointer to the array of samples in memory
+ /// \param sampleCount Number of samples in the array
+ /// \param channelCount Number of channels (1 = mono, 2 = stereo, ...)
+ /// \param sampleRate Sample rate (number of samples to play per second)
+ ///
+ /// \return True if loading succeeded, false if it failed
+ ///
+ /// \see loadFromFile, loadFromMemory, saveToFile
+ ///
+ ////////////////////////////////////////////////////////////
+ bool loadFromSamples(const Int16* samples, Uint64 sampleCount, unsigned int channelCount, unsigned int sampleRate);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Save the sound buffer to an audio file
+ ///
+ /// See the documentation of sf::OutputSoundFile for the list
+ /// of supported formats.
+ ///
+ /// \param filename Path of the sound file to write
+ ///
+ /// \return True if saving succeeded, false if it failed
+ ///
+ /// \see loadFromFile, loadFromMemory, loadFromSamples
+ ///
+ ////////////////////////////////////////////////////////////
+ bool saveToFile(const std::string& filename) const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the array of audio samples stored in the buffer
+ ///
+ /// The format of the returned samples is 16 bits signed integer
+ /// (sf::Int16). The total number of samples in this array
+ /// is given by the getSampleCount() function.
+ ///
+ /// \return Read-only pointer to the array of sound samples
+ ///
+ /// \see getSampleCount
+ ///
+ ////////////////////////////////////////////////////////////
+ const Int16* getSamples() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the number of samples stored in the buffer
+ ///
+ /// The array of samples can be accessed with the getSamples()
+ /// function.
+ ///
+ /// \return Number of samples
+ ///
+ /// \see getSamples
+ ///
+ ////////////////////////////////////////////////////////////
+ Uint64 getSampleCount() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the sample rate of the sound
+ ///
+ /// The sample rate is the number of samples played per second.
+ /// The higher, the better the quality (for example, 44100
+ /// samples/s is CD quality).
+ ///
+ /// \return Sample rate (number of samples per second)
+ ///
+ /// \see getChannelCount, getDuration
+ ///
+ ////////////////////////////////////////////////////////////
+ unsigned int getSampleRate() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the number of channels used by the sound
+ ///
+ /// If the sound is mono then the number of channels will
+ /// be 1, 2 for stereo, etc.
+ ///
+ /// \return Number of channels
+ ///
+ /// \see getSampleRate, getDuration
+ ///
+ ////////////////////////////////////////////////////////////
+ unsigned int getChannelCount() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the total duration of the sound
+ ///
+ /// \return Sound duration
+ ///
+ /// \see getSampleRate, getChannelCount
+ ///
+ ////////////////////////////////////////////////////////////
+ Time getDuration() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Overload of assignment operator
+ ///
+ /// \param right Instance to assign
+ ///
+ /// \return Reference to self
+ ///
+ ////////////////////////////////////////////////////////////
+ SoundBuffer& operator =(const SoundBuffer& right);
+
+private:
+
+ friend class Sound;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Initialize the internal state after loading a new sound
+ ///
+ /// \param file Sound file providing access to the new loaded sound
+ ///
+ /// \return True on successful initialization, false on failure
+ ///
+ ////////////////////////////////////////////////////////////
+ bool initialize(InputSoundFile& file);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Update the internal buffer with the cached audio samples
+ ///
+ /// \param channelCount Number of channels
+ /// \param sampleRate Sample rate (number of samples per second)
+ ///
+ /// \return True on success, false if any error happened
+ ///
+ ////////////////////////////////////////////////////////////
+ bool update(unsigned int channelCount, unsigned int sampleRate);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Add a sound to the list of sounds that use this buffer
+ ///
+ /// \param sound Sound instance to attach
+ ///
+ ////////////////////////////////////////////////////////////
+ void attachSound(Sound* sound) const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Remove a sound from the list of sounds that use this buffer
+ ///
+ /// \param sound Sound instance to detach
+ ///
+ ////////////////////////////////////////////////////////////
+ void detachSound(Sound* sound) const;
+
+ ////////////////////////////////////////////////////////////
+ // Types
+ ////////////////////////////////////////////////////////////
+ typedef std::set SoundList; ///< Set of unique sound instances
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ unsigned int m_buffer; ///< OpenAL buffer identifier
+ std::vector m_samples; ///< Samples buffer
+ Time m_duration; ///< Sound duration
+ mutable SoundList m_sounds; ///< List of sounds that are using this buffer
+};
+
+} // namespace sf
+
+
+#endif // SFML_SOUNDBUFFER_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundBuffer
+/// \ingroup audio
+///
+/// A sound buffer holds the data of a sound, which is
+/// an array of audio samples. A sample is a 16 bits signed integer
+/// that defines the amplitude of the sound at a given time.
+/// The sound is then reconstituted by playing these samples at
+/// a high rate (for example, 44100 samples per second is the
+/// standard rate used for playing CDs). In short, audio samples
+/// are like texture pixels, and a sf::SoundBuffer is similar to
+/// a sf::Texture.
+///
+/// A sound buffer can be loaded from a file (see loadFromFile()
+/// for the complete list of supported formats), from memory, from
+/// a custom stream (see sf::InputStream) or directly from an array
+/// of samples. It can also be saved back to a file.
+///
+/// Sound buffers alone are not very useful: they hold the audio data
+/// but cannot be played. To do so, you need to use the sf::Sound class,
+/// which provides functions to play/pause/stop the sound as well as
+/// changing the way it is outputted (volume, pitch, 3D position, ...).
+/// This separation allows more flexibility and better performances:
+/// indeed a sf::SoundBuffer is a heavy resource, and any operation on it
+/// is slow (often too slow for real-time applications). On the other
+/// side, a sf::Sound is a lightweight object, which can use the audio data
+/// of a sound buffer and change the way it is played without actually
+/// modifying that data. Note that it is also possible to bind
+/// several sf::Sound instances to the same sf::SoundBuffer.
+///
+/// It is important to note that the sf::Sound instance doesn't
+/// copy the buffer that it uses, it only keeps a reference to it.
+/// Thus, a sf::SoundBuffer must not be destructed while it is
+/// used by a sf::Sound (i.e. never write a function that
+/// uses a local sf::SoundBuffer instance for loading a sound).
+///
+/// Usage example:
+/// \code
+/// // Declare a new sound buffer
+/// sf::SoundBuffer buffer;
+///
+/// // Load it from a file
+/// if (!buffer.loadFromFile("sound.wav"))
+/// {
+/// // error...
+/// }
+///
+/// // Create a sound source and bind it to the buffer
+/// sf::Sound sound1;
+/// sound1.setBuffer(buffer);
+///
+/// // Play the sound
+/// sound1.play();
+///
+/// // Create another sound source bound to the same buffer
+/// sf::Sound sound2;
+/// sound2.setBuffer(buffer);
+///
+/// // Play it with a higher pitch -- the first sound remains unchanged
+/// sound2.setPitch(2);
+/// sound2.play();
+/// \endcode
+///
+/// \see sf::Sound, sf::SoundBufferRecorder
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundBufferRecorder.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundBufferRecorder.hpp
new file mode 100644
index 0000000..7715ac5
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundBufferRecorder.hpp
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDBUFFERRECORDER_HPP
+#define SFML_SOUNDBUFFERRECORDER_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Specialized SoundRecorder which stores the captured
+/// audio data into a sound buffer
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundBufferRecorder : public SoundRecorder
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the sound buffer containing the captured audio data
+ ///
+ /// The sound buffer is valid only after the capture has ended.
+ /// This function provides a read-only access to the internal
+ /// sound buffer, but it can be copied if you need to
+ /// make any modification to it.
+ ///
+ /// \return Read-only access to the sound buffer
+ ///
+ ////////////////////////////////////////////////////////////
+ const SoundBuffer& getBuffer() const;
+
+protected:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Start capturing audio data
+ ///
+ /// \return True to start the capture, or false to abort it
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool onStart();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Process a new chunk of recorded samples
+ ///
+ /// \param samples Pointer to the new chunk of recorded samples
+ /// \param sampleCount Number of samples pointed by \a samples
+ ///
+ /// \return True to continue the capture, or false to stop it
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool onProcessSamples(const Int16* samples, std::size_t sampleCount);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Stop capturing audio data
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void onStop();
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ std::vector m_samples; ///< Temporary sample buffer to hold the recorded data
+ SoundBuffer m_buffer; ///< Sound buffer that will contain the recorded data
+};
+
+} // namespace sf
+
+#endif // SFML_SOUNDBUFFERRECORDER_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundBufferRecorder
+/// \ingroup audio
+///
+/// sf::SoundBufferRecorder allows to access a recorded sound
+/// through a sf::SoundBuffer, so that it can be played, saved
+/// to a file, etc.
+///
+/// It has the same simple interface as its base class (start(), stop())
+/// and adds a function to retrieve the recorded sound buffer
+/// (getBuffer()).
+///
+/// As usual, don't forget to call the isAvailable() function
+/// before using this class (see sf::SoundRecorder for more details
+/// about this).
+///
+/// Usage example:
+/// \code
+/// if (sf::SoundBufferRecorder::isAvailable())
+/// {
+/// // Record some audio data
+/// sf::SoundBufferRecorder recorder;
+/// recorder.start();
+/// ...
+/// recorder.stop();
+///
+/// // Get the buffer containing the captured audio data
+/// const sf::SoundBuffer& buffer = recorder.getBuffer();
+///
+/// // Save it to a file (for example...)
+/// buffer.saveToFile("my_record.ogg");
+/// }
+/// \endcode
+///
+/// \see sf::SoundRecorder
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundFileFactory.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundFileFactory.hpp
new file mode 100644
index 0000000..bd346cc
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundFileFactory.hpp
@@ -0,0 +1,197 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDFILEFACTORY_HPP
+#define SFML_SOUNDFILEFACTORY_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+
+
+namespace sf
+{
+class InputStream;
+class SoundFileReader;
+class SoundFileWriter;
+
+////////////////////////////////////////////////////////////
+/// \brief Manages and instantiates sound file readers and writers
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundFileFactory
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Register a new reader
+ ///
+ /// \see unregisterReader
+ ///
+ ////////////////////////////////////////////////////////////
+ template
+ static void registerReader();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Unregister a reader
+ ///
+ /// \see registerReader
+ ///
+ ////////////////////////////////////////////////////////////
+ template
+ static void unregisterReader();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Register a new writer
+ ///
+ /// \see unregisterWriter
+ ///
+ ////////////////////////////////////////////////////////////
+ template
+ static void registerWriter();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Unregister a writer
+ ///
+ /// \see registerWriter
+ ///
+ ////////////////////////////////////////////////////////////
+ template
+ static void unregisterWriter();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Instantiate the right reader for the given file on disk
+ ///
+ /// It's up to the caller to release the returned reader
+ ///
+ /// \param filename Path of the sound file
+ ///
+ /// \return A new sound file reader that can read the given file, or null if no reader can handle it
+ ///
+ /// \see createReaderFromMemory, createReaderFromStream
+ ///
+ ////////////////////////////////////////////////////////////
+ static SoundFileReader* createReaderFromFilename(const std::string& filename);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Instantiate the right codec for the given file in memory
+ ///
+ /// It's up to the caller to release the returned reader
+ ///
+ /// \param data Pointer to the file data in memory
+ /// \param sizeInBytes Total size of the file data, in bytes
+ ///
+ /// \return A new sound file codec that can read the given file, or null if no codec can handle it
+ ///
+ /// \see createReaderFromFilename, createReaderFromStream
+ ///
+ ////////////////////////////////////////////////////////////
+ static SoundFileReader* createReaderFromMemory(const void* data, std::size_t sizeInBytes);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Instantiate the right codec for the given file in stream
+ ///
+ /// It's up to the caller to release the returned reader
+ ///
+ /// \param stream Source stream to read from
+ ///
+ /// \return A new sound file codec that can read the given file, or null if no codec can handle it
+ ///
+ /// \see createReaderFromFilename, createReaderFromMemory
+ ///
+ ////////////////////////////////////////////////////////////
+ static SoundFileReader* createReaderFromStream(InputStream& stream);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Instantiate the right writer for the given file on disk
+ ///
+ /// It's up to the caller to release the returned writer
+ ///
+ /// \param filename Path of the sound file
+ ///
+ /// \return A new sound file writer that can write given file, or null if no writer can handle it
+ ///
+ ////////////////////////////////////////////////////////////
+ static SoundFileWriter* createWriterFromFilename(const std::string& filename);
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ // Types
+ ////////////////////////////////////////////////////////////
+ struct ReaderFactory
+ {
+ bool (*check)(InputStream&);
+ SoundFileReader* (*create)();
+ };
+ typedef std::vector ReaderFactoryArray;
+
+ struct WriterFactory
+ {
+ bool (*check)(const std::string&);
+ SoundFileWriter* (*create)();
+ };
+ typedef std::vector WriterFactoryArray;
+
+ ////////////////////////////////////////////////////////////
+ // Static member data
+ ////////////////////////////////////////////////////////////
+ static ReaderFactoryArray s_readers; ///< List of all registered readers
+ static WriterFactoryArray s_writers; ///< List of all registered writers
+};
+
+} // namespace sf
+
+#include
+
+#endif // SFML_SOUNDFILEFACTORY_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundFileFactory
+/// \ingroup audio
+///
+/// This class is where all the sound file readers and writers are
+/// registered. You should normally only need to use its registration
+/// and unregistration functions; readers/writers creation and manipulation
+/// are wrapped into the higher-level classes sf::InputSoundFile and
+/// sf::OutputSoundFile.
+///
+/// To register a new reader (writer) use the sf::SoundFileFactory::registerReader
+/// (registerWriter) static function. You don't have to call the unregisterReader
+/// (unregisterWriter) function, unless you want to unregister a format before your
+/// application ends (typically, when a plugin is unloaded).
+///
+/// Usage example:
+/// \code
+/// sf::SoundFileFactory::registerReader();
+/// sf::SoundFileFactory::registerWriter();
+/// \endcode
+///
+/// \see sf::InputSoundFile, sf::OutputSoundFile, sf::SoundFileReader, sf::SoundFileWriter
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundFileFactory.inl b/mcclone/external/sfml23/include/SFML/Audio/SoundFileFactory.inl
new file mode 100644
index 0000000..19d334b
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundFileFactory.inl
@@ -0,0 +1,100 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+
+
+namespace sf
+{
+namespace priv
+{
+ template SoundFileReader* createReader() {return new T;}
+ template SoundFileWriter* createWriter() {return new T;}
+}
+
+////////////////////////////////////////////////////////////
+template
+void SoundFileFactory::registerReader()
+{
+ // Make sure the same class won't be registered twice
+ unregisterReader();
+
+ // Create a new factory with the functions provided by the class
+ ReaderFactory factory;
+ factory.check = &T::check;
+ factory.create = &priv::createReader;
+
+ // Add it
+ s_readers.push_back(factory);
+}
+
+
+////////////////////////////////////////////////////////////
+template
+void SoundFileFactory::unregisterReader()
+{
+ // Remove the instance(s) of the reader from the array of factories
+ for (ReaderFactoryArray::iterator it = s_readers.begin(); it != s_readers.end(); )
+ {
+ if (it->create == &priv::createReader)
+ it = s_readers.erase(it);
+ else
+ ++it;
+ }
+}
+
+////////////////////////////////////////////////////////////
+template
+void SoundFileFactory::registerWriter()
+{
+ // Make sure the same class won't be registered twice
+ unregisterWriter();
+
+ // Create a new factory with the functions provided by the class
+ WriterFactory factory;
+ factory.check = &T::check;
+ factory.create = &priv::createWriter;
+
+ // Add it
+ s_writers.push_back(factory);
+}
+
+
+////////////////////////////////////////////////////////////
+template
+void SoundFileFactory::unregisterWriter()
+{
+ // Remove the instance(s) of the writer from the array of factories
+ for (WriterFactoryArray::iterator it = s_writers.begin(); it != s_writers.end(); )
+ {
+ if (it->create == &priv::createWriter)
+ it = s_writers.erase(it);
+ else
+ ++it;
+ }
+}
+
+} // namespace sf
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundFileReader.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundFileReader.hpp
new file mode 100644
index 0000000..549f50b
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundFileReader.hpp
@@ -0,0 +1,161 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDFILEREADER_HPP
+#define SFML_SOUNDFILEREADER_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+namespace sf
+{
+class InputStream;
+
+////////////////////////////////////////////////////////////
+/// \brief Abstract base class for sound file decoding
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundFileReader
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Structure holding the audio properties of a sound file
+ ///
+ ////////////////////////////////////////////////////////////
+ struct Info
+ {
+ Uint64 sampleCount; ///< Total number of samples in the file
+ unsigned int channelCount; ///< Number of channels of the sound
+ unsigned int sampleRate; ///< Samples rate of the sound, in samples per second
+ };
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Virtual destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual ~SoundFileReader() {}
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a sound file for reading
+ ///
+ /// The provided stream reference is valid as long as the
+ /// SoundFileReader is alive, so it is safe to use/store it
+ /// during the whole lifetime of the reader.
+ ///
+ /// \param stream Source stream to read from
+ /// \param info Structure to fill with the properties of the loaded sound
+ ///
+ /// \return True if the file was successfully opened
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool open(InputStream& stream, Info& info) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the current read position to the given sample offset
+ ///
+ /// If the given offset exceeds to total number of samples,
+ /// this function must jump to the end of the file.
+ ///
+ /// \param sampleOffset Index of the sample to jump to, relative to the beginning
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void seek(Uint64 sampleOffset) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Read audio samples from the open file
+ ///
+ /// \param samples Pointer to the sample array to fill
+ /// \param maxCount Maximum number of samples to read
+ ///
+ /// \return Number of samples actually read (may be less than \a maxCount)
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual Uint64 read(Int16* samples, Uint64 maxCount) = 0;
+};
+
+} // namespace sf
+
+
+#endif // SFML_SOUNDFILEREADER_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundFileReader
+/// \ingroup audio
+///
+/// This class allows users to read audio file formats not natively
+/// supported by SFML, and thus extend the set of supported readable
+/// audio formats.
+///
+/// A valid sound file reader must override the open, seek and write functions,
+/// as well as providing a static check function; the latter is used by
+/// SFML to find a suitable writer for a given input file.
+///
+/// To register a new reader, use the sf::SoundFileFactory::registerReader
+/// template function.
+///
+/// Usage example:
+/// \code
+/// class MySoundFileReader : public sf::SoundFileReader
+/// {
+/// public:
+///
+/// static bool check(sf::InputStream& stream)
+/// {
+/// // typically, read the first few header bytes and check fields that identify the format
+/// // return true if the reader can handle the format
+/// }
+///
+/// virtual bool open(sf::InputStream& stream, Info& info)
+/// {
+/// // read the sound file header and fill the sound attributes
+/// // (channel count, sample count and sample rate)
+/// // return true on success
+/// }
+///
+/// virtual void seek(sf::Uint64 sampleOffset)
+/// {
+/// // advance to the sampleOffset-th sample from the beginning of the sound
+/// }
+///
+/// virtual sf::Uint64 read(sf::Int16* samples, sf::Uint64 maxCount)
+/// {
+/// // read up to 'maxCount' samples into the 'samples' array,
+/// // convert them (for example from normalized float) if they are not stored
+/// // as 16-bits signed integers in the file
+/// // return the actual number of samples read
+/// }
+/// };
+///
+/// sf::SoundFileFactory::registerReader();
+/// \endcode
+///
+/// \see sf::InputSoundFile, sf::SoundFileFactory, sf::SoundFileWriter
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundFileWriter.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundFileWriter.hpp
new file mode 100644
index 0000000..36a2678
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundFileWriter.hpp
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDFILEWRITER_HPP
+#define SFML_SOUNDFILEWRITER_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Abstract base class for sound file encoding
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundFileWriter
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Virtual destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual ~SoundFileWriter() {}
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Open a sound file for writing
+ ///
+ /// \param filename Path of the file to open
+ /// \param sampleRate Sample rate of the sound
+ /// \param channelCount Number of channels of the sound
+ ///
+ /// \return True if the file was successfully opened
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Write audio samples to the open file
+ ///
+ /// \param samples Pointer to the sample array to write
+ /// \param count Number of samples to write
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void write(const Int16* samples, Uint64 count) = 0;
+};
+
+} // namespace sf
+
+
+#endif // SFML_SOUNDFILEWRITER_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundFileWriter
+/// \ingroup audio
+///
+/// This class allows users to write audio file formats not natively
+/// supported by SFML, and thus extend the set of supported writable
+/// audio formats.
+///
+/// A valid sound file writer must override the open and write functions,
+/// as well as providing a static check function; the latter is used by
+/// SFML to find a suitable writer for a given filename.
+///
+/// To register a new writer, use the sf::SoundFileFactory::registerWriter
+/// template function.
+///
+/// Usage example:
+/// \code
+/// class MySoundFileWriter : public sf::SoundFileWriter
+/// {
+/// public:
+///
+/// static bool check(const std::string& filename)
+/// {
+/// // typically, check the extension
+/// // return true if the writer can handle the format
+/// }
+///
+/// virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount)
+/// {
+/// // open the file 'filename' for writing,
+/// // write the given sample rate and channel count to the file header
+/// // return true on success
+/// }
+///
+/// virtual void write(const sf::Int16* samples, sf::Uint64 count)
+/// {
+/// // write 'count' samples stored at address 'samples',
+/// // convert them (for example to normalized float) if the format requires it
+/// }
+/// };
+///
+/// sf::SoundFileFactory::registerWriter();
+/// \endcode
+///
+/// \see sf::OutputSoundFile, sf::SoundFileFactory, sf::SoundFileReader
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundRecorder.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundRecorder.hpp
new file mode 100644
index 0000000..964e4f3
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundRecorder.hpp
@@ -0,0 +1,364 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDRECORDER_HPP
+#define SFML_SOUNDRECORDER_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Abstract base class for capturing sound data
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundRecorder : AlResource
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual ~SoundRecorder();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Start the capture
+ ///
+ /// The \a sampleRate parameter defines the number of audio samples
+ /// captured per second. The higher, the better the quality
+ /// (for example, 44100 samples/sec is CD quality).
+ /// This function uses its own thread so that it doesn't block
+ /// the rest of the program while the capture runs.
+ /// Please note that only one capture can happen at the same time.
+ /// You can select which capture device will be used, by passing
+ /// the name to the setDevice() method. If none was selected
+ /// before, the default capture device will be used. You can get a
+ /// list of the names of all available capture devices by calling
+ /// getAvailableDevices().
+ ///
+ /// \param sampleRate Desired capture rate, in number of samples per second
+ ///
+ /// \return True, if start of capture was successful
+ ///
+ /// \see stop, getAvailableDevices
+ ///
+ ////////////////////////////////////////////////////////////
+ bool start(unsigned int sampleRate = 44100);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Stop the capture
+ ///
+ /// \see start
+ ///
+ ////////////////////////////////////////////////////////////
+ void stop();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the sample rate
+ ///
+ /// The sample rate defines the number of audio samples
+ /// captured per second. The higher, the better the quality
+ /// (for example, 44100 samples/sec is CD quality).
+ ///
+ /// \return Sample rate, in samples per second
+ ///
+ ////////////////////////////////////////////////////////////
+ unsigned int getSampleRate() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get a list of the names of all available audio capture devices
+ ///
+ /// This function returns a vector of strings, containing
+ /// the names of all available audio capture devices.
+ ///
+ /// \return A vector of strings containing the names
+ ///
+ ////////////////////////////////////////////////////////////
+ static std::vector getAvailableDevices();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the name of the default audio capture device
+ ///
+ /// This function returns the name of the default audio
+ /// capture device. If none is available, an empty string
+ /// is returned.
+ ///
+ /// \return The name of the default audio capture device
+ ///
+ ////////////////////////////////////////////////////////////
+ static std::string getDefaultDevice();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the audio capture device
+ ///
+ /// This function sets the audio capture device to the device
+ /// with the given \a name. It can be called on the fly (i.e:
+ /// while recording). If you do so while recording and
+ /// opening the device fails, it stops the recording.
+ ///
+ /// \param name The name of the audio capture device
+ ///
+ /// \return True, if it was able to set the requested device
+ ///
+ /// \see getAvailableDevices, getDefaultDevice
+ ///
+ ////////////////////////////////////////////////////////////
+ bool setDevice(const std::string& name);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the name of the current audio capture device
+ ///
+ /// \return The name of the current audio capture device
+ ///
+ ////////////////////////////////////////////////////////////
+ const std::string& getDevice() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Check if the system supports audio capture
+ ///
+ /// This function should always be called before using
+ /// the audio capture features. If it returns false, then
+ /// any attempt to use sf::SoundRecorder or one of its derived
+ /// classes will fail.
+ ///
+ /// \return True if audio capture is supported, false otherwise
+ ///
+ ////////////////////////////////////////////////////////////
+ static bool isAvailable();
+
+protected:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ /// This constructor is only meant to be called by derived classes.
+ ///
+ ////////////////////////////////////////////////////////////
+ SoundRecorder();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the processing interval
+ ///
+ /// The processing interval controls the period
+ /// between calls to the onProcessSamples function. You may
+ /// want to use a small interval if you want to process the
+ /// recorded data in real time, for example.
+ ///
+ /// Note: this is only a hint, the actual period may vary.
+ /// So don't rely on this parameter to implement precise timing.
+ ///
+ /// The default processing interval is 100 ms.
+ ///
+ /// \param interval Processing interval
+ ///
+ ////////////////////////////////////////////////////////////
+ void setProcessingInterval(Time interval);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Start capturing audio data
+ ///
+ /// This virtual function may be overridden by a derived class
+ /// if something has to be done every time a new capture
+ /// starts. If not, this function can be ignored; the default
+ /// implementation does nothing.
+ ///
+ /// \return True to start the capture, or false to abort it
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool onStart();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Process a new chunk of recorded samples
+ ///
+ /// This virtual function is called every time a new chunk of
+ /// recorded data is available. The derived class can then do
+ /// whatever it wants with it (storing it, playing it, sending
+ /// it over the network, etc.).
+ ///
+ /// \param samples Pointer to the new chunk of recorded samples
+ /// \param sampleCount Number of samples pointed by \a samples
+ ///
+ /// \return True to continue the capture, or false to stop it
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool onProcessSamples(const Int16* samples, std::size_t sampleCount) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Stop capturing audio data
+ ///
+ /// This virtual function may be overridden by a derived class
+ /// if something has to be done every time the capture
+ /// ends. If not, this function can be ignored; the default
+ /// implementation does nothing.
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void onStop();
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Function called as the entry point of the thread
+ ///
+ /// This function starts the recording loop, and returns
+ /// only when the capture is stopped.
+ ///
+ ////////////////////////////////////////////////////////////
+ void record();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the new available audio samples and process them
+ ///
+ /// This function is called continuously during the
+ /// capture loop. It retrieves the captured samples and
+ /// forwards them to the derived class.
+ ///
+ ////////////////////////////////////////////////////////////
+ void processCapturedSamples();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Clean up the recorder's internal resources
+ ///
+ /// This function is called when the capture stops.
+ ///
+ ////////////////////////////////////////////////////////////
+ void cleanup();
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ Thread m_thread; ///< Thread running the background recording task
+ std::vector m_samples; ///< Buffer to store captured samples
+ unsigned int m_sampleRate; ///< Sample rate
+ Time m_processingInterval; ///< Time period between calls to onProcessSamples
+ bool m_isCapturing; ///< Capturing state
+ std::string m_deviceName; ///< Name of the audio capture device
+};
+
+} // namespace sf
+
+
+#endif // SFML_SOUNDRECORDER_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundRecorder
+/// \ingroup audio
+///
+/// sf::SoundBuffer provides a simple interface to access
+/// the audio recording capabilities of the computer
+/// (the microphone). As an abstract base class, it only cares
+/// about capturing sound samples, the task of making something
+/// useful with them is left to the derived class. Note that
+/// SFML provides a built-in specialization for saving the
+/// captured data to a sound buffer (see sf::SoundBufferRecorder).
+///
+/// A derived class has only one virtual function to override:
+/// \li onProcessSamples provides the new chunks of audio samples while the capture happens
+///
+/// Moreover, two additional virtual functions can be overridden
+/// as well if necessary:
+/// \li onStart is called before the capture happens, to perform custom initializations
+/// \li onStop is called after the capture ends, to perform custom cleanup
+///
+/// A derived class can also control the frequency of the onProcessSamples
+/// calls, with the setProcessingInterval protected function. The default
+/// interval is chosen so that recording thread doesn't consume too much
+/// CPU, but it can be changed to a smaller value if you need to process
+/// the recorded data in real time, for example.
+///
+/// The audio capture feature may not be supported or activated
+/// on every platform, thus it is recommended to check its
+/// availability with the isAvailable() function. If it returns
+/// false, then any attempt to use an audio recorder will fail.
+///
+/// If you have multiple sound input devices connected to your
+/// computer (for example: microphone, external soundcard, webcam mic, ...)
+/// you can get a list of all available devices through the
+/// getAvailableDevices() function. You can then select a device
+/// by calling setDevice() with the appropriate device. Otherwise
+/// the default capturing device will be used.
+///
+/// It is important to note that the audio capture happens in a
+/// separate thread, so that it doesn't block the rest of the
+/// program. In particular, the onProcessSamples virtual function
+/// (but not onStart and not onStop) will be called
+/// from this separate thread. It is important to keep this in
+/// mind, because you may have to take care of synchronization
+/// issues if you share data between threads.
+///
+/// Usage example:
+/// \code
+/// class CustomRecorder : public sf::SoundRecorder
+/// {
+/// virtual bool onStart() // optional
+/// {
+/// // Initialize whatever has to be done before the capture starts
+/// ...
+///
+/// // Return true to start playing
+/// return true;
+/// }
+///
+/// virtual bool onProcessSamples(const Int16* samples, std::size_t sampleCount)
+/// {
+/// // Do something with the new chunk of samples (store them, send them, ...)
+/// ...
+///
+/// // Return true to continue playing
+/// return true;
+/// }
+///
+/// virtual void onStop() // optional
+/// {
+/// // Clean up whatever has to be done after the capture ends
+/// ...
+/// }
+/// }
+///
+/// // Usage
+/// if (CustomRecorder::isAvailable())
+/// {
+/// CustomRecorder recorder;
+///
+/// if (!recorder.start())
+/// return -1;
+///
+/// ...
+/// recorder.stop();
+/// }
+/// \endcode
+///
+/// \see sf::SoundBufferRecorder
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundSource.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundSource.hpp
new file mode 100644
index 0000000..cde0a3b
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundSource.hpp
@@ -0,0 +1,287 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDSOURCE_HPP
+#define SFML_SOUNDSOURCE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Base class defining a sound's properties
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundSource : AlResource
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Enumeration of the sound source states
+ ///
+ ////////////////////////////////////////////////////////////
+ enum Status
+ {
+ Stopped, ///< Sound is not playing
+ Paused, ///< Sound is paused
+ Playing ///< Sound is playing
+ };
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Copy constructor
+ ///
+ /// \param copy Instance to copy
+ ///
+ ////////////////////////////////////////////////////////////
+ SoundSource(const SoundSource& copy);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual ~SoundSource();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the pitch of the sound
+ ///
+ /// The pitch represents the perceived fundamental frequency
+ /// of a sound; thus you can make a sound more acute or grave
+ /// by changing its pitch. A side effect of changing the pitch
+ /// is to modify the playing speed of the sound as well.
+ /// The default value for the pitch is 1.
+ ///
+ /// \param pitch New pitch to apply to the sound
+ ///
+ /// \see getPitch
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPitch(float pitch);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the volume of the sound
+ ///
+ /// The volume is a value between 0 (mute) and 100 (full volume).
+ /// The default value for the volume is 100.
+ ///
+ /// \param volume Volume of the sound
+ ///
+ /// \see getVolume
+ ///
+ ////////////////////////////////////////////////////////////
+ void setVolume(float volume);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the 3D position of the sound in the audio scene
+ ///
+ /// Only sounds with one channel (mono sounds) can be
+ /// spatialized.
+ /// The default position of a sound is (0, 0, 0).
+ ///
+ /// \param x X coordinate of the position of the sound in the scene
+ /// \param y Y coordinate of the position of the sound in the scene
+ /// \param z Z coordinate of the position of the sound in the scene
+ ///
+ /// \see getPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPosition(float x, float y, float z);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the 3D position of the sound in the audio scene
+ ///
+ /// Only sounds with one channel (mono sounds) can be
+ /// spatialized.
+ /// The default position of a sound is (0, 0, 0).
+ ///
+ /// \param position Position of the sound in the scene
+ ///
+ /// \see getPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPosition(const Vector3f& position);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Make the sound's position relative to the listener or absolute
+ ///
+ /// Making a sound relative to the listener will ensure that it will always
+ /// be played the same way regardless of the position of the listener.
+ /// This can be useful for non-spatialized sounds, sounds that are
+ /// produced by the listener, or sounds attached to it.
+ /// The default value is false (position is absolute).
+ ///
+ /// \param relative True to set the position relative, false to set it absolute
+ ///
+ /// \see isRelativeToListener
+ ///
+ ////////////////////////////////////////////////////////////
+ void setRelativeToListener(bool relative);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the minimum distance of the sound
+ ///
+ /// The "minimum distance" of a sound is the maximum
+ /// distance at which it is heard at its maximum volume. Further
+ /// than the minimum distance, it will start to fade out according
+ /// to its attenuation factor. A value of 0 ("inside the head
+ /// of the listener") is an invalid value and is forbidden.
+ /// The default value of the minimum distance is 1.
+ ///
+ /// \param distance New minimum distance of the sound
+ ///
+ /// \see getMinDistance, setAttenuation
+ ///
+ ////////////////////////////////////////////////////////////
+ void setMinDistance(float distance);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the attenuation factor of the sound
+ ///
+ /// The attenuation is a multiplicative factor which makes
+ /// the sound more or less loud according to its distance
+ /// from the listener. An attenuation of 0 will produce a
+ /// non-attenuated sound, i.e. its volume will always be the same
+ /// whether it is heard from near or from far. On the other hand,
+ /// an attenuation value such as 100 will make the sound fade out
+ /// very quickly as it gets further from the listener.
+ /// The default value of the attenuation is 1.
+ ///
+ /// \param attenuation New attenuation factor of the sound
+ ///
+ /// \see getAttenuation, setMinDistance
+ ///
+ ////////////////////////////////////////////////////////////
+ void setAttenuation(float attenuation);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the pitch of the sound
+ ///
+ /// \return Pitch of the sound
+ ///
+ /// \see setPitch
+ ///
+ ////////////////////////////////////////////////////////////
+ float getPitch() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the volume of the sound
+ ///
+ /// \return Volume of the sound, in the range [0, 100]
+ ///
+ /// \see setVolume
+ ///
+ ////////////////////////////////////////////////////////////
+ float getVolume() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the 3D position of the sound in the audio scene
+ ///
+ /// \return Position of the sound
+ ///
+ /// \see setPosition
+ ///
+ ////////////////////////////////////////////////////////////
+ Vector3f getPosition() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Tell whether the sound's position is relative to the
+ /// listener or is absolute
+ ///
+ /// \return True if the position is relative, false if it's absolute
+ ///
+ /// \see setRelativeToListener
+ ///
+ ////////////////////////////////////////////////////////////
+ bool isRelativeToListener() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the minimum distance of the sound
+ ///
+ /// \return Minimum distance of the sound
+ ///
+ /// \see setMinDistance, getAttenuation
+ ///
+ ////////////////////////////////////////////////////////////
+ float getMinDistance() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the attenuation factor of the sound
+ ///
+ /// \return Attenuation factor of the sound
+ ///
+ /// \see setAttenuation, getMinDistance
+ ///
+ ////////////////////////////////////////////////////////////
+ float getAttenuation() const;
+
+protected:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ /// This constructor is meant to be called by derived classes only.
+ ///
+ ////////////////////////////////////////////////////////////
+ SoundSource();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current status of the sound (stopped, paused, playing)
+ ///
+ /// \return Current status of the sound
+ ///
+ ////////////////////////////////////////////////////////////
+ Status getStatus() const;
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ unsigned int m_source; ///< OpenAL source identifier
+};
+
+} // namespace sf
+
+
+#endif // SFML_SOUNDSOURCE_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundSource
+/// \ingroup audio
+///
+/// sf::SoundSource is not meant to be used directly, it
+/// only serves as a common base for all audio objects
+/// that can live in the audio environment.
+///
+/// It defines several properties for the sound: pitch,
+/// volume, position, attenuation, etc. All of them can be
+/// changed at any time with no impact on performances.
+///
+/// \see sf::Sound, sf::SoundStream
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Audio/SoundStream.hpp b/mcclone/external/sfml23/include/SFML/Audio/SoundStream.hpp
new file mode 100644
index 0000000..22ae8cd
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Audio/SoundStream.hpp
@@ -0,0 +1,386 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDSTREAM_HPP
+#define SFML_SOUNDSTREAM_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Abstract base class for streamed audio sources
+///
+////////////////////////////////////////////////////////////
+class SFML_AUDIO_API SoundStream : public SoundSource
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Structure defining a chunk of audio data to stream
+ ///
+ ////////////////////////////////////////////////////////////
+ struct Chunk
+ {
+ const Int16* samples; ///< Pointer to the audio samples
+ std::size_t sampleCount; ///< Number of samples pointed by Samples
+ };
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual ~SoundStream();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Start or resume playing the audio stream
+ ///
+ /// This function starts the stream if it was stopped, resumes
+ /// it if it was paused, and restarts it from the beginning if
+ /// it was already playing.
+ /// This function uses its own thread so that it doesn't block
+ /// the rest of the program while the stream is played.
+ ///
+ /// \see pause, stop
+ ///
+ ////////////////////////////////////////////////////////////
+ void play();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Pause the audio stream
+ ///
+ /// This function pauses the stream if it was playing,
+ /// otherwise (stream already paused or stopped) it has no effect.
+ ///
+ /// \see play, stop
+ ///
+ ////////////////////////////////////////////////////////////
+ void pause();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Stop playing the audio stream
+ ///
+ /// This function stops the stream if it was playing or paused,
+ /// and does nothing if it was already stopped.
+ /// It also resets the playing position (unlike pause()).
+ ///
+ /// \see play, pause
+ ///
+ ////////////////////////////////////////////////////////////
+ void stop();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Return the number of channels of the stream
+ ///
+ /// 1 channel means a mono sound, 2 means stereo, etc.
+ ///
+ /// \return Number of channels
+ ///
+ ////////////////////////////////////////////////////////////
+ unsigned int getChannelCount() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the stream sample rate of the stream
+ ///
+ /// The sample rate is the number of audio samples played per
+ /// second. The higher, the better the quality.
+ ///
+ /// \return Sample rate, in number of samples per second
+ ///
+ ////////////////////////////////////////////////////////////
+ unsigned int getSampleRate() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current status of the stream (stopped, paused, playing)
+ ///
+ /// \return Current status
+ ///
+ ////////////////////////////////////////////////////////////
+ Status getStatus() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the current playing position of the stream
+ ///
+ /// The playing position can be changed when the stream is
+ /// either paused or playing. Changing the playing position
+ /// when the stream is stopped has no effect, since playing
+ /// the stream would reset its position.
+ ///
+ /// \param timeOffset New playing position, from the beginning of the stream
+ ///
+ /// \see getPlayingOffset
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPlayingOffset(Time timeOffset);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the current playing position of the stream
+ ///
+ /// \return Current playing position, from the beginning of the stream
+ ///
+ /// \see setPlayingOffset
+ ///
+ ////////////////////////////////////////////////////////////
+ Time getPlayingOffset() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set whether or not the stream should loop after reaching the end
+ ///
+ /// If set, the stream will restart from beginning after
+ /// reaching the end and so on, until it is stopped or
+ /// setLoop(false) is called.
+ /// The default looping state for streams is false.
+ ///
+ /// \param loop True to play in loop, false to play once
+ ///
+ /// \see getLoop
+ ///
+ ////////////////////////////////////////////////////////////
+ void setLoop(bool loop);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Tell whether or not the stream is in loop mode
+ ///
+ /// \return True if the stream is looping, false otherwise
+ ///
+ /// \see setLoop
+ ///
+ ////////////////////////////////////////////////////////////
+ bool getLoop() const;
+
+protected:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ /// This constructor is only meant to be called by derived classes.
+ ///
+ ////////////////////////////////////////////////////////////
+ SoundStream();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Define the audio stream parameters
+ ///
+ /// This function must be called by derived classes as soon
+ /// as they know the audio settings of the stream to play.
+ /// Any attempt to manipulate the stream (play(), ...) before
+ /// calling this function will fail.
+ /// It can be called multiple times if the settings of the
+ /// audio stream change, but only when the stream is stopped.
+ ///
+ /// \param channelCount Number of channels of the stream
+ /// \param sampleRate Sample rate, in samples per second
+ ///
+ ////////////////////////////////////////////////////////////
+ void initialize(unsigned int channelCount, unsigned int sampleRate);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Request a new chunk of audio samples from the stream source
+ ///
+ /// This function must be overridden by derived classes to provide
+ /// the audio samples to play. It is called continuously by the
+ /// streaming loop, in a separate thread.
+ /// The source can choose to stop the streaming loop at any time, by
+ /// returning false to the caller.
+ /// If you return true (i.e. continue streaming) it is important that
+ /// the returned array of samples is not empty; this would stop the stream
+ /// due to an internal limitation.
+ ///
+ /// \param data Chunk of data to fill
+ ///
+ /// \return True to continue playback, false to stop
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual bool onGetData(Chunk& data) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Change the current playing position in the stream source
+ ///
+ /// This function must be overridden by derived classes to
+ /// allow random seeking into the stream source.
+ ///
+ /// \param timeOffset New playing position, relative to the beginning of the stream
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void onSeek(Time timeOffset) = 0;
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Function called as the entry point of the thread
+ ///
+ /// This function starts the streaming loop, and returns
+ /// only when the sound is stopped.
+ ///
+ ////////////////////////////////////////////////////////////
+ void streamData();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Fill a new buffer with audio samples, and append
+ /// it to the playing queue
+ ///
+ /// This function is called as soon as a buffer has been fully
+ /// consumed; it fills it again and inserts it back into the
+ /// playing queue.
+ ///
+ /// \param bufferNum Number of the buffer to fill (in [0, BufferCount])
+ ///
+ /// \return True if the stream source has requested to stop, false otherwise
+ ///
+ ////////////////////////////////////////////////////////////
+ bool fillAndPushBuffer(unsigned int bufferNum);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Fill the audio buffers and put them all into the playing queue
+ ///
+ /// This function is called when playing starts and the
+ /// playing queue is empty.
+ ///
+ /// \return True if the derived class has requested to stop, false otherwise
+ ///
+ ////////////////////////////////////////////////////////////
+ bool fillQueue();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Clear all the audio buffers and empty the playing queue
+ ///
+ /// This function is called when the stream is stopped.
+ ///
+ ////////////////////////////////////////////////////////////
+ void clearQueue();
+
+ enum
+ {
+ BufferCount = 3 ///< Number of audio buffers used by the streaming loop
+ };
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ Thread m_thread; ///< Thread running the background tasks
+ mutable Mutex m_threadMutex; ///< Thread mutex
+ Status m_threadStartState; ///< State the thread starts in (Playing, Paused, Stopped)
+ bool m_isStreaming; ///< Streaming state (true = playing, false = stopped)
+ unsigned int m_buffers[BufferCount]; ///< Sound buffers used to store temporary audio data
+ unsigned int m_channelCount; ///< Number of channels (1 = mono, 2 = stereo, ...)
+ unsigned int m_sampleRate; ///< Frequency (samples / second)
+ Uint32 m_format; ///< Format of the internal sound buffers
+ bool m_loop; ///< Loop flag (true to loop, false to play once)
+ Uint64 m_samplesProcessed; ///< Number of buffers processed since beginning of the stream
+ bool m_endBuffers[BufferCount]; ///< Each buffer is marked as "end buffer" or not, for proper duration calculation
+};
+
+} // namespace sf
+
+
+#endif // SFML_SOUNDSTREAM_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::SoundStream
+/// \ingroup audio
+///
+/// Unlike audio buffers (see sf::SoundBuffer), audio streams
+/// are never completely loaded in memory. Instead, the audio
+/// data is acquired continuously while the stream is playing.
+/// This behavior allows to play a sound with no loading delay,
+/// and keeps the memory consumption very low.
+///
+/// Sound sources that need to be streamed are usually big files
+/// (compressed audio musics that would eat hundreds of MB in memory)
+/// or files that would take a lot of time to be received
+/// (sounds played over the network).
+///
+/// sf::SoundStream is a base class that doesn't care about the
+/// stream source, which is left to the derived class. SFML provides
+/// a built-in specialization for big files (see sf::Music).
+/// No network stream source is provided, but you can write your own
+/// by combining this class with the network module.
+///
+/// A derived class has to override two virtual functions:
+/// \li onGetData fills a new chunk of audio data to be played
+/// \li onSeek changes the current playing position in the source
+///
+/// It is important to note that each SoundStream is played in its
+/// own separate thread, so that the streaming loop doesn't block the
+/// rest of the program. In particular, the OnGetData and OnSeek
+/// virtual functions may sometimes be called from this separate thread.
+/// It is important to keep this in mind, because you may have to take
+/// care of synchronization issues if you share data between threads.
+///
+/// Usage example:
+/// \code
+/// class CustomStream : public sf::SoundStream
+/// {
+/// public:
+///
+/// bool open(const std::string& location)
+/// {
+/// // Open the source and get audio settings
+/// ...
+/// unsigned int channelCount = ...;
+/// unsigned int sampleRate = ...;
+///
+/// // Initialize the stream -- important!
+/// initialize(channelCount, sampleRate);
+/// }
+///
+/// private:
+///
+/// virtual bool onGetData(Chunk& data)
+/// {
+/// // Fill the chunk with audio data from the stream source
+/// // (note: must not be empty if you want to continue playing)
+/// data.samples = ...;
+/// data.sampleCount = ...;
+///
+/// // Return true to continue playing
+/// return true;
+/// }
+///
+/// virtual void onSeek(Uint32 timeOffset)
+/// {
+/// // Change the current position in the stream source
+/// ...
+/// }
+/// }
+///
+/// // Usage
+/// CustomStream stream;
+/// stream.open("path/to/stream");
+/// stream.play();
+/// \endcode
+///
+/// \see sf::Music
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Config.hpp b/mcclone/external/sfml23/include/SFML/Config.hpp
new file mode 100644
index 0000000..05c7719
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Config.hpp
@@ -0,0 +1,193 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_CONFIG_HPP
+#define SFML_CONFIG_HPP
+
+
+////////////////////////////////////////////////////////////
+// Define the SFML version
+////////////////////////////////////////////////////////////
+#define SFML_VERSION_MAJOR 2
+#define SFML_VERSION_MINOR 3
+#define SFML_VERSION_PATCH 2
+
+
+////////////////////////////////////////////////////////////
+// Identify the operating system
+// see http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
+////////////////////////////////////////////////////////////
+#if defined(_WIN32)
+
+ // Windows
+ #define SFML_SYSTEM_WINDOWS
+ #ifndef NOMINMAX
+ #define NOMINMAX
+ #endif
+
+#elif defined(__APPLE__) && defined(__MACH__)
+
+ // Apple platform, see which one it is
+ #include "TargetConditionals.h"
+
+ #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
+
+ // iOS
+ #define SFML_SYSTEM_IOS
+
+ #elif TARGET_OS_MAC
+
+ // MacOS
+ #define SFML_SYSTEM_MACOS
+
+ #else
+
+ // Unsupported Apple system
+ #error This Apple operating system is not supported by SFML library
+
+ #endif
+
+#elif defined(__unix__)
+
+ // UNIX system, see which one it is
+ #if defined(__ANDROID__)
+
+ // Android
+ #define SFML_SYSTEM_ANDROID
+
+ #elif defined(__linux__)
+
+ // Linux
+ #define SFML_SYSTEM_LINUX
+
+ #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
+ // FreeBSD
+ #define SFML_SYSTEM_FREEBSD
+
+ #else
+
+ // Unsupported UNIX system
+ #error This UNIX operating system is not supported by SFML library
+
+ #endif
+
+#else
+
+ // Unsupported system
+ #error This operating system is not supported by SFML library
+
+#endif
+
+
+////////////////////////////////////////////////////////////
+// Define a portable debug macro
+////////////////////////////////////////////////////////////
+#if !defined(NDEBUG)
+
+ #define SFML_DEBUG
+
+#endif
+
+
+////////////////////////////////////////////////////////////
+// Define helpers to create portable import / export macros for each module
+////////////////////////////////////////////////////////////
+#if !defined(SFML_STATIC)
+
+ #if defined(SFML_SYSTEM_WINDOWS)
+
+ // Windows compilers need specific (and different) keywords for export and import
+ #define SFML_API_EXPORT __declspec(dllexport)
+ #define SFML_API_IMPORT __declspec(dllimport)
+
+ // For Visual C++ compilers, we also need to turn off this annoying C4251 warning
+ #ifdef _MSC_VER
+
+ #pragma warning(disable: 4251)
+
+ #endif
+
+ #else // Linux, FreeBSD, Mac OS X
+
+ #if __GNUC__ >= 4
+
+ // GCC 4 has special keywords for showing/hidding symbols,
+ // the same keyword is used for both importing and exporting
+ #define SFML_API_EXPORT __attribute__ ((__visibility__ ("default")))
+ #define SFML_API_IMPORT __attribute__ ((__visibility__ ("default")))
+
+ #else
+
+ // GCC < 4 has no mechanism to explicitely hide symbols, everything's exported
+ #define SFML_API_EXPORT
+ #define SFML_API_IMPORT
+
+ #endif
+
+ #endif
+
+#else
+
+ // Static build doesn't need import/export macros
+ #define SFML_API_EXPORT
+ #define SFML_API_IMPORT
+
+#endif
+
+
+////////////////////////////////////////////////////////////
+// Define portable fixed-size types
+////////////////////////////////////////////////////////////
+namespace sf
+{
+ // All "common" platforms use the same size for char, short and int
+ // (basically there are 3 types for 3 sizes, so no other match is possible),
+ // we can use them without doing any kind of check
+
+ // 8 bits integer types
+ typedef signed char Int8;
+ typedef unsigned char Uint8;
+
+ // 16 bits integer types
+ typedef signed short Int16;
+ typedef unsigned short Uint16;
+
+ // 32 bits integer types
+ typedef signed int Int32;
+ typedef unsigned int Uint32;
+
+ // 64 bits integer types
+ #if defined(_MSC_VER)
+ typedef signed __int64 Int64;
+ typedef unsigned __int64 Uint64;
+ #else
+ typedef signed long long Int64;
+ typedef unsigned long long Uint64;
+ #endif
+
+} // namespace sf
+
+
+#endif // SFML_CONFIG_HPP
diff --git a/mcclone/external/sfml23/include/SFML/Graphics.hpp b/mcclone/external/sfml23/include/SFML/Graphics.hpp
new file mode 100644
index 0000000..7a7f4da
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics.hpp
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_GRAPHICS_HPP
+#define SFML_GRAPHICS_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+#endif // SFML_GRAPHICS_HPP
+
+////////////////////////////////////////////////////////////
+/// \defgroup graphics Graphics module
+///
+/// 2D graphics module: sprites, text, shapes, ...
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Graphics/BlendMode.hpp b/mcclone/external/sfml23/include/SFML/Graphics/BlendMode.hpp
new file mode 100644
index 0000000..7f5803b
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics/BlendMode.hpp
@@ -0,0 +1,214 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_BLENDMODE_HPP
+#define SFML_BLENDMODE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+namespace sf
+{
+
+////////////////////////////////////////////////////////////
+/// \brief Blending modes for drawing
+///
+////////////////////////////////////////////////////////////
+struct SFML_GRAPHICS_API BlendMode
+{
+ ////////////////////////////////////////////////////////
+ /// \brief Enumeration of the blending factors
+ ///
+ /// The factors are mapped directly to their OpenGL equivalents,
+ /// specified by glBlendFunc() or glBlendFuncSeparate().
+ ////////////////////////////////////////////////////////
+ enum Factor
+ {
+ Zero, ///< (0, 0, 0, 0)
+ One, ///< (1, 1, 1, 1)
+ SrcColor, ///< (src.r, src.g, src.b, src.a)
+ OneMinusSrcColor, ///< (1, 1, 1, 1) - (src.r, src.g, src.b, src.a)
+ DstColor, ///< (dst.r, dst.g, dst.b, dst.a)
+ OneMinusDstColor, ///< (1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a)
+ SrcAlpha, ///< (src.a, src.a, src.a, src.a)
+ OneMinusSrcAlpha, ///< (1, 1, 1, 1) - (src.a, src.a, src.a, src.a)
+ DstAlpha, ///< (dst.a, dst.a, dst.a, dst.a)
+ OneMinusDstAlpha ///< (1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a)
+ };
+
+ ////////////////////////////////////////////////////////
+ /// \brief Enumeration of the blending equations
+ ///
+ /// The equations are mapped directly to their OpenGL equivalents,
+ /// specified by glBlendEquation() or glBlendEquationSeparate().
+ ////////////////////////////////////////////////////////
+ enum Equation
+ {
+ Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor
+ Subtract ///< Pixel = Src * SrcFactor - Dst * DstFactor
+ };
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ /// Constructs a blending mode that does alpha blending.
+ ///
+ ////////////////////////////////////////////////////////////
+ BlendMode();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Construct the blend mode given the factors and equation.
+ ///
+ /// This constructor uses the same factors and equation for both
+ /// color and alpha components. It also defaults to the Add equation.
+ ///
+ /// \param sourceFactor Specifies how to compute the source factor for the color and alpha channels.
+ /// \param destinationFactor Specifies how to compute the destination factor for the color and alpha channels.
+ /// \param blendEquation Specifies how to combine the source and destination colors and alpha.
+ ///
+ ////////////////////////////////////////////////////////////
+ BlendMode(Factor sourceFactor, Factor destinationFactor, Equation blendEquation = Add);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Construct the blend mode given the factors and equation.
+ ///
+ /// \param colorSourceFactor Specifies how to compute the source factor for the color channels.
+ /// \param colorDestinationFactor Specifies how to compute the destination factor for the color channels.
+ /// \param colorBlendEquation Specifies how to combine the source and destination colors.
+ /// \param alphaSourceFactor Specifies how to compute the source factor.
+ /// \param alphaDestinationFactor Specifies how to compute the destination factor.
+ /// \param alphaBlendEquation Specifies how to combine the source and destination alphas.
+ ///
+ ////////////////////////////////////////////////////////////
+ BlendMode(Factor colorSourceFactor, Factor colorDestinationFactor,
+ Equation colorBlendEquation, Factor alphaSourceFactor,
+ Factor alphaDestinationFactor, Equation alphaBlendEquation);
+
+ ////////////////////////////////////////////////////////////
+ // Member Data
+ ////////////////////////////////////////////////////////////
+ Factor colorSrcFactor; ///< Source blending factor for the color channels
+ Factor colorDstFactor; ///< Destination blending factor for the color channels
+ Equation colorEquation; ///< Blending equation for the color channels
+ Factor alphaSrcFactor; ///< Source blending factor for the alpha channel
+ Factor alphaDstFactor; ///< Destination blending factor for the alpha channel
+ Equation alphaEquation; ///< Blending equation for the alpha channel
+};
+
+////////////////////////////////////////////////////////////
+/// \relates BlendMode
+/// \brief Overload of the == operator
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return True if blending modes are equal, false if they are different
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API bool operator ==(const BlendMode& left, const BlendMode& right);
+
+////////////////////////////////////////////////////////////
+/// \relates BlendMode
+/// \brief Overload of the != operator
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return True if blending modes are different, false if they are equal
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API bool operator !=(const BlendMode& left, const BlendMode& right);
+
+////////////////////////////////////////////////////////////
+// Commonly used blending modes
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API extern const BlendMode BlendAlpha; ///< Blend source and dest according to dest alpha
+SFML_GRAPHICS_API extern const BlendMode BlendAdd; ///< Add source to dest
+SFML_GRAPHICS_API extern const BlendMode BlendMultiply; ///< Multiply source and dest
+SFML_GRAPHICS_API extern const BlendMode BlendNone; ///< Overwrite dest with source
+
+} // namespace sf
+
+
+#endif // SFML_BLENDMODE_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::BlendMode
+/// \ingroup graphics
+///
+/// sf::BlendMode is a class that represents a blend mode. A blend
+/// mode determines how the colors of an object you draw are
+/// mixed with the colors that are already in the buffer.
+///
+/// The class is composed of 6 components, each of which has its
+/// own public member variable:
+/// \li %Color Source Factor (@ref colorSrcFactor)
+/// \li %Color Destination Factor (@ref colorDstFactor)
+/// \li %Color Blend Equation (@ref colorEquation)
+/// \li Alpha Source Factor (@ref alphaSrcFactor)
+/// \li Alpha Destination Factor (@ref alphaDstFactor)
+/// \li Alpha Blend Equation (@ref alphaEquation)
+///
+/// The source factor specifies how the pixel you are drawing contributes
+/// to the final color. The destination factor specifies how the pixel
+/// already drawn in the buffer contributes to the final color.
+///
+/// The color channels RGB (red, green, blue; simply referred to as
+/// color) and A (alpha; the transparency) can be treated separately. This
+/// separation can be useful for specific blend modes, but most often you
+/// won't need it and will simply treat the color as a single unit.
+///
+/// The blend factors and equations correspond to their OpenGL equivalents.
+/// In general, the color of the resulting pixel is calculated according
+/// to the following formula (\a src is the color of the source pixel, \a dst
+/// the color of the destination pixel, the other variables correspond to the
+/// public members, with the equations being + or - operators):
+/// \code
+/// dst.rgb = colorSrcFactor * src.rgb (colorEquation) colorDstFactor * dst.rgb
+/// dst.a = alphaSrcFactor * src.a (alphaEquation) alphaDstFactor * dst.a
+/// \endcode
+/// All factors and colors are represented as floating point numbers between
+/// 0 and 1. Where necessary, the result is clamped to fit in that range.
+///
+/// The most common blending modes are defined as constants
+/// in the sf namespace:
+///
+/// \code
+/// sf::BlendMode alphaBlending = sf::BlendAlpha;
+/// sf::BlendMode additiveBlending = sf::BlendAdd;
+/// sf::BlendMode multiplicativeBlending = sf::BlendMultipy;
+/// sf::BlendMode noBlending = sf::BlendNone;
+/// \endcode
+///
+/// In SFML, a blend mode can be specified every time you draw a sf::Drawable
+/// object to a render target. It is part of the sf::RenderStates compound
+/// that is passed to the member function sf::RenderTarget::draw().
+///
+/// \see sf::RenderStates, sf::RenderTarget
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Graphics/CircleShape.hpp b/mcclone/external/sfml23/include/SFML/Graphics/CircleShape.hpp
new file mode 100644
index 0000000..2d5ac00
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics/CircleShape.hpp
@@ -0,0 +1,154 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_CIRCLESHAPE_HPP
+#define SFML_CIRCLESHAPE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Specialized shape representing a circle
+///
+////////////////////////////////////////////////////////////
+class SFML_GRAPHICS_API CircleShape : public Shape
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ /// \param radius Radius of the circle
+ /// \param pointCount Number of points composing the circle
+ ///
+ ////////////////////////////////////////////////////////////
+ explicit CircleShape(float radius = 0, std::size_t pointCount = 30);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the radius of the circle
+ ///
+ /// \param radius New radius of the circle
+ ///
+ /// \see getRadius
+ ///
+ ////////////////////////////////////////////////////////////
+ void setRadius(float radius);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the radius of the circle
+ ///
+ /// \return Radius of the circle
+ ///
+ /// \see setRadius
+ ///
+ ////////////////////////////////////////////////////////////
+ float getRadius() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the number of points of the circle
+ ///
+ /// \param count New number of points of the circle
+ ///
+ /// \see getPointCount
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPointCount(std::size_t count);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the number of points of the circle
+ ///
+ /// \return Number of points of the circle
+ ///
+ /// \see setPointCount
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual std::size_t getPointCount() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get a point of the circle
+ ///
+ /// The returned point is in local coordinates, that is,
+ /// the shape's transforms (position, rotation, scale) are
+ /// not taken into account.
+ /// The result is undefined if \a index is out of the valid range.
+ ///
+ /// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
+ ///
+ /// \return index-th point of the shape
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual Vector2f getPoint(std::size_t index) const;
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ float m_radius; ///< Radius of the circle
+ std::size_t m_pointCount; ///< Number of points composing the circle
+};
+
+} // namespace sf
+
+
+#endif // SFML_CIRCLESHAPE_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::CircleShape
+/// \ingroup graphics
+///
+/// This class inherits all the functions of sf::Transformable
+/// (position, rotation, scale, bounds, ...) as well as the
+/// functions of sf::Shape (outline, color, texture, ...).
+///
+/// Usage example:
+/// \code
+/// sf::CircleShape circle;
+/// circle.setRadius(150);
+/// circle.setOutlineColor(sf::Color::Red);
+/// circle.setOutlineThickness(5);
+/// circle.setPosition(10, 20);
+/// ...
+/// window.draw(circle);
+/// \endcode
+///
+/// Since the graphics card can't draw perfect circles, we have to
+/// fake them with multiple triangles connected to each other. The
+/// "points count" property of sf::CircleShape defines how many of these
+/// triangles to use, and therefore defines the quality of the circle.
+///
+/// The number of points can also be used for another purpose; with
+/// small numbers you can create any regular polygon shape:
+/// equilateral triangle, square, pentagon, hexagon, ...
+///
+/// \see sf::Shape, sf::RectangleShape, sf::ConvexShape
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Graphics/Color.hpp b/mcclone/external/sfml23/include/SFML/Graphics/Color.hpp
new file mode 100644
index 0000000..87a1598
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics/Color.hpp
@@ -0,0 +1,275 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_COLOR_HPP
+#define SFML_COLOR_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Utility class for manipulating RGBA colors
+///
+////////////////////////////////////////////////////////////
+class SFML_GRAPHICS_API Color
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ /// Constructs an opaque black color. It is equivalent to
+ /// sf::Color(0, 0, 0, 255).
+ ///
+ ////////////////////////////////////////////////////////////
+ Color();
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Construct the color from its 4 RGBA components
+ ///
+ /// \param red Red component (in the range [0, 255])
+ /// \param green Green component (in the range [0, 255])
+ /// \param blue Blue component (in the range [0, 255])
+ /// \param alpha Alpha (opacity) component (in the range [0, 255])
+ ///
+ ////////////////////////////////////////////////////////////
+ Color(Uint8 red, Uint8 green, Uint8 blue, Uint8 alpha = 255);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Construct the color from 32-bit unsigned integer
+ ///
+ /// \param color Number containing the RGBA components (in that order)
+ ///
+ ////////////////////////////////////////////////////////////
+ explicit Color(Uint32 color);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Retrieve the color as a 32-bit unsigned integer
+ ///
+ /// \return Color represented as a 32-bit unsigned integer
+ ///
+ ////////////////////////////////////////////////////////////
+ Uint32 toInteger() const;
+
+ ////////////////////////////////////////////////////////////
+ // Static member data
+ ////////////////////////////////////////////////////////////
+ static const Color Black; ///< Black predefined color
+ static const Color White; ///< White predefined color
+ static const Color Red; ///< Red predefined color
+ static const Color Green; ///< Green predefined color
+ static const Color Blue; ///< Blue predefined color
+ static const Color Yellow; ///< Yellow predefined color
+ static const Color Magenta; ///< Magenta predefined color
+ static const Color Cyan; ///< Cyan predefined color
+ static const Color Transparent; ///< Transparent (black) predefined color
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ Uint8 r; ///< Red component
+ Uint8 g; ///< Green component
+ Uint8 b; ///< Blue component
+ Uint8 a; ///< Alpha (opacity) component
+};
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the == operator
+///
+/// This operator compares two colors and check if they are equal.
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return True if colors are equal, false if they are different
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API bool operator ==(const Color& left, const Color& right);
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the != operator
+///
+/// This operator compares two colors and check if they are different.
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return True if colors are different, false if they are equal
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API bool operator !=(const Color& left, const Color& right);
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the binary + operator
+///
+/// This operator returns the component-wise sum of two colors.
+/// Components that exceed 255 are clamped to 255.
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return Result of \a left + \a right
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API Color operator +(const Color& left, const Color& right);
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the binary - operator
+///
+/// This operator returns the component-wise subtraction of two colors.
+/// Components below 0 are clamped to 0.
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return Result of \a left - \a right
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API Color operator -(const Color& left, const Color& right);
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the binary * operator
+///
+/// This operator returns the component-wise multiplication
+/// (also called "modulation") of two colors.
+/// Components are then divided by 255 so that the result is
+/// still in the range [0, 255].
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return Result of \a left * \a right
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API Color operator *(const Color& left, const Color& right);
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the binary += operator
+///
+/// This operator computes the component-wise sum of two colors,
+/// and assigns the result to the left operand.
+/// Components that exceed 255 are clamped to 255.
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return Reference to \a left
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API Color& operator +=(Color& left, const Color& right);
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the binary -= operator
+///
+/// This operator computes the component-wise subtraction of two colors,
+/// and assigns the result to the left operand.
+/// Components below 0 are clamped to 0.
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return Reference to \a left
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API Color& operator -=(Color& left, const Color& right);
+
+////////////////////////////////////////////////////////////
+/// \relates Color
+/// \brief Overload of the binary *= operator
+///
+/// This operator returns the component-wise multiplication
+/// (also called "modulation") of two colors, and assigns
+/// the result to the left operand.
+/// Components are then divided by 255 so that the result is
+/// still in the range [0, 255].
+///
+/// \param left Left operand
+/// \param right Right operand
+///
+/// \return Reference to \a left
+///
+////////////////////////////////////////////////////////////
+SFML_GRAPHICS_API Color& operator *=(Color& left, const Color& right);
+
+} // namespace sf
+
+
+#endif // SFML_COLOR_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::Color
+/// \ingroup graphics
+///
+/// sf::Color is a simple color class composed of 4 components:
+/// \li Red
+/// \li Green
+/// \li Blue
+/// \li Alpha (opacity)
+///
+/// Each component is a public member, an unsigned integer in
+/// the range [0, 255]. Thus, colors can be constructed and
+/// manipulated very easily:
+///
+/// \code
+/// sf::Color color(255, 0, 0); // red
+/// color.r = 0; // make it black
+/// color.b = 128; // make it dark blue
+/// \endcode
+///
+/// The fourth component of colors, named "alpha", represents
+/// the opacity of the color. A color with an alpha value of
+/// 255 will be fully opaque, while an alpha value of 0 will
+/// make a color fully transparent, whatever the value of the
+/// other components is.
+///
+/// The most common colors are already defined as static variables:
+/// \code
+/// sf::Color black = sf::Color::Black;
+/// sf::Color white = sf::Color::White;
+/// sf::Color red = sf::Color::Red;
+/// sf::Color green = sf::Color::Green;
+/// sf::Color blue = sf::Color::Blue;
+/// sf::Color yellow = sf::Color::Yellow;
+/// sf::Color magenta = sf::Color::Magenta;
+/// sf::Color cyan = sf::Color::Cyan;
+/// sf::Color transparent = sf::Color::Transparent;
+/// \endcode
+///
+/// Colors can also be added and modulated (multiplied) using the
+/// overloaded operators + and *.
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Graphics/ConvexShape.hpp b/mcclone/external/sfml23/include/SFML/Graphics/ConvexShape.hpp
new file mode 100644
index 0000000..82991a7
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics/ConvexShape.hpp
@@ -0,0 +1,153 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_CONVEXSHAPE_HPP
+#define SFML_CONVEXSHAPE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+
+
+namespace sf
+{
+////////////////////////////////////////////////////////////
+/// \brief Specialized shape representing a convex polygon
+///
+////////////////////////////////////////////////////////////
+class SFML_GRAPHICS_API ConvexShape : public Shape
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Default constructor
+ ///
+ /// \param pointCount Number of points of the polygon
+ ///
+ ////////////////////////////////////////////////////////////
+ explicit ConvexShape(std::size_t pointCount = 0);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the number of points of the polygon
+ ///
+ /// \a count must be greater than 2 to define a valid shape.
+ ///
+ /// \param count New number of points of the polygon
+ ///
+ /// \see getPointCount
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPointCount(std::size_t count);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the number of points of the polygon
+ ///
+ /// \return Number of points of the polygon
+ ///
+ /// \see setPointCount
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual std::size_t getPointCount() const;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Set the position of a point
+ ///
+ /// Don't forget that the polygon must remain convex, and
+ /// the points need to stay ordered!
+ /// setPointCount must be called first in order to set the total
+ /// number of points. The result is undefined if \a index is out
+ /// of the valid range.
+ ///
+ /// \param index Index of the point to change, in range [0 .. getPointCount() - 1]
+ /// \param point New position of the point
+ ///
+ /// \see getPoint
+ ///
+ ////////////////////////////////////////////////////////////
+ void setPoint(std::size_t index, const Vector2f& point);
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Get the position of a point
+ ///
+ /// The returned point is in local coordinates, that is,
+ /// the shape's transforms (position, rotation, scale) are
+ /// not taken into account.
+ /// The result is undefined if \a index is out of the valid range.
+ ///
+ /// \param index Index of the point to get, in range [0 .. getPointCount() - 1]
+ ///
+ /// \return Position of the index-th point of the polygon
+ ///
+ /// \see setPoint
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual Vector2f getPoint(std::size_t index) const;
+
+private:
+
+ ////////////////////////////////////////////////////////////
+ // Member data
+ ////////////////////////////////////////////////////////////
+ std::vector m_points; ///< Points composing the convex polygon
+};
+
+} // namespace sf
+
+
+#endif // SFML_CONVEXSHAPE_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::ConvexShape
+/// \ingroup graphics
+///
+/// This class inherits all the functions of sf::Transformable
+/// (position, rotation, scale, bounds, ...) as well as the
+/// functions of sf::Shape (outline, color, texture, ...).
+///
+/// It is important to keep in mind that a convex shape must
+/// always be... convex, otherwise it may not be drawn correctly.
+/// Moreover, the points must be defined in order; using a random
+/// order would result in an incorrect shape.
+///
+/// Usage example:
+/// \code
+/// sf::ConvexShape polygon;
+/// polygon.setPointCount(3);
+/// polygon.setPoint(0, sf::Vector2f(0, 0));
+/// polygon.setPoint(1, sf::Vector2f(0, 10));
+/// polygon.setPoint(2, sf::Vector2f(25, 5));
+/// polygon.setOutlineColor(sf::Color::Red);
+/// polygon.setOutlineThickness(5);
+/// polygon.setPosition(10, 20);
+/// ...
+/// window.draw(polygon);
+/// \endcode
+///
+/// \see sf::Shape, sf::RectangleShape, sf::CircleShape
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Graphics/Drawable.hpp b/mcclone/external/sfml23/include/SFML/Graphics/Drawable.hpp
new file mode 100644
index 0000000..5ddf2da
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics/Drawable.hpp
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_DRAWABLE_HPP
+#define SFML_DRAWABLE_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+namespace sf
+{
+class RenderTarget;
+
+////////////////////////////////////////////////////////////
+/// \brief Abstract base class for objects that can be drawn
+/// to a render target
+///
+////////////////////////////////////////////////////////////
+class SFML_GRAPHICS_API Drawable
+{
+public:
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Virtual destructor
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual ~Drawable() {}
+
+protected:
+
+ friend class RenderTarget;
+
+ ////////////////////////////////////////////////////////////
+ /// \brief Draw the object to a render target
+ ///
+ /// This is a pure virtual function that has to be implemented
+ /// by the derived class to define how the drawable should be
+ /// drawn.
+ ///
+ /// \param target Render target to draw to
+ /// \param states Current render states
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void draw(RenderTarget& target, RenderStates states) const = 0;
+};
+
+} // namespace sf
+
+
+#endif // SFML_DRAWABLE_HPP
+
+
+////////////////////////////////////////////////////////////
+/// \class sf::Drawable
+/// \ingroup graphics
+///
+/// sf::Drawable is a very simple base class that allows objects
+/// of derived classes to be drawn to a sf::RenderTarget.
+///
+/// All you have to do in your derived class is to override the
+/// draw virtual function.
+///
+/// Note that inheriting from sf::Drawable is not mandatory,
+/// but it allows this nice syntax "window.draw(object)" rather
+/// than "object.draw(window)", which is more consistent with other
+/// SFML classes.
+///
+/// Example:
+/// \code
+/// class MyDrawable : public sf::Drawable
+/// {
+/// public:
+///
+/// ...
+///
+/// private:
+///
+/// virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const
+/// {
+/// // You can draw other high-level objects
+/// target.draw(m_sprite, states);
+///
+/// // ... or use the low-level API
+/// states.texture = &m_texture;
+/// target.draw(m_vertices, states);
+///
+/// // ... or draw with OpenGL directly
+/// glBegin(GL_QUADS);
+/// ...
+/// glEnd();
+/// }
+///
+/// sf::Sprite m_sprite;
+/// sf::Texture m_texture;
+/// sf::VertexArray m_vertices;
+/// };
+/// \endcode
+///
+/// \see sf::RenderTarget
+///
+////////////////////////////////////////////////////////////
diff --git a/mcclone/external/sfml23/include/SFML/Graphics/Export.hpp b/mcclone/external/sfml23/include/SFML/Graphics/Export.hpp
new file mode 100644
index 0000000..624f1eb
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics/Export.hpp
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_GRAPHICS_EXPORT_HPP
+#define SFML_GRAPHICS_EXPORT_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Define portable import / export macros
+////////////////////////////////////////////////////////////
+#if defined(SFML_GRAPHICS_EXPORTS)
+
+ #define SFML_GRAPHICS_API SFML_API_EXPORT
+
+#else
+
+ #define SFML_GRAPHICS_API SFML_API_IMPORT
+
+#endif
+
+
+#endif // SFML_GRAPHICS_EXPORT_HPP
diff --git a/mcclone/external/sfml23/include/SFML/Graphics/Font.hpp b/mcclone/external/sfml23/include/SFML/Graphics/Font.hpp
new file mode 100644
index 0000000..ac6b00e
--- /dev/null
+++ b/mcclone/external/sfml23/include/SFML/Graphics/Font.hpp
@@ -0,0 +1,433 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_FONT_HPP
+#define SFML_FONT_HPP
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+#include
+#include
+#include