1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-19 03:39:58 +00:00

Merge remote-tracking branch 'mmd/windowswarnings' into next

This commit is contained in:
Marc Zinnschlag 2012-08-24 15:07:19 +02:00
commit 1fd4d84173
7 changed files with 775 additions and 784 deletions

View File

@ -254,7 +254,6 @@ namespace MWBase
virtual bool toggleVanityMode(bool enable, bool force) = 0; virtual bool toggleVanityMode(bool enable, bool force) = 0;
virtual void allowVanityMode(bool allow) = 0; virtual void allowVanityMode(bool allow) = 0;
virtual void togglePlayerLooking(bool enable) = 0; virtual void togglePlayerLooking(bool enable) = 0;
virtual bool isVanityEnabled() = 0;
virtual void renderPlayer() = 0; virtual void renderPlayer() = 0;
}; };

View File

@ -107,10 +107,6 @@ namespace MWRender
void getSightAngles(float &pitch, float &yaw); void getSightAngles(float &pitch, float &yaw);
void togglePlayerLooking(bool enable); void togglePlayerLooking(bool enable);
bool isVanityEnabled() {
return mVanity.enabled;
}
}; };
} }

View File

@ -68,10 +68,6 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
return mPlayer->toggleVanityMode(enable, force); return mPlayer->toggleVanityMode(enable, force);
} }
bool isVanityEnabled() {
return mPlayer->isVanityEnabled();
}
void allowVanityMode(bool allow) { void allowVanityMode(bool allow) {
mPlayer->allowVanityMode(allow); mPlayer->allowVanityMode(allow);
} }

View File

@ -209,6 +209,8 @@ namespace MWScript
class OpToggleVanityMode : public Interpreter::Opcode0 class OpToggleVanityMode : public Interpreter::Opcode0
{ {
static bool sActivate;
public: public:
virtual void execute(Interpreter::Runtime &runtime) virtual void execute(Interpreter::Runtime &runtime)
@ -219,16 +221,17 @@ namespace MWScript
MWBase::World *world = MWBase::World *world =
MWBase::Environment::get().getWorld(); MWBase::Environment::get().getWorld();
bool value = !world->isVanityEnabled(); if (world->toggleVanityMode(sActivate, true)) {
if (world->toggleVanityMode(value, true)) {
context.report( context.report(
(value) ? "Vanity Mode -> On" : "Vanity Mode -> Off" (sActivate) ? "Vanity Mode -> On" : "Vanity Mode -> Off"
); );
sActivate = !sActivate;
} else { } else {
context.report("Vanity Mode -> No"); context.report("Vanity Mode -> No");
} }
} }
}; };
bool OpToggleVanityMode::sActivate = true;
const int opcodeXBox = 0x200000c; const int opcodeXBox = 0x200000c;
const int opcodeOnActivate = 0x200000d; const int opcodeOnActivate = 0x200000d;

View File

@ -298,10 +298,6 @@ namespace MWWorld
} }
virtual void renderPlayer(); virtual void renderPlayer();
virtual bool isVanityEnabled() {
return mRendering->isVanityEnabled();
}
}; };
} }

File diff suppressed because it is too large Load Diff

View File

@ -112,6 +112,7 @@ Bug #341: Building with Ogre Debug libraries does not use debug version of plugi
Bug #347: Crash when running openmw with --start="XYZ" Bug #347: Crash when running openmw with --start="XYZ"
Bug #353: FindMyGUI.cmake breaks path on Windows Bug #353: FindMyGUI.cmake breaks path on Windows
Bug #359: WindowManager throws exception at destruction Bug #359: WindowManager throws exception at destruction
Bug #364: Laggy input on OS X due to bug in Ogre's event pump implementation
Feature #33: Allow objects to cross cell-borders Feature #33: Allow objects to cross cell-borders
Feature #59: Dropping Items (replaced stopgap implementation with a proper one) Feature #59: Dropping Items (replaced stopgap implementation with a proper one)
Feature #93: Main Menu Feature #93: Main Menu