Conversation
* Stub out Audio with PicoAudio.hpp/cpp * Set up CMakeLists.txt for Pico build * Support 120x120 PicoSystem screen resolution
Co-authored-by: Charlie Birks <charlie@daft.games>
This crude hack prevents offscreen enemies from being updated, making some of the more intense levels playable on PicoSystem. Needs a better solution.
Used 32Blit's "Pen" type instead of the custom "Colour" since it's aligned and may be faster.
| if(PICO_SDK_PATH) | ||
| include(${32BLIT_DIR}/32blit-pico/pico_sdk_import.cmake) | ||
| include(${32BLIT_DIR}/32blit-pico/pico_extras_import.cmake) | ||
| endif() |
There was a problem hiding this comment.
There's a wrapper now for this: include(${32BLIT_DIR}/32blit-pico/sdk_import.cmake). Also handles all the other methods of importing the SDK (environment, clone from git... (if that wasn't broken in -extras))
| endif() | ||
| find_package (32BLIT CONFIG REQUIRED PATHS ../32blit-sdk) | ||
|
|
||
| if(PICO_SDK_PATH) |
There was a problem hiding this comment.
... which makes this not a great way to check for a pico build. The blit SDK uses 32BLIT_PICO for this.
| uint32_t lastTime = 0; | ||
|
|
||
| Surface* sg_icon_image = Surface::load(asset_scorpion_games); | ||
| Surface* background_image = Surface::load(asset_background); |
There was a problem hiding this comment.
Ooh, RAM savings. Hmm, deleting the splash icon after using it would save... 2k, maybe not super important then.
There was a problem hiding this comment.
I guess I could move the splash icon to the spritesheet, since I know I've got space in there
| x = foreground[i].x + SPRITE_SIZE - 1; | ||
| } | ||
| xVel = 0; | ||
| break; |
There was a problem hiding this comment.
I went a step further and skipped the entire loop if xVel was 0. 967e332#diff-ab6f4f9204ca41ac0f2c5132e6d8507701d0eba631f4db894a75bf99b6c65ad7R1755
|
Another speed patch: a923738 (fixed-point to the rescue again). Got to the start of level 7 with that (on my branch, so no speedhack), testing further would require me to not die. |
|
With all the changes I've made, it's got a bit out of sync. The Colour -> Pen and support for PicoSystem are the main commits which I still need, is it possible for you to rebase and just PR those? I'm regretting everything being in one file because of all these merge conflicts 🤦♂️ (edit: just need Colour->Pen now) |
|
Most of the PicoSystem stuff is done, but audio stuff messes everything up a bit. Using one shared Audio.hpp header is probably the best. |
Adds PicoSystem support in the least invasive way I could muster. PicoAudio is on standby for when PicoSystem can do something vaguely audio-like for bleeps and bloops.
clear()to the background colour only onceThis is a sometimes-different, sometimes-the-same take on @Daft-Freak's diff here - main...Daft-Freak:pico-maybe
I also have a patch to change all iterators to the form
for(auto &item : items)if you want it.