#include "cell.h"
#include "player.h"
#include "main.h"
Data Structures | |
struct | exit_code |
Exit code structure. More... | |
Defines | |
#define | OK 0 |
#define | EXIT 1 |
#define | EXIT_ON_ERROR 2 |
#define | TRY_AGAIN 3 |
#define | WAIT 4 |
#define | EXIT_ON_DEATH 5 |
#define | NEWLEVEL 6 |
#define | EXIT_BY_COMMAND 7 |
#define | CALL_WITH_PREVIOUS_ARG 8 |
Functions | |
void | greetings () |
Shows greeting message. | |
void | showstatus (struct player pl, struct leveldata ld) |
Prints status message. | |
void | showbattleres (struct exit_code ec) |
Shows result of battle. | |
int | the_closest_cell (struct leveldata ld) |
Returns closest cell in specified direction. | |
struct exit_code | docommand (struct leveldata ld, char c) |
Keyboard events handler. | |
int | move_monsters (struct cell *level, int columns, int rows) |
Moves near monsters. | |
void | addhp_action (struct player *pl) |
void | shop_respawn_action (struct player *pl) |
#define CALL_WITH_PREVIOUS_ARG 8 |
#define EXIT 1 |
#define EXIT_BY_COMMAND 7 |
#define EXIT_ON_DEATH 5 |
#define EXIT_ON_ERROR 2 |
#define NEWLEVEL 6 |
#define OK 0 |
#define TRY_AGAIN 3 |
#define WAIT 4 |
void addhp_action | ( | struct player * | pl | ) |
Keyboard events handler.
Call this function form main loop
ld | - Current level | |
c | - Command from keyboard |
void greetings | ( | ) |
Shows greeting message.
int move_monsters | ( | struct cell * | level, | |
int | columns, | |||
int | rows | |||
) |
Moves near monsters.
void shop_respawn_action | ( | struct player * | pl | ) |
void showbattleres | ( | struct exit_code | ec | ) |
Shows result of battle.
ec | - exit code of dodmg_tomon (), m_interact () (and so on) functions |
Prints status message.
pl | - player | |
ld | - current level |
int the_closest_cell | ( | struct leveldata | ld | ) |
Returns closest cell in specified direction.
Asks user for direction and returns closest cell in this direction
ld | - Level |