- Size (fit into 8192 bytes or 16 IMG sectors):
- Drop `ulist` in favor of static arrays
- Dropping `malloc`/`free`/`exit`; `sprintf`, `pow`, `strlen` and 64-bit division no longer pull in libc and libtcc1
- Dead code removed
- Rendering:
- libimg dropped. `png2h.py` turns the original PNG into a palette-indexed atlas; the blit writes a 32bpp buffer, sysfn 65 puts it on screen - the same call `img_draw` made. No runtime PNG decode, output pixel-identical. The buffer ends at the ground line: 18% fewer pixels per frame
- Bugs fixed:
- Every fourth pterodactyl was invisible and unhittable: `getRandomNumber` is inclusive, so `yPosArr[3]` read the next field (999) and the bird spawned off-screen
- Releasing the jump key never shortened the first jump: gated on a flag set only after the intro; Chrome gates on the loop being scheduled
- Flap rate `1000/6` truncated to 166, `minSpeed` 8.5 to 8 - birds came earlier than in Chrome
- Hardcoded caption height clipped the window on every non-default skin
- A maximum jump left the buffer and cut off the dino's head; the playfield is centered now
- Obstacles and clouds leaked: nodes were freed, their data never
- Localization:
- Caption localized to EN/RU/ES via `CONFIG_LANG`, fits every skin in the tree
Reviewed-on: KolibriOS/kolibrios#632
Reviewed-by: Kiril Lipatov <lipatov.kiril@gmail.com>
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>