project64/Source/Project64-core/Plugins/GFXPlugin.h

117 lines
3.2 KiB
C
Raw Normal View History

2016-01-27 09:11:59 +00:00
#pragma once
#include <Project64-core/Plugins/PluginBase.h>
class CGfxPlugin : public CPlugin
{
typedef struct
{
// Menu
// Items should have an ID between 5101 and 5200
2016-01-27 09:11:59 +00:00
void * hGFXMenu;
2022-10-10 00:22:17 +00:00
void(CALL * ProcessMenuItem)(int32_t ID);
2016-01-27 09:11:59 +00:00
// Breakpoints
2016-01-27 09:11:59 +00:00
int32_t UseBPoints;
char BPPanelName[20];
2022-10-10 00:22:17 +00:00
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);
2016-01-27 09:11:59 +00:00
// GFX command window
2022-10-10 00:22:17 +00:00
void(CALL * Enter_GFX_Commands_Window)(void);
2016-01-27 09:11:59 +00:00
} GFXDEBUG_INFO;
typedef struct
{
2022-10-10 00:22:17 +00:00
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);
2016-01-27 09:11:59 +00:00
} DEBUG_INFO;
public:
CGfxPlugin(void);
~CGfxPlugin();
bool LoadFunctions(void);
bool Initiate(CN64System * System, RenderWindow * Window);
2022-10-10 00:22:17 +00:00
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);
#ifdef ANDROID
2022-10-10 00:22:17 +00:00
void(CALL * SurfaceCreated)(void);
void(CALL * SurfaceChanged)(int w, int h);
#endif
2016-01-27 09:11:59 +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);
2022-10-10 00:22:17 +00:00
void * GetDebugMenu(void)
{
return m_GFXDebug.hGFXMenu;
}
2016-01-27 09:11:59 +00:00
void ProcessMenuItem(int32_t id);
private:
2022-10-10 00:22:17 +00:00
CGfxPlugin(const CGfxPlugin &);
CGfxPlugin & operator=(const CGfxPlugin &);
2016-01-27 09:11:59 +00:00
2022-10-10 00:22:17 +00:00
virtual int32_t GetDefaultSettingStartRange() const
{
return FirstGfxDefaultSet;
}
virtual int32_t GetSettingStartRange() const
{
return FirstGfxSettings;
}
PLUGIN_TYPE type()
{
return PLUGIN_TYPE_VIDEO;
}
2016-01-27 09:11:59 +00:00
void UnloadPluginDetails(void);
GFXDEBUG_INFO m_GFXDebug;
2022-10-10 00:22:17 +00:00
void(CALL * GetDebugInfo)(GFXDEBUG_INFO * GFXDebugInfo);
void(CALL * InitiateDebugger)(DEBUG_INFO DebugInfo);
2016-01-27 09:11:59 +00:00
#ifdef ANDROID
static void SwapBuffers(void);
#endif
2022-10-10 00:22:17 +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)
{
}
};