mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Merge remote-tracking branch 'OpenMW/master' into FixWarnings
Conflicts: apps/openmw/mwinput/inputmanagerimp.cpp apps/openmw/mwmechanics/actors.cpp extern/sdl4ogre/sdlcursormanager.cpp
This commit is contained in:
commit
36141b0c53
18 changed files with 83 additions and 118 deletions
|
@ -97,43 +97,6 @@ endif()
|
||||||
# We probably support older versions than this.
|
# We probably support older versions than this.
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
# source directory: libs
|
|
||||||
|
|
||||||
set(LIBS_DIR ${CMAKE_SOURCE_DIR}/libs)
|
|
||||||
|
|
||||||
set(OENGINE_OGRE
|
|
||||||
${LIBS_DIR}/openengine/ogre/renderer.cpp
|
|
||||||
${LIBS_DIR}/openengine/ogre/lights.cpp
|
|
||||||
${LIBS_DIR}/openengine/ogre/selectionbuffer.cpp
|
|
||||||
${LIBS_DIR}/openengine/ogre/imagerotate.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(OENGINE_GUI
|
|
||||||
${LIBS_DIR}/openengine/gui/loglistener.cpp
|
|
||||||
${LIBS_DIR}/openengine/gui/manager.cpp
|
|
||||||
${LIBS_DIR}/openengine/gui/layout.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(OENGINE_BULLET
|
|
||||||
${LIBS_DIR}/openengine/bullet/BtOgre.cpp
|
|
||||||
${LIBS_DIR}/openengine/bullet/BtOgreExtras.h
|
|
||||||
${LIBS_DIR}/openengine/bullet/BtOgreGP.h
|
|
||||||
${LIBS_DIR}/openengine/bullet/BtOgrePG.h
|
|
||||||
${LIBS_DIR}/openengine/bullet/physic.cpp
|
|
||||||
${LIBS_DIR}/openengine/bullet/physic.hpp
|
|
||||||
${LIBS_DIR}/openengine/bullet/BulletShapeLoader.cpp
|
|
||||||
${LIBS_DIR}/openengine/bullet/BulletShapeLoader.h
|
|
||||||
${LIBS_DIR}/openengine/bullet/trace.cpp
|
|
||||||
${LIBS_DIR}/openengine/bullet/trace.h
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_BULLET})
|
|
||||||
source_group(libs\\openengine FILES ${OENGINE_ALL})
|
|
||||||
|
|
||||||
set(OPENMW_LIBS ${OENGINE_ALL})
|
|
||||||
set(OPENMW_LIBS_HEADER)
|
|
||||||
|
|
||||||
# Sound setup
|
# Sound setup
|
||||||
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE AVRESAMPLE)
|
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE AVRESAMPLE)
|
||||||
unset(FFMPEG_LIBRARIES CACHE)
|
unset(FFMPEG_LIBRARIES CACHE)
|
||||||
|
@ -275,6 +238,7 @@ include_directories("."
|
||||||
${MYGUI_INCLUDE_DIRS}
|
${MYGUI_INCLUDE_DIRS}
|
||||||
${MYGUI_PLATFORM_INCLUDE_DIRS}
|
${MYGUI_PLATFORM_INCLUDE_DIRS}
|
||||||
${OPENAL_INCLUDE_DIR}
|
${OPENAL_INCLUDE_DIR}
|
||||||
|
${BULLET_INCLUDE_DIRS}
|
||||||
${LIBS_DIR}
|
${LIBS_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -572,6 +536,10 @@ if(WIN32)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
# Libs
|
||||||
|
include_directories(libs)
|
||||||
|
add_subdirectory(libs/openengine)
|
||||||
|
|
||||||
# Extern
|
# Extern
|
||||||
add_subdirectory (extern/shiny)
|
add_subdirectory (extern/shiny)
|
||||||
add_subdirectory (extern/ogre-ffmpeg-videoplayer)
|
add_subdirectory (extern/ogre-ffmpeg-videoplayer)
|
||||||
|
|
|
@ -165,7 +165,8 @@ qt4_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
|
||||||
qt4_wrap_cpp(OPENCS_MOC_SRC ${OPENCS_HDR_QT})
|
qt4_wrap_cpp(OPENCS_MOC_SRC ${OPENCS_HDR_QT})
|
||||||
qt4_add_resources(OPENCS_RES_SRC ${OPENCS_RES})
|
qt4_add_resources(OPENCS_RES_SRC ${OPENCS_RES})
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${BULLET_INCLUDE_DIRS})
|
# for compiled .ui files
|
||||||
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set (OPENCS_MAC_ICON ${CMAKE_SOURCE_DIR}/files/mac/openmw-cs.icns)
|
set (OPENCS_MAC_ICON ${CMAKE_SOURCE_DIR}/files/mac/openmw-cs.icns)
|
||||||
|
@ -175,7 +176,6 @@ endif(APPLE)
|
||||||
|
|
||||||
add_executable(openmw-cs
|
add_executable(openmw-cs
|
||||||
MACOSX_BUNDLE
|
MACOSX_BUNDLE
|
||||||
${OENGINE_BULLET}
|
|
||||||
${OPENCS_SRC}
|
${OPENCS_SRC}
|
||||||
${OPENCS_UI_HDR}
|
${OPENCS_UI_HDR}
|
||||||
${OPENCS_MOC_SRC}
|
${OPENCS_MOC_SRC}
|
||||||
|
@ -199,6 +199,7 @@ if(APPLE)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
target_link_libraries(openmw-cs
|
target_link_libraries(openmw-cs
|
||||||
|
${OENGINE_LIBRARY}
|
||||||
${OGRE_LIBRARIES}
|
${OGRE_LIBRARIES}
|
||||||
${OGRE_Overlay_LIBRARIES}
|
${OGRE_Overlay_LIBRARIES}
|
||||||
${OGRE_STATIC_PLUGINS}
|
${OGRE_STATIC_PLUGINS}
|
||||||
|
|
|
@ -104,7 +104,6 @@ find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
|
|
||||||
if (NOT ANDROID)
|
if (NOT ANDROID)
|
||||||
add_executable(openmw
|
add_executable(openmw
|
||||||
${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
|
|
||||||
${OPENMW_FILES}
|
${OPENMW_FILES}
|
||||||
${GAME} ${GAME_HEADER}
|
${GAME} ${GAME_HEADER}
|
||||||
${APPLE_BUNDLE_RESOURCES}
|
${APPLE_BUNDLE_RESOURCES}
|
||||||
|
@ -112,7 +111,6 @@ if (NOT ANDROID)
|
||||||
else ()
|
else ()
|
||||||
add_library(openmw
|
add_library(openmw
|
||||||
SHARED
|
SHARED
|
||||||
${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
|
|
||||||
${OPENMW_FILES}
|
${OPENMW_FILES}
|
||||||
${GAME} ${GAME_HEADER}
|
${GAME} ${GAME_HEADER}
|
||||||
)
|
)
|
||||||
|
@ -120,9 +118,10 @@ endif ()
|
||||||
|
|
||||||
# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
|
# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
|
||||||
# when we change the backend.
|
# when we change the backend.
|
||||||
include_directories(${SOUND_INPUT_INCLUDES} ${BULLET_INCLUDE_DIRS})
|
include_directories(${SOUND_INPUT_INCLUDES})
|
||||||
|
|
||||||
target_link_libraries(openmw
|
target_link_libraries(openmw
|
||||||
|
${OENGINE_LIBRARY}
|
||||||
${OGRE_LIBRARIES}
|
${OGRE_LIBRARIES}
|
||||||
${OGRE_STATIC_PLUGINS}
|
${OGRE_STATIC_PLUGINS}
|
||||||
${SHINY_LIBRARIES}
|
${SHINY_LIBRARIES}
|
||||||
|
|
|
@ -817,7 +817,7 @@ namespace MWInput
|
||||||
|
|
||||||
setPlayerControlsEnabled(!guiMode);
|
setPlayerControlsEnabled(!guiMode);
|
||||||
|
|
||||||
//esc, to leave inital movie screen
|
//esc, to leave initial movie screen
|
||||||
OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(SDLK_ESCAPE);
|
OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(SDLK_ESCAPE);
|
||||||
bool guiFocus = MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(kc), 0);
|
bool guiFocus = MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(kc), 0);
|
||||||
setPlayerControlsEnabled(!guiFocus);
|
setPlayerControlsEnabled(!guiFocus);
|
||||||
|
@ -844,7 +844,7 @@ namespace MWInput
|
||||||
else
|
else
|
||||||
mInputBinder->buttonReleased(deviceID, arg);
|
mInputBinder->buttonReleased(deviceID, arg);
|
||||||
|
|
||||||
//to escape inital movie
|
//to escape initial movie
|
||||||
OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(SDLK_ESCAPE);
|
OIS::KeyCode kc = mInputManager->sdl2OISKeyCode(SDLK_ESCAPE);
|
||||||
setPlayerControlsEnabled(!MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::Enum(kc)));
|
setPlayerControlsEnabled(!MyGUI::InputManager::getInstance().injectKeyRelease(MyGUI::KeyCode::Enum(kc)));
|
||||||
}
|
}
|
||||||
|
@ -1237,8 +1237,11 @@ namespace MWInput
|
||||||
bool controlExists = mInputBinder->getChannel(i)->getControlsCount () != 0;
|
bool controlExists = mInputBinder->getChannel(i)->getControlsCount () != 0;
|
||||||
if (!controlExists)
|
if (!controlExists)
|
||||||
{
|
{
|
||||||
float inital = (defaultButtonBindings.find(i) != defaultButtonBindings.end()) ? 0.0f : 0.5f;
|
float initial;
|
||||||
control = new ICS::Control(boost::lexical_cast<std::string>(i), false, true, inital, ICS::ICS_MAX, ICS::ICS_MAX);
|
if (defaultButtonBindings.find(i) != defaultButtonBindings.end())
|
||||||
|
initial = 0.0f;
|
||||||
|
else initial = 0.5f;
|
||||||
|
control = new ICS::Control(boost::lexical_cast<std::string>(i), false, true, initial, ICS::ICS_MAX, ICS::ICS_MAX);
|
||||||
mInputBinder->addControl(control);
|
mInputBinder->addControl(control);
|
||||||
control->attachChannel(mInputBinder->getChannel(i), ICS::Channel::DIRECT);
|
control->attachChannel(mInputBinder->getChannel(i), ICS::Channel::DIRECT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -519,8 +519,8 @@ namespace MWMechanics
|
||||||
effects.get(EffectKey(ESM::MagicEffect::DrainAttribute, i)).getMagnitude(),
|
effects.get(EffectKey(ESM::MagicEffect::DrainAttribute, i)).getMagnitude(),
|
||||||
effects.get(EffectKey(ESM::MagicEffect::AbsorbAttribute, i)).getMagnitude());
|
effects.get(EffectKey(ESM::MagicEffect::AbsorbAttribute, i)).getMagnitude());
|
||||||
|
|
||||||
stat.damage(effects.get(EffectKey(ESM::MagicEffect::DamageAttribute, i)).getMagnitude() * duration * 1.5f);
|
stat.damage(effects.get(EffectKey(ESM::MagicEffect::DamageAttribute, i)).getMagnitude() * duration);
|
||||||
stat.restore(effects.get(EffectKey(ESM::MagicEffect::RestoreAttribute, i)).getMagnitude() * duration * 1.5f);
|
stat.restore(effects.get(EffectKey(ESM::MagicEffect::RestoreAttribute, i)).getMagnitude() * duration);
|
||||||
|
|
||||||
creatureStats.setAttribute(i, stat);
|
creatureStats.setAttribute(i, stat);
|
||||||
}
|
}
|
||||||
|
@ -786,8 +786,8 @@ namespace MWMechanics
|
||||||
effects.get(EffectKey(ESM::MagicEffect::DrainSkill, i)).getMagnitude(),
|
effects.get(EffectKey(ESM::MagicEffect::DrainSkill, i)).getMagnitude(),
|
||||||
effects.get(EffectKey(ESM::MagicEffect::AbsorbSkill, i)).getMagnitude());
|
effects.get(EffectKey(ESM::MagicEffect::AbsorbSkill, i)).getMagnitude());
|
||||||
|
|
||||||
skill.damage(effects.get(EffectKey(ESM::MagicEffect::DamageSkill, i)).getMagnitude() * duration * 1.5f);
|
skill.damage(effects.get(EffectKey(ESM::MagicEffect::DamageSkill, i)).getMagnitude() * duration);
|
||||||
skill.restore(effects.get(EffectKey(ESM::MagicEffect::RestoreSkill, i)).getMagnitude() * duration * 1.5f);
|
skill.restore(effects.get(EffectKey(ESM::MagicEffect::RestoreSkill, i)).getMagnitude() * duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -466,12 +466,9 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context
|
|
||||||
= static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled = MWBase::Environment::get().getMechanicsManager()->toggleAI();
|
bool enabled = MWBase::Environment::get().getMechanicsManager()->toggleAI();
|
||||||
|
|
||||||
context.report (enabled ? "AI -> On" : "AI -> Off");
|
runtime.getContext().report (enabled ? "AI -> On" : "AI -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -65,12 +65,9 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context
|
|
||||||
= static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled = MWBase::Environment::get().getWorld()->toggleCollisionMode();
|
bool enabled = MWBase::Environment::get().getWorld()->toggleCollisionMode();
|
||||||
|
|
||||||
context.report (enabled ? "Collision -> On" : "Collision -> Off");
|
runtime.getContext().report (enabled ? "Collision -> On" : "Collision -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -212,13 +212,10 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context =
|
|
||||||
static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled =
|
bool enabled =
|
||||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_CollisionDebug);
|
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_CollisionDebug);
|
||||||
|
|
||||||
context.report (enabled ?
|
runtime.getContext().report (enabled ?
|
||||||
"Collision Mesh Rendering -> On" : "Collision Mesh Rendering -> Off");
|
"Collision Mesh Rendering -> On" : "Collision Mesh Rendering -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -230,13 +227,10 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context =
|
|
||||||
static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled =
|
bool enabled =
|
||||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_BoundingBoxes);
|
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_BoundingBoxes);
|
||||||
|
|
||||||
context.report (enabled ?
|
runtime.getContext().report (enabled ?
|
||||||
"Bounding Box Rendering -> On" : "Bounding Box Rendering -> Off");
|
"Bounding Box Rendering -> On" : "Bounding Box Rendering -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -247,13 +241,10 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context =
|
|
||||||
static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled =
|
bool enabled =
|
||||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_Wireframe);
|
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_Wireframe);
|
||||||
|
|
||||||
context.report (enabled ?
|
runtime.getContext().report (enabled ?
|
||||||
"Wireframe Rendering -> On" : "Wireframe Rendering -> Off");
|
"Wireframe Rendering -> On" : "Wireframe Rendering -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -263,13 +254,10 @@ namespace MWScript
|
||||||
public:
|
public:
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context =
|
|
||||||
static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled =
|
bool enabled =
|
||||||
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_Pathgrid);
|
MWBase::Environment::get().getWorld()->toggleRenderMode (MWBase::World::Render_Pathgrid);
|
||||||
|
|
||||||
context.report (enabled ?
|
runtime.getContext().report (enabled ?
|
||||||
"Path Grid rendering -> On" : "Path Grid Rendering -> Off");
|
"Path Grid rendering -> On" : "Path Grid Rendering -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -386,17 +374,14 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute(Interpreter::Runtime &runtime)
|
virtual void execute(Interpreter::Runtime &runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context =
|
|
||||||
static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
MWBase::World *world =
|
MWBase::World *world =
|
||||||
MWBase::Environment::get().getWorld();
|
MWBase::Environment::get().getWorld();
|
||||||
|
|
||||||
if (world->toggleVanityMode(sActivate)) {
|
if (world->toggleVanityMode(sActivate)) {
|
||||||
context.report(sActivate ? "Vanity Mode -> On" : "Vanity Mode -> Off");
|
runtime.getContext().report(sActivate ? "Vanity Mode -> On" : "Vanity Mode -> Off");
|
||||||
sActivate = !sActivate;
|
sActivate = !sActivate;
|
||||||
} else {
|
} else {
|
||||||
context.report("Vanity Mode -> No");
|
runtime.getContext().report("Vanity Mode -> No");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -862,14 +847,11 @@ namespace MWScript
|
||||||
|
|
||||||
void printGlobalVars(Interpreter::Runtime &runtime)
|
void printGlobalVars(Interpreter::Runtime &runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context =
|
|
||||||
static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
std::stringstream str;
|
std::stringstream str;
|
||||||
str<< "Global variables:";
|
str<< "Global variables:";
|
||||||
|
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
std::vector<std::string> names = context.getGlobals();
|
std::vector<std::string> names = runtime.getContext().getGlobals();
|
||||||
for(size_t i = 0;i < names.size();++i)
|
for(size_t i = 0;i < names.size();++i)
|
||||||
{
|
{
|
||||||
char type = world->getGlobalVariableType (names[i]);
|
char type = world->getGlobalVariableType (names[i]);
|
||||||
|
@ -879,17 +861,17 @@ namespace MWScript
|
||||||
{
|
{
|
||||||
case 's':
|
case 's':
|
||||||
|
|
||||||
str << context.getGlobalShort (names[i]) << " (short)";
|
str << runtime.getContext().getGlobalShort (names[i]) << " (short)";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
|
|
||||||
str << context.getGlobalLong (names[i]) << " (long)";
|
str << runtime.getContext().getGlobalLong (names[i]) << " (long)";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
|
|
||||||
str << context.getGlobalFloat (names[i]) << " (float)";
|
str << runtime.getContext().getGlobalFloat (names[i]) << " (float)";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -898,7 +880,7 @@ namespace MWScript
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context.report (str.str());
|
runtime.getContext().report (str.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -920,11 +902,9 @@ namespace MWScript
|
||||||
public:
|
public:
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled = MWBase::Environment::get().getWorld()->toggleScripts();
|
bool enabled = MWBase::Environment::get().getWorld()->toggleScripts();
|
||||||
|
|
||||||
context.report(enabled ? "Scripts -> On" : "Scripts -> Off");
|
runtime.getContext().report(enabled ? "Scripts -> On" : "Scripts -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -933,11 +913,9 @@ namespace MWScript
|
||||||
public:
|
public:
|
||||||
virtual void execute (Interpreter::Runtime& runtime)
|
virtual void execute (Interpreter::Runtime& runtime)
|
||||||
{
|
{
|
||||||
InterpreterContext& context = static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
bool enabled = MWBase::Environment::get().getWorld()->toggleGodMode();
|
bool enabled = MWBase::Environment::get().getWorld()->toggleGodMode();
|
||||||
|
|
||||||
context.report (enabled ? "God Mode -> On" : "God Mode -> Off");
|
runtime.getContext().report (enabled ? "God Mode -> On" : "God Mode -> Off");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,7 @@ namespace MWScript
|
||||||
{
|
{
|
||||||
bool enabled = MWBase::Environment::get().getWorld()->toggleSky();
|
bool enabled = MWBase::Environment::get().getWorld()->toggleSky();
|
||||||
|
|
||||||
InterpreterContext& context =
|
runtime.getContext().report (enabled ? "Sky -> On" : "Sky -> Off");
|
||||||
static_cast<InterpreterContext&> (runtime.getContext());
|
|
||||||
|
|
||||||
context.report (enabled ? "Sky -> On" : "Sky -> Off");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Config
|
||||||
/// \return names of all Content Lists in the launcher's .cfg file.
|
/// \return names of all Content Lists in the launcher's .cfg file.
|
||||||
QStringList getContentLists();
|
QStringList getContentLists();
|
||||||
|
|
||||||
/// Set initally selected content list to match values from openmw.cfg, creating if necessary
|
/// Set initially selected content list to match values from openmw.cfg, creating if necessary
|
||||||
void setContentList(const GameSettings& gameSettings);
|
void setContentList(const GameSettings& gameSettings);
|
||||||
|
|
||||||
/// Create a Content List (or replace if it already exists)
|
/// Create a Content List (or replace if it already exists)
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace ESM
|
||||||
mModel.clear();
|
mModel.clear();
|
||||||
mScript.clear();
|
mScript.clear();
|
||||||
mWeight = 0;
|
mWeight = 0;
|
||||||
mFlags = 0;
|
mFlags = 0x8; // set default flag value
|
||||||
mInventory.mList.clear();
|
mInventory.mList.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ int MovieAudioDecoder::audio_decode_frame(AVFrame *frame, int &sample_skip)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if update, update the audio clock w/pts */
|
/* if update, update the audio clock w/pts */
|
||||||
if((uint64_t)pkt->pts != AV_NOPTS_VALUE)
|
if(pkt->pts != AV_NOPTS_VALUE)
|
||||||
mAudioClock = av_q2d(mAVStream->time_base)*pkt->pts;
|
mAudioClock = av_q2d(mAVStream->time_base)*pkt->pts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
extern/sdl4ogre/CMakeLists.txt
vendored
1
extern/sdl4ogre/CMakeLists.txt
vendored
|
@ -6,6 +6,7 @@ set(SDL4OGRE_SOURCE_FILES
|
||||||
sdlinputwrapper.cpp
|
sdlinputwrapper.cpp
|
||||||
sdlcursormanager.cpp
|
sdlcursormanager.cpp
|
||||||
sdlwindowhelper.cpp
|
sdlwindowhelper.cpp
|
||||||
|
imagerotate.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
#include <OgreViewport.h>
|
#include <OgreViewport.h>
|
||||||
|
|
||||||
using namespace Ogre;
|
using namespace Ogre;
|
||||||
using namespace OEngine::Render;
|
|
||||||
|
namespace SFO
|
||||||
|
{
|
||||||
|
|
||||||
void ImageRotate::rotate(const std::string& sourceImage, const std::string& destImage, const float angle)
|
void ImageRotate::rotate(const std::string& sourceImage, const std::string& destImage, const float angle)
|
||||||
{
|
{
|
||||||
|
@ -93,3 +95,5 @@ void ImageRotate::rotate(const std::string& sourceImage, const std::string& dest
|
||||||
root->destroySceneManager(sceneMgr);
|
root->destroySceneManager(sceneMgr);
|
||||||
delete rect;
|
delete rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -3,9 +3,8 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace OEngine
|
|
||||||
{
|
namespace SFO
|
||||||
namespace Render
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/// Rotate an image by certain degrees and save as file, uses the GPU
|
/// Rotate an image by certain degrees and save as file, uses the GPU
|
||||||
|
@ -22,6 +21,5 @@ namespace Render
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
4
extern/sdl4ogre/sdlcursormanager.cpp
vendored
4
extern/sdl4ogre/sdlcursormanager.cpp
vendored
|
@ -7,7 +7,7 @@
|
||||||
#include <SDL_mouse.h>
|
#include <SDL_mouse.h>
|
||||||
#include <SDL_endian.h>
|
#include <SDL_endian.h>
|
||||||
|
|
||||||
#include <openengine/ogre/imagerotate.hpp>
|
#include "imagerotate.hpp"
|
||||||
|
|
||||||
namespace SFO
|
namespace SFO
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@ namespace SFO
|
||||||
|
|
||||||
// we use a render target to uncompress the DDS texture
|
// we use a render target to uncompress the DDS texture
|
||||||
// just blitting doesn't seem to work on D3D9
|
// just blitting doesn't seem to work on D3D9
|
||||||
OEngine::Render::ImageRotate::rotate(tex->getName(), tempName, static_cast<float>(-rotDegrees));
|
ImageRotate::rotate(tex->getName(), tempName, static_cast<float>(-rotDegrees));
|
||||||
|
|
||||||
Ogre::TexturePtr resultTexture = Ogre::TextureManager::getSingleton().getByName(tempName);
|
Ogre::TexturePtr resultTexture = Ogre::TextureManager::getSingleton().getByName(tempName);
|
||||||
|
|
||||||
|
|
33
libs/openengine/CMakeLists.txt
Normal file
33
libs/openengine/CMakeLists.txt
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
set(OENGINE_OGRE
|
||||||
|
ogre/renderer.cpp
|
||||||
|
ogre/lights.cpp
|
||||||
|
ogre/selectionbuffer.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(OENGINE_GUI
|
||||||
|
gui/loglistener.cpp
|
||||||
|
gui/manager.cpp
|
||||||
|
gui/layout.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(OENGINE_BULLET
|
||||||
|
bullet/BtOgre.cpp
|
||||||
|
bullet/BtOgreExtras.h
|
||||||
|
bullet/BtOgreGP.h
|
||||||
|
bullet/BtOgrePG.h
|
||||||
|
bullet/physic.cpp
|
||||||
|
bullet/physic.hpp
|
||||||
|
bullet/BulletShapeLoader.cpp
|
||||||
|
bullet/BulletShapeLoader.h
|
||||||
|
bullet/trace.cpp
|
||||||
|
bullet/trace.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_BULLET})
|
||||||
|
|
||||||
|
set(OENGINE_LIBRARY "oengine")
|
||||||
|
set(OENGINE_LIBRARY ${OENGINE_LIBRARY} PARENT_SCOPE)
|
||||||
|
|
||||||
|
source_group(oengine FILES ${OENGINE_ALL})
|
||||||
|
|
||||||
|
add_library(${OENGINE_LIBRARY} STATIC ${OENGINE_ALL})
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
function run()
|
|
||||||
{
|
|
||||||
echo "TESTING $1"
|
|
||||||
cd "$1/tests/"
|
|
||||||
./test.sh
|
|
||||||
cd ../../
|
|
||||||
}
|
|
||||||
|
|
||||||
run input
|
|
Loading…
Reference in a new issue