HoverRace  2.0
SdlLegacyDisplay.h
Go to the documentation of this file.
1 
2 // SdlLegacyDisplay.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 "../../VideoServices/VideoBuffer.h"
25 #include "SdlDisplay.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 namespace SDL {
40 
42 {
44  public:
46  SUPER(sdlDisplay), sdlDisplay(sdlDisplay),
47  nativeSurface(), texture() { }
48  virtual ~SdlLegacyDisplay();
49 
50  protected:
51  virtual void OnWindowResChange();
52  virtual void Flip();
53 
54  private:
56  SDL_Surface *nativeSurface;
57  SDL_Texture *texture;
58 };
59 
60 } // namespace SDL
61 } // namespace Display
62 } // namespace HoverRace
63 
64 #undef MR_DllDeclare
SDL_Texture * texture
Definition: SdlLegacyDisplay.h:57
Definition: SdlLegacyDisplay.h:41
Video framebuffer for legacy (8-bit, palettized) rendering.
Definition: VideoBuffer.h:54
#define MR_DllDeclare
Definition: SdlLegacyDisplay.h:34
SdlDisplay & sdlDisplay
Definition: SdlLegacyDisplay.h:55
Definition: Announcement.h:24
SdlLegacyDisplay(SdlDisplay &sdlDisplay)
Definition: SdlLegacyDisplay.h:45
VideoServices::VideoBuffer SUPER
Definition: SdlLegacyDisplay.h:43
SDL-based software rendering.
Definition: SdlDisplay.h:60
SDL_Surface * nativeSurface
Definition: SdlLegacyDisplay.h:56