diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-08-24 11:16:07 +0200 |
| commit | c068f22329d5cc722622a2183bbb22eef2093df7 (patch) | |
| tree | 12d56c1aede67988a55e241364606bfbb4dba933 /src/parsec_server/include/con_info_sv.h | |
| download | openparsec-c068f22329d5cc722622a2183bbb22eef2093df7.tar.xz openparsec-c068f22329d5cc722622a2183bbb22eef2093df7.zip | |
Diffstat (limited to 'src/parsec_server/include/con_info_sv.h')
| -rw-r--r-- | src/parsec_server/include/con_info_sv.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/parsec_server/include/con_info_sv.h b/src/parsec_server/include/con_info_sv.h new file mode 100644 index 0000000..dec756d --- /dev/null +++ b/src/parsec_server/include/con_info_sv.h @@ -0,0 +1,63 @@ +/* + * PARSEC HEADER: con_info_sv.h + */ + +#ifndef _CON_INFO_SV_H_ +#define _CON_INFO_SV_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( const char *command ); + + +#endif // _CON_INFO_SV_H_ + + |
