#ifndef TRCLASS_H
#define TRCLASS_H

#include <trng_core.h>

class TRClass
{
private:
    LPCSTR name; // for log
    OBJECT_INFO* obj;
    short id, slot, hp;
    char buffer[80]; // for wsprintf() (log, messagebox)
    bool log_hp_one_time; // dont add too much message about the hp because the hp customize is NO_ITEM !

public:
    void initialise(int ID, DWORD function, DWORD query);
    void set_name(LPCSTR name);
    // disable the immortal state !
    void set_health(short defaultHP);
    void set_func_initialise(LPVOID initialise);
    // this function need to be after setItemBitOffset() !!!!
    void set_func_draw(LPVOID draw, LPVOID draw_extra);
    void set_func_collide(LPVOID collision);
    void set_func_floor_and_ceiling(LPVOID floor, LPVOID ceiling);
    void set_func_control(LPVOID control);
    void set_save(BOOL hp, BOOL anim, BOOL flags, BOOL mesh, BOOL position);
    void set_hit_effect(int HIT_flags);
    void set_shadow_size(int size);
    void set_radius_and_pivot(int radius, int pivot_length);
    // this creature can go underwater instead of instant die ?
    void set_water_creature(BOOL result);
    // disable non_lot (pathfinding enabled by default !).
    void set_creature(BOOL result);
    void set_transparency(BOOL result);
    // for muzzleflash position (if the offset is defined, the itemdraw will be defined to DrawAnimatedItemCustom by default !).
    void set_bitoffset(WORD offset);
    void set_rotation_meshtree(int mesh_id, short ROT_flags);
	void set_explodable_meshbits(int meshbits);
	void set_meshswap(int mesh_id);

    const char* get_name();
    short get_id();
    short get_health();
    OBJECT_INFO* get_object();
};

extern TRClass tomb[TR_OBJECTS_NUMBER];

#endif