mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
Refactor the GPU to be object-oriented (#1873)
* Refactor GPU3D to be an object - Who has two thumbs and is the sworn enemy of global state? This guy! * Refactor GPU itself to be an object - Wow, it's used in a lot of places - Also introduce a new `Melon` namespace for a few classes - I expect other classes will be moved into `Melon` over time * Change signature of Renderer3D::SetRenderSettings - Make it noexcept, and its argument const * Remove some stray whitespace
This commit is contained in:

committed by
GitHub

parent
88072a02c5
commit
4558be0d8e
13
src/ARM.h
13
src/ARM.h
@ -42,13 +42,18 @@ enum
|
||||
const u32 ITCMPhysicalSize = 0x8000;
|
||||
const u32 DTCMPhysicalSize = 0x4000;
|
||||
|
||||
namespace Melon
|
||||
{
|
||||
class GPU;
|
||||
}
|
||||
|
||||
class ARM
|
||||
#ifdef GDBSTUB_ENABLED
|
||||
: public Gdb::StubCallbacks
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
ARM(u32 num);
|
||||
ARM(u32 num, Melon::GPU& gpu);
|
||||
virtual ~ARM(); // destroy shit
|
||||
|
||||
virtual void Reset();
|
||||
@ -209,12 +214,14 @@ protected:
|
||||
void GdbCheckA();
|
||||
void GdbCheckB();
|
||||
void GdbCheckC();
|
||||
private:
|
||||
Melon::GPU& GPU;
|
||||
};
|
||||
|
||||
class ARMv5 : public ARM
|
||||
{
|
||||
public:
|
||||
ARMv5();
|
||||
ARMv5(Melon::GPU& gpu);
|
||||
~ARMv5();
|
||||
|
||||
void Reset() override;
|
||||
@ -358,7 +365,7 @@ public:
|
||||
class ARMv4 : public ARM
|
||||
{
|
||||
public:
|
||||
ARMv4();
|
||||
ARMv4(Melon::GPU& gpu);
|
||||
|
||||
void Reset() override;
|
||||
|
||||
|
Reference in New Issue
Block a user