| 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-2019 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 TIA_BACKGROUND | 
|---|
| 19 | #define TIA_BACKGROUND | 
|---|
| 20 |  | 
|---|
| 21 | #include "Serializable.hxx" | 
|---|
| 22 | #include "bspf.hxx" | 
|---|
| 23 |  | 
|---|
| 24 | class TIA; | 
|---|
| 25 |  | 
|---|
| 26 | class Background : public Serializable | 
|---|
| 27 | { | 
|---|
| 28 | public: | 
|---|
| 29 | Background(); | 
|---|
| 30 |  | 
|---|
| 31 | public: | 
|---|
| 32 | void setTIA(TIA* tia) { myTIA = tia; } | 
|---|
| 33 |  | 
|---|
| 34 | void reset(); | 
|---|
| 35 |  | 
|---|
| 36 | void setColor(uInt8 color); | 
|---|
| 37 | void setDebugColor(uInt8 color); | 
|---|
| 38 | void enableDebugColors(bool enabled); | 
|---|
| 39 |  | 
|---|
| 40 | void applyColorLoss(); | 
|---|
| 41 |  | 
|---|
| 42 | uInt8 getColor() const { return myColor; } | 
|---|
| 43 |  | 
|---|
| 44 | /** | 
|---|
| 45 | Serializable methods (see that class for more information). | 
|---|
| 46 | */ | 
|---|
| 47 | bool save(Serializer& out) const override; | 
|---|
| 48 | bool load(Serializer& in) override; | 
|---|
| 49 |  | 
|---|
| 50 | private: | 
|---|
| 51 | void applyColors(); | 
|---|
| 52 |  | 
|---|
| 53 | private: | 
|---|
| 54 | uInt8 myColor; | 
|---|
| 55 | uInt8 myObjectColor, myDebugColor; | 
|---|
| 56 | bool myDebugEnabled; | 
|---|
| 57 |  | 
|---|
| 58 | TIA* myTIA; | 
|---|
| 59 |  | 
|---|
| 60 | private: | 
|---|
| 61 | Background(const Background&) = delete; | 
|---|
| 62 | Background(Background&&) = delete; | 
|---|
| 63 | Background& operator=(const Background&) = delete; | 
|---|
| 64 | Background& operator=(Background&&); | 
|---|
| 65 | }; | 
|---|
| 66 |  | 
|---|
| 67 | #endif // TIA_BACKGROUND | 
|---|
| 68 |  | 
|---|