Skip to content
Snippets Groups Projects
personnage.h 1.43 KiB
Newer Older
llebasca's avatar
llebasca committed
/*
// Created by Lucile on 18/02/2021.
*/

/*!
 * \file personnage.h
 * \brief Character Header File
 * \authors Lucile
llebasca's avatar
llebasca committed
 * \version 2
 * Character structure and functions definition.
llebasca's avatar
llebasca committed
#ifndef GAME_INSA_PROJECT_PERSONNAGE_H
#define GAME_INSA_PROJECT_PERSONNAGE_H

llebasca's avatar
llebasca committed
 * \struct Personnage
Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
typedef struct {
    int up; /**< Position : x hight-left point */
    int down; /**< Position : y hight-left point */
    int left; /**< Size : length */
    int right; /**< Size : width */
} Direction;
typedef struct {
    int x_pers; /**< Position : x hight-left point */
    int y_pers; /**< Position : y hight-left point */
    int long_pers; /**< Size : length */
    int larg_pers; /**< Size : width */
	int x_hr; 	/**< Position : x hight-right point */
	int y_hr; 	/**< Position : y hight-right point */
	int x_ll; 	/**< Position : x low-left point */
	int y_ll; 	/**< Position : y low-left point */
	int x_lr; 	/**< Position : x low-right point */
	int y_lr;	/**< Position : y low-right point */
llebasca's avatar
llebasca committed
    int speed_pers; /**< Character speed */
llebasca's avatar
llebasca committed
    int life; /**< Life number */
    char * image_pers; /**< Source image of the character. */
llebasca's avatar
llebasca committed
    Direction direction_personnage; /**< Direction */
}Personnage;

Le-Bao-Tin.Ha's avatar
Le-Bao-Tin.Ha committed
void init_pers(Personnage * character, int x, int y, int length, int width, int speed, char * path);
void calcul_points_pers(Personnage * character);
llebasca's avatar
llebasca committed

#endif /*GAME_INSA_PROJECT_PERSONNAGE_H*/