2c452093f5
Disable unit test building in vectorwrapper.
2020-03-28 23:18:29 +01:00
0d287a60f1
Draw blank squares for empty blocks in the grid.
...
Import vectorwrapper, it's just too convenient. It's only used
in one place for now but I will probably use it more from now on.
2020-03-28 21:33:46 +01:00
88be1a1247
Add a timer to get the animations going.
2020-03-28 18:53:04 +01:00
78e72d0bcb
Icons don't need to be in a dedicated widget, just painting is enough.
...
Now BlockGrid holds the animations and does the drawing by
itself.
2020-03-28 18:38:42 +01:00
4527caff52
Catch up with the nana implementation.
...
Allow users to open and display memory card files
2020-03-28 16:14:26 +01:00
42a00b7caa
Rename gui directory to nana
2020-03-26 11:56:17 +01:00
92e4f52eb4
Implement about this program window based on nana's implementation.
2020-03-26 11:49:54 +01:00
520b9fc2e1
Add gpl header
2020-03-26 11:49:19 +01:00
bb0397cc2d
Add Exit to file menu
2020-03-25 22:38:17 +01:00
35d566fd2d
Barebone main window implementation.
2020-03-25 22:15:57 +01:00
5450c42bce
Disabling nana gui for now.
...
It's not working as I'd like it to work and nana seems to be
lacking several features I need to do what I have in mind.
Will try Qt next.
2020-03-25 19:25:30 +01:00
8a577d5c39
Trying to group label and grid into a new widget but it's not working.
2020-03-25 19:24:00 +01:00
1805135d3c
Print block usage
2020-03-21 23:36:32 +01:00
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
2352bfddc1
Fix size(), now linked blocks also count toward the total count.
2020-03-21 23:20:05 +01:00
bf6814df20
Show the correct number of blocks for multiblock savegames
2020-03-21 21:12:26 +01:00
a98539aa06
Implement use_byte() as per the spec.
2020-03-21 21:05:23 +01:00
54371b62f8
Remove hardcoded paths, allow opening memory cards from menu.
...
I think sometimes nana deadlocks, not sure what the problem is yet.
2020-03-21 16:53:02 +01:00
2b48b5da41
Don't freak out on empty grids.
2020-03-21 16:49:47 +01:00
05b34b4818
Support non-const to const conversions.
2020-03-21 16:49:34 +01:00
2be3823442
App namespace should be duck, not mc. That's for the lib.
2020-03-21 16:48:49 +01:00
9aa2ceeb90
Looking at the examples the menubar should also be put in the div.
2020-03-21 12:10:12 +01:00
2b8395de69
Improve git sha1 detection
2020-03-21 11:53:04 +01:00
831b958f39
Make the sha1 text a link to the corresponding page
2020-03-21 11:34:49 +01:00
6dfeeba7f9
Add git sha1 info to the binary.
2020-03-21 11:29:21 +01:00
23010d032b
Show repo url in cli too.
2020-03-21 10:32:28 +01:00
a0581cb7ab
Refactor a bit more and add menu bar and version window.
2020-03-21 10:32:18 +01:00
bcbefd45c9
Inherit from nana::form
2020-03-20 21:27:41 +01:00
1c3de27a16
Refactor window creation stuff outside of main()
2020-03-20 21:24:17 +01:00
5d5cba5e3f
Add command line help/verbose options to gui too.
...
Refactor code to reduce code duplication across the two programs.
2020-03-20 20:02:21 +01:00
f86032d2b4
Attach GPL3 licence.
2020-03-20 19:22:16 +01:00
f1157429ba
Add some temporary options for choosing what to print.
...
I'm planning to let users pass in some format string in the
future instead, but for now this is what I've got.
2020-03-20 18:58:47 +01:00
e40d092b7d
Add methods to get the TOC checksum as per the specs.
2020-03-20 18:58:06 +01:00
c89a27f427
Print the savegame identifier.
...
Returned string is always 8 chars long, even though when
printed it may be shorter. It's therefore always safe to
memcopy 8 from it.
2020-03-20 18:34:09 +01:00
62b4b8b307
Print P for "has PocketStation content".
2020-03-20 18:26:44 +01:00
747209f744
Add new methods to BasicBlock.
2020-03-20 18:24:54 +01:00
30ef4cd49d
Remove code duplication, leverage ContentInfo.
2020-03-20 16:48:54 +01:00
a190a76b5d
Allow iterating over a block's frames.
...
Yeah, the PartIterator thing seems to have worked.
2020-03-20 16:44:48 +01:00
db70dead33
Add new BasicFrame class.
2020-03-20 16:21:17 +01:00
4eaa2fc734
Generalise BlockIterator and rename to PartIterator.
...
I'm going to need a FrameIterator class too so let's see if
I can reuse BlockIterator.
2020-03-20 15:33:16 +01:00
1bca8f0201
Rename palette() to icon_palette().
2020-03-20 14:59:27 +01:00
c5987d882d
Block should be lightweight so don't store palette.
2020-03-20 14:58:36 +01:00
905e6be0c4
Add proper typedefs and restore block number printing in CLI.
2020-03-20 14:54:05 +01:00
dfc466fc87
Refactoring, allow iterating over blocks.
2020-03-20 14:33:42 +01:00
ee163a213a
Refactor MemoryCard istream ctor out.
...
Also move everything into a psx namespace, though I'm not
too sure about this yet.
2020-03-20 13:51:09 +01:00
ef348fe1ca
Use the new frame() method.
2020-03-20 01:53:57 +01:00
965dafa240
Make FrameSize a static constant.
2020-03-20 01:46:42 +01:00
d475003215
Add frame() method.
2020-03-20 01:43:50 +01:00
55427a71d6
Print blocks to stdout.
2020-03-20 00:08:01 +01:00
2a7eab3170
Add --version to cli
2020-03-19 22:28:45 +01:00