From 57f95fe3a07ca2f874d02d3a2716c92d53d825ab Mon Sep 17 00:00:00 2001 From: "local-model/engine-L2-grok-4.5" Date: Sat, 19 Sep 2026 16:53:12 +0200 Subject: [PATCH] engine-c: dense scrap oil-field + latticed derrick BT_REFINERY near clash Forward HQ REFINERY + harvesters; denser clash scrap flecks; derrick/gantry/hopper silhouette in snapshot+sprites. --- engine-c/src/engine.c | 34 +++++++++++++++++++++++++++++++--- engine-c/src/snapshot.c | 41 ++++++++++++++++++++++++++++------------- engine-c/src/sprites.c | 37 ++++++++++++++++++++++++------------- 3 files changed, 83 insertions(+), 29 deletions(-) diff --git a/engine-c/src/engine.c b/engine-c/src/engine.c index b5e4248..0e295bd 100644 --- a/engine-c/src/engine.c +++ b/engine-c/src/engine.c @@ -256,12 +256,39 @@ static void place_showcase(Game *g, Faction human, Faction enemy) { bld_spawn(g, BT_BASE, human, hqx + 3, hqy); bld_spawn(g, BT_POWER, human, hqx - 1, hqy + 2); bld_spawn(g, BT_WARFACTORY, human, hqx + 1, hqy + 3); + bld_spawn(g, BT_REFINERY, human, hqx + 4, hqy + 3); /* derrick near clash crop */ bld_spawn(g, BT_TURRET, human, hqx + 2, hqy - 1); bld_spawn(g, BT_TURRET, human, hqx + 5, hqy + 1); bld_spawn(g, BT_WALL, human, hqx - 1, hqy); bld_spawn(g, BT_WALL, human, hqx - 1, hqy + 1); bld_spawn(g, BT_WALL, human, hqx + 5, hqy); bld_force_complete(g); + /* dense scrap oil-field SE of derrick (visible in clash crop) */ + for (int dy = 3; dy <= 8; dy++) { + for (int dx = 4; dx <= 11; dx++) { + int tx = hqx + dx, ty = hqy + dy; + if (!map_in_bounds(&g->map, tx, ty)) continue; + Tile *t = map_tile(&g->map, tx, ty); + if (!t || !t->walkable || t->occupied) continue; + int d2 = (dx - 7) * (dx - 7) + (dy - 5) * (dy - 5); + if (d2 > 20) continue; + t->terrain = T_SCRAP; + t->scrap = (uint8_t)(140 + ((dx * 17 + dy * 11) & 95)); + } + } + /* harvesters on the scrap oil-field approach (cargo seeded) */ + { + float rwx, rwy; + map_tile_to_world(hqx + 6, hqy + 5, &rwx, &rwy); + for (int hi = 0; hi < 2; hi++) { + int ui = unit_spawn(g, UT_HARVESTER, human, + rwx + (hi * 22 - 8), rwy + 6.0f); + if (ui >= 0 && ui < MAX_UNITS) { + Unit *hu = &g->units[ui]; + if (hu && !hu->dead) hu->cargo = (uint16_t)(620 + hi * 9); + } + } + } } } @@ -282,10 +309,11 @@ static void place_showcase(Game *g, Faction human, Faction enemy) { } else if (d2 <= 12) { t->terrain = T_RUBBLE; t->scrap = 0; - } else if (d2 <= 28 && ((dx + dy * 3) & 3) == 0) { + } else if (d2 <= 30 && ((dx + dy * 3) & 1) == 0) { + /* denser scrap flecks around clash (oil-field read) */ t->terrain = T_SCRAP; - t->scrap = (uint8_t)(90 + ((dx * 13 + dy * 7) & 127)); - } else if (d2 <= 32 && ((dx * 5 + dy) & 2) == 0) { + t->scrap = (uint8_t)(110 + ((dx * 13 + dy * 7) & 127)); + } else if (d2 <= 36 && ((dx * 5 + dy) & 2) == 0) { t->terrain = T_RUBBLE; t->scrap = 0; } diff --git a/engine-c/src/snapshot.c b/engine-c/src/snapshot.c index d7897f1..617d622 100644 --- a/engine-c/src/snapshot.c +++ b/engine-c/src/snapshot.c @@ -604,19 +604,34 @@ static void draw_bld(Building *b, int sx, int sy) { fill_rect(sx + 8, sy + H - 10, W - 16, 4, 50, 48, 42); /* ramp lip */ break; case BT_REFINERY: - /* twin silos + pipe/conveyor slab + hopper */ - disc(sx + 18, sy + H/2 - 2, 14, ok, og, ob); - disc(sx + 18, sy + H/2 - 2, 12, 200, 165, 85); - ring(sx + 18, sy + H/2 - 2, 9, 2, 90, 70, 45); - disc(sx + W - 18, sy + H/2 - 2, 14, ok, og, ob); - disc(sx + W - 18, sy + H/2 - 2, 12, 190, 155, 75); - ring(sx + W - 18, sy + H/2 - 2, 9, 2, 90, 70, 45); - fill_rect(sx + 14, sy + H - 16, W - 28, 10, ok, og, ob); - fill_rect(sx + 16, sy + H - 14, W - 32, 6, 140, 110, 55); /* conveyor */ - line(sx + 18, sy + H/2 + 8, sx + W - 18, sy + H - 12, 110, 90, 50); - line(sx + 18, sy + H/2 + 10, sx + W - 18, sy + H - 10, 110, 90, 50); - fill_rect(sx + W/2 - 6, sy + 8, 12, 14, ok, og, ob); - fill_rect(sx + W/2 - 4, sy + 10, 8, 10, br, bg, bb); /* hopper */ + /* latticed derrick tower + gantry + hopper + scrap tank (KKND oil-field read) */ + fill_rect(sx + 6, sy + H - 14, W - 12, 10, ok, og, ob); /* slab */ + fill_rect(sx + 8, sy + H - 12, W - 16, 6, 70, 62, 48); + /* derrick mast + lattice */ + fill_rect(sx + W/2 - 3, sy + 4, 6, H - 18, ok, og, ob); + fill_rect(sx + W/2 - 2, sy + 5, 4, H - 20, 95, 85, 65); + line(sx + W/2 - 6, sy + 10, sx + W/2 + 6, sy + 22, 55, 48, 38); + line(sx + W/2 + 6, sy + 10, sx + W/2 - 6, sy + 22, 55, 48, 38); + line(sx + W/2 - 6, sy + 24, sx + W/2 + 6, sy + 36, 55, 48, 38); + line(sx + W/2 + 6, sy + 24, sx + W/2 - 6, sy + 36, 55, 48, 38); + line(sx + W/2 - 5, sy + 8, sx + W/2 - 5, sy + H - 16, 40, 36, 30); + line(sx + W/2 + 5, sy + 8, sx + W/2 + 5, sy + H - 16, 40, 36, 30); + fill_rect(sx + W/2 - 7, sy + 2, 14, 5, ok, og, ob); /* crown */ + fill_rect(sx + W/2 - 5, sy + 3, 10, 3, 200, 170, 80); /* beacon */ + /* gantry arm toward hopper */ + fill_rect(sx + W/2 + 2, sy + 14, W/2 - 10, 4, ok, og, ob); + fill_rect(sx + W/2 + 3, sy + 15, W/2 - 12, 2, 120, 100, 60); + line(sx + W/2 + 4, sy + 18, sx + W - 12, sy + H - 22, 90, 75, 50); + /* hopper / processing shed */ + fill_rect(sx + W - 22, sy + H - 30, 16, 16, ok, og, ob); + fill_rect(sx + W - 20, sy + H - 28, 12, 12, br, bg, bb); + fill_rect(sx + W - 18, sy + H - 26, 8, 6, 140, 110, 55); + fill_rect(sx + W - 16, sy + H - 18, 4, 4, 40, 36, 30); /* chute */ + /* scrap tank (left) */ + disc(sx + 14, sy + H - 20, 10, ok, og, ob); + disc(sx + 14, sy + H - 20, 8, 200, 165, 85); + ring(sx + 14, sy + H - 20, 5, 2, 90, 70, 45); + line(sx + 20, sy + H - 18, sx + W/2 - 4, sy + H - 14, 110, 90, 50); break; case BT_POWER: /* cooling towers + reactor core + steam cross */ diff --git a/engine-c/src/sprites.c b/engine-c/src/sprites.c index 61c80e2..4666ad1 100644 --- a/engine-c/src/sprites.c +++ b/engine-c/src/sprites.c @@ -414,19 +414,30 @@ SDL_Texture *sprites_make_bld(SDL_Renderer *r, BuildingType t, Faction f) { fill_rect(s, 8, H - 10, W - 16, 4, 50, 48, 42, 255); break; case BT_REFINERY: - /* twin silos + pipe/conveyor slab + hopper */ - disc(s, 18, H/2 - 2, 14, ok, og, ob, 255); - disc(s, 18, H/2 - 2, 12, 200, 165, 85, 255); - ring(s, 18, H/2 - 2, 9, 2, 90, 70, 45, 255); - disc(s, W - 18, H/2 - 2, 14, ok, og, ob, 255); - disc(s, W - 18, H/2 - 2, 12, 190, 155, 75, 255); - ring(s, W - 18, H/2 - 2, 9, 2, 90, 70, 45, 255); - fill_rect(s, 14, H - 16, W - 28, 10, ok, og, ob, 255); - fill_rect(s, 16, H - 14, W - 32, 6, 140, 110, 55, 255); - line(s, 18, H/2 + 8, W - 18, H - 12, 110, 90, 50, 255); - line(s, 18, H/2 + 10, W - 18, H - 10, 110, 90, 50, 255); - fill_rect(s, W/2 - 6, 8, 12, 14, ok, og, ob, 255); - fill_rect(s, W/2 - 4, 10, 8, 10, base.r, base.g, base.b, 255); + /* latticed derrick tower + gantry + hopper + scrap tank (parity draw_bld) */ + fill_rect(s, 6, H - 14, W - 12, 10, ok, og, ob, 255); + fill_rect(s, 8, H - 12, W - 16, 6, 70, 62, 48, 255); + fill_rect(s, W/2 - 3, 4, 6, H - 18, ok, og, ob, 255); + fill_rect(s, W/2 - 2, 5, 4, H - 20, 95, 85, 65, 255); + line(s, W/2 - 6, 10, W/2 + 6, 22, 55, 48, 38, 255); + line(s, W/2 + 6, 10, W/2 - 6, 22, 55, 48, 38, 255); + line(s, W/2 - 6, 24, W/2 + 6, 36, 55, 48, 38, 255); + line(s, W/2 + 6, 24, W/2 - 6, 36, 55, 48, 38, 255); + line(s, W/2 - 5, 8, W/2 - 5, H - 16, 40, 36, 30, 255); + line(s, W/2 + 5, 8, W/2 + 5, H - 16, 40, 36, 30, 255); + fill_rect(s, W/2 - 7, 2, 14, 5, ok, og, ob, 255); + fill_rect(s, W/2 - 5, 3, 10, 3, 200, 170, 80, 255); + fill_rect(s, W/2 + 2, 14, W/2 - 10, 4, ok, og, ob, 255); + fill_rect(s, W/2 + 3, 15, W/2 - 12, 2, 120, 100, 60, 255); + line(s, W/2 + 4, 18, W - 12, H - 22, 90, 75, 50, 255); + fill_rect(s, W - 22, H - 30, 16, 16, ok, og, ob, 255); + fill_rect(s, W - 20, H - 28, 12, 12, base.r, base.g, base.b, 255); + fill_rect(s, W - 18, H - 26, 8, 6, 140, 110, 55, 255); + fill_rect(s, W - 16, H - 18, 4, 4, 40, 36, 30, 255); + disc(s, 14, H - 20, 10, ok, og, ob, 255); + disc(s, 14, H - 20, 8, 200, 165, 85, 255); + ring(s, 14, H - 20, 5, 2, 90, 70, 45, 255); + line(s, 20, H - 18, W/2 - 4, H - 14, 110, 90, 50, 255); break; case BT_POWER: /* cooling towers + reactor core + steam cross */