Commit 322d34b6 authored by AL's avatar AL

better text rendering!

finally!
parent ffcd1a13
......@@ -14,11 +14,11 @@ CombatManager::CombatManager()
keysForActionBoxes.push_back('A');
keysForActionBoxes.push_back('S');
keysForActionBoxes.push_back('D');
killcount = 0u;
}
void CombatManager::StartBattle(size_t enemyID)
{
killcount = 0u;
currentTurn = 0u;
returningToMenu = false;
playMan->BeginBattle();
......@@ -28,6 +28,7 @@ void CombatManager::StartBattle(size_t enemyID)
CombatManager::curTurn = Turn::Prefase;
turnAnnouncer.SetAnnouncment(TurnAnnouncer::AnnTurn::SpawningEnemy);
UpdateCombatData();
timers.Stop();
}
void CombatManager::EndBattle()
......@@ -40,6 +41,7 @@ void CombatManager::EndBattle()
timers.SetActiveTimer(CombatTimers::ActiveTimer::NoActive);
timers.Stop();
turnAnnouncer.SetAnnouncment(TurnAnnouncer::AnnTurn::Void);
killcount = 0u;
}
void CombatManager::StartPlayerTurn()
......@@ -535,9 +537,4 @@ void CombatManager::HandleEvent(SkillEvent ev)
bool CombatManager::GetRewardMenuActiveness() const
{
return rewardMenuIsActive;
}
void DrawIntent()
{
assert(false);
}
}
\ No newline at end of file
......@@ -248,6 +248,7 @@
<ClInclude Include="IntentIcons.h" />
<ClInclude Include="Mesh.h" />
<ClInclude Include="PressableMenu.h" />
<ClInclude Include="SceneLight.h" />
<ClInclude Include="SideButtons.h" />
<ClInclude Include="LevelMap.h" />
<ClInclude Include="Menu.h" />
......
......@@ -567,6 +567,9 @@
<ClInclude Include="PressableMenu.h">
<Filter>Header Files\HUDs</Filter>
</ClInclude>
<ClInclude Include="SceneLight.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Game.cpp">
......
......@@ -24,7 +24,7 @@ Letter::Letter(std::wstring fontSprite, DXGraphics& gfx, wchar_t letter)
float screenAspecrRatio = (float)gfx.GetScreenWidth() / (float)gfx.GetScreenHeight();
float totalAR = letterAspectRatio/screenAspecrRatio;
only.AddBindable(std::move(tex));
only.AddBindable(Bind::Sampler::Resolve(gfx)); //for filtering
//only.AddBindable(Bind::Sampler::Resolve(gfx)); //for filtering
Dvtx::VertexBuffer vbuf(std::move(
VertexLayout{}
......@@ -57,7 +57,7 @@ Letter::Letter(std::wstring fontSprite, DXGraphics& gfx, wchar_t letter)
pVertices = VertexBuffer::Resolve(gfx, meshTag, vbuf);
pIndices = IndexBuffer::Resolve(gfx, meshTag, indices);
pTopology = Topology::Resolve(gfx, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
only.AddBindable(Blender::Resolve(gfx, false));
only.AddBindable(Blender::Resolve(gfx, true));
only.AddBindable(std::make_shared<TextConstantBuffer>(gfx));
......
......@@ -25,9 +25,6 @@ Game::Game()
//gfx( wnd.GetHWND() ),
//scene(gfx,map,menu)
{
//cube.SetPos({ 4.0f,0.0f,0.0f });
//cube2.SetPos({ 0.0f,4.0f,0.0f });
//planeTN.SetPos({ 1.0f,1.0f,1.0f });
//TextDrawingUnit::Init();
//CombatManager::StartBattle(0);
wnd.DXGfx().SetCamera(dx::XMMatrixTranslation(8.0f, 7.0f, 3.0f));
......@@ -38,11 +35,6 @@ Game::Game()
int Game::Go()
{
while(true)
{
if (isExiting)break;
......@@ -85,10 +77,8 @@ int Game::Go()
wnd.DXGfx().SetCamera(cam.GetMatrix());
wnd.DXGfx().SetCamPos(cam.GetPosition());
light.Bind(wnd.DXGfx(), cam.GetMatrix());
// td.DrawString(L"popiga+rapiga", { -0.6f,0.5f }, Colors::Green, 0.039f);
light.Submit(fc);
hud.Submit();
//planeTN.Submit(fc);
ll.SubmitDrawables();
cm.Draw(wnd.DXGfx());
eh.SubmitAndUpdate(fc, dt);
......@@ -139,7 +129,7 @@ int Game::Go()
wnd.DXGfx().EndFrame();
td.EndFrame();
fc.Reset();
//ComposeFrame();
cm.UpdateCombatState(dt);
}
}
......
Engine/Media/Sprites/font.png

32.5 KB | W: | H:

Engine/Media/Sprites/font.png

17.5 KB | W: | H:

Engine/Media/Sprites/font.png
Engine/Media/Sprites/font.png
Engine/Media/Sprites/font.png
Engine/Media/Sprites/font.png
  • 2-up
  • Swipe
  • Onion skin
//#pragma once
//#include "Framework\PointLight.h"
//#include "Framework\PlaneTexNorm.h"
//
//class SceneLight
//{
// SceneLight(DXGraphics& gfx);
//
//
//private:
// PlaneTexNorm plane;
// PointLight pl;
//};
//
//{
//public:
// enum class Type
// {
// Wall,
// Floor,
// Ceiling
// };
// enum class Direction //the direction the wall facing
// {
// Left,
// Right,
// Forward,
// Backwards
// };
// enum class Model
// {
// StoneWall,
// StoneFloor,
// StoneCeiling,
// Last
// };
// void BindModelToPositions(std::vector<PositionData> * posData)
// {
// plane.BindPositionData(posData);
// }
// Wall(std::wstring modelName, DXGraphics & gfx) :
// plane(modelName, gfx)
// {}
// Wall(const Wall&) = default;
// Wall(Wall&&) = default;
// ~Wall() = default;
// void Submit(FrameCommander & fc) { plane.SmartSubmit(fc, Techniques::Standart); }
//private:
//
//};
\ No newline at end of file
......@@ -9,6 +9,6 @@ float4 main(float2 pos : Position, float2 tc : Texcoord) : SV_Target
float4 dtex = tex.Sample(splr, tc);
clip(dtex.a < 0.1f ? -1 : 1);
// final color
float4 f = { color, 1.0f };
float4 f = { color, dtex.a };
return f;
}
\ No newline at end of file
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