00001
00016
00017
00018 #ifndef ADIKT_LEVCOLMN_H
00019 #define ADIKT_LEVCOLMN_H
00020
00021 #define INF_MAX_INDEX 7
00022
00023 struct LEVEL;
00024 struct COLUMN_REC;
00025 struct DK_CUSTOM_CLM;
00026 struct IPOINT_2D;
00027
00028 #include "globals.h"
00029
00030 void set_clm_ent_idx(struct LEVEL *lvl, int num, unsigned int use, int permanent,
00031 int lintel, int height, unsigned int solid, int base, int orientation,
00032 int c0, int c1, int c2, int c3, int c4, int c5, int c6, int c7);
00033 DLLIMPORT void set_clm(struct LEVEL *lvl, int num, unsigned int use, int base,
00034 int c0, int c1, int c2, int c3, int c4, int c5, int c6, int c7);
00035
00036 DLLIMPORT int column_find_or_create(struct LEVEL *lvl,struct COLUMN_REC *clm_rec);
00037 DLLIMPORT int column_get_free_index(struct LEVEL *lvl);
00038 DLLIMPORT short columns_verify(struct LEVEL *lvl, char *err_msg,struct IPOINT_2D *errpt);
00039
00040 DLLIMPORT unsigned int get_dat_subtile(const struct LEVEL *lvl, const unsigned int sx, const unsigned int sy);
00041 DLLIMPORT void set_dat_subtile(struct LEVEL *lvl, int sx, int sy, int d);
00042 void set_dat(struct LEVEL *lvl,int x, int y, int tl, int tm, int tr,
00043 int ml, int mm, int mr, int bl, int bm, int br);
00044 void set_dat_unif (struct LEVEL *lvl, int x, int y, int d);
00045 DLLIMPORT short find_dat_entry(const struct LEVEL *lvl, int *sx, int *sy, const unsigned int clm_idx);
00046 DLLIMPORT short dat_verify(struct LEVEL *lvl, char *err_msg,struct IPOINT_2D *errpt);
00047
00048 DLLIMPORT void update_datclm_for_whole_map(struct LEVEL *lvl);
00049 DLLIMPORT void update_datclm_for_square_radius1(struct LEVEL *lvl, int tx, int ty);
00050 DLLIMPORT void update_datclm_for_square(struct LEVEL *lvl, int tx_first, int tx_last,
00051 int ty_first, int ty_last);
00052 DLLIMPORT void update_datclm_for_slab(struct LEVEL *lvl, int tx, int ty);
00053 DLLIMPORT void set_new_datclm_values(struct LEVEL *lvl, int tx, int ty, struct COLUMN_REC *clm_recs[9]);
00054 DLLIMPORT void set_new_datclm_entry(struct LEVEL *lvl, int sx, int sy, struct COLUMN_REC *clm_rec);
00055 DLLIMPORT void update_clm_utilize_counters(struct LEVEL *lvl);
00056 DLLIMPORT void get_slab_surround(unsigned char *surr_slb,unsigned char *surr_own,
00057 unsigned char **surr_tng,const struct LEVEL *lvl,int tx, int ty);
00058 DLLIMPORT void clm_utilize_dec(struct LEVEL *lvl, int clmidx);
00059 DLLIMPORT void clm_utilize_inc(struct LEVEL *lvl, int clmidx);
00060 DLLIMPORT short clm_entry_is_used(const struct LEVEL *lvl,unsigned int clmidx);
00061 DLLIMPORT short update_dat_last_column(struct LEVEL *lvl, unsigned short slab);
00062
00063 DLLIMPORT void update_tile_wib_entries(struct LEVEL *lvl, int tx, int ty);
00064 DLLIMPORT void update_tile_wlb_entry(struct LEVEL *lvl, int tx, int ty);
00065 DLLIMPORT void update_tile_flg_entries(struct LEVEL *lvl, int tx, int ty);
00066 DLLIMPORT unsigned short compute_flg_for_tile(unsigned short slab,short corner);
00067
00068 DLLIMPORT unsigned char *get_subtile_column(const struct LEVEL *lvl, int sx, int sy);
00069 DLLIMPORT short get_subtile_column_rec(const struct LEVEL *lvl, struct COLUMN_REC *clm_rec, int sx, int sy);
00070 DLLIMPORT unsigned short get_subtile_column_height(struct LEVEL *lvl, int sx, int sy);
00071 DLLIMPORT unsigned short get_subtile_column_solid(struct LEVEL *lvl, int sx, int sy);
00072
00073
00074 DLLIMPORT short slab_has_custom_columns(struct LEVEL *lvl, int tx, int ty);
00075 DLLIMPORT int update_custom_columns_for_slab(struct COLUMN_REC *clm_recs[9],struct LEVEL *lvl, int tx, int ty);
00076 DLLIMPORT int place_cust_clms_on_slab(struct COLUMN_REC *clm_recs[9],struct LEVEL *lvl, int tx, int ty);
00077 DLLIMPORT short cust_col_add_or_update(struct LEVEL *lvl,int sx,int sy,struct DK_CUSTOM_CLM *ccol);
00078 DLLIMPORT int cust_cols_num_on_tile(struct LEVEL *lvl, int tx, int ty);
00079 DLLIMPORT struct DK_CUSTOM_CLM *get_cust_col(struct LEVEL *lvl, int sx, int sy);
00080 DLLIMPORT struct COLUMN_REC *get_cust_col_rec(struct LEVEL *lvl, int sx, int sy);
00081 DLLIMPORT unsigned short get_cust_col_wib_entry(struct LEVEL *lvl, int sx, int sy);
00082 DLLIMPORT short set_cust_col(struct LEVEL *lvl,int sx,int sy,struct DK_CUSTOM_CLM *ccol);
00083 DLLIMPORT struct DK_CUSTOM_CLM *create_cust_col(void);
00084 DLLIMPORT short cust_col_del(struct LEVEL *lvl, int sx, int sy);
00085 DLLIMPORT int cust_cols_del_for_tile(struct LEVEL *lvl, int tx, int ty);
00086 DLLIMPORT unsigned int get_cust_clm_count(struct LEVEL *lvl);
00087
00088
00089 DLLIMPORT char *get_texture_fullname(unsigned short inf_type);
00090
00091
00092 DLLIMPORT void add_permanent_columns(struct LEVEL *lvl);
00093
00094 #endif // ADIKT_LEVCOLMN_H