-
Notifications
You must be signed in to change notification settings - Fork 0
/
rogue_header.h
63 lines (46 loc) · 1.5 KB
/
rogue_header.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef _ROGUE_HEDDER_
#define _ROGUE_HEDDER_
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
//#include <conio.h>
#define TURE 0
#define FALSE -1
#define MAX_MAPNUM 9
#define MAP_WID 30
#define MAP_HIGH 30
#define MAP_CREATE_WAY 1
typedef struct creature{
int x, y;
int hp;
} CREATURE;
typedef struct mapctl{
int x, y;
int size_x, size_y;
int Bwid, Bhigh;
} MAPCTL;
/*rogue_main.c*/
/*rogue_map.c*/
void mapctl_alloc( MAPCTL *mapctl );
MAPCTL *init_mapctl( void );
void free_mapctl( MAPCTL *mapctl );
void init_map( char map[MAP_WID][MAP_HIGH] );
void mapper( MAPCTL *mapctl, CREATURE *player, char map[MAP_HIGH][MAP_WID] );
void create_map_first( MAPCTL *mapctl );
void create_root_first( MAPCTL *mapctl, char map[MAP_HIGH][MAP_WID] );
void line_wide( int StartX, int StartY, int Length, char map[MAP_WID][MAP_HIGH] );
void line_narrow( int StartX, int StartY, int Length, char map[MAP_WID][MAP_HIGH] );
void player_put( MAPCTL *mapctl, CREATURE *player );
/*rogue_action.c*/
void action_command( char cmd, CREATURE * player, char map[MAP_HIGH][MAP_WID] );
/*rogue_draw.c*/
void map_writer( MAPCTL *mapctl, char map[MAP_HIGH][MAP_WID] );
void map_viewer( char map[MAP_WID][MAP_HIGH] );
void creature_put( MAPCTL *mapctl, CREATURE *player );
void put_of_map( char data, CREATURE tmp, char map[MAP_HIGH][MAP_WID] );
/*archive.c*/
char mygetch( void );
#endif //_ROGUE_HEDDER_