VgaGames3-object: Structures and enumerations
- Definitions
- VGAG3_OID_SIZE
It is just a size definition for object-IDs used in structures.
The value is 65. - Structures
- struct vg3_ofunc_object
Structure for a VgaGames3-object.char oid[VGAG3_OID_SIZE] Individual object-ID unsigned short subid Arbitrary sub-ID for the object-ID int drawlevel Level-number for drawing order (begins with 1 = lowest level) unsigned int instanceid Unique number for the instance of this object (>0) void *ostruct Private struct for object (defined in header files of the game) - struct vg3_ofunc_objvar
Structure for object-variables of a VgaGames3-object.char oid[VGAG3_OID_SIZE] Object-ID of the VgaGames3-object void *ovptr Individual structure with object-variables void (*free)(void *ovptr)
- ovptr: individual structure with object-variables
Free-function for elements of the individual structure, or NULL - struct vg3_ofunc_objfunc
Structure for object-functions of a VgaGames3-object.char oid[VGAG3_OID_SIZE] Object-ID of the VgaGames3-object struct vg3_ofunc_object * (*f_new)(void *vgame, unsigned int parent_objid, ...)
- vgame: individual game structure
- parent_objid: instanceid of object-instance of the parent-object, or 0
- variadic parameters: arbitrary individual parameters
- return value: object-instanceFunction for instantiating void (*f_free)(void *vgame, struct vg3_ofunc_object *objp)
- vgame: individual game structure
- objp: object-instanceFunction for destroying an instance void (*f_run)(void *vgame, struct vg3_ofunc_object *objp)
- vgame: individual game structure
- objp: object-instanceFunction for moving an instance void (*f_draw)(void *vgame, struct vg3_ofunc_object *objp)
- vgame: individual game structure
- objp: object-instanceFunction for drawing an instance to the window int (*f_data)(void *vgame, struct vg3_ofunc_object *objp, void *vdata)
- vgame: individual game structure
- objp: object-instance
- vdata: arbitrary parameter or NULL
- return value: arbitraryFunction for exchanging data with an object-instance void *vpriv Individual structure for individual functions - struct vg3_ofunc_objobjfunc
Structure for object-to-object-functions of two VgaGames3-objects for an interaction of both.char oid1[VGAG3_OID_SIZE] Object-ID of object1 char oid2[VGAG3_OID_SIZE] Object-ID of object2 int (*f_collision)(void *vgame, struct vg3_ofunc_object *objp1, struct vg3_ofunc_object *objp2, struct vg3_coll_ret *collret)
- vgame: individual game structure
- objp1: object-instance of first object
- objp2: object-instance of second object
- collret: collision infos
- return value: one value of VGAG3_COLL_RETURNSFunction for collision of both instances void (*f_quit)(void *vgame, struct vg3_ofunc_object *objp, struct vg3_ofunc_object *parent_objp)
- vgame: individual game structure
- objp: object-instance
- parent_objp: object-instance of the parent-objectFunction to inform the parent if an instance is being freed - struct vg3_ofunc_objsnap
Structure for iterating over VgaGames3-objects, only internally used. - struct vg3_ofunc
Common VgaGames3-object structure, only internally used. - struct vg3_ofunc_ofmgmt
Structure for object-managing-functions of a VgaGames3-object.char oid[VGAG3_OID_SIZE] Object-ID of the VgaGames3-object to manage int (*f_activate)(void *vgame, struct vg3_ofunc *ofstruct, va_list ap)
- vgame: individual game structure
- ofstruct: common VgaGames3-object structure
- ap: arbitrary indivdual parameters as va_list
- return value: 0 = OK or error return value of f_activate()Function for activating the management void (*f_deactivate)(void *vgame, struct vg3_ofunc *ofstruct)
- vgame: individual game structure
- ofstruct: common VgaGames3-object structure
Function for deactivating the management void (*f_run)(void *vgame, struct vg3_ofunc *ofstruct)
- vgame: individual game structure
- ofstruct: common VgaGames3-object structure
Function for executing the management int (*f_data)(void *vgame, struct vg3_ofunc *ofstruct, void *vdata)
- vgame: individual game structure
- ofstruct: common VgaGames3-object structure
- vdata: arbitrary parameter or NULL
- return value: arbitraryFunction for querying status or exchanging data