Remove snes.h header file and migrate SNES-related structures to yaze.h for better organization; update includes in snes_color.h and snes_tile.h accordingly.
This commit is contained in:
58
incl/snes.h
58
incl/snes.h
@@ -1,58 +0,0 @@
|
||||
#ifndef YAZE_INCL_SNES_TILE_H
|
||||
#define YAZE_INCL_SNES_TILE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief Primitive of 16-bit RGB SNES color.
|
||||
*/
|
||||
typedef struct snes_color {
|
||||
uint16_t red; /**< Red component of the color. */
|
||||
uint16_t blue; /**< Blue component of the color. */
|
||||
uint16_t green; /**< Green component of the color. */
|
||||
} snes_color;
|
||||
|
||||
/**
|
||||
* @brief Primitive of a SNES color palette.
|
||||
*/
|
||||
typedef struct snes_palette {
|
||||
unsigned int id; /**< ID of the palette. */
|
||||
unsigned int size; /**< Size of the palette. */
|
||||
snes_color* colors; /**< Pointer to the colors in the palette. */
|
||||
} snes_palette;
|
||||
|
||||
typedef struct snes_tile8 {
|
||||
uint32_t id;
|
||||
uint32_t palette_id;
|
||||
uint8_t data[64];
|
||||
} snes_tile8;
|
||||
|
||||
typedef struct snes_tile_info {
|
||||
uint16_t id;
|
||||
uint8_t palette;
|
||||
bool priority;
|
||||
bool vertical_mirror;
|
||||
bool horizontal_mirror;
|
||||
} snes_tile_info;
|
||||
|
||||
typedef struct snes_tile16 {
|
||||
snes_tile_info tiles[4];
|
||||
} snes_tile16;
|
||||
|
||||
typedef struct snes_tile32 {
|
||||
uint16_t t0;
|
||||
uint16_t t1;
|
||||
uint16_t t2;
|
||||
uint16_t t3;
|
||||
} snes_tile32;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
45
incl/yaze.h
45
incl/yaze.h
@@ -5,10 +5,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "snes.h"
|
||||
#include "zelda.h"
|
||||
|
||||
typedef struct yaze_project yaze_project;
|
||||
@@ -50,6 +50,49 @@ typedef struct yaze_bitmap {
|
||||
|
||||
yaze_bitmap yaze_load_bitmap(const char* filename);
|
||||
|
||||
/**
|
||||
* @brief Primitive of 16-bit RGB SNES color.
|
||||
*/
|
||||
typedef struct snes_color {
|
||||
uint16_t red; /**< Red component of the color. */
|
||||
uint16_t blue; /**< Blue component of the color. */
|
||||
uint16_t green; /**< Green component of the color. */
|
||||
} snes_color;
|
||||
|
||||
/**
|
||||
* @brief Primitive of a SNES color palette.
|
||||
*/
|
||||
typedef struct snes_palette {
|
||||
unsigned int id; /**< ID of the palette. */
|
||||
unsigned int size; /**< Size of the palette. */
|
||||
snes_color* colors; /**< Pointer to the colors in the palette. */
|
||||
} snes_palette;
|
||||
|
||||
typedef struct snes_tile8 {
|
||||
uint32_t id;
|
||||
uint32_t palette_id;
|
||||
uint8_t data[64];
|
||||
} snes_tile8;
|
||||
|
||||
typedef struct snes_tile_info {
|
||||
uint16_t id;
|
||||
uint8_t palette;
|
||||
bool priority;
|
||||
bool vertical_mirror;
|
||||
bool horizontal_mirror;
|
||||
} snes_tile_info;
|
||||
|
||||
typedef struct snes_tile16 {
|
||||
snes_tile_info tiles[4];
|
||||
} snes_tile16;
|
||||
|
||||
typedef struct snes_tile32 {
|
||||
uint16_t t0;
|
||||
uint16_t t1;
|
||||
uint16_t t2;
|
||||
uint16_t t3;
|
||||
} snes_tile32;
|
||||
|
||||
snes_color yaze_get_color_from_paletteset(const zelda3_rom* rom,
|
||||
int palette_set, int palette,
|
||||
int color);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef YAZE_APP_GFX_SNES_COLOR_H_
|
||||
#define YAZE_APP_GFX_SNES_COLOR_H_
|
||||
|
||||
#include <snes.h>
|
||||
#include <yaze.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef YAZE_APP_GFX_SNES_TILE_H
|
||||
#define YAZE_APP_GFX_SNES_TILE_H
|
||||
|
||||
#include <snes.h>
|
||||
#include <yaze.h>
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
|
||||
Reference in New Issue
Block a user