Change bitmaps
Created by: Protofall
The old bitmaps (present_devices
, present_savefiles
and current_savefiles
) don't make much sense. Why do we need current_savefiles when we have present_savefiles and the savefile versions? Why does present_devices only talk about those that have the ability to save ATM? I propose to replace those bitmaps with these new ones:
present_devices
present_savefiles
upgradable_to_current
present_devices
is if the device is actually present (Specifically a savefile device, not a jump pack or something). This doesn't care about the savefile present,, version or the space left to save.
present_savefiles
is the same as the old system. Any savefile, past, present or future version.
upgradable_to_current
is to say if a save can be updated to the latest format and still fit. Past saves with enough space are true, else false. Current saves are always true and future saves are always false. If no savefile is present, but there's enough space to save, then its true. If this bitmap is 0, then we can't save.
The versions array should be the same, but to be clear it contains the version of each savefile. If a savefile isn't present or there was an issue reading the savefile, then the version number is 0.
The crayon_savefile_save_device_status()
function can check the bitmaps and version array to get all the info needed.