Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 24, 2006, 6:42:57 PM (18 years ago)
Author:
muellmic
Message:

fixed compiler error at SpaceShip::shield()

Location:
branches/playability/src/world_entities/space_ships
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/space_ships/spacecraft_2d_new.cc

    r9952 r9955  
    1717#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1818
    19 #include "spacecraft_2d.h"
     19#include "spacecraft_2d_new.h"
    2020
    2121#include "weapons/weapon_manager.h"
     
    3939
    4040#include "class_id_DEPRECATED.h"
    41 ObjectListDefinitionID(Spacecraft2D, CL_SPACECRAFT_2D);
    42 CREATE_FACTORY(Spacecraft2D);
    43 
    44 CREATE_SCRIPTABLE_CLASS(Spacecraft2D,
     41ObjectListDefinitionID(Spacecraft2Dnew, CL_SPACECRAFT_2D_new);
     42CREATE_FACTORY(Spacecraft2Dnew);
     43
     44CREATE_SCRIPTABLE_CLASS(Spacecraft2Dnew,
    4545                        addMethod("hasPlayer", Executor0ret<Playable, lua_State*,bool>(&Playable::hasPlayer))
    4646                        //Coordinates
     
    5656/**
    5757 * @brief loads a Spacecraft2D information from a specified file.
    58  * @param fileName the name of the File to load the spacecraft_2d from (absolute path)
     58 * @param fileName the name of the File to load the spacecraft_2d_new from (absolute path)
    5959 */
    60 Spacecraft2D::Spacecraft2D(const std::string& fileName)
     60Spacecraft2Dnew::Spacecraft2Dnew(const std::string& fileName)
    6161{
    6262  this->init();
     
    6565  if(!doc.LoadFile())
    6666  {
    67     PRINTF(2)("Loading file %s failed for Spacecraft2D.\n", fileName.c_str());
     67    PRINTF(2)("Loading file %s failed for Spacecraft2Dnew.\n", fileName.c_str());
    6868    return;
    6969  }
     
    7878   @todo add more parameters to load
    7979*/
    80 Spacecraft2D::Spacecraft2D(const TiXmlElement* root)
     80Spacecraft2Dnew::Spacecraft2Dnew(const TiXmlElement* root)
    8181{
    8282  this->init();
     
    114114 * @brief destructs the spacecraft_2d, deletes alocated memory
    115115 */
    116 Spacecraft2D::~Spacecraft2D ()
     116Spacecraft2Dnew::~Spacecraft2Dnew ()
    117117{
    118118  this->setPlayer(NULL);
     
    124124 * @brief initializes a Spacecraft2D
    125125 */
    126 void Spacecraft2D::init()
     126void Spacecraft2Dnew::init()
    127127{
    128128  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
     
    229229 * @param root the XML-element to load the Spaceship's properties from
    230230 */
    231 void Spacecraft2D::loadParams(const TiXmlElement* root)
     231void Spacecraft2Dnew::loadParams(const TiXmlElement* root)
    232232{
    233233  Playable::loadParams(root);
     
    238238}
    239239
    240 void Spacecraft2D::setPlayDirection(const Quaternion& rot, float speed)
     240void Spacecraft2Dnew::setPlayDirection(const Quaternion& rot, float speed)
    241241{
    242242  this->direction = Quaternion (rot.getHeading(), Vector(0,1,0));
    243243}
    244244
    245 void Spacecraft2D::setTravelSpeed(float travelSpeed)
     245void Spacecraft2Dnew::setTravelSpeed(float travelSpeed)
    246246{
    247247  this->travelSpeed = travelSpeed;
     
    249249
    250250
    251 void Spacecraft2D::setTravelHeight(float travelHeight)
     251void Spacecraft2Dnew::setTravelHeight(float travelHeight)
    252252{
    253253  if (this->toTravelHeight == NULL)
     
    257257
    258258
    259 void Spacecraft2D::setTravelDistance(const Vector2D& distance)
     259void Spacecraft2Dnew::setTravelDistance(const Vector2D& distance)
    260260{
    261261  this->travelDistance = distance;
    262262}
    263263
    264 void Spacecraft2D::setTravelDistance(float x, float y)
     264void Spacecraft2Dnew::setTravelDistance(float x, float y)
    265265{
    266266  this->setTravelDistance(Vector2D(x, y));
     
    269269
    270270
    271 void Spacecraft2D::enter()
     271void Spacecraft2Dnew::enter()
    272272{
    273273  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true);
     
    277277}
    278278
    279 void Spacecraft2D::leave()
     279void Spacecraft2Dnew::leave()
    280280{
    281281  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
     
    285285
    286286
    287 void Spacecraft2D::enterPlaymode(Playable::Playmode playmode)
     287void Spacecraft2Dnew::enterPlaymode(Playable::Playmode playmode)
    288288{
    289289  switch(playmode)
     
    337337 * @brief effect that occurs after the Spacecraft2D is spawned
    338338*/
    339 void Spacecraft2D::postSpawn ()
     339void Spacecraft2Dnew::postSpawn ()
    340340{
    341341  //setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
     
    345345 * @brief the action occuring if the spacecraft_2d left the game
    346346*/
    347 void Spacecraft2D::leftWorld ()
     347void Spacecraft2Dnew::leftWorld ()
    348348{}
    349349
     
    354354 * Implement behaviour like damage application or other miscellaneous collision stuff in this function
    355355 */
    356 void Spacecraft2D::collidesWith(WorldEntity* entity, const Vector& location)
     356void Spacecraft2Dnew::collidesWith(WorldEntity* entity, const Vector& location)
    357357{
    358358  Playable::collidesWith(entity, location);
     
    365365 * @param time The timespan passed since last update
    366366*/
    367 void Spacecraft2D::tick (float dt)
     367void Spacecraft2Dnew::tick (float dt)
    368368{
    369369  //  this->debugNode(1);
     
    382382 * @param time the timeslice since the last frame
    383383*/
    384 void Spacecraft2D::movement (float dt)
     384void Spacecraft2Dnew::movement (float dt)
    385385{
    386386  Vector accel(0.0, 0.0, 0.0);
     
    483483
    484484
    485 void Spacecraft2D::draw() const
     485void Spacecraft2Dnew::draw() const
    486486{
    487487  WorldEntity::draw();
     
    491491 * @todo switch statement ??
    492492 */
    493 void Spacecraft2D::process(const Event &event)
     493void Spacecraft2Dnew::process(const Event &event)
    494494{
    495495  Playable::process(event);
     
    505505  else if( event.type == EV_MOUSE_MOTION)
    506506  {
    507 
    508 
    509 
    510507    if (this->getPlaymode() == Playable::Full3D)
    511508    {
  • branches/playability/src/world_entities/space_ships/spacecraft_2d_new.h

    r9952 r9955  
    11
    22/*!
    3  * @file spacecraft_2d.h
    4  * Implements the Control of a Spacecraft2D
     3 * @file spacecraft_2d_new.h
     4 * Implements the Control of a Spacecraft2D version 2 (PPS 3)
    55 */
    66
    7 #ifndef _SPACECRAFT_2D_H
    8 #define _SPACECRAFT_2D_H
     7#ifndef _SPACECRAFT_2D_NEW_H
     8#define _SPACECRAFT_2D_NEW_H
    99
    1010#include "playable.h"
     
    1414class ParticleSystem;
    1515
    16 class Spacecraft2D : public Playable
     16class Spacecraft2Dnew : public Playable
    1717{
    18   ObjectListDeclaration(Spacecraft2D);
     18  ObjectListDeclaration(Spacecraft2Dnew);
    1919  public:
    20     Spacecraft2D(const std::string& fileName);
    21     Spacecraft2D(const TiXmlElement* root = NULL);
    22     virtual ~Spacecraft2D();
     20    Spacecraft2Dnew(const std::string& fileName);
     21    Spacecraft2Dnew(const TiXmlElement* root = NULL);
     22    virtual ~Spacecraft2Dnew();
    2323
    2424    virtual void loadParams(const TiXmlElement* root);
Note: See TracChangeset for help on using the changeset viewer.