yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
snes_palette.h File Reference
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "app/core/constants.h"
#include "app/gfx/snes_color.h"
#include "imgui/imgui.h"
Include dependency graph for snes_palette.h:

Go to the source code of this file.

Classes

class  yaze::app::gfx::SnesPalette
 Represents a palette of colors for the Super Nintendo Entertainment System (SNES). More...
 
struct  yaze::app::gfx::PaletteGroup
 Represents a group of palettes. More...
 
struct  yaze::app::gfx::PaletteGroupMap
 Represents a mapping of palette groups. More...
 
struct  yaze::app::gfx::Paletteset
 Represents a set of palettes used in a SNES graphics system. More...
 
class  yaze::app::GfxContext
 Shared graphical context across editors. More...
 

Namespaces

namespace  yaze
 
namespace  yaze::app
 Main namespace for the ImGui application.
 
namespace  yaze::app::gfx
 Contains classes for handling graphical data.
 

Enumerations

enum  yaze::app::gfx::PaletteCategory {
  yaze::app::gfx::kSword , yaze::app::gfx::kShield , yaze::app::gfx::kClothes , yaze::app::gfx::kWorldColors ,
  yaze::app::gfx::kAreaColors , yaze::app::gfx::kGlobalSprites , yaze::app::gfx::kSpritesAux1 , yaze::app::gfx::kSpritesAux2 ,
  yaze::app::gfx::kSpritesAux3 , yaze::app::gfx::kDungeons , yaze::app::gfx::kWorldMap , yaze::app::gfx::kDungeonMap ,
  yaze::app::gfx::kTriforce , yaze::app::gfx::kCrystal
}
 

Functions

uint32_t yaze::app::gfx::GetPaletteAddress (const std::string &group_name, size_t palette_index, size_t color_index)
 
SnesPalette yaze::app::gfx::ReadPaletteFromRom (int offset, int num_colors, const uint8_t *rom)
 
std::array< float, 4 > yaze::app::gfx::ToFloatArray (const SnesColor &color)
 
absl::StatusOr< PaletteGroupyaze::app::gfx::CreatePaletteGroupFromColFile (std::vector< SnesColor > &palette_rows)
 
absl::StatusOr< PaletteGroupyaze::app::gfx::CreatePaletteGroupFromLargePalette (SnesPalette &palette, int num_colors=8)
 Take a SNESPalette, divide it into palettes of 8 colors.
 
absl::Status yaze::app::gfx::LoadAllPalettes (const std::vector< uint8_t > &rom_data, PaletteGroupMap &groups)
 Loads all the palettes for the game.
 

Variables

constexpr int yaze::app::gfx::kNumPalettes = 14
 
constexpr const char * yaze::app::gfx::kPaletteGroupAddressesKeys []
 
constexpr int yaze::app::gfx::kOverworldPaletteMain = 0xDE6C8
 
constexpr int yaze::app::gfx::kOverworldPaletteAux = 0xDE86C
 
constexpr int yaze::app::gfx::kOverworldPaletteAnimated = 0xDE604
 
constexpr int yaze::app::gfx::kGlobalSpritesLW = 0xDD218
 
constexpr int yaze::app::gfx::kGlobalSpritePalettesDW = 0xDD290
 
constexpr int yaze::app::gfx::kArmorPalettes
 
constexpr int yaze::app::gfx::kSpritesPalettesAux1 = 0xDD39E
 
constexpr int yaze::app::gfx::kSpritesPalettesAux2 = 0xDD446
 
constexpr int yaze::app::gfx::kSpritesPalettesAux3 = 0xDD4E0
 
constexpr int yaze::app::gfx::kSwordPalettes = 0xDD630
 
constexpr int yaze::app::gfx::kShieldPalettes = 0xDD648
 
constexpr int yaze::app::gfx::kHudPalettes = 0xDD660
 
constexpr int yaze::app::gfx::kDungeonMapPalettes = 0xDD70A
 
constexpr int yaze::app::gfx::kDungeonMainPalettes
 
constexpr int yaze::app::gfx::kDungeonMapBgPalettes = 0xDE544
 
constexpr int yaze::app::gfx::kHardcodedGrassLW = 0x5FEA9
 
constexpr int yaze::app::gfx::kHardcodedGrassDW = 0x05FEB3
 
constexpr int yaze::app::gfx::kHardcodedGrassSpecial = 0x75640
 
constexpr int yaze::app::gfx::kOverworldMiniMapPalettes = 0x55B27
 
constexpr int yaze::app::gfx::kTriforcePalette = 0x64425
 
constexpr int yaze::app::gfx::kCrystalPalette = 0xF4CD3
 
constexpr int yaze::app::gfx::CustomAreaSpecificBGPalette
 
constexpr int yaze::app::gfx::CustomAreaSpecificBGASM = 0x140150
 
constexpr int yaze::app::gfx::kCustomAreaSpecificBGEnabled = 0x140140