summaryrefslogtreecommitdiffstats
path: root/src/render/WeaponEffects.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-22 15:23:40 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-22 15:23:40 +0100
commit34b18815286938176b0462ba5a97ea03195409fb (patch)
tree62e01aacd06b12acb897dc48b45ca800ed77d44d /src/render/WeaponEffects.cpp
parentbullet traces fixes (diff)
downloadre3-34b18815286938176b0462ba5a97ea03195409fb.tar
re3-34b18815286938176b0462ba5a97ea03195409fb.tar.gz
re3-34b18815286938176b0462ba5a97ea03195409fb.tar.bz2
re3-34b18815286938176b0462ba5a97ea03195409fb.tar.lz
re3-34b18815286938176b0462ba5a97ea03195409fb.tar.xz
re3-34b18815286938176b0462ba5a97ea03195409fb.tar.zst
re3-34b18815286938176b0462ba5a97ea03195409fb.zip
Diffstat (limited to 'src/render/WeaponEffects.cpp')
-rw-r--r--src/render/WeaponEffects.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/render/WeaponEffects.cpp b/src/render/WeaponEffects.cpp
index 11fb3d2e..932c661e 100644
--- a/src/render/WeaponEffects.cpp
+++ b/src/render/WeaponEffects.cpp
@@ -2,6 +2,8 @@
#include "patcher.h"
#include "WeaponEffects.h"
+#include "TxdStore.h"
+
WRAPPER void CWeaponEffects::Render(void) { EAXJMP(0x564D70); }
CWeaponEffects &gCrossHair = *(CWeaponEffects*)0x6503BC;
@@ -23,3 +25,21 @@ CWeaponEffects::MarkTarget(CVector pos, uint8 red, uint8 green, uint8 blue, uint
gCrossHair.m_alpha = alpha;
gCrossHair.m_size = size;
}
+
+void
+CWeaponEffects::Init()
+{
+ gCrossHair.m_bCrosshair = false;
+ gCrossHair.m_vecPos = CVector(0.0f, 0.0f, 0.0f);
+ gCrossHair.m_red = 0;
+ gCrossHair.m_green = 0;
+ gCrossHair.m_blue = 0;
+ gCrossHair.m_alpha = 255;
+ gCrossHair.m_size = 1.0f;
+ gCrossHair.field_24 = 0;
+ CTxdStore::PushCurrentTxd();
+ CTxdStore::SetCurrentTxd(CTxdStore::FindTxdSlot("particle"));
+ gCrossHair.m_pTexture = RwTextureRead("crosshair", nil);
+ gCrossHair.m_pRaster = gCrossHair.m_pTexture->raster;
+ CTxdStore::PopCurrentTxd();
+}