home · contact · privacy
31e3ee03a3034c1bf0adcf80ad4065829e41c113
[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 /* Save / load (init) / unload (free/dissolve) / reload interface configuration
15  * data, world.wmeta.pad (initialized before opening any windows to the height
16  * of the terminal screen and a width of 1) and window chains.
17  *
18  * Note that reload_interface_conf() also calls map_center().
19  */
20 extern void save_interface_conf();
21 extern void load_interface_conf();
22 extern void unload_interface_conf();
23 extern void reload_interface_conf();
24
25 /* The SIGWINCH handler winch_called() merely sets world.winch to 1. This info
26  * is used by io_loop() to call reset_windows(), which adapts the currently
27  * loaded interface configuration to the new screen size.
28  */
29 extern void winch_called();
30 extern void reset_windows();
31
32 /* Return offset into center map of "mapsize" on "position" in "framesize". */
33 extern uint16_t center_offset(uint16_t position,
34                               uint16_t mapsize, uint16_t framesize);
35
36 /* Move world.inventory_sel up ("dir"="u") or down (else) as far as possible. */
37 extern void nav_inventory(char dir);
38
39
40
41 #endif