document yaze.h
This commit is contained in:
@@ -7,7 +7,7 @@ namespace yaze_test {
|
||||
TEST(YazeCLibTest, InitializeAndCleanup) {
|
||||
yaze_flags flags;
|
||||
yaze_init(&flags);
|
||||
yaze_cleanup();
|
||||
yaze_cleanup(&flags);
|
||||
}
|
||||
|
||||
} // namespace yaze_test
|
||||
40
src/yaze.h
40
src/yaze.h
@@ -12,12 +12,34 @@ extern "C" {
|
||||
#include "base/sprite.h"
|
||||
|
||||
typedef struct yaze_flags yaze_flags;
|
||||
typedef struct z3_rom z3_rom;
|
||||
|
||||
/**
|
||||
* @brief Flags to initialize the Yaze library.
|
||||
*/
|
||||
struct yaze_flags {
|
||||
int debug;
|
||||
const char* rom_filename;
|
||||
z3_rom* rom;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Initialize the Yaze library.
|
||||
*
|
||||
* @param flags Flags to initialize the library.
|
||||
*/
|
||||
void yaze_init(yaze_flags*);
|
||||
|
||||
/**
|
||||
* @brief Clean up the Yaze library.
|
||||
*
|
||||
* @param flags Flags used to initialize the library.
|
||||
*/
|
||||
void yaze_cleanup(yaze_flags*);
|
||||
|
||||
typedef struct z3_rom z3_rom;
|
||||
/**
|
||||
* @brief Primitive of a Zelda3 ROM.
|
||||
*/
|
||||
struct z3_rom {
|
||||
const char* filename;
|
||||
const uint8_t* data;
|
||||
@@ -25,15 +47,19 @@ struct z3_rom {
|
||||
void* impl; // yaze::app::Rom*
|
||||
};
|
||||
|
||||
struct yaze_flags {
|
||||
int debug;
|
||||
const char* rom_filename;
|
||||
z3_rom* rom;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Load a Zelda3 ROM from a file.
|
||||
*/
|
||||
z3_rom* yaze_load_rom(const char* filename);
|
||||
|
||||
/**
|
||||
* @brief Unload a Zelda3 ROM.
|
||||
*/
|
||||
void yaze_unload_rom(z3_rom* rom);
|
||||
|
||||
/**
|
||||
* @brief Get a color from a palette set.
|
||||
*/
|
||||
snes_color yaze_get_color_from_paletteset(const z3_rom* rom, int palette_set,
|
||||
int palette, int color);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user