Wood: giant mushrooms underground, felled by imps; wooden bridges and doors cost wood
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c5adc3e902
commit
398bb95681
28 files changed
+447
-31
No files matched your search
+40
@@ -83,6 +83,11 @@ pub const T_RIVAL3: u32 = 189; // 4 variants: floor of the yellow master
|
||||
pub const I_DRAWBRIDGE: u32 = 193; // drawbridge tool: a raised flap on chains
|
||||
pub const I_FREEZE: u32 = 194; // frost spell: a snowflake
|
||||
pub const T_OBSIDIAN: u32 = 195; // 4 variants: cooled lava, dark glass with glowing seams
|
||||
pub const T_STEM: u32 = 199; // giant mushroom stem
|
||||
pub const T_CAP: u32 = 200; // giant mushroom cap, glowing spots
|
||||
pub const T_BARK: u32 = 201; // tree trunk
|
||||
pub const T_LEAVES: u32 = 202; // 2 variants: tree crown
|
||||
pub const T_GRASS: u32 = 204; // 4 variants: grass above ground
|
||||
|
||||
pub struct Gfx {
|
||||
pub atlas: Texture2D,
|
||||
@@ -835,6 +840,39 @@ fn gen_atlas() -> Image {
|
||||
None
|
||||
}
|
||||
});
|
||||
// giant mushroom: pale ribbed stem, a violet cap with glowing spots
|
||||
cv.cell(T_STEM, |x, y| {
|
||||
let r = hash(x, y, 410);
|
||||
Some(if x % 4 == 0 { c(150, 140, 130) } else if r % 9 == 0 { c(170, 160, 150) } else { c(200, 192, 178) })
|
||||
});
|
||||
cv.cell(T_CAP, |x, y| {
|
||||
let spot = |cx: i32, cy: i32| (x - cx).pow(2) + (y - cy).pow(2) <= 2;
|
||||
if spot(4, 4) || spot(11, 6) || spot(6, 11) || spot(12, 12) {
|
||||
Some(c(150, 255, 230))
|
||||
} else if (x + y) % 5 == 0 {
|
||||
Some(c(90, 50, 130))
|
||||
} else {
|
||||
Some(c(120, 66, 170))
|
||||
}
|
||||
});
|
||||
// tree: bark and two kinds of crown
|
||||
cv.cell(T_BARK, |x, y| {
|
||||
let r = hash(x, y, 420);
|
||||
Some(if x % 5 == 0 || r % 7 == 0 { c(60, 40, 24) } else { c(96, 66, 40) })
|
||||
});
|
||||
for v in 0..2u32 {
|
||||
cv.cell(T_LEAVES + v, |x, y| {
|
||||
let r = hash(x, y, 430 + v);
|
||||
Some(if r % 5 == 0 { c(30, 70, 30) } else if r % 7 == 0 { c(110, 160, 60) } else if v == 0 { c(56, 110, 44) } else { c(70, 120, 40) })
|
||||
});
|
||||
}
|
||||
// grass above ground
|
||||
for v in 0..4u32 {
|
||||
cv.cell(T_GRASS + v, |x, y| {
|
||||
let r = hash(x, y, 440 + v);
|
||||
Some(if r % 11 == 0 { c(120, 170, 70) } else if r % 6 == 0 { c(50, 96, 40) } else if r % 23 == 0 { c(200, 190, 90) } else { c(74, 126, 52) })
|
||||
});
|
||||
}
|
||||
// obsidian: cooled lava, dark glass with a few glowing seams
|
||||
for v in 0..4u32 {
|
||||
cv.cell(T_OBSIDIAN + v, |x, y| {
|
||||
@@ -1976,6 +2014,8 @@ impl Gfx {
|
||||
Kind::Lava => T_LAVA + v,
|
||||
Kind::Bridge | Kind::Drawbridge => T_BRIDGE + (v & 1),
|
||||
Kind::Obsidian => T_OBSIDIAN + v,
|
||||
Kind::Mushroom => T_FLOOR + v,
|
||||
Kind::Tree => T_GRASS + v,
|
||||
Kind::LavaBridge => T_STONEBRIDGE + (v & 1),
|
||||
Kind::Shard => T_HEROFLOOR + v,
|
||||
Kind::Aerie => T_AERIE + v,
|
||||
|
||||
Reference in new issue
Block a user