@@ -672,7 +672,7 @@ int Mod::getModOffset() const
672672 * @param shared Max offset limit that is shared for every mod
673673 * @param multipler Value used by `projectle` surface set to convert projectle offset to index offset in surface.
674674 */
675- void Mod::loadOffsetNode (const std::string &parent, int & offset, const YAML ::Node &node, int shared, size_t multipler) const
675+ void Mod::loadOffsetNode (const std::string &parent, int & offset, const YAML ::Node &node, int shared, const std::string &set, size_t multipler) const
676676{
677677 assert (_modCurrent);
678678 const ModData* curr = _modCurrent;
@@ -721,7 +721,7 @@ void Mod::loadOffsetNode(const std::string &parent, int& offset, const YAML::Nod
721721 if (offset < -1 )
722722 {
723723 std::ostringstream err;
724- err << " Error for '" << parent << " ': offset '" << offset << " ' have incorrect value" ;
724+ err << " Error for '" << parent << " ': offset '" << offset << " ' have incorrect value in set ' " << set << " ' " ;
725725 throw Exception (err.str ());
726726 }
727727 else if (offset == -1 )
@@ -735,7 +735,7 @@ void Mod::loadOffsetNode(const std::string &parent, int& offset, const YAML::Nod
735735 if ((size_t )f > curr->size )
736736 {
737737 std::ostringstream err;
738- err << " Error for '" << parent << " ': offset '" << offset << " ' exceeds mod size limit " << (curr->size / multipler);
738+ err << " Error for '" << parent << " ': offset '" << offset << " ' exceeds mod size limit " << (curr->size / multipler) << " in set ' " << set << " ' " ;
739739 throw Exception (err.str ());
740740 }
741741 if (f >= shared)
@@ -757,7 +757,7 @@ void Mod::loadSpriteOffset(const std::string &parent, int& sprite, const YAML::N
757757{
758758 if (node)
759759 {
760- loadOffsetNode (parent, sprite, node, getRule (set, " Sprite Set" , _sets, true )->getMaxSharedFrames (), multipler);
760+ loadOffsetNode (parent, sprite, node, getRule (set, " Sprite Set" , _sets, true )->getMaxSharedFrames (), set, multipler);
761761 }
762762}
763763
@@ -773,7 +773,7 @@ void Mod::loadSoundOffset(const std::string &parent, int& sound, const YAML::Nod
773773{
774774 if (node)
775775 {
776- loadOffsetNode (parent, sound, node, getSoundSet (set)->getMaxSharedSounds (), 1 );
776+ loadOffsetNode (parent, sound, node, getSoundSet (set)->getMaxSharedSounds (), set, 1 );
777777 }
778778}
779779
@@ -795,13 +795,13 @@ void Mod::loadSoundOffset(const std::string &parent, std::vector<int>& sounds, c
795795 for (YAML ::const_iterator i = node.begin (); i != node.end (); ++i)
796796 {
797797 sounds.push_back (-1 );
798- loadOffsetNode (parent, sounds.back (), *i, maxShared, 1 );
798+ loadOffsetNode (parent, sounds.back (), *i, maxShared, set, 1 );
799799 }
800800 }
801801 else
802802 {
803803 sounds.push_back (-1 );
804- loadOffsetNode (parent, sounds.back (), node, maxShared, 1 );
804+ loadOffsetNode (parent, sounds.back (), node, maxShared, set, 1 );
805805 }
806806 }
807807}
0 commit comments