dfhack/library/include/modules/Constructions.h

58 lines
1.2 KiB
C

2010-04-09 16:24:41 -06:00
#ifndef CL_MOD_CONSTRUCTIONS
#define CL_MOD_CONSTRUCTIONS
/*
* DF constructions
*/
2010-05-25 22:48:23 -06:00
#include "dfhack/DFExport.h"
2010-04-09 16:24:41 -06:00
namespace DFHack
{
// type of item the construction is made of
enum e_construction_base
{
constr_bar = 0,
constr_block = 2,
constr_boulder = 4,
2010-04-28 10:21:52 -06:00
constr_logs = 5
2010-04-09 16:24:41 -06:00
};
2010-04-18 16:56:22 -06:00
#pragma pack(push, 1)
2010-04-09 16:24:41 -06:00
struct t_construction
{
//0
uint16_t x;
uint16_t y;
// 4
uint16_t z;
2010-04-09 21:48:50 -06:00
uint16_t form; // e_construction_base
2010-04-09 16:24:41 -06:00
// 8
uint16_t unk_8; // = -1 in many cases
uint16_t mat_type;
// C
uint32_t mat_idx;
uint16_t unk3;
// 10
uint16_t unk4;
uint16_t unk5;
// 14
uint32_t unk6;
// added later by dfhack
uint32_t origin;
};
2010-04-18 16:56:22 -06:00
#pragma pack (pop)
2010-05-23 15:06:10 -06:00
class DFContextPrivate;
2010-04-09 16:24:41 -06:00
class DFHACK_EXPORT Constructions
{
public:
2010-05-23 15:06:10 -06:00
Constructions(DFContextPrivate * d);
2010-04-09 16:24:41 -06:00
~Constructions();
bool Start(uint32_t & numConstructions);
bool Read (const uint32_t index, t_construction & constr);
bool Finish();
private:
struct Private;
Private *d;
};
}
#endif