clang tidy cleanups

This commit is contained in:
scawful
2024-08-21 00:37:14 -04:00
parent e0e8c58c61
commit ea8a851539
13 changed files with 57 additions and 36 deletions

View File

@@ -434,9 +434,14 @@ void Room::LoadSprites() {
break;
}
// sprites_.emplace_back(this, b3, (b2 & 0x1F), (b1 & 0x1F),
// ((b2 & 0xE0) >> 5) + ((b1 & 0x60) >> 2),
// (b1 & 0x80) >> 7);
Sprite new_sprite;
/**
* TODO: Implement Sprite constructor for Dungeons
(b3, (b2 & 0x1F), (b1 & 0x1F),
((b2 & 0xE0) >> 5) + ((b1 & 0x60) >> 2),
(b1 & 0x80) >> 7);
*/
sprites_.emplace_back(new_sprite);
if (sprites_.size() > 1) {
Sprite& spr = sprites_.back();

View File

@@ -119,7 +119,6 @@ class RoomObject : public SharedRom {
}
void AddTiles(int nbr, int pos) {
auto rom_data = rom()->data();
for (int i = 0; i < nbr; i++) {
ASSIGN_OR_LOG_ERROR(auto tile, rom()->ReadTile16(pos + (i * 2)));
tiles_.push_back(tile);

View File

@@ -11,7 +11,6 @@
#include "absl/container/flat_hash_map.h"
#include "absl/status/status.h"
#include "app/core/constants.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/compression.h"
@@ -641,9 +640,6 @@ absl::Status Overworld::SaveOverworldMaps() {
} else {
// Save pointer for map1
int snes_pos = map_pointers1[map_pointers1_id[i]];
uint8_t b1 = (uint8_t)(snes_pos & 0xFF);
uint8_t b2 = (uint8_t)((snes_pos >> 8) & 0xFF);
uint8_t b3 = (uint8_t)((snes_pos >> 16) & 0xFF);
core::Logger::log("Saving map pointers1 for map " +
core::UppercaseHexByte(i) + " at " +
core::UppercaseHexLong(snes_pos));
@@ -667,9 +663,6 @@ absl::Status Overworld::SaveOverworldMaps() {
std::copy(b.begin(), b.end(), map_data_p2[i].begin());
int snes_pos = core::PcToSnes(pos);
map_pointers2[i] = snes_pos;
uint8_t b1 = (uint8_t)(snes_pos & 0xFF);
uint8_t b2 = (uint8_t)((snes_pos >> 8) & 0xFF);
uint8_t b3 = (uint8_t)((snes_pos >> 16) & 0xFF);
core::Logger::log("Saving map pointers2 and compressed data for map " +
core::UppercaseHexByte(i) + " at " +
core::UppercaseHexLong(snes_pos));

View File

@@ -21,7 +21,7 @@ void TitleScreen::Create() {
}
void TitleScreen::BuildTileset() {
uchar staticgfx[16];
uchar staticgfx[16] = {0};
// Main Blocksets