Move all core types into namespaces (#1886)

* Reorganize namespaces

- Most types are now moved into the `melonDS` namespace
- Only good chance to do this for a while, since a big refactor is next

* Fix the build
This commit is contained in:
Jesse Talavera-Greenberg
2023-11-25 12:32:09 -05:00
committed by GitHub
parent 651b0f680c
commit 346dd4006e
178 changed files with 529 additions and 268 deletions

View File

@ -20,10 +20,11 @@
#include "GPU.h"
#include "GPU3D_OpenGL.h"
namespace melonDS
{
namespace GPU2D
{
SoftRenderer::SoftRenderer(Melon::GPU& gpu)
SoftRenderer::SoftRenderer(melonDS::GPU& gpu)
: Renderer2D(), GPU(gpu)
{
// initialize mosaic table
@ -368,7 +369,7 @@ void SoftRenderer::VBlankEnd(Unit* unitA, Unit* unitB)
{
if ((unitA->CaptureCnt & (1<<31)) && (((unitA->CaptureCnt >> 29) & 0x3) != 1))
{
reinterpret_cast<GPU3D::GLRenderer*>(GPU.GPU3D.GetCurrentRenderer())->PrepareCaptureFrame();
reinterpret_cast<GLRenderer*>(GPU.GPU3D.GetCurrentRenderer())->PrepareCaptureFrame();
}
}
#endif
@ -479,8 +480,8 @@ void SoftRenderer::DoCapture(u32 line, u32 width)
dstaddr &= 0xFFFF;
srcBaddr &= 0xFFFF;
static_assert(Melon::VRAMDirtyGranularity == 512);
GPU.VRAMDirty[dstvram][(dstaddr * 2) / Melon::VRAMDirtyGranularity] = true;
static_assert(VRAMDirtyGranularity == 512);
GPU.VRAMDirty[dstvram][(dstaddr * 2) / VRAMDirtyGranularity] = true;
switch ((captureCnt >> 29) & 0x3)
{
@ -2226,3 +2227,4 @@ void SoftRenderer::DrawSprite_Normal(u32 num, u32 width, u32 height, s32 xpos, s
}
}
}