summaryrefslogtreecommitdiffstats
path: root/src/AssetManager.hpp
diff options
context:
space:
mode:
authorElisey Puzko <puzko.e02@gmail.com>2018-02-18 11:25:30 +0100
committerElisey Puzko <puzko.e02@gmail.com>2018-02-18 11:25:30 +0100
commit9f911204d2a8295a669b0741a5076f55a0dd9cc5 (patch)
tree59d39747281f4de5d643ab8843c235f557077433 /src/AssetManager.hpp
parentRaycast debug render (diff)
downloadAltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.gz
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.bz2
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.lz
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.xz
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.tar.zst
AltCraft-9f911204d2a8295a669b0741a5076f55a0dd9cc5.zip
Diffstat (limited to 'src/AssetManager.hpp')
-rw-r--r--src/AssetManager.hpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/AssetManager.hpp b/src/AssetManager.hpp
index 1169b7d..845c2b2 100644
--- a/src/AssetManager.hpp
+++ b/src/AssetManager.hpp
@@ -13,7 +13,8 @@
class Texture;
struct TextureCoordinates {
- TextureCoordinates(float x = -1, float y = -1, float w = -1, float h = -1) : x(x), y(y), w(w), h(h) {}
+ TextureCoordinates(float x = -1, float y = -1, float w = -1, float h = -1)
+ : x(x), y(y), w(w), h(h) {}
bool operator==(const TextureCoordinates &rhs) const {
return x == rhs.x &&
@@ -35,11 +36,12 @@ struct TextureCoordinates {
struct BlockTextureId {
//Block sides: 0 - bottom, 1 - top, 2 - north, 3 - south, 4 - west, 5 - east 6 - every side
- BlockTextureId(int id = 0, int state = 0, int side = 6) : id(id), state(state), side(side) {}
+ BlockTextureId(int id = 0, int state = 0, int side = 6)
+ : id(id), state(state), side(side) {}
- int id:9;
- int state:4;
- int side:3;
+ int id : 9;
+ int state : 4;
+ int side : 3;
bool operator<(const BlockTextureId &rhs) const {
@@ -72,6 +74,7 @@ struct BlockModel {
fixed,
DisplayVariantsCount,
};
+
struct DisplayData {
Vector rotation;
Vector translation;
@@ -105,6 +108,7 @@ struct BlockModel {
east,
none,
};
+
struct FaceData {
struct Uv {
int x1, y1, x2, y2;
@@ -122,7 +126,8 @@ struct BlockModel {
std::vector<ElementData> Elements;
};
-inline bool operator==(const BlockModel::ElementData::FaceData::Uv &lhs, const BlockModel::ElementData::FaceData::Uv &rhs) {
+inline bool operator==(const BlockModel::ElementData::FaceData::Uv &lhs,
+ const BlockModel::ElementData::FaceData::Uv &rhs) {
return lhs.x1 == rhs.x1 && lhs.y1 == rhs.y1 && lhs.x2 == rhs.x2 && lhs.y2 == rhs.y2;
}