server/src/teleport.h
Enno Rehling a6ea80f5f8 create a for_all_in_range function to avoid use of region_list.
functional programming is good.
2019-09-29 16:57:26 +02:00

32 lines
795 B
C

#ifndef TELEPORT_H
#define TELEPORT_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define TP_RADIUS 2 /* Radius von Schemen */
#define MAX_SCHEMES ((TP_RADIUS * 2 + 1) * (TP_RADIUS * 2 + 1) - 4)
struct region;
struct region_list;
struct plane;
struct region *r_standard_to_astral(const struct region *r);
struct region *r_astral_to_standard(const struct region *);
bool inhabitable(const struct region *r);
bool is_astral(const struct region *r);
struct plane *get_astralplane(void);
int get_astralregions(const struct region * r, bool(*valid) (const struct region *), struct region *result[]);
void create_teleport_plane(void);
void spawn_braineaters(float chance);
int real2tp(int rk);
#ifdef __cplusplus
}
#endif
#endif