VideoBackendBase: Convert EFBAccessType into an enum class

This commit is contained in:
Lioncash
2017-01-23 02:51:46 -05:00
parent a2caa0d733
commit 5b461f50af
12 changed files with 75 additions and 53 deletions

View File

@ -179,7 +179,7 @@ void Renderer::RenderText(const std::string& text, int left, int top, u32 color)
u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
{
if (type == PEEK_COLOR)
if (type == EFBAccessType::PeekColor)
{
u32 color = FramebufferManager::GetInstance()->PeekEFBColor(x, y);
@ -215,7 +215,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
return color & 0x00FFFFFF; // GX_READ_00
}
}
else // if (type == PEEK_Z)
else // if (type == EFBAccessType::PeekZ)
{
// Depth buffer is inverted for improved precision near far plane
float depth = 1.0f - FramebufferManager::GetInstance()->PeekEFBDepth(x, y);
@ -237,7 +237,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
void Renderer::PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points)
{
if (type == POKE_COLOR)
if (type == EFBAccessType::PokeColor)
{
for (size_t i = 0; i < num_points; i++)
{
@ -249,7 +249,7 @@ void Renderer::PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num
FramebufferManager::GetInstance()->PokeEFBColor(point.x, point.y, color);
}
}
else // if (type == POKE_Z)
else // if (type == EFBAccessType::PokeZ)
{
for (size_t i = 0; i < num_points; i++)
{