clouds fixed

This commit is contained in:
2021-09-18 12:37:32 +02:00
parent 4f30f2ce3a
commit 909fa0c07b
4 changed files with 9 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ Cloud::Cloud(float speed, glm::vec2 pos, glm::vec2 size, int cloudIndex)
{22, 2, 1},
{24, 1, 1},
{25, 3, 1},
{42, 6, 2}};
{42, 6, 3}};
glm::vec4 spriteUVs = spriteSheet.getUVsExtended(cloudIndexes[cloudIndex][0], cloudIndexes[cloudIndex][1], cloudIndexes[cloudIndex][2]);
GLfloat vertices[] = {
@@ -78,9 +78,9 @@ Background::Background()
glm::vec2(xScalar - 500.0f, yScalar),
glm::vec2(128.0f * (float)cloudIndexes[cloudIndex][1], 128.0f * (float)cloudIndexes[cloudIndex][2]) * sizeScalar, cloudIndex));
}
clouds.push_back(new Cloud(1.0f,
glm::vec2(1000.0f, 300.0f),
glm::vec2(128.0f * 6.0f, 128.0f * 3.0f), 4));
// clouds.push_back(new Cloud(1.0f,
// glm::vec2(800.0f, 300.0f),
// glm::vec2(128.0f * 6.0f, 128.0f * 3.0f)*(4.0f/3.0f), 4));
}
void Background::drawBackground(SpriteRenderer &renderer, float dt)
{