Add color class
Add Palladium Unique and Shared defs Make stb_image an internal dependency Start some work on font loader
This commit is contained in:
@@ -33,8 +33,8 @@ void Iron::Drawlist::Clear() {
|
||||
pLayer = 0;
|
||||
}
|
||||
|
||||
Iron::Command::ref Iron::Drawlist::NewCommand() {
|
||||
auto ret = std::make_unique<Command>();
|
||||
Iron::Command::Ref Iron::Drawlist::NewCommand() {
|
||||
auto ret = Command::New();
|
||||
ret->Layer = pLayer;
|
||||
ret->Index = pData.size();
|
||||
ret->Tex = pTex;
|
||||
@@ -48,7 +48,7 @@ void Iron::Drawlist::clipCmd(Command* ptr) {
|
||||
}
|
||||
}
|
||||
|
||||
void Iron::Drawlist::Push(Command::ref cmd) { pData.push_back(std::move(cmd)); }
|
||||
void Iron::Drawlist::Push(Command::Ref cmd) { pData.push_back(std::move(cmd)); }
|
||||
|
||||
void Iron::Drawlist::DrawSolid() { pTex = Iron::WhiteTex(); }
|
||||
|
||||
|
||||
24
source/iron/font.cpp
Normal file
24
source/iron/font.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <amethyst/iron.hpp>
|
||||
|
||||
namespace Amy {
|
||||
void Iron::Font::LoadBMF(ksr path) {}
|
||||
|
||||
void Iron::Font::LoadTTF(ksr path, int size) {}
|
||||
|
||||
void Iron::Font::pMakeAtlas(bool final, vec<uc>& font_tex, int texszs,
|
||||
Texture* tex) {
|
||||
tex->Load(font_tex, texszs, texszs);
|
||||
Textures.push_back(tex);
|
||||
}
|
||||
|
||||
Iron::Font::Codepoint& Iron::Font::GetCodepoint(ui cp) {
|
||||
// Check if codepoijt exist or return a static invalid one
|
||||
auto res = pCodeMap.find(cp);
|
||||
if (res == pCodeMap.end()) {
|
||||
static Codepoint invalid;
|
||||
invalid.Valid = false;
|
||||
return invalid;
|
||||
}
|
||||
return res->second;
|
||||
}
|
||||
} // namespace Amy
|
||||
@@ -83,7 +83,7 @@ void Iron::DrawOn(C3D::Screen* screen) {
|
||||
m_shader->SetMat4(uLocProj, m_mtx);
|
||||
}
|
||||
|
||||
void Iron::Draw(const std::vector<Iron::Command::ref>& data) {
|
||||
void Iron::Draw(const std::vector<Iron::Command::Ref>& data) {
|
||||
// disable depthtest cause we have no z buffer
|
||||
C3D::DepthTest(false);
|
||||
pFragConfig();
|
||||
|
||||
Reference in New Issue
Block a user