00001
00002
00003
00004
00005
00006 #ifdef USE_TILE
00007 #ifndef TILEDOLL_H
00008 #define TILEDOLL_H
00009
00010 #include "tags.h"
00011
00012 struct dolls_data
00013 {
00014 dolls_data();
00015 dolls_data(const dolls_data& orig);
00016 const dolls_data& operator=(const dolls_data& other);
00017 ~dolls_data();
00018
00019 tileidx_t *parts;
00020 };
00021
00022 enum tile_doll_mode
00023 {
00024 TILEP_MODE_EQUIP = 0,
00025 TILEP_MODE_LOADING = 1,
00026 TILEP_MODE_DEFAULT = 2,
00027 TILEP_MODE_MAX
00028 };
00029
00030 extern dolls_data player_doll;
00031 extern int doll_gender;
00032
00033 void init_player_doll();
00034 void fill_doll_equipment(dolls_data &result);
00035 void create_random_doll(dolls_data &result);
00036 void save_doll_file(writer &dollf);
00037
00038
00039
00040 bool save_doll_data(int mode, int num, const dolls_data* dolls);
00041
00042
00043
00044 bool load_doll_data(const char *fn, dolls_data *dolls, int max,
00045 tile_doll_mode *mode, int *cur);
00046
00047 class SubmergedTileBuffer;
00048 void pack_doll_buf(SubmergedTileBuffer& buf, const dolls_data &doll, int x, int y, bool submerged, bool ghost);
00049
00050 #endif
00051 #endif