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

98 lines
4.0 KiB
C
Raw Normal View History

2012-12-19 09:30:18 +00:00
/****************************************************************************
* *
2015-11-10 05:21:49 +00:00
* Project64 - A Nintendo 64 emulator. *
2012-12-19 09:30:18 +00:00
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
#include "PluginBase.h"
2012-12-19 09:30:18 +00:00
class CGfxPlugin : public CPlugin
2012-10-04 01:46:22 +00:00
{
2015-11-08 06:08:15 +00:00
typedef struct
{
/* Menu */
/* Items should have an ID between 5101 and 5200 */
void * hGFXMenu;
void(__cdecl *ProcessMenuItem) (int32_t ID);
2015-11-08 06:08:15 +00:00
/* Break Points */
int32_t UseBPoints;
char BPPanelName[20];
void(__cdecl *Add_BPoint) (void);
void(__cdecl *CreateBPPanel) (void * hDlg, void * rcBox);
void(__cdecl *HideBPPanel) (void);
void(__cdecl *PaintBPPanel) (void * ps);
void(__cdecl *ShowBPPanel) (void);
void(__cdecl *RefreshBpoints) (void * hList);
void(__cdecl *RemoveBpoint) (void * hList, int32_t index);
void(__cdecl *RemoveAllBpoint) (void);
2015-11-08 06:08:15 +00:00
/* GFX command Window */
void(__cdecl *Enter_GFX_Commands_Window) (void);
} GFXDEBUG_INFO;
2015-11-08 06:08:15 +00:00
typedef struct
{
void(__cdecl *UpdateBreakPoints)(void);
void(__cdecl *UpdateMemory)(void);
void(__cdecl *UpdateR4300iRegisters)(void);
void(__cdecl *Enter_BPoint_Window)(void);
void(__cdecl *Enter_R4300i_Commands_Window)(void);
void(__cdecl *Enter_R4300i_Register_Window)(void);
void(__cdecl *Enter_RSP_Commands_Window) (void);
void(__cdecl *Enter_Memory_Window)(void);
} DEBUG_INFO;
public:
2015-11-08 06:08:15 +00:00
CGfxPlugin(void);
~CGfxPlugin();
2015-11-08 06:08:15 +00:00
bool LoadFunctions(void);
bool Initiate(CN64System * System, RenderWindow * Window);
2015-11-08 06:08:15 +00:00
void(__cdecl *CaptureScreen) (const char *);
void(__cdecl *ChangeWindow) (void);
void(__cdecl *DrawScreen) (void);
void(__cdecl *DrawStatus) (const char * lpString, int32_t RightAlign);
void(__cdecl *MoveScreen) (int32_t xpos, int32_t ypos);
void(__cdecl *ProcessDList) (void);
void(__cdecl *ProcessRDPList) (void);
void(__cdecl *ShowCFB) (void);
void(__cdecl *UpdateScreen) (void);
void(__cdecl *ViStatusChanged) (void);
void(__cdecl *ViWidthChanged) (void);
void(__cdecl *SoftReset) (void);
2015-11-08 06:08:15 +00:00
//Rom Browser
void *(__cdecl * GetRomBrowserMenu) (void); /* Items should have an ID between 4101 and 4200 */
void(__cdecl * OnRomBrowserMenuItem) (int32_t MenuID, void * hParent, uint8_t * HEADER);
2015-11-08 06:08:15 +00:00
void * GetDebugMenu(void) { return m_GFXDebug.hGFXMenu; }
void ProcessMenuItem(int32_t id);
2012-10-04 01:46:22 +00:00
private:
2015-11-08 06:08:15 +00:00
CGfxPlugin(const CGfxPlugin&); // Disable copy constructor
CGfxPlugin& operator=(const CGfxPlugin&); // Disable assignment
2012-10-04 01:46:22 +00:00
2015-11-08 06:08:15 +00:00
virtual int32_t GetDefaultSettingStartRange() const { return FirstGfxDefaultSet; }
virtual int32_t GetSettingStartRange() const { return FirstGfxSettings; }
PLUGIN_TYPE type() { return PLUGIN_TYPE_GFX; }
2015-11-08 06:08:15 +00:00
void UnloadPluginDetails(void);
2012-10-04 01:46:22 +00:00
2015-11-08 06:08:15 +00:00
GFXDEBUG_INFO m_GFXDebug;
2012-10-04 01:46:22 +00:00
2015-11-08 06:08:15 +00:00
void(__cdecl *GetDebugInfo) (GFXDEBUG_INFO * GFXDebugInfo);
void(__cdecl *InitiateDebugger)(DEBUG_INFO DebugInfo);
2012-10-04 01:46:22 +00:00
2015-11-08 06:08:15 +00:00
static void __cdecl DummyDrawScreen(void) {}
static void __cdecl DummyMoveScreen(int32_t /*xpos*/, int32_t /*ypos*/) {}
static void __cdecl DummyViStatusChanged(void) {}
static void __cdecl DummyViWidthChanged(void) {}
static void __cdecl DummySoftReset(void) {}
};