First import

This commit is contained in:
King_DuckZ 2014-08-27 16:03:56 +02:00
commit 4908096a44
160 changed files with 45181 additions and 0 deletions

15
include/coords.hpp Normal file
View file

@ -0,0 +1,15 @@
#ifndef id305A77366E3B4D3C84CC345C93A7C38B
#define id305A77366E3B4D3C84CC345C93A7C38B
#include <cstddef>
namespace dk {
typedef std::size_t CoordType;
struct Coords {
CoordType width;
CoordType height;
};
} //namespace dk
#endif

23
include/doorkeeper.hpp Normal file
View file

@ -0,0 +1,23 @@
#ifndef id5A4C05FA7D264B65B7B7D14A0792E3A2
#define id5A4C05FA7D264B65B7B7D14A0792E3A2
#include "coords.hpp"
namespace dk {
class Viewport;
class Tyler {
public:
Tyler ( const Coords& parCoords );
virtual ~Tyler ( void ) noexcept = default;
virtual bool batch_load ( const Coords& parFrom, const Coords& parTo );
virtual bool single_load ( const Coords& parCoords );
private:
const Coords size_;
};
} //namespace dk
#endif

33
include/itemswithid.hpp Normal file
View file

@ -0,0 +1,33 @@
#ifndef id9B2FF4B4CA4244EAB93C619479A8E816
#define id9B2FF4B4CA4244EAB93C619479A8E816
#include <FBVector.h>
namespace dk {
template <typename T, typename C>
class ItemsWithID {
typedef C container_type;
public:
typedef T value_type;
typedef typename container_type::size_type size_type;
typedef typename container_type::size_type id_type;
typedef value_type& reference_type;
ItemsWithID ( void ) = default;
~ItemsWithID ( void ) noexcept = default;
id_type add ( const value_type& parNewVal );
void erase ( id_type parID );
reference_type operator[] ( id_type parID );
const reference_type operator[] ( id_type parID ) const;
private:
container_type items_;
// see:
// https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md
};
} //namespace dk
#endif

21
include/viewport.hpp Normal file
View file

@ -0,0 +1,21 @@
#ifndef id0ADBCC15BA574485BF3267254090D99B
#define id0ADBCC15BA574485BF3267254090D99B
#include "coords.hpp"
namespace dk {
class Viewport {
public:
explicit Viewport ( const Coords& parSize );
Viewport ( const Coords& parSize, const Coord; parPos );
~Viewport ( void ) noexcept = default;
Viewport& operator= ( const Viewport& ) = default;
private:
Coords size_;
Coords position_;
};
} //namespace dk
#endif