Commit f301b4d1 authored by Al's avatar Al

blb button added

+ lots of good stuff
parent 0ea5181c
#include "BottomLeftBack.h"
BottomLeftBack::BottomLeftBack(std::shared_ptr<Surface> sheet)
:
HUDElement(sheet)
{
scale = 0.11f;
pos = Vec2(0.85f, -0.7f);
};
#pragma once
#include "HUDElement.h"
class BottomLeftBack :public HUDElement
{
public:
BottomLeftBack(std::shared_ptr<Surface>sheet);
};
\ No newline at end of file
......@@ -153,6 +153,7 @@
</FxCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="BottomLeftBack.h" />
<ClInclude Include="HUDEffectChromKeyed.h" />
<ClInclude Include="LevelMap.h" />
<ClInclude Include="MainMenuHolder.h" />
......@@ -260,6 +261,7 @@
<ClCompile Include="ABox.cpp" />
<ClCompile Include="ABoxSupporter.cpp" />
<ClCompile Include="ActionBox.cpp" />
<ClCompile Include="BottomLeftBack.cpp" />
<ClCompile Include="CombatEntityManager.cpp" />
<ClCompile Include="CombatManager.cpp" />
<ClCompile Include="CombatTimers.cpp" />
......
......@@ -369,6 +369,9 @@
<ClInclude Include="MainMenuHolder.h">
<Filter>Header Files\HUDs</Filter>
</ClInclude>
<ClInclude Include="BottomLeftBack.h">
<Filter>Header Files\HUDs</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Game.cpp">
......@@ -491,6 +494,9 @@
<ClCompile Include="Menu.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BottomLeftBack.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="FramebufferPS.hlsl">
......
......@@ -11,7 +11,7 @@
#include"./Framework/Plane.h"
#include "ActionBox.h"
#include "SkillStuff/Skill.h"
#include "BottomLeftBack.h"
#include "Menu.h" //these both should be used
#include "CombatManager.h"
......@@ -24,11 +24,13 @@ HUD::HUD(Menu& menu) //will require a major rework to support any number of
sharedSurfaces.push_back(std::make_shared<Surface>(L"Media\\Sprites\\pm_SkillSheet.png"));
sharedSurfaces.push_back(std::make_shared<Surface>(L"Media\\Sprites\\pm_Cell.png"));
TopPanel panel;
ABox abox;
ABoxSupporter absup;
MainMenuHolder mmh;
elements.reserve(40);
for (int i = 0;i< 4;i++) //10 places are reseved foe skills
{ //these 4 are used
......@@ -52,9 +54,10 @@ HUD::HUD(Menu& menu) //will require a major rework to support any number of
TabDraw td = TabDraw(sharedSurfaces[0], mmh.tabsPos[i],0.18f); //put sprite here
td.SetModel(std::move(Plane::GetStrachedSkinnedFromSheet<HUDEffect::Vertex>(sharedSurfaces[0].get(), 7, 1, 0)));
elements.emplace_back(std::wstring(L"menuTab") += i, std::move(td));
}
BottomLeftBack blb(sharedSurfaces[1]);
blb.SetModel(std::move(Plane::GetStrachedSkinned<HUDEffect::Vertex>(sharedSurfaces[1].get())));
elements.emplace_back(L"BottomLeftBack", blb); //18
}
const std::vector<std::pair<std::wstring, HUDElement>> HUD::GetHudElements()const
......@@ -92,7 +95,7 @@ const std::vector<std::pair<std::wstring, HUDElement>> HUD::GetHudElements()co
temp.push_back(elements[10]);
temp.push_back(elements[11]);
temp.push_back(elements[12]);
}
} else
if (menu.GetMenuState() == Menu::MenuState::Main)
{
temp.push_back(elements[13]);
......@@ -124,9 +127,12 @@ const std::vector<std::pair<std::wstring, HUDElement>> HUD::GetHudElements()co
}
}
} else
if (menu.GetMenuState() == Menu::MenuState::Achivements)
{
temp.push_back(elements[18]);
TDU::DrawString("D", elements[18].second.GetPosition() + Vec2(0.01f, -0.016f), Colors::Black, 0.023f);
TDU::DrawString("D", elements[18].second.GetPosition() + Vec2(0.01f, -0.016f), Colors::Green, 0.02f);
//screen with fucking achievements
// 'D' - back button
}
......
......@@ -3,15 +3,15 @@
std::vector<Vec2> MainMenuHolder::tabsPos;
MainMenuHolder::MainMenuHolder()
:
HUDElement(std::wstring(L"Media\\Sprites\\MainMenuHolder.png"))
HUDElement(std::wstring(L"Media\\Sprites\\pm_MainMenuHolder.png"))
{
model = Plane::GetStrachedSkinned<HUDEffect::Vertex>(pTex);
scale = 0.6f;
scale = 0.624f;
pos = Vec2(0.0f, 0.0f);
tabsPos.push_back({ 0.0f,0.35f });
tabsPos.push_back({ -0.4f,-0.3f });
tabsPos.push_back({ 0.0f,-0.3f });
tabsPos.push_back({ 0.38f,-0.3f });
tabsPos.push_back({ -0.011f,0.37f });
tabsPos.push_back({ -0.395f,-0.34f });
tabsPos.push_back({ -0.011f,-0.34f });
tabsPos.push_back({ 0.395f,-0.34f });
}
TabDraw::TabDraw(std::shared_ptr<Surface> sheet, Vec2 in_pos, float in_scale)
......
......@@ -131,7 +131,7 @@ private:
std::vector<Vec3>lightColors;
std::vector<Vec4>lightPositions;
std::vector<TextDrawingUnit::Letter>lettersToDraw;
Vec3 l_ambient = { 0.15f,0.055f,0.045f };
Vec3 l_ambient = { 0.12f,0.05f,0.04f };
LightFlickerer LightFlickerer;
......
......@@ -8,15 +8,15 @@
struct WallPointDiffuseParams
{
static constexpr float linear_attenuation = 0.9f;
static constexpr float quadradic_attenuation = 0.6f;
static constexpr float constant_attenuation = 0.682f;
static constexpr float quadradic_attenuation = 0.55f;
static constexpr float linear_attenuation = 0.5f;
static constexpr float constant_attenuation = 1.0f;
};
struct ParticlePointDiffuseParams
{
static constexpr float linear_attenuation = 4.0f;
static constexpr float quadradic_attenuation = 2.1f;
static constexpr float constant_attenuation = 1.1f;
static constexpr float quadradic_attenuation = 0.16f;
static constexpr float linear_attenuation = 4.5f;
static constexpr float constant_attenuation = 1.0f;
};
// flat shading with vertex normals
template<class Diffuse>
......@@ -138,7 +138,7 @@ public:
const auto attenuation = 1.0f /
(Diffuse::constant_attenuation + Diffuse::linear_attenuation * dist * Diffuse::quadradic_attenuation * sq(dist));
// calculate intensity based on angle of incidence and attenuation
d += light_diffuse[i] * attenuation * (std::max)(0.0f, static_cast<Vec3&>(Vec4(v.n, 0.0f) * worldView) * dir);
d += (light_diffuse[i] * attenuation * (std::max)(0.0f, static_cast<Vec3&>(Vec4(v.n, 0.0f) * worldView) * dir));
}
// add diffuse+ambient, filter by material color, saturate and scale
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment