* I macroized a few remaining while loops. (each) macros use for so
that they no longer need the extra iterator variable
* Deleted grid-texture and usage of it
I wasn't actually telling the right size, so garbage data was being
read instead. It's good to know the game doesn't crash on this
anyways, I guess.
I also reduced the number of attempts made at picking the next puzzle
if the data set is small. There's now another condition to ensure the
next puzzle is different from the current one.
This was partially to test whether writing files would easily work on
Android (it does, thanks to SDL). I also macroized some things and
added an untested endianness check
* Created PuzzleIO.cake for translating from the Decompression.cake
text format to a binary format which is easy to load on PC and
Android (especially Android). It should be much faster to load as a
side-effect of this change
* Fix bug in Main.cake where libSDL was actually resolving to the
system SDL. This happened because the executable was being relocated,
but the rpath wasn't being updated to reflect that
* Added hacky comptime-conds so Main could be included in PuzzleIO
executable without conflicting
* Kitty Gridlock now has its own project with custom icon and name
* Redirect source/data file output to this project
* Added script to generate multiple resolutions of icons
* Update readme with Android info
This commit is before a restructuring to not have it in the ugly SDL
dependencies directory where changes will be lost.
* Temporarily disabled puzzle loading until I get platform-independent
file loading set up (fopen doesn't work on Android)
* Removed Decompression dependency from runtime
* Replace -1 with g-empty-cell to fix Android misinterpreting
-1 == (thing which is -1) as false
* Replace printf with SDL_Log for Android logging
* Fix potential null ptr access by checking for g-num-puzzles
* Move KittyGridlockInitialCatAssets.bmp into data/Pieces.bmp, for
consistency (makes it easier to copy all data to Android)
* Add compile-time pre-build hooks for generating data/puzzles.txt as
well as copying assets/code to the Android project
* Print which surfaces are failing to load
* Add build config label to make it easier to only copy Kitty Gridlock
source files for the Android build
* Reformatted code
It takes about 5.2 seconds to load and decompress the entire 115mb
database on my quad-core i5-6600k. Needless to say, there will be some
cutting this down via tossing out some number of puzzles.
* Pieces can now be moved, though there is a bug with the constrain
code constraining a bit too much
* Added timing code to confirm that the game was running at 4,000hz to
5000hz, which was causing annoying GPU coil whine. I arbitrarily sleep
now to get ~90hz instead. I have a TODO item to actually calculate a
good sleep value