mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 04:43:26 +00:00
ULTIMA8: replace stream output on sort item with dump info method
This commit is contained in:
parent
c53b42311d
commit
a706725df1
@ -349,9 +349,9 @@ bool ItemSorter::PaintSortItem(RenderSurface *surf, SortItem *si) {
|
||||
if (_sortLimit) {
|
||||
if (si->_order == _sortLimit) {
|
||||
if (!_painted || _painted->_itemNum != si->_itemNum) {
|
||||
pout << "SortItem: " << *si << Std::endl;
|
||||
pout << "SortItem: " << si->dumpInfo() << Std::endl;
|
||||
if (_painted && si->overlap(_painted)) {
|
||||
pout << "Overlaps: " << *_painted << Std::endl;
|
||||
pout << "Overlaps: " << _painted->dumpInfo() << Std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
#define ULTIMA8_WORLD_SORTITEM_H
|
||||
|
||||
#include "ultima/ultima8/misc/common_types.h"
|
||||
#include "ultima/ultima8/misc/debugger.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima8 {
|
||||
@ -232,6 +231,7 @@ struct SortItem {
|
||||
return _z < other->_z || (_z == other->_z && _flat && !other->_flat);
|
||||
}
|
||||
|
||||
Common::String dumpInfo() const;
|
||||
};
|
||||
|
||||
inline bool SortItem::overlap(const SortItem &si2) const {
|
||||
@ -401,34 +401,33 @@ inline bool SortItem::below(const SortItem &si2) const {
|
||||
return si1._frame < si2._frame;
|
||||
}
|
||||
|
||||
ConsoleStream &operator<<(ConsoleStream &cs, const SortItem &si) {
|
||||
cs << si._shapeNum << ":" << si._frame <<
|
||||
" (" << si._xLeft << "," << si._yFar << "," << si._z << ")" <<
|
||||
" (" << si._x << "," << si._y << "," << si._zTop << "): ";
|
||||
if (si._sprite)
|
||||
cs << "sprite ";
|
||||
if (si._flat)
|
||||
cs << "flat ";
|
||||
if (si._anim)
|
||||
cs << "anim ";
|
||||
if (si._trans)
|
||||
cs << "trans ";
|
||||
if (si._draw)
|
||||
cs << "draw ";
|
||||
if (si._solid)
|
||||
cs << "solid ";
|
||||
if (si._occl)
|
||||
cs << "occl ";
|
||||
if (si._fbigsq)
|
||||
cs << "fbigsq ";
|
||||
if (si._roof)
|
||||
cs << "roof ";
|
||||
if (si._land)
|
||||
cs << "land ";
|
||||
if (si._noisy)
|
||||
cs << "noisy ";
|
||||
Common::String SortItem::dumpInfo() const {
|
||||
Common::String info = Common::String::format("%u:%u (%d, %d, %d) (%d, %d, %d): ",
|
||||
_shapeNum, _frame, _xLeft, _yFar, _z, _x, _y, _zTop);
|
||||
if (_sprite)
|
||||
info += "sprite ";
|
||||
if (_flat)
|
||||
info += "flat ";
|
||||
if (_anim)
|
||||
info += "anim ";
|
||||
if (_trans)
|
||||
info += "trans ";
|
||||
if (_draw)
|
||||
info += "draw ";
|
||||
if (_solid)
|
||||
info += "solid ";
|
||||
if (_occl)
|
||||
info += "occl ";
|
||||
if (_fbigsq)
|
||||
info += "fbigsq ";
|
||||
if (_roof)
|
||||
info += "roof ";
|
||||
if (_land)
|
||||
info += "land ";
|
||||
if (_noisy)
|
||||
info += "noisy ";
|
||||
|
||||
return cs;
|
||||
return info;
|
||||
}
|
||||
|
||||
} // End of namespace Ultima8
|
||||
|
Loading…
x
Reference in New Issue
Block a user