Add extensive tests for animation, input handling, and map rendering

- Enhanced animation archive tests to validate frame metadata and start frame selection logic.
- Introduced new tests for entity dispatch entry handling, including key event queuing and processing.
- Added tests for fixed map item interactions, including glob egg hatching and item movement.
- Expanded flex archive tests to cover teleport egg spawning and usecode event selection.
- Implemented isometric controls tests to verify directional key handling and animation state changes.
- Improved map renderer tests to ensure correct rendering of map previews and collision detection.
This commit is contained in:
Maddo 2026-09-27 11:48:14 +02:00
commit e757bb33d0
20 changed files with 1247 additions and 142 deletions

View file

@ -5,6 +5,22 @@
int main()
{
remorse::ControllerMovementState controller;
assert(controller.request().animation == 0);
controller.handleDirectionalKey(0x48, 0, true);
assert(controller.request().animation == 1 && controller.request().direction == 14);
controller.handleDirectionalKey(0x4d, 1, true);
assert(controller.request().animation == 3 && controller.request().direction == 2);
controller.handleDirectionalKey(0x4d, 1, false);
assert(controller.request().animation == 3 && controller.request().direction == 14);
controller.handleDirectionalKey(0x48, 0, false);
assert(controller.request().animation == 0 && controller.request().direction == 14);
controller.handleDirectionalKey(0x49, 0x20, true);
assert(controller.request().animation == 0);
controller.handleDirectionalKey(0x47, 0x40, true);
assert(controller.request().animation == 3 && controller.request().direction == 12);
controller.clear();
assert(controller.request().animation == 0);
assert(remorse::controllerWalkRequested(0));
assert(!remorse::controllerWalkRequested(0x01));
assert(!remorse::controllerWalkRequested(0x02));