Entropie git · main
Entropie festival game; first steps
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.gzentropie/src/world/site.h raw
#ifndef WORLD_SITE_H
#define WORLD_SITE_H
/*
* The site: Homburgshöhe at Geflügelhof Oderland, traced from the map.
*
* Map pixels become meters (SITE_SCALE per pixel), centered on the middle of
* the traced map; north is -z, east +x.
*
* - the L33 (four lanes), Homburgshöhe, the gravel loop and the forest tracks
* - the farm along Homburgshöhe: poultry halls, several with solar roofs
* - pine forest all around, dry meadow between the roads, a field in the
* south-west
* - in the south-west: the courtyard where everything starts (main
* building, your garages, the barn and your unfinished building), a pond
* - small family houses by the loop road
*/
#include <stdbool.h>
#include "world/world.h"
#define SITE_SCALE 0.426f /* meters per pixel of the traced map */
/* Where the crates of drinks go (the kitchen in your garages), and where the tents go (the
meadow behind your garages): k 0 yours, 1 Volkram and Jana's, 2 Toni's;
along: the way things are laid out side by side there; door: the way the
tents' doors face. */
Vec3 Site_drinksSpot(void);
/* Where the shopping's material goes: out in front of the car room of your garages (the store). */
Vec3 Site_materialSpot(void);
/* The middle of the kitchen in your garages: a roof to wait out the rain under, seats round it. */
Vec3 Site_rainRoom(void);
/* Where a floor's stage stands (the floors: world/stage.h). */
Vec3 Site_floorSpot(int project);
/* The foot of the path up to the tents' meadow (the end of your garages by the barn). */
Vec3 Site_campPath(void);
/* The big old tree (between the Obstwiese and the Kartoffelacker): where it stands, which way it should fall
(away from the road) and which way it leans (the road, the phone line). */
Vec3 Site_bigTree(void);
Vec3 Site_bigTreeSafe(void);
Vec3 Site_bigTreeLean(void);
/* The phone line along the road: its cross arms' middles, how many; its wires torn down (or up again). */
int Site_phoneLine(Vec3 *out, int max);
void Site_phoneWiresDown(World *world, bool down);
/* The storm: in at the barn's door here (out of sight inside, like the main building). */
Vec3 Site_barnDoor(void);
/* Where the vineyard snails are let go (out of the way of the building), and where Kerry carves (world/field.h). */
Vec3 Site_snailRefuge(void);
Vec3 Site_artSpot(void);
/* Every place like that (the kitchen, the shelter in the yard): their middles, how many. */
int Site_rainPlaces(Vec3 *out, int max);
Vec3 Site_campSpot(int k);
Vec3 Site_campAlong(void);
Vec3 Site_campDoor(void);
/* In front of the main building's door by your garages (the one Kurti and his sons use), and whether
a spot is in the main building. */
Vec3 Site_houseDoor(void);
bool Site_inHouse(float x, float z);
/* Your car: where it comes in on the gravel road, the way in, and where it's parked (facing). */
void Site_arrivalPath(Vec3 *points, int *n, float *park_yaw);
/* Where the yard is (world); the things to play with lie around it. */
Vec3 Site_yard(void);
/* A guest's litter dropped there (paper, a can, a cup; n picks which; by: whose - the clean-up counts those). */
struct Object *Site_litter(World *world, Vec3 at, int n, struct Object *by);
/* The main building of the courtyard: the first thing you look at. */
Vec3 Site_landmark(void);
/* Buildings, trees and fixtures. Before the terrain is built: it levels the ground around them. */
bool Site_build(World *world);
/* What lies on the finished ground: roads and water; trees settle into it. */
bool Site_finish(World *world);
/* Where the obstacle course runs (the chicken farm's yard): its start and direction. */
void Site_courseFrame(Vec3 *start, Vec3 *along);
/* For the terrain: how much higher the ground is here (the meadow behind
your garages, the one right of the main building). */
float Site_rise(float x, float z);
/* For the terrain: the ground's color here (forest floor, dry meadow, field,
farm yard) given the meadow color, and how much a road is here (0..1). */
Vec3 Site_groundColor(float x, float z, Vec3 meadow);
float Site_road(float x, float z);
/* How much a paved road is here (0..1, reaching further out): the ground under it is smooth. */
float Site_paved(float x, float z);
/* How much grass grows here (0..1): none on roads, little on the yard,
the field and under the pines. */
float Site_grass(float x, float z);
/* How level the ground is kept here (0..1): the yard and the pond. */
float Site_flat(float x, float z);
/* Hard ground here (asphalt, concrete, gravel): glass breaks on it. */
bool Site_hard(float x, float z);
/* What the ground is made of here (for water soaking in and mud). */
Soil Site_soil(float x, float z);
/* What covers the ground here, as part of the ground itself: how much asphalt,
concrete, gravel and bare earth (the rest is meadow), and how far the top of
it lies above (+) or below (-) the bare ground. Tar lies on a gravel bed and
ends in a gravel shoulder; a gravel road is stones on the soil with ruts and
a grassy middle; a track is soil worn a little into the ground. */
typedef struct {
float asphalt, concrete, gravel, earth;
float lift; /* m */
} SiteSurface;
SiteSurface Site_surface(float x, float z);
/* Could anything but meadow lie within radius of here? (to skip the open meadow quickly) */
bool Site_surfaceNear(float x, float z, float radius);
#endif /* WORLD_SITE_H */