mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-27 07:29:30 +00:00
Cleanup: renamed pointer to video functions to match coding style
* wsVideoUpdate -> g_pFuncVideoUpdate; * wsUpdateVideoText -> wsUpdateVideoText40 * wsUpdateVideoDblText -> wsUpdateVideoText80
This commit is contained in:
parent
713c29a9ab
commit
3459afb01b
|
@ -324,7 +324,7 @@ static DWORD Cpu6502 (DWORD uTotalCycles)
|
|||
|
||||
#ifdef WS_VIDEO
|
||||
uElapsedCycles = uExecutedCycles - uPreviousCycles;
|
||||
wsVideoUpdate(uElapsedCycles);
|
||||
g_pFuncVideoUpdate(uElapsedCycles);
|
||||
#endif
|
||||
|
||||
CheckInterruptSources(uExecutedCycles);
|
||||
|
|
|
@ -328,7 +328,7 @@ static DWORD Cpu65C02 (DWORD uTotalCycles)
|
|||
|
||||
#ifdef WS_VIDEO
|
||||
uElapsedCycles = uExecutedCycles - uPreviousCycles;
|
||||
wsVideoUpdate(uElapsedCycles);
|
||||
g_pFuncVideoUpdate(uElapsedCycles);
|
||||
#endif
|
||||
|
||||
CheckInterruptSources(uExecutedCycles);
|
||||
|
|
|
@ -2648,9 +2648,9 @@ void VideoBenchmark () {
|
|||
// SIMULATE THE ACTIVITY OF AN AVERAGE GAME
|
||||
DWORD totaltextfps = 0;
|
||||
#ifdef WS_VIDEO
|
||||
wsVideoUpdate = wsUpdateVideoText;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoText40;
|
||||
FillMemory(mem+0x400,0x400,0x14);
|
||||
wsVideoUpdate(17030);
|
||||
g_pFuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||
wsVideoRefresh();
|
||||
#else
|
||||
g_bVideoMode = VF_TEXT;
|
||||
|
@ -2667,7 +2667,7 @@ void VideoBenchmark () {
|
|||
else
|
||||
CopyMemory(mem+0x400,mem+((cycle & 2) ? 0x4000 : 0x6000),0x400);
|
||||
#ifdef WS_VIDEO
|
||||
wsVideoUpdate(17030);
|
||||
g_pFuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||
wsVideoRefresh();
|
||||
#else
|
||||
VideoRefreshScreen();
|
||||
|
@ -2682,9 +2682,9 @@ void VideoBenchmark () {
|
|||
// SIMULATE THE ACTIVITY OF AN AVERAGE GAME
|
||||
DWORD totalhiresfps = 0;
|
||||
#ifdef WS_VIDEO
|
||||
wsVideoUpdate = wsUpdateVideoHires;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoHires;
|
||||
FillMemory(mem+0x2000,0x2000,0x14);
|
||||
wsVideoUpdate(17030);
|
||||
g_pFuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||
wsVideoRefresh();
|
||||
#else
|
||||
g_bVideoMode = VF_HIRES;
|
||||
|
@ -2701,7 +2701,7 @@ void VideoBenchmark () {
|
|||
else
|
||||
CopyMemory(mem+0x2000,mem+((cycle & 2) ? 0x4000 : 0x6000),0x2000);
|
||||
#ifdef WS_VIDEO
|
||||
wsVideoUpdate(17030);
|
||||
g_pFuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||
wsVideoRefresh();
|
||||
#else
|
||||
VideoRefreshScreen();
|
||||
|
@ -2778,7 +2778,7 @@ void VideoBenchmark () {
|
|||
DWORD realisticfps = 0;
|
||||
FillMemory(mem+0x2000,0x2000,0xAA);
|
||||
#ifdef WS_VIDEO
|
||||
wsVideoUpdate(17030);
|
||||
g_pFuncVideoUpdate( VIDEO_SCANNER_6502_CYCLES );
|
||||
wsVideoRefresh();
|
||||
#else
|
||||
VideoRedrawScreen();
|
||||
|
@ -3423,8 +3423,8 @@ BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
|
|||
case 0x00: g_bVideoMode &= ~VF_MASK2; break;
|
||||
case 0x01: g_bVideoMode |= VF_MASK2; break;
|
||||
#ifdef WS_VIDEO
|
||||
case 0x0C: if (!IS_APPLE2) { g_bVideoMode &= ~VF_80COL; wsVideoText = wsUpdateVideoText; } break;
|
||||
case 0x0D: if (!IS_APPLE2) { g_bVideoMode |= VF_80COL; wsVideoText = wsUpdateVideoDblText; } break;
|
||||
case 0x0C: if (!IS_APPLE2) { g_bVideoMode &= ~VF_80COL; g_pFuncVideoText = wsUpdateVideoText40; } break;
|
||||
case 0x0D: if (!IS_APPLE2) { g_bVideoMode |= VF_80COL; g_pFuncVideoText = wsUpdateVideoText80; } break;
|
||||
case 0x0E: if (!IS_APPLE2) { g_nAltCharSetOffset = 0; wsVideoCharSet = 0; } break; // Alternate char set off
|
||||
case 0x0F: if (!IS_APPLE2) { g_nAltCharSetOffset = 256; wsVideoCharSet = 1; } break; // Alternate char set on
|
||||
case 0x50: g_bVideoMode &= ~VF_TEXT; break;
|
||||
|
@ -3461,27 +3461,27 @@ BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
|
|||
|
||||
if (g_bVideoMode & VF_TEXT) {
|
||||
if (g_bVideoMode & VF_80COL)
|
||||
wsVideoUpdate = wsUpdateVideoDblText;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoText80;
|
||||
else
|
||||
wsVideoUpdate = wsUpdateVideoText;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoText40;
|
||||
}
|
||||
else if (g_bVideoMode & VF_HIRES) {
|
||||
if (g_bVideoMode & VF_DHIRES)
|
||||
if (g_bVideoMode & VF_80COL)
|
||||
wsVideoUpdate = wsUpdateVideoDblHires;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoDblHires;
|
||||
else
|
||||
wsVideoUpdate = wsUpdateVideoHires0;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoHires0;
|
||||
else
|
||||
wsVideoUpdate = wsUpdateVideoHires;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoHires;
|
||||
}
|
||||
else {
|
||||
if (g_bVideoMode & VF_DHIRES)
|
||||
if (g_bVideoMode & VF_80COL)
|
||||
wsVideoUpdate = wsUpdateVideoDblLores;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoDblLores;
|
||||
else
|
||||
wsVideoUpdate = wsUpdateVideo7MLores;
|
||||
g_pFuncVideoUpdate = wsUpdateVideo7MLores;
|
||||
else
|
||||
wsVideoUpdate = wsUpdateVideoLores;
|
||||
g_pFuncVideoUpdate = wsUpdateVideoLores;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -815,7 +815,7 @@ void updateVideoHorzEOL()
|
|||
}
|
||||
}
|
||||
|
||||
void wsUpdateVideoText (long ticks)
|
||||
void wsUpdateVideoText40 (long ticks)
|
||||
{
|
||||
unsigned ad, bt;
|
||||
|
||||
|
@ -844,7 +844,7 @@ void wsUpdateVideoText (long ticks)
|
|||
}
|
||||
}
|
||||
|
||||
void wsUpdateVideoDblText (long ticks)
|
||||
void wsUpdateVideoText80 (long ticks)
|
||||
{
|
||||
unsigned int ad, bt, mbt, abt;
|
||||
|
||||
|
@ -884,7 +884,7 @@ void wsUpdateVideo7MLores (long ticks)
|
|||
|
||||
if (wsVideoMixed && g_nVideoClockVert >= VIDEO_SCANNER_Y_MIXED)
|
||||
{
|
||||
wsVideoText(ticks);
|
||||
g_pFuncVideoText(ticks);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -915,7 +915,7 @@ void wsUpdateVideoLores (long ticks)
|
|||
|
||||
if (wsVideoMixed && g_nVideoClockVert >= VIDEO_SCANNER_Y_MIXED)
|
||||
{
|
||||
wsVideoText(ticks);
|
||||
g_pFuncVideoText(ticks);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -946,7 +946,7 @@ void wsUpdateVideoDblLores (long ticks)
|
|||
|
||||
if (wsVideoMixed && g_nVideoClockVert >= VIDEO_SCANNER_Y_MIXED)
|
||||
{
|
||||
wsVideoText(ticks);
|
||||
g_pFuncVideoText(ticks);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -983,7 +983,7 @@ void wsUpdateVideoDblHires (long ticks)
|
|||
|
||||
if (wsVideoMixed && g_nVideoClockVert >= VIDEO_SCANNER_Y_MIXED)
|
||||
{
|
||||
wsVideoText(ticks);
|
||||
g_pFuncVideoText(ticks);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ void wsUpdateVideoHires (long ticks)
|
|||
|
||||
if (wsVideoMixed && g_nVideoClockVert >= VIDEO_SCANNER_Y_MIXED)
|
||||
{
|
||||
wsVideoText(ticks);
|
||||
g_pFuncVideoText(ticks);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1051,7 +1051,7 @@ void wsUpdateVideoHires0 (long ticks)
|
|||
|
||||
if (wsVideoMixed && g_nVideoClockVert >= VIDEO_SCANNER_Y_MIXED)
|
||||
{
|
||||
wsVideoText(ticks);
|
||||
g_pFuncVideoText(ticks);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1076,5 +1076,5 @@ void wsUpdateVideoHires0 (long ticks)
|
|||
}
|
||||
}
|
||||
|
||||
void (* wsVideoText)(long) = wsUpdateVideoText;
|
||||
void (* wsVideoUpdate)(long) = wsUpdateVideoText;
|
||||
void (* g_pFuncVideoText )(long) = wsUpdateVideoText40;
|
||||
void (* g_pFuncVideoUpdate)(long) = wsUpdateVideoText40;
|
||||
|
|
|
@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#ifndef WS_VIDEO
|
||||
#define WS_VIDEO
|
||||
|
||||
#define VIDEO_SCANNER_6502_CYCLES 17030
|
||||
|
||||
extern unsigned char * wsLines[384];
|
||||
|
||||
extern int wsTextPage;
|
||||
|
@ -30,8 +32,8 @@ extern int wsVideoCharSet;
|
|||
|
||||
void wsVideoInit();
|
||||
void wsVideoInitModel(int);
|
||||
void wsUpdateVideoText(long);
|
||||
void wsUpdateVideoDblText(long);
|
||||
void wsUpdateVideoText40(long);
|
||||
void wsUpdateVideoText80(long);
|
||||
|
||||
void wsUpdateVideoLores(long);
|
||||
void wsUpdateVideo7MLores(long);
|
||||
|
@ -41,8 +43,8 @@ void wsUpdateVideoHires(long);
|
|||
void wsUpdateVideoHires0(long);
|
||||
void wsUpdateVideoDblHires(long);
|
||||
|
||||
extern void (* wsVideoText)(long);
|
||||
extern void (* wsVideoUpdate)(long);
|
||||
extern void (* g_pFuncVideoText )(long); //wsVideoText)(long);
|
||||
extern void (* g_pFuncVideoUpdate)(long); // wsVideoUpdate)(long);
|
||||
|
||||
extern unsigned char wsVideoByte(unsigned long);
|
||||
extern void wsVideoRefresh();
|
||||
|
|
Loading…
Reference in New Issue
Block a user