[nostalgia] Move much of the OpenGL code to glutils

This commit is contained in:
2021-10-29 00:57:59 -05:00
parent 51f3c01c4e
commit 45d79e99e8
6 changed files with 99 additions and 66 deletions
+1 -7
View File
@@ -6,19 +6,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <ox/claw/claw.hpp>
#include <nostalgia/core/gfx.hpp>
#include <nostalgia/core/media.hpp>
#include "gfx.hpp"
namespace nostalgia::core {
template<typename T>
static ox::Result<T> readObj(Context *ctx, const ox::FileAddress &file) noexcept {
oxRequire(buff, ctx->rom->read(file));
return ox::readClaw<T>(buff);
}
ox::Error initConsole(Context *ctx) noexcept {
constexpr auto TilesheetAddr = "/TileSheets/Charset.ng";
constexpr auto PaletteAddr = "/Palettes/Charset.npal";