|
LI2 Roguelite
|
#include <stdlib.h>#include <ncurses.h>#include "player.h"#include "item.h"#include "inventory.h"
Functions | |
| Player * | initPlayer (int x, int y) |
| Initializes a new player. Allocates memory for a new player and initializes its fields. More... | |
| void | drawPlayer (Player *p) |
| Draws the player on the screen. More... | |
| void | updatePotionEffects (Player *p) |
| Updates the potion effects of the player. More... | |
| void | freePlayer (void *p) |
| frees the player. Sets all fields to 0 and frees the memory. More... | |
| void drawPlayer | ( | Player * | p | ) |
Draws the player on the screen.
TODO: colors damage the player and add color to player
| p | Player to draw |
| void freePlayer | ( | void * | p | ) |
frees the player. Sets all fields to 0 and frees the memory.
| p | Player to free |
| Player* initPlayer | ( | int | x, |
| int | y | ||
| ) |
Initializes a new player. Allocates memory for a new player and initializes its fields.
| x | Player x initial coordinate |
| y | Player y initial coordinate |
| void updatePotionEffects | ( | Player * | p | ) |
Updates the potion effects of the player.
Sensory potion: increases the player vision and earing Invincibility potion: increases the player defense
| p | Player to update |