Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6871 in orxonox.OLD


Ignore:
Timestamp:
Jan 30, 2006, 9:39:58 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: small fixes (cleanup)

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/texture.cc

    r6859 r6871  
    284284               GL_UNSIGNED_BYTE,
    285285               surface->pixels);
    286   printf("%s, w:%d h:%d, 0x%x\n", this->getName(), surface->w, surface->h, target);
     286  //  printf("%s, w:%d h:%d, 0x%x\n", this->getName(), surface->w, surface->h, target);
    287287
    288288  // build the MipMaps automaticaly
  • trunk/src/lib/sound/ogg_player.h

    r6842 r6871  
    2020
    2121
    22 #define BUFFER_SIZE (4096 * 4)
     22#define BUFFER_SIZE (8096 * 4)
    2323
    2424
    2525// the definition of a Ogg-Player
    2626class OggPlayer : public BaseObject
    27   {
    28   public:
    29     OggPlayer(const char* fileName = NULL);
     27{
     28public:
     29  OggPlayer(const char* fileName = NULL);
    3030
    31     bool open(const char* fileName);
    32     void release();
    33     void debug();
    34     bool playback();
    35     bool playing();
    36     bool update();
     31  bool open(const char* fileName);
     32  void release();
     33  void debug();
     34  bool playback();
     35  bool playing();
     36  bool update();
    3737
    38   protected:
     38protected:
    3939
    40     bool stream(ALuint buffer);
    41     void empty();
    42     void check();
    43     const char* errorString(int code);
     40  bool stream(ALuint buffer);
     41  void empty();
     42  void check();
     43  const char* errorString(int code);
    4444
    45   private:
     45private:
    4646
    47     FILE*               oggFile;              //!< general file-handler, to open the sound-file
    48     OggVorbis_File      oggStream;            //!< The stream this Ogg-player is playing back
    49     vorbis_info*        vorbisInfo;           //!< The information held in the opened ogg-file
    50     vorbis_comment*     vorbisComment;        //!< Comments about the ogg-file
     47  FILE*               oggFile;              //!< general file-handler, to open the sound-file
     48  OggVorbis_File      oggStream;            //!< The stream this Ogg-player is playing back
     49  vorbis_info*        vorbisInfo;           //!< The information held in the opened ogg-file
     50  vorbis_comment*     vorbisComment;        //!< Comments about the ogg-file
    5151
    52     ALuint              buffers[2];           //!< buffers that handle sequentially buffering of the audio
    53     ALuint              source;               //!< The source we play back on
    54     ALenum              format;               //!< The format we play back
    55     bool                trackLoaded;          //!< If a Track has been loaded.
    56   };
     52  ALuint              buffers[2];           //!< buffers that handle sequentially buffering of the audio
     53  ALuint              source;               //!< The source we play back on
     54  ALenum              format;               //!< The format we play back
     55  bool                trackLoaded;          //!< If a Track has been loaded.
     56};
    5757
    5858
  • trunk/src/world_entities/playable.cc

    r6868 r6871  
    253253{
    254254  SYNCHELP_READ_BEGIN();
    255  
     255
    256256  byte flags;
    257  
     257
    258258  SYNCHELP_READ_BYTE( flags, NWT_PL_FLAGS );
    259  
     259
    260260  bFire = (flags & FLAGS_bFire) != 0;
    261  
     261
    262262  return SYNCHELP_READ_N;
    263263}
     
    267267  SYNCHELP_WRITE_BEGIN();
    268268  byte flags = 0;
    269  
     269
    270270  if ( bFire )
    271271    flags |= FLAGS_bFire;
    272  
     272
    273273
    274274  SYNCHELP_WRITE_BYTE( flags, NWT_PL_FLAGS );
    275275  oldFlags = flags;
    276276
    277  
     277
    278278  return SYNCHELP_WRITE_N;
    279279}
     
    282282{
    283283  byte flags = 0;
    284  
     284
    285285  if ( bFire )
    286286    flags |= FLAGS_bFire;
    287  
     287
    288288  return flags!=oldFlags;
    289289}
  • trunk/src/world_entities/playable.h

    r6868 r6871  
    2727    virtual ~Playable();
    2828
    29     virtual void enter()=0;
    30     virtual void leave()=0;
     29    virtual void enter() = 0;
     30    virtual void leave() = 0;
    3131
    3232    virtual bool pickup(PowerUp* powerUp);
     
    5454    /** @return a List of Events in PEV_* sytle */
    5555    inline const std::list<int>& getEventList() { return this->events; };
    56    
     56
    5757    int       writeSync(const byte* data, int length, int sender);
    5858    int       readSync(byte* data, int maxLength );
  • trunk/src/world_entities/player.h

    r6443 r6871  
    3030    bool              setControllable(Playable* controllalble);
    3131    inline Playable*  getControllable() { return this->controllable; };
     32    bool              disconnectControllable();
    3233
    3334    void              weaponConfigChanged();
    34     bool              disconnectControllable();
    3535
    3636    // eventListener extension.
  • trunk/src/world_entities/space_ships/helicopter.cc

    r6805 r6871  
    213213}
    214214
    215 void  Helicopter::attachCamera()
    216 {
     215void Helicopter::enter()
     216{
     217  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
    217218  State::getCamera()->setParentSoft(this->getWeaponManager()->getFixedTarget());
    218219  State::getCameraTarget()->setParentSoft(this->getWeaponManager()->getFixedTarget());
    219 
    220 }
    221 
    222 
    223 void Helicopter::enter()
    224 {
    225   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
    226   this->attachCamera();
    227 
    228 
    229220}
    230221
  • trunk/src/world_entities/space_ships/helicopter.h

    r6805 r6871  
    2525    virtual void enter();
    2626    virtual void leave();
    27     virtual void attachCamera();
    2827
    2928    virtual void postSpawn();
  • trunk/src/world_entities/space_ships/hover.cc

    r6824 r6871  
    3939 */
    4040Hover::~Hover ()
    41 {}
     41{
     42
     43}
    4244
    4345/**
     
    185187}
    186188
    187 void  Hover::attachCamera()
    188 {
     189
     190void Hover::enter()
     191{
     192  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
     193
    189194  State::getCamera()->setParentSoft(&this->cameraNode);
    190195  State::getCamera()->setRelCoorSoft(-10, 0,0);
    191196  State::getCameraTarget()->setParentSoft(&this->cameraNode);
    192 }
    193 
    194 
    195 void Hover::enter()
    196 {
    197   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
    198   this->attachCamera();
    199 
    200 
    201197}
    202198
  • trunk/src/world_entities/space_ships/hover.h

    r6807 r6871  
    2222    virtual void enter();
    2323    virtual void leave();
    24     virtual void attachCamera();
    2524
    2625    virtual void postSpawn();
Note: See TracChangeset for help on using the changeset viewer.