Compare commits

..

No commits in common. "9d1155843e80762c96fb2b85dfeaef762a24b943" and "643f95ec80ff964f864a60a840d20cb329ad47da" have entirely different histories.

7 changed files with 29 additions and 18 deletions

View File

@ -5,13 +5,14 @@ BUILDCORE_PATH=deps/buildcore
include ${BUILDCORE_PATH}/base.mk
ifeq ($(BC_VAR_OS),darwin)
PROJECT_STUDIO=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}Studio.app/Contents/MacOS/${BC_VAR_PROJECT_NAME_CAP}Studio
PROJECT_PLAYER=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME}.app/Contents/MacOS/${BC_VAR_PROJECT_NAME}
NOSTALGIA_STUDIO=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}Studio.app/Contents/MacOS/${BC_VAR_PROJECT_NAME_CAP}Studio
MGBA=/Applications/mGBA.app/Contents/MacOS/mGBA
else
PROJECT_STUDIO=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}Studio
PROJECT_PLAYER=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME}
NOSTALGIA_STUDIO=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}Studio
MGBA=mgba-qt
endif
PROJECT_PLAYER=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}
.PHONY: pkg-gba
pkg-gba: build
@ -19,13 +20,13 @@ pkg-gba: build
.PHONY: build-player
build-player:
${BC_CMD_CMAKE_BUILD} ${BC_VAR_BUILD_PATH} ${BC_VAR_PROJECT_NAME_CAP}
${BC_CMD_CMAKE_BUILD} ${BC_VAR_BUILD_PATH} ${BC_VAR_PROJECT_NAME}
.PHONY: run
run: build-player
${PROJECT_PLAYER} sample_project
.PHONY: run-studio
run-studio: build
${PROJECT_STUDIO}
${NOSTALGIA_STUDIO}
.PHONY: gba-run
gba-run: pkg-gba
${MGBA} ${BC_VAR_PROJECT_NAME}.gba
@ -34,7 +35,7 @@ debug: build
${BC_CMD_HOST_DEBUGGER} ./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME} sample_project
.PHONY: debug-studio
debug-studio: build
${BC_CMD_HOST_DEBUGGER} ${PROJECT_STUDIO}
${BC_CMD_HOST_DEBUGGER} ${NOSTALGIA_STUDIO}
.PHONY: configure-gba
configure-gba:

View File

@ -58,9 +58,9 @@ class AnyPtrT {
template<typename T>
constexpr AnyPtrT(T *ptr) noexcept {
if (std::is_constant_evaluated()) {
m_wrapPtr = new Wrap<T>(ptr);
m_wrapPtr = new Wrap(ptr);
} else {
m_wrapPtr = new(m_wrapData.data()) Wrap<T>(ptr);
m_wrapPtr = new(m_wrapData.data()) Wrap(ptr);
}
}

View File

@ -1,26 +1,26 @@
add_executable(
Nostalgia WIN32
nostalgia WIN32
app.cpp
)
# enable LTO
if(NOT WIN32)
set_property(TARGET Nostalgia PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
set_property(TARGET nostalgia PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
if(COMMAND OBJCOPY_FILE)
set_target_properties(Nostalgia
set_target_properties(nostalgia
PROPERTIES
LINK_FLAGS ${LINKER_FLAGS}
COMPILER_FLAGS "-mthumb -mthumb-interwork"
)
OBJCOPY_FILE(Nostalgia)
#PADBIN_FILE(Nostalgia)
OBJCOPY_FILE(nostalgia)
#PADBIN_FILE(nostalgia)
endif()
target_link_libraries(
Nostalgia
nostalgia
NostalgiaKeelModules
NostalgiaProfile
OlympicApplib
@ -29,7 +29,7 @@ target_link_libraries(
install(
TARGETS
Nostalgia
nostalgia
DESTINATION
bin
)

View File

@ -0,0 +1,8 @@
/*
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#include <ox/std/memory.hpp>
#include <ox/fs/fs.hpp>
typename ox::Error run(ox::UniquePtr<ox::FileSystem> &&fs) noexcept;

View File

@ -8,7 +8,8 @@
namespace studio {
DeleteConfirmation::DeleteConfirmation() noexcept {
DeleteConfirmation::DeleteConfirmation(StudioContext &ctx) noexcept:
m_ctx{ctx} {
setTitle("Delete Item");
}

View File

@ -21,11 +21,12 @@ class DeleteConfirmation final: public Popup {
Stage m_stage = Stage::Closed;
bool m_open{};
ox::String m_path;
StudioContext &m_ctx;
public:
ox::Signal<ox::Error(ox::StringViewCR path)> deleteFile;
DeleteConfirmation() noexcept;
DeleteConfirmation(StudioContext &ctx) noexcept;
void openPath(ox::StringViewCR path) noexcept;

View File

@ -40,7 +40,7 @@ class StudioUI: public ox::SignalHandler {
BaseEditor *m_activeEditor = nullptr;
BaseEditor *m_activeEditorUpdatePending = nullptr;
NewMenu m_newMenu;
DeleteConfirmation m_deleteConfirmation;
DeleteConfirmation m_deleteConfirmation{m_sctx};
NewProject m_newProject;
AboutPopup m_aboutPopup;
ox::Array<Popup*, 4> const m_popups = {