equal
deleted
inserted
replaced
9 #include "Projectile.hh" |
9 #include "Projectile.hh" |
10 #include "GameState.hh" |
10 #include "GameState.hh" |
11 #include "PhysicsObject.hh" |
11 #include "PhysicsObject.hh" |
12 #include "Input.hh" |
12 #include "Input.hh" |
13 #include "Rope.hh" |
13 #include "Rope.hh" |
14 #include "GraphicsPointer.hh" |
|
15 #include "Types.hh" |
14 #include "Types.hh" |
|
15 #include "Graphics/Drawable.hh" |
|
16 |
16 #include <vector> |
17 #include <vector> |
17 |
18 |
18 /** |
19 /** |
19 * A Player is a PhysicsObject that represents a player - a remote client on the server, a local singleplayer player, a |
20 * A Player is a PhysicsObject that represents a player - a remote client on the server, a local singleplayer player, a |
20 * local network-client player, a remote network-client player, etc. |
21 * local network-client player, a remote network-client player, etc. |
153 /* |
154 /* |
154 * Drawing requires the skin texture, which is loaded on-demand when draw is called |
155 * Drawing requires the skin texture, which is loaded on-demand when draw is called |
155 */ |
156 */ |
156 static bool skin_loaded; |
157 static bool skin_loaded; |
157 static CL_Surface skin_surface; |
158 static CL_Surface skin_surface; |
158 virtual void draw (Graphics *g, PixelCoordinate camera); |
159 |
|
160 /** |
|
161 * Draw this player |
|
162 */ |
|
163 virtual void draw (Display *display, PixelCoordinate camera); |
159 |
164 |
160 uint16_t getKills() { return kills; } |
165 uint16_t getKills() { return kills; } |
161 uint16_t getDeaths() { return deaths; } |
166 uint16_t getDeaths() { return deaths; } |
162 }; |
167 }; |
163 |
168 |
188 virtual void handleInput (PlayerInput input, TimeMS dt); |
193 virtual void handleInput (PlayerInput input, TimeMS dt); |
189 |
194 |
190 /** |
195 /** |
191 * As Player, but also draws the current weapon name if displayWeapon |
196 * As Player, but also draws the current weapon name if displayWeapon |
192 */ |
197 */ |
193 virtual void draw (Graphics *g, bool displayWeapon, PixelCoordinate camera); |
198 virtual void draw (Display *display, bool displayWeapon, PixelCoordinate camera); |
194 }; |
199 }; |
195 |
200 |
196 /** |
201 /** |
197 * A RemotePlayer is a Player that we don't handle input for - they are a remote client connected to a remote server. |
202 * A RemotePlayer is a Player that we don't handle input for - they are a remote client connected to a remote server. |
198 * |
203 * |