summaryrefslogtreecommitdiff
path: root/menuchoixpersos.c
AgeCommit message (Collapse)Author
2015-01-11renamed the rects inside the struct positionsOlivier Gayot
it is redundant in thus inconvenient to repeat 'position' inside a structure named position. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-11remove or replace a lot of code for the initializationOlivier Gayot
many structures or positions were not revelant anymore and thus have been removed. some positions were not relative to each other it is sometimes not meaningful to put surfaces in the global scope when they only need to be used once. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-10allow to pass the resolution as argumentsOlivier Gayot
example (for my netbook): $ ./a.out 1024 600 Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-10do not handle font I/O inside the game.Olivier Gayot
the fonts (actually the font) is opened at startup and closed at shutdown. This fixes possible crashes during the game if a font file is removed/moved. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-10added "cyanmure" magicOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-10added "Defend" actionOlivier Gayot
physical and magical damages are divided by 2 when a character is on defensive state. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-09select a target using a structure instead of an indexOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-08initialize the items (aka objects) of the teamsOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-08removed unused deprecated constantsOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-08fix invalid write in new_enemy_team and in FjouerOlivier Gayot
in the function `new_enemy_team()', we used to loop through the enemies while the incrementer is less or equal to the count. However, since there are `count' elements, we need to stop the loop when the incrementer gets equal to `count' the same bug is present in `Fjouer()' when checking if the player wins. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-08added the cursor and its position to a characterOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-08use the new enemy team instead of the old array of ENEMIESOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07added the current user to the team structureOlivier Gayot
the current character is generated randomly at the initialization of the team. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07generate a team of CPU controlled playersOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07the generation of the team is now genericOlivier Gayot
we can now pass any team and it will be generated. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07generate the affinities during the creation of the charactersOlivier Gayot
do not differenciate between the players and the enemies as well Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07add the warrior gobelin as a real classOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07use a team / character model instead of an array of personnagesOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07do not duplicate surfaces but make them point to each otherOlivier Gayot
There is no need to reopen the bitmap files each time we need a new paladin or priest or whatever. Instead, just load them at startup and them make them point to the good destination. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07simplify the code of menuchoixpersosOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07Fix use of uninitialized variable in FmenuchoixpersosOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07fixed some compilation warningsOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07handle default cases in switchesOlivier Gayot
since gcc produces warnings when default cases are not handled, make it happy. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07game: added vim key bindings to UP/DOWN/LEFT/RIGHTOlivier Gayot
h/j/k/l are mapped to behave like arrow keys so that the navigation is easier in the menus. F and A are respectiverly used to validate and cancel as well. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2015-01-07game: converted source files from iso-8859 to UTF-8Olivier Gayot
Accents in the content of certain files made them react as binary files. Fixed by converting them to Unicode. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2014-10-26game: fix segmentation fault whenever the game startsOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2014-10-26game: remove useless checksOlivier Gayot
it is safe to pass a null pointer to SDL_FreeSurface() BTW: change the format of the files from dos to unix Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2014-10-26game: Add a buildable version of the agmeOlivier Gayot
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>