home · contact · privacy
e8497033bcec4a06711caf99655f6022fc47cde6
[plomrogue] / src / client / misc.h
1 /* src/client/misc.h
2  *
3  * Miscellaneous routines that have not yet found a proper parent module. Having
4  * LOTS of stuff in here is a sure sign that better modularization is in order.
5  */
6
7 #ifndef MISC_H
8 #define MISC_H
9
10 #include <stdint.h> /* for uint16_t */
11
12
13
14 /* Parses command line argument -i into client configuration. */
15 extern void obey_argv(int argc, char * argv[]);
16
17 /* Save / load (init) / unload (free/dissolve) / reload interface configuration
18  * data, world.wmeta.pad (initialized before opening any windows to the height
19  * of the terminal screen and a width of 1) and window chains.
20  *
21  * Note that reload_interface_conf() also calls map_center().
22  */
23 extern void save_interface_conf();
24 extern void load_interface_conf();
25 extern void unload_interface_conf();
26 extern void reload_interface_conf();
27
28 /* The SIGWINCH handler winch_called() merely sets world.winch to 1. This info
29  * is used by io_loop() to call reset_windows(), which adapts the currently
30  * loaded interface configuration to the new screen size.
31  */
32 extern void winch_called();
33 extern void reset_windows();
34
35 /* Return offset into center map of "mapsize" on "position" in "framesize". */
36 extern uint16_t center_offset(uint16_t position,
37                               uint16_t mapsize, uint16_t framesize);
38
39 /* Move world.inventory_sel up ("dir"="u") or down (else) as far as possible. */
40 extern void nav_inventory(char dir);
41
42
43
44 #endif