step.h File Reference

#include "cell.h"
#include "player.h"
#include "main.h"
Include dependency graph for step.h:
This graph shows which files directly or indirectly include this file:

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 Documentation

#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

Function Documentation

void addhp_action ( struct player pl  ) 
struct exit_code docommand ( struct leveldata  ld,
char  c 
) [read]

Keyboard events handler.

Call this function form main loop

Parameters:
ld - Current level
c - Command from keyboard
Returns:
Exit code to main loop
void greetings (  ) 

Shows greeting message.

int move_monsters ( struct cell level,
int  columns,
int  rows 
)

Moves near monsters.

Returns:
OK if player is alive after possible monsters attack, EXIT_ON_DEATH otherwise

Here is the call graph for this function:

void shop_respawn_action ( struct player pl  ) 

Here is the call graph for this function:

void showbattleres ( struct exit_code  ec  ) 

Shows result of battle.

Parameters:
ec - exit code of dodmg_tomon (), m_interact () (and so on) functions

Here is the call graph for this function:

void showstatus ( struct player  pl,
struct leveldata  ld 
)

Prints status message.

Parameters:
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

Parameters:
ld - Level
Returns:
Index of cell in struct leveldata::level array

Here is the call graph for this function:

Generated on Mon Nov 15 10:27:20 2010 for Tales of Paraverse by  doxygen 1.6.3