mirror of
https://github.com/zoriya/Gamacon.git
synced 2025-12-06 02:36:09 +00:00
Merge branch 'master' of github.com:AnonymusRaccoon/Gamacon
This commit is contained in:
14
include/sfml_init.h
Normal file
14
include/sfml_init.h
Normal 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
|
||||
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user