MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / CmdConfigColorMono

Function CmdConfigColorMono

source/Debugger/Debug.cpp:2878–2950  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

2876
2877//===========================================================================
2878Update_t CmdConfigColorMono (int nArgs)
2879{
2880 int iScheme = 0;
2881
2882 if (g_iCommand == CMD_CONFIG_COLOR)
2883 iScheme = SCHEME_COLOR;
2884 if (g_iCommand == CMD_CONFIG_MONOCHROME)
2885 iScheme = SCHEME_MONO;
2886 if (g_iCommand == CMD_CONFIG_BW)
2887 iScheme = SCHEME_BW;
2888
2889 if ((iScheme < 0) || (iScheme > NUM_COLOR_SCHEMES)) // sanity check
2890 iScheme = SCHEME_COLOR;
2891
2892 if (! nArgs)
2893 {
2894 g_iColorScheme = iScheme;
2895 UpdateDisplay( UPDATE_BACKGROUND );
2896 return UPDATE_ALL;
2897 }
2898
2899// if ((nArgs != 1) && (nArgs != 4))
2900 if (nArgs > 4)
2901 return HelpLastCommand();
2902
2903 int iColor = g_aArgs[ 1 ].nValue;
2904 if ((iColor < 0) || iColor >= NUM_DEBUG_COLORS)
2905 return HelpLastCommand();
2906
2907 int iParam;
2908 int nFound = FindParam( g_aArgs[ 1 ].sArg, MATCH_EXACT, iParam, _PARAM_GENERAL_BEGIN, _PARAM_GENERAL_END );
2909
2910 if (nFound)
2911 {
2912 if (iParam == PARAM_RESET)
2913 {
2914 ConfigColorsReset();
2915 ConsoleBufferPush( " Resetting colors." );
2916 }
2917 else
2918 if (iParam == PARAM_SAVE)
2919 {
2920 }
2921 else
2922 if (iParam == PARAM_LOAD)
2923 {
2924 }
2925 else
2926 return HelpLastCommand();
2927 }
2928 else
2929 {
2930 if (nArgs == 1)
2931 { // Dump Color
2932 _CmdColorGet( iScheme, iColor );
2933 return ConsoleUpdate();
2934 }
2935 else

Callers

nothing calls this directly

Calls 8

UpdateDisplayFunction · 0.85
HelpLastCommandFunction · 0.85
FindParamFunction · 0.85
ConfigColorsResetFunction · 0.85
_CmdColorGetFunction · 0.85
DebuggerSetColorFunction · 0.85
ConsoleBufferPushFunction · 0.70
ConsoleUpdateFunction · 0.70

Tested by

no test coverage detected