1 /*
2 ===========================================================================
3 Copyright (C) 1999 - 2005, Id Software, Inc.
4 Copyright (C) 2000 - 2013, Raven Software, Inc.
5 Copyright (C) 2001 - 2013, Activision, Inc.
6 Copyright (C) 2013 - 2015, OpenJK contributors
7 
8 This file is part of the OpenJK source code.
9 
10 OpenJK is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License version 2 as
12 published by the Free Software Foundation.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, see <http://www.gnu.org/licenses/>.
21 ===========================================================================
22 */
23 
24 // vmachine.h -- virtual machine header for client
25 #ifndef __VMACHINE_H__
26 #define __VMACHINE_H__
27 
28 #include "../qcommon/q_shared.h"
29 
30 /*
31 ==================================================================
32 
33 functions exported to the main executable
34 
35 ==================================================================
36 */
37 
38 typedef enum {
39 	CG_INIT,
40 	CG_SHUTDOWN,
41 	CG_CONSOLE_COMMAND,
42 	CG_DRAW_ACTIVE_FRAME,
43 	CG_CROSSHAIR_PLAYER,
44 	CG_CAMERA_POS,
45 	CG_CAMERA_ANG,
46 /*
47 Ghoul2 Insert Start
48 */
49 
50 	CG_RESIZE_G2_BOLT,
51 	CG_RESIZE_G2,
52 	CG_RESIZE_G2_BONE,
53 	CG_RESIZE_G2_SURFACE,
54 	CG_RESIZE_G2_TEMPBONE,
55 /*
56 Ghoul2 Insert End
57 */
58 	CG_DRAW_DATAPAD_HUD,
59 	CG_DRAW_DATAPAD_OBJECTIVES,
60 	CG_DRAW_DATAPAD_WEAPONS,
61 	CG_DRAW_DATAPAD_INVENTORY,
62 	CG_DRAW_DATAPAD_FORCEPOWERS
63 
64 } cgameExport_t;
65 
66 /*
67 ==============================================================
68 
69 VIRTUAL MACHINE
70 
71 ==============================================================
72 */
73 typedef struct vm_s {
74 	intptr_t	(*entryPoint)( int callNum, ... );
75 } vm_t;
76 
77 extern vm_t cgvm;
78 
79 intptr_t	VM_Call( int callnum, ... );
80 intptr_t	VM_DllSyscall( intptr_t arg, ... );
81 void		CL_ShutdownCGame( void );
82 
83 #endif //__VMACHINE_H__
84