Populous: The Beginning Script 3  1.0.0
Documentation for Populous Script 3 engine
Module_Map.h
Go to the documentation of this file.
1 /*
2  Populous: The Beginning - Script Language Header
3  Brandan Tyler Lasley 2019
4  INTERNAL USE ONLY --- DO NOT DISTRIBUTE
5 */
6 
8 
9 void import(enum modules); // (0x19AE1C)
10 void exit(); // (0x19B06B)
11 bool include(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >); // (0x19B07C)
12 struct Coord3D MAP_XZ_2_WORLD_XYZ(union MapPosXZ, struct Coord3D *); // (0x19A427)
13 struct Coord3D MAP_XZ_2_WORLD_XYZ(long, long); // (0x19A426)
14 unsigned long MAP_ELEM_PTR_2_IDX(struct MapElement *); // (0x19A425)
15 void ensure_point_on_ground(struct Coord3D *); // (0x534230)
16 unsigned char is_map_point_land(struct Coord2D *); // (0x66D8B0)
17 unsigned char is_sub_cell_walkable_in_direction(unsigned char, unsigned char, unsigned short); // (0x66D9A0)
18 long is_map_cell_a_building_belonging_to_player(unsigned short, long); // (0x66CF10)
19 long is_map_cell_n_squares_away_from_other_owned_building(unsigned short, long, long); // (0x66D680)
20 unsigned char is_map_cell_flat_and_land(unsigned short); // (0x4EE4D0)
21 unsigned char is_map_cell_flat(unsigned short); // (0x66D4F0)
22 unsigned char is_map_cell_land(unsigned short); // (0x4EE510)
23 unsigned char is_map_point_sea(struct Coord2D *); // (0x4EE570)
24 unsigned char is_map_cell_near_coast(unsigned short, short); // (0x66D7E0)
25 unsigned char is_map_cell_bldg_markable(struct Player *, unsigned short, unsigned char, unsigned char, unsigned short, unsigned char); // (0x66D150)
26 unsigned char is_cell_markable_with_near_bldgs_and_markers(unsigned short, short, signed char); // (0x66CD10)
27 unsigned char are_list_map_elems_flat(struct MapElemList *, long); // (0x66AE70)
28 unsigned char are_surround_cells_too_steep_for_building(unsigned short, short); // (0x66B1A0)
29 unsigned char are_surround_cells_too_steep_for_wall(unsigned short); // (0x66B270)
30 unsigned char are_surround_cells_all_land(unsigned short); // (0x66B0C0)
31 long get_world_dist_xyz(struct Coord3D *, struct Coord3D *); // (0x66C8A0)
32 long get_coastline_point(struct Coord2D *, struct MapElement *, unsigned short); // (0x66BC60)
33 void get_max_and_min_alts_for_cell(unsigned short, unsigned short *, unsigned short *); // (0x66C600)
34 long get_max_alt_diff_for_coord2d(struct Coord2D *); // (0x66C2E0)
35 unsigned char get_shade_from_dir_code(signed char); // (0x66C7F0)
36 long get_max_alt_diff_for_cell(unsigned short); // (0x66C100)
37 void get_map_square_from_map_idxs(struct MapSquare *, unsigned short, unsigned short); // (0x66BF90)
38 short get_map_elem_list_average_alt(struct MapElemList *, long); // (0x66BF10)
39 struct MapElement * get_cell_surround_map_element(unsigned short, unsigned char); // (0x66BB60)
40 struct Thing * get_closest_map_cell_thing_type(unsigned char, unsigned char, struct Coord2D const *, struct Coord2D *); // (0x66BBF0)
41 long get_world_dist_xz(struct Coord2D const *, struct Coord2D const *); // (0x66CA70)
42 long get_dist_xz_cell_quick(unsigned short, unsigned short); // (0x66BD60)
43 long get_world_dist_xz_quick(struct Coord2D const *, struct Coord2D const *); // (0x66CC60)
44 long get_world_dist_xyz_quick(struct Coord3D *, struct Coord3D *); // (0x66C9A0)
45 long get_world_dist_xz_cell(unsigned short, unsigned short); // (0x66CB50)
46 long get_wrap_dist_1d(long, long); // (0x55B5E0)
47 long get_signed_wrap_world_dist_1d(long, long); // (0xD7AE30)
48 struct MapElement * world_coord2d_to_map_ptr(struct Coord2D const *); // (0x4F4990)
49 struct MapElement * world_coord3d_to_map_ptr(struct Coord3D *); // (0x53EBF0)
50 unsigned short world_coord2d_to_map_idx(struct Coord2D const *); // (0x4FCA20)
51 unsigned short world_coord3d_to_map_idx(struct Coord3D *); // (0x4EE840)
52 void map_ptr_to_world_coord2d(struct MapElement *, struct Coord2D *); // (0x587FB0)
53 void map_ptr_to_world_coord2d_centre(struct MapElement *, struct Coord2D *); // (0xED6480)
54 void map_idx_to_world_coord2d(unsigned short, struct Coord2D *); // (0x53FD80)
55 void map_idx_to_world_coord2d_centre(unsigned short, struct Coord2D *); // (0x4F47F0)
56 void map_idx_sub_cell_to_world_coord2d_centre(unsigned short, struct Coord2D *); // (0x54DFD0)
57 void map_idx_to_world_coord3d(unsigned short, struct Coord3D *); // (0x5CA8A0)
58 void map_idx_to_world_coord3d_centre(unsigned short, struct Coord3D *); // (0x537820)
59 void map_idx_to_world_coord3d_no_alt(unsigned short, struct Coord3D *); // (0x5CA920)
60 void map_idx_to_world_coord3d_centre_no_alt(unsigned short, struct Coord3D *); // (0x66DAF0)
61 void map_xz_to_world_coord2d(unsigned char, unsigned char, struct Coord2D *); // (0x673750)
62 long world_to_in_cell_position(unsigned short); // (0x4F49F0)
63 long world_coord_start_of_cell(unsigned short); // (0x4F49E0)
64 unsigned char get_map_elem_collide_table_idx(struct MapElement const *); // (0x4ECB70)
65 void set_map_elem_collide_table_idx(struct MapElement *, unsigned char); // (0x66F550)
66 unsigned char is_map_elem_warrior_in_drum_tower_flag_set_for_player(struct MapElement *, unsigned char); // (0xED3F40)
67 unsigned char is_map_elem_coast(struct MapElement const *); // (0x544660)
68 unsigned char is_map_elem_all_land(struct MapElement const *); // (0x4EE540)
69 unsigned char is_map_elem_all_sea(struct MapElement const *); // (0x537060)
70 unsigned char is_map_elem_all_grass(struct MapElement *); // (0x5A0A90)
71 unsigned char is_map_elem_sea_or_coast(struct MapElement *); // (0x59EDC0)
72 unsigned char is_map_elem_land_or_coast(struct MapElement *); // (0xED3F10)
73 unsigned char is_coord2d_at_cell_centre(struct Coord2D *); // (0xED3DF0)
74 void centre_coord_on_block(struct Coord2D *); // (0x4EEDA0)
75 void centre_coord3d_on_block(struct Coord3D *); // (0x5496D0)
76 void zero_coord_on_block(struct Coord2D *); // (0x53EC40)
77 void randomize_coord_on_block(struct Coord2D *); // (0x78E6F0)
78 void zero_coord3d_on_block(struct Coord3D *); // (0xEF8FC0)
79 unsigned char is_building_on_map_cell(unsigned short); // (0xED3D40)
80 void ensure_thing_on_ground(struct Thing *); // (0x534260)
81 void ensure_point_above_ground(struct Coord3D *); // (0x5C6010)
82 unsigned char is_map_cell_obstacle_free(unsigned short); // (0xED3ED0)
83 unsigned char is_thing_on_ground(struct Thing const *); // (0xED4490)
84 unsigned char is_coord_on_ground(struct Coord3D const *); // (0x673450)
85 unsigned char is_point_too_steep_for_moving_thing(struct Coord2D *, struct Thing *); // (0x673490)
86 unsigned char is_point_steeper_than(struct Coord2D *, short); // (0x544850)
87 unsigned char is_cell_too_steep_for_building(unsigned short, short); // (0x66CEA0)
88 unsigned char is_cell_too_steep_for_building_destroy(unsigned short, short); // (0xED3D70)
89 void coord2D_to_coord3D(struct Coord2D const *, struct Coord3D *); // (0x532A60)
90 void coord3D_to_coord2D(struct Coord3D const *, struct Coord2D *); // (0x532A90)
91 void get_four_surround_map_cell_info(struct Coord2D *, struct MapElemList *); // (0x5C60F0)
92 void get_four_alt_surround_map_cell_info(unsigned short, struct MapElemList *); // (0x53FA40)
93 void get_nine_surround_map_cell_info(struct Coord2D *, struct MapElemList *); // (0x535780)
94 void coord2d_to_jnav_point(struct Coord2D *, struct wraphug_waypoint *); // (0x4EEE00)
95 void jnav_point_to_coord2d(struct wraphug_waypoint *, struct Coord2D *); // (0x673550)
96 long get_jnav_point_dist_sq(struct wraphug_waypoint *, struct wraphug_waypoint *); // (0x672E70)
97 void get_jnav_thing_start_and_end_points(struct Thing *, struct wraphug_waypoint *, struct wraphug_waypoint *); // (0x4F45E0)
98 unsigned char are_coords_on_same_map_cell(struct Coord2D const *, struct Coord2D const *); // (0x6140F0)
99 void set_map_elem_owner(struct MapElement *, unsigned char); // (0x53D510)
100 void validate_thing_coord(struct Coord3D *, struct Thing const *); // (0x677560)
101 void increment_map_idx_by_orient(union MapPosXZ *, signed char); // (0x5362A0)
102 void set_map_elem_object_shadow(struct MapElement *, long); // (0x53D4E0)
103 long get_map_elem_object_shadow(struct MapElement *); // (0x4F4610)
104 void set_map_elem_lava_num(struct MapElement *, long); // (0x66F580)
105 long get_map_elem_lava_num(struct MapElement *); // (0x5C6260)
106 short point_altitude_with_objects(short, short); // (0x66E310)
107 short point_altitude(short, short); // (0x66E050)
108 void set_square_map_params(unsigned short, short, unsigned char); // (0x66F7E0)
109 void affect_mapwho_area(unsigned char, unsigned short, short); // (0x4EC310)
110 void SearchMapCells(unsigned int, unsigned int, unsigned int, unsigned int, unsigned short, class std::function<bool __cdecl(struct MapElement *)>); // (0x19A424)
111 void SearchMapCellsXZ(unsigned int, unsigned int, unsigned int, unsigned int, unsigned short, class std::function<bool __cdecl(struct MapElement *,union MapPosXZ &)>); // (0x19A423)
112 
113 
115 
116 
117 
119 
120 
121 
123 
void set_map_elem_object_shadow(struct MapElement *, long)
unsigned char is_thing_on_ground(struct Thing const *)
void ensure_point_on_ground(struct Coord3D *)
void exit()
void map_xz_to_world_coord2d(unsigned char, unsigned char, struct Coord2D *)
unsigned char is_map_cell_bldg_markable(struct Player *, unsigned short, unsigned char, unsigned char, unsigned short, unsigned char)
long get_world_dist_xz_quick(struct Coord2D const *, struct Coord2D const *)
struct Coord3D MAP_XZ_2_WORLD_XYZ(union MapPosXZ, struct Coord3D *)
unsigned char is_map_elem_land_or_coast(struct MapElement *)
void SearchMapCells(unsigned int, unsigned int, unsigned int, unsigned int, unsigned short, class std::function< bool __cdecl(struct MapElement *)>)
void affect_mapwho_area(unsigned char, unsigned short, short)
void coord2d_to_jnav_point(struct Coord2D *, struct wraphug_waypoint *)
unsigned char are_surround_cells_all_land(unsigned short)
unsigned char is_map_point_land(struct Coord2D *)
void map_idx_to_world_coord3d_no_alt(unsigned short, struct Coord3D *)
unsigned char are_list_map_elems_flat(struct MapElemList *, long)
long get_signed_wrap_world_dist_1d(long, long)
unsigned char is_map_cell_flat(unsigned short)
struct MapElement * get_cell_surround_map_element(unsigned short, unsigned char)
void set_map_elem_owner(struct MapElement *, unsigned char)
unsigned char is_point_too_steep_for_moving_thing(struct Coord2D *, struct Thing *)
struct MapElement * world_coord2d_to_map_ptr(struct Coord2D const *)
void map_ptr_to_world_coord2d_centre(struct MapElement *, struct Coord2D *)
unsigned char is_cell_too_steep_for_building_destroy(unsigned short, short)
unsigned char get_map_elem_collide_table_idx(struct MapElement const *)
unsigned char are_surround_cells_too_steep_for_wall(unsigned short)
void get_map_square_from_map_idxs(struct MapSquare *, unsigned short, unsigned short)
void map_ptr_to_world_coord2d(struct MapElement *, struct Coord2D *)
unsigned short world_coord2d_to_map_idx(struct Coord2D const *)
void jnav_point_to_coord2d(struct wraphug_waypoint *, struct Coord2D *)
long get_coastline_point(struct Coord2D *, struct MapElement *, unsigned short)
long get_map_elem_object_shadow(struct MapElement *)
long is_map_cell_a_building_belonging_to_player(unsigned short, long)
unsigned char is_building_on_map_cell(unsigned short)
long get_world_dist_xz_cell(unsigned short, unsigned short)
void map_idx_to_world_coord3d(unsigned short, struct Coord3D *)
void set_square_map_params(unsigned short, short, unsigned char)
long get_map_elem_lava_num(struct MapElement *)
void map_idx_to_world_coord2d_centre(unsigned short, struct Coord2D *)
unsigned char is_sub_cell_walkable_in_direction(unsigned char, unsigned char, unsigned short)
void get_four_alt_surround_map_cell_info(unsigned short, struct MapElemList *)
bool include(class std::basic_string< char, struct std::char_traits< char >, class std::allocator< char > >)
unsigned char are_coords_on_same_map_cell(struct Coord2D const *, struct Coord2D const *)
void centre_coord_on_block(struct Coord2D *)
unsigned short world_coord3d_to_map_idx(struct Coord3D *)
long get_max_alt_diff_for_cell(unsigned short)
long get_dist_xz_cell_quick(unsigned short, unsigned short)
void ensure_point_above_ground(struct Coord3D *)
void get_four_surround_map_cell_info(struct Coord2D *, struct MapElemList *)
void centre_coord3d_on_block(struct Coord3D *)
long get_max_alt_diff_for_coord2d(struct Coord2D *)
void coord2D_to_coord3D(struct Coord2D const *, struct Coord3D *)
short get_map_elem_list_average_alt(struct MapElemList *, long)
void zero_coord3d_on_block(struct Coord3D *)
unsigned char is_coord_on_ground(struct Coord3D const *)
void map_idx_to_world_coord3d_centre(unsigned short, struct Coord3D *)
unsigned char is_map_cell_near_coast(unsigned short, short)
struct MapElement * world_coord3d_to_map_ptr(struct Coord3D *)
void coord3D_to_coord2D(struct Coord3D const *, struct Coord2D *)
unsigned char get_shade_from_dir_code(signed char)
unsigned char is_cell_too_steep_for_building(unsigned short, short)
long get_world_dist_xyz(struct Coord3D *, struct Coord3D *)
long world_coord_start_of_cell(unsigned short)
unsigned char is_map_elem_all_sea(struct MapElement const *)
long get_wrap_dist_1d(long, long)
void validate_thing_coord(struct Coord3D *, struct Thing const *)
unsigned char is_point_steeper_than(struct Coord2D *, short)
unsigned char is_map_point_sea(struct Coord2D *)
short point_altitude(short, short)
void SearchMapCellsXZ(unsigned int, unsigned int, unsigned int, unsigned int, unsigned short, class std::function< bool __cdecl(struct MapElement *, union MapPosXZ &)>)
long get_jnav_point_dist_sq(struct wraphug_waypoint *, struct wraphug_waypoint *)
unsigned char is_map_elem_all_land(struct MapElement const *)
unsigned char is_cell_markable_with_near_bldgs_and_markers(unsigned short, short, signed char)
void map_idx_to_world_coord2d(unsigned short, struct Coord2D *)
void increment_map_idx_by_orient(union MapPosXZ *, signed char)
void set_map_elem_lava_num(struct MapElement *, long)
unsigned char is_map_cell_flat_and_land(unsigned short)
void get_jnav_thing_start_and_end_points(struct Thing *, struct wraphug_waypoint *, struct wraphug_waypoint *)
unsigned char is_coord2d_at_cell_centre(struct Coord2D *)
unsigned char is_map_elem_coast(struct MapElement const *)
unsigned char is_map_cell_land(unsigned short)
long is_map_cell_n_squares_away_from_other_owned_building(unsigned short, long, long)
void map_idx_sub_cell_to_world_coord2d_centre(unsigned short, struct Coord2D *)
unsigned char is_map_elem_sea_or_coast(struct MapElement *)
unsigned char are_surround_cells_too_steep_for_building(unsigned short, short)
void map_idx_to_world_coord3d_centre_no_alt(unsigned short, struct Coord3D *)
void set_map_elem_collide_table_idx(struct MapElement *, unsigned char)
void get_max_and_min_alts_for_cell(unsigned short, unsigned short *, unsigned short *)
unsigned long MAP_ELEM_PTR_2_IDX(struct MapElement *)
unsigned char is_map_cell_obstacle_free(unsigned short)
void ensure_thing_on_ground(struct Thing *)
struct Thing * get_closest_map_cell_thing_type(unsigned char, unsigned char, struct Coord2D const *, struct Coord2D *)
short point_altitude_with_objects(short, short)
long get_world_dist_xz(struct Coord2D const *, struct Coord2D const *)
void get_nine_surround_map_cell_info(struct Coord2D *, struct MapElemList *)
long get_world_dist_xyz_quick(struct Coord3D *, struct Coord3D *)
unsigned char is_map_elem_warrior_in_drum_tower_flag_set_for_player(struct MapElement *, unsigned char)
long world_to_in_cell_position(unsigned short)
void randomize_coord_on_block(struct Coord2D *)
void zero_coord_on_block(struct Coord2D *)
unsigned char is_map_elem_all_grass(struct MapElement *)