|
32 | 32 | #include <ttyd/itemdrv.h>
|
33 | 33 | #include <ttyd/battle_ac.h>
|
34 | 34 | #include <ttyd/effdrv.h>
|
| 35 | +#include <ttyd/evtmgr.h> |
35 | 36 | #include <ttyd/battle_unit.h>
|
36 | 37 | #include <ttyd/battle_disp.h>
|
37 | 38 | #include <ttyd/pmario_sound.h>
|
@@ -4660,6 +4661,39 @@ void drawEffsActive()
|
4660 | 4661 | drawText(tempDisplayBuffer, PosX, PosY, Alpha, Color, Scale);
|
4661 | 4662 | }
|
4662 | 4663 |
|
| 4664 | +void drawEvtsActive() |
| 4665 | +{ |
| 4666 | + uint32_t Color = 0xFFFFFFFF; |
| 4667 | + uint8_t Alpha = 0xFF; |
| 4668 | + int32_t PosX = -232; |
| 4669 | + int32_t PosY = 40; |
| 4670 | + float Scale = 0.65; |
| 4671 | + |
| 4672 | + // Get the total amount of evts active |
| 4673 | + ttyd::evtmgr::EvtWork *EvtWrk = ttyd::evtmgr::evtGetWork(); |
| 4674 | + int32_t MaxEntries = EvtWrk->entryCount; |
| 4675 | + int32_t CurrentCount = 0; |
| 4676 | + |
| 4677 | + ttyd::evtmgr::EvtEntry *EvtEntry = &EvtWrk->entries[0]; |
| 4678 | + for (int32_t i = 0; i < MaxEntries; i++) |
| 4679 | + { |
| 4680 | + if (EvtEntry->flags & (1 << 0)) // Check if 0 bit is active |
| 4681 | + { |
| 4682 | + CurrentCount++; |
| 4683 | + } |
| 4684 | + EvtEntry++; |
| 4685 | + } |
| 4686 | + |
| 4687 | + // Draw the total amount of evts active out of the max |
| 4688 | + char *tempDisplayBuffer = DisplayBuffer; |
| 4689 | + sprintf(tempDisplayBuffer, |
| 4690 | + "Evts Active: %" PRId32 "/%" PRId32, |
| 4691 | + CurrentCount, |
| 4692 | + MaxEntries); |
| 4693 | + |
| 4694 | + drawText(tempDisplayBuffer, PosX, PosY, Alpha, Color, Scale); |
| 4695 | +} |
| 4696 | + |
4663 | 4697 | void drawSettingsCurrentWork()
|
4664 | 4698 | {
|
4665 | 4699 | const char *String;
|
@@ -4740,7 +4774,7 @@ void drawMemoryUsage()
|
4740 | 4774 | uint32_t Color = 0xFFFFFFFF;
|
4741 | 4775 | uint8_t Alpha = 0xFF;
|
4742 | 4776 | int32_t PosX = -232;
|
4743 |
| - int32_t PosY = 40; |
| 4777 | + int32_t PosY = 20; |
4744 | 4778 | float Scale = 0.6;
|
4745 | 4779 |
|
4746 | 4780 | char **tempMemoryUsageBuffer = HeapInfo.MemoryUsageBuffer;
|
|
0 commit comments