Clip Left and Right Sides option now taken into account when drawing messages on screen.
This commit is contained in:
parent
e64ce0f489
commit
a2490c3b10
|
@ -1,4 +1,5 @@
|
|||
---version 2.0.4 yet to be released---
|
||||
15-nov-2008 - adelikat - Clip Left and Right sides taken into account when drawing on screen (record/play/pause, lag & frame counters, messages, etc)
|
||||
15-nov-2008 - adelikat - win32 - Implemented Drap & Drop for movie files
|
||||
14-nov-2008 - adelikat - win32 Hex Editor - Dump Rom & Dump PPU to file Dialog - uses ROM to build default filename
|
||||
14-nov-2008 - adelikat - Win32 Memwatch - Save as dialog - uses ROM name to build default memwatch filename if there is no last used memwatch filename
|
||||
|
|
|
@ -156,7 +156,7 @@ void DrawMessage(bool beforeMovie)
|
|||
if(guiMessage.howlong <= 20) color = 0x1C;
|
||||
if(guiMessage.howlong <= 10) color = 0x11;
|
||||
if(guiMessage.howlong <= 5) color = 0x1;
|
||||
DrawTextTrans(t, 256, (uint8 *)guiMessage.errmsg, color+0x80);
|
||||
DrawTextTrans(ClipSidesOffset+t, 256, (uint8 *)guiMessage.errmsg, color+0x80);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -311,17 +311,17 @@ void FCEU_DrawRecordingStatus(uint8* XBuf)
|
|||
bool hasPlayRecIcon = false;
|
||||
if(FCEUMOV_Mode(MOVIEMODE_RECORD))
|
||||
{
|
||||
drawstatus(XBuf,2,28,0);
|
||||
drawstatus(XBuf-ClipSidesOffset,2,28,0);
|
||||
hasPlayRecIcon = true;
|
||||
}
|
||||
else if(FCEUMOV_Mode(MOVIEMODE_PLAY))
|
||||
{
|
||||
drawstatus(XBuf,1,28,0);
|
||||
drawstatus(XBuf-ClipSidesOffset,1,28,0);
|
||||
hasPlayRecIcon = true;
|
||||
}
|
||||
|
||||
if(FCEUI_EmulationPaused())
|
||||
drawstatus(XBuf,3,28,hasPlayRecIcon?-16:0);
|
||||
drawstatus(XBuf-ClipSidesOffset,3,28,hasPlayRecIcon?-16:0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ extern int AFon, AFoff, AutoFireOffset;
|
|||
extern int DesynchAutoFire;
|
||||
extern bool lagCounterDisplay;
|
||||
extern bool frameAdvanceLagSkip;
|
||||
extern int ClipSidesOffset;
|
||||
|
||||
extern uint8 gNoBGFillColor;
|
||||
|
||||
|
@ -206,7 +207,7 @@ static CFGSTRUCT fceuconfig[] = {
|
|||
AC(DesynchAutoFire),
|
||||
AC(lagCounterDisplay),
|
||||
AC(bindSavestate),
|
||||
|
||||
AC(ClipSidesOffset),
|
||||
//ACS(memwLastfile[2048]),
|
||||
ENDCFGSTRUCT
|
||||
};
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "../../drawing.h"
|
||||
#include "gui.h"
|
||||
#include "../../fceu.h"
|
||||
#include "../../video.h"
|
||||
|
||||
static int RecalcCustom(void);
|
||||
void InputScreenChanged(int fs);
|
||||
|
@ -1025,9 +1026,15 @@ BOOL CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
gornk:
|
||||
|
||||
if(IsDlgButtonChecked(hwndDlg,IDC_VIDEOCONFIG_CLIPSIDES)==BST_CHECKED)
|
||||
{
|
||||
eoptions|=EO_CLIPSIDES;
|
||||
ClipSidesOffset = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
eoptions&=~EO_CLIPSIDES;
|
||||
ClipSidesOffset = 0;
|
||||
}
|
||||
|
||||
if(IsDlgButtonChecked(hwndDlg,IDC_VIDEOCONFIG_NO8LIM)==BST_CHECKED)
|
||||
eoptions|=EO_NOSPRLIM;
|
||||
|
|
|
@ -946,14 +946,14 @@ void FCEU_DrawMovies(uint8 *XBuf)
|
|||
sprintf(counterbuf,"%d",currMovieData.records.size());
|
||||
|
||||
if(counterbuf[0])
|
||||
DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80);
|
||||
DrawTextTrans(ClipSidesOffset+XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80);
|
||||
}
|
||||
else
|
||||
{
|
||||
char counterbuf[32] = {0};
|
||||
sprintf(counterbuf,"%d (no movie)",currFrameCounter);
|
||||
if(counterbuf[0])
|
||||
DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80);
|
||||
DrawTextTrans(ClipSidesOffset+XBuf+FCEU_TextScanlineOffsetFromBottom(24), 256, (uint8*)counterbuf, 0x20+0x80);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -971,7 +971,7 @@ void FCEU_DrawLagCounter(uint8 *XBuf)
|
|||
sprintf(counterbuf,"%d",lagCounter);
|
||||
|
||||
if(counterbuf[0])
|
||||
DrawTextTrans(XBuf+FCEU_TextScanlineOffsetFromBottom(32), 256, (uint8*)counterbuf, color); //0x20+0x80
|
||||
DrawTextTrans(ClipSidesOffset+XBuf+FCEU_TextScanlineOffsetFromBottom(32), 256, (uint8*)counterbuf, color); //0x20+0x80
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -518,11 +518,11 @@ void DrawNSF(uint8 *XBuf)
|
|||
}
|
||||
}
|
||||
|
||||
DrawTextTrans(XBuf+10*256+4+(((31-strlen((char*)NSFHeader.SongName))<<2)), 256, NSFHeader.SongName, 6);
|
||||
DrawTextTrans(XBuf+26*256+4+(((31-strlen((char*)NSFHeader.Artist))<<2)), 256,NSFHeader.Artist, 6);
|
||||
DrawTextTrans(XBuf+42*256+4+(((31-strlen((char*)NSFHeader.Copyright))<<2)), 256,NSFHeader.Copyright, 6);
|
||||
DrawTextTrans(ClipSidesOffset+XBuf+10*256+4+(((31-strlen((char*)NSFHeader.SongName))<<2)), 256, NSFHeader.SongName, 6);
|
||||
DrawTextTrans(ClipSidesOffset+XBuf+26*256+4+(((31-strlen((char*)NSFHeader.Artist))<<2)), 256,NSFHeader.Artist, 6);
|
||||
DrawTextTrans(ClipSidesOffset+XBuf+42*256+4+(((31-strlen((char*)NSFHeader.Copyright))<<2)), 256,NSFHeader.Copyright, 6);
|
||||
|
||||
DrawTextTrans(XBuf+70*256+4+(((31-strlen("Song:"))<<2)), 256, (uint8*)"Song:", 6);
|
||||
DrawTextTrans(ClipSidesOffset+XBuf+70*256+4+(((31-strlen("Song:"))<<2)), 256, (uint8*)"Song:", 6);
|
||||
sprintf(snbuf,"<%d/%d>",CurrentSong,NSFHeader.TotalSongs);
|
||||
DrawTextTrans(XBuf+82*256+4+(((31-strlen(snbuf))<<2)), 256, (uint8*)snbuf, 6);
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
|
||||
uint8 *XBuf=NULL;
|
||||
uint8 *XBackBuf=NULL;
|
||||
int ClipSidesOffset=0; //Used to move displayed messages when Clips left and right sides is checked
|
||||
static uint8 *xbsave=NULL;
|
||||
|
||||
GUIMESSAGE guiMessage;
|
||||
|
@ -528,7 +529,7 @@ void ShowFPS(void)
|
|||
boop[boopcount] = FCEUD_GetTime();
|
||||
|
||||
sprintf(fpsmsg, "%8.1f",(double)booplimit / ((double)da / FCEUD_GetTimeFreq()));
|
||||
DrawTextTrans(XBuf + (256-8-8*8) + (FSettings.FirstSLine+4)*256,256,fpsmsg,4);
|
||||
DrawTextTrans(ClipSidesOffset+XBuf + (256-8-8*8) + (FSettings.FirstSLine+4)*256,256,fpsmsg,4);
|
||||
// It's not averaging FPS over exactly 1 second, but it's close enough.
|
||||
boopcount = (boopcount + 1) % booplimit;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ void FCEU_KillVirtualVideo(void);
|
|||
int SaveSnapshot(void);
|
||||
extern uint8 *XBuf;
|
||||
extern uint8 *XBackBuf;
|
||||
|
||||
extern int ClipSidesOffset;
|
||||
extern struct GUIMESSAGE
|
||||
{
|
||||
//countdown for gui messages
|
||||
|
|
Loading…
Reference in New Issue