Minimap, hotkeys and lot of other changes

* Begin working on a new layout system for UIMinimap and later UIMap,
this new layout system allows to add widgets to the minimap
* Add option to disable motd
* Rework hotkey binding
* Lots of fixes in hotkeys manager
* Add fullmap view using Ctrl+Shift+M
* Prevent some crashs in ThingType draw
* Add function to load minimap from PNG files
* Fixes in minimap saving
* Fixes in Tile::isClickable
* Add UIMapAnchorLayout, new layout for maps
* Fix freezes in win32 when pressing alt key
This commit is contained in:
Eduardo Bart
2013-02-18 13:16:22 -03:00
parent f8b078ea91
commit 9a54bfcc90
43 changed files with 842 additions and 499 deletions

View File

@@ -763,6 +763,9 @@ void ProtocolGame::parseMagicEffect(const InputMessagePtr& msg)
else
effectId = msg->getU8();
if(!g_things.isValidDatId(effectId, ThingCategoryEffect))
g_logger.traceError("invalid effect id");
EffectPtr effect = EffectPtr(new Effect());
effect->setId(effectId);
g_map.addThing(effect, pos);
@@ -786,6 +789,9 @@ void ProtocolGame::parseDistanceMissile(const InputMessagePtr& msg)
Position toPos = getPosition(msg);
int shotId = msg->getU8();
if(!g_things.isValidDatId(shotId, ThingCategoryMissile))
g_logger.traceError("invalid effect id");
MissilePtr missile = MissilePtr(new Missile());
missile->setId(shotId);
missile->setPath(fromPos, toPos);
@@ -1642,6 +1648,9 @@ Outfit ProtocolGame::getOutfit(const InputMessagePtr& msg)
int feet = msg->getU8();
int addons = msg->getU8();
if(!g_things.isValidDatId(lookType, ThingCategoryCreature))
lookType = 0;
outfit.setId(lookType);
outfit.setHead(head);
outfit.setBody(body);
@@ -1653,9 +1662,11 @@ Outfit ProtocolGame::getOutfit(const InputMessagePtr& msg)
int lookTypeEx = msg->getU16();
if(lookTypeEx == 0) {
outfit.setCategory(ThingCategoryEffect);
outfit.setAuxId(13);
outfit.setAuxId(13); // invisible effect id
}
else {
if(!g_things.isValidDatId(lookTypeEx, ThingCategoryItem))
lookTypeEx = 0;
outfit.setCategory(ThingCategoryItem);
outfit.setAuxId(lookTypeEx);
}