ge211  2021.5.1
A student game engine
ge211_forward.hxx
1 #pragma once
2 
3 // Prevent SDL2 from taking over main().
4 #ifndef SDL_MAIN_HANDLED
5 # define SDL_MAIN_HANDLED
6 #endif
7 
8 // Forward declarations for some useful SDL2 types.
9 struct SDL_KeyboardEvent;
10 union SDL_Event;
11 struct SDL_Renderer;
12 struct SDL_RWops;
13 struct SDL_Surface;
14 struct SDL_Texture;
15 struct SDL_Window;
16 struct Mix_Chunk;
17 struct _Mix_Music;
18 typedef struct _Mix_Music Mix_Music;
19 struct _TTF_Font;
20 typedef struct _TTF_Font TTF_Font;
21 
22 // Forward declarations for all ge211 types.
23 namespace ge211 {
24 
25 class Abstract_game;
26 class Color;
27 class Font;
28 class Sprite_set;
29 class Window;
30 
31 namespace audio {
32 
33 enum class Channel_state;
34 class Mixer;
35 class Audio_clip;
36 class Music_track;
37 class Sound_effect;
38 class Sound_effect_handle;
39 
40 } // end namespace audio
41 
42 namespace events {
43 
44 class Key;
45 enum class Mouse_button;
46 
47 } // end namespace events
48 
49 namespace exceptions {
50 
51 class Exception_base;
52 class Client_logic_error;
53 class Session_needed_error;
54 class Environment_error;
55 class Ge211_logic_error;
56 class Late_paint_error;
57 class Host_error;
58 class File_error;
59 class Font_error;
60 class Image_error;
61 class Mixer_error;
62 
63 } // end namespace exceptions
64 
65 namespace geometry
66 {
67 
68 class Origin_type;
69 template <typename COORDINATE> struct Dims;
70 template <typename COORDINATE> struct Posn;
71 template <typename COORDINATE> struct Rect;
72 class Transform;
73 
74 } // end namespace geometry.
75 
76 namespace sprites {
77 
78 class Sprite;
79 
80 class Circle_sprite;
81 class Image_sprite;
82 class Multiplexed_sprite;
83 class Rectangle_sprite;
84 class Text_sprite;
85 
86 } // end namespace sprites
87 
88 namespace time {
89 
90 class Duration;
91 class Time_point;
92 
93 class Timer;
94 class Pausable_timer;
95 
96 } // end namespace time
97 
100 namespace internal {
101 
102 class Render_sprite;
103 
105 namespace logging {
106 
107 /* These don't need forward declarations: */
108 // enum class Log_level;
109 // class Logger;
110 // class Log_message;
111 
112 } // end namespace logging
113 
114 } // end namespace internal
115 
117 namespace detail {
118 
119 class Engine;
120 class File_resource;
121 struct Placed_sprite;
122 class Renderer;
123 class Session;
124 class Texture;
125 class Texture_sprite;
126 
127 template <bool>
128 struct ifstream_opener;
129 
130 } // end namespace detail
131 
132 // Bring everything but `detail` and `internal` into the ge211
133 // namespace.
134 
135 using namespace audio;
136 using namespace events;
137 using namespace exceptions;
138 using namespace geometry;
139 using namespace sprites;
140 using namespace time;
141 
142 }
ge211::events::Mouse_button
Mouse_button
A representation of a mouse button.
Definition: ge211_event.hxx:20
ge211::time::Duration
A length of time.
Definition: ge211_time.hxx:31
ge211::sprites::Circle_sprite
A Sprite that renders as a solid circle.
Definition: ge211_sprites.hxx:194
ge211::time::Time_point
A point in time.
Definition: ge211_time.hxx:175
ge211
The game engine namespace.
Definition: ge211.hxx:4
ge211::sprites::Sprite
A sprite is an image that knows how to render itself to the screen at a given location,...
Definition: ge211_sprites.hxx:39
ge211::geometry::Dims
Represents the dimensions of an object, or more generally, the displacement between two Posns.
Definition: ge211_geometry.hxx:35
ge211::time::Pausable_timer
A class for timing intervals while supporting pausing.
Definition: ge211_time.hxx:317
ge211::time::Timer
A class for timing intervals. The result is a Duration.
Definition: ge211_time.hxx:268
ge211::sprites::Rectangle_sprite
A Sprite that renders as a solid rectangle.
Definition: ge211_sprites.hxx:179
ge211::sprites::Text_sprite
A Sprite that displays text.
Definition: ge211_sprites.hxx:232
ge211::sprites::Multiplexed_sprite
A Sprite that allows switching between other sprites based on the time at rendering.
Definition: ge211_sprites.hxx:456
ge211::internal::Render_sprite
A Render_sprite works by allowing its derived classes to render themselves pixel-by-pixel onto an SDL...
Definition: ge211_sprites.hxx:105
ge211::geometry::Transform
A rendering transformation, which can scale, flip, and rotate.
Definition: ge211_geometry.hxx:793
ge211::geometry::Posn
A position in the COORDINATE-valued Cartesian plane, where COORDINATE can be any arithmetic type.
Definition: ge211_geometry.hxx:266
ge211::geometry::Rect
Represents a positioned rectangle.
Definition: ge211_geometry.hxx:461
std::time
T time(T... args)
ge211::sprites::Image_sprite
A Sprite that displays a bitmap image.
Definition: ge211_sprites.hxx:214