feat: implement keyboard and mouse input, pattern placement, and HiDPI scaling
Add configurable key bindings (TOML), modifier-aware dispatch, mouse-driven pattern placement with preview and rotation, cell grid storage/rendering, and fractional/integer HiDPI scaling. Archive the input-and-placement change and sync its specs to main specs. Tests: Hashtable, Config, Grid, Pattern (4/4 pass).
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "grid.h"
|
||||
|
||||
int main(void) {
|
||||
grid_t g;
|
||||
grid_init(&g, 4, 4);
|
||||
assert(grid_get(&g, 0, 0) == 0);
|
||||
grid_set(&g, 1, 2, 1);
|
||||
assert(grid_get(&g, 1, 2) == 1);
|
||||
assert(grid_get(&g, -1, 0) == 0);
|
||||
assert(grid_get(&g, 4, 4) == 0);
|
||||
|
||||
grid_set(&g, 0, 0, 1);
|
||||
grid_resize(&g, 6, 2);
|
||||
assert(grid_get(&g, 0, 0) == 1);
|
||||
assert(grid_get(&g, 1, 2) == 0);
|
||||
grid_clear(&g);
|
||||
assert(grid_get(&g, 0, 0) == 0);
|
||||
|
||||
grid_free(&g);
|
||||
printf("grid tests passed\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user