Replace DWORD -> uint32_t. (PR #1350)

Some have been left where tightly coupled with the Win32 API.
This commit is contained in:
Andrea
2024-12-21 12:32:00 +00:00
committed by GitHub
parent 44babe9814
commit 35f176e4d8
69 changed files with 319 additions and 317 deletions
+11 -11
View File
@@ -341,7 +341,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
static BOOL g_bProfiling = 0;
static int g_nDebugSteps = 0;
static DWORD g_nDebugStepCycles = 0;
static uint32_t g_nDebugStepCycles = 0;
static int g_nDebugStepStart = 0;
static int g_nDebugStepUntil = -1; // HACK: MAGIC #
@@ -352,7 +352,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
static bool g_bTraceHeader = false; // semaphore, flag header to be printed
static bool g_bTraceFileWithVideoScanner = false;
DWORD extbench = 0;
uint32_t extbench = 0;
static bool g_bIgnoreNextKey = false;
@@ -783,7 +783,7 @@ Update_t CmdBenchmarkStop (int nArgs)
GetFrame().FrameRefreshStatus(DRAW_TITLE | DRAW_DISK_STATUS);
GetFrame().VideoRedrawScreen();
DWORD currtime = GetTickCount();
uint32_t currtime = GetTickCount();
while ((extbench = GetTickCount()) != currtime)
; // intentional busy-waiting
KeybQueueKeypress(TEXT(' ') ,ASCII);
@@ -2800,7 +2800,7 @@ Update_t CmdConfigSave (int nArgs)
{
void *pSrc;
int nLen;
DWORD nPut;
uint32_t nPut;
// FIXME: Should be saving in Text format, not binary!
@@ -6522,14 +6522,14 @@ bool ParseAssemblyListing ( bool bBytesToMemory, bool bAddSymbols )
g_nSourceAssembleBytes = 0;
g_nSourceAssemblySymbols = 0;
const DWORD INVALID_ADDRESS = _6502_MEM_END + 1;
const uint32_t INVALID_ADDRESS = _6502_MEM_END + 1;
int nLines = g_AssemblerSourceBuffer.GetNumLines();
for ( int iLine = 0; iLine < nLines; iLine++ )
{
g_AssemblerSourceBuffer.GetLine( iLine, sText, MAX_LINE - 1 );
DWORD nAddress = INVALID_ADDRESS;
uint32_t nAddress = INVALID_ADDRESS;
_tcscpy( sLine, sText );
char *p = sLine;
@@ -6620,7 +6620,7 @@ bool ParseAssemblyListing ( bool bBytesToMemory, bool bAddSymbols )
if (pAddress)
{
char *pAddressEnd;
nAddress = (DWORD) strtol( pAddress, &pAddressEnd, 16 );
nAddress = (uint32_t) strtol( pAddress, &pAddressEnd, 16 );
g_aSymbols[ SYMBOLS_SRC_2 ][ (WORD) nAddress] = sName;
g_nSourceAssemblySymbols++;
}
@@ -8852,7 +8852,7 @@ void DebugInitialize ()
AssemblerOff(); // update prompt
#if _DEBUG
DWORD nError = 0;
uint32_t nError = 0;
#endif
#if _DEBUG
@@ -9595,9 +9595,9 @@ void DebuggerCursorUpdate ()
return;
const int nUpdatesPerSecond = 4;
const DWORD nUpdateInternal_ms = 1000 / nUpdatesPerSecond;
static DWORD nBeg = GetTickCount(); // timeGetTime();
DWORD nNow = GetTickCount(); // timeGetTime();
const uint32_t nUpdateInternal_ms = 1000 / nUpdatesPerSecond;
static uint32_t nBeg = GetTickCount(); // timeGetTime();
uint32_t nNow = GetTickCount(); // timeGetTime();
if (((nNow - nBeg) >= nUpdateInternal_ms) && !DebugVideoMode::Instance().IsSet())
{
+1 -1
View File
@@ -20,7 +20,7 @@
extern bool g_bDebuggerEatKey;
// Benchmarking
extern DWORD extbench;
extern uint32_t extbench;
// Bookmarks
extern int g_nBookmarks;
+1 -1
View File
@@ -553,7 +553,7 @@ int _6502_GetOpmodeOpbyte ( const int nBaseAddress, int & iOpmode_, int & nOpby
if ( pData_ )
*pData_ = pData;
const DWORD nEndAddress = pData->nEndAddress;
const uint32_t nEndAddress = pData->nEndAddress;
const int nDisplayLen = nEndAddress - nBaseAddress + 1; // *inclusive* KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes()
nSlack = nDisplayLen;
+1 -1
View File
@@ -203,7 +203,7 @@ static void _SetupColorRamp(const int iPrimary, int & iColor_)
int nR = bR ? nC : 0;
int nG = bG ? nC : 0;
int nB = bB ? nC : 0;
DWORD nColor = RGB(nR, nG, nB);
uint32_t nColor = RGB(nR, nG, nB);
g_aColorPalette[iColor_] = nColor;
#if DEBUG_COLOR_RAMP
strRamp += StrFormat("RGB(%3d,%3d,%3d), ", nR, nG, nB);
+2 -2
View File
@@ -517,8 +517,8 @@ void FormatNopcodeBytes(WORD nBaseAddress, DisasmLine_t& line_)
// TODO: One day, line_.sTarget should become a std::string and things would be much simpler.
char* pDst = line_.sTarget;
const char* const pEnd = pDst + sizeof(line_.sTarget);
const DWORD nStartAddress = line_.pDisasmData->nStartAddress;
const DWORD nEndAddress = line_.pDisasmData->nEndAddress;
const uint32_t nStartAddress = line_.pDisasmData->nStartAddress;
const uint32_t nEndAddress = line_.pDisasmData->nEndAddress;
const int nDisplayLen = nEndAddress - nBaseAddress + 1; // *inclusive* KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes()
for (int iByte = 0; iByte < line_.nOpbyte; )
+2 -2
View File
@@ -231,7 +231,7 @@ enum WinROP4_e
*/
#if DEBUG_FONT_ROP
const DWORD aROP4[ 256 ] =
const uint32_t aROP4[ 256 ] =
{
0x00000042, // BLACKNESS
0x00010289, // DPSoon
@@ -647,7 +647,7 @@ void StretchBltMemToFrameDC(void)
GetDebuggerMemDC(), // HDC hdcSrc,
0, 0, // int nXOriginSrc, int nYOriginSrc,
GetVideo().GetFrameBufferBorderlessWidth(), GetVideo().GetFrameBufferBorderlessHeight(), // int nWidthSrc, int nHeightSrc,
SRCCOPY // DWORD dwRop
SRCCOPY // uint32_t dwRop
);
}
+1 -1
View File
@@ -575,7 +575,7 @@ int ParseSymbolTable(const std::string & pPathFileName, SymbolTable_Index_e eSym
// . SYMBOL =$0000; Comment
// . SYMBOL =$FFFF; Comment
//
DWORD nAddress = _6502_MEM_END + 1; // default to invalid address
uint32_t nAddress = _6502_MEM_END + 1; // default to invalid address
char sName[ MAX_SYMBOLS_LEN+1 ] = "";
const int MAX_LINE = 256;
+1 -1
View File
@@ -218,7 +218,7 @@
bool bTemp ; // If true then remove BP when hit or stepping cancelled (eg. G xxxx)
bool bHit ; // true when the breakpoint has just been hit
bool bStop ; // true if the debugger stops when it is hit
DWORD nHitCount; // number of times the breakpoint was hit
uint32_t nHitCount; // number of times the breakpoint was hit
};
typedef Breakpoint_t Bookmark_t;