orton_runner/include/lib/s_sfml.h

75 lines
1.2 KiB
C

/*
** EPITECH PROJECT, 2018
** task01
** File description:
** I do task
*/
#ifndef __S_SFML_H__
# define __S_SFML_H__
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
#include <SFML/System/Time.h>
#include <SFML/System/Export.h>
#include <SFML/System/Types.h>
#include <SFML/Window/Export.h>
#include "game/s_game.h"
#include "lib/my_stddef.h"
typedef struct sprite_s
{
int width;
int height;
uint8_t *data;
} sprite_t;
typedef struct polygon_s
{
int nb_vertices;
uint32_t color;
int *x;
int *y;
int ymin;
int ymax;
int xmax;
int xmin;
double z_buffer;
} polygon_t;
typedef struct scene_s
{
int nb_message;
uint8_t message_active;
wall_t *wall;
thrower_t **thrower;
message_t **message;
player_t *player;
camera_t *camera;
level_t *level;
} scene_t;
typedef struct sound_s
{
uint8_t active;
uint8_t volume;
sfMusic *music;
} sound_t;
typedef struct sfml_s
{
sfRenderWindow *window;
sfSprite *vram_sprite;
sfTexture *texture;
sfEvent event;
int width;
int height;
uint32_t *vram;
uint32_t key;
uint8_t debug;
scene_t *scene;
sound_t *sound;
} sfml_t;
#endif