2.9.0.8 ===========================================================================
| 2627 | // 2.9.0.8 |
| 2628 | //=========================================================================== |
| 2629 | void _DrawTriStateSoftSwitch( RECT & rect, int nAddress, const int iBankDisplay, int iActive, char *sPrefix, char *sOn, char *sOff, const char *sSuffix = NULL, int bg_default = BG_INFO ) |
| 2630 | { |
| 2631 | // if ((iActive == 0) || (iBankDisplay == iActive)) |
| 2632 | bool bSet = (iBankDisplay == iActive); |
| 2633 | |
| 2634 | if ( bSet ) |
| 2635 | _DrawSoftSwitch( rect, nAddress, bSet, NULL, sOn, sOff, " ", bg_default ); |
| 2636 | else // Main Memory is active, or Bank # is not active |
| 2637 | { |
| 2638 | RECT temp = rect; |
| 2639 | int iBank = (GetMemMode() & MF_BANK2) |
| 2640 | ? 2 |
| 2641 | : 1 |
| 2642 | ; |
| 2643 | bool bDisabled = ((iActive == 0) && (iBank == iBankDisplay)); |
| 2644 | |
| 2645 | |
| 2646 | _DrawSoftSwitchAddress( temp, nAddress, bg_default ); |
| 2647 | |
| 2648 | // TODO: Q. Show which bank we are writing to in red? |
| 2649 | // A. No, since we highlight bank 2 or 1, along with R/W |
| 2650 | DebuggerSetColorBG( DebuggerGetColor( bg_default )); |
| 2651 | if ( bDisabled ) |
| 2652 | DebuggerSetColorFG( DebuggerGetColor( FG_INFO_TITLE ) ); |
| 2653 | else |
| 2654 | DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_OPERATOR ) ); |
| 2655 | |
| 2656 | PrintTextCursorX( sOn , temp ); |
| 2657 | PrintTextCursorX( "/" , temp ); |
| 2658 | |
| 2659 | ColorizeFlags( bDisabled, bg_default, FG_DISASM_OPERATOR ); |
| 2660 | PrintTextCursorX( sOff, temp ); |
| 2661 | |
| 2662 | DebuggerSetColorBG( DebuggerGetColor( bg_default )); |
| 2663 | DebuggerSetColorFG( DebuggerGetColor( FG_INFO_TITLE )); |
| 2664 | PrintTextCursorX( " " , temp ); |
| 2665 | |
| 2666 | rect.top += g_nFontHeight; |
| 2667 | rect.bottom += g_nFontHeight; |
| 2668 | } |
| 2669 | } |
| 2670 | |
| 2671 | /* |
| 2672 | Debugger: Support LC status and memory |
no test coverage detected