|
@@ -56,6 +56,10 @@ void IngameState::init()
|
|
|
|
|
|
_foreground.create("data/background/Foreground.jpg", "data/background/Foreground_normal.jpg", "data/background/75pxjitter03.png");
|
|
|
_context->foreground = &_foreground;
|
|
|
+ _spike.create("data/background/Foreground.jpg", "data/background/Foreground_normal.jpg", "data/background/Spikes16px.png");
|
|
|
+ _spike.setResolution(sf::Vector2u(0, 0));
|
|
|
+ _spike.move(sf::Vector2f(1020, 2310));
|
|
|
+ _spike.rotate(332.f);
|
|
|
|
|
|
_background.setTextureRect(sf::IntRect(0, 0, _foreground.getSize().x, _foreground.getSize().y));
|
|
|
|
|
@@ -201,8 +205,8 @@ void IngameState::coreUpdate(sf::Time delta)
|
|
|
oss.clear();
|
|
|
oss << "Hull: " << int(_player.getHullLeft()) << "%";
|
|
|
_statsHull.setString(oss.str());
|
|
|
- _statsTime.setOrigin(_statsTime.getLocalBounds().width / 2.f, _statsTime.getLocalBounds().height / 2.f);
|
|
|
- _statsHull.setOrigin(_statsTime.getLocalBounds().width / 2.f, _statsTime.getLocalBounds().height + _statsHull.getLocalBounds().height / 2.f + 30.f);
|
|
|
+ _statsTime.setOrigin(_statsTime.getLocalBounds().width / 2.f, _statsTime.getLocalBounds().height / 2.f - 30.f);
|
|
|
+ _statsHull.setOrigin(_statsTime.getLocalBounds().width / 2.f, _statsTime.getLocalBounds().height + _statsHull.getLocalBounds().height / 2.f);
|
|
|
_dotaSound.play();
|
|
|
}
|
|
|
|
|
@@ -263,14 +267,18 @@ void IngameState::coreRender(const bool shaders)
|
|
|
|
|
|
|
|
|
_foreground.renderNormals(true);
|
|
|
+ _spike.renderNormals(true);
|
|
|
_lightSystem.normalsTargetSetView(*_camera.getView());
|
|
|
_lightSystem.normalsTargetClear();
|
|
|
+ _lightSystem.normalsTargetDraw(_spike);
|
|
|
_lightSystem.normalsTargetDraw(_foreground);
|
|
|
_lightSystem.normalsTargetDisplay();
|
|
|
_lightSystem.render(*_camera.getView(), _unshadowShader, _lightOverShapeShader, _normalsShader);
|
|
|
|
|
|
|
|
|
_foreground.renderNormals(false);
|
|
|
+ _spike.renderNormals(false);
|
|
|
+ _context->window->draw(_spike);
|
|
|
_context->window->draw(_foreground);
|
|
|
_context->window->draw(_wormhole);
|
|
|
_context->window->draw(_player);
|