5#include "absl/strings/str_format.h"
10#include "imgui/imgui.h"
36 return ImVec4{theme.status_active.x, theme.status_active.y, theme.status_active.z, 0.5f};
48 if (each.map_id_ < 0x40 + (current_world * 0x40) &&
49 each.map_id_ >= (current_world * 0x40) && !each.deleted) {
52 entrance_color.w = 0.78f;
71 if (each.map_id_ < 0x40 + (current_world * 0x40) &&
72 each.map_id_ >= (current_world * 0x40) && !each.deleted_) {
88 if (item.room_map_id_ < 0x40 + (current_world * 0x40) &&
89 item.room_map_id_ >= (current_world * 0x40) && !item.deleted) {
94 std::string item_name =
"";
98 item_name = absl::StrFormat(
"0x%02X", item.id_);
106 int current_world,
int game_state) {
108 if (!sprite.deleted() && sprite.map_id() < 0x40 + (current_world * 0x40) &&
109 sprite.map_id() >= (current_world * 0x40)) {
110 int sprite_x = sprite.x_;
111 int sprite_y = sprite.y_;
127 gui::DrawText(rt, absl::StrFormat(
"%s", sprite.name()), sprite_x,
144 if (each.map_id_ < 0x40 + (current_world * 0x40) &&
145 each.map_id_ >= (current_world * 0x40) && !each.deleted) {
150 entrance_color.w = 0.78f;
165 int current_world,
int current_mode) {
173 if (each.map_id_ < 0x40 + (current_world * 0x40) &&
174 each.map_id_ >= (current_world * 0x40) && !each.deleted_) {
194 if (item.room_map_id_ < 0x40 + (current_world * 0x40) &&
195 item.room_map_id_ >= (current_world * 0x40) && !item.deleted) {
203 std::string item_name =
"";
207 item_name = absl::StrFormat(
"0x%02X", item.id_);
221 if (!sprite.deleted() && sprite.map_id() < 0x40 + (current_world * 0x40) &&
222 sprite.map_id() >= (current_world * 0x40)) {
225 int sprite_x = sprite.x_;
226 int sprite_y = sprite.y_;
229 int original_x = sprite.x_;
230 int original_y = sprite.y_;
249 sprite.x_ = original_x;
250 sprite.y_ = original_y;
268 int map_x = (current_map % 8) * 32;
269 int map_y = (current_map / 8) * 32;
272 for (
int ty = 0; ty < 32; ++ty) {
273 for (
int tx = 0; tx < 32; ++tx) {
274 int world_tx = map_x + tx;
275 int world_ty = map_y + ty;
279 if (world_ty >= 256 || world_tx >= 256) {
283 uint16_t tile_id = map_tiles[world_ty][world_tx];
286 if (diggable_tiles.IsDiggable(tile_id)) {
288 int pixel_x = world_tx * 16;
289 int pixel_y = world_ty * 16;
zelda3::GameEntity * hovered_entity_
void DrawDiggableTileHighlights(int current_world, int current_map)
Draw highlights for all diggable tiles on the current map.
zelda3::Overworld * overworld_
void DrawItems(const gui::CanvasRuntime &rt, int current_world)
void DrawExits(const gui::CanvasRuntime &rt, int current_world)
void DrawSprites(const gui::CanvasRuntime &rt, int current_world, int game_state)
void DrawEntrances(const gui::CanvasRuntime &rt, int current_world)
std::vector< gfx::Bitmap > * sprite_previews_
bool show_diggable_tiles_
void DrawBitmap(Bitmap &bitmap, int border_offset, float scale)
auto global_scale() const
void DrawRect(int x, int y, int w, int h, ImVec4 color)
void DrawText(const std::string &text, int x, int y)
auto mutable_sprites(int state)
const DiggableTiles & diggable_tiles() const
const std::vector< OverworldEntrance > & entrances() const
OverworldBlockset & GetMapTiles(int world_type)
const AgentUITheme & GetTheme()
ImVec4 GetDiggableTileColor()
bool IsMouseHoveringOverEntity(const zelda3::GameEntity &entity, ImVec2 canvas_p0, ImVec2 scrolling, float scale)
Check if mouse is hovering over an entity.
void DrawRect(const CanvasRuntime &rt, int x, int y, int w, int h, ImVec4 color)
ImVec4 GetEntranceColor()
void DrawText(const CanvasRuntime &rt, const std::string &text, int x, int y)
std::string HexByte(uint8_t byte, HexStringParams params)
const std::vector< std::string > kSecretItemNames
bool kDrawOverworldSprites
struct yaze::core::FeatureFlags::Flags::Overworld overworld