-
Notifications
You must be signed in to change notification settings - Fork 120
/
null_client.cpp
346 lines (254 loc) · 6 KB
/
null_client.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
#include "null_client.h"
#include "q_shared.h"
#include "sys_thread.h"
#include "cvar.h"
#ifdef _WIN32
#include <d3d9.h>
#endif
#include "qcommon_io.h"
#include "xassets.h"
#include "qcommon_mem.h"
#include "xassets/xmodel.h"
#include "xassets/gfxworld.h"
cvar_t* r_reflectionProbeGenerate;
cvar_t* r_modelVertColor;
struct GfxWorld s_world;
byte cgMedia[0x27C0];
extern "C"
{
void R_RegisterDvars()
{
r_modelVertColor = Cvar_RegisterBool("r_modelVertColor", qfalse, CVAR_ROM, "Set to 0 to replace all model vertex colors with white when loaded");
}
void R_ReflectionProbeRegisterDvars()
{
r_reflectionProbeGenerate = Cvar_RegisterBool("r_reflectionProbeGenerate", qfalse, CVAR_ROM, "Probe reflections");
}
/*
void XAnimFreeList(){};
void XAnimFree(){};
*/
//void XModelPartsFree(){};
void *__cdecl R_AllocStaticVertexBuffer(IDirect3DVertexBuffer9 **a1, int a2)
{
return NULL;
}
void R_ShowDirtyDiscError()
{
Com_PrintError(CON_CHANNEL_FILES,"Error reading fastfile?\n");
}
void *__cdecl R_AllocStaticIndexBuffer(IDirect3DIndexBuffer9 **ib, int sizeInBytes)
{
return NULL;
}
void __cdecl R_SyncRenderThread()
{
}
void __cdecl R_FinishStaticVertexBuffer(IDirect3DVertexBuffer9 *vb)
{
}
void __cdecl R_FinishStaticIndexBuffer(IDirect3DIndexBuffer9 *ib)
{
}
void __cdecl R_EnumImages(void (__cdecl *func)(union XAssetHeader, void *), void *data)
{
}
void __cdecl R_EnumMaterials(void (__cdecl *func)(union XAssetHeader, void *), void *data)
{
}
void __cdecl R_EnumTechniqueSets(void (__cdecl *func)(union XAssetHeader, void *), void *data)
{
}
void __cdecl R_ShutdownStreams()
{
}
void __cdecl RB_UnbindAllImages()
{
}
void __cdecl R_DelayLoadImage(union XAssetHeader header)
{
}
void __cdecl R_ClearAllStaticModelCacheRefs()
{
}
void __cdecl R_UnloadWorld()
{
}
void __cdecl RB_ClearPixelShader()
{
}
void __cdecl RB_ClearVertexShader()
{
}
void __cdecl RB_ClearVertexDecl()
{
}
void __cdecl DB_LoadSounds()
{
}
void __cdecl DB_SaveSounds()
{
}
Material* __cdecl Material_RegisterHandle(const char *name, int imageTrack)
{
return NULL;
}
void __cdecl Material_DirtySort()
{
}
void __cdecl Load_Texture(struct GfxImageLoadDef **remoteLoadDef, struct GfxImage *image)
{
//image->texture.basemap = 0;
}
void __cdecl Load_VertexBuffer(IDirect3DVertexBuffer9 **vb, void *bufferData, int sizeInBytes)
{
*vb = 0;
}
void __cdecl Load_BuildVertexDecl(struct MaterialVertexDeclaration **mtlVertDecl)
{
}
void __cdecl Load_CreateMaterialVertexShader(struct GfxVertexShaderLoadDef *loadDef, struct MaterialVertexShader *mtlShader)
{
}
void __cdecl Load_CreateMaterialPixelShader(struct GfxPixelShaderLoadDef *loadDef, struct MaterialPixelShader *mtlShader)
{
}
void __cdecl Load_SndAliasCustom(snd_alias_list_t **name)
{
if ( *name )
{
varXStringPtr = (char***)name;
Load_XStringPtr(0);
XAssetHeader xah = DB_FindXAssetHeader(ASSET_TYPE_SOUND, **varXStringPtr);
*name = xah.sound;
}
}
void __cdecl Load_SetSoundData(byte **data, MssSound *sound)
{
sound->data = NULL;
}
void __cdecl Material_UploadShaders(struct MaterialTechniqueSet *techset)
{
}
void __cdecl Image_Release(struct GfxImage *image)
{
}
void __cdecl Material_ReleaseTechniqueSetResources(struct MaterialTechniqueSet *techniqueSet)
{
}
void Material_OverrideTechniqueSets()
{
}
void Material_ClearShaderUploadList(void)
{
}
void __cdecl Material_OriginalRemapTechniqueSet(MaterialTechniqueSet *mt)
{
}
void __cdecl Sys_FastFileBlockedCallback()
{
}
void __cdecl Load_PicmipWater(struct water_t **water)
{
}
void* __cdecl Hunk_AllocXModelPrecache(int size)
{
return Hunk_Alloc(size, "Hunk_AllocXModelPrecache", 22);
}
void* __cdecl Hunk_AllocXModelPrecacheColl(int size)
{
return Hunk_Alloc(size, "Hunk_AllocXModelPrecacheColl", 28);
}
XModel *__cdecl R_RegisterModel(const char *name)
{
return XModelPrecache(name, Hunk_AllocXModelPrecache, Hunk_AllocXModelPrecacheColl);
}
double __cdecl R_GetBaseLodDist(const float *origin)
{
return 0;
}
double __cdecl R_GetAdjustedLodDist(float dist, enum XModelLodRampType lodRampType)
{
return 0;
}
FxEffectDef *__cdecl FX_Register(const char *name)
{
return NULL;
}
snd_alias_list_t* __cdecl Com_FindSoundAlias(const char *name)
{
return NULL;
}
void __cdecl CG_DebugLine(const float *start, const float *end, const float *color, int depthTest, int duration)
{
}
void __cdecl CG_DebugBox(const float *origin, const float *mins, const float *maxs, float yaw, const float *color, int depthTest, int duration)
{
}
void __cdecl CG_DrawStringExt(struct ScreenPlacement *scrPlace, float x, float y, const char *string, const float *setColor, int forceColor, int shadow, float charHeight)
{
}
void PIXBeginNamedEvent(int Color, const char *Name, ...)
{
}
void __cdecl CG_VisionSetMyChanges()
{
}
int SND_GetEntChannelCount(void)
{
return 0;
}
int __cdecl FS_GetModList(char *listbuf, int bufsize)
{
return 0;
}
void CL_ShutdownHunkUsers()
{
}
void SND_ShutdownChannels()
{
}
void __cdecl CG_TraceCapsule(struct trace_t *results, const float *start, const float *mins, const float *maxs, const float *end, int passEntityNum, int contentMask)
{
}
const char* SND_GetEntChannelName(int index)
{
return "server";
}
void __cdecl Com_UnloadSoundAliases(snd_alias_system_t type)
{
}
void Com_LoadSoundAliases()
{
}
XAssetHeader* Com_TryFindSoundAlias(const char* name)
{
return (XAssetHeader*)-1;
}
void SND_AddPhysicsSound(snd_alias_list_t *a1, float *a2)
{
}
void __cdecl R_ReleaseDXDeviceOwnership()
{
}
void R_UnlockVertexBuffer(IDirect3DVertexBuffer9* vertexbuf){}
void R_FreeStaticVertexBuffer(IDirect3DVertexBuffer9* vertexbuf){}
void R_UnlockIndexBuffer(IDirect3DIndexBuffer9* indexbuf){}
void R_FreeStaticIndexBuffer(IDirect3DIndexBuffer9* indexbuf){}
void Material_DirtyTechniqueSetOverrides(){}
};
class OpaqueContextRef
{
};
class MacDisplay
{
static OpaqueContextRef* GetSharedContext();
static void SetCurrentContext(OpaqueContextRef*);
};
OpaqueContextRef* MacDisplay::GetSharedContext()
{
return NULL;
}
void MacDisplay::SetCurrentContext(OpaqueContextRef* ctx)
{
}