2020-08-19 14:10:22 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef LIBRW
|
2021-01-18 19:03:30 +00:00
|
|
|
#ifdef EXTENDED_PIPELINES
|
2020-08-19 14:10:22 +00:00
|
|
|
|
|
|
|
namespace CustomPipes {
|
|
|
|
|
|
|
|
|
2020-11-19 18:07:32 +00:00
|
|
|
extern rw::TexDictionary *neoTxd;
|
2020-08-19 14:10:22 +00:00
|
|
|
|
|
|
|
struct CustomMatExt
|
|
|
|
{
|
|
|
|
rw::Texture *glossTex;
|
|
|
|
bool haveGloss;
|
|
|
|
};
|
|
|
|
extern rw::int32 CustomMatOffset;
|
|
|
|
inline CustomMatExt *GetCustomMatExt(rw::Material *mat) {
|
|
|
|
return PLUGINOFFSET(CustomMatExt, mat, CustomMatOffset);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct Color
|
|
|
|
{
|
|
|
|
float r, g, b, a;
|
|
|
|
Color(void) {}
|
|
|
|
Color(float r, float g, float b, float a) : r(r), g(g), b(b), a(a) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class InterpolatedValue
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void Read(char *s, int line, int field) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class InterpolatedFloat : public InterpolatedValue
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
float data[24][NUMWEATHERS];
|
|
|
|
float curInterpolator;
|
|
|
|
float curVal;
|
|
|
|
|
|
|
|
InterpolatedFloat(float init);
|
|
|
|
void Read(char *s, int line, int field);
|
|
|
|
float Get(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
class InterpolatedColor : public InterpolatedValue
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Color data[24][NUMWEATHERS];
|
|
|
|
float curInterpolator;
|
|
|
|
Color curVal;
|
|
|
|
|
|
|
|
InterpolatedColor(const Color &init);
|
|
|
|
void Read(char *s, int line, int field);
|
|
|
|
Color Get(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
class InterpolatedLight : public InterpolatedColor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
InterpolatedLight(const Color &init) : InterpolatedColor(init) {}
|
|
|
|
void Read(char *s, int line, int field);
|
|
|
|
};
|
|
|
|
|
|
|
|
char *ReadTweakValueTable(char *fp, InterpolatedValue &interp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CustomPipeRegister(void);
|
|
|
|
void CustomPipeRegisterGL(void);
|
|
|
|
void CustomPipeInit(void);
|
|
|
|
void CustomPipeShutdown(void);
|
|
|
|
void SetTxdFindCallback(void);
|
|
|
|
|
2021-01-12 13:07:24 +00:00
|
|
|
extern bool gGlassCarsCheat;
|
2020-08-19 14:10:22 +00:00
|
|
|
extern bool bRenderingEnvMap;
|
|
|
|
extern int32 EnvMapSize;
|
|
|
|
extern rw::Camera *EnvMapCam;
|
|
|
|
extern rw::Texture *EnvMapTex;
|
|
|
|
extern rw::Texture *EnvMaskTex;
|
2021-01-10 10:59:51 +00:00
|
|
|
extern rw::RWDEVICE::Im2DVertex EnvScreenQuad[4];
|
|
|
|
extern int16 QuadIndices[6];
|
2020-08-19 14:10:22 +00:00
|
|
|
void EnvMapRender(void);
|
|
|
|
|
|
|
|
enum {
|
2021-01-19 10:38:51 +00:00
|
|
|
VEHICLEPIPE_PSP,
|
2021-01-12 12:41:22 +00:00
|
|
|
VEHICLEPIPE_PS2,
|
|
|
|
VEHICLEPIPE_MOBILE,
|
|
|
|
|
|
|
|
// maybe later again...
|
|
|
|
VEHICLEPIPE_NEO = -1
|
2020-08-19 14:10:22 +00:00
|
|
|
};
|
|
|
|
extern int32 VehiclePipeSwitch;
|
|
|
|
extern float VehicleShininess;
|
|
|
|
extern float VehicleSpecularity;
|
|
|
|
extern InterpolatedFloat Fresnel;
|
|
|
|
extern InterpolatedFloat Power;
|
|
|
|
extern InterpolatedLight DiffColor;
|
|
|
|
extern InterpolatedLight SpecColor;
|
|
|
|
extern rw::ObjPipeline *vehiclePipe;
|
|
|
|
void CreateVehiclePipe(void);
|
|
|
|
void DestroyVehiclePipe(void);
|
|
|
|
void AttachVehiclePipe(rw::Atomic *atomic);
|
|
|
|
void AttachVehiclePipe(rw::Clump *clump);
|
|
|
|
|
2021-01-10 18:45:58 +00:00
|
|
|
enum {
|
2021-01-19 10:38:51 +00:00
|
|
|
WORLDPIPE_PSP,
|
2021-01-10 18:45:58 +00:00
|
|
|
WORLDPIPE_PS2,
|
|
|
|
WORLDPIPE_MOBILE
|
|
|
|
};
|
|
|
|
extern int32 WorldPipeSwitch;
|
2020-10-27 14:55:07 +00:00
|
|
|
extern bool LightmapEnable;
|
2020-08-19 14:10:22 +00:00
|
|
|
extern float LightmapMult;
|
|
|
|
extern InterpolatedFloat WorldLightmapBlend;
|
|
|
|
extern rw::ObjPipeline *worldPipe;
|
|
|
|
void CreateWorldPipe(void);
|
|
|
|
void DestroyWorldPipe(void);
|
|
|
|
void AttachWorldPipe(rw::Atomic *atomic);
|
|
|
|
void AttachWorldPipe(rw::Clump *clump);
|
|
|
|
|
2020-10-27 14:55:07 +00:00
|
|
|
extern bool GlossEnable;
|
2020-08-19 14:10:22 +00:00
|
|
|
extern float GlossMult;
|
|
|
|
extern rw::ObjPipeline *glossPipe;
|
|
|
|
void CreateGlossPipe(void);
|
|
|
|
void DestroyGlossPipe(void);
|
|
|
|
void AttachGlossPipe(rw::Atomic *atomic);
|
|
|
|
void AttachGlossPipe(rw::Clump *clump);
|
|
|
|
rw::Texture *GetGlossTex(rw::Material *mat);
|
|
|
|
|
2020-10-27 14:55:07 +00:00
|
|
|
extern bool RimlightEnable;
|
2020-08-19 14:10:22 +00:00
|
|
|
extern float RimlightMult;
|
|
|
|
extern InterpolatedColor RampStart;
|
|
|
|
extern InterpolatedColor RampEnd;
|
|
|
|
extern InterpolatedFloat Offset;
|
|
|
|
extern InterpolatedFloat Scale;
|
|
|
|
extern InterpolatedFloat Scaling;
|
|
|
|
extern rw::ObjPipeline *rimPipe;
|
|
|
|
extern rw::ObjPipeline *rimSkinPipe;
|
|
|
|
void CreateRimLightPipes(void);
|
|
|
|
void DestroyRimLightPipes(void);
|
|
|
|
void AttachRimPipe(rw::Atomic *atomic);
|
|
|
|
void AttachRimPipe(rw::Clump *clump);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-01-09 18:20:32 +00:00
|
|
|
namespace WorldRender{
|
|
|
|
extern int numBlendInsts[3];
|
|
|
|
void AtomicFirstPass(RpAtomic *atomic, int pass);
|
|
|
|
void AtomicFullyTransparent(RpAtomic *atomic, int pass, int fadeAlpha);
|
|
|
|
void RenderBlendPass(int pass);
|
|
|
|
}
|
|
|
|
|
2020-08-19 14:10:22 +00:00
|
|
|
#endif
|
|
|
|
#endif
|