1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 
5 #include "fixer.h"
6 
7 #include "3dc.h"
8 #include "platform.h"
9 #include "psndplat.h"
10 #include "module.h"
11 #include "stratdef.h"
12 #include "avp_userprofile.h"
13 #include "projfont.h"
14 #include "savegame.h"
15 #include "pldnet.h"
16 #include "kshape.h"
17 #include "d3d_hud.h"
18 
19 
20 /* winmain.c */
21 BOOL KeepMainRifFile = FALSE;
22 int HWAccel = 1;
23 int VideoModeNotAvailable=0;
24 
25 /* bink.c */
PlayBinkedFMV(char * filenamePtr)26 void PlayBinkedFMV(char *filenamePtr)
27 {
28 /*
29 	fprintf(stderr, "PlayBinkedFMV(%s)\n", filenamePtr);
30 */
31 }
32 
StartMenuBackgroundBink()33 void StartMenuBackgroundBink()
34 {
35 /*
36 	fprintf(stderr, "StartMenuBackgroundBink()\n");
37 */
38 }
39 
PlayMenuBackgroundBink()40 int PlayMenuBackgroundBink()
41 {
42 /*
43 	fprintf(stderr, "PlayMenuBackgroundBink()\n");
44 */
45 	return 0;
46 }
47 
EndMenuBackgroundBink()48 void EndMenuBackgroundBink()
49 {
50 /*
51 	fprintf(stderr, "EndMenuBackgroundBink()\n");
52 */
53 }
54 
55 /* alt_tab.cpp */
ATIncludeSurface(void * pSurface,void * hBackup)56 void ATIncludeSurface(void * pSurface, void * hBackup)
57 {
58 	fprintf(stderr, "ATIncludeSurface(%p, %p)\n", pSurface, hBackup);
59 }
60 
ATRemoveSurface(void * pSurface)61 void ATRemoveSurface(void * pSurface)
62 {
63 	fprintf(stderr, "ATRemoveSurface(%p)\n", pSurface);
64 }
65 
ATRemoveTexture(void * pTexture)66 void ATRemoveTexture(void * pTexture)
67 {
68 	fprintf(stderr, "ATRemoveTexture(%p)\n", pTexture);
69 }
70 
71 
72 /* d3_func.cpp */
GetTextureHandle(IMAGEHEADER * imageHeaderPtr)73 int GetTextureHandle(IMAGEHEADER *imageHeaderPtr)
74 {
75 /*
76 	fprintf(stderr, "GetTextureHandle(%p)\n", imageHeaderPtr);
77 */
78 	return 1;
79 }
80 
ReleaseDirect3DNotDDOrImages()81 void ReleaseDirect3DNotDDOrImages()
82 {
83 /*
84 	fprintf(stderr, "ReleaseDirect3DNotDDOrImages()\n");
85 */
86 }
87 
ReleaseDirect3DNotDD()88 void ReleaseDirect3DNotDD()
89 {
90 /*
91 	fprintf(stderr, "ReleaseDirect3DNotDD()\n");
92 */
93 }
94 
ReleaseDirect3D()95 void ReleaseDirect3D()
96 {
97 /*
98 	fprintf(stderr, "ReleaseDirect3D()\n");
99 */
100 }
101 
ReloadImageIntoD3DImmediateSurface(IMAGEHEADER * iheader)102 void ReloadImageIntoD3DImmediateSurface(IMAGEHEADER* iheader)
103 {
104 	fprintf(stderr, "ReloadImageIntoD3DImmediateSurface(%p)\n", iheader);
105 }
106 
107 
108 /* d3d_render.cpp */
109 int NumberOfLandscapePolygons;
110 int FMVParticleColour;
111 int WireFrameMode;
112 
InitDrawTest()113 void InitDrawTest()
114 {
115 /*
116 	fprintf(stderr, "InitDrawTest()\n");
117 */
118 }
119 
CheckWireFrameMode(int shouldBeOn)120 void CheckWireFrameMode(int shouldBeOn)
121 {
122 	if (shouldBeOn)
123 		fprintf(stderr, "CheckWireFrameMode(%d)\n", shouldBeOn);
124 }
125 
126 
127 /* ddplat.cpp */
MinimizeAllDDGraphics()128 void MinimizeAllDDGraphics()
129 {
130 /*
131 	fprintf(stderr, "MinimizeAllDDGraphics()\n");
132 */
133 }
134 
135 
136 /* dd_func.cpp */
137 long BackBufferPitch;
138 int VideoModeColourDepth;
139 
BlitWin95Char(int x,int y,unsigned char toprint)140 void BlitWin95Char(int x, int y, unsigned char toprint)
141 {
142 	fprintf(stderr, "BlitWin95Char(%d, %d, %d)\n", x, y, toprint);
143 }
144 
LockSurfaceAndGetBufferPointer()145 void LockSurfaceAndGetBufferPointer()
146 {
147 	fprintf(stderr, "LockSurfaceAndGetBufferPointer()\n");
148 }
149 
finiObjectsExceptDD()150 void finiObjectsExceptDD()
151 {
152 /*
153 	fprintf(stderr, "finiObjectsExceptDD()\n");
154 */
155 }
156 
finiObjects()157 void finiObjects()
158 {
159 /*
160 	fprintf(stderr, "finiObjects()\n");
161 */
162 }
163 
UnlockSurface()164 void UnlockSurface()
165 {
166 	fprintf(stderr, "UnlockSurface()\n");
167 }
168 
169 
ChangeDirectDrawObject()170 BOOL ChangeDirectDrawObject()
171 {
172 /*
173 	fprintf(stderr, "ChangeDirectDrawObject()\n");
174 */
175 	return FALSE;
176 }
177 
SelectDirectDrawObject(void * pGUID)178 int SelectDirectDrawObject(void *pGUID)
179 {
180 /*
181 	fprintf(stderr, "SelectDirectDrawObject(%p)\n", pGUID);
182 */
183 	return 0;
184 }
185 
GenerateDirectDrawSurface()186 void GenerateDirectDrawSurface()
187 {
188 /*
189 	fprintf(stderr, "GenerateDirectDrawSurface()\n");
190 */
191 }
192 
193 
194 /* dxlog.c */
dx_str_log(char const * str,int line,char const * file)195 void dx_str_log(char const * str, int line, char const * file)
196 {
197 	FILE *fp;
198 
199 	fp = OpenGameFile("dx_error.log", FILEMODE_APPEND, FILETYPE_CONFIG);
200 	if (fp == NULL)
201 		fp = stderr;
202 
203 	fprintf(fp, "dx_str_log: %s/%d: %s\n", file, line, str);
204 
205 	if (fp != stderr) fclose(fp);
206 }
207 
dx_strf_log(char const * fmt,...)208 void dx_strf_log(char const * fmt, ... )
209 {
210 	va_list ap;
211 	FILE *fp;
212 
213 	fp = OpenGameFile("dx_error.log", FILEMODE_APPEND, FILETYPE_CONFIG);
214 	if (fp == NULL)
215 		fp = stderr;
216 
217         va_start(ap, fmt);
218         fprintf(fp, "dx_strf_log: ");
219 	vfprintf(fp, fmt,ap);
220 	fprintf(fp, "\n");
221         va_end(ap);
222 
223         if (fp != stderr) fclose(fp);
224 }
225 
dx_line_log(int line,char const * file)226 void dx_line_log(int line, char const * file)
227 {
228 	FILE *fp;
229 
230 	fp = OpenGameFile("dx_error.log", FILEMODE_APPEND, FILETYPE_CONFIG);
231 	if (fp == NULL)
232 		fp = stderr;
233 
234 	fprintf(fp, "dx_line_log: %s/%d\n", file, line);
235 
236 	if (fp != stderr) fclose(fp);
237 }
238