[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Feuerkraft-CVS] rev 295 - in trunk: data data/images/vehicles src/vehic
From: |
Ingo Ruhnke |
Subject: |
[Feuerkraft-CVS] rev 295 - in trunk: data data/images/vehicles src/vehicles |
Date: |
Sat, 22 Nov 2003 18:27:49 +0100 |
Author: grumbel
Date: 2003-11-22 18:27:48 +0100 (Sat, 22 Nov 2003)
New Revision: 295
Added:
trunk/data/images/vehicles/chinook.png
Modified:
trunk/data/feuerkraft.xml
trunk/data/images/vehicles/huey_rotor.png
trunk/src/vehicles/helicopter.cxx
trunk/src/vehicles/helicopter.hxx
Log:
- added chinook graphic
- recentered huey stuff a bit
Modified: trunk/data/feuerkraft.xml
===================================================================
--- trunk/data/feuerkraft.xml 2003-11-22 14:41:13 UTC (rev 294)
+++ trunk/data/feuerkraft.xml 2003-11-22 17:27:48 UTC (rev 295)
@@ -276,6 +276,10 @@
</sprite>
<sprite name="huey_rotor">
+ <image file="images/vehicles/huey_rotor.png" />
+ </sprite>
+
+ <sprite name="huey_rotor2">
<image file="images/vehicles/huey_rotor2.png" />
</sprite>
Added: trunk/data/images/vehicles/chinook.png
===================================================================
(Binary files differ)
Property changes on: trunk/data/images/vehicles/chinook.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/data/images/vehicles/huey_rotor.png
===================================================================
(Binary files differ)
Modified: trunk/src/vehicles/helicopter.cxx
===================================================================
--- trunk/src/vehicles/helicopter.cxx 2003-11-22 14:41:13 UTC (rev 294)
+++ trunk/src/vehicles/helicopter.cxx 2003-11-22 17:27:48 UTC (rev 295)
@@ -27,11 +27,13 @@
#include "helicopter.hxx"
Helicopter::Helicopter(const AList& lst)
- : rotor (resources->get_sprite ("feuerkraft/huey_rotor")),
+ : rotor (resources->get_sprite ("feuerkraft/huey_rotor2")),
+ rotor_halt (resources->get_sprite ("feuerkraft/huey_rotor")),
heli (resources->get_sprite ("feuerkraft/huey")),
heli_shadow (resources->get_sprite ("feuerkraft/huey_shadow")),
helidestroyed (resources->get_sprite ("feuerkraft/helidestroyed")),
- rotor_count (0),
+ rotor_speed(0),
+ rotor_pos(0),
strafe (0.0),
fireing (false),
reloading (0),
@@ -69,7 +71,11 @@
pos.y - heli.get_height ()/2,
frame);*/
- view.draw (rotor, pos, rotor_count);
+ if (state == LANDED)
+ view.draw (rotor_halt, pos, rotor_pos);
+ else
+ view.draw (rotor, pos, rotor_pos);
+
energie.draw (view, int(pos.x), int(pos.y - 40));
}
else
@@ -111,14 +117,26 @@
// Apply controlls
if (state != LANDED)
{
- orientation += 3.0f * steering * delta;
+ orientation += 3.0f * steering * delta;
velocity -= 15.0f * acceleration * delta;
- strafe -= 3.0f * strafe_steering * delta;
+ strafe -= 5.0f * strafe_steering * delta;
}
strafe_steering = steering = acceleration = 0;
- rotor_count -= 10 * delta;
+ if (state == LANDED)
+ {
+ rotor_pos -= rotor_speed * delta;
+ rotor_speed -= 1.5f * delta;
+ if (rotor_speed < 0)
+ rotor_speed = 0;
+ }
+ else
+ {
+ rotor_speed = 10.0f;
+ rotor_pos -= rotor_speed * delta;
+ }
+
delta *= 50;
rotor.update (delta);
Modified: trunk/src/vehicles/helicopter.hxx
===================================================================
--- trunk/src/vehicles/helicopter.hxx 2003-11-22 14:41:13 UTC (rev 294)
+++ trunk/src/vehicles/helicopter.hxx 2003-11-22 17:27:48 UTC (rev 295)
@@ -34,11 +34,16 @@
enum { FLYING, STARTING, LANDING, LANDED } state;
float height;
+ CL_Sprite rotor_halt;
CL_Sprite rotor;
+
CL_Sprite heli;
CL_Sprite heli_shadow;
CL_Sprite helidestroyed;
- float rotor_count;
+
+ float rotor_speed;
+ float rotor_pos;
+
float strafe;
bool fireing;
int reloading;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Feuerkraft-CVS] rev 295 - in trunk: data data/images/vehicles src/vehicles,
Ingo Ruhnke <=