-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgame.h
162 lines (101 loc) · 3.89 KB
/
game.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/****************************************************************************
game.h
manages the gaming system
Lord of the Rings game engine
Copyright (C) 2003 Michal Benes
Lord of the Rings game engine is free software;
you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this code; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/
#ifndef _GAME_H
#define _GAME_H
#include "character.h"
#include "spot.h"
/* starts a new game */
extern void game_new(void);
/* save game */
extern int game_save(int n);
/* load game */
extern int game_load(int n);
/* activate party */
extern void game_party_activate(int id);
/* proceed to the next game frame */
extern void game_next_frame(void);
/* draws the map */
extern void game_draw_map(void);
/* init the graphics */
extern void game_init_graphics(void);
/* get leader character */
extern Character *game_get_leader();
/* set leader character */
extern int game_set_leader(Character *character);
/* set how much siver pennies has the group */
extern void game_set_silver(int amount);
/* get how much siver pennies has the group */
extern int game_get_silver();
/* group pays silver */
extern int game_pay_silver(int amount);
/* group gets silver */
extern void game_add_silver(int amount);
/* returns game text */
extern char *game_get_text(int index);
/* returns game paragraph text */
extern char *game_get_paragraph_text(int index, int question);
/* is character in the party? */
extern int game_in_party(Character *character);
/* get the game party */
extern int game_get_party(int codes[10]);
/* get the game party characters */
extern int game_get_party_characters(Character *party[11]);
/* set game party characters */
extern void game_set_party_characters(Character *party[11], int size);
/* loads a map */
extern void game_load_map(int map);
/* recruit character to the party */
extern int game_recruit(Character *character, int force);
/* dismiss character */
extern int game_dismiss(Character *character);
/* teleport leader return 1 if the map was changed */
extern int game_leader_teleport(int rel, int x, int y, int dir, int map);
/* save current position for further reference */
extern void game_save_position();
/* teleport to the saved position */
extern int game_load_position();
/* gets actual game spot */
extern CommandSpot *game_get_actual_spot(void);
/* continue command spot */
extern void game_continue_spot(void);
/* get game register */
extern int game_get_register(int index);
/* set game register */
extern void game_set_register(int index, int value);
/* set game timer */
extern void game_set_timer(int ticks);
/* set game tmp leader */
extern void game_set_tmp_leader(Character *tmp_leader);
/* dismiss game tmp leader */
extern void game_dismiss_tmp_leader(void);
/* all party characters follow the leader */
extern void game_follow_leader(void);
/* check if we have torch lit */
extern void game_check_light(void);
/* set if characters can move */
extern void game_set_moving(int moving);
/* get if characters can move */
extern int game_get_moving(void);
/* set if party is following leader */
extern void game_set_follow(int follow);
#ifdef TTT
/* convert vol. I characters to vol. II */
extern void game_convert(int game_id);
#endif
#endif /* _GAME_H */