7 #include "EEPROM_ItemList.hpp" 28 for (
int pos = this->startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
32 if (EEPROMextent.
readByte(pos + 1) == inOwnerSlotNumber)
45 byte slot = inStartSlotNumber;
47 for (
int pos = startListPos + (inStartSlotNumber * itemSize); pos < this->startListPos + this->listSize; pos += itemSize)
49 if (EEPROMextent.
readByte(pos) == inType)
50 if (inOwnerId == 255 || EEPROMextent.
readByte(pos + 1) == inOwnerId)
62 for (
int pos = startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
63 if (inType == 0 || EEPROMextent.
readByte(pos) == inType)
73 for (
int pos = startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
74 if (EEPROMextent.
readByte(pos) != 0 && EEPROMextent.
readByte(pos + 1) == inOwnerId)
84 for (
int pos = startListPos; pos < this->startListPos + this->listSize; pos += itemSize)
86 byte val = EEPROMextent.
readByte(pos);
105 EEPROMextent.
clear(this->startListPos, this->listSize);
void clear(int address, int inSize, byte inFillCharacter = 0)
byte CountItems(byte inType)
int GetItemPosRaw(byte inSlotNumber)
void FreeItem(byte inSlotNumber)
byte CountOwnedItems(byte inOwnerId)
void updateByte(int address, uint8_t value)
int SaveItemPrefix(byte inSlotNumber, byte inType, byte inOwner)
void FreeOwnedItems(byte inOwnerSlotNumber)
uint8_t readByte(int address)
byte FindItem(byte inType, byte inStartSlotNumber = 0, byte inOwnerId = 255)