Linux makefiles
[canaan.git] / prj / cam / src / deepc / weapon / dpcgnapi.h
blob61858cee250ee766ac257353a8b30bf7434e08ce
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 #pragma once
7 #ifndef __DPCGNAPI_H
8 #define __DPCGNAPI_H
10 #ifndef _OBJTYPE_H
11 #include <objtype.h>
12 #endif // _OBJTYPE_H
14 #ifndef __MATRIXS_H
15 #include <matrixs.h>
16 #endif // __MATRIXS_H
18 #ifndef __MATRIXC_H
19 #include <matrixc.h>
20 #endif // !__MATRIXC_H
22 //------------------------------------
23 // Gun API
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);
39 // Ammo
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);
56 // Condition
57 // These now have the optional final parameter useAlt which will use the
58 // new "other" condition variable, for such special properties as pistol
59 // silencing.
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);
64 // Settings
65 // Note: all setting changes should go through this API!
66 EXTERN int GunGetSetting(ObjID gunID);
67 EXTERN void GunSetSetting(ObjID gunID, int setting);
69 // Mod
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);
75 #endif