Definition in file lev_column.h.
#include "globals.h"
Go to the source code of this file.
Defines | |
#define | INF_MAX_INDEX 7 |
Functions | |
void | set_clm_ent_idx (struct LEVEL *lvl, int num, unsigned int use, int permanent, int lintel, int height, unsigned int solid, int base, int orientation, int c0, int c1, int c2, int c3, int c4, int c5, int c6, int c7) |
Sets a CLM entry of index num, allows specifying all parameters. | |
DLLIMPORT void | set_clm (struct LEVEL *lvl, int num, unsigned int use, int base, int c0, int c1, int c2, int c3, int c4, int c5, int c6, int c7) |
Sets a CLM entry of index num, using simplified parameters. | |
DLLIMPORT int | column_find_or_create (struct LEVEL *lvl, struct COLUMN_REC *clm_rec) |
Searches CLM structure for given column; if not found, creates it. | |
DLLIMPORT int | column_get_free_index (struct LEVEL *lvl) |
Tries to find unused entry in CLM structure and returns its index. | |
DLLIMPORT short | columns_verify (struct LEVEL *lvl, char *err_msg, struct IPOINT_2D *errpt) |
Verifies column values. | |
DLLIMPORT unsigned int | get_dat_subtile (const struct LEVEL *lvl, const unsigned int sx, const unsigned int sy) |
Gets a DAT value for one subtile. | |
DLLIMPORT void | set_dat_subtile (struct LEVEL *lvl, int sx, int sy, int d) |
Sets a DAT value for one subtile. | |
void | set_dat (struct LEVEL *lvl, int x, int y, int tl, int tm, int tr, int ml, int mm, int mr, int bl, int bm, int br) |
Sets a DAT value for one whole tile. | |
void | set_dat_unif (struct LEVEL *lvl, int x, int y, int d) |
Sets same DAT value for all subtiles of a tile. | |
DLLIMPORT short | find_dat_entry (const struct LEVEL *lvl, int *sx, int *sy, const unsigned int clm_idx) |
Searches for next subtile which uses column of given index. | |
DLLIMPORT short | dat_verify (struct LEVEL *lvl, char *err_msg, struct IPOINT_2D *errpt) |
Verifies DAT values. | |
DLLIMPORT void | update_datclm_for_whole_map (struct LEVEL *lvl) |
Updates DAT, CLM and w?b entries for the whole map. | |
DLLIMPORT void | update_datclm_for_square_radius1 (struct LEVEL *lvl, int tx, int ty) |
Updates DAT, CLM and w?b entries for given tile and around it. | |
DLLIMPORT void | update_datclm_for_square (struct LEVEL *lvl, int tx_first, int tx_last, int ty_first, int ty_last) |
Updates DAT, CLM and w?b entries for given map tile coordinates range. | |
DLLIMPORT void | update_datclm_for_slab (struct LEVEL *lvl, int tx, int ty) |
Updates DAT and CLM entries for given map position (whole tile). | |
DLLIMPORT void | set_new_datclm_values (struct LEVEL *lvl, int tx, int ty, struct COLUMN_REC *clm_recs[9]) |
Sets given columns as new DAT/CLM entries for given tile. | |
DLLIMPORT void | set_new_datclm_entry (struct LEVEL *lvl, int sx, int sy, struct COLUMN_REC *clm_rec) |
Sets given column as new DAT/CLM entry for one single column. | |
DLLIMPORT void | update_clm_utilize_counters (struct LEVEL *lvl) |
Sweeps through all CLM entries and recomputes their UTILIZE counters. | |
DLLIMPORT void | get_slab_surround (unsigned char *surr_slb, unsigned char *surr_own, unsigned char **surr_tng, const struct LEVEL *lvl, int tx, int ty) |
Returns slab surrounding information, needed for CLM generation. | |
DLLIMPORT void | clm_utilize_dec (struct LEVEL *lvl, int clmidx) |
Decreases UTILIZE and USE values for column on given index. | |
DLLIMPORT void | clm_utilize_inc (struct LEVEL *lvl, int clmidx) |
Increases UTILIZE and USE values for column on given index. | |
DLLIMPORT short | clm_entry_is_used (const struct LEVEL *lvl, unsigned int clmidx) |
Returns if the column entry is used. | |
DLLIMPORT short | update_dat_last_column (struct LEVEL *lvl, unsigned short slab) |
Updates last column on map. | |
DLLIMPORT void | update_tile_wib_entries (struct LEVEL *lvl, int tx, int ty) |
Updates WIB animation entries for all subtiles of given tile. | |
DLLIMPORT void | update_tile_wlb_entry (struct LEVEL *lvl, int tx, int ty) |
Updates WLB entry for given tile. | |
DLLIMPORT void | update_tile_flg_entries (struct LEVEL *lvl, int tx, int ty) |
Updates FLG entries for all subtiles of given tile. | |
DLLIMPORT unsigned short | compute_flg_for_tile (unsigned short slab, short corner) |
Computes FLG value for given slab. | |
DLLIMPORT unsigned char * | get_subtile_column (const struct LEVEL *lvl, int sx, int sy) |
Gets a column entry on given subtile. | |
DLLIMPORT short | get_subtile_column_rec (const struct LEVEL *lvl, struct COLUMN_REC *clm_rec, int sx, int sy) |
Fills given column record with values from column on given subtile. | |
DLLIMPORT unsigned short | get_subtile_column_height (struct LEVEL *lvl, int sx, int sy) |
Gets height of column on given subtile. | |
DLLIMPORT unsigned short | get_subtile_column_solid (struct LEVEL *lvl, int sx, int sy) |
Gets solid mask of column on given subtile. | |
DLLIMPORT short | slab_has_custom_columns (struct LEVEL *lvl, int tx, int ty) |
Returns if the tile has any custom columns on it. | |
DLLIMPORT int | update_custom_columns_for_slab (struct COLUMN_REC *clm_recs[9], struct LEVEL *lvl, int tx, int ty) |
Updates custom columns for a slab. | |
DLLIMPORT int | place_cust_clms_on_slab (struct COLUMN_REC *clm_recs[9], struct LEVEL *lvl, int tx, int ty) |
Draws custom columns on given columns array. | |
DLLIMPORT short | cust_col_add_or_update (struct LEVEL *lvl, int sx, int sy, struct DK_CUSTOM_CLM *ccol) |
Adds custom column object to level data, or updates existing custom column. | |
DLLIMPORT int | cust_cols_num_on_tile (struct LEVEL *lvl, int tx, int ty) |
Gives number of custom columns at a tile. | |
DLLIMPORT struct DK_CUSTOM_CLM * | get_cust_col (struct LEVEL *lvl, int sx, int sy) |
Returns custom column on given subtile. | |
DLLIMPORT struct COLUMN_REC * | get_cust_col_rec (struct LEVEL *lvl, int sx, int sy) |
Returns COLUMN_REC of custom column on given subtile. | |
DLLIMPORT unsigned short | get_cust_col_wib_entry (struct LEVEL *lvl, int sx, int sy) |
Returns WIB entry of custom column on given subtile. | |
DLLIMPORT short | set_cust_col (struct LEVEL *lvl, int sx, int sy, struct DK_CUSTOM_CLM *ccol) |
Adds custom column object to level data, without filling the column nor updating slabs. | |
DLLIMPORT struct DK_CUSTOM_CLM * | create_cust_col (void) |
Creates a new custom column and fills its properties. | |
DLLIMPORT short | cust_col_del (struct LEVEL *lvl, int sx, int sy) |
Removes custom column from level and frees its memory. | |
DLLIMPORT int | cust_cols_del_for_tile (struct LEVEL *lvl, int tx, int ty) |
Removes custom columns for whole tile, deallocates memory. | |
DLLIMPORT unsigned int | get_cust_clm_count (struct LEVEL *lvl) |
Gives number of all custom columns in the whole level. | |
DLLIMPORT char * | get_texture_fullname (unsigned short inf_type) |
DLLIMPORT void | add_permanent_columns (struct LEVEL *lvl) |
#define INF_MAX_INDEX 7 |
Definition at line 21 of file lev_column.h.
DLLIMPORT void add_permanent_columns | ( | struct LEVEL * | lvl | ) |
Definition at line 31 of file obj_column_per.c.
Referenced by generate_random_map(), start_new_map(), and update_datclm_for_whole_map().
DLLIMPORT short clm_entry_is_used | ( | const struct LEVEL * | lvl, | |
unsigned int | clmidx | |||
) |
Returns if the column entry is used.
If the column is unused, it can be overwritten by new one.
lvl | Pointer to the LEVEL structure. | |
clmidx | Index of column to check. |
Definition at line 905 of file lev_column.c.
Referenced by column_find_or_create(), and column_get_free_index().
DLLIMPORT void clm_utilize_dec | ( | struct LEVEL * | lvl, | |
int | clmidx | |||
) |
Decreases UTILIZE and USE values for column on given index.
lvl | Pointer to the LEVEL structure. | |
clmidx | Column index. |
Definition at line 446 of file lev_column.c.
Referenced by set_new_datclm_entry().
DLLIMPORT void clm_utilize_inc | ( | struct LEVEL * | lvl, | |
int | clmidx | |||
) |
Increases UTILIZE and USE values for column on given index.
lvl | Pointer to the LEVEL structure. | |
clmidx | Column index. |
Definition at line 470 of file lev_column.c.
Referenced by set_new_datclm_entry().
DLLIMPORT int column_find_or_create | ( | struct LEVEL * | lvl, | |
struct COLUMN_REC * | clm_rec | |||
) |
Searches CLM structure for given column; if not found, creates it.
lvl | Pointer to the LEVEL structure. | |
clm_rec | Pointer at searched column. |
Definition at line 104 of file lev_column.c.
Referenced by set_new_datclm_entry().
DLLIMPORT int column_get_free_index | ( | struct LEVEL * | lvl | ) |
Tries to find unused entry in CLM structure and returns its index.
lvl | Pointer to the LEVEL structure. |
Definition at line 151 of file lev_column.c.
Referenced by column_find_or_create().
Verifies column values.
On error returns description message and map coordinates of the problem.
lvl | Pointer to the LEVEL structure. | |
err_msg | Error message output buffer. | |
errpt | Coordinates of the map tile containing the error. |
Definition at line 490 of file lev_column.c.
Referenced by level_verify().
DLLIMPORT unsigned short compute_flg_for_tile | ( | unsigned short | slab, | |
short | corner | |||
) |
Computes FLG value for given slab.
slab | Slab value. | |
corner | Corner flag. |
Definition at line 678 of file lev_column.c.
Referenced by update_tile_flg_entries().
DLLIMPORT struct DK_CUSTOM_CLM* create_cust_col | ( | void | ) | [read] |
Creates a new custom column and fills its properties.
The new object is not added to LEVEL structure.
Definition at line 1157 of file lev_column.c.
Referenced by execute_adikted_command().
DLLIMPORT short cust_col_add_or_update | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy, | |||
struct DK_CUSTOM_CLM * | ccol | |||
) |
Adds custom column object to level data, or updates existing custom column.
Also updates the real level DAT/CLM entries where the column is put.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile coordinates at which the custom columns will be put. | |
ccol | Custom column entry to add. |
Definition at line 1029 of file lev_column.c.
Referenced by execute_adikted_command().
DLLIMPORT short cust_col_del | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy | |||
) |
Removes custom column from level and frees its memory.
The level graphic (DAT/CLM) is not updated.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile containing the custom column to delete. |
Definition at line 1179 of file lev_column.c.
Referenced by cust_col_add_or_update(), and cust_cols_del_for_tile().
DLLIMPORT int cust_cols_del_for_tile | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Removes custom columns for whole tile, deallocates memory.
The level graphic (DAT/CLM) is not updated.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates at which we're deleting all custom columns. |
Definition at line 1205 of file lev_column.c.
DLLIMPORT int cust_cols_num_on_tile | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Gives number of custom columns at a tile.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates at which the custom columns count. |
Definition at line 1057 of file lev_column.c.
Referenced by slab_has_custom_columns(), and update_custom_columns_for_slab().
Verifies DAT values.
On error returns description message and map coordinates of the problem.
lvl | Pointer to the LEVEL structure. | |
err_msg | Error message output buffer. | |
errpt | Coordinates of the map tile containing the error. |
Definition at line 878 of file lev_column.c.
Referenced by level_verify().
DLLIMPORT short find_dat_entry | ( | const struct LEVEL * | lvl, | |
int * | sx, | |||
int * | sy, | |||
const unsigned int | clm_idx | |||
) |
Searches for next subtile which uses column of given index.
Starts searching at a subtile after (sx,sy). Finds the next subtile containing given clm_index and returns it in (sx,sy). On error/cannot find, sets (sx,sy) to (-1,-1). If (-1,-1) is given at start, searches from (0,0).
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile position to start search. Position of the subtile found is also returned here. | |
clm_idx | Column index that we want to find. |
Definition at line 852 of file lev_column.c.
Referenced by columns_verify().
DLLIMPORT unsigned int get_cust_clm_count | ( | struct LEVEL * | lvl | ) |
Gives number of all custom columns in the whole level.
lvl | Pointer to the LEVEL structure. |
Definition at line 1146 of file lev_column.c.
Referenced by get_level_objstats_textln().
DLLIMPORT struct DK_CUSTOM_CLM* get_cust_col | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy | |||
) | [read] |
Returns custom column on given subtile.
If no cust.column there, returns NULL.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile containing the column we want. |
Definition at line 1078 of file lev_column.c.
Referenced by add_custom_clms_to_script(), cust_col_add_or_update(), cust_cols_num_on_tile(), get_cust_col_rec(), get_cust_col_wib_entry(), and update_tile_wib_entries().
DLLIMPORT struct COLUMN_REC* get_cust_col_rec | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy | |||
) | [read] |
Returns COLUMN_REC of custom column on given subtile.
If no cust.column there, returns NULL.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile containing the column we want. |
Definition at line 1096 of file lev_column.c.
Referenced by place_cust_clms_on_slab().
DLLIMPORT unsigned short get_cust_col_wib_entry | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy | |||
) |
Returns WIB entry of custom column on given subtile.
If no cust.column there, returns COLUMN_WIB_SKEW.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile containing the column we want WIB entry for. |
Definition at line 1110 of file lev_column.c.
Referenced by update_tile_wib_entries().
DLLIMPORT unsigned int get_dat_subtile | ( | const struct LEVEL * | lvl, | |
const unsigned int | sx, | |||
const unsigned int | sy | |||
) |
Gets a DAT value for one subtile.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile position we want to probe. |
Definition at line 798 of file lev_column.c.
Referenced by dat_verify(), find_dat_entry(), get_subtile_column(), set_new_datclm_entry(), and update_clm_utilize_counters().
DLLIMPORT void get_slab_surround | ( | unsigned char * | surr_slb, | |
unsigned char * | surr_own, | |||
unsigned char ** | surr_tng, | |||
const struct LEVEL * | lvl, | |||
int | tx, | |||
int | ty | |||
) |
Returns slab surrounding information, needed for CLM generation.
surr_slb | The slab surrounding array. | |
surr_own | The owner surrounding array. | |
surr_tng | The thing surrounding array. | |
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. |
Definition at line 319 of file lev_column.c.
Referenced by create_things_slb_room(), create_things_slb_room_simple(), update_dat_last_column(), and update_datclm_for_slab().
DLLIMPORT unsigned char* get_subtile_column | ( | const struct LEVEL * | lvl, | |
int | sx, | |||
int | sy | |||
) |
Gets a column entry on given subtile.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile coordinates. |
Definition at line 716 of file lev_column.c.
Referenced by draw_map_on_buffer(), draw_map_on_buffer_fast(), get_subtile_column_height(), get_subtile_column_rec(), get_subtile_column_solid(), and update_things_subpos_and_height_for_slab().
DLLIMPORT unsigned short get_subtile_column_height | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy | |||
) |
Gets height of column on given subtile.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile coordinates. |
Definition at line 754 of file lev_column.c.
Referenced by actnpts_verify(), and level_verify_logic().
DLLIMPORT short get_subtile_column_rec | ( | const struct LEVEL * | lvl, | |
struct COLUMN_REC * | clm_rec, | |||
int | sx, | |||
int | sy | |||
) |
Fills given column record with values from column on given subtile.
lvl | Pointer to the LEVEL structure. | |
clm_rec | Destination column record to fill with data from given subtile. | |
sx,sy | Map subtile coordinates. |
Definition at line 734 of file lev_column.c.
Referenced by update_tile_wib_entries().
DLLIMPORT unsigned short get_subtile_column_solid | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy | |||
) |
Gets solid mask of column on given subtile.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile coordinates. |
Definition at line 769 of file lev_column.c.
DLLIMPORT char* get_texture_fullname | ( | unsigned short | inf_type | ) |
Definition at line 1223 of file lev_column.c.
DLLIMPORT int place_cust_clms_on_slab | ( | struct COLUMN_REC * | clm_recs[9], | |
struct LEVEL * | lvl, | |||
int | tx, | |||
int | ty | |||
) |
Draws custom columns on given columns array.
Draws only the cust_col, no graffiti.
clm_recs | Column records to update. | |
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates at which the columns will be put. |
Definition at line 998 of file lev_column.c.
Referenced by update_custom_columns_for_slab().
DLLIMPORT void set_clm | ( | struct LEVEL * | lvl, | |
int | num, | |||
unsigned int | use, | |||
int | base, | |||
int | c0, | |||
int | c1, | |||
int | c2, | |||
int | c3, | |||
int | c4, | |||
int | c5, | |||
int | c6, | |||
int | c7 | |||
) |
Sets a CLM entry of index num, using simplified parameters.
lvl | Pointer to the LEVEL structure. | |
num | Column index in the LEVEL structure. | |
use | Value of use parameter. | |
base | Index of base cube. | |
c0,c1,c2,c3,c4,c5,c6,c7 | Indices of cubes making the column. |
Definition at line 55 of file lev_column.c.
void set_clm_ent_idx | ( | struct LEVEL * | lvl, | |
int | num, | |||
unsigned int | use, | |||
int | permanent, | |||
int | lintel, | |||
int | height, | |||
unsigned int | solid, | |||
int | base, | |||
int | orientation, | |||
int | c0, | |||
int | c1, | |||
int | c2, | |||
int | c3, | |||
int | c4, | |||
int | c5, | |||
int | c6, | |||
int | c7 | |||
) |
Sets a CLM entry of index num, allows specifying all parameters.
lvl | Pointer to the LEVEL structure. | |
num | Column index in the LEVEL structure. | |
use | Value of use parameter. | |
permanent | Value of permanent parameter. | |
lintel | Value of lintel parameter. | |
height | The column height. | |
solid | The column solid mask. | |
base | Index of base cube. | |
orientation | Column orientation. | |
c0,c1,c2,c3,c4,c5,c6,c7 | Indices of cubes making the column. |
Definition at line 80 of file lev_column.c.
Referenced by add_permanent_columns().
DLLIMPORT short set_cust_col | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy, | |||
struct DK_CUSTOM_CLM * | ccol | |||
) |
Adds custom column object to level data, without filling the column nor updating slabs.
Adds the given column pointer without making a copy of it.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile containing the column we want WIB entry for. | |
ccol | Custom column entry to add. |
Definition at line 1127 of file lev_column.c.
Referenced by cust_col_add_or_update().
void set_dat | ( | struct LEVEL * | lvl, | |
int | x, | |||
int | y, | |||
int | tl, | |||
int | tm, | |||
int | tr, | |||
int | ml, | |||
int | mm, | |||
int | mr, | |||
int | bl, | |||
int | bm, | |||
int | br | |||
) |
Sets a DAT value for one whole tile.
lvl | Pointer to the LEVEL structure. | |
x,y | Map tile position to fill. | |
tl,tm,tr | Top columns indices for the tile. | |
ml,mm,mr | Middle columns indices for the tile. | |
bl,bm,br | Bottom columns indices for the tile. |
Definition at line 815 of file lev_column.c.
Referenced by set_dat_unif().
DLLIMPORT void set_dat_subtile | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy, | |||
int | d | |||
) |
Sets a DAT value for one subtile.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile position to fill. | |
d | Column index that we want put on this subtile. |
Definition at line 785 of file lev_column.c.
Referenced by level_clear_datclm(), set_dat(), and set_new_datclm_entry().
void set_dat_unif | ( | struct LEVEL * | lvl, | |
int | x, | |||
int | y, | |||
int | d | |||
) |
Sets same DAT value for all subtiles of a tile.
lvl | Pointer to the LEVEL structure. | |
x,y | Map tile position to fill. | |
d | Column index to put on all subtiles. |
Definition at line 836 of file lev_column.c.
DLLIMPORT void set_new_datclm_entry | ( | struct LEVEL * | lvl, | |
int | sx, | |||
int | sy, | |||
struct COLUMN_REC * | clm_rec | |||
) |
Sets given column as new DAT/CLM entry for one single column.
Retrieves index for given column (possibly adds new column to LEVEL structure) then uses it to update the (sx,sy) subtile. Properly updates USE/UTILIZE information for both old and new columns.
lvl | Pointer to the LEVEL structure. | |
sx,sy | Map subtile coordinates. | |
clm_rec | New column record for given subtile. |
Definition at line 424 of file lev_column.c.
Referenced by set_new_datclm_values(), and update_dat_last_column().
DLLIMPORT void set_new_datclm_values | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty, | |||
struct COLUMN_REC * | clm_recs[9] | |||
) |
Sets given columns as new DAT/CLM entries for given tile.
Retrieves indices for given columns (possibly adds new columns to LEVEL structure) then uses them to update the (tx,ty) tile. Properly updates USE/UTILIZE information for both old and new columns.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. | |
clm_recs | New column records for all subtiles of given tile. |
Definition at line 403 of file lev_column.c.
Referenced by update_datclm_for_slab().
DLLIMPORT short slab_has_custom_columns | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Returns if the tile has any custom columns on it.
Returns true if there is at least one custom column on the tile. This includes any Graffiti.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates to check. |
Definition at line 963 of file lev_column.c.
Referenced by update_datclm_for_slab().
DLLIMPORT void update_clm_utilize_counters | ( | struct LEVEL * | lvl | ) |
Sweeps through all CLM entries and recomputes their UTILIZE counters.
Makes no changes to the USE property in columns. Should be called after loading DAT file. It doesn't really use CLM structure, so may be called before loading CLM - needs only DAT file.
lvl | Pointer to the LEVEL structure. |
Definition at line 524 of file lev_column.c.
Referenced by update_datclm_for_whole_map(), and update_level_stats().
DLLIMPORT int update_custom_columns_for_slab | ( | struct COLUMN_REC * | clm_recs[9], | |
struct LEVEL * | lvl, | |||
int | tx, | |||
int | ty | |||
) |
Updates custom columns for a slab.
clm_recs | Column records to update. | |
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates at which the columns will be put. |
Definition at line 980 of file lev_column.c.
Referenced by update_datclm_for_slab().
DLLIMPORT short update_dat_last_column | ( | struct LEVEL * | lvl, | |
unsigned short | slab | |||
) |
Updates last column on map.
The last column does not have corresponding slab entry, so it requires special treatment. This function sets all the columns on right and bottom egde to a look of given slab.
lvl | Pointer to the LEVEL structure. | |
slab | Slab entry which should be used for making columns. |
Definition at line 923 of file lev_column.c.
Referenced by update_datclm_for_whole_map().
DLLIMPORT void update_datclm_for_slab | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Updates DAT and CLM entries for given map position (whole tile).
You will probably also need to update W?B entries.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. |
Definition at line 283 of file lev_column.c.
Referenced by cust_col_add_or_update(), update_datclm_for_square(), update_datclm_for_square_radius1(), and update_datclm_for_whole_map().
DLLIMPORT void update_datclm_for_square | ( | struct LEVEL * | lvl, | |
int | tx_first, | |||
int | tx_last, | |||
int | ty_first, | |||
int | ty_last | |||
) |
Updates DAT, CLM and w?b entries for given map tile coordinates range.
Updates all tiles inside given rectangle.
lvl | Pointer to the LEVEL structure. | |
tx_first,ty_first | Top left map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. | |
tx_last,ty_last | Bottom right map tile coordinates, in range tx/y_first-MAP_MAXINDEX_X/Y. |
Definition at line 247 of file lev_column.c.
Referenced by graffiti_clear_from_columns(), graffiti_update_columns(), user_set_owner_rect(), user_set_slab_rect(), and user_set_slabown_rect().
DLLIMPORT void update_datclm_for_square_radius1 | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Updates DAT, CLM and w?b entries for given tile and around it.
Updates map tile at given coordinates, and also enties in all neightbour squares.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. |
Definition at line 211 of file lev_column.c.
Referenced by user_set_slab(), and user_set_tile_owner().
DLLIMPORT void update_datclm_for_whole_map | ( | struct LEVEL * | lvl | ) |
Updates DAT, CLM and w?b entries for the whole map.
All tiles and subtiles are reset. Additionally, USE values in columns are recomputed to avoid mistakes.
lvl | Pointer to the LEVEL structure. |
Definition at line 171 of file lev_column.c.
Referenced by generate_random_map(), and start_new_map().
DLLIMPORT void update_tile_flg_entries | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Updates FLG entries for all subtiles of given tile.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. |
Definition at line 627 of file lev_column.c.
Referenced by cust_col_add_or_update(), update_datclm_for_square(), update_datclm_for_square_radius1(), and update_datclm_for_whole_map().
DLLIMPORT void update_tile_wib_entries | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Updates WIB animation entries for all subtiles of given tile.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. |
Definition at line 548 of file lev_column.c.
Referenced by cust_col_add_or_update(), update_datclm_for_square(), update_datclm_for_square_radius1(), and update_datclm_for_whole_map().
DLLIMPORT void update_tile_wlb_entry | ( | struct LEVEL * | lvl, | |
int | tx, | |||
int | ty | |||
) |
Updates WLB entry for given tile.
lvl | Pointer to the LEVEL structure. | |
tx,ty | Map tile coordinates, in range 0-MAP_MAXINDEX_X/Y. |
Definition at line 589 of file lev_column.c.
Referenced by cust_col_add_or_update(), update_datclm_for_square(), update_datclm_for_square_radius1(), and update_datclm_for_whole_map().