Refactor graphics loading: simplify function calls by removing namespace prefixes and improve header organization in scad_format
This commit is contained in:
@@ -529,7 +529,7 @@ absl::Status GraphicsEditor::DrawCgxImport() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::Button("Load CGX Data")) {
|
if (ImGui::Button("Load CGX Data")) {
|
||||||
status_ = gfx::scad_format::LoadCgx(current_bpp_, cgx_file_path_, cgx_data_,
|
status_ = gfx::LoadCgx(current_bpp_, cgx_file_path_, cgx_data_,
|
||||||
decoded_cgx_, extra_cgx_data_);
|
decoded_cgx_, extra_cgx_data_);
|
||||||
|
|
||||||
cgx_bitmap_.Create(0x80, 0x200, 8, decoded_cgx_);
|
cgx_bitmap_.Create(0x80, 0x200, 8, decoded_cgx_);
|
||||||
@@ -557,10 +557,10 @@ absl::Status GraphicsEditor::DrawScrImport() {
|
|||||||
|
|
||||||
if (ImGui::Button("Load Scr Data")) {
|
if (ImGui::Button("Load Scr Data")) {
|
||||||
status_ =
|
status_ =
|
||||||
gfx::scad_format::LoadScr(scr_file_path_, scr_mod_value_, scr_data_);
|
gfx::LoadScr(scr_file_path_, scr_mod_value_, scr_data_);
|
||||||
|
|
||||||
decoded_scr_data_.resize(0x100 * 0x100);
|
decoded_scr_data_.resize(0x100 * 0x100);
|
||||||
status_ = gfx::scad_format::DrawScrWithCgx(current_bpp_, scr_data_,
|
status_ = gfx::DrawScrWithCgx(current_bpp_, scr_data_,
|
||||||
decoded_scr_data_, decoded_cgx_);
|
decoded_scr_data_, decoded_cgx_);
|
||||||
|
|
||||||
scr_bitmap_.Create(0x100, 0x100, 8, decoded_scr_data_);
|
scr_bitmap_.Create(0x100, 0x100, 8, decoded_scr_data_);
|
||||||
@@ -596,7 +596,7 @@ absl::Status GraphicsEditor::DrawPaletteControls() {
|
|||||||
col_file_palette_ = gfx::SnesPalette(col_data_);
|
col_file_palette_ = gfx::SnesPalette(col_data_);
|
||||||
|
|
||||||
// gigaleak dev format based code
|
// gigaleak dev format based code
|
||||||
decoded_col_ = gfx::scad_format::DecodeColFile(col_file_path_);
|
decoded_col_ = gfx::DecodeColFile(col_file_path_);
|
||||||
col_file_ = true;
|
col_file_ = true;
|
||||||
is_open_ = true;
|
is_open_ = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
|
#include <span>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
namespace scad_format {
|
|
||||||
|
|
||||||
void FindMetastamp() {
|
void FindMetastamp() {
|
||||||
int matching_position = -1;
|
int matching_position = -1;
|
||||||
@@ -275,6 +274,5 @@ absl::Status DecodeObjFile(
|
|||||||
return absl::OkStatus();
|
return absl::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace scad_format
|
|
||||||
} // namespace gfx
|
} // namespace gfx
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
|
|||||||
@@ -15,14 +15,10 @@
|
|||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
|
|
||||||
/**
|
|
||||||
* @namespace yaze::gfx::scad_format
|
|
||||||
* @brief Loading from prototype SCAD format
|
|
||||||
*/
|
|
||||||
namespace scad_format {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Cgx file header
|
* @brief Cgx file header
|
||||||
|
*
|
||||||
|
* @details
|
||||||
* キャラクタ(.SCH)ファイル
|
* キャラクタ(.SCH)ファイル
|
||||||
* ヘッダー情報
|
* ヘッダー情報
|
||||||
* アドレス 説明
|
* アドレス 説明
|
||||||
@@ -91,7 +87,6 @@ absl::Status DecodeObjFile(
|
|||||||
std::unordered_map<std::string, std::vector<uint8_t>> decoded_obj,
|
std::unordered_map<std::string, std::vector<uint8_t>> decoded_obj,
|
||||||
std::vector<uint8_t>& decoded_extra_obj, int& obj_loaded);
|
std::vector<uint8_t>& decoded_extra_obj, int& obj_loaded);
|
||||||
|
|
||||||
} // namespace scad_format
|
|
||||||
} // namespace gfx
|
} // namespace gfx
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,6 @@ class GraphicsBuffer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gfx
|
} // namespace gfx
|
||||||
|
|
||||||
} // namespace yaze
|
} // namespace yaze
|
||||||
|
|
||||||
#endif // YAZE_APP_GFX_SNES_TILE_H
|
#endif // YAZE_APP_GFX_SNES_TILE_H
|
||||||
|
|||||||
Reference in New Issue
Block a user