revert d_gberet.cpp for release

This commit is contained in:
dinkc64 2014-10-21 11:37:18 +00:00
parent 22874ce3d1
commit 8fee239356
1 changed files with 14 additions and 9 deletions

View File

@ -6,7 +6,7 @@
#include "sn76496.h"
static UINT8 *Mem, *MemEnd, *Rom, *Gfx0, *Gfx1, *Prom;
static UINT32 *DrvPalette;
static UINT32 *Palette, *DrvPalette;
static UINT8 DrvRecalcPal;
static UINT8 DrvJoy1[8], DrvJoy2[8], DrvJoy3[8], DrvDips[4], DrvReset;
@ -507,6 +507,7 @@ static INT32 MemIndex()
Prom = Next; Next += 0x00220;
Palette = (UINT32*)Next; Next += 0x00200 * sizeof(UINT32);
DrvPalette = (UINT32*)Next; Next += 0x00200 * sizeof(UINT32);
MemEnd = Next;
@ -514,7 +515,7 @@ static INT32 MemIndex()
return 0;
}
static void DrvPaletteInit()
static void DrvCreatePalette()
{
UINT32 tmp[0x20];
@ -541,15 +542,17 @@ static void DrvPaletteInit()
tmp[i] = (r << 16) | (g << 8) | b;
}
Prom += 0x20;
for (INT32 i = 0; i < 0x100; i++)
{
UINT8 ctabentry;
ctabentry = (Prom[0x020 + i] & 0x0f) | 0x10;
DrvPalette[0x000 + i] = BurnHighCol((tmp[ctabentry]>>16)&0xff,(tmp[ctabentry]>>8)&0xff,(tmp[ctabentry]>>0)&0xff,0);
ctabentry = (Prom[0x000 + i] & 0x0f) | 0x10;
Palette[0x000 + i] = tmp[ctabentry];
ctabentry = (Prom[0x120 + i] & 0x0f);
DrvPalette[0x100 + i] = BurnHighCol((tmp[ctabentry]>>16)&0xff,(tmp[ctabentry]>>8)&0xff,(tmp[ctabentry]>>0)&0xff,0);
ctabentry = (Prom[0x100 + i] & 0x0f);
Palette[0x100 + i] = tmp[ctabentry];
}
}
@ -660,7 +663,7 @@ static INT32 DrvInit()
} else {
DrvGfxDecode();
}
DrvPaletteInit();
DrvCreatePalette();
ZetInit(0);
ZetOpen(0);
@ -823,8 +826,9 @@ static void gberetb_draw_sprites()
static INT32 DrvDraw()
{
if (DrvRecalcPal) {
DrvPaletteInit();
DrvRecalcPal = 0;
for (INT32 i = 0; i < 0x200; i++) {
DrvPalette[i] = BurnHighCol(Palette[i] >> 16, Palette[i] >> 8, Palette[i], 0);
}
}
for (INT32 offs = 0x40; offs < 0x7c0; offs++)
@ -928,6 +932,7 @@ static INT32 DrvFrame()
ZetClose();
// Make sure the buffer is entirely filled.
if (pBurnSoundOut) {
INT32 nSegmentLength = nBurnSoundLen - nSoundBufferPos;
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);