[nostalgia/core/userland] Cleanup

This commit is contained in:
Gary Talent 2021-03-17 21:45:34 -05:00
parent be3caf1818
commit dc1ead2af4
3 changed files with 11 additions and 7 deletions

View File

@ -70,4 +70,10 @@ ox::Error loadBgTileSheet(Context *ctx,
return renderer::loadBgTexture(ctx, section, pixels.data(), width, height);
}
void puts(Context *ctx, int column, int row, const char *str) {
for (int i = 0; str[i]; ++i) {
setTile(ctx, 0, column + i, row, static_cast<uint8_t>(charMap[static_cast<int>(str[i])]));
}
}
}

View File

@ -216,12 +216,6 @@ void draw(Context *ctx) {
}
}
void puts(Context *ctx, int column, int row, const char *str) {
for (int i = 0; str[i]; ++i) {
setTile(ctx, 0, column + i, row, static_cast<uint8_t>(charMap[static_cast<int>(str[i])]));
}
}
void clearTileLayer(Context *ctx, int layer) {
const auto id = ctx->rendererData<renderer::GlImplData>();
auto bg = id->backgrounds[static_cast<std::size_t>(layer)];

View File

@ -21,7 +21,11 @@ struct Texture {
GLuint width = 0;
GLuint height = 0;
constexpr operator GLuint() const noexcept {
constexpr operator GLuint&() noexcept {
return texId;
}
constexpr operator const GLuint&() const noexcept {
return texId;
}