|
Noble Ape
The Central Directories of the Noble Ape Simulation.
|
Functions related to eating. More...
Go to the source code of this file.
Macros | |
| #define | GENE_ENERGY_FROM_VEGETABLES(gene) GENE_VAL_REG(gene, 3, 13, 15, 3) |
| #define | GENE_ENERGY_FROM_FRUITS(gene) GENE_VAL_REG(gene, 14, 7, 6, 4) |
| #define | GENE_ENERGY_FROM_SHELLFISH(gene) GENE_VAL_REG(gene, 10, 12, 12, 2) |
| #define | GENE_ENERGY_FROM_SEAWEED(gene) GENE_VAL_REG(gene, 0, 9, 11, 12) |
| #define | GENE_ENERGY_FROM_BIRD_EGGS(gene) GENE_VAL_REG(gene, 7, 1, 9, 5) |
| #define | GENE_ENERGY_FROM_LIZARD_EGGS(gene) GENE_VAL_REG(gene, 15, 3, 12, 8) |
Functions | |
| n_int | food_absorption (noble_being *local, n_int max_energy, n_byte food_type) |
| How much energy is absorbed from a given type of food. | |
| void | food_values (n_land *local_land, n_int loc_x, n_int loc_y, n_int *grass, n_int *trees, n_int *bush) |
| Returns the values for grass, trees and bushes at the given location. | |
| n_int | food_eat (n_land *local_land, n_int loc_x, n_int loc_y, n_int az, n_byte *food_type, noble_being *local_being) |
| Eat food at the given location and return the energy increase. | |
Functions related to eating.
Definition in file food.c.
| #define GENE_ENERGY_FROM_BIRD_EGGS | ( | gene | ) | GENE_VAL_REG(gene, 7, 1, 9, 5) |
| #define GENE_ENERGY_FROM_FRUITS | ( | gene | ) | GENE_VAL_REG(gene, 14, 7, 6, 4) |
| #define GENE_ENERGY_FROM_LIZARD_EGGS | ( | gene | ) | GENE_VAL_REG(gene, 15, 3, 12, 8) |
| #define GENE_ENERGY_FROM_SEAWEED | ( | gene | ) | GENE_VAL_REG(gene, 0, 9, 11, 12) |
| #define GENE_ENERGY_FROM_SHELLFISH | ( | gene | ) | GENE_VAL_REG(gene, 10, 12, 12, 2) |
| #define GENE_ENERGY_FROM_VEGETABLES | ( | gene | ) | GENE_VAL_REG(gene, 3, 13, 15, 3) |
| n_int food_absorption | ( | noble_being * | local, |
| n_int | max_energy, | ||
| n_byte | food_type | ||
| ) |
How much energy is absorbed from a given type of food.
| food_type | The type of food |
| local | pointer to the ape |
note that the absorbition for different foods is normalised
ingest pathogens from certain foods
< can only eat so much in one go
Definition at line 75 of file food.c.
| n_int food_eat | ( | n_land * | local_land, |
| n_int | loc_x, | ||
| n_int | loc_y, | ||
| n_int | az, | ||
| n_byte * | food_type, | ||
| noble_being * | local_being | ||
| ) |
Eat food at the given location and return the energy increase.
| sim | Pointer to the simulation |
| loc_x | X ape coordinate |
| loc_y | Y ape coordinate |
| az | Z ape coordinate |
| local_being | Pointer to the ape |
above the high water mark
in the intertidal zone
Definition at line 278 of file food.c.
| void food_values | ( | n_land * | local_land, |
| n_int | loc_x, | ||
| n_int | loc_y, | ||
| n_int * | grass, | ||
| n_int * | trees, | ||
| n_int * | bush | ||
| ) |
Returns the values for grass, trees and bushes at the given location.
| local_land | Pointer to the land |
| local_weather | Pointer to the weather |
| loc_x | X ape coordinate on the map |
| loc_y | Y ape coordinate on the lap |
| grass | Returned value for grass |
| trees | Returned value for trees |
| bush | Returned value for bushes |
grass at this location
trees at this location
bushes at this location
1.8.1.1