orton_runner/include/game/ascii.h

45 lines
1.0 KiB
C

/*
** EPITECH PROJECT, 2018
** task01
** File description:
** I do task
*/
#ifndef __ASCII_H__
# define __ASCII_H__
#define ASCII_DEFAULT_HEIGHT 5
#define ASCII_DEFAULT_WIDTH 4
#define ASCII_CENTER_X 0x01
#define ASCII_CENTER_Y 0x02
#define ASCII_ALPHA 0x04
#define ASCII_REVERSE 0x08
#include "lib/my_stddef.h"
#include "lib/s_sfml.h"
typedef struct ascii_s
{
int width;
int height;
int offset;
int nb_line;
char *str;
int size_str;
int x;
int y;
} ascii_t;
void my_print(sfml_t *sfml, int position[2], const char *str, uint32_t *option);
uint32_t *my_print_set_option(int size, uint32_t color_char,
uint32_t color_alpha, uint8_t action);
void my_print_set_position(int position[2], int x, int y);
void reverse_update(void *pass[2], int position[2], uint32_t *option);
void message_set_start(sfml_t *sfml, ascii_t *ascii, uint32_t *option, int size_str);
ascii_t *init_set_ascii(const char *str, uint32_t *option);
int get_line_size(const char *str, int pos);
void my_print_nbr(sfml_t *sfml, int nb, uint32_t *option, int pos[2]);
#endif