1
- typedef int bool ;
2
- typedef void edict_t ;
3
- typedef void usercmd_t ;
4
- typedef int qboolean ;
5
- typedef unsigned char byte ;
6
-
7
- typedef enum {NA_LOOPBACK , NA_BROADCAST , NA_IP , NA_IPX , NA_BROADCAST_IPX } netadrtype_t ;
8
- typedef enum {NS_CLIENT , NS_SERVER } netsrc_t ;
9
- typedef struct netadr_s
10
- {
11
- netadrtype_t type ; //0
12
- byte ip [4 ]; //4
13
- byte ipx [10 ]; //8
14
-
15
- unsigned short port ; //12
16
- // char * description; //14
17
- } netadr_t ;
18
-
19
- typedef struct game_export_s {
20
- // the init function will only be called when a game starts,
21
- // not each time a level is loaded. Persistant data for clients
22
- // and the server can be allocated in init
23
- int APIVERSION ;
24
- void (* Init ) (void );
25
- void (* Shutdown ) (void );
26
-
27
- // each new level entered will cause a call to SpawnEntities
28
- void (* SpawnEntities ) (char * mapname , char * entstring , char * spawnpoint );
1
+ /*typedef char bool;
2
+ #define false 0x00
3
+ #define true 0x01
4
+ */
5
+ #pragma once
29
6
30
- // Read/Write Game is for storing persistant cross level information
31
- // about the world state and the clients.
32
- // WriteGame is called every time a level is exited.
33
- // ReadGame is called on a loadgame.
34
- void (* WriteGame ) (bool autosave );
35
- bool (* ReadGame ) (bool autosave );
7
+ extern unsigned int * ghoulmain ;
8
+ extern unsigned int * clientinst ;
9
+ extern unsigned int * objinst ;
36
10
37
- // ReadLevel is called after the default map information has been
38
- // loaded with SpawnEntities
39
- void (* WriteLevel ) (void );
40
- void (* ReadLevel ) (void );
41
11
42
- void ( * ClientThink ) ( edict_t * ent , usercmd_t * cmd ) ;
43
- qboolean ( * ClientConnect ) ( edict_t * ent , char * userinfo );
12
+ extern char SOFREESP [ 32768 ] ;
13
+ #include "../src/Game/gamecpp/q_shared.h"
44
14
45
- //NEW
46
- void (* ClientPreConnect ) (void * );
47
15
48
- void (* ClientUserinfoChanged ) (edict_t * ent , char * userinfo , bool not_first_time );
49
16
50
- void (* ClientDisconnect ) (edict_t * ent );
51
- void (* ClientBegin ) (edict_t * ent );
17
+ typedef void client_t ;
52
18
53
- void (* ClientCommand ) (edict_t * ent );
54
- void (* ResetCTFTeam ) (edict_t * ent );
55
-
56
- int (* GameAllowASave ) (void );
19
+ typedef int MatrixType ;
20
+ typedef void (* xcommand_t ) (void );
21
+ typedef struct cmd_function_s
22
+ {
23
+ struct cmd_function_s * next ;
24
+ char * name ;
25
+ xcommand_t function ;
26
+ } cmd_function_t ;
57
27
58
- void (* SavesLeft ) (void );
59
- void (* GetGameStats ) (void );
60
28
61
- void (* UpdateInven ) (void );
62
- const char * (* GetDMGameName ) (void );
29
+ typedef enum
30
+ {
31
+ cs_free , // can be reused for a new connection
32
+ cs_zombie , // client has been disconnected, but don't reuse
33
+ // connection for a couple seconds
34
+ cs_connected , // has been assigned to a client_t, but not in game yet
35
+ cs_spawned // client is fully in game
36
+ } client_state_t ;
37
+
38
+ enum ScriptConditionT
39
+ {
40
+ COND_READY ,
41
+ COND_COMPLETED ,
42
+ COND_SUSPENDED ,
43
+ COND_WAIT_ALL ,
44
+ COND_WAIT_ANY ,
45
+ COND_WAIT_TIME ,
46
+ };
47
+
48
+ //WHY I HAVE TO DO THIS LOL WAHT IS THIS NONSENSE!! XD
49
+ #include "../src/Game/qcommon/configstring.h"
50
+
51
+
52
+ #define stget (e ,x ) *(unsigned int*)(e+x)
53
+ #define stset (e ,x ,v ) *(unsigned int*)(e+x) = v
54
+
55
+
56
+ #define SV_CONFIGSTRINGS 0x203A2374
57
+
58
+
59
+ #define SV_CLIENT 0x203FEC94 //pointer to current player being parsed
60
+ #define CLIENT_BASE 0x20396EEC
61
+ #define SIZE_OF_CLIENT 0xd2ac
62
+ #define CLIENT_USERINFO 0x04
63
+ #define CLIENT_ENT 0x298
64
+ #define CLIENT_NETMESSAGE 0x52b5 //could be wrong i think its 0x52b4
65
+ #define CLIENT_NETCHAN 0x526C
66
+ #define CLIENT_NETCHAN_IP 0x5284
67
+ #define CLIENT_MSEC
68
+
69
+ #define STUFFTEXT 0xD
70
+
71
+ #define GCLIENT_BASE 0x5015D6C4
72
+ #define SIZE_OF_GCLIENT 0x600
73
+ #define GCLIENT_PS_BOD 0x7C
74
+ #define GCLIENT_TEAM 0x324
75
+ #define GCLIENT_INV 0x34C
76
+ #define GCLIENT_BODY 0x354
77
+ #define GCLIENT_GHOSTED 0x554
78
+ #define GCLIENT_PERS_SPECTATOR 0x2DC
79
+ #define GCLIENT_PERS_NETNAME 0x2CC
80
+ #define GCLIENT_PERS_CONNECTED 0x2F8
81
+ #define GCLIENT_RESP_SPECTATOR 0x320
82
+ #define GCLIENT_RESP_SCORE 0x308
83
+ #define GCLINT_RESP_ENTERFRAME 0x304
84
+ #define GCLIENT_PING 0xC8
85
+ #define GCLIENT_SHOWSCORES 0x470
86
+ #define GCLIENT_MOVESCALE 0x348 //other movescale is 26 offset , doesnt set
87
+ #define GCLIENT_CHASETARGET 0x328
88
+
89
+ #define GCLIENT_LATCHED_BUTTONS 0x484
90
+ #define GCLIENT_BUTTONS 0x47C
91
+
92
+
93
+ #define SIZE_OF_EDICT 0x464
94
+ #define EDICT_BASE 0x5015CCA0
95
+
96
+ #define EDICT_GCLIENT 0x74
97
+ #define EDICT_HEALTH 0x2EC
98
+ #define EDICT_SOLID 0x158
99
+ #define EDICT_CLASSNAME 0x1B4
100
+ #define EDICT_TARGETNAME 0x1C8
101
+ #define EDICT_SCRIPT 0x454
102
+ #define EDICT_S_ORIGIN 0x4
103
+ #define EDICT_S_ANGLES 0x10
104
+ #define EDICT_INUSE 0x78
105
+ #define EDICT_GHOULINST 0x164
106
+ #define EDICT_PS_GUN 0x6C
107
+ #define EDICT_CLIPMASK 0x15C
108
+ #define EDICT_MINS 0x11C
109
+ #define EDICT_MAXS 0x128
110
+ #define EDICT_MODEL 0x1A4
111
+ #define EDICT_S_SKINNUM 0x30
112
+ #define EDICT_ENEMY 0x3240
113
+ #define EDICT_CTFFLAGS 0x3CC
114
+ #define EDICT_SURFACETYPE 0x3C0
115
+ #define EDICT_MATERIAL 0x31C
116
+ #define EDICT_TOUCH 0x2C0
117
+ #define EDICT_USE 0x2C4
118
+ #define EDICT_PLUSE 0x2C8
119
+ #define EDICT_PAIN 0x2CC
120
+ #define EDICT_DIE 0x2D0
121
+ #define EDICT_THINK 0x2B8
122
+ #define EDICT_NEXTTHINK 0x2B4
123
+ #define EDICT_FLAGS 0x1A0
124
+ #define EDICT_COUNT 0x318
125
+ #define EDICT_DELAY 0x364
126
+ #define EDICT_OWNER 0x160
127
+
128
+
129
+
130
+ #define CSCRIPT_SCRIPTCONDITION 0x108
131
+
132
+ #include "../src/Game/gamecpp/g_local.h"
133
+
134
+
135
+ // #include "../src/Game/gamecpp/g_obj.h"
136
+
137
+ extern bool GhoulGetInst (int slot );
138
+ extern void GhoulSetTint (float r ,float g ,float b ,float alpha );
139
+ extern void GhoulSetTintOnAll (float r ,float g ,float b ,float alpha );
140
+ extern void GhoulAddNoteCallBack (IGhoulCallBack * c ,GhoulID Token = 0 );
141
+ extern GhoulID GhoulFindSequence (const char * Filename );
142
+ extern bool GhoulPlay (GhoulID Seq ,float Now ,float PlayPos ,bool Restart ,IGhoulInst ::EndCondition ec , bool MatchCurrentPos , bool reverseAnim );
143
+ extern unsigned int * ghoulmain ;
144
+ extern unsigned int * clientinst ;
145
+ extern void GhoulGetXform (Matrix4 * m );
146
+ extern void GhoulSetXform (Matrix4 * m );
147
+ extern unsigned short GhoulFindPart (const char * partname );
148
+ extern bool GhoulGetObject (void );
149
+ extern bool GhoulInstFromID (unsigned short ID );
150
+ extern void PrintFunctionAddr (void );
151
+ extern bool GhoulBoltMatrix (float Time ,Matrix4 & m ,unsigned short GhoulID ,MatrixType kind ,bool ToRoot );
152
+ extern void GhoulBoundBox (float Time ,const Matrix4 & ToWorld ,Vect3 & mins ,Vect3 & maxs ,GhoulID Part ,bool Accurate );
153
+ extern ggObjC * GhoulFindObject (const char * name , const char * subname , bool allSkins = true, const char * skinname = NULL , const char * basefile = NULL , bool dontMakeNew = false);
154
+ extern ggObjC * GhoulFindObjectSmall (IGhoulObj * curObject );
155
+ extern GhoulID GhoulFindNoteToken (const char * Token );
156
+
157
+ //from matrix.cpp lol i modified it for these, from gutils.cpp lol sofsdk
158
+ extern void EntToWorldMatrix (vec3_t org , vec3_t angles , Matrix4 & m );
159
+ extern int GetGhoulPosDir (vec3_t sourcePos , vec3_t sourceAng , GhoulID partID , vec3_t pos , vec3_t dir , vec3_t right , vec3_t up );
160
+ extern void Vec3AddAssign (vec3_t value , vec3_t addTo );
161
+ // extern void VectorCopy(vec3_t in, vec3_t out);
162
+ extern void VectorScale (vec3_t in , vec_t scale , vec3_t out );
163
+ extern void AngleVectors (vec3_t angles , vec3_t forward , vec3_t right , vec3_t up );
63
164
64
- byte (* GetCinematicFreeze ) (void );
65
- void (* SetCinematicFreeze ) (byte cf );
66
165
67
- float (* RunFrame ) (int serverframe );
68
- } game_export_t ;
0 commit comments