Added Google Abseil library
This commit is contained in:
@@ -198,26 +198,26 @@ void OverworldEditor::DrawOverworldCanvas() {
|
||||
overworld_map_canvas_.DrawBackground();
|
||||
overworld_map_canvas_.UpdateContext();
|
||||
overworld_map_canvas_.DrawGrid(64.f);
|
||||
if (all_gfx_loaded_) {
|
||||
static bool tiles_made = false;
|
||||
static std::vector<gfx::Bitmap> tiles;
|
||||
if (!tiles_made) {
|
||||
tiles = graphics_bin_.at(0).CreateTiles();
|
||||
auto renderer = rom_.Renderer();
|
||||
for (auto &tile : tiles) {
|
||||
tile.CreateTexture(renderer);
|
||||
}
|
||||
}
|
||||
// if (all_gfx_loaded_) {
|
||||
// static bool tiles_made = false;
|
||||
// static std::vector<gfx::Bitmap> tiles;
|
||||
// if (!tiles_made) {
|
||||
// tiles = graphics_bin_.at(0).CreateTiles();
|
||||
// auto renderer = rom_.Renderer();
|
||||
// for (auto &tile : tiles) {
|
||||
// tile.CreateTexture(renderer);
|
||||
// }
|
||||
// }
|
||||
|
||||
overworld_map_canvas_.GetDrawList()->AddImage(
|
||||
(void *)tiles[0].GetTexture(),
|
||||
ImVec2(overworld_map_canvas_.GetZeroPoint().x + 2,
|
||||
overworld_map_canvas_.GetZeroPoint().y + 2),
|
||||
ImVec2(
|
||||
overworld_map_canvas_.GetZeroPoint().x + (tiles[0].GetWidth() * 2),
|
||||
overworld_map_canvas_.GetZeroPoint().y +
|
||||
(tiles[0].GetHeight() * 2)));
|
||||
}
|
||||
// overworld_map_canvas_.GetDrawList()->AddImage(
|
||||
// (void *)tiles[0].GetTexture(),
|
||||
// ImVec2(overworld_map_canvas_.GetZeroPoint().x + 2,
|
||||
// overworld_map_canvas_.GetZeroPoint().y + 2),
|
||||
// ImVec2(
|
||||
// overworld_map_canvas_.GetZeroPoint().x + (tiles[0].GetWidth() *
|
||||
// 2), overworld_map_canvas_.GetZeroPoint().y +
|
||||
// (tiles[0].GetHeight() * 2)));
|
||||
// }
|
||||
overworld_map_canvas_.DrawOverlay();
|
||||
}
|
||||
|
||||
@@ -309,6 +309,13 @@ void OverworldEditor::DrawAreaGraphics() {
|
||||
}
|
||||
|
||||
void OverworldEditor::LoadGraphics() {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
current_palette_[i].x = (i * 0.21f);
|
||||
current_palette_[i].y = (i * 0.21f);
|
||||
current_palette_[i].z = (i * 0.21f);
|
||||
current_palette_[i].w = 1.f;
|
||||
}
|
||||
|
||||
rom_.LoadAllGraphicsData();
|
||||
graphics_bin_ = rom_.GetGraphicsBin();
|
||||
tile16_blockset_bmp_.Create(128 * 2, 8192 * 2, 8, 1048576);
|
||||
|
||||
Reference in New Issue
Block a user