fix some warnings with newer gcc

This commit is contained in:
dinkc64 2018-12-10 09:00:32 -05:00
parent f3dcad1cf1
commit e13b5f75f7
5 changed files with 22 additions and 19 deletions

View File

@ -630,7 +630,7 @@ static void convert_dirty_grid_to_rects(atarimo_data *mo, const rectangle *clipr
/* initialize the rect list */
rectlist->numrects = 0;
rectlist->rect = mo->rectlist;
rect = &mo->rectlist[-1];
rect = NULL;
/* loop over all grid rows that intersect our cliprect */
for (y = sy; y <= ey; y++)
@ -649,7 +649,11 @@ static void convert_dirty_grid_to_rects(atarimo_data *mo, const rectangle *clipr
{
/* advance pointers */
rectlist->numrects++;
rect++;
if (rect == NULL) {
rect = &mo->rectlist[0];
} else {
rect++;
}
/* make a rect describing this grid square */
rect->min_x = x << mo->tilexshift;

View File

@ -384,7 +384,7 @@ static void GauntletSoundWrite(UINT16 Address, UINT8 Data)
switch (Address & 7)
{
case 0:
if (!Data&0x80) BurnYM2151Reset();
if (~Data&0x80) BurnYM2151Reset();
break;
case 1: // speech write, bit D7, active low

View File

@ -310,24 +310,23 @@ static void WolfUnitFromShift(UINT32 address, void *src)
static INT32 ScanlineRender(INT32 line, TMS34010Display *info)
{
if (!pBurnDraw)
return 0;
if (!pBurnDraw)
return 0;
if (info->rowaddr >= nScreenHeight)
return 0;
UINT16 *src = &DrvVRAM16[(info->rowaddr << 9) & 0x3FE00];
INT32 col = info->coladdr << 1;
UINT16 *dest = (UINT16*) pTransDraw + (info->rowaddr * nScreenWidth);
if (info->rowaddr >= nScreenHeight)
return 0;
const INT32 heblnk = info->heblnk;
const INT32 hsblnk = info->hsblnk;
for (INT32 x = heblnk; x < hsblnk; x++) {
dest[x - heblnk] = src[col++ & 0x1FF] & 0x7FFF;
}
INT32 col = info->coladdr << 1;
UINT16 *dest = (UINT16*) pTransDraw + (info->rowaddr * nScreenWidth);
const INT32 heblnk = info->heblnk;
const INT32 hsblnk = info->hsblnk;
for (INT32 x = heblnk; x < hsblnk; x++) {
dest[x - heblnk] = src[col++ & 0x1FF] & 0x7FFF;
}
return 0;
return 0;
}

View File

@ -183,7 +183,7 @@ void TMS34010MapMemory(UINT8 *mem, UINT32 start, UINT32 end, UINT8 type)
}
}
void TMS34010MapHandler(UINT32 num, UINT32 start, UINT32 end, UINT8 type)
void TMS34010MapHandler(uintptr_t num, UINT32 start, UINT32 end, UINT8 type)
{
const int max_pages = (PFN(end) - PFN(start)) + 1;

View File

@ -39,7 +39,7 @@ UINT16 TMS34010ReadWord(UINT32 address);
void TMS34010WriteWord(UINT32 address, UINT16 value);
void TMS34010MapReset();
void TMS34010MapMemory(UINT8 *mem, UINT32 start, UINT32 end, UINT8 type);
void TMS34010MapHandler(UINT32 num, UINT32 start, UINT32 end, UINT8 type);
void TMS34010MapHandler(uintptr_t num, UINT32 start, UINT32 end, UINT8 type);
int TMS34010SetReadHandler(UINT32 num, pTMS34010ReadHandler handler);
int TMS34010SetWriteHandler(UINT32 num, pTMS34010WriteHandler handler);
int TMS34010SetHandlers(UINT32 num, pTMS34010ReadHandler rhandler, pTMS34010WriteHandler whandler);