feat(controllers): #58 platformer — ludic.platformer package (base + extensible)
The reference six-lever controller: Platformer component (jump feel as data), decomposed input/move/gravity/jump/anim engine sub-systems (each disable-able), JumpRequested/Landed/StateChanged events, gravity policy enum, and the opt-in scaffolding (moving/crumble platforms w/ rider carry, pickups+score, springs, hazards+Life, checkpoints/goal). Reuses the shared esys_move collision. Also fixes a latent SSA-name collision in ludic_sweep_entity that triggered once a program declared >=11 events. Reseeded; C-free fixpoint holds. 3 new regression cases (100 passed, 0 failed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ed385efa7b
commit
dd5cb5817b
9 changed files with 892 additions and 3 deletions
|
|
@ -524,7 +524,7 @@ function emit_event_fns() -> void {
|
|||
emit(" %swlp"); emit(sk); emit(" = getelementptr inbounds ["); emit(capS); emit(" x ptr], ptr @evL_"); emit(en2); emit(", i32 0, i32 %swi"); emit(sk); emit("\n")
|
||||
emit(" store ptr null, ptr %swlp"); emit(sk); emit("\n br label %swx"); emit(sk); emit("\n")
|
||||
emit("swx"); emit(sk); emit(":\n")
|
||||
emit(" %swi1"); emit(sk); emit(" = add i32 %swi"); emit(sk); emit(", 1\n store i32 %swi1"); emit(sk); emit(", ptr %ci\n br label %sw"); emit(sk); emit("\n")
|
||||
emit(" %swinc"); emit(sk); emit(" = add i32 %swi"); emit(sk); emit(", 1\n store i32 %swinc"); emit(sk); emit(", ptr %ci\n br label %sw"); emit(sk); emit("\n")
|
||||
emit("swd"); emit(sk); emit(":\n store i32 0, ptr %ci\n")
|
||||
if (e2 + 1) < len(g_events) { emit(" br label %sw"); emit(itoa(e2 + 1)); emit("\n") }
|
||||
else { emit(" ret void\n") }
|
||||
|
|
|
|||
|
|
@ -8995,9 +8995,9 @@ declare void @hs_free(i32)
|
|||
@.str8826 = private unnamed_addr constant [2 x i8] c"\0A\00"
|
||||
@.str8827 = private unnamed_addr constant [4 x i8] c"swx\00"
|
||||
@.str8828 = private unnamed_addr constant [3 x i8] c":\0A\00"
|
||||
@.str8829 = private unnamed_addr constant [8 x i8] c" %swi1\00"
|
||||
@.str8829 = private unnamed_addr constant [9 x i8] c" %swinc\00"
|
||||
@.str8830 = private unnamed_addr constant [16 x i8] c" = add i32 %swi\00"
|
||||
@.str8831 = private unnamed_addr constant [22 x i8] c", 1\0A store i32 %swi1\00"
|
||||
@.str8831 = private unnamed_addr constant [23 x i8] c", 1\0A store i32 %swinc\00"
|
||||
@.str8832 = private unnamed_addr constant [25 x i8] c", ptr %ci\0A br label %sw\00"
|
||||
@.str8833 = private unnamed_addr constant [2 x i8] c"\0A\00"
|
||||
@.str8834 = private unnamed_addr constant [4 x i8] c"swd\00"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue