From 96dd399457f6e41c96ae5b1ff47fd4f29af1dd6e Mon Sep 17 00:00:00 2001 From: marcin Date: Thu, 15 Nov 2012 22:30:15 +0100 Subject: [PATCH] Feature #391 Dummy AI package classes --- openmw/apps/openmw/CMakeLists.txt | 132 -------------------- openmw/apps/openmw/mwmechanics/aiescort.cpp | 56 --------- openmw/apps/openmw/mwmechanics/aiescort.hpp | 41 ------ openmw/apps/openmw/mwmechanics/aifallow.cpp | 27 ---- openmw/apps/openmw/mwmechanics/aifallow.hpp | 36 ------ openmw/apps/openmw/mwmechanics/aitravel.cpp | 44 ------- openmw/apps/openmw/mwmechanics/aitravel.hpp | 37 ------ openmw/apps/openmw/mwmechanics/aiwander.cpp | 55 -------- openmw/apps/openmw/mwmechanics/aiwander.hpp | 42 ------- 9 files changed, 470 deletions(-) delete mode 100644 openmw/apps/openmw/CMakeLists.txt delete mode 100644 openmw/apps/openmw/mwmechanics/aiescort.cpp delete mode 100644 openmw/apps/openmw/mwmechanics/aiescort.hpp delete mode 100644 openmw/apps/openmw/mwmechanics/aifallow.cpp delete mode 100644 openmw/apps/openmw/mwmechanics/aifallow.hpp delete mode 100644 openmw/apps/openmw/mwmechanics/aitravel.cpp delete mode 100644 openmw/apps/openmw/mwmechanics/aitravel.hpp delete mode 100644 openmw/apps/openmw/mwmechanics/aiwander.cpp delete mode 100644 openmw/apps/openmw/mwmechanics/aiwander.hpp diff --git a/openmw/apps/openmw/CMakeLists.txt b/openmw/apps/openmw/CMakeLists.txt deleted file mode 100644 index cdfbcc27db..0000000000 --- a/openmw/apps/openmw/CMakeLists.txt +++ /dev/null @@ -1,132 +0,0 @@ - -# config file -configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/config.hpp.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/config.hpp") - -# local files -set(GAME - main.cpp - engine.cpp -) -set(GAME_HEADER - engine.hpp - config.hpp -) -source_group(game FILES ${GAME} ${GAME_HEADER}) - -add_openmw_dir (mwrender - renderingmanager debugging sky player animation npcanimation creatureanimation actors objects - renderinginterface localmap occlusionquery terrain terrainmaterial water shadows - compositors characterpreview externalrendering globalmap - ) - -add_openmw_dir (mwinput - inputmanagerimp - ) - -add_openmw_dir (mwgui - text_input widgets race class birth review windowmanagerimp console dialogue - dialogue_history window_base stats_window messagebox journalwindow charactercreation - map_window window_pinnable_base cursorreplace tooltips scrollwindow bookwindow list - formatting inventorywindow container hud countdialog tradewindow settingswindow - confirmationdialog alchemywindow referenceinterface spellwindow mainmenu quickkeysmenu - itemselection spellbuyingwindow loadingscreen levelupdialog waitdialog spellcreationdialog - enchantingdialog trainingwindow travelwindow - ) - -add_openmw_dir (mwdialogue - dialoguemanagerimp journalimp journalentry quest topic - ) - -add_openmw_dir (mwscript - locals scriptmanagerimp compilercontext interpretercontext cellextensions miscextensions - guiextensions soundextensions skyextensions statsextensions containerextensions - aiextensions controlextensions extensions globalscripts ref dialogueextensions - animationextensions transformationextensions consoleextensions userextensions - ) - -add_openmw_dir (mwsound - soundmanagerimp openal_output audiere_decoder mpgsnd_decoder ffmpeg_decoder - ) - -add_openmw_dir (mwworld - refdata worldimp physicssystem scene globals class action nullaction actionteleport - containerstore actiontalk actiontake manualref player cellfunctors - cells localscripts customdata weather inventorystore ptr actionopen actionread - actionequip timestamp actionalchemy cellstore actionapply actioneat - esmstore store recordcmp - ) - -add_openmw_dir (mwclass - classes activator creature npc weapon armor potion apparatus book clothing container door - ingredient creaturelevlist itemlevlist light lockpick misc probe repair static - ) - -add_openmw_dir (mwmechanics - mechanicsmanagerimp stat creaturestats magiceffects movement actors drawstate spells - activespells npcstats aipackage aisequence alchemy aiwander aitravel aifallow aiescort - ) - -add_openmw_dir (mwbase - environment world scriptmanager dialoguemanager journal soundmanager mechanicsmanager - inputmanager windowmanager - ) - -# Main executable -IF(OGRE_STATIC) -IF(WIN32) -ADD_DEFINITIONS(-DENABLE_PLUGIN_CgProgramManager -DENABLE_PLUGIN_OctreeSceneManager -DENABLE_PLUGIN_ParticleFX -DENABLE_PLUGIN_-DENABLE_PLUGIN_Direct3D9 -DENABLE_PLUGIN_GL) -set(OGRE_STATIC_PLUGINS ${OGRE_Plugin_CgProgramManager_LIBRARIES} ${OGRE_Plugin_OctreeSceneManager_LIBRARIES} ${OGRE_Plugin_ParticleFX_LIBRARIES} ${OGRE_RenderSystem_Direct3D9_LIBRARIES} ${OGRE_RenderSystem_GL_LIBRARIES}) -ELSE(WIN32) -ADD_DEFINITIONS(-DENABLE_PLUGIN_CgProgramManager -DENABLE_PLUGIN_OctreeSceneManager -DENABLE_PLUGIN_ParticleFX -DENABLE_PLUGIN_GL) -set(OGRE_STATIC_PLUGINS ${OGRE_Plugin_CgProgramManager_LIBRARIES} ${Cg_LIBRARIES} ${OGRE_Plugin_OctreeSceneManager_LIBRARIES} ${OGRE_Plugin_ParticleFX_LIBRARIES} ${OGRE_RenderSystem_GL_LIBRARIES}) -ENDIF(WIN32) -ENDIF(OGRE_STATIC) -add_executable(openmw - ${OPENMW_LIBS} ${OPENMW_LIBS_HEADER} - ${OPENMW_FILES} - ${GAME} ${GAME_HEADER} - ${APPLE_BUNDLE_RESOURCES} -) - -# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING -# when we change the backend. -include_directories(${SOUND_INPUT_INCLUDES} ${BULLET_INCLUDE_DIRS}) -add_definitions(${SOUND_DEFINE}) - -target_link_libraries(openmw - ${OGRE_LIBRARIES} - ${OGRE_Terrain_LIBRARY} - ${OGRE_STATIC_PLUGINS} - ${OIS_LIBRARIES} - ${Boost_LIBRARIES} - ${OPENAL_LIBRARY} - ${SOUND_INPUT_LIBRARY} - ${BULLET_LIBRARIES} - ${MYGUI_LIBRARIES} - ${MYGUI_PLATFORM_LIBRARIES} - "shiny" - "shiny.OgrePlatform" - "oics" - components -) - -# Fix for not visible pthreads functions for linker with glibc 2.15 -if (UNIX AND NOT APPLE) -target_link_libraries(openmw ${CMAKE_THREAD_LIBS_INIT}) -endif() - -if(APPLE) - find_library(CARBON_FRAMEWORK Carbon) - find_library(COCOA_FRAMEWORK Cocoa) - find_library(IOKIT_FRAMEWORK IOKit) - target_link_libraries(openmw ${CARBON_FRAMEWORK} ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK}) -endif(APPLE) - -if(DPKG_PROGRAM) - INSTALL(TARGETS openmw RUNTIME DESTINATION games COMPONENT openmw) -endif(DPKG_PROGRAM) - -if (BUILD_WITH_CODE_COVERAGE) - add_definitions (--coverage) - target_link_libraries(openmw gcov) -endif() diff --git a/openmw/apps/openmw/mwmechanics/aiescort.cpp b/openmw/apps/openmw/mwmechanics/aiescort.cpp deleted file mode 100644 index eac5d3bf5f..0000000000 --- a/openmw/apps/openmw/mwmechanics/aiescort.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "aiescort.hpp" - - -MWMechanics::AiEscort::AiEscort(std::string ActorID,int Duration, float X, float Y, float Z, bool Reset) -{ - mActorID = ActorID; - mDuration = Duration; - mX = X; - mY = Y; - mZ = Z; - mReset = Reset; - -} -MWMechanics::AiEscort *MWMechanics::AiEscort::clone() const -{ - AiEscort * temp = new AiEscort(*this); - return temp; -} - -bool MWMechanics::AiEscort::execute (const MWWorld::Ptr& actor) -{ - std::cout << "AiEscort complted. \n"; - return true; -} - -int MWMechanics::AiEscort::getTypeId() const -{ - return 2; -} - -float MWMechanics::AiEscort::getX() -{ - return mX; -} -float MWMechanics::AiEscort::getY() -{ - return mY; -} -float MWMechanics::AiEscort::getZ() -{ - return mZ; -} -bool MWMechanics::AiEscort::getReset() -{ - return mReset; -} - -std::string MWMechanics::AiEscort::getActorID() -{ - return mActorID; -} - -int MWMechanics::AiEscort::getDuration() -{ - return mDuration; -} diff --git a/openmw/apps/openmw/mwmechanics/aiescort.hpp b/openmw/apps/openmw/mwmechanics/aiescort.hpp deleted file mode 100644 index cc6a1ec297..0000000000 --- a/openmw/apps/openmw/mwmechanics/aiescort.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef AIESCORT_H -#define AIESCORT_H - -#include "aipackage.hpp" -#include -#include - -namespace MWWorld -{ -class Ptr; -} - -namespace MWMechanics -{ -class AiEscort : public AiPackage -{ - public: - AiEscort(std::string ActorID,int Duration, float X, float Y, float Z, bool Reset = false); - virtual AiEscort *clone() const; - - virtual bool execute (const MWWorld::Ptr& actor); - ///< \return Package completed? - - virtual int getTypeId() const; - float getX(); - float getY(); - float getZ(); - bool getReset(); - std::string getActorID(); - int getDuration(); - - private: - std::string mActorID; - float mX; - float mY; - float mZ; - int mDuration; - bool mReset; -}; -} -#endif // AIESCORT_H diff --git a/openmw/apps/openmw/mwmechanics/aifallow.cpp b/openmw/apps/openmw/mwmechanics/aifallow.cpp deleted file mode 100644 index 2ba5277618..0000000000 --- a/openmw/apps/openmw/mwmechanics/aifallow.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "aifallow.hpp" - -MWMechanics::AiFallow::AiFallow(std::string ActorID,float duration, float X, float Y, float Z, bool Reset) -{ - mActorID = ActorID; - mDuration = duration; - mX = X; - mY = Y; - mZ = Z; - mReset = Reset; -} -MWMechanics::AiFallow *MWMechanics::AiFallow::clone() const -{ - AiFallow * temp = new AiFallow(*this); - return temp; -} - - bool MWMechanics::AiFallow::execute (const MWWorld::Ptr& actor) -{ - std::cout << "AiFallow complited. \n"; - return true; -} - - int MWMechanics::AiFallow::getTypeId() const -{ - return 3; -} diff --git a/openmw/apps/openmw/mwmechanics/aifallow.hpp b/openmw/apps/openmw/mwmechanics/aifallow.hpp deleted file mode 100644 index b602bf300f..0000000000 --- a/openmw/apps/openmw/mwmechanics/aifallow.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef AIFALLOW_H -#define AIFALLOW_H - -#include "aipackage.hpp" -#include -#include - -namespace MWWorld -{ -class Ptr; -} - -namespace MWMechanics -{ - -class AiFallow : AiPackage -{ - public: - AiFallow(std::string ActorID,float duration, float X, float Y, float Z, bool Reset = false); - virtual AiFallow *clone() const; - - virtual bool execute (const MWWorld::Ptr& actor); - ///< \return Package completed? - - virtual int getTypeId() const; - ///< 0: Wanter, 1 Travel, 2 Escort, 3 Follo - private: - float mDuration; - float mX; - float mY; - float mZ; - bool mReset; - std::string mActorID; -}; -} -#endif // AIFALLOW_H diff --git a/openmw/apps/openmw/mwmechanics/aitravel.cpp b/openmw/apps/openmw/mwmechanics/aitravel.cpp deleted file mode 100644 index a71c857834..0000000000 --- a/openmw/apps/openmw/mwmechanics/aitravel.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "aitravel.hpp" - -MWMechanics::AiTravel::AiTravel(float x, float y, float z, bool reset) -{ - mX = x; - mY = y; - mZ = z; - mReset = reset; -} -MWMechanics::AiTravel * MWMechanics::AiTravel::clone() const -{ - AiTravel * temp = new AiTravel(*this); - return temp; -} -bool MWMechanics::AiTravel::execute (const MWWorld::Ptr& actor) -{ - std::cout << "AiTravel complited. \n"; - return true; -} -int MWMechanics::AiTravel::getTypeId() const -{ - return 1; -} - -float MWMechanics::AiTravel::getX() -{ - return mX; -} - - -float MWMechanics::AiTravel::getY() -{ - return mY; -} - -float MWMechanics::AiTravel::getZ() -{ - return mZ; -} - -bool MWMechanics::AiTravel::getReset() -{ - return mReset; -} diff --git a/openmw/apps/openmw/mwmechanics/aitravel.hpp b/openmw/apps/openmw/mwmechanics/aitravel.hpp deleted file mode 100644 index 0503935fd4..0000000000 --- a/openmw/apps/openmw/mwmechanics/aitravel.hpp +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef AITRAVEL_HPP_INCLUDED -#define AITRAVEL_HPP_INCLUDED - -#include "aipackage.hpp" -#include - -namespace MWWorld -{ -class Ptr; -} - -namespace MWMechanics -{ -class AiTravel : public AiPackage -{ - public: - AiTravel(float x, float y, float z, bool reset = false); - virtual AiTravel *clone() const; - - virtual bool execute (const MWWorld::Ptr& actor); - ///< \return Package completed? - - virtual int getTypeId() const; - float getX(); - float getY(); - float getZ(); - bool getReset(); - - private: - float mX; - float mY; - float mZ; - bool mReset; -}; -} - -#endif // AITRAVEL_HPP_INCLUDED diff --git a/openmw/apps/openmw/mwmechanics/aiwander.cpp b/openmw/apps/openmw/mwmechanics/aiwander.cpp deleted file mode 100644 index b77b2c04bc..0000000000 --- a/openmw/apps/openmw/mwmechanics/aiwander.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "aiwander.hpp" - -MWMechanics::AiWander::AiWander(int distance, int duration, int timeOfDay,std::vector Idle,bool reset) -{ - mDistance = distance; - mDuration = duration; - mTimeOfDay = timeOfDay; - mIdle = Idle; - mReset = reset; -} - -int MWMechanics::AiWander::getDistance() const -{ - return mDistance; -} - -int MWMechanics::AiWander::getDuration() const -{ - return mDuration; -} - -int MWMechanics::AiWander::getTimeOfDay() const -{ - return mTimeOfDay; -} - -bool MWMechanics::AiWander::getReset() const -{ - return mReset; -} - -MWMechanics::AiPackage * MWMechanics::AiWander::clone() const -{ - return new AiWander(*this); -} - -bool MWMechanics::AiWander::execute (const MWWorld::Ptr& actor) -{ - std::cout << "AiWadner complited. \n"; - return true; -} - -int MWMechanics::AiWander::getTypeId() const -{ - return 0; -} - -int MWMechanics::AiWander::getIdle(int index) const -{ - if(index < 0 || (uint)index > mIdle.size()) - return -1; - int temp; - temp = mIdle.at(index); - return temp; -} diff --git a/openmw/apps/openmw/mwmechanics/aiwander.hpp b/openmw/apps/openmw/mwmechanics/aiwander.hpp deleted file mode 100644 index 6ecd7f1008..0000000000 --- a/openmw/apps/openmw/mwmechanics/aiwander.hpp +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef AIWANDER_H -#define AIWANDER_H - -#include "aipackage.hpp" -#include -#include - -namespace MWWorld -{ -class Ptr; -} - -namespace MWMechanics -{ - -class AiWander : public AiPackage -{ -public: - - AiWander(int distance, int duration, int timeOfDay,std::vector Idle,bool reset=false); - virtual AiPackage *clone() const; - virtual bool execute (const MWWorld::Ptr& actor); - ///< \return Package completed? - virtual int getTypeId() const; - ///< 0: Wander - - int getDistance() const; - int getDuration()const; - int getTimeOfDay()const; - bool getReset()const; - int getIdle(int index) const; - -private: - int mDistance; - int mDuration; - int mTimeOfDay; - std::vector mIdle; - bool mReset; -}; -} - -#endif // AIWANDER_H