2016-01-27 09:11:59 +00:00
|
|
|
#pragma once
|
|
|
|
#include <Project64-core/Plugins/PluginBase.h>
|
|
|
|
|
|
|
|
class CGfxPlugin : public CPlugin
|
|
|
|
{
|
|
|
|
typedef struct
|
|
|
|
{
|
2021-05-18 11:51:36 +00:00
|
|
|
// Menu
|
|
|
|
// Items should have an ID between 5101 and 5200
|
2016-01-27 09:11:59 +00:00
|
|
|
void * hGFXMenu;
|
|
|
|
void(CALL *ProcessMenuItem)(int32_t ID);
|
|
|
|
|
2021-05-18 11:51:36 +00:00
|
|
|
// Breakpoints
|
2016-01-27 09:11:59 +00:00
|
|
|
int32_t UseBPoints;
|
|
|
|
char BPPanelName[20];
|
|
|
|
void(CALL *Add_BPoint) (void);
|
|
|
|
void(CALL *CreateBPPanel) (void * hDlg, void * rcBox);
|
|
|
|
void(CALL *HideBPPanel) (void);
|
|
|
|
void(CALL *PaintBPPanel) (void * ps);
|
|
|
|
void(CALL *ShowBPPanel) (void);
|
|
|
|
void(CALL *RefreshBpoints) (void * hList);
|
|
|
|
void(CALL *RemoveBpoint) (void * hList, int32_t index);
|
|
|
|
void(CALL *RemoveAllBpoint) (void);
|
|
|
|
|
2021-05-18 11:51:36 +00:00
|
|
|
// GFX command window
|
2016-01-27 09:11:59 +00:00
|
|
|
void(CALL *Enter_GFX_Commands_Window)(void);
|
|
|
|
} GFXDEBUG_INFO;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
void(CALL *UpdateBreakPoints)(void);
|
|
|
|
void(CALL *UpdateMemory)(void);
|
|
|
|
void(CALL *UpdateR4300iRegisters)(void);
|
|
|
|
void(CALL *Enter_BPoint_Window)(void);
|
|
|
|
void(CALL *Enter_R4300i_Commands_Window)(void);
|
|
|
|
void(CALL *Enter_R4300i_Register_Window)(void);
|
|
|
|
void(CALL *Enter_RSP_Commands_Window)(void);
|
|
|
|
void(CALL *Enter_Memory_Window)(void);
|
|
|
|
} DEBUG_INFO;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CGfxPlugin(void);
|
|
|
|
~CGfxPlugin();
|
|
|
|
|
|
|
|
bool LoadFunctions(void);
|
|
|
|
bool Initiate(CN64System * System, RenderWindow * Window);
|
|
|
|
|
|
|
|
void(CALL *CaptureScreen) (const char *);
|
|
|
|
void(CALL *ChangeWindow) (void);
|
|
|
|
void(CALL *DrawScreen) (void);
|
|
|
|
void(CALL *DrawStatus) (const char * lpString, int32_t RightAlign);
|
|
|
|
void(CALL *MoveScreen) (int32_t xpos, int32_t ypos);
|
|
|
|
void(CALL *ProcessDList) (void);
|
|
|
|
void(CALL *ProcessRDPList) (void);
|
|
|
|
void(CALL *ShowCFB) (void);
|
|
|
|
void(CALL *UpdateScreen) (void);
|
|
|
|
void(CALL *ViStatusChanged) (void);
|
|
|
|
void(CALL *ViWidthChanged) (void);
|
|
|
|
void(CALL *SoftReset) (void);
|
2016-04-18 09:38:20 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
void(CALL *SurfaceCreated) (void);
|
|
|
|
void(CALL *SurfaceChanged) (int w, int h);
|
|
|
|
#endif
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2021-05-18 11:51:36 +00:00
|
|
|
// ROM browser
|
|
|
|
void *(CALL * GetRomBrowserMenu)(void); // Items should have an ID between 4101 and 4200
|
2016-01-27 09:11:59 +00:00
|
|
|
void(CALL * OnRomBrowserMenuItem)(int32_t MenuID, void * hParent, uint8_t * HEADER);
|
|
|
|
|
|
|
|
void * GetDebugMenu(void) { return m_GFXDebug.hGFXMenu; }
|
|
|
|
void ProcessMenuItem(int32_t id);
|
|
|
|
|
|
|
|
private:
|
2021-04-13 00:07:11 +00:00
|
|
|
CGfxPlugin(const CGfxPlugin&);
|
|
|
|
CGfxPlugin& operator=(const CGfxPlugin&);
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
virtual int32_t GetDefaultSettingStartRange() const { return FirstGfxDefaultSet; }
|
|
|
|
virtual int32_t GetSettingStartRange() const { return FirstGfxSettings; }
|
2022-06-27 10:02:38 +00:00
|
|
|
PLUGIN_TYPE type() { return PLUGIN_TYPE_VIDEO; }
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
void UnloadPluginDetails(void);
|
|
|
|
|
|
|
|
GFXDEBUG_INFO m_GFXDebug;
|
|
|
|
|
|
|
|
void(CALL *GetDebugInfo) (GFXDEBUG_INFO * GFXDebugInfo);
|
|
|
|
void(CALL *InitiateDebugger)(DEBUG_INFO DebugInfo);
|
|
|
|
|
2016-04-18 09:38:20 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
static void SwapBuffers(void);
|
|
|
|
#endif
|
2016-01-27 09:11:59 +00:00
|
|
|
static void CALL DummyDrawScreen(void) {}
|
|
|
|
static void CALL DummyMoveScreen(int32_t /*xpos*/, int32_t /*ypos*/) {}
|
|
|
|
static void CALL DummyViStatusChanged(void) {}
|
|
|
|
static void CALL DummyViWidthChanged(void) {}
|
|
|
|
static void CALL DummySoftReset(void) {}
|
2008-09-18 03:15:49 +00:00
|
|
|
};
|