Nimbin[12]?Games / Entropie / entropie/src/world/forestry.h

Entropie git · main

Entropie festival game; first steps

sdl c game entropie cmake · first commit 2026-10-10 · last commit 2026-11-02 (18 hours ago) · synced 10 hours ago

C 88.5% Markdown 9.1% GLSL 2.3%
git clone https://git.christianimmanuel.de/games/Entropie.gitwget https://git.christianimmanuel.de/games/Entropie/archive/Entropie.tar.gz
entropie/src/world/forestry.h 1.5 KB · 36 lines raw
#ifndef WORLD_FORESTRY_H
#define WORLD_FORESTRY_H

/*
 * What happens to trees in the world:
 *
 *   felled   the tree falls away from whoever cut it, leaving a stump as
 *            high as the cut. It knocks people down, pushes light things
 *            aside, breaks bottles and comes to rest on anything big it
 *            lands on. Crashing down, a few branches snap off (more if it
 *            falls into another tree, which loses some too).
 *   stump    chopped out with the axe or the chainsaw: roots stay in the
 *            ground, and there's a chunk of wood for the fire.
 *   delimbed the crown comes off branch by branch; the trunk is a log.
 *   cut      a log becomes two shorter ones, right where it was cut.
 *
 * Logs weigh what their wood weighs: posts and beams for building, carried
 * by as many people as it takes (see Hands_toggleLift).
 */

#include "world/world.h"

/* Applies jobs finished by a character's tools (see tools.h). */
void Forestry_finishJobs(World *world, Object *by);

/* Felled on purpose this way (the big tree: game_bigtree.c), cut this high. */
void Forestry_fell(World *world, Object *tree, Vec3 dir, float cut_height);

/* Falling trees: advance and collide. */
void Forestry_update(World *world, float dt);

/* Someone tries to get over a bush and lands in it: down they go (into it),
   and a twig or two snaps off. Returns how many snapped. */
int  Forestry_intoBush(World *world, Object *who, Object *bush);

#endif /* WORLD_FORESTRY_H */