...............................................Anm2Ed 2.0
This commit is contained in:
+4
-13
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user