dfhack/library/shm/mod-creature2010.h

105 lines
2.6 KiB
C

2010-04-04 04:29:56 -06:00
/*
www.sourceforge.net/projects/dfhack
Copyright (c) 2009 Petr Mrázek (peterix)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#ifndef MOD_CREATURES2010_H
#define MOD_CREATURES2010_H
namespace DFHack
{
namespace Creatures2010
{
#define CREATURES2010_VERSION 1
typedef struct
{
// creature offsets
2010-04-08 18:08:46 -06:00
uint32_t vector;
uint32_t pos_offset;
uint32_t profession_offset;
uint32_t custom_profession_offset;
uint32_t race_offset;
int32_t civ_offset;
2010-04-08 18:08:46 -06:00
uint32_t flags1_offset;
uint32_t flags2_offset;
uint32_t name_offset;
uint32_t sex_offset;
2010-05-05 06:08:18 -06:00
uint32_t caste_offset;
2010-04-08 18:08:46 -06:00
uint32_t id_offset;
uint32_t labors_offset;
uint32_t happiness_offset;
uint32_t artifact_name_offset;
uint32_t physical_offset;
uint32_t mood_offset;
uint32_t mood_skill_offset;
uint32_t pickup_equipment_bit;
2010-04-08 18:08:46 -06:00
uint32_t soul_vector_offset;
uint32_t default_soul_offset;
2010-04-26 05:23:57 -06:00
uint32_t current_job_offset;
2010-04-06 18:46:46 -06:00
// soul offsets
uint32_t soul_skills_vector_offset;
2010-04-04 04:29:56 -06:00
// name offsets (needed for reading creature names)
uint32_t name_firstname_offset;
uint32_t name_nickname_offset;
uint32_t name_words_offset;
2010-04-08 19:21:42 -06:00
uint32_t soul_mental_offset;
uint32_t soul_traits_offset;
2010-05-05 06:08:18 -06:00
uint32_t appearance_vector_offset;
uint32_t birth_year_offset;
uint32_t birth_time_offset;
2010-04-04 04:29:56 -06:00
} creature_offsets;
typedef struct
{
bool inited;
creature_offsets offsets;
} creature_modulestate;
typedef struct
{
shm_cmd cmd[SHM_MAX_CLIENTS]; // MANDATORY!
// box
uint32_t x;
uint32_t y;
uint32_t z;
uint32_t x2;
uint32_t y2;
uint32_t z2;
// starting index
int32_t index;
} shm_creature_hdr;
enum CREATURE_COMMAND
{
CREATURE_INIT = 0, // initialization
CREATURE_FIND_IN_BOX,
CREATURE_AT_INDEX,
2010-04-04 16:48:19 -06:00
NUM_CREATURE_CMDS
2010-04-04 04:29:56 -06:00
};
DFPP_module Init(void);
}
}
#endif