Test harness: --headless (no-op GL table with a CPU texel store, no window, audio or pacing), a virtual clock for every time read, --record/--replay of per-frame input, --frames, --trace state hashes and details, --mods for a private mods folder

This commit is contained in:
shweet committed 2026-11-23 17:26:08 -05:00
1 parent 7d3cf33c20
commit ff2c61a63a
16 files changed
+743 -50

No files matched your search

+4 -2
View File
@@ -7,6 +7,7 @@
#include "entity/player/player.h"
#include "engine/font.h"
#include "engine/fx_layers.h"
#include "engine/harness.h"
#include "game/game.h"
#include "level/grid/grid_entity.h"
#include "engine/kage_input.h"
@@ -402,14 +403,15 @@ static Vector mouse_position_get(bool isGameCoords)
{
Vector position = {};
SDL_GetMouseState(&position.x, &position.y);
harness.mouse_get(&position.x, &position.y);
return isGameCoords ? screen_to_world(position) : position;
}
// 0086fdb0 Whether a mouse button (0 left, 1 right, 2 middle, up to 7) is held.
static bool is_mouse_button_pressed(int button)
{
return button >= 0 && button <= MOUSE_BUTTON_LAST && SDL_GetMouseState(nullptr, nullptr) & SDL_BUTTON_MASK(button + 1);
return button >= 0 && button <= MOUSE_BUTTON_LAST &&
harness.mouse_get(nullptr, nullptr) & SDL_BUTTON_MASK(button + 1);
}
// Text drawn with the console font, as RenderText and RenderScaledText draw it.