HoverRace  2.0
Minimap.h
Go to the documentation of this file.
1 
2 // Minimap.h
3 //
4 // Copyright (c) 2014, 2015 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 "HudDecor.h"
25 
26 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
27 # ifdef MR_ENGINE
28 # define MR_DllDeclare __declspec( dllexport )
29 # else
30 # define MR_DllDeclare __declspec( dllimport )
31 # endif
32 #else
33 # define MR_DllDeclare
34 #endif
35 
36 namespace HoverRace {
37  namespace Display {
38  class Display;
39  class Picture;
40  class SymbolIcon;
41  }
42 }
43 
44 namespace HoverRace {
45 namespace Display {
46 
52 {
53  using SUPER = HudDecor;
54 
55 private:
56  Minimap() = delete;
57 public:
58  Minimap(Display &display);
59  virtual ~Minimap() { }
60 
61 protected:
62  void OnHudRescaled(const Vec2 &hudScale) override;
63 
64 protected:
65  void FireModelUpdate(int prop) override;
66 public:
67  void Advance(Util::OS::timestamp_t tick) override;
68 
69 private:
70  double rescale;
72  std::shared_ptr<Picture> mapPic;
73  std::shared_ptr<SymbolIcon> playerIcon;
74 };
75 
76 } // namespace Display
77 } // namespace HoverRace
78 
79 #undef MR_DllDeclare
Vec2 mapScale
Definition: Minimap.h:71
Base class for UI (2D) components.
Definition: UiViewModel.h:56
A miniature map of the track for the HUD.
Definition: Minimap.h:51
Definition: Vec.h:38
Base class for display managers.
Definition: Display.h:73
Base view model for elements of the heads-up display.
Definition: HudDecor.h:58
double rescale
Definition: Minimap.h:70
#define MR_DllDeclare
Definition: Minimap.h:33
virtual ~Minimap()
Definition: Minimap.h:59
std::shared_ptr< Picture > mapPic
Definition: Minimap.h:72
Definition: Announcement.h:24
std::shared_ptr< SymbolIcon > playerIcon
Definition: Minimap.h:73
MR_Int64 timestamp_t
Definition: OS.h:55