housekeeping snes types

This commit is contained in:
Justin Scofield
2022-07-23 16:34:08 -04:00
parent 9655b35363
commit b084208760
4 changed files with 4 additions and 8 deletions

View File

@@ -3,7 +3,6 @@
#include <SDL2/SDL.h>
#include <imgui/imgui.h>
#include <palette.h>
#include <tile.h>
#include <cstdint>
#include <cstdlib>
@@ -60,7 +59,8 @@ SNESPalette::SNESPalette(char* data) : size_(sizeof(data) / 2) {
}
}
SNESPalette::SNESPalette(const unsigned char* snes_pal) : size_(sizeof(snes_pal) / 2) {
SNESPalette::SNESPalette(const unsigned char* snes_pal)
: size_(sizeof(snes_pal) / 2) {
assert((sizeof(snes_pal) % 4 == 0) && (sizeof(snes_pal) <= 32));
for (unsigned i = 0; i < sizeof(snes_pal); i += 2) {
SNESColor col;
@@ -72,7 +72,7 @@ SNESPalette::SNESPalette(const unsigned char* snes_pal) : size_(sizeof(snes_pal)
}
}
SNESPalette::SNESPalette(const std::vector<ImVec4> & cols) {
SNESPalette::SNESPalette(const std::vector<ImVec4>& cols) {
for (const auto& each : cols) {
SNESColor scol;
scol.setRgb(each);
@@ -102,8 +102,7 @@ SDL_Palette* SNESPalette::GetSDL_Palette() {
color[i].g = (uint8_t)colors[i].rgb.y * 100;
color[i].b = (uint8_t)colors[i].rgb.z * 100;
std::cout << "Color " << i << " added (R:" << color[i].r
<< " G:" << color[i].g << " B:" << color[i].b << ")"
<< std::endl;
<< " G:" << color[i].g << " B:" << color[i].b << ")" << std::endl;
}
sdl_palette->colors = color.data();

View File

@@ -4,7 +4,6 @@
#include <SDL2/SDL.h>
#include <imgui/imgui.h>
#include <palette.h>
#include <tile.h>
#include <cstdint>
#include <cstdlib>

View File

@@ -4,7 +4,6 @@
#include <vector>
#include "app/core/constants.h"
#include "app/gfx/snes_palette.h"
namespace yaze {
namespace app {

View File

@@ -5,7 +5,6 @@
#include <vector>
#include "app/core/constants.h"
#include "app/gfx/snes_palette.h"
namespace yaze {
namespace app {