diff --git a/res/crosshair.png b/res/crosshair.png
new file mode 100644
index 0000000..e656721
Binary files /dev/null and b/res/crosshair.png differ
diff --git a/res/crosshair.svg b/res/crosshair.svg
new file mode 100644
index 0000000..ddc6f55
--- /dev/null
+++ b/res/crosshair.svg
@@ -0,0 +1,115 @@
+
+
+
+
diff --git a/res/flyby.wav b/res/flyby.wav
new file mode 100644
index 0000000..56f0804
Binary files /dev/null and b/res/flyby.wav differ
diff --git a/res/gunburst.wav b/res/gunburst.wav
new file mode 100644
index 0000000..6007a12
Binary files /dev/null and b/res/gunburst.wav differ
diff --git a/res/guns-scene.blend b/res/guns-scene.blend
index bc5d5b1..f23ed0c 100644
Binary files a/res/guns-scene.blend and b/res/guns-scene.blend differ
diff --git a/res/mflash.png b/res/mflash.png
new file mode 100644
index 0000000..525cf22
Binary files /dev/null and b/res/mflash.png differ
diff --git a/src/FireUnit.cpp b/src/FireUnit.cpp
index 092883a..3211502 100644
--- a/src/FireUnit.cpp
+++ b/src/FireUnit.cpp
@@ -29,7 +29,11 @@ FireUnit::FireUnit()
jet->addAnimator(a);
a->drop();
+ crosshair = Globals::getVideoDriver()->getTexture("../res/crosshair.png");
+ auto b = Globals::getSceneManager()->addBillboardSceneNode(turretElevation, dimension2df(1.f, 1.f), vector3df(.14f, 1.5f, 1.89f));
+ b->setMaterialTexture(0, Globals::getVideoDriver()->getTexture("../res/mflash.png"));
+ b->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
}
FireUnit::~FireUnit()
@@ -101,3 +105,11 @@ bool FireUnit::OnEvent(const SEvent& e)
return false;
}
+
+
+void FireUnit::draw()
+{
+ auto& res = Globals::getVideoDriver()->getScreenSize();
+
+ Globals::getVideoDriver()->draw2DImage(crosshair, position2di(res.Width / 2 - 128, res.Height / 2 - 128), recti(0, 0, 256, 256), nullptr, video::SColor(255,255,255,255), true );
+}
diff --git a/src/FireUnit.hpp b/src/FireUnit.hpp
index ebc4f4b..85d23c6 100644
--- a/src/FireUnit.hpp
+++ b/src/FireUnit.hpp
@@ -10,13 +10,14 @@ public:
~FireUnit();
bool OnEvent(const irr::SEvent&);
+ void draw();
private:
irr::scene::ICameraSceneNode *cam;
irr::scene::ISceneNode *turretElevation, *turretAzimuth;
irr::scene::ISceneNodeAnimator *turretCamAnimator;
-
irr::f32 aziTurnCoeffSmooth, elevTurnCoeffSmooth;
+ irr::video::ITexture *crosshair;
};
#endif // FIREUNIT_HPP
diff --git a/src/FlaSimApp.cpp b/src/FlaSimApp.cpp
index fbbad27..3e43272 100644
--- a/src/FlaSimApp.cpp
+++ b/src/FlaSimApp.cpp
@@ -49,6 +49,7 @@ void FlaSimApp::execute()
drv->beginScene(true, true, SColor(255, 128, 128, 128));
sman->drawAll();
drawScreenSpace();
+ fireUnit.draw();
drv->endScene();
}
}
diff --git a/src/TurretCamAnimator.cpp b/src/TurretCamAnimator.cpp
index e68e34c..a3c8cab 100644
--- a/src/TurretCamAnimator.cpp
+++ b/src/TurretCamAnimator.cpp
@@ -25,7 +25,7 @@ void TurretCamAnimator::animateNode(scene::ISceneNode* node, u32)
absTrans.rotateVect(nodeUpVector, core::vector3df(0.f, 1.f, 0.f));
absTrans.transformVect(nodeTarget, core::vector3df(0.f, 0.f, 100.f));
- node->setPosition(parent->getAbsolutePosition() + core::vector3df(0.f, 1.65f, 0.f));
+ node->setPosition(parent->getAbsolutePosition() + core::vector3df(0.f, 1.75f, 0.f));
if (node->getType() == scene::ESNT_CAMERA)
{
static_cast(node)->setUpVector(nodeUpVector);