yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze.h
Go to the documentation of this file.
1#ifndef YAZE_H
2#define YAZE_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stddef.h>
9#include <stdint.h>
10
11#include "dungeon.h"
12#include "overworld.h"
13#include "snes_color.h"
14#include "sprite.h"
15
16typedef struct z3_rom z3_rom;
17
21
32
37
42
47 const char* name;
48 const char* filepath;
49 const char* rom_filename;
50 const char* code_folder;
51 const char* labels_filename;
52};
53
54yaze_project yaze_load_project(const char* filename);
55
59struct z3_rom {
60 const char* filename;
61 const uint8_t* data;
62 size_t size;
63 void* impl; // yaze::app::Rom*
64};
65
69z3_rom* yaze_load_rom(const char* filename);
70
74void yaze_unload_rom(z3_rom* rom);
75
79typedef struct yaze_bitmap {
80 int width;
81 int height;
82 uint8_t bpp;
83 uint8_t* data;
85
89yaze_bitmap yaze_load_bitmap(const char* filename);
90
94snes_color yaze_get_color_from_paletteset(const z3_rom* rom, int palette_set,
95 int palette, int color);
96
101
105void yaze_check_version(const char* version);
106
111 void (*register_command)(const char* name, void (*command)(void));
112};
113
118 void (*register_event_hook)(void (*event_hook)(void));
119};
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif // YAZE_H
Primitive of 16-bit RGB SNES color.
Definition snes_color.h:13
Primitive of a Bitmap.
Definition yaze.h:79
uint8_t * data
Definition yaze.h:83
int height
Definition yaze.h:81
uint8_t bpp
Definition yaze.h:82
int width
Definition yaze.h:80
Command registry.
Definition yaze.h:110
void(* register_command)(const char *name, void(*command)(void))
Definition yaze.h:111
Extension editor context.
Definition yaze.h:25
yaze_project * project
Definition yaze.h:27
yaze_event_dispatcher * event_dispatcher
Definition yaze.h:30
yaze_command_registry * command_registry
Definition yaze.h:29
z3_rom * rom
Definition yaze.h:26
Event dispatcher.
Definition yaze.h:117
void(* register_event_hook)(void(*event_hook)(void))
Definition yaze.h:118
Primitive of a Yaze project.
Definition yaze.h:46
const char * code_folder
Definition yaze.h:50
const char * name
Definition yaze.h:47
const char * labels_filename
Definition yaze.h:51
const char * rom_filename
Definition yaze.h:49
const char * filepath
Definition yaze.h:48
Primitive of the overworld.
Definition overworld.h:33
Primitive of a Zelda3 ROM.
Definition yaze.h:59
const char * filename
Definition yaze.h:60
void * impl
Definition yaze.h:63
size_t size
Definition yaze.h:62
const uint8_t * data
Definition yaze.h:61
yaze_bitmap yaze_load_bitmap(const char *filename)
Load a bitmap from a file.
Definition yaze.cc:69
struct yaze_bitmap yaze_bitmap
Primitive of a Bitmap.
int yaze_init(yaze_editor_context *)
Initialize the Yaze library.
Definition yaze.cc:18
void yaze_unload_rom(z3_rom *rom)
Unload a Zelda3 ROM.
Definition yaze.cc:59
void yaze_check_version(const char *version)
Check the version of the Yaze library.
Definition yaze.cc:8
struct yaze_editor_context yaze_editor_context
Extension editor context.
z3_overworld * yaze_load_overworld(const z3_rom *rom)
Load the overworld from a Zelda3 ROM.
Definition yaze.cc:103
yaze_project yaze_load_project(const char *filename)
Definition yaze.cc:37
void yaze_cleanup(yaze_editor_context *)
Clean up the Yaze library.
Definition yaze.cc:31
z3_rom * yaze_load_rom(const char *filename)
Load a Zelda3 ROM from a file.
Definition yaze.cc:43
snes_color yaze_get_color_from_paletteset(const z3_rom *rom, int palette_set, int palette, int color)
Get a color from a palette set.
Definition yaze.cc:78