summaryrefslogtreecommitdiffstats
path: root/src/RwHelper.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-30 13:35:13 +0200
committeraap <aap@papnet.eu>2019-05-30 13:35:13 +0200
commit852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1 (patch)
tree2efed135e4d792f86cbac02c9c9bb1eaa340d9ed /src/RwHelper.cpp
parentadded CAntennas (diff)
downloadre3-852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1.tar
re3-852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1.tar.gz
re3-852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1.tar.bz2
re3-852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1.tar.lz
re3-852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1.tar.xz
re3-852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1.tar.zst
re3-852d8298b1f6c838d4d5c7fd8cfbdbf2615b62d1.zip
Diffstat (limited to 'src/RwHelper.cpp')
-rw-r--r--src/RwHelper.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/RwHelper.cpp b/src/RwHelper.cpp
index c8782f9e..2634cfd6 100644
--- a/src/RwHelper.cpp
+++ b/src/RwHelper.cpp
@@ -1,5 +1,31 @@
+#define WITHD3D
#include "common.h"
+#include "TimeCycle.h"
+void
+DefinedState(void)
+{
+ RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, (void*)rwTEXTUREADDRESSWRAP);
+ RwRenderStateSet(rwRENDERSTATETEXTUREPERSPECTIVE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATESHADEMODE, (void*)rwSHADEMODEGOURAUD);
+ RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
+ RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATEALPHAPRIMITIVEBUFFER, (void*)FALSE);
+ RwRenderStateSet(rwRENDERSTATEBORDERCOLOR, (void*)RWRGBALONG(0, 0, 0, 255));
+ RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
+ RwRenderStateSet(rwRENDERSTATEFOGCOLOR,
+ (void*)RWRGBALONG(CTimeCycle::GetFogRed(), CTimeCycle::GetFogGreen(), CTimeCycle::GetFogBlue(), 255));
+ RwRenderStateSet(rwRENDERSTATEFOGTYPE, (void*)rwFOGTYPELINEAR);
+ RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
+
+ // D3D stuff
+ RwD3D8SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER);
+ RwD3D8SetRenderState(D3DRS_ALPHAREF, 2);
+}
RwObject*
GetFirstObjectCallback(RwObject *object, void *data)