HoverRace  2.0
SdlScreenFadeView.h
Go to the documentation of this file.
1 
2 // SdlScreenFadeView.h
3 //
4 // Copyright (c) 2013 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "SdlDisplay.h"
25 #include "SdlView.h"
26 
27 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
28 # ifdef MR_ENGINE
29 # define MR_DllDeclare __declspec( dllexport )
30 # else
31 # define MR_DllDeclare __declspec( dllimport )
32 # endif
33 #else
34 # define MR_DllDeclare
35 #endif
36 
37 namespace HoverRace {
38  namespace Display {
39  class ScreenFade;
40  }
41 }
42 struct SDL_Surface;
43 
44 namespace HoverRace {
45 namespace Display {
46 namespace SDL {
47 
52 class MR_DllDeclare SdlScreenFadeView : public SdlView<ScreenFade>
53 {
55  public:
57  SUPER(disp, model), opacityChanged(true), computedAlpha(0) { }
58  virtual ~SdlScreenFadeView() { }
59 
60  public:
61  virtual void OnModelUpdate(int prop);
62 
63  public:
64  virtual Vec3 Measure();
65  virtual void PrepareRender();
66  virtual void Render();
67 
68  private:
69  void Update();
70 
71  private:
74 };
75 
76 } // namespace SDL
77 } // namespace Display
78 } // namespace HoverRace
79 
80 #undef MR_DllDeclare
#define MR_DllDeclare
Definition: SdlScreenFadeView.h:34
virtual ~SdlScreenFadeView()
Definition: SdlScreenFadeView.h:58
bool opacityChanged
Definition: SdlScreenFadeView.h:72
SdlView< ScreenFade > SUPER
Definition: SdlScreenFadeView.h:54
SDL view for ScreenFade.
Definition: SdlScreenFadeView.h:52
Paints a solid color over the whole screen with adjustable opacity.
Definition: ScreenFade.h:51
MR_UInt8 computedAlpha
Definition: SdlScreenFadeView.h:73
Definition: Announcement.h:24
Definition: Vec.h:114
SdlScreenFadeView(SdlDisplay &disp, ScreenFade &model)
Definition: SdlScreenFadeView.h:56
uint8_t MR_UInt8
Definition: MR_Types.h:40
Base class for views that use SDL for rendering.
Definition: SdlView.h:54
SDL-based software rendering.
Definition: SdlDisplay.h:60