[jasper/world] Make palBank fields 8 bit
All checks were successful
Build / build (push) Successful in 3m48s
All checks were successful
Build / build (push) Successful in 3m48s
This commit is contained in:
@@ -15,8 +15,8 @@ RmPalette::RmPalette(WorldObjectSet &doc, size_t const rmIdx) noexcept:
|
||||
m_objUpdates.reserve(m_doc.objects.size());
|
||||
for (size_t i = 0; auto const&obj : m_doc.objects) {
|
||||
if (obj.palBank >= m_rmIdx) {
|
||||
auto const newPalBank = static_cast<uint16_t>(obj.palBank == m_rmIdx ?
|
||||
0 : obj.palBank - 1);
|
||||
uint8_t const newPalBank = obj.palBank == m_rmIdx ?
|
||||
0 : obj.palBank - 1;
|
||||
m_objUpdates.emplace_back(ObjUpdate{
|
||||
.idx = i,
|
||||
.oldPalBank = obj.palBank,
|
||||
|
@@ -19,8 +19,8 @@ class RmPalette: public studio::UndoCommand {
|
||||
size_t const m_rmIdx = 0;
|
||||
struct ObjUpdate {
|
||||
size_t idx{};
|
||||
uint16_t oldPalBank{};
|
||||
uint16_t newPalBank{};
|
||||
uint8_t oldPalBank{};
|
||||
uint8_t newPalBank{};
|
||||
};
|
||||
ox::Vector<ObjUpdate> m_objUpdates;
|
||||
public:
|
||||
|
@@ -183,7 +183,7 @@ void WorldObjectSetEditorImGui::drawObjEditor() noexcept {
|
||||
ig::IDStackItem const subsheetSelectorStackItem("SubsheetSelector");
|
||||
if (ig::ComboBox("Palette", m_paletteDisplayNames, m_objEditor.palette)) {
|
||||
std::ignore = pushCommand<EditObjectPalette>(
|
||||
m_doc, m_selectedObj, static_cast<uint16_t>(m_objEditor.palette));
|
||||
m_doc, m_selectedObj, static_cast<uint8_t>(m_objEditor.palette));
|
||||
}
|
||||
if (ImGui::InputInt("Frames", &m_objEditor.frames, 1)) {
|
||||
m_objEditor.frames = ox::max(m_objEditor.frames, 1);
|
||||
|
Reference in New Issue
Block a user