From 8c13ef3e230753a7e55c3bf0d3e2160b26a707ea Mon Sep 17 00:00:00 2001 From: scawful Date: Wed, 7 Aug 2024 01:21:52 -0400 Subject: [PATCH] housekeeping --- src/app/core/constants.h | 5 +++-- src/app/core/platform/file_dialog.mm | 16 +++++++--------- src/app/rom.h | 1 - src/ext/extension.cc | 2 +- src/yaze.h | 8 +++++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app/core/constants.h b/src/app/core/constants.h index ce96be82..4f47f31e 100644 --- a/src/app/core/constants.h +++ b/src/app/core/constants.h @@ -123,6 +123,9 @@ using uint = unsigned int; using uchar = unsigned char; using Bytes = std::vector; +namespace yaze { +namespace app { + using OWBlockset = std::vector>; struct OWMapTiles { OWBlockset light_world; // 64 maps @@ -131,8 +134,6 @@ struct OWMapTiles { }; using OWMapTiles = struct OWMapTiles; -namespace yaze { -namespace app { namespace core { constexpr uint32_t kRedPen = 0xFF0000FF; diff --git a/src/app/core/platform/file_dialog.mm b/src/app/core/platform/file_dialog.mm index e73a2fce..808f4260 100644 --- a/src/app/core/platform/file_dialog.mm +++ b/src/app/core/platform/file_dialog.mm @@ -30,23 +30,21 @@ void ShowOpenFileDialogImpl(void (^completionHandler)(std::string)) { std::string ShowOpenFileDialogSync() { __block std::string result; - + ShowOpenFileDialogImpl(^(std::string filePath) { result = filePath; }); - - // Check if the documentPicker is done -// while (result.empty()) { -// [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; -// } + + // Check if the documentPicker is done + // while (result.empty()) { + // [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; + // } return result; } } -std::string FileDialogWrapper::ShowOpenFileDialog() { - return ShowOpenFileDialogSync(); -} +std::string FileDialogWrapper::ShowOpenFileDialog() { return ShowOpenFileDialogSync(); } std::string FileDialogWrapper::ShowOpenFolderDialog() { return ""; } diff --git a/src/app/rom.h b/src/app/rom.h index 20544cab..111be3c4 100644 --- a/src/app/rom.h +++ b/src/app/rom.h @@ -441,7 +441,6 @@ class Rom : public core::ExperimentFlags { auto begin() { return rom_data_.begin(); } auto end() { return rom_data_.end(); } auto data() { return rom_data_.data(); } - auto push_back(uint8_t byte) { rom_data_.push_back(byte); } auto vector() const { return rom_data_; } auto filename() const { return filename_; } auto is_loaded() const { return is_loaded_; } diff --git a/src/ext/extension.cc b/src/ext/extension.cc index cbd6c0e8..327796bf 100644 --- a/src/ext/extension.cc +++ b/src/ext/extension.cc @@ -10,7 +10,7 @@ Extension* extension = nullptr; Extension* GetExtension() { return nullptr; } -void loadCExtension(const char* extensionPath) { +void LoadCExtension(const char* extensionPath) { handle = dlopen(extensionPath, RTLD_LAZY); if (!handle) { std::cerr << "Cannot open extension: " << dlerror() << std::endl; diff --git a/src/yaze.h b/src/yaze.h index 79052f8e..95abc69b 100644 --- a/src/yaze.h +++ b/src/yaze.h @@ -1,13 +1,15 @@ #ifndef YAZE_H #define YAZE_H -#include -#include - #ifdef __cplusplus extern "C" { #endif +#include +#include + +#include "base/snes_color.h" + void yaze_initialize(void); void yaze_cleanup(void);