A PlayStation savegame manager.
Find a file
King_DuckZ 5688775e6c Finish implementation of block_group().
This forced me to think about treating block 0 specially. The
problem was with block.index() returning [1-15], while the valid
range for MemoryCard::operator[] is [0-14]. This discrepancy was
very confusing. A simple solution would've been to just rename
Block::index() to eg Block::id(), and then know that one has to
do -1 on the id to obtain the index. I tried but discarded this
option. I don't think it's intuitive either (what's id? is it
guaranteed to be index+1? is it a random number, rather? I
know I will forget in 6 months).

Treating block 0 normally would, on the other hand, break range
iteration, as the first iteration would always be on the TOC
block, and all for loops would become 1-based. Also implementing
size() correctly becomes tricky (size could never be 0?)
I don't like the current implementation either but I did
it anyways for now, so operator[] works as before, you can get
block 0 by calling toc_block(), and Block::index() returns some
silly value for block 0. This should work in the future too
when there will be the possibility to forge a new block from
scratch. You don't really want to forge a block 0 as that's
calculated from adding the normal savegame blocks, and for the
latter MemoryCard can just do the +1 internally when receiving
a new Block. Besides Block::link_order() seems to like indices
this way, with 0 being the first savegame and not the TOC. So
it seems to be special in the original PSX API, then let's
treat it specially.
2020-03-21 23:35:43 +01:00
data Add BasicBlock::title() method. 2019-08-20 01:39:51 +01:00
docs Add reference code from OIIO. 2018-09-13 19:55:11 +01:00
src Show the correct number of blocks for multiblock savegames 2020-03-21 21:12:26 +01:00
subprojects Finish implementation of block_group(). 2020-03-21 23:35:43 +01:00
.gitignore Add command line help/verbose options to gui too. 2020-03-20 20:02:21 +01:00
.gitmodules Add a CLI program to access the memoserv lib. 2020-03-19 22:13:55 +01:00
COPYING Attach GPL3 licence. 2020-03-20 19:22:16 +01:00
epsxe000_xa2.mcr Fix displaying animated icons. 2019-08-10 20:48:45 +01:00
meson.build Improve git sha1 detection 2020-03-21 11:53:04 +01:00
meson_options.txt Migrate to meson as the build system. 2019-08-09 09:52:18 +01:00
michele_epsxe000.mcr Experiment writing a grid widget. WiP. 2018-09-08 10:05:54 +01:00