Merge branch 'master' of github.com:AnonymusRaccoon/Gamacon

This commit is contained in:
Anonymus Raccoon
2020-04-14 19:08:50 +02:00
2 changed files with 19 additions and 3 deletions

14
include/sfml_init.h Normal file
View File

@@ -0,0 +1,14 @@
/*
** EPITECH PROJECT, 2020
** My3D
** File description:
** sfml_init
*/
#ifndef MY_RPG_SFML_INIT_H
#define MY_RPG_SFML_INIT_H
#define TEXTURE_WIDTH 16
#define TEXTURE_HEIGHT 16
#endif //MY_RPG_SFML_INIT_H

View File

@@ -8,6 +8,7 @@
#include "components/transform_component.h"
#include <malloc.h>
#include <SFML/Graphics.h>
#include "sfml_init.h"
sfRenderStates *sfml_init_render_state(void)
{
@@ -27,9 +28,10 @@ sfVertexArray *sfml_init_verticies(void)
sfVertexArray *arr = sfVertexArray_create();
sfVertex v[4] = {
{.position = {0, 0}, .texCoords = {0, 0}, .color = sfWhite},
{.position = {0, 0}, .texCoords = {64, 0}, .color = sfWhite},
{.position = {0, 0}, .texCoords = {0, 64}, .color = sfWhite},
{.position = {0, 0}, .texCoords = {64, 64}, .color = sfWhite}
{.position = {0, 0}, .texCoords = {TEXTURE_WIDTH, 0}, .color = sfWhite},
{.position = {0, 0}, .texCoords = {0, TEXTURE_HEIGHT}, .color = sfWhite},
{.position = {0, 0}, .texCoords = {TEXTURE_WIDTH, \
TEXTURE_HEIGHT}, .color = sfWhite}
};
for (int i = 0; i < 4; i++)