housekeeping
This commit is contained in:
@@ -266,6 +266,7 @@ void Bitmap::CreateTexture(SDL_Renderer *renderer) {
|
|||||||
converted_surface, SDL_Surface_Deleter());
|
converted_surface, SDL_Surface_Deleter());
|
||||||
} else {
|
} else {
|
||||||
SDL_Log("SDL_ConvertSurfaceFormat failed: %s\n", SDL_GetError());
|
SDL_Log("SDL_ConvertSurfaceFormat failed: %s\n", SDL_GetError());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_LockTexture(texture_.get(), nullptr, (void **)&texture_pixels,
|
SDL_LockTexture(texture_.get(), nullptr, (void **)&texture_pixels,
|
||||||
|
|||||||
@@ -335,15 +335,15 @@ TileInfo WordToTileInfo(uint16_t word) {
|
|||||||
uint16_t TileInfoToShort(TileInfo tile_info) {
|
uint16_t TileInfoToShort(TileInfo tile_info) {
|
||||||
// uint16_t result = 0;
|
// uint16_t result = 0;
|
||||||
|
|
||||||
// // Copy the id_ value
|
// Copy the id_ value
|
||||||
// result |= tile_info.id_ & 0x3FF; // ids are 10 bits
|
// result |= tile_info.id_ & 0x3FF; // ids are 10 bits
|
||||||
|
|
||||||
// // Set the vertical_mirror_, horizontal_mirror_, and over_ flags
|
// Set the vertical_mirror_, horizontal_mirror_, and over_ flags
|
||||||
// result |= (tile_info.vertical_mirror_ ? 1 : 0) << 10;
|
// result |= (tile_info.vertical_mirror_ ? 1 : 0) << 10;
|
||||||
// result |= (tile_info.horizontal_mirror_ ? 1 : 0) << 11;
|
// result |= (tile_info.horizontal_mirror_ ? 1 : 0) << 11;
|
||||||
// result |= (tile_info.over_ ? 1 : 0) << 12;
|
// result |= (tile_info.over_ ? 1 : 0) << 12;
|
||||||
|
|
||||||
// // Set the palette_
|
// Set the palette_
|
||||||
// result |= (tile_info.palette_ & 0x07) << 13; // palettes are 3 bits
|
// result |= (tile_info.palette_ & 0x07) << 13; // palettes are 3 bits
|
||||||
|
|
||||||
uint16_t value = 0;
|
uint16_t value = 0;
|
||||||
|
|||||||
@@ -404,10 +404,6 @@ class Rom : public core::ExperimentFlags {
|
|||||||
return absl::OkStatus();
|
return absl::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueueChanges(std::function<void()> const& function) {
|
|
||||||
changes_.push(function);
|
|
||||||
}
|
|
||||||
|
|
||||||
VersionConstants version_constants() const {
|
VersionConstants version_constants() const {
|
||||||
return kVersionConstantsMap.at(version_);
|
return kVersionConstantsMap.at(version_);
|
||||||
}
|
}
|
||||||
@@ -573,7 +569,6 @@ class Rom : public core::ExperimentFlags {
|
|||||||
gfx::PaletteGroupMap palette_groups_;
|
gfx::PaletteGroupMap palette_groups_;
|
||||||
core::ResourceLabelManager resource_label_manager_;
|
core::ResourceLabelManager resource_label_manager_;
|
||||||
|
|
||||||
std::stack<std::function<void()>> changes_;
|
|
||||||
std::shared_ptr<SDL_Renderer> renderer_;
|
std::shared_ptr<SDL_Renderer> renderer_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
#ifndef YAZE_CLI_PATCH_H
|
#ifndef YAZE_CLI_PATCH_H
|
||||||
#define YAZE_CLI_PATCH_H
|
#define YAZE_CLI_PATCH_H
|
||||||
|
|
||||||
#include <zlib.h>
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace cli {
|
namespace cli {
|
||||||
|
|
||||||
void encode(uint64_t data, std::vector<uint8_t>& output);
|
void encode(uint64_t data, std::vector<uint8_t>& output);
|
||||||
|
|
||||||
uint64_t decode(const std::vector<uint8_t>& input, size_t& offset);
|
uint64_t decode(const std::vector<uint8_t>& input, size_t& offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user