Win32 - Name Table Viewer - Refresh value defaults to 15, refresh value stored in .cfg file.

This commit is contained in:
adelikat 2008-12-22 04:01:31 +00:00
parent db0925e13d
commit ce8a2d5a69
4 changed files with 17 additions and 6 deletions

View File

@ -1,4 +1,5 @@
---version 2.0.4 yet to be released--- ---version 2.0.4 yet to be released---
21-dec-2008 - adelikat - Win32 - Name Table Viewer - Refresh value default to 15, Refresh value stored in config file
21-dec-2008 - adelikat - Win32 - PPU Viewer - Refresh value default to 15, Refresh value stored in config file 21-dec-2008 - adelikat - Win32 - PPU Viewer - Refresh value default to 15, Refresh value stored in config file
19-dec-2008 - adelikat - Loadbackup function added, Win32 - Undo Loadstate context menu item 19-dec-2008 - adelikat - Loadbackup function added, Win32 - Undo Loadstate context menu item
19-dec-2008 - adelikat - Backup savestate is made before loading a state 19-dec-2008 - adelikat - Backup savestate is made before loading a state

View File

@ -49,6 +49,7 @@ extern int ClipSidesOffset;
extern bool movieSubtitles; extern bool movieSubtitles;
extern bool subtitlesOnAVI; extern bool subtitlesOnAVI;
extern int PPUViewRefresh; extern int PPUViewRefresh;
extern int NTViewRefresh;
extern uint8 gNoBGFillColor; extern uint8 gNoBGFillColor;
//window positions and sizes: //window positions and sizes:
@ -214,6 +215,7 @@ static CFGSTRUCT fceuconfig[] = {
AC(bindSavestate), AC(bindSavestate),
AC(ClipSidesOffset), AC(ClipSidesOffset),
AC(PPUViewRefresh), AC(PPUViewRefresh),
AC(NTViewRefresh),
//ACS(memwLastfile[2048]), //ACS(memwLastfile[2048]),
ENDCFGSTRUCT ENDCFGSTRUCT
}; };

View File

@ -48,7 +48,8 @@ int NTViewPosX,NTViewPosY;
static uint8 palcache[32]; //palette cache //mbg merge 7/19/06 needed to be static static uint8 palcache[32]; //palette cache //mbg merge 7/19/06 needed to be static
int NTViewScanline=0,NTViewer=0; int NTViewScanline=0,NTViewer=0;
int NTViewSkip,NTViewRefresh; int NTViewSkip;
int NTViewRefresh = 15;
static int mouse_x,mouse_y; //todo: is static needed here? --mbg 7/19/06 - i think so static int mouse_x,mouse_y; //todo: is static needed here? --mbg 7/19/06 - i think so
bool redrawtables = false; bool redrawtables = false;
int chrchanged = 0; int chrchanged = 0;

View File

@ -86,13 +86,19 @@ void DrawPatternTable(uint8 *bitmap, uint8 *table, uint8 pal) {
uint8 *pbitmap = bitmap; uint8 *pbitmap = bitmap;
pal <<= 2; pal <<= 2;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) //Columns
for (j = 0; j < 16; j++) { {
for (y = 0; y < 8; y++) { for (j = 0; j < 16; j++) //Rows
{
//-----------------------------------------------
///8x8 sprite
for (y = 0; y < 8; y++)
{
chr0 = table[index]; chr0 = table[index];
chr1 = table[index+8]; chr1 = table[index+8];
tmp=7; tmp=7;
for (x = 0; x < 8; x++) { for (x = 0; x < 8; x++)
{
p = (chr0>>tmp)&1; p = (chr0>>tmp)&1;
p |= ((chr1>>tmp)&1)<<1; p |= ((chr1>>tmp)&1)<<1;
p = palcache[p|pal]; p = palcache[p|pal];
@ -104,7 +110,8 @@ void DrawPatternTable(uint8 *bitmap, uint8 *table, uint8 pal) {
} }
index++; index++;
pbitmap += ((PALETTEBITWIDTH>>2)-24); pbitmap += ((PALETTEBITWIDTH>>2)-24);
} }
//------------------------------------------------
index+=8; index+=8;
pbitmap -= (((PALETTEBITWIDTH>>2)<<3)-24); pbitmap -= (((PALETTEBITWIDTH>>2)<<3)-24);
} }