Merge branch 'Gohan' of https://github.com/Gohan1989/openmw
commit
ea64a02f91
@ -0,0 +1,132 @@
|
||||
|
||||
# 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()
|
@ -0,0 +1,56 @@
|
||||
#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;
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
#ifndef AIESCORT_H
|
||||
#define AIESCORT_H
|
||||
|
||||
#include "aipackage.hpp"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
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
|
@ -0,0 +1,27 @@
|
||||
#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;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
#ifndef AIFALLOW_H
|
||||
#define AIFALLOW_H
|
||||
|
||||
#include "aipackage.hpp"
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
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
|
@ -0,0 +1,44 @@
|
||||
#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;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
#ifndef AITRAVEL_HPP_INCLUDED
|
||||
#define AITRAVEL_HPP_INCLUDED
|
||||
|
||||
#include "aipackage.hpp"
|
||||
#include <iostream>
|
||||
|
||||
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
|
@ -0,0 +1,55 @@
|
||||
#include "aiwander.hpp"
|
||||
|
||||
MWMechanics::AiWander::AiWander(int distance, int duration, int timeOfDay,std::vector<int> 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;
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
#ifndef AIWANDER_H
|
||||
#define AIWANDER_H
|
||||
|
||||
#include "aipackage.hpp"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class Ptr;
|
||||
}
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
|
||||
class AiWander : public AiPackage
|
||||
{
|
||||
public:
|
||||
|
||||
AiWander(int distance, int duration, int timeOfDay,std::vector<int> 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<int> mIdle;
|
||||
bool mReset;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // AIWANDER_H
|
Loading…
Reference in New Issue