Commit f0aff9a0 authored by LibertAntoine's avatar LibertAntoine

Edit comment in monster and itd header

parent 8cd55ba3
#include "cases.h"
TypeCase* case_loadFromPPM()
{
unsigned char* pixel_data;
......@@ -37,6 +38,12 @@ TypeCase* case_loadFromPPM()
return cases;
}
void case_gameData_init() {
gameData = malloc(sizeof(GameData));
gameData->gameState = MAINMENU;
gameData->default_list = NULL;
};
void case_initPlateau()
{
plateau = malloc(sizeof(Plateau));
......@@ -408,10 +415,6 @@ void case_freePlateau() {
free(plateau);
}
void gameData_init() {
gameData = malloc(sizeof(GameData));
gameData->gameState = MAINMENU;
gameData->default_list = NULL;
};
......@@ -21,6 +21,7 @@
#include "projectile.h"
TypeCase* case_loadFromPPM();
void case_gameData_init();
void case_initPlateau();
int case_RGBCompare(RGBcolor color1, RGBcolor color2);
......
......@@ -17,80 +17,106 @@
/**
* Create a MapData of an empty state
* param[out] MapData
*/
void itd_initMapData();
/**
* Move specific file cursor to the end of the current line
* @param[in] file
* @param[in] file itd
*/
void itd_gotoEndOfLine(FILE* file);
/**
* Pass commented lines that use '#' sign
* param[in]
* param[in] file itd
*/
void itd_checkComment(FILE* file);
/**
* Treats .itd files code @ITD {num}
* @param[in] file
* @param[in] file itd
*/
int itd_checkCode(FILE* file);
/**
* Extract a single file path
* param[in] file
* param[in] * MapData
* param[out] * MapData updated if the line is valid
*
* TODO check whether it's a .ppm otherwise throw an error
* param[in] file itd
*/
int itd_getImageFilePath(FILE* file);
int itd_getConstructionData(FILE* file, TypeCase type);
/**
* Extract a single decimal value
* param[in] file
* param[in] * MapData
* param[out] * MapData updated if the line is valid
* param[in] file itd
*/
int itd_getEnergyValue(FILE* file);
/**
* Fill an array with RGB color data found in file
* param[in] file
* param[in] file itd
* param[in] * RGBcolor empty
*/
int itd_getColor(FILE* file, RGBcolor* color);
/**
* Fill the data contruction found in file
* param[in] file itd
* param[in] the data construction type of infos
*/
int itd_getConstructionData(FILE* file, TypeCase type);
/**
* Fill the number of noeud data found in file
* param[in] file
* param[in] * MapData MapData
* param[in] file itd
*/
int itd_getInfosNodes(FILE* file);
/**
* Find the id of entrees cases
*/
int getIdEntrees();
/**
* Fill the waves infos found in file
* param[in] file
*/
int itd_getInfosWaves(FILE* file);
/**
* Add waves of listWaves of the level
* param[in] listWaves
* param[in] wave to add.
*/
int addToWaves(ListWaves* listWaves, Wave* wave);
/**
* Verify whether it is a keyword, if so, check it's value
* The function sets the cursor back in it's original position if the line is invalid
* In case it's of another type
* param[in] file
* param[in] * MapData
* param[out] * MapData updated if the line is valid
*/
int itd_checkForMapData(FILE* file);
/**
* Recup the infos contains in the idt file
* param[in] string of itd_path
*/
void idt_load(char* itd_path);
/**
* Active an action of one menu of the game
* param[in] button name on click
*/
void itd_actionMenu(ButtonName button);
/**
* init the gameData in plateau after the idt/ppm load
*/
void itd_initLevel();
/**
* free the mapData structure (when the level is quit)
*/
void itd_freeMapData();
#endif //PPM_LOADER_H_
......@@ -18,22 +18,77 @@
ListMonsters* monster_initListMonster();
DataMonsters** monster_initDataMonster();
/**
* add the monster of the listMonster
* param[in] monster to add
*/
int addToList(Monster* monster);
/**
* Print the dataInfos of the monster
* param[in] monster to print
*/
void monster_printInfos(Monster *monster);
/**
* Create a new monster and add it to the list
* param[in] the type of the new monster
* param[in] the id of the entree for this monster
*/
int monster_popMonster(TypeMonster type, int idIn);
/**
* Affect dommage of the monster
* param[in] the projectile its affect dommages
*/
void monster_attack(Projectile* projectile);
/**
* Delete monster of the listMonster
* param[in] monster to delete
*/
void monster_removeFromList(Monster* monster);
/**
* Change the status of the monster ALIVE->DEAD
* param[in] monster to kill
*/
void monster_kill(Monster* monster);
/**
* Move the monster on the map in fonction of its mass
* param[in] monster to move
*/
int moveMonster(Monster* monster);
/**
* Change the risk index of the path where is the monster
* param[in] monster to delete
*/
void monster_delete(Monster* monster);
/**
* Free the list of monsters
* param[in] list to free
*/
void monster_freeListMonsters(ListMonsters* listMonsters);
/**
* Free a monster
* param[in] monster to free
*/
void monster_freeMonster(Monster* monster);
/**
* Change the orientation of the monster in fonction of move
* param[in] monster to change
*/
Orientation monster_moveDirection(Monster* monster);
/**
* @brief Parcours la liste de montre afin d'en demander le déplacement.
* Check the list of monsters and move each of it.
*/
int monster_moveAll();
#endif //MONSTER_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment