[nostalgia/studio] Start on ImGui version of Studio
This commit is contained in:
@@ -19,8 +19,7 @@ if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||
add_subdirectory(userland)
|
||||
endif()
|
||||
if(NOSTALGIA_BUILD_STUDIO)
|
||||
add_subdirectory(qt)
|
||||
add_subdirectory(studio)
|
||||
#add_subdirectory(studio)
|
||||
endif()
|
||||
|
||||
install(
|
||||
|
||||
@@ -28,7 +28,6 @@ constexpr uint16_t DispStat_irq_vcount = 1 << 5;
|
||||
|
||||
struct GbaPaletteTarget {
|
||||
static constexpr auto TypeName = NostalgiaPalette::TypeName;
|
||||
static constexpr auto Fields = NostalgiaPalette::Fields;
|
||||
static constexpr auto TypeVersion = NostalgiaPalette::TypeVersion;
|
||||
volatile uint16_t *palette = nullptr;
|
||||
};
|
||||
@@ -44,7 +43,7 @@ struct GbaTileMapTarget {
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept {
|
||||
constexpr ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept {
|
||||
io->template setTypeInfo<GbaPaletteTarget>();
|
||||
const auto colorHandler = [t](std::size_t i, Color16 *c) {
|
||||
t->palette[i] = *c;
|
||||
@@ -54,8 +53,8 @@ ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept {
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ox::Error modelRead(T *io, GbaTileMapTarget *t) noexcept {
|
||||
io->template setTypeInfo<GbaTileMapTarget>();
|
||||
constexpr ox::Error modelRead(T *io, GbaTileMapTarget *t) noexcept {
|
||||
io->template setTypeInfo<GbaTileMapTarget>(GbaTileMapTarget::TypeName, GbaTileMapTarget::Fields);
|
||||
uint8_t bpp;
|
||||
int dummy;
|
||||
oxReturnError(io->field("bpp", &bpp));
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
add_library(
|
||||
NostalgiaCore-Qt OBJECT
|
||||
gfx.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
NostalgiaCore-Qt PUBLIC
|
||||
NostalgiaStudio
|
||||
OxFS
|
||||
OxStd
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS
|
||||
NostalgiaCore-Qt
|
||||
LIBRARY DESTINATION
|
||||
${NOSTALGIA_DIST_LIB}/nostalgia
|
||||
)
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2016 - 2021 gary@drinkingtea.net
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include "../gfx.hpp"
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
||||
ox::Error initGfx(Context*) noexcept {
|
||||
return OxError(1);
|
||||
}
|
||||
|
||||
ox::Error shutdownGfx(Context*) noexcept {
|
||||
return OxError(1);
|
||||
}
|
||||
|
||||
ox::Error initConsole(Context*) noexcept {
|
||||
return OxError(1);
|
||||
}
|
||||
|
||||
ox::Error loadBgTileSheet(Context*,
|
||||
int,
|
||||
ox::FileAddress,
|
||||
ox::FileAddress) noexcept {
|
||||
return OxError(1);
|
||||
}
|
||||
|
||||
void puts(Context *ctx, int column, int row, const char *str) noexcept {
|
||||
for (int i = 0; str[i]; i++) {
|
||||
setTile(ctx, 0, column + i, row, static_cast<uint8_t>(charMap[static_cast<int>(str[i])]));
|
||||
}
|
||||
}
|
||||
|
||||
void setTile(Context*, int, int, int, uint8_t) noexcept {
|
||||
}
|
||||
|
||||
void setSprite(Context*, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned) noexcept {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user