Linux makefiles
[canaan.git] / prj / cam / src / shock / shkcyber.cpp
blob82953a0fb80ad730929ae96276c0ac43f28bd1eb
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 // $Header: r:/t2repos/thief2/src/shock/shkcyber.cpp,v 1.7 2000/02/19 13:20:10 toml Exp $
8 #include <appagg.h>
10 #include <lresname.h>
11 #include <schema.h>
12 #include <scrptpr_.h>
14 #include <shkprop.h>
15 #include <shkutils.h>
16 #include <shkgame.h>
17 #include <shkcurm.h>
18 #include <shkhrm.h>
19 #include <shkobjst.h>
20 #include <shkgunpr.h>
21 #include <shkrsrch.h>
23 #include <shkcyber.h>
24 #include <memall.h>
25 #include <dbmem.h> // must be last header!
27 //--------------------------------------------------------------------------------------
28 void ShockCyberCursor(void)
30 IRes *hnd;
32 ClearCursor();
33 shock_cursor_mode = SCM_CYBER;
34 hnd = LoadPCX("cybercur","iface\\");
35 SetCursorByHandle(hnd);
36 SafeFreeHnd(&hnd);
38 //--------------------------------------------------------------------------------------
39 // what happens when the cybercursor is clicked on an object
40 void ShockCyberObject(ObjID obj)
42 // this determines which kind of MFD to bring up, etc.
43 if (ObjGetObjState(obj) == kObjStateUnresearched)
45 // deal with researching it
46 ShockResearch(obj);
48 else if (ObjGetObjState(obj) == kObjStateBroken)
50 if (gPropRepairDiff->IsRelevant(obj))
52 ShockHRMDisplay(obj,1); // modify
54 else
55 Warning(("ShockCyberObject: obj %d is broken, but has no repair difficulty!\n",obj));
57 else
59 if (IsPlayerGun(obj) && gPropModifyDiff->IsRelevant(obj))
61 ShockHRMDisplay(obj,2); // modify
63 else if (gPropHackDiff->IsRelevant(obj))
65 // need to filter on whether hackable or not... property?
66 ShockHRMDisplay(obj,0); // hack
70 //--------------------------------------------------------------------------------------