Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12366


Ignore:
Timestamp:
May 9, 2019, 5:15:43 PM (5 years ago)
Author:
ahuwyler
Message:

Here and there

Location:
code/branches/OrxoBlox_FS19
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw

    r12364 r12366  
    2020
    2121<!--Template name=OrxoBloxbatcameras defaults=0>
    22   <OrxoBloxBat>
     22  <OrxoBloxStones>
    2323    <camerapositions>
    2424      <CameraPosition position="0,150,0"  absolute=true />
     
    2727      <CameraPosition position="0,30, 90" drag=true mouselook=true />
    2828    </camerapositions>
    29   </OrxoBloxBat>
     29  </OrxoBloxStones>
    3030</Template-->
    3131
     
    4848</Template>
    4949
    50 <Template name=OrxoBloxStonescameras defaults=0>
    51     <OrxoBloxStones>
    52       <camerapositions>
    53         <CameraPosition position="55,75,200" absolute=true />
    54       </camerapositions>
    55     </OrxoBloxStones>
    56   </Template>
     50
    5751 
    5852  <Template name=OrxoBloxstone>
    59     <OrxoBloxStones camerapositiontemplate=OrxoBloxStonescameras >
     53    <OrxoBloxStones>
    6054      <attached>
    6155        <Model position="0,0,0" mesh="CuboidBody.mesh" scale=4.5 />
     
    6559  </Template>
    6660 
    67   <Template name=OrxoBloxWallcameras defaults=0>
    68     <OrxoBloxWall>
    69       <camerapositions>
    70         <CameraPosition position="55,75,200" absolute=true />
    71         <!--CameraPosition position="0,50,160" drag=true mouselook=true />
    72         <CameraPosition position="0,50,0" pitch=-90 drag=true mouselook=true /-->
    73       </camerapositions>
    74     </OrxoBloxWall>
    75   </Template>
     61 
    7662 
    7763  <Template name=OrxoBloxwall>
    78     <OrxoBloxWall camerapositiontemplate=OrxoBloxWallcameras>
     64    <OrxoBloxWall>
    7965    </OrxoBloxWall>
    8066  </Template>
     
    10389
    10490
    105     <OrxoBloxCenterpoint name=OrxoBloxcenter dimension="90,100" balltemplate=OrxoBloxball battemplate=OrxoBloxbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25 StoneTemplate=OrxoBloxstone WallTemplate=OrxoBloxwall >
     91    <OrxoBloxCenterpoint name=OrxoBloxcenter dimension="90,100" balltemplate=OrxoBloxball  ballspeed=200 ballaccfactor=1.0 StoneTemplate=OrxoBloxstone WallTemplate=OrxoBloxwall >
    10692       
    10793      <attached>
     
    11399    </OrxoBloxCenterpoint>
    114100     
     101
    115102  </Scene>
    116103</Level>
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt

    r12361 r12366  
    44  OrxoBloxWall.cc
    55  OrxoBloxBall.cc
    6   OrxoBloxBot.cc
    76  OrxoBloxCenterpoint.cc
    87  OrxoBloxStones.cc
    9  
     8  OrxoBloxScore.cc
    109
    1110
     
    2019  SOURCE_FILES ${OrxoBlox_SRC_FILES}
    2120)
     21
     22
     23 
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12360 r12366  
    4949#include "OrxoBloxCenterpoint.h"
    5050#include "OrxoBloxBall.h"
    51 //#include "OrxoBloxBot.h"//Remove??
    5251#include "OrxoBloxStones.h"
    5352#include "OrxoBloxWall.h"
     
    6463        Constructor. Registers and initializes the object.
    6564    */
    66     OrxoBlox::OrxoBlox(Context* context) : ::orxonox::Deathmatch::Deathmatch(context)
     65    OrxoBlox::OrxoBlox(Context* context) : Deathmatch(context)
    6766    {
    6867        RegisterObject(OrxoBlox);
     
    147146            this->ball_->setSpeed(0);
    148147            this->ball_->setAccelerationFactor(this->center_->getBallAccelerationFactor());
    149             this->ball_->setBatLength(this->center_->getBatLength());
    150 
     148           
    151149            level_=1;
    152150
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc

    r12364 r12366  
    6565        this->speed_ = 0;
    6666        this->accelerationFactor_ = 1.0f;
    67         this->bDeleteBats_ = false;
     67       
    6868        this->relMercyOffset_ = 0.05f;
    6969        this->orxoblox_ = this->getOrxoBlox();
     
    7777                 this->defScoreSound_ = new WorldSound(this->getContext());
    7878                 this->defScoreSound_->setVolume(1.0f);
    79                  this->defBatSound_ = new WorldSound(this->getContext());
    80                  this->defBatSound_->setVolume(0.4f);
     79                 
    8180                 this->defBoundarySound_ = new WorldSound(this->getContext());
    8281                 this->defBoundarySound_->setVolume(0.5f);
     
    8584             {
    8685                 this->defScoreSound_ = nullptr;
    87                  this->defBatSound_ = nullptr;
     86                 
    8887                 this->defBoundarySound_ = nullptr;
    8988             }
     
    9695    OrxoBloxBall::~OrxoBloxBall()
    9796    {
    98         if (this->isInitialized())
    99         {
    100             if (this->bDeleteBats_)
    101 
    102             delete[] this->batID_;
    103         }
     97       
    10498    }
    10599
     
    109103        SUPER(OrxoBloxBall, XMLPort, xmlelement, mode);
    110104        XMLPortParam(OrxoBloxBall, "defScoreSound",  setDefScoreSound,  getDefScoreSound,  xmlelement, mode);
    111         XMLPortParam(OrxoBloxBall, "defBatSound",  setDefBatSound,  getDefBatSound,  xmlelement, mode);
     105       
    112106        XMLPortParam(OrxoBloxBall, "defBoundarySound",  setDefBoundarySound,  getDefBoundarySound,  xmlelement, mode);
    113107    }
     
    121115        registerVariable( this->fieldWidth_ );
    122116        registerVariable( this->fieldHeight_ );
    123         registerVariable( this->batlength_ );
     117       
    124118        registerVariable( this->speed_ );
    125119        registerVariable( this->relMercyOffset_ );
     
    275269    }
    276270
    277     void OrxoBloxBall::setDefBatSound(const std::string &OrxoBloxSound)
    278     {
    279         if( defBatSound_ )
    280             defBatSound_->setSource(OrxoBloxSound);
    281         else
    282             assert(0); // This should never happen, because soundpointer is only available on master
    283     }
    284 
    285     const std::string& OrxoBloxBall::getDefBatSound()
    286     {
    287         if( defBatSound_ )
    288             return defBatSound_->getSource();
    289         else
    290             assert(0);
    291         return BLANKSTRING;
    292     }
    293 
     271   
     272   
    294273    void OrxoBloxBall::setDefBoundarySound(const std::string &OrxoBloxSound)
    295274    {
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.h

    r12360 r12366  
    109109                { return this->accelerationFactor_; }
    110110
    111             /**
    112             @brief Set the length of the bats.
    113             @param batlength The length of the bats (in z-direction) as percentage of the height of the playing field.
    114             */
    115             void setBatLength(float batlength)
    116                 { this->batlength_ = batlength; }
    117             /**
    118             @brief Get the length of the bats.
    119             @return Returns the length of the bats (in z-direction) as percentage of the height of the playing field.
    120             */
    121             float getBatLength() const
    122                 { return this->batlength_; }
    123 
     111       
    124112
    125113            void Bounce(OrxoBloxStones* otherObject);
     
    130118            void setDefScoreSound(const std::string& engineSound);
    131119            const std::string& getDefScoreSound();
    132             void setDefBatSound(const std::string& engineSound);
    133             const std::string& getDefBatSound();
     120           
    134121            void setDefBoundarySound(const std::string& engineSound);
    135122            const std::string& getDefBoundarySound();
     
    146133            float speed_; //!< The speed (in x-direction) of the ball.
    147134            float accelerationFactor_; //!< The acceleration factor of the ball.
    148             float batlength_; //!< The length of the bats (in z-direction) as percentage of the height of the playing field.
    149             bool bDeleteBats_; //!< Bool, to keep track, of whether this->bat_ exists or not.
     135           
    150136            unsigned int* batID_; //!< The object IDs of the bats, to be able to synchronize them over the network.
    151137            float relMercyOffset_; //!< Offset, that makes the player not loose, when, in all fairness, he would have.
    152138            WorldSound* defScoreSound_;
    153             WorldSound* defBatSound_;
    154139            WorldSound* defBoundarySound_;
    155140            OrxoBlox* orxoblox_;
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCenterpoint.cc

    r12339 r12366  
    6060        this->ballspeed_ = 100;
    6161        this->ballaccfactor_ = 1.0;
    62         this->batspeed_ = 60;
    63         this->batlength_ = 0.25;
    64 
     62       
    6563        this->checkGametype();
    6664    }
     
    7674        XMLPortParam(OrxoBloxCenterpoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
    7775        XMLPortParam(OrxoBloxCenterpoint, "balltemplate", setBalltemplate, getBalltemplate, xmlelement, mode);
    78         XMLPortParam(OrxoBloxCenterpoint, "battemplate", setBattemplate, getBattemplate, xmlelement, mode);
    7976        XMLPortParam(OrxoBloxCenterpoint, "ballspeed", setBallSpeed, getBallSpeed, xmlelement, mode);
    8077        XMLPortParam(OrxoBloxCenterpoint, "ballaccfactor", setBallAccelerationFactor, getBallAccelerationFactor, xmlelement, mode);
    81         XMLPortParam(OrxoBloxCenterpoint, "batspeed", setBatSpeed, getBatSpeed, xmlelement, mode);
     78
    8279        XMLPortParam(OrxoBloxCenterpoint, "stoneTemplate", setStoneTemplate, getStoneTemplate, xmlelement, mode);
    8380        XMLPortParam(OrxoBloxCenterpoint, "WallTemplate", setWallTemplate, getWallTemplate, xmlelement, mode);
    84         XMLPortParam(OrxoBloxCenterpoint, "batlength", setBatLength, getBatLength, xmlelement, mode);
    8581    }
    8682
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCenterpoint.h

    r12307 r12366  
    139139                { return this->balltemplate_; }
    140140
    141             /**
    142             @brief Set the template for the bats. (e.g. to attach the model of the bat, but also to attach CameraPositions to it, to be able to view the game from the bats perspective)
    143             @param battemplate The name of the template to be set.
    144             */
    145             void setBattemplate(const std::string& battemplate)
    146                 { this->battemplate_ = battemplate; }
    147             /**
    148             @brief Get the template of the bats.
    149             @return Returns the name of the template of the bats.
    150             */
    151             const std::string& getBattemplate() const
    152                 { return this->battemplate_; }
    153 
     141       
    154142            /**
    155143            @brief Set the dimensions of the playing field.
     
    191179                { return this->ballaccfactor_; }
    192180
    193             /**
    194             @brief Set the speed of the bats.
    195             @param batspeed The speed of the bats.
    196             */
    197             void setBatSpeed(float batspeed)
    198                 { this->batspeed_ = batspeed; }
    199             /**
    200             @brief Get the speed of the bats.
    201             @return Returns the speed of the bats.
    202             */
    203             float getBatSpeed() const
    204                 { return this->batspeed_; }
    205 
    206             /**
    207             @brief Set the length of the bats.
    208             @param batlength The length of the bats (in z-direction) as a percentage of the height of the playing field.
    209             */
    210             void setBatLength(float batlength)
    211                 { this->batlength_ = batlength; }
    212             /**
    213             @brief Get the length of the bats.
    214             @return Returns the length of the bats (in z-direction) as a percentage of the height of the playing field.
    215             */
    216             float getBatLength() const
    217                 { return this->batlength_; }
    218 
     181   
    219182            /**
    220183            @brief Set the template for the stones.
     
    250213
    251214            std::string balltemplate_; //!< The template for the ball.
    252             std::string battemplate_; //!< The template for the bats.
    253215            std::string WallTemplate_;
    254216            std::string stoneTemplate_;
     
    256218            float ballspeed_; //!< The speed of then ball.
    257219            float ballaccfactor_; //!< The acceleration factor of the ball.
    258             float batspeed_; //!< The speed of the bat.
    259             float batlength_; //!< The length of the bat (in z-direction) as a percentage of the height of the playing field.
    260 
    261220            float width_; //!< The height of the playing field.
    262221            float height_; //!< The width of the playing field.
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h

    r12359 r12366  
    4343//-----------------------------------------------------------------------
    4444
    45 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(OrxoBlox_STATIC_BUILD)
    46 #  ifdef OrxoBlox_SHARED_BUILD
     45#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXOBLOX_STATIC_BUILD)
     46#  ifdef ORXOBLOX_SHARED_BUILD
    4747#    define _OrxoBloxExport __declspec(dllexport)
    4848#  else
     
    7373    class OrxoBloxWall;
    7474    class OrxoBloxStones;
    75     class OrxoBloxShip;
    7675    class OrxoBloxScore;
    7776}
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxScore.cc

    r12359 r12366  
    5555        this->owner_ = nullptr;
    5656        this->player_ = nullptr;
    57 
     57    }
    5858    /**
    5959    @brief
Note: See TracChangeset for help on using the changeset viewer.