/* -*-c++-*- * Delta3D Open Source Game and Simulation Engine * Copyright (C) 2006, Alion Science and Technology, BMH Operation * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * William E. Johnson II */ #ifndef DELTA_FIRE_FIGHTER_DDG_ACTOR #define DELTA_FIRE_FIGHTER_DDG_ACTOR #include #include #include #include namespace dtCore { class ParticleSystem; } namespace dtAudio { class Sound; } class FIRE_FIGHTER_EXPORT DDGActor : public ShipActor, public dtCore::Loadable { public: /// Constructor DDGActor(dtGame::GameActorProxy& proxy); /** * The following functions were taken entirely from the * original version of the fire fighter game and changed only * for compatibility with the new API as to preserve functionality */ virtual void SetModelPosition(); void SetForwardStack(dtCore::ParticleSystem* tForwardStack, dtCore::Transform tForwardStackPosition); void SetAfterStack(dtCore::ParticleSystem* tAfterStack, dtCore::Transform tAfterStackPosition); void EngageForwardStack(); void DisengageForwardStack(); void EngageAfterStack(); void DisengageAfterStack(); void SetStackSound(dtAudio::Sound* tStackSound, const dtCore::Transform& tStackSoundPosition); void PlayStackSound(); void StopStackSound(); void LoadFile(const std::string& fileName); protected: bool CheckStack(dtCore::ParticleSystem* stack, bool stackEngaged); dtCore::RefPtr forwardStack; dtCore::RefPtr afterStack; dtCore::RefPtr portWake; dtCore::RefPtr starboardWake; dtCore::RefPtr portBowWake; dtCore::RefPtr stbdBowWake; dtCore::RefPtr portRooster; dtCore::RefPtr stbdRooster; dtCore::RefPtr fwdStack; dtCore::RefPtr aftStack; dtCore::Transform forwardStackPosition; dtCore::Transform afterStackPosition; bool forwardStackEngaged; bool afterStackEngaged; dtCore::RefPtr stackSound; dtCore::Transform stackSoundPosition; /// Destructor virtual ~DDGActor(); private: }; class FIRE_FIGHTER_EXPORT DDGActorProxy : public ShipActorProxy { public: /// Constructor DDGActorProxy(); /// Builds the properties of this actor virtual void BuildPropertyMap(); /// Builds the invokables of this actor virtual void BuildInvokables(); /// Instantiates the actor itself virtual void CreateActor() { SetActor(*new DDGActor(*this)); } protected: /// Destructor virtual ~DDGActorProxy(); private: }; #endif