1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

correction1

This commit is contained in:
gugus 2012-09-28 17:02:27 +02:00
parent 1971ba66f1
commit 4d496c1188
4 changed files with 12 additions and 11 deletions

View file

@ -16,7 +16,7 @@ namespace MWGui
{
TradeWindow::TradeWindow(MWBase::WindowManager& parWindowManager) :
WindowBase("openmw_trade_window.layout", parWindowManager)
, ContainerBase(NULL) // no drag&drop
, ReferenceInterface(NULL) // no drag&drop
, mCurrentBalance(0)
{
MyGUI::ScrollView* itemView;

View file

@ -20,7 +20,7 @@ namespace MWGui
namespace MWGui
{
class TradeWindow : public ContainerBase, public WindowBase
class TradeWindow : public ReferenceInterface, public WindowBase
{
public:
TradeWindow(MWBase::WindowManager& parWindowManager);

View file

@ -79,7 +79,7 @@ namespace MWGui
void TravelWindow::startTravel(const MWWorld::Ptr& actor)
{
center();
mActor = actor;
mPtr = actor;
clearDestinations();
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
@ -100,18 +100,18 @@ namespace MWGui
addDestination (*iter);
}*/
for(int i = 0;i<mActor.get<ESM::NPC>()->base->mTransport.size();i++)
for(int i = 0;i<mPtr.get<ESM::NPC>()->base->mTransport.size();i++)
{
std::string cellname = mActor.get<ESM::NPC>()->base->mTransport[i].mCellName;
std::string cellname = mPtr.get<ESM::NPC>()->base->mTransport[i].mCellName;
int x,y;
MWBase::Environment::get().getWorld()->positionToIndex(mActor.get<ESM::NPC>()->base->mTransport[i].mPos.pos[0],
mActor.get<ESM::NPC>()->base->mTransport[i].mPos.pos[1],x,y);
MWBase::Environment::get().getWorld()->positionToIndex(mPtr.get<ESM::NPC>()->base->mTransport[i].mPos.pos[0],
mPtr.get<ESM::NPC>()->base->mTransport[i].mPos.pos[1],x,y);
if(cellname == "") cellname = MWBase::Environment::get().getWorld()->getExterior(x,y)->cell->name;
addDestination(cellname);
}
updateLabels();
mPtr.get<ESM::NPC>()->base->mTransport[0].
mDestinationsView->setCanvasSize (MyGUI::IntSize(mDestinationsView->getWidth(), std::max(mDestinationsView->getHeight(), mCurrentY)));
}
@ -126,7 +126,7 @@ namespace MWGui
MWMechanics::Spells& spells = stats.getSpells();
spells.add (mSpellsWidgetMap.find(_sender)->second);
mWindowManager.getTradeWindow()->addOrRemoveGold(-price);
startSpellBuying(mActor);
startSpellBuying(mPtr);
MWBase::Environment::get().getSoundManager()->playSound ("Item Gold Up", 1.0, 1.0);
}*/

View file

@ -53,7 +53,8 @@ namespace MWRender
{
Ogre::Image image;
Ogre::uchar data[mWidth * mHeight * 3];
std::vector<Ogre::uchar> data;
data.resize(mWidth * mHeight * 3);
for (int x = mMinX; x <= mMaxX; ++x)
{
@ -150,7 +151,7 @@ namespace MWRender
}
}
image.loadDynamicImage (data, mWidth, mHeight, Ogre::PF_B8G8R8);
image.loadDynamicImage (data.data(), mWidth, mHeight, Ogre::PF_B8G8R8);
//image.save (mCacheDir + "/GlobalMap.png");