Added variadic variants of ConsolePrint(), ConsoleBufferPush() to make code cleaner. Also added ConsoleColorizePrint() and variants.

This commit is contained in:
Kelvin Lee
2016-09-10 22:46:09 +10:00
committed by tomcw
parent 5e59f11625
commit 0992cf16c4
7 changed files with 416 additions and 480 deletions

View File

@@ -191,7 +191,6 @@ Update_t CmdDisasmDataList (int nArgs)
// Need to iterate through all blocks
DisasmData_t* pData = NULL;
char sText[ CONSOLE_WIDTH * 2 ];
while( pData = Disassembly_Enumerate( pData ) )
{
@@ -199,9 +198,10 @@ Update_t CmdDisasmDataList (int nArgs)
{
int nLen = strlen( pData->sSymbol );
char sText[CONSOLE_WIDTH * 2];
// <smbol> <type> <start>:<end>
// `TEST `300`:`320
sprintf( sText, "%s%s %s%*s %s%04X%s:%s%04X"
ConsolePrintFormat( sText, "%s%s %s%*s %s%04X%s:%s%04X"
, CHC_CATEGORY
, g_aNopcodeTypes[ pData->eElementType ]
, (nLen > 0) ? CHC_SYMBOL : CHC_DEFAULT
@@ -213,7 +213,6 @@ Update_t CmdDisasmDataList (int nArgs)
, CHC_ADDRESS
, pData->nEndAddress // Disassembly_IsDataAddress() is *inclusive* // KEEP IN SYNC: _CmdDefineByteRange() CmdDisasmDataList() _6502_GetOpmodeOpbyte() FormatNopcodeBytes()
);
ConsolePrint( sText );
}
}