From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- src/parsec/include/con_info.h | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/parsec/include/con_info.h (limited to 'src/parsec/include/con_info.h') diff --git a/src/parsec/include/con_info.h b/src/parsec/include/con_info.h new file mode 100644 index 0000000..a06da72 --- /dev/null +++ b/src/parsec/include/con_info.h @@ -0,0 +1,63 @@ +/* + * PARSEC HEADER: con_info.h + */ + +#ifndef _CON_INFO_H_ +#define _CON_INFO_H_ + + +// callback function type +typedef int (*notify_callback_fpt)( GenObject *base ); + + +// access information for single object property (type/class field) + +struct proplist_s { + + const char* propname; // name property can be accessed by + size_t propoffset; // offset of property in obj structure + int bmin; // minimum value of property + int bmax; // maximum value of property + int fieldtype; // field's data type + notify_callback_fpt notify_callback; // callback on field value changes +}; + +//NOTE: +// bmin and bmax (value bounds) for all types other than +// PROPTYPE_INT have to be specified in fixed-point! + +//NOTE: +// for PROPTYPE_STRING and PROPTYPE_CHARPTR bmin and bmax specify +// minimum and maximum number of chars (excluding the '\0'). + +#define PROPTYPE_INT 0 +#define PROPTYPE_FLOAT 1 +#define PROPTYPE_GEOMV 2 +#define PROPTYPE_FIXED 3 +#define PROPTYPE_STRING 4 +#define PROPTYPE_CHARPTR 5 + + +// external functions + +void CON_RegisterCustomType( dword objtypeid, proplist_s *proplist ); + +char* BuildTypeInfo( int typeindex ); +char* BuildClassInfo( int classindex ); + +int CheckSetObjTypeProperty( const char *query, const char *scan ); +int CheckSetObjClassProperty( const char *query, const char *scan ); +int CheckSetObjInstanceProperty( const char *query, const char *scan ); + +int CheckTypeInfo( const char *scan ); +int CheckClassInfo( const char *scan ); +int CheckInstanceInfo( const char *scan ); + +int WritePropList( FILE* fp, dword objid ); + +int Cmd_FaceInfo( char *command ); + + +#endif // _CON_INFO_H_ + + -- cgit v1.2.3