first commit

This commit is contained in:
2021-07-07 22:09:21 +02:00
commit 9014681460
95 changed files with 42985 additions and 0 deletions

23
animationManager.h Normal file
View File

@@ -0,0 +1,23 @@
#pragma once
#include <iostream>
#include "resourceManager.h"
class tileSet {
Texture tileSheet;
glm::ivec2 dims;
public:
tileSet(const Texture& texture, glm::vec2 tileDims)
:tileSheet(texture), dims(tileDims){}
glm::vec4 getUVs(int index) {
int tileX = index % dims.x;
int tileY = index / dims.x;
glm::vec4 UV;
UV.x = tileX / (float)dims.x;
UV.y = tileY / (float)dims.y;
UV.z = UV.x + 1.0f / dims.x;
UV.w = UV.y - 1.0f / dims.y;
return UV;
}
};