...............................................Anm2Ed 2.0

This commit is contained in:
2025-11-13 22:29:27 -05:00
parent 9af0135a3a
commit 352594e1e3
6 changed files with 22 additions and 37 deletions
+4 -13
View File
@@ -1,6 +1,6 @@
#include "resources.h"
#include <cstddef>
#include <ranges>
#include "music.h"
@@ -10,23 +10,14 @@ namespace anm2ed
{
Resources::Resources()
{
for (std::size_t i = 0; i < font::COUNT; ++i)
{
const auto& fontInfo = font::FONTS[i];
for (auto [i, fontInfo] : std::views::enumerate(font::FONTS))
fonts[i] = Font((void*)fontInfo.data, fontInfo.length, font::SIZE);
}
for (std::size_t i = 0; i < icon::COUNT; ++i)
{
const auto& iconInfo = icon::ICONS[i];
for (auto [i, iconInfo] : std::views::enumerate(icon::ICONS))
icons[i] = Texture(iconInfo.data, iconInfo.length, iconInfo.size);
}
for (std::size_t i = 0; i < shader::COUNT; ++i)
{
const auto& shaderInfo = shader::SHADERS[i];
for (auto [i, shaderInfo] : std::views::enumerate(shader::SHADERS))
shaders[i] = Shader(shaderInfo.vertex, shaderInfo.fragment);
}
};
resource::Audio& Resources::music_track()