1 //============================================================================ 2 // 3 // SSSS tt lll lll 4 // SS SS tt ll ll 5 // SS tttttt eeee ll ll aaaa 6 // SSSS tt ee ee ll ll aa 7 // SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" 8 // SS SS tt ee ll ll aa aa 9 // SSSS ttt eeeee llll llll aaaaa 10 // 11 // Copyright (c) 1995-2021 by Bradford W. Mott, Stephen Anthony 12 // and the Stella Team 13 // 14 // See the file "License.txt" for information on usage and redistribution of 15 // this file, and for a DISCLAIMER OF ALL WARRANTIES. 16 //============================================================================ 17 18 #ifndef FRAMEBUFFER_CONSTANTS_HXX 19 #define FRAMEBUFFER_CONSTANTS_HXX 20 21 #include "TIAConstants.hxx" 22 #include "bspf.hxx" 23 24 // Minimum size for a framebuffer window 25 namespace FBMinimum { 26 static constexpr uInt32 Width = TIAConstants::viewableWidth * 2; 27 static constexpr uInt32 Height = TIAConstants::viewableHeight * 2; 28 } 29 30 // Return values for initialization of framebuffer window 31 enum class FBInitStatus { 32 Success, 33 FailComplete, 34 FailTooLarge, 35 FailNotSupported 36 }; 37 38 enum class BufferType { 39 None, 40 Launcher, 41 Emulator, 42 Debugger 43 }; 44 45 enum class ScalingInterpolation { 46 none, 47 sharp, 48 blur 49 }; 50 51 // Positions for onscreen/overlaid messages 52 enum class MessagePosition { 53 TopLeft, 54 TopCenter, 55 TopRight, 56 MiddleLeft, 57 MiddleCenter, 58 MiddleRight, 59 BottomLeft, 60 BottomCenter, 61 BottomRight 62 }; 63 64 // Colors indices to use for the various GUI elements 65 // Abstract away what a color actually is, so we can easily change it in 66 // the future, if necessary 67 using ColorId = uInt32; 68 static constexpr ColorId 69 // *** Base colors *** 70 kColor = 256, 71 kBGColor = 257, 72 kBGColorLo = 258, 73 kBGColorHi = 259, 74 kShadowColor = 260, 75 // *** Text colors *** 76 kTextColor = 261, 77 kTextColorHi = 262, 78 kTextColorEm = 263, 79 kTextColorInv = 264, 80 kTextColorLink = 265, 81 // *** UI elements(dialog and widgets) *** 82 kDlgColor = 266, 83 kWidColor = 267, 84 kWidColorHi = 268, 85 kWidFrameColor = 269, 86 // *** Button colors *** 87 kBtnColor = 270, 88 kBtnColorHi = 271, 89 kBtnBorderColor = 272, 90 kBtnBorderColorHi = 273, 91 kBtnTextColor = 274, 92 kBtnTextColorHi = 275, 93 // *** Checkbox colors *** 94 kCheckColor = 276, 95 // *** Scrollbar colors *** 96 kScrollColor = 277, 97 kScrollColorHi = 278, 98 // *** Debugger colors *** 99 kDbgChangedColor = 279, 100 kDbgChangedTextColor = 280, 101 kDbgColorHi = 281, 102 kDbgColorRed = 282, // Note: this must be < 0x11e (286)! (see PromptWidget::putcharIntern) 103 // *** Slider colors *** 104 kSliderColor = 283, 105 kSliderColorHi = 284, 106 kSliderBGColor = 285, 107 kSliderBGColorHi = 286, 108 kSliderBGColorLo = 287, 109 // *** Other colors *** 110 kColorInfo = 288, 111 kColorTitleBar = 289, 112 kColorTitleText = 290, 113 kNumColors = 291, 114 kNone = 0 // placeholder to represent default/no color 115 ; 116 117 // Palette for normal TIA, UI and both combined 118 using PaletteArray = std::array<uInt32, kColor>; 119 using UIPaletteArray = std::array<uInt32, kNumColors-kColor>; 120 using FullPaletteArray = std::array<uInt32, kNumColors>; 121 122 // Text alignment modes for drawString() 123 enum class TextAlign { 124 Left, 125 Center, 126 Right 127 }; 128 129 // Line types for drawing rectangular frames 130 enum class FrameStyle { 131 Solid, 132 Dashed 133 }; 134 135 #endif // FRAMEBUFFER_CONSTANTS_HXX 136