yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
constants.h File Reference
#include <string_view>
Include dependency graph for constants.h:

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::app
 Main namespace for the ImGui application.
 
namespace  yaze::app::core
 Core application logic and utilities.
 

Macros

#define TAB_BAR(w)
 
#define END_TAB_BAR()
 
#define TAB_ITEM(w)
 
#define END_TAB_ITEM()
 
#define MENU_ITEM(w)
 
#define MENU_ITEM2(w, v)
 
#define BUTTON_COLUMN(w)
 
#define TEXT_COLUMN(w)
 
#define BEGIN_TABLE(l, n, f)
 
#define SETUP_COLUMN(l)
 
#define TABLE_HEADERS()
 
#define NEXT_COLUMN()
 
#define END_TABLE()
 
#define HOVER_HINT(string)
 
#define PRINT_IF_ERROR(expression)
 
#define EXIT_IF_ERROR(expression)
 
#define RETURN_VOID_IF_ERROR(expression)
 
#define RETURN_IF_ERROR(expression)
 
#define ASSIGN_OR_RETURN(type_variable_name, expression)
 
#define ASSIGN_OR_RETURN_IMPL(error_or_value, type_variable_name, expression)
 
#define ASSIGN_OR_LOG_ERROR(type_variable_name, expression)
 
#define ASSIGN_OR_LOG_ERROR_IMPL(error_or_value, type_variable_name, expression)
 
#define APPEND_NUMBER(expression, number)
 
#define APPEND_NUMBER_INNER(expression, number)
 
#define TEXT_WITH_SEPARATOR(text)
 
#define TABLE_BORDERS_RESIZABLE    ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable
 
#define CLEAR_AND_RETURN_STATUS(status)
 

Typedefs

using ushort = unsigned short
 
using uint = unsigned int
 
using uchar = unsigned char
 

Variables

constexpr std::string_view yaze::app::core::kYazeVersion = "0.2.1"
 

Macro Definition Documentation

◆ TAB_BAR

◆ END_TAB_BAR

◆ TAB_ITEM

◆ END_TAB_ITEM

◆ MENU_ITEM

#define MENU_ITEM ( w)
Value:
if (ImGui::MenuItem(w))

Definition at line 16 of file constants.h.

Referenced by yaze::app::editor::EditorManager::DrawYazeMenuBar().

◆ MENU_ITEM2

#define MENU_ITEM2 ( w,
v )
Value:
if (ImGui::MenuItem(w, v))

Definition at line 17 of file constants.h.

Referenced by yaze::app::editor::EditorManager::DrawYazeMenuBar().

◆ BUTTON_COLUMN

#define BUTTON_COLUMN ( w)
Value:
ImGui::TableNextColumn(); \
ImGui::Button(w);

Definition at line 19 of file constants.h.

Referenced by yaze::app::editor::ScreenEditor::DrawInventoryToolset(), and yaze::app::editor::MusicEditor::DrawToolset().

◆ TEXT_COLUMN

#define TEXT_COLUMN ( w)

◆ BEGIN_TABLE

#define BEGIN_TABLE ( l,
n,
f )
Value:
if (ImGui::BeginTable(l, n, f, ImVec2(0, 0))) {

Definition at line 27 of file constants.h.

Referenced by yaze::app::editor::MemoryEditorWithDiffChecker::Update(), and yaze::app::editor::GraphicsEditor::UpdateScadView().

◆ SETUP_COLUMN

#define SETUP_COLUMN ( l)
Value:
ImGui::TableSetupColumn(l);

Definition at line 28 of file constants.h.

Referenced by yaze::app::editor::MemoryEditorWithDiffChecker::Update(), and yaze::app::editor::GraphicsEditor::UpdateScadView().

◆ TABLE_HEADERS

#define TABLE_HEADERS ( )
Value:
ImGui::TableHeadersRow(); \
ImGui::TableNextRow();

Definition at line 30 of file constants.h.

Referenced by yaze::app::editor::GraphicsEditor::UpdateScadView().

◆ NEXT_COLUMN

◆ END_TABLE

#define END_TABLE ( )
Value:
ImGui::EndTable(); \
}

Definition at line 36 of file constants.h.

Referenced by yaze::app::editor::MemoryEditorWithDiffChecker::Update(), and yaze::app::editor::GraphicsEditor::UpdateScadView().

◆ HOVER_HINT

◆ PRINT_IF_ERROR

◆ EXIT_IF_ERROR

#define EXIT_IF_ERROR ( expression)
Value:
{ \
auto error = expression; \
if (!error.ok()) { \
std::cout << error.ToString() << std::endl; \
return EXIT_FAILURE; \
} \
}

Definition at line 51 of file constants.h.

Referenced by main().

◆ RETURN_VOID_IF_ERROR

#define RETURN_VOID_IF_ERROR ( expression)
Value:
{ \
auto error = expression; \
if (!error.ok()) { \
std::cout << error.ToString() << std::endl; \
return; \
} \
}

Definition at line 60 of file constants.h.

Referenced by yaze::app::editor::EditorManager::SaveRom().

◆ RETURN_IF_ERROR

#define RETURN_IF_ERROR ( expression)
Value:
{ \
auto error = expression; \
if (!error.ok()) { \
return error; \
} \
}

Definition at line 69 of file constants.h.

Referenced by yaze::app::zelda3::overworld::OverworldMap::BuildMap(), yaze::app::zelda3::screen::Inventory::BuildTileset(), yaze::app::editor::OverworldEditor::CheckForCurrentMap(), yaze::app::gfx::lc_lz2::CompressV2(), yaze::app::gfx::lc_lz2::CompressV3(), yaze::app::zelda3::screen::Inventory::Create(), yaze::app::core::Renderer::CreateAndRenderBitmap(), yaze::app::core::Controller::CreateGuiContext(), yaze::app::editor::OverworldEditor::DrawAreaGraphics(), yaze::app::editor::GraphicsEditor::DrawExperimentalFeatures(), yaze::app::editor::GraphicsEditor::DrawFileImport(), yaze::app::editor::PaletteEditor::DrawPaletteGroup(), yaze::app::editor::OverworldEditor::DrawTile16Selector(), yaze::app::editor::Tile16Editor::DrawTileEditControls(), yaze::app::gfx::PaletteGroupMap::for_each(), yaze::cli::ApplyPatch::handle(), yaze::cli::AsarPatch::handle(), yaze::cli::Backup::handle(), yaze::cli::Expand::handle(), yaze::cli::Open::handle(), yaze::cli::ReadFromRom::handle(), yaze::cli::Tile16Transfer::handle(), yaze::app::editor::Tile16Editor::InitBlockset(), yaze::app::editor::MessageEditor::Initialize(), yaze::app::zelda3::overworld::Overworld::Load(), yaze::app::Rom::LoadAllGraphicsData(), yaze::app::gfx::LoadAllPalettes(), yaze::app::editor::ScreenEditor::LoadDungeonMapTile16(), yaze::app::zelda3::overworld::Overworld::LoadExits(), yaze::app::Rom::LoadFromFile(), yaze::app::Rom::LoadFromPointer(), yaze::app::editor::OverworldEditor::LoadGraphics(), yaze::app::Rom::LoadLinkGraphics(), yaze::app::zelda3::overworld::OverworldMap::LoadPalette(), yaze::app::editor::OverworldEditor::LoadSpriteGraphics(), yaze::app::zelda3::overworld::Overworld::LoadSprites(), yaze::app::editor::Tile16Editor::LoadTile8(), yaze::app::Rom::LoadZelda3(), yaze::app::core::Controller::OnEntry(), yaze::app::core::Controller::OnLoad(), yaze::app::core::Controller::OnTestLoad(), yaze::app::editor::EditorManager::OpenProject(), yaze::app::Rom::ReadByte(), yaze::app::Rom::ReadByteVector(), yaze::app::Rom::ReadLong(), yaze::app::Rom::ReadWord(), yaze::app::editor::DungeonEditor::RefreshGraphics(), yaze::app::editor::OverworldEditor::RefreshMapPalette(), yaze::app::editor::OverworldEditor::RefreshTile16Blockset(), yaze::app::editor::MessageEditor::Save(), yaze::app::editor::OverworldEditor::Save(), yaze::app::Project::Save(), yaze::app::zelda3::dungeon::RoomEntrance::Save(), yaze::app::zelda3::overworld::Overworld::Save(), yaze::app::Rom::SaveAllPalettes(), yaze::app::editor::ScreenEditor::SaveDungeonMaps(), yaze::app::zelda3::overworld::Overworld::SaveEntrances(), yaze::app::zelda3::overworld::Overworld::SaveExits(), yaze::app::zelda3::overworld::Overworld::SaveItems(), yaze::app::zelda3::overworld::Overworld::SaveLargeMaps(), yaze::app::zelda3::overworld::Overworld::SaveMap16Tiles(), yaze::app::zelda3::overworld::Overworld::SaveMap32Tiles(), yaze::app::zelda3::overworld::Overworld::SaveMapProperties(), yaze::app::zelda3::overworld::Overworld::SaveOverworldMaps(), yaze::app::Rom::SavePalette(), yaze::app::Rom::SaveToFile(), yaze::app::editor::Tile16Editor::SetCurrentTile(), yaze::app::editor::DungeonEditor::Update(), yaze::app::editor::EditorManager::Update(), yaze::app::editor::MessageEditor::Update(), yaze::app::editor::OverworldEditor::Update(), yaze::app::editor::Tile16Editor::Update(), yaze::app::editor::Tile16Editor::UpdateBlockset(), yaze::app::editor::GraphicsEditor::UpdateLinkGfxView(), yaze::app::editor::GraphicsEditor::UpdatePaletteColumn(), yaze::app::editor::GraphicsEditor::UpdateScadView(), yaze::app::editor::Tile16Editor::UpdateTile16Edit(), yaze::app::editor::Tile16Editor::UpdateTile16Transfer(), yaze::app::editor::Tile16Editor::UpdateTransferTileCanvas(), yaze::app::gfx::lc_lz2::ValidateCompressionResult(), yaze::app::gfx::lc_lz2::ValidateCompressionResultV3(), yaze::app::Rom::WriteByte(), yaze::app::Rom::WriteLong(), yaze::app::Rom::WriteShort(), yaze::app::Rom::WriteTile16(), and yaze::app::Rom::WriteWord().

◆ ASSIGN_OR_RETURN

#define ASSIGN_OR_RETURN ( type_variable_name,
expression )
Value:
ASSIGN_OR_RETURN_IMPL(APPEND_NUMBER(error_or_value, __LINE__), \
type_variable_name, expression)
#define APPEND_NUMBER(expression, number)
Definition constants.h:100
#define ASSIGN_OR_RETURN_IMPL(error_or_value, type_variable_name, expression)
Definition constants.h:81

Definition at line 77 of file constants.h.

Referenced by yaze::app::gfx::Bitmap::ApplyPalette(), yaze::app::gfx::Bitmap::ApplyPaletteFromPaletteGroup(), yaze::app::gfx::Bitmap::ApplyPaletteWithTransparent(), yaze::app::zelda3::overworld::Overworld::AssembleMap32Tiles(), yaze::app::zelda3::screen::Inventory::BuildTileset(), yaze::app::editor::GraphicsEditor::DecompressImportData(), yaze::app::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::app::editor::DisplayPalette(), yaze::app::gui::DisplayPalette(), yaze::app::editor::PaletteEditor::DrawPaletteGroup(), yaze::app::editor::PaletteEditor::EditColorInPalette(), yaze::app::zelda3::overworld::Overworld::GetTile16ForTile32(), yaze::cli::Tile16Transfer::handle(), yaze::app::editor::DungeonEditor::Initialize(), yaze::app::Rom::Load2BppGraphics(), yaze::app::Rom::LoadAllGraphicsData(), yaze::app::editor::ScreenEditor::LoadDungeonMaps(), yaze::app::editor::ScreenEditor::LoadDungeonMapTile16(), yaze::app::editor::EntranceContext::LoadEntranceTileTypes(), yaze::app::Rom::LoadGfxGroups(), yaze::app::zelda3::overworld::Overworld::LoadItems(), yaze::app::Rom::LoadLinkGraphics(), yaze::app::zelda3::overworld::OverworldMap::LoadPalette(), yaze::app::zelda3::overworld::Overworld::LoadSpritesFromMap(), yaze::app::Rom::ReadHelper(), yaze::app::Rom::ReadTile16(), yaze::app::editor::PaletteEditor::ResetColorToOriginal(), yaze::app::Rom::SaveGroupsToRom(), yaze::app::gfx::lc_lz2::ValidateCompressionResult(), and yaze::app::gfx::lc_lz2::ValidateCompressionResultV3().

◆ ASSIGN_OR_RETURN_IMPL

#define ASSIGN_OR_RETURN_IMPL ( error_or_value,
type_variable_name,
expression )
Value:
auto error_or_value = expression; \
if (!error_or_value.ok()) { \
return error_or_value.status(); \
} \
type_variable_name = std::move(*error_or_value);

Definition at line 81 of file constants.h.

◆ ASSIGN_OR_LOG_ERROR

#define ASSIGN_OR_LOG_ERROR ( type_variable_name,
expression )
Value:
ASSIGN_OR_LOG_ERROR_IMPL(APPEND_NUMBER(error_or_value, __LINE__), \
type_variable_name, expression)
#define ASSIGN_OR_LOG_ERROR_IMPL(error_or_value, type_variable_name, expression)
Definition constants.h:92

Definition at line 88 of file constants.h.

Referenced by yaze::app::zelda3::dungeon::RoomObject::AddTiles().

◆ ASSIGN_OR_LOG_ERROR_IMPL

#define ASSIGN_OR_LOG_ERROR_IMPL ( error_or_value,
type_variable_name,
expression )
Value:
auto error_or_value = expression; \
if (!error_or_value.ok()) { \
std::cout << error_or_value.status().ToString() << std::endl; \
} \
type_variable_name = std::move(*error_or_value);

Definition at line 92 of file constants.h.

◆ APPEND_NUMBER

#define APPEND_NUMBER ( expression,
number )
Value:
APPEND_NUMBER_INNER(expression, number)
#define APPEND_NUMBER_INNER(expression, number)
Definition constants.h:103

Definition at line 100 of file constants.h.

◆ APPEND_NUMBER_INNER

#define APPEND_NUMBER_INNER ( expression,
number )
Value:
expression##number

Definition at line 103 of file constants.h.

◆ TEXT_WITH_SEPARATOR

#define TEXT_WITH_SEPARATOR ( text)
Value:
ImGui::Text(text); \
ImGui::Separator();

Definition at line 105 of file constants.h.

Referenced by yaze::app::editor::DisplayPalette().

◆ TABLE_BORDERS_RESIZABLE

#define TABLE_BORDERS_RESIZABLE    ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable

◆ CLEAR_AND_RETURN_STATUS

#define CLEAR_AND_RETURN_STATUS ( status)
Value:
if (!status.ok()) { \
auto temp = status; \
status = absl::OkStatus(); \
return temp; \
}

Definition at line 112 of file constants.h.

Referenced by yaze::app::editor::GraphicsEditor::Update(), and yaze::app::editor::PaletteEditor::Update().

Typedef Documentation

◆ ushort

using ushort = unsigned short

Definition at line 119 of file constants.h.

◆ uint

using uint = unsigned int

Definition at line 120 of file constants.h.

◆ uchar

using uchar = unsigned char

Definition at line 121 of file constants.h.