#include "obj_slabs.h"
#include <math.h>
#include "lev_data.h"
#include "globals.h"
#include "obj_things.h"
Go to the source code of this file.
Functions | |
unsigned char | get_owner_next (unsigned char plyr_idx) |
unsigned char | get_owner_prev (unsigned char plyr_idx) |
void | update_slab_owners (struct LEVEL *lvl) |
short | place_room_rndpos (struct LEVEL *lvl, const unsigned short rslab, const unsigned char rown, const struct IPOINT_2D *rsize) |
char * | get_owner_type_fullname (unsigned char own_idx) |
char * | get_owner_type_colorname (unsigned char own_idx) |
short | slab_is_central (struct LEVEL *lvl, int tx, int ty) |
short | slabs_verify (struct LEVEL *lvl, char *err_msg, struct IPOINT_2D *errpt) |
int | slab_siblings_oftype (struct LEVEL *lvl, int x, int y, unsigned short slab_type) |
short | slab_is_room (unsigned short slab_type) |
short | slab_is_door (unsigned short slab_type) |
short | slab_is_wall (unsigned short slab_type) |
unsigned short | get_random_wall_slab (void) |
short | slab_is_wealth (unsigned short slab_type) |
short | slab_is_space (unsigned short slab_type) |
short | slab_is_liquid (unsigned short slab_type) |
short | slab_is_tall_unclmabl (unsigned short slab_type) |
short | slab_is_short_unclmabl (unsigned short slab_type) |
short | slab_is_short (unsigned short slab_type) |
short | slab_is_tall (unsigned short slab_type) |
short | slab_is_short_clmabl (unsigned short slab_type) |
short | slab_is_claimedgnd (unsigned short slab_type) |
short | slab_is_clmabl (unsigned short slab_type) |
short | slab_allows_torch (unsigned short slab_type) |
short | slab_needs_adjacent_torch (unsigned short slab_type) |
void | slab_draw_smear (struct LEVEL *lvl, int startx, int starty, int startr, int endx, int endy, int endr, int bend, unsigned short slab_type) |
void | slab_draw_circle (struct LEVEL *lvl, int x, int y, int rad, unsigned short slab_type) |
short | slab_verify_entry (unsigned short slab_type, char *err_msg) |
char * | get_slab_fullname (unsigned short slb_type) |
short | subtl_is_near_tall_slab (struct LEVEL *lvl, unsigned int sx, unsigned int sy) |
Variables | |
char const | SLB_UNKN_LTEXT [] = "Unknown slab" |
char const | SLB_ROCK_LTEXT [] = "Rock" |
char const | SLB_GOLD_LTEXT [] = "Gold" |
char const | SLB_EARTH_LTEXT [] = "Earth" |
char const | SLB_TORCHDIRT_LTEXT [] = "Torch plate earth" |
char const | SLB_WALLDRAPE_LTEXT [] = "Wall with drape" |
char const | SLB_WALLTORCH_LTEXT [] = "Wall with torch" |
char const | SLB_WALLWTWINS_LTEXT [] = "Wall with twins" |
char const | SLB_WALLWWOMAN_LTEXT [] = "Wall with woman" |
char const | SLB_WALLPAIRSHR_LTEXT [] = "Wall w/pair shag." |
char const | SLB_PATH_LTEXT [] = "Path" |
char const | SLB_CLAIMED_LTEXT [] = "Claimed ground" |
char const | SLB_LAVA_LTEXT [] = "Lava" |
char const | SLB_WATER_LTEXT [] = "Water" |
char const | SLB_PORTAL_LTEXT [] = "Entrance" |
char const | SLB_TREASURE_LTEXT [] = "Treasure room" |
char const | SLB_LIBRARY_LTEXT [] = "Library" |
char const | SLB_PRISON_LTEXT [] = "Prison" |
char const | SLB_TORTURE_LTEXT [] = "Torture chamber" |
char const | SLB_TRAINING_LTEXT [] = "Training room" |
char const | SLB_DUNGHEART_LTEXT [] = "Dungeon heart" |
char const | SLB_WORKSHOP_LTEXT [] = "Workshop" |
char const | SLB_SCAVENGER_LTEXT [] = "Scavenger room" |
char const | SLB_TEMPLE_LTEXT [] = "Temple" |
char const | SLB_GRAVEYARD_LTEXT [] = "Graveyard" |
char const | SLB_HATCHERY_LTEXT [] = "Hatchery" |
char const | SLB_LAIR_LTEXT [] = "Lair" |
char const | SLB_BARRACKS_LTEXT [] = "Barracks" |
char const | SLB_DOORWOOD_LTEXT [] = "Wooden door" |
char const | SLB_DOORBRACE_LTEXT [] = "Braced door" |
char const | SLB_DOORIRON_LTEXT [] = "Iron door" |
char const | SLB_DOORMAGIC_LTEXT [] = "Magic door" |
char const | SLB_BRIDGE_LTEXT [] = "Bridge" |
char const | SLB_GEMS_LTEXT [] = "Gems" |
char const | SLB_GUARDPOST_LTEXT [] = "Guard post" |
const char * | owner_fullnames [] |
const char * | owner_colornames [] |
const unsigned char | owners_list [] |
const unsigned short | slabs_space [] |
const unsigned short | slabs_liquid [] |
const unsigned short | slabs_short_unclmabl [] |
const unsigned short | slabs_wealth [] |
const unsigned short | slabs_tall_unclmabl [] |
const unsigned short | slabs_walls [] |
const unsigned short | slabs_rooms [] |
const unsigned short | slabs_doors [] |
const char * | all_slabs_fullnames [] |
unsigned char get_owner_next | ( | unsigned char | plyr_idx | ) |
Definition at line 148 of file obj_slabs.c.
unsigned char get_owner_prev | ( | unsigned char | plyr_idx | ) |
Definition at line 155 of file obj_slabs.c.
char* get_owner_type_colorname | ( | unsigned char | own_idx | ) |
char* get_owner_type_fullname | ( | unsigned char | own_idx | ) |
Definition at line 222 of file obj_slabs.c.
unsigned short get_random_wall_slab | ( | void | ) |
Definition at line 336 of file obj_slabs.c.
char* get_slab_fullname | ( | unsigned short | slb_type | ) |
short slab_allows_torch | ( | unsigned short | slab_type | ) |
void slab_draw_circle | ( | struct LEVEL * | lvl, | |
int | x, | |||
int | y, | |||
int | rad, | |||
unsigned short | slab_type | |||
) |
void slab_draw_smear | ( | struct LEVEL * | lvl, | |
int | startx, | |||
int | starty, | |||
int | startr, | |||
int | endx, | |||
int | endy, | |||
int | endr, | |||
int | bend, | |||
unsigned short | slab_type | |||
) |
short slab_is_central | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Definition at line 246 of file obj_slabs.c.
short slab_is_claimedgnd | ( | unsigned short | slab_type | ) |
short slab_is_clmabl | ( | unsigned short | slab_type | ) |
short slab_is_door | ( | unsigned short | slab_type | ) |
Definition at line 318 of file obj_slabs.c.
Referenced by compute_flg_for_tile(), create_columns_slb_wallbrick(), level_verify_logic(), slab_is_claimedgnd(), slab_is_short_clmabl(), slab_verify_entry(), and update_clmaffective_obj_for_slab().
short slab_is_liquid | ( | unsigned short | slab_type | ) |
short slab_is_room | ( | unsigned short | slab_type | ) |
Definition at line 309 of file obj_slabs.c.
Referenced by compute_flg_for_tile(), compute_item_sensitile(), fill_columns_slb_roomrelief(), remove_automade_obj_for_slab(), slab_allows_torch(), slab_is_short(), slab_is_short_clmabl(), slab_verify_entry(), and update_clmaffective_obj_for_slab().
short slab_is_short | ( | unsigned short | slab_type | ) |
Definition at line 388 of file obj_slabs.c.
Referenced by compute_flg_for_tile(), create_columns_slb_wall_force_relief_splatbody(), create_columns_slb_wallbrick(), fill_columns_slb_roomrelief(), and slab_allows_torch().
short slab_is_short_clmabl | ( | unsigned short | slab_type | ) |
Definition at line 404 of file obj_slabs.c.
short slab_is_short_unclmabl | ( | unsigned short | slab_type | ) |
Definition at line 379 of file obj_slabs.c.
Referenced by modify_frail_columns(), and slab_is_clmabl().
short slab_is_space | ( | unsigned short | slab_type | ) |
short slab_is_tall | ( | unsigned short | slab_type | ) |
Definition at line 397 of file obj_slabs.c.
Referenced by compute_door_orientation(), compute_torch_sensitile(), create_columns_slb_wallbrick(), modify_frail_columns(), remove_automade_obj_for_slab(), remove_misplaced_objs_on_slab(), set_graffiti_orientation(), subtl_is_near_tall_slab(), and update_things_slb_prison().
short slab_is_tall_unclmabl | ( | unsigned short | slab_type | ) |
Definition at line 370 of file obj_slabs.c.
Referenced by create_columns_slb_wallbrick(), modify_frail_columns(), slab_is_clmabl(), slab_is_tall(), and slab_verify_entry().
short slab_is_wall | ( | unsigned short | slab_type | ) |
Definition at line 327 of file obj_slabs.c.
Referenced by compute_flg_for_tile(), create_columns_slb_wallbrick(), slab_is_tall(), slab_verify_entry(), update_things_slb_barracks_corner(), and update_things_slb_graveyard_corner().
short slab_is_wealth | ( | unsigned short | slab_type | ) |
short slab_needs_adjacent_torch | ( | unsigned short | slab_type | ) |
Definition at line 442 of file obj_slabs.c.
Referenced by compute_torch_sensitile(), and update_clmaffective_obj_for_slab().
int slab_siblings_oftype | ( | struct LEVEL * | lvl, | |
int | x, | |||
int | y, | |||
unsigned short | slab_type | |||
) |
Definition at line 293 of file obj_slabs.c.
Referenced by generate_slab_bkgnd_random(), and update_tile_wlb_entry().
short slab_verify_entry | ( | unsigned short | slab_type, | |
char * | err_msg | |||
) |
short subtl_is_near_tall_slab | ( | struct LEVEL * | lvl, | |
unsigned int | sx, | |||
unsigned int | sy | |||
) |
void update_slab_owners | ( | struct LEVEL * | lvl | ) |
const char* all_slabs_fullnames[] |
Initial value:
{ SLB_ROCK_LTEXT,SLB_GOLD_LTEXT, SLB_EARTH_LTEXT,SLB_TORCHDIRT_LTEXT, SLB_WALLDRAPE_LTEXT,SLB_WALLTORCH_LTEXT, SLB_WALLWTWINS_LTEXT,SLB_WALLWWOMAN_LTEXT, SLB_WALLPAIRSHR_LTEXT,SLB_UNKN_LTEXT, SLB_PATH_LTEXT,SLB_CLAIMED_LTEXT, SLB_LAVA_LTEXT,SLB_WATER_LTEXT, SLB_PORTAL_LTEXT,SLB_UNKN_LTEXT, SLB_TREASURE_LTEXT,SLB_UNKN_LTEXT, SLB_LIBRARY_LTEXT,SLB_UNKN_LTEXT, SLB_PRISON_LTEXT,SLB_UNKN_LTEXT, SLB_TORTURE_LTEXT,SLB_UNKN_LTEXT, SLB_TRAINING_LTEXT,SLB_UNKN_LTEXT, SLB_DUNGHEART_LTEXT,SLB_UNKN_LTEXT, SLB_WORKSHOP_LTEXT,SLB_UNKN_LTEXT, SLB_SCAVENGER_LTEXT,SLB_UNKN_LTEXT, SLB_TEMPLE_LTEXT,SLB_UNKN_LTEXT, SLB_GRAVEYARD_LTEXT,SLB_UNKN_LTEXT, SLB_HATCHERY_LTEXT,SLB_UNKN_LTEXT, SLB_LAIR_LTEXT,SLB_UNKN_LTEXT, SLB_BARRACKS_LTEXT,SLB_UNKN_LTEXT, SLB_DOORWOOD_LTEXT,SLB_DOORWOOD_LTEXT, SLB_DOORBRACE_LTEXT,SLB_DOORBRACE_LTEXT, SLB_DOORIRON_LTEXT,SLB_DOORIRON_LTEXT, SLB_DOORMAGIC_LTEXT,SLB_DOORMAGIC_LTEXT, SLB_UNKN_LTEXT,SLB_BRIDGE_LTEXT, SLB_GEMS_LTEXT,SLB_GUARDPOST_LTEXT, }
Definition at line 117 of file obj_slabs.c.
Referenced by get_slab_fullname().
const char* owner_colornames[] |
Initial value:
{"Red", "Blue", "Green", "Yellow", "White", "Unowned"}
Definition at line 66 of file obj_slabs.c.
Referenced by get_owner_type_colorname().
const char* owner_fullnames[] |
Initial value:
{"Keeper 0 (Human)", "Keeper 1 (blue)", "Keeper 2 (green)", "Keeper 3 (yellow)", "Heroes (Player4)", "Unclaimed/Unowned"}
Definition at line 64 of file obj_slabs.c.
Referenced by get_owner_type_fullname().
const unsigned char owners_list[] |
Initial value:
{ PLAYER0, PLAYER1, PLAYER2, PLAYER3, PLAYER_GOOD, PLAYER_UNSET }
Definition at line 69 of file obj_slabs.c.
const unsigned short slabs_doors[] |
Initial value:
{ SLAB_TYPE_DOORWOOD1, SLAB_TYPE_DOORWOOD2, SLAB_TYPE_DOORBRACE1, SLAB_TYPE_DOORBRACE2, SLAB_TYPE_DOORIRON1, SLAB_TYPE_DOORIRON2, SLAB_TYPE_DOORMAGIC1, SLAB_TYPE_DOORMAGIC2, }
Definition at line 110 of file obj_slabs.c.
Referenced by slab_is_door().
const unsigned short slabs_liquid[] |
const unsigned short slabs_rooms[] |
Initial value:
{ SLAB_TYPE_DUNGHEART,SLAB_TYPE_PORTAL, SLAB_TYPE_TREASURE, SLAB_TYPE_LIBRARY, SLAB_TYPE_PRISONCASE, SLAB_TYPE_TORTURE, SLAB_TYPE_TRAINING, SLAB_TYPE_WORKSHOP, SLAB_TYPE_SCAVENGER, SLAB_TYPE_TEMPLE, SLAB_TYPE_GRAVEYARD, SLAB_TYPE_HATCHERY, SLAB_TYPE_LAIR, SLAB_TYPE_BARRACKS, SLAB_TYPE_BRIDGE, SLAB_TYPE_GUARDPOST, }
Definition at line 101 of file obj_slabs.c.
Referenced by slab_is_room().
const unsigned short slabs_short_unclmabl[] |
const unsigned short slabs_space[] |
const unsigned short slabs_tall_unclmabl[] |
const unsigned short slabs_walls[] |
Initial value:
{ SLAB_TYPE_WALLDRAPE, SLAB_TYPE_WALLTORCH, SLAB_TYPE_WALLWTWINS, SLAB_TYPE_WALLWWOMAN, SLAB_TYPE_WALLPAIRSHR, }
Definition at line 96 of file obj_slabs.c.
Referenced by get_random_wall_slab(), and slab_is_wall().
const unsigned short slabs_wealth[] |
Initial value:
{ SLAB_TYPE_GOLD, SLAB_TYPE_GEMS, }
Definition at line 87 of file obj_slabs.c.
Referenced by slab_is_wealth().
char const SLB_BARRACKS_LTEXT[] = "Barracks" |
Definition at line 55 of file obj_slabs.c.
char const SLB_BRIDGE_LTEXT[] = "Bridge" |
Definition at line 60 of file obj_slabs.c.
char const SLB_CLAIMED_LTEXT[] = "Claimed ground" |
Definition at line 39 of file obj_slabs.c.
char const SLB_DOORBRACE_LTEXT[] = "Braced door" |
Definition at line 57 of file obj_slabs.c.
char const SLB_DOORIRON_LTEXT[] = "Iron door" |
Definition at line 58 of file obj_slabs.c.
char const SLB_DOORMAGIC_LTEXT[] = "Magic door" |
Definition at line 59 of file obj_slabs.c.
char const SLB_DOORWOOD_LTEXT[] = "Wooden door" |
Definition at line 56 of file obj_slabs.c.
char const SLB_DUNGHEART_LTEXT[] = "Dungeon heart" |
Definition at line 48 of file obj_slabs.c.
char const SLB_EARTH_LTEXT[] = "Earth" |
Definition at line 31 of file obj_slabs.c.
char const SLB_GEMS_LTEXT[] = "Gems" |
Definition at line 61 of file obj_slabs.c.
char const SLB_GOLD_LTEXT[] = "Gold" |
Definition at line 30 of file obj_slabs.c.
char const SLB_GRAVEYARD_LTEXT[] = "Graveyard" |
Definition at line 52 of file obj_slabs.c.
char const SLB_GUARDPOST_LTEXT[] = "Guard post" |
Definition at line 62 of file obj_slabs.c.
char const SLB_HATCHERY_LTEXT[] = "Hatchery" |
Definition at line 53 of file obj_slabs.c.
char const SLB_LAIR_LTEXT[] = "Lair" |
Definition at line 54 of file obj_slabs.c.
char const SLB_LAVA_LTEXT[] = "Lava" |
Definition at line 40 of file obj_slabs.c.
char const SLB_LIBRARY_LTEXT[] = "Library" |
Definition at line 44 of file obj_slabs.c.
char const SLB_PATH_LTEXT[] = "Path" |
Definition at line 38 of file obj_slabs.c.
char const SLB_PORTAL_LTEXT[] = "Entrance" |
Definition at line 42 of file obj_slabs.c.
char const SLB_PRISON_LTEXT[] = "Prison" |
Definition at line 45 of file obj_slabs.c.
char const SLB_ROCK_LTEXT[] = "Rock" |
Definition at line 29 of file obj_slabs.c.
char const SLB_SCAVENGER_LTEXT[] = "Scavenger room" |
Definition at line 50 of file obj_slabs.c.
char const SLB_TEMPLE_LTEXT[] = "Temple" |
Definition at line 51 of file obj_slabs.c.
char const SLB_TORCHDIRT_LTEXT[] = "Torch plate earth" |
Definition at line 32 of file obj_slabs.c.
char const SLB_TORTURE_LTEXT[] = "Torture chamber" |
Definition at line 46 of file obj_slabs.c.
char const SLB_TRAINING_LTEXT[] = "Training room" |
Definition at line 47 of file obj_slabs.c.
char const SLB_TREASURE_LTEXT[] = "Treasure room" |
Definition at line 43 of file obj_slabs.c.
char const SLB_UNKN_LTEXT[] = "Unknown slab" |
Definition at line 28 of file obj_slabs.c.
char const SLB_WALLDRAPE_LTEXT[] = "Wall with drape" |
Definition at line 33 of file obj_slabs.c.
char const SLB_WALLPAIRSHR_LTEXT[] = "Wall w/pair shag." |
Definition at line 37 of file obj_slabs.c.
char const SLB_WALLTORCH_LTEXT[] = "Wall with torch" |
Definition at line 34 of file obj_slabs.c.
char const SLB_WALLWTWINS_LTEXT[] = "Wall with twins" |
Definition at line 35 of file obj_slabs.c.
char const SLB_WALLWWOMAN_LTEXT[] = "Wall with woman" |
Definition at line 36 of file obj_slabs.c.
char const SLB_WATER_LTEXT[] = "Water" |
Definition at line 41 of file obj_slabs.c.
char const SLB_WORKSHOP_LTEXT[] = "Workshop" |
Definition at line 49 of file obj_slabs.c.