MCPcopy Create free account
hub / github.com/diasurgical/devilution / SortHealer

Function SortHealer

Source/items.cpp:3712–3733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3710}
3711
3712void SortHealer()
3713{
3714 int j, k;
3715 BOOL sorted;
3716
3717 j = 2;
3718 while (healitem[j + 1]._itype != ITYPE_NONE) {
3719 j++;
3720 }
3721
3722 sorted = FALSE;
3723 while (j > 2 && !sorted) {
3724 sorted = TRUE;
3725 for (k = 2; k < j; k++) {
3726 if (healitem[k].IDidx > healitem[k + 1].IDidx) {
3727 BubbleSwapItem(&healitem[k], &healitem[k + 1]);
3728 sorted = FALSE;
3729 }
3730 }
3731 j--;
3732 }
3733}
3734
3735void SpawnHealer(int lvl)
3736{

Callers 1

SpawnHealerFunction · 0.85

Calls 1

BubbleSwapItemFunction · 0.85

Tested by

no test coverage detected