2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
20 #endif // !__MATRIXC_H
22 //------------------------------------
26 // @TODO: This should really become a COM interface, I guess
28 // Load the gun with an ammo object
29 #define LF_NONE 0 // just load it and leave on cursor
30 #define LF_AUTOPLACE 1 // autoplace generated items in inventory
31 #define LF_JUGGLE 2 // delay autoplacement long enough to not hurl into world
33 EXTERN
void GunLoad(ObjID gunID
, ObjID ammoID
, uint flags
);
34 // For use by player animation
35 EXTERN
void GunLoadSound(ObjID gunID
);
36 // Unload the gun, create new clip obj
37 EXTERN ObjID
GunUnload(ObjID gunID
, uint flags
);
40 // Get the projectile object (archetype) for the current ammo in the gun
41 EXTERN ObjID
GetProjectile(ObjID gunID
);
42 // find the projectile object (archetype) of a given "gun", with an order
43 EXTERN ObjID
GetProjectileByOrder(ObjID gunID
, int order
);
44 // Can the gun load this clip?
45 BOOL
GunCanLoad(ObjID gunID
, ObjID clipID
);
46 // Get the projectile associated with a given clip
47 // NOTE: returns OBJ_NULL if more than one proj/clip
48 ObjID
GetProjectileFromClip(ObjID clipID
, ObjID gunID
);
49 // Get clip archetype for a projectile archetype
50 ObjID
GetClip(ObjID projID
);
51 // Get the next valid projectile (archetype) for the gun
52 EXTERN ObjID
GetNextProjectile(ObjID gunID
, ObjID projID
);
53 EXTERN
void SetProjectile(ObjID gunID
, ObjID projID
);
54 EXTERN
int GunGetAmmoCount(ObjID gunID
);
57 // These now have the optional final parameter useAlt which will use the
58 // new "other" condition variable, for such special properties as pistol
60 EXTERN
float GunGetCondition(ObjID gunID
, int useAlt
= 0);
61 EXTERN
void GunSetCondition(ObjID gunID
, float condition
, int useAlt
= 0);
62 EXTERN
void GunGetConditionString(ObjID gunID
, char *buf
, int buflen
, int useAlt
= 0);
65 // Note: all setting changes should go through this API!
66 EXTERN
int GunGetSetting(ObjID gunID
);
67 EXTERN
void GunSetSetting(ObjID gunID
, int setting
);
70 EXTERN
int GunGetModification(ObjID gunID
);
71 EXTERN
void GunSetModification(ObjID gunID
, int modification
);
73 // Init the whole gun system
74 EXTERN
void GunInit(void);