Refactor yaze.h and project.h to remove unused project structure and update ROM size type for improved memory handling
This commit is contained in:
13
incl/yaze.h
13
incl/yaze.h
@@ -11,11 +11,8 @@ extern "C" {
|
|||||||
|
|
||||||
#include "zelda.h"
|
#include "zelda.h"
|
||||||
|
|
||||||
typedef struct yaze_project yaze_project;
|
|
||||||
|
|
||||||
typedef struct yaze_editor_context {
|
typedef struct yaze_editor_context {
|
||||||
zelda3_rom* rom;
|
zelda3_rom* rom;
|
||||||
yaze_project* project;
|
|
||||||
const char* error_message;
|
const char* error_message;
|
||||||
} yaze_editor_context;
|
} yaze_editor_context;
|
||||||
|
|
||||||
@@ -28,17 +25,9 @@ typedef enum yaze_status {
|
|||||||
int yaze_app_main(int argc, char** argv);
|
int yaze_app_main(int argc, char** argv);
|
||||||
void yaze_check_version(const char* version);
|
void yaze_check_version(const char* version);
|
||||||
|
|
||||||
yaze_status yaze_init(yaze_editor_context*);
|
yaze_status yaze_init(yaze_editor_context*, char* rom_filename);
|
||||||
yaze_status yaze_shutdown(yaze_editor_context*);
|
yaze_status yaze_shutdown(yaze_editor_context*);
|
||||||
|
|
||||||
struct yaze_project {
|
|
||||||
const char* name;
|
|
||||||
const char* filepath;
|
|
||||||
const char* rom_filename;
|
|
||||||
};
|
|
||||||
|
|
||||||
yaze_project yaze_load_project(const char* filename);
|
|
||||||
|
|
||||||
typedef struct yaze_bitmap {
|
typedef struct yaze_bitmap {
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ const static zelda3_version_pointers zelda3_jp_pointers = {
|
|||||||
typedef struct zelda3_rom {
|
typedef struct zelda3_rom {
|
||||||
const char* filename;
|
const char* filename;
|
||||||
uint8_t* data;
|
uint8_t* data;
|
||||||
size_t size;
|
uint64_t size;
|
||||||
void* impl; // yaze::Rom*
|
void* impl; // yaze::Rom*
|
||||||
} zelda3_rom;
|
} zelda3_rom;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "absl/status/status.h"
|
#include "absl/status/status.h"
|
||||||
#include "app/core/platform/file_dialog.h"
|
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user