From 89162c784eb63b40e134d223e53c26dca788f831 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sun, 14 Feb 2016 17:03:35 +1100 Subject: [PATCH] [RSP] Fix compile issues --- Source/RSP/Cpu.c | 2 +- Source/RSP/Cpu.h | 2 +- Source/RSP/Main.cpp | 4 ++-- Source/RSP/Rsp.h | 1 + Source/RSP/breakpoint.c | 6 +++--- Source/RSP/breakpoint.h | 9 +++++---- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Source/RSP/Cpu.c b/Source/RSP/Cpu.c index ea34c8318..857df9344 100644 --- a/Source/RSP/Cpu.c +++ b/Source/RSP/Cpu.c @@ -41,7 +41,7 @@ UDWORD EleSpec[32], Indx[32]; OPCODE RSPOpC; -DWORD *PrgCount, NextInstruction, RSP_Running, RSP_MfStatusCount; +uint32_t *PrgCount, NextInstruction, RSP_Running, RSP_MfStatusCount; p_func RSP_Opcode[64]; p_func RSP_RegImm[32]; diff --git a/Source/RSP/Cpu.h b/Source/RSP/Cpu.h index 22e620de8..d5c409598 100644 --- a/Source/RSP/Cpu.h +++ b/Source/RSP/Cpu.h @@ -36,7 +36,7 @@ extern p_func RSP_Cop2[32]; extern p_func RSP_Vector[64]; extern p_func RSP_Lc2[32]; extern p_func RSP_Sc2[32]; -extern DWORD * PrgCount, RSP_Running; +extern uint32_t * PrgCount, RSP_Running; extern OPCODE RSPOpC; void SetCPU(DWORD core); diff --git a/Source/RSP/Main.cpp b/Source/RSP/Main.cpp index 162e7b2c7..b5eb76b62 100644 --- a/Source/RSP/Main.cpp +++ b/Source/RSP/Main.cpp @@ -240,7 +240,7 @@ __declspec(dllexport) void GetRspDebugInfo ( RSPDEBUG_INFO * DebugInfo ) { if (hRSPMenu == NULL) { - hRSPMenu = LoadMenu(hinstDLL,MAKEINTRESOURCE(RspMenu)); + hRSPMenu = LoadMenu((HINSTANCE)hinstDLL,MAKEINTRESOURCE(RspMenu)); FixMenuState(); } DebugInfo->hRSPMenu = hRSPMenu; @@ -435,7 +435,7 @@ void ProcessMenuItem(int ID) } break; case ID_COMPILER: - DialogBox(hinstDLL, "RSPCOMPILER", HWND_DESKTOP, (DLGPROC)CompilerDlgProc); + DialogBox((HINSTANCE)hinstDLL, "RSPCOMPILER", HWND_DESKTOP, (DLGPROC)CompilerDlgProc); break; case ID_BREAKONSTARTOFTASK: { diff --git a/Source/RSP/Rsp.h b/Source/RSP/Rsp.h index 9d242d131..91da28783 100644 --- a/Source/RSP/Rsp.h +++ b/Source/RSP/Rsp.h @@ -23,6 +23,7 @@ * should be forwarded to them so if they want them. * */ +#pragma once #if defined(__cplusplus) extern "C" { diff --git a/Source/RSP/breakpoint.c b/Source/RSP/breakpoint.c index ec9793662..2a980896e 100644 --- a/Source/RSP/breakpoint.c +++ b/Source/RSP/breakpoint.c @@ -99,7 +99,7 @@ int CheckForRSPBPoint ( DWORD Location ) return FALSE; } -void CreateBPPanel ( HWND hDlg, RECT rcBox ) +void CreateBPPanel ( void * hDlg, rectangle rcBox ) { if (hRSPLocation != NULL) { return; } @@ -124,7 +124,7 @@ void HideBPPanel ( void ) ShowWindow(hRSPLocation,FALSE); } -void PaintBPPanel ( PAINTSTRUCT ps ) +void PaintBPPanel ( window_paint ps ) { TextOut( ps.hdc, 29,60,"Break when the Program Counter equals",37); TextOut( ps.hdc, 59,85,"0x",2); @@ -135,7 +135,7 @@ void ShowBPPanel ( void ) ShowWindow(hRSPLocation,TRUE); } -void RefreshBpoints ( HWND hList ) +void RefreshBpoints ( void * hList ) { char Message[100]; LRESULT location; diff --git a/Source/RSP/breakpoint.h b/Source/RSP/breakpoint.h index fdc05f901..1034b9b73 100644 --- a/Source/RSP/breakpoint.h +++ b/Source/RSP/breakpoint.h @@ -23,6 +23,7 @@ * should be forwarded to them so if they want them. * */ +#include "Rsp.h" #define MaxBPoints 0x30 @@ -34,12 +35,12 @@ BPOINT BPoint[MaxBPoints]; int NoOfBpoints; void Add_BPoint ( void ); -void CreateBPPanel ( HWND hDlg, RECT rcBox ); +void CreateBPPanel ( void * hDlg, rectangle rcBox ); void HideBPPanel ( void ); -void PaintBPPanel ( PAINTSTRUCT ps ); +void PaintBPPanel ( window_paint ps ); void ShowBPPanel ( void ); -void RefreshBpoints ( HWND hList ); -void RemoveBpoint ( HWND hList, int index ); +void RefreshBpoints ( void * hList ); +void RemoveBpoint ( void * hList, int index ); void RemoveAllBpoint ( void ); int AddRSP_BPoint ( DWORD Location, int Confirm );