00001
00002
00003
00014 #ifdef MODULE_RENDER
00015 #define WHERE
00016 #else
00017 #define WHERE extern
00018 #endif
00019 WHERE short R_terminator(void);
00020 WHERE void read_vec(vector v);
00021 WHERE void MakeVertexNormals(void);
00022 WHERE long RenderHide(void);
00023 WHERE char *short_form(char *filename);
00024 #if __VAX__ || __UNIX__
00025 WHERE char *strlwr(char *string);
00026 #endif
00027 #undef WHERE
00028
00029 #ifdef MODULE_PARTICLES
00030 #define WHERE
00031 #else
00032 #define WHERE extern
00033 #endif
00034 WHERE void SetUpParticles(ParticleSystem *);
00035 WHERE void SetUpSingleParticle(ParticleSystem *);
00036 WHERE void LoadParticleImages(void);
00037 WHERE void UnloadParticleImages(void);
00038 WHERE void MakeParticleTextures(void);
00039 WHERE void ReleaseParticleTextures(void);
00040 WHERE void RenderParticlesGL(BOOL clip);
00041 WHERE void RenderParticles(void);
00042 #undef WHERE
00043
00044 #ifdef MODULE_RENDERGL
00045 #define WHERE
00046 #else
00047 #define WHERE extern
00048 #endif
00049 WHERE long RenderGL(long frame, BOOL ppGL);
00050 WHERE void SetUpCorrectContext(BOOL);
00051 WHERE HWND SetUpGlWindow(HANDLE, HWND, long, long, BOOL, BOOL, BOOL, long);
00052 WHERE void CloseGlWindow(void);
00053 WHERE void accPerspective(GLdouble fovy, GLdouble aspect,
00054 GLdouble znear, GLdouble zfar, GLdouble pixdx, GLdouble pixdy,
00055 GLdouble eyedx, GLdouble eyedy, GLdouble focus);
00056 WHERE void CopyGLtoFSB(void);
00057 WHERE void CopyGLtoZbuffer(void);
00058 WHERE BOOL CheckGPUhardware(HWND);
00059 #undef WHERE
00060
00061 #ifdef MODULE_RENDERGL1
00062 #define WHERE
00063 #else
00064 #define WHERE extern
00065 #endif
00066 WHERE void RenderCameraView(BOOL renderbuffer, BOOL bAntiAliases,int jitter,int, GLfloat aspect);
00067 #undef WHERE
00068
00069 #ifdef MODULE_RENDERGL2
00070 #define WHERE
00071 #else
00072 #define WHERE extern
00073 WHERE long PostProcessRenderGL(long frame);
00074 WHERE void DrawExternalMaterialPolys(BOOL bDrawTransparent, BOOL bClip,
00075 long nMats, matl *iMat,
00076 long Nface, face *MainFp, long Nvert, vertex *MainVp);
00077
00078 #endif
00079
00080 #undef WHERE
00081
00082 #ifdef MODULE_READER
00083 #define WHERE
00084 #else
00085 #define WHERE extern
00086 #endif
00087 WHERE int GetCommand(long, long, long, char*);
00088 WHERE void FreeFrameObjects(void);
00089 WHERE void FreeAllObjects(void);
00090 #undef WHERE
00091
00092 #ifdef MODULE_LOADER
00093 #define WHERE
00094 #else
00095 #define WHERE extern
00096 #endif
00097 WHERE char R_getl(long *val);
00098 WHERE char R_getsht(short * val);
00099 WHERE char R_getusht(unsigned short *val);
00100 WHERE long LoadMorphObject(long, short mo, char *FileName, double mr,
00101 char *QmorphFile, double qr);
00102 WHERE long R_LoadObject(long ObjectID, char *FileName, long frame, short robo,
00103 double robo_ratio, char *robo_file1, char *robo_file2);
00104 WHERE void R_getchunk(long clen);
00105 WHERE long FindNumberVertices(char *ofile, long *nvs);
00106 WHERE void InvertRotationMatrix(double T[4][4], double t[4][4]);
00107 WHERE void RenderTransformToRobot(long O,
00108 long *Skid, skel *Skel, double mr,
00109 char *robo_f1, char *robo_f2);
00110 WHERE void RenderRubberBones(long O, int nSkeleton, long *Skid, skel *Skeleton);
00111
00112 #undef WHERE
00113
00114 #ifdef MODULE_GEO
00115 #define WHERE
00116 #else
00117 #define WHERE extern
00118 #endif
00119 WHERE double dot(vector v1, vector v2);
00120 WHERE short ClipObject(long O);
00121 WHERE long IShadow(long scanline, long v1x, long v1y, long v2x, long v2y,
00122 long *xi);
00123 WHERE void ShadowFillLine(long scanline, long vx[3], long vy[3],
00124 long *leftedge, long *rightedge);
00125 WHERE void ShadowGround(void);
00126 WHERE double hitpoint(vector n, vector x, vector y, vector pb, vector pf,
00127 double * a, double * b);
00128 WHERE BOOL hitpoint2(vector n, vector x, vector y, vector pb, vector pf,
00129 double * a, double * b);
00130 WHERE double hitcylinder(vector n, vector x, vector y, vector p0, vector p,
00131 double * a, double * b);
00132 WHERE double hitsphere(vector n, vector x, vector y, vector p0, vector p,
00133 double * a, double * b);
00134 WHERE void ( *UpdateScanBuffers)(double, double, long, long,
00135 face *, double,
00136 long *[], long *[], double *[],
00137 long *, long *, double *, double *);
00138 WHERE void UpdateGlassScanBuffers(double, double, long, long,
00139 face *, double,
00140 long *[], long *[], double *[],
00141 long *, long *, double *, double *);
00142 WHERE void UpdateNoGlassScanBuffers(double, double, long, long,
00143 face *, double,
00144 long *[], long *[], double *[],
00145 long *, long *, double *, double *);
00146 WHERE long Intersect(long scanline, vertex *v1,
00147 vertex *v2, double *xi);
00148 WHERE long Active(long scanline, vertex *v, face *f,
00149 double *leftedge, double *rightedge);
00150 WHERE void SetPerspectiveView(long);
00151 WHERE void ApplyViewingTransformToPoint(vector, vector);
00152 WHERE void BendNormal(vector, vector, vector);
00153 WHERE void MakeObjectTransformation(double fi, double theta, double alpha,
00154 short im, double ima,
00155 double sx, double sy, double sz, vector Offset,
00156 vector Position,
00157 double trpos[4][4],
00158 double pos[4][4],
00159 double trinv[4][4]);
00160 WHERE void TransformMappingRectangle(double [4][4], vector, vector, vector,
00161 vector, vector, vector, vector);
00162 WHERE void PerspObstra(double xo, double yo, double zo,
00163 double xt, double yt, double zt,
00164 double to[4][4]);
00165 WHERE void R_scal(double tr[4][4], double sx, double sy, double sz);
00166 WHERE void R_rotz(double tr[4][4], double ang);
00167 WHERE void R_rotx(double tr[4][4], double ang);
00168 WHERE void R_roty(double tr[4][4], double ang);
00169 WHERE void R_tram(double t[4][4], double dx, double dy, double dz);
00170 WHERE void R_m4by4(double t1[4][4], double t2[4][4], double tr[4][4]);
00171 WHERE void R_c4to4(double tin[4][4], double tout[4][4]);
00172 WHERE void R_null_transform(double t[4][4]);
00173 WHERE void R_m4by1(double t4[4][4], double x, double y, double z,
00174 double *xx, double *yy, double *zz);
00175 WHERE void R_m3by1(double t4[4][4], double x, double y, double z,
00176 double *xx, double *yy, double *zz);
00177 WHERE void R_reflect(double t4[4][4], vector p, vector n);
00178 WHERE void veccopy(vector v1, vector r);
00179 WHERE void vecsub(vector v1, vector v2, vector r);
00180 WHERE void vecsum(vector v1, vector v2, vector r);
00181 WHERE void vecscale(double s, vector v, vector r);
00182 WHERE short normalize(vector v);
00183 WHERE double R_length(vector v);
00184 WHERE void cross(vector v1,vector v2, vector r);
00185 WHERE void AssignMappingCoordinatesToVertices(object *);
00186
00187 #undef WHERE
00188
00189 #ifdef MODULE_FX
00190 #define WHERE
00191 #else
00192 #define WHERE extern
00193 #endif
00194 WHERE void EffectObjectVertices(long global, long O);
00195 WHERE short LoadExternalTexture(char *name, char *parameters);
00196 WHERE short MorphExternalTexture(char *name, char *parameters, long obj);
00197 WHERE void FreeExternalTextures(void);
00198 WHERE BOOL RenderExternalTexture(long tid,
00199 vector p, vector n,
00200 double alpha, double beta, double gamma,
00201 double bump_scale,
00202 double *ac,
00203 double *transparency,
00204 unsigned char sc[3],
00205 long model_id, face *fp,
00206 double colour[3]);
00207 WHERE long ExternalImageProcess(long frame, long HWrender);
00208 WHERE long MotionBlurFrame(long frame, long subframe, long command_id);
00209 #undef WHERE
00210
00211 #ifdef MODULE_LOADMAPS
00212 #define WHERE
00213 #else
00214 #define WHERE extern
00215 #endif
00216 WHERE void ReleaseImageStore(void);
00217 WHERE long SetupImageMap(imap *Map, char *objectfile);
00218 WHERE void LoadSingleRenderImageMap(imap *Map, char *mfname,
00219 char *ofname, char *tempfile, int type);
00220 WHERE BOOL CheckSingleRenderImageMap(imap *Map, char *mfname, char *ofname, char *tempfile, int type);
00221 WHERE void CompleteMovieMapLoading(long ObjectID, char *objectfilename);
00222 WHERE void FreeMovieMapImages(long ObjectID);
00223 WHERE unsigned char *LoadSystemMAP(BOOL, BOOL, char *fn, long *xx,long *yy);
00224 WHERE void ScaleImageBuffer3(long xi, long yi, unsigned char *pi, long xo, long yo, unsigned char *po);
00225 WHERE void ScaleImageBuffer4(long xi, long yi, unsigned char *pi, long xo, long yo, unsigned char *po);
00226 #undef WHERE
00227
00228 #ifdef MODULE_OUTPUT
00229 #define WHERE
00230 #else
00231 #define WHERE extern
00232 #endif
00233 WHERE void OneExternalFrame(long frame, void *,
00234 char *out_root, long type, long quality);
00235 WHERE long out_line (unsigned char *pixels, long linelen);
00236 WHERE long get_byte(void);
00237 WHERE long ScreenTo32bitFile(long frame, char *rawfile, char *out_root, fullscreenbuffer *);
00238 WHERE void FillAlfaLine(UCHAR *, long *[], long *);
00239 WHERE void ScanlineToZbuffer(long, double *);
00240 WHERE void ScanlineToZobject(long, long *);
00241 WHERE long AntiAliasLine(long, long,
00242 UCHAR *, UCHAR *, UCHAR *, UCHAR *,
00243 UCHAR *, UCHAR *, UCHAR *, UCHAR *,
00244 UCHAR *, UCHAR *, UCHAR *, UCHAR *);
00245 WHERE long out_line (unsigned char *pixels, long linelen);
00246
00247 #undef WHERE
00248
00249
00250 #ifdef MODULE_MATERIAL
00251 #define WHERE
00252 #else
00253 #define WHERE extern
00254 #endif
00255 WHERE void init_spec(void);
00256 WHERE void GetSkyLocation(void);
00257 WHERE long PutBackIntersection(long, double, UCHAR *, double *,
00258 long *[], long *[], double *[],
00259 long *, long *, double *, double *,
00260 double *);
00261 WHERE long ShadedScanline(long scanline ,double d2,
00262 UCHAR *Red, UCHAR *Green, UCHAR *Blue,
00263 double *Zground, long Wsky, double Rsky,
00264 long *Zglass[], long *ZglassO[], double *Zglassd[],
00265 long *Zbuffer, long *Zobject,
00266 double *Zdepth, double *Zposn);
00267 WHERE long FastAntiAliasShadedScanline(long, long, double,
00268 UCHAR *, UCHAR *, UCHAR *,
00269 double *, long, double,
00270 long *, long *,
00271 long *[], long *[], double *[],
00272 long *, long *, double *, double *);
00273 WHERE long MapFromProjection(imap *, short type, short clear,
00274 vector p , double *red
00275 , double *green
00276 , double *blue);
00277 WHERE long MapByCoordinates(imap *Map, long obj, face *f,
00278 short type, short clear,
00279 vector p , double *red
00280 , double *green
00281 , double *blue);
00282 WHERE long MapTransByCoordinates(imap *Map, short type, long obj, face *f,
00283 vector p , double *trans);
00284 WHERE long MapTextureByCoordinates(long obj,face *f, vector p,
00285 double *alpha, double *beta, double *gamma);
00286 WHERE void GetMirrorValues(double *color, vector p, vector d, vector n,
00287 int, face *,
00288 long, long, long);
00289 WHERE void BumpByCoordinates(imap *, short, long, face *, vector, vector);
00290 WHERE void GetGroundLight(vector p0, double *R, double *G, double *B);
00291 WHERE void BoxMapIntersect(vector, long *, double *, double *);
00292 WHERE void MapMirror(double *, double *, double *,
00293 imap *, vector, vector);
00294 WHERE void MapEnvironment(long, long, UCHAR *, UCHAR *, UCHAR *, imap *);
00295 WHERE void MapEnvironmentInDirection(vector , double *, double *, double *, imap *);
00296 WHERE void GetPixelValue(vector p, vector dinput, vector n, double pdotn,
00297 imap *Map, matl *Mat, face *f, long obj,
00298 long row, long col, BOOL first_trace,
00299 long trace_relection_depth,
00300 long trace_refraction_depth, long refractive_flag,
00301 double *Red, double *Green, double *Blue);
00302 WHERE void GetRowPixelValue(long, long, imap *, matl *,
00303 face *, long, vector,
00304 UCHAR *, UCHAR *, UCHAR *,
00305 double *, UCHAR *);
00306 WHERE double DepthCueLight(long, double);
00307 WHERE void GetPixelLighting(matl *Matl, vector p, vector n, double pdotn, double ddotn,
00308 long obj, face *f,
00309 double *IdR, double *IdG, double *IdB,
00310 double *IsR, double *IsG, double *IsB);
00311 WHERE void GetSurfaceValue(int, face *, vertex *,
00312 vector, vector,
00313 double *, double *, double *,
00314 long, long, long);
00315 #undef WHERE
00316
00317 #ifdef MODULE_TEXTUR2
00318 #define WHERE
00319 #else
00320 #define WHERE extern
00321 #endif
00322 WHERE void FreeTextureHashTable(void);
00323 WHERE short InitialiseNoise(void);
00324 WHERE void STurbulence(double x, double y, double z, double *r);
00325 WHERE void Cycloidal(double value, double *r);
00326 WHERE void DTurbulence(vector result, double x, double y, double z);
00327 WHERE double Triangle_Wave(double value);
00328 WHERE void Snoise2(double x, double y, double z, double *r);
00329 WHERE void Dnoise2(vector result, double x, double y, double z);
00330 WHERE void ripples2(double x, double y, double z, double Frequency,
00331 double phase, double Bump_Amount, vector Vector);
00332 WHERE void calcripple(vector point, vector wave_centre,
00333 double wave_propagate,double wave_wavelength,
00334 double wave_drag, double wave_amplitude,
00335 vector ripple);
00336 WHERE void init_ripples(void);
00337 WHERE void Ocean(vector p0, vector Groundn, vector gn);
00338 WHERE BOOL GetInternalTexture(matl *Mat,double alpha, double beta, double gamma,
00339 long textID, vector p, vector n, long obj, face *f,
00340 double *colors, double *colort,
00341 long *flag_trans, double tr, double *tr1,
00342 long trace_relection_depth,long trace_refraction_depth,
00343 long refractive_flag);
00344
00345 #undef WHERE
00346
00347 #ifdef MODULE_DITHER
00348 #define WHERE
00349 #else
00350 #define WHERE extern
00351 #endif
00352 WHERE void DitherLine(long scanline,long xmax, unsigned char *R,
00353 unsigned char *G, unsigned char *B);
00354 WHERE BOOL AllocateThreadStorage(THD *);
00355 WHERE void FreeThreadStorage(THD *);
00356 WHERE short AllocateRamBuffers(void);
00357 WHERE void ResetDither(void);
00358 WHERE void FreeRamBuffers(void);
00359 WHERE void InitialiseLibraryHandleList(void);
00360 WHERE void FreeLibraryHandleList(void);
00361 WHERE HMODULE AddLoadedLibrary(char *);
00362
00363 WHERE void Render_Message(short number, short query, char *str);
00364 WHERE int (*X_message)(const char *,...);
00365 WHERE int X__local_print(const char *,...);
00366 WHERE void setup_render_discarded_list(void);
00367 WHERE void free_render_discarded_list(void);
00368 WHERE FILE *GetRenderRelativeFile(char *fn, char *objectfilename, char *newname);
00369 WHERE HANDLE GetRenderRelativeHandle(char *fn, char *objectfilename, char *newname);
00370 #undef WHERE
00371
00372 #ifdef MODULE_MIRRORS
00373 #define WHERE
00374 #else
00375 #define WHERE extern
00376 #endif
00377 WHERE int R_intersect_face(vector p, vector d,
00378 vector p0, vector p1, vector p2, vector n,
00379 double *depth, double tollerance);
00380 WHERE void PointInShadow(vector p, long id, double *intensity);
00381 WHERE void Add_Ground_Mirror(long, long, vector, unsigned char *,
00382 unsigned char *,unsigned char *);
00383 #undef WHERE
00384
00385 #ifdef MODULE_NURBS
00386 #define WHERE
00387 #else
00388 #define WHERE extern
00389 #endif
00390 WHERE void FreeNurbs(long, nurbs *);
00391 WHERE BOOL AllocNurbs(nurbs *, double *, double *);
00392 WHERE BOOL MeshNurbsSurfaces(long);
00393 #undef WHERE
00394
00395 #ifdef TRACER
00396 #ifdef MODULE_TRACE
00397 #define WHERE
00398 #else
00399 #define WHERE extern
00400 #endif
00401 WHERE short check_for_shadow(long obj, vector p, vector natp);
00402 short trace_reflection_ray(vector p, vector d,
00403 double depth_max, double *colour,
00404 int at_o, face *at_f,
00405 long trace_reflection_depth,
00406 long trace_refraction_depth,
00407 long refractive_flag);
00408 WHERE void trace_refraction_ray(vector p, vector d, vector n,
00409 int obj, face *f,
00410 double depth_max, double *colour, int refx,
00411 long, long, long);
00412 WHERE void trace_transmission_ray(vector p, vector d, vector n,
00413 int at_o, face *at_f,
00414 double depth_max, double *colour,
00415 long trace_reflection_depth,
00416 long trace_refraction_depth,
00417 long refractive_flag);
00418 WHERE BOOL trace_starting_ray(vector d, vector p,
00419 int *ob, int *fc, face **ff);
00420 WHERE int buildBST(void);
00421 WHERE void freeBST(void);
00422 #undef WHERE
00423 #endif
00424
00425 extern void AddToRenderImagePreview(long index,
00426 long xmax, long ymax,
00427 fullscreenbuffer *f,
00428 unsigned char *R,
00429 unsigned char *G,
00430 unsigned char *B);
00431
00432