Angband
game-world.h
Go to the documentation of this file.
1 
19 #ifndef GAME_WORLD_H
20 #define GAME_WORLD_H
21 
22 #include "cave.h"
23 
24 struct level {
25  int depth;
26  char *name;
27  char *up;
28  char *down;
29  struct level *next;
30 };
31 
32 extern u16b daycount;
33 extern u32b seed_randart;
34 extern u32b seed_flavor;
35 extern s32b turn;
36 extern bool character_generated;
37 extern bool character_dungeon;
38 extern const byte extract_energy[200];
39 extern struct level *world;
40 
41 struct level *level_by_name(char *name);
42 struct level *level_by_depth(int depth);
43 bool is_daytime(void);
44 int turn_energy(int speed);
45 void play_ambient_sound(void);
46 void process_world(struct chunk *c);
47 void on_new_level(void);
48 void process_player(void);
49 void run_game_loop(void);
50 
51 #endif /* !GAME_WORLD_H */
uint16_t u16b
Definition: h-basic.h:169
struct level * next
Definition: game-world.h:29
void on_new_level(void)
Housekeeping on arriving on a new level.
Definition: game-world.c:868
struct level * level_by_depth(int depth)
Find a level by its depth.
Definition: game-world.c:110
char * up
Definition: game-world.h:27
uint32_t u32b
Definition: h-basic.h:172
struct level * world
Definition: game-world.c:48
Definition: game-world.h:24
uint8_t byte
Definition: h-basic.h:167
Definition: cave.h:160
struct level * level_by_name(char *name)
Find a level by its name.
Definition: game-world.c:95
void process_player(void)
Process player commands from the command queue, finishing when there is a command using energy (any r...
Definition: game-world.c:801
void process_world(struct chunk *c)
Handle things that need updating once every 10 game turns.
Definition: game-world.c:495
bool is_daytime(void)
Say whether it's daytime or not.
Definition: game-world.c:125
void play_ambient_sound(void)
Play an ambient sound dependent on dungeon level, and day or night in town.
Definition: game-world.c:257
char * name
Definition: game-world.h:26
u16b daycount
Definition: game-world.c:42
s32b turn
Definition: game-world.c:45
int turn_energy(int speed)
The amount of energy gained in a turn by a player or monster.
Definition: game-world.c:136
u32b seed_randart
Definition: game-world.c:43
void run_game_loop(void)
The main game loop.
Definition: game-world.c:936
Matters relating to the current dungeon level.
int depth
Definition: game-world.h:25
int32_t s32b
Definition: h-basic.h:173
Intialize random names
Definition: init.c:756
char * down
Definition: game-world.h:28
bool character_generated
Definition: game-world.c:46
bool character_dungeon
Definition: game-world.c:47
const byte extract_energy[200]
This table allows quick conversion from "speed" to "energy" The basic function WAS ((S>=110) ...
Definition: game-world.c:68
u32b seed_flavor
Definition: game-world.c:44