// Load the current item indexes to remap dItem values as needed.
itemIndexes[file.NextLE<uint8_t>()+1]=i+1;// adding 1 as dItem values use 0 for no item, and index + 1 for the actual item ID
}
file.Skip(MAXITEMS*2-static_cast<size_t>(ActiveItemCount));// Skip loading the rest of ActiveItems and AvailableItems, the indices are initialised below based on the number of active items
// Skip loading ActiveItems and AvailableItems, the indices are initialised below based on the number of active items
file.Skip<uint8_t>(MAXITEMS*2);
// Clear dItem so we can populate valid drop locations
memset(dItem,0,sizeof(dItem));
for(uint8_ti=0;i<MAXITEMS;i++){
if(i<ActiveItemCount)
if(i<ActiveItemCount){
LoadItem(file,Items[i]);
constItem&item=Items[i];
if(!item.isEmpty()){
// Loaded a valid item, populate its location in the lookup table with the offset in the Items array