From c8a270e51dc22f39ed048ab1cc609e6e456df58f Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sun, 7 Jun 2015 17:49:09 +0200 Subject: Split types.h into separate header for each type --- src/module_type.hpp | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/module_type.hpp (limited to 'src/module_type.hpp') diff --git a/src/module_type.hpp b/src/module_type.hpp new file mode 100644 index 00000000..96938856 --- /dev/null +++ b/src/module_type.hpp @@ -0,0 +1,64 @@ +#pragma once + +#include "h-basic.h" + +/** + * Module descriptor. + */ +struct module_type +{ + /* Metadata about the module: author, description, etc. */ + struct { + /* Module name */ + cptr name; + + /* Module version number */ + struct { + s32b major; + s32b minor; + s32b patch; + } version; + + /* Module author */ + struct { + cptr name; + cptr email; + } author; + + /* Module description */ + cptr desc; + + /* Save file tag */ + cptr save_file_tag; + + /* Module directory */ + cptr module_dir; + } meta; + + /* Random artifact generation chances */ + struct { + s32b weapon_chance; + s32b armor_chance; + s32b jewelry_chance; + } randarts; + + /* Max player level. */ + int max_plev; + + /* Skills */ + struct { + /* Skill points per level */ + s32b skill_per_level; + /* Maximum "overage" for skill points, i.e. how many skill + points you can go above your current level. */ + s32b max_skill_overage; + } skills; + + /* Function to show introduction to module */ + void (*intro)(); + + /* Function to compute race status, i.e. whether monsters + are friendly/neutral towards the player. Returns NULL + to indicate that no override happens. */ + s16b *(*race_status)(int r_idx); +}; -- cgit v1.2.3