housekeeping
This commit is contained in:
@@ -123,6 +123,9 @@ using uint = unsigned int;
|
|||||||
using uchar = unsigned char;
|
using uchar = unsigned char;
|
||||||
using Bytes = std::vector<uint8_t>;
|
using Bytes = std::vector<uint8_t>;
|
||||||
|
|
||||||
|
namespace yaze {
|
||||||
|
namespace app {
|
||||||
|
|
||||||
using OWBlockset = std::vector<std::vector<uint16_t>>;
|
using OWBlockset = std::vector<std::vector<uint16_t>>;
|
||||||
struct OWMapTiles {
|
struct OWMapTiles {
|
||||||
OWBlockset light_world; // 64 maps
|
OWBlockset light_world; // 64 maps
|
||||||
@@ -131,8 +134,6 @@ struct OWMapTiles {
|
|||||||
};
|
};
|
||||||
using OWMapTiles = struct OWMapTiles;
|
using OWMapTiles = struct OWMapTiles;
|
||||||
|
|
||||||
namespace yaze {
|
|
||||||
namespace app {
|
|
||||||
namespace core {
|
namespace core {
|
||||||
|
|
||||||
constexpr uint32_t kRedPen = 0xFF0000FF;
|
constexpr uint32_t kRedPen = 0xFF0000FF;
|
||||||
|
|||||||
@@ -30,23 +30,21 @@ void ShowOpenFileDialogImpl(void (^completionHandler)(std::string)) {
|
|||||||
|
|
||||||
std::string ShowOpenFileDialogSync() {
|
std::string ShowOpenFileDialogSync() {
|
||||||
__block std::string result;
|
__block std::string result;
|
||||||
|
|
||||||
ShowOpenFileDialogImpl(^(std::string filePath) {
|
ShowOpenFileDialogImpl(^(std::string filePath) {
|
||||||
result = filePath;
|
result = filePath;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Check if the documentPicker is done
|
// Check if the documentPicker is done
|
||||||
// while (result.empty()) {
|
// while (result.empty()) {
|
||||||
// [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
|
// [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string FileDialogWrapper::ShowOpenFileDialog() {
|
std::string FileDialogWrapper::ShowOpenFileDialog() { return ShowOpenFileDialogSync(); }
|
||||||
return ShowOpenFileDialogSync();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string FileDialogWrapper::ShowOpenFolderDialog() { return ""; }
|
std::string FileDialogWrapper::ShowOpenFolderDialog() { return ""; }
|
||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,6 @@ class Rom : public core::ExperimentFlags {
|
|||||||
auto begin() { return rom_data_.begin(); }
|
auto begin() { return rom_data_.begin(); }
|
||||||
auto end() { return rom_data_.end(); }
|
auto end() { return rom_data_.end(); }
|
||||||
auto data() { return rom_data_.data(); }
|
auto data() { return rom_data_.data(); }
|
||||||
auto push_back(uint8_t byte) { rom_data_.push_back(byte); }
|
|
||||||
auto vector() const { return rom_data_; }
|
auto vector() const { return rom_data_; }
|
||||||
auto filename() const { return filename_; }
|
auto filename() const { return filename_; }
|
||||||
auto is_loaded() const { return is_loaded_; }
|
auto is_loaded() const { return is_loaded_; }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Extension* extension = nullptr;
|
|||||||
|
|
||||||
Extension* GetExtension() { return nullptr; }
|
Extension* GetExtension() { return nullptr; }
|
||||||
|
|
||||||
void loadCExtension(const char* extensionPath) {
|
void LoadCExtension(const char* extensionPath) {
|
||||||
handle = dlopen(extensionPath, RTLD_LAZY);
|
handle = dlopen(extensionPath, RTLD_LAZY);
|
||||||
if (!handle) {
|
if (!handle) {
|
||||||
std::cerr << "Cannot open extension: " << dlerror() << std::endl;
|
std::cerr << "Cannot open extension: " << dlerror() << std::endl;
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
#ifndef YAZE_H
|
#ifndef YAZE_H
|
||||||
#define YAZE_H
|
#define YAZE_H
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "base/snes_color.h"
|
||||||
|
|
||||||
void yaze_initialize(void);
|
void yaze_initialize(void);
|
||||||
|
|
||||||
void yaze_cleanup(void);
|
void yaze_cleanup(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user