yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
snes_palette.cc File Reference
#include "snes_palette.h"
#include <SDL.h>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <memory>
#include <vector>
#include "absl/container/flat_hash_map.h"
#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.cc:

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::app
 Main namespace for the ImGui application.
 
namespace  yaze::app::gfx
 Contains classes for handling graphical data.
 
namespace  yaze::app::gfx::palette_group_internal
 Internal functions for loading palettes by group.
 

Functions

absl::Status yaze::app::gfx::palette_group_internal::LoadOverworldMainPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadOverworldAuxiliaryPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadOverworldAnimatedPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadHUDPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadGlobalSpritePalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadArmorPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadSwordPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadShieldPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadSpriteAux1Palettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadSpriteAux2Palettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadSpriteAux3Palettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadDungeonMainPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadGrassColors (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::Load3DObjectPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
absl::Status yaze::app::gfx::palette_group_internal::LoadOverworldMiniMapPalettes (const std::vector< uint8_t > &rom_data, gfx::PaletteGroupMap &palette_groups)
 
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

const absl::flat_hash_map< std::string, uint32_t > yaze::app::gfx::kPaletteGroupAddressMap
 
const absl::flat_hash_map< std::string, uint32_t > yaze::app::gfx::kPaletteGroupColorCounts