move struct snes_palette to base
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
#define YAZE_APP_GFX_PALETTE_H
|
#define YAZE_APP_GFX_PALETTE_H
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include "imgui/imgui.h"
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
@@ -16,6 +15,8 @@
|
|||||||
#include "absl/status/statusor.h"
|
#include "absl/status/statusor.h"
|
||||||
#include "app/core/constants.h"
|
#include "app/core/constants.h"
|
||||||
#include "app/gfx/snes_color.h"
|
#include "app/gfx/snes_color.h"
|
||||||
|
#include "base/snes_color.h"
|
||||||
|
#include "imgui/imgui.h"
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace app {
|
namespace app {
|
||||||
@@ -88,16 +89,6 @@ constexpr int customAreaSpecificBGASM = 0x140150;
|
|||||||
// 1 byte, not 0 if enabled
|
// 1 byte, not 0 if enabled
|
||||||
constexpr int customAreaSpecificBGEnabled = 0x140140;
|
constexpr int customAreaSpecificBGEnabled = 0x140140;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Primitive of a SNES color palette.
|
|
||||||
*/
|
|
||||||
struct snes_palette {
|
|
||||||
uint id; /**< ID of the palette. */
|
|
||||||
uint size; /**< Size of the palette. */
|
|
||||||
snes_color* colors; /**< Pointer to the colors in the palette. */
|
|
||||||
};
|
|
||||||
using snes_palette = struct snes_palette;
|
|
||||||
|
|
||||||
uint32_t GetPaletteAddress(const std::string& group_name, size_t palette_index,
|
uint32_t GetPaletteAddress(const std::string& group_name, size_t palette_index,
|
||||||
size_t color_index);
|
size_t color_index);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef YAZE_BASE_SNES_COLOR_H_
|
#ifndef YAZE_BASE_SNES_COLOR_H_
|
||||||
#define YAZE_BASE_SNES_COLOR_H_
|
#define YAZE_BASE_SNES_COLOR_H_
|
||||||
|
|
||||||
#include <cstdint>
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -17,6 +17,16 @@ struct snes_color {
|
|||||||
};
|
};
|
||||||
typedef struct snes_color snes_color;
|
typedef struct snes_color snes_color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Primitive of a SNES color palette.
|
||||||
|
*/
|
||||||
|
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. */
|
||||||
|
};
|
||||||
|
using snes_palette = struct snes_palette;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ using ::testing::ElementsAreArray;
|
|||||||
using yaze::app::gfx::ConvertRGBtoSNES;
|
using yaze::app::gfx::ConvertRGBtoSNES;
|
||||||
using yaze::app::gfx::ConvertSNEStoRGB;
|
using yaze::app::gfx::ConvertSNEStoRGB;
|
||||||
using yaze::app::gfx::Extract;
|
using yaze::app::gfx::Extract;
|
||||||
using yaze::app::gfx::snes_palette;
|
|
||||||
using yaze::app::gfx::SnesPalette;
|
using yaze::app::gfx::SnesPalette;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
Reference in New Issue
Block a user