I took @andrea_i’s Pokifactory and rewrote it using MiniLib. Code is written from scratch, but I used most of the original graphics with some changes. I tried to send pm but haven’t got any response. However, I think it’s ok based on what @andrea_i wrote on the Pokifactory thread:
I’m totally happy for anyone to tear it apart as they please. If one day we can play that thing on our pokitto I can only be grateful really!
This project was mainly to see if I could make a complete game with the basic graphics and sound functions I have added to MiniLib.
I wanted to mimic the old electronic games, so instead of movable sprites I’m using sprite sets that are like bit sets, but every bit controls visibility of corresponding static sprite. Bits can be shifted left or right just like in a bit set, so I can e.g. move all items on a conveyour belt with a single shift command. Everything is drawn directly to LCD, no screen buffers used.
Game supports saving highscores in a cookie, but it asks you before creating the cookie. The code is based on the PokittoCookie class, and assuming I didn’t do some horrible mistake, it shouldn’t accidentally erase all your saved highscores of other games.
Ah, ok. I wasn’t sure if holding C should open the loader and I only tested with my older Pokitto which apparently had some ancient version. It works now after I updated the loader.
When can this get put in the GameDisk repo so we who have the repo setup on our cards can just git pull? Also, I feel like that should be a tip in the magazine in case others don’t know that it is an option
I added a custom “Press C for loader” screen and sound volume control (uses the I2C potentiometer, 5 dB steps) in the main menu. Pop & bin files in the first post updated.
exit(0) freezes Pokitto, but adding extern "C" void __wrap_exit(int) and calling __wrap_exit(0) successfully launches the loader.
I also added a check for SysTick counter rollover in the function returning current time. It sometimes happened that the SysTick interrupt was triggered while executing the function and the returned time was off by ~100 ms.