Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11727 for code/branches


Ignore:
Timestamp:
Feb 11, 2018, 3:44:49 PM (7 years ago)
Author:
landauf
Message:

[Asteroid_HS17] cleanup (mostly includes)

Location:
code/branches/Presentation_HS17_merge/src/modules/asteroids2D
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2D.cc

    r11726 r11727  
    5454#include "Asteroids2DShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
    5555#include "Asteroids2DStone.h"
     56#include "Asteroids2DCenterPoint.h"
     57#include "Asteroids2DHUDinfo.h"
    5658#include "core/CoreIncludes.h"
    5759#include "Highscore.h"
     60#include "gamestates/GSLevel.h"
    5861
    5962namespace orxonox
     
    7982    }
    8083
    81 
     84    void Asteroids2D::setCenterpoint(Asteroids2DCenterPoint* center)
     85    {
     86        this->center_ = center;
     87    }
    8288
    8389    void Asteroids2D::levelUp()
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2D.h

    r11669 r11727  
    4343#include "asteroids2D/Asteroids2DPrereqs.h"
    4444
    45 #include "Asteroids2DCenterPoint.h" // Necessary for WeakPointer??
    46 //#include "Asteroids2DShip.h"        DO NOT include in Header. Will cause forward declaration issues
    47 
    48 //#include "Asteroids2DHUDinfo.h"
    49 
    50 
    51 #include "core/EventIncludes.h"
    52 #include "core/command/Executor.h"
    53 #include "core/config/ConfigValueIncludes.h"
    54 
    55 #include "gamestates/GSLevel.h"
    56 #include "chat/ChatManager.h"
    57 
    58 // ! HACK
    59 #include "infos/PlayerInfo.h"
    60 
    61 #include "core/command/ConsoleCommand.h"
    62 
    6345#include "gametypes/Deathmatch.h"
    6446#include "tools/Timer.h"
     
    9173            //Generate Stones
    9274            void spawnStone();
    93             void setCenterpoint(Asteroids2DCenterPoint* center)
    94                 { this->center_ = center; }
     75            void setCenterpoint(Asteroids2DCenterPoint* center);
     76
    9577            void addPoints(int numPoints);
    9678            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DCenterPoint.h

    r11660 r11727  
    3838#include "asteroids2D/Asteroids2DPrereqs.h"
    3939
    40 //#include "Asteroids2D.h"
    41 //#include "Asteroids2DHUDinfo.h"
    42 
    4340#include "worldentities/StaticEntity.h"
    4441
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DHUDinfo.cc

    r11669 r11727  
    3030#include "core/XMLPort.h"
    3131#include "util/Convert.h"
    32 //#include "Asteroids2D.h"
     32#include "Asteroids2D.h"
    3333
    3434namespace orxonox
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DHUDinfo.h

    r11669 r11727  
    3131#define _Asteroids2DHUDinfo_H__
    3232
    33 //#include "Asteroids2DShip.h"
    34 #include "Asteroids2D.h"
    35 //#include "Asteroids2DCenterPoint.h"
    36 
    3733#include "asteroids2D/Asteroids2DPrereqs.h"
    3834
     
    5955        private:
    6056            Asteroids2D* Asteroids2DGame;
    61             bool bShowLives_;
    62             bool bShowLevel_;
    6357            bool bShowPoints_;
    6458
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DPrereqs.h

    r11669 r11727  
    7070    class Asteroids2D;
    7171    class Asteroids2DCenterPoint;
     72    class Asteroids2DHUDinfo;
    7273    class Asteroids2DShip;
    73     class Asteroids2DCube;
    74     //class Asteroids2DEnemy;
    75     //class Asteroids2DEnemyShooter;
    76     //class Asteroids2DWeapon;
    77     //class Asteroids2DWeaponEnemy;
    78     //class Asteroids2DHUDinfo;
     74    class Asteroids2DStone;
     75    class Asteroids2DWeapon;
    7976}
    8077
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DShip.cc

    r11668 r11727  
    3535#include "Asteroids2DShip.h"
    3636#include "Asteroids2DStone.h"
     37#include "Asteroids2D.h"
    3738#include "core/CoreIncludes.h"
    3839
     
    4546        RegisterObject(Asteroids2DShip);
    4647
    47         isFireing = false;
     48        this->bImmune = false;
    4849        this->width = 1043;
    4950        this->height = 646;
     
    9192    void Asteroids2DShip::boost(bool bBoost)
    9293    {
    93         isFireing = bBoost;
    9494    }
    9595
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DShip.h

    r11668 r11727  
    3838#include "asteroids2D/Asteroids2DPrereqs.h"
    3939
    40 
    41 #include "core/XMLPort.h"
    4240#include "worldentities/pawns/SpaceShip.h"
    43 #include "weapons/WeaponsPrereqs.h"
    44 #include "graphics/Camera.h"
    45 
    46 #include "Asteroids2D.h" // Is necessary for getGame function
    47 //#include "Asteroids2DCenterPoint.h"
    48 #include "Asteroids2DStone.h"
    49 
    5041#include "tools/Timer.h"
    51 
    5242
    5343namespace orxonox
     
    6757
    6858            virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    69 
    70             bool isFireing;
    7159           
    7260            /*Functions that can be helpful while debugging.
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DWeapon.cc

    r11669 r11727  
    3535
    3636#include "core/CoreIncludes.h"
    37 // #include "core/XMLPort.h"
    38 // #include "core/command/Executor.h"
    3937
    4038#include "graphics/Model.h"
     
    4240#include "weaponsystem/WeaponPack.h"
    4341#include "weaponsystem/WeaponSystem.h"
    44 #include "worldentities/WorldEntity.h"
    45 #include "worldentities/pawns/Pawn.h"
    4642
    4743#include "weapons/projectiles/Projectile.h"
    4844#include "weapons/MuzzleFlash.h"
    49 
    50 #include "Asteroids2D.h"
    5145
    5246namespace orxonox
     
    6559
    6660    }
    67 
    68     Asteroids2D* Asteroids2DWeapon::getGame()
    69     {
    70         if (game == nullptr)
    71         {
    72             for (Asteroids2D* race : ObjectList<Asteroids2D>())
    73             {
    74                 game = race;
    75             }
    76         }
    77         return game;
    78     }
    79 
    8061
    8162    void Asteroids2DWeapon::shot()
  • code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DWeapon.h

    r11669 r11727  
    4040#include "weapons/weaponmodes/HsW01.h"
    4141
    42 #include "Asteroids2D.h"
    43 
    4442namespace orxonox
    4543{
     
    4947            Asteroids2DWeapon(Context* context);
    5048            virtual ~Asteroids2DWeapon();
    51             Asteroids2D* getGame();
    52 
    5349
    5450        protected:
    5551            virtual void shot() override; //2D movement
    5652            WeakPtr<Projectile> projectile;
    57             WeakPtr<Asteroids2D> game;
    5853    };
    5954}
Note: See TracChangeset for help on using the changeset viewer.