Skip to content

Commit

Permalink
Fix GBC banked map output
Browse files Browse the repository at this point in the history
  • Loading branch information
Optiroc committed Oct 1, 2019
1 parent 9a53080 commit 2bcece4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ typedef std::vector<rgba_set_t> rgba_set_vec_t;

namespace sfc {

constexpr const char* VERSION = "0.8.6";
constexpr const char* VERSION = "0.8.7";

constexpr const char* COPYRIGHT = "Copyright (c) 2017-2019 David Lindecrantz";

Expand Down
5 changes: 2 additions & 3 deletions src/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ byte_vec_t Map::gbc_banked_data() const {

const auto linear_data = native_data();
auto banked_data = byte_vec_t(linear_data.size());
for (unsigned i = 0; i < linear_data.size(); ++i) {
banked_data[!(i % 2) ? i >> 2 : (i >> 2) + (32 * 32)] = linear_data[i];
}
for (unsigned i = 0; i < linear_data.size() >> 1; ++i) banked_data[i] = linear_data[i << 1];
for (unsigned i = 0; i < linear_data.size() >> 1; ++i) banked_data[i + (linear_data.size() >> 1)] = linear_data[(i << 1) + 1];
return banked_data;
}

Expand Down
1 change: 0 additions & 1 deletion src/superfamiconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// TODO: Check map output with tiles using duplicate colors (#8)
// TODO: Don't always pad native palette output? (Pad every palette but the last? Option?)
// TODO: Add more palette packing algorithms
// MAYBE: In sprite-mode, output matched palette metadata

#include <Options.h>

Expand Down

0 comments on commit 2bcece4

Please # to comment.