mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-07-01 03:29:31 +00:00
Remove redundant code relating to SetCharseType() and g_nCharsetType
This commit is contained in:
parent
d243425c20
commit
739afea01a
|
@ -492,25 +492,6 @@ static void LoadConfigOldJoystick(const UINT uJoyNum)
|
||||||
JoySetJoyType(uJoyNum, uNewJoyType);
|
JoySetJoyType(uJoyNum, uNewJoyType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sets the character set for the Apple model/clone
|
|
||||||
void SetCharsetType(void)
|
|
||||||
{
|
|
||||||
switch ( GetApple2Type() )
|
|
||||||
{
|
|
||||||
case A2TYPE_APPLE2: g_nCharsetType = 0; break;
|
|
||||||
case A2TYPE_APPLE2PLUS: g_nCharsetType = 0; break;
|
|
||||||
case A2TYPE_APPLE2E: g_nCharsetType = 0; break;
|
|
||||||
case A2TYPE_APPLE2EENHANCED:g_nCharsetType = 0; break;
|
|
||||||
case A2TYPE_TK30002E: g_nCharsetType = 0; break;
|
|
||||||
case A2TYPE_PRAVETS82: g_nCharsetType = 1; break;
|
|
||||||
case A2TYPE_PRAVETS8M: g_nCharsetType = 2; break; //This charset has a very small difference with the PRAVETS82 one, and probably has some misplaced characters.
|
|
||||||
case A2TYPE_PRAVETS8A: g_nCharsetType = 3; break;
|
|
||||||
default:
|
|
||||||
_ASSERT(0);
|
|
||||||
g_nCharsetType = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Reads configuration from the registry entries
|
//Reads configuration from the registry entries
|
||||||
void LoadConfiguration(void)
|
void LoadConfiguration(void)
|
||||||
{
|
{
|
||||||
|
@ -542,7 +523,6 @@ void LoadConfiguration(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
SetApple2Type(apple2Type);
|
SetApple2Type(apple2Type);
|
||||||
SetCharsetType();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ void LogFileTimeUntilFirstKeyRead(void);
|
||||||
|
|
||||||
void SetCurrentCLK6502();
|
void SetCurrentCLK6502();
|
||||||
bool SetCurrentImageDir(const char* pszImageDir);
|
bool SetCurrentImageDir(const char* pszImageDir);
|
||||||
void SetCharsetType(void);
|
|
||||||
|
|
||||||
extern const UINT16* GetAppleWinVersion(void);
|
extern const UINT16* GetAppleWinVersion(void);
|
||||||
extern char VERSIONSTRING[]; // Constructed in WinMain()
|
extern char VERSIONSTRING[]; // Constructed in WinMain()
|
||||||
|
|
|
@ -141,7 +141,6 @@ static HWND tooltipwindow = (HWND)0;
|
||||||
static BOOL g_bUsingCursor = 0; // 1=AppleWin is using (hiding) the mouse-cursor
|
static BOOL g_bUsingCursor = 0; // 1=AppleWin is using (hiding) the mouse-cursor
|
||||||
static int viewportx = VIEWPORTX; // Default to Normal (non-FullScreen) mode
|
static int viewportx = VIEWPORTX; // Default to Normal (non-FullScreen) mode
|
||||||
static int viewporty = VIEWPORTY; // Default to Normal (non-FullScreen) mode
|
static int viewporty = VIEWPORTY; // Default to Normal (non-FullScreen) mode
|
||||||
int g_nCharsetType = 0;
|
|
||||||
|
|
||||||
// Direct Draw -- For Full Screen
|
// Direct Draw -- For Full Screen
|
||||||
LPDIRECTDRAW g_pDD = (LPDIRECTDRAW)0;
|
LPDIRECTDRAW g_pDD = (LPDIRECTDRAW)0;
|
||||||
|
@ -1202,41 +1201,27 @@ LRESULT CALLBACK FrameWndProc (
|
||||||
}
|
}
|
||||||
else if (wparam == VK_F9)
|
else if (wparam == VK_F9)
|
||||||
{
|
{
|
||||||
//bool bCtrlDown = (GetKeyState(VK_CONTROL) < 0) ? true : false;
|
// F9 Next Video Mode
|
||||||
//bool bShiftDown = (GetKeyState(VK_SHIFT ) < 0) ? true : false;
|
// SHIFT+F9 Prev Video Mode
|
||||||
|
// CTRL+SHIFT+F9 Toggle 50% Scan Lines
|
||||||
|
// ALT+F9 Can't use Alt-F9 as Alt is Open-Apple = Joystick Button #1
|
||||||
|
|
||||||
// F9 Next Video Mode
|
if ( !g_bCtrlKey && !g_bShiftKey ) // F9
|
||||||
// ^F9 Next Char Set
|
|
||||||
// #F9 Prev Video Mode
|
|
||||||
// ^#F9 Toggle 50% Scan Lines
|
|
||||||
// @F9 -Can't use Alt-F9 as Alt is Open-Apple = Joystick Button #1
|
|
||||||
|
|
||||||
if ( g_bCtrlKey && !g_bShiftKey ) //CTRL+F9
|
|
||||||
{
|
|
||||||
g_nCharsetType++; // Cycle through available charsets (Ctrl + F9)
|
|
||||||
if (g_nCharsetType >= 3)
|
|
||||||
{
|
|
||||||
g_nCharsetType = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // Cycle through available video modes
|
|
||||||
if ( g_bCtrlKey && g_bShiftKey ) // ALT+F9
|
|
||||||
{
|
|
||||||
g_uHalfScanLines = !g_uHalfScanLines;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if ( !g_bShiftKey ) // Drop Down Combo Box is in correct order
|
|
||||||
{
|
{
|
||||||
g_eVideoType++;
|
g_eVideoType++;
|
||||||
if (g_eVideoType >= NUM_VIDEO_MODES)
|
if (g_eVideoType >= NUM_VIDEO_MODES)
|
||||||
g_eVideoType = 0;
|
g_eVideoType = 0;
|
||||||
}
|
}
|
||||||
else // Forwards
|
else if ( !g_bCtrlKey && g_bShiftKey ) // SHIFT+F9
|
||||||
{
|
{
|
||||||
if (g_eVideoType <= 0)
|
if (g_eVideoType <= 0)
|
||||||
g_eVideoType = NUM_VIDEO_MODES;
|
g_eVideoType = NUM_VIDEO_MODES;
|
||||||
g_eVideoType--;
|
g_eVideoType--;
|
||||||
}
|
}
|
||||||
|
else if ( g_bCtrlKey && g_bShiftKey ) // CTRL+SHIFT+F9
|
||||||
|
{
|
||||||
|
g_uHalfScanLines = !g_uHalfScanLines;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Clean up code:FrameRefreshStatus(DRAW_TITLE) DrawStatusArea((HDC)0,DRAW_TITLE)
|
// TODO: Clean up code:FrameRefreshStatus(DRAW_TITLE) DrawStatusArea((HDC)0,DRAW_TITLE)
|
||||||
DrawStatusArea( (HDC)0, DRAW_TITLE );
|
DrawStatusArea( (HDC)0, DRAW_TITLE );
|
||||||
|
@ -1260,7 +1245,6 @@ LRESULT CALLBACK FrameWndProc (
|
||||||
|
|
||||||
Config_Save_Video();
|
Config_Save_Video();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ((wparam == VK_F11) && (GetKeyState(VK_CONTROL) >= 0)) // Save state (F11)
|
else if ((wparam == VK_F11) && (GetKeyState(VK_CONTROL) >= 0)) // Save state (F11)
|
||||||
{
|
{
|
||||||
SoundCore_SetFade(FADE_OUT);
|
SoundCore_SetFade(FADE_OUT);
|
||||||
|
|
|
@ -210,7 +210,6 @@ static void Snapshot_LoadState_v1() // .aws v1.0.0.1, up to (and including) Appl
|
||||||
MemUpdatePaging(TRUE);
|
MemUpdatePaging(TRUE);
|
||||||
|
|
||||||
// NB. g_Apple2Type doesn't change for v1, but replicate this (like v2)
|
// NB. g_Apple2Type doesn't change for v1, but replicate this (like v2)
|
||||||
SetCharsetType();
|
|
||||||
VideoReinitialize(); // g_CharsetType changed
|
VideoReinitialize(); // g_CharsetType changed
|
||||||
FrameUpdateApple2Type();
|
FrameUpdateApple2Type();
|
||||||
}
|
}
|
||||||
|
@ -339,7 +338,6 @@ static void ParseUnitApple2(YamlLoadHelper& yamlLoadHelper, UINT version)
|
||||||
MemLoadSnapshot(yamlLoadHelper);
|
MemLoadSnapshot(yamlLoadHelper);
|
||||||
|
|
||||||
// g_Apple2Type may've changed: so redraw frame (title, buttons, leds, etc)
|
// g_Apple2Type may've changed: so redraw frame (title, buttons, leds, etc)
|
||||||
SetCharsetType();
|
|
||||||
VideoReinitialize(); // g_CharsetType changed
|
VideoReinitialize(); // g_CharsetType changed
|
||||||
FrameUpdateApple2Type();
|
FrameUpdateApple2Type();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user