Commit b486efaa authored by Tom Barbalet's avatar Tom Barbalet

Remove ape_simulation

parent 28100a3e
Pipeline #117807402 failed with stages
in 2 minutes and 9 seconds
......@@ -102,10 +102,10 @@
return mutableDefinition;
}
- (NSDictionary*) apeSimulationDictionary:(ape_simulation*)simulation
- (NSDictionary*) apeSimulationDictionary
{
simulated_group * group = &(simulation->group);
simulated_timing * timing = &(simulation->timing);
simulated_group * group = sim_group();
simulated_timing * timing = sim_timing();
NSMutableDictionary * mutableSimulation = [NSMutableDictionary dictionary];
NSMutableArray * mutableBeings = [NSMutableArray array];
......@@ -151,7 +151,7 @@
{
NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
if (standardUserDefaults) {
[standardUserDefaults setValuesForKeysWithDictionary:[self apeSimulationDictionary:sim_sim()]];
[standardUserDefaults setValuesForKeysWithDictionary:[self apeSimulationDictionary]];
[standardUserDefaults synchronize];
}
}
......
......@@ -1228,7 +1228,7 @@ void math_general_execution(n_int instruction, n_int is_constant0, n_int is_cons
/**
* @brief Returns a sensor value
* @param sim Pointer to the simulation object
* @param group Pointer to the simulated_group object
* @param meeter_being Pointer to the being doing the meeting
* @param met_being Pointer to the being which was met
* @param meeter_social_graph Pointer to the meeter being's social graph
......@@ -1236,7 +1236,7 @@ void math_general_execution(n_int instruction, n_int is_constant0, n_int is_cons
* @param switcher The type of sensor
* @return Sensor value
*/
static n_byte brain_first_sense(ape_simulation * sim, simulated_being * meeter_being, simulated_being * met_being, simulated_isocial * meeter_social_graph, n_int actor_index, n_byte switcher)
static n_byte brain_first_sense(simulated_group * group, simulated_being * meeter_being, simulated_being * met_being, simulated_isocial * meeter_social_graph, n_int actor_index, n_byte switcher)
{
switch (switcher % 32)
{
......@@ -1403,7 +1403,7 @@ static n_byte territory_familiarity(simulated_being * local_being,
return result;
}
static void being_second_sense(ape_simulation * local_sim, n_byte addr00, n_byte * local_addr10, simulated_being * meeter_being, simulated_being * met_being, n_int actor_index, n_byte is_const1, n_int episode_index, simulated_iepisodic * episodic)
static void being_second_sense(simulated_group * group, n_byte addr00, n_byte * local_addr10, simulated_being * meeter_being, simulated_being * met_being, n_int actor_index, n_byte is_const1, n_int episode_index, simulated_iepisodic * episodic)
{
n_int new_episode_index=-1;
n_int switcher = addr00%25;
......@@ -1627,7 +1627,7 @@ static void being_second_sense(ape_simulation * local_sim, n_byte addr00, n_byte
/**
* @brief Returns a sensor value
* @param sim Pointer to the simulation object
* @param group Pointer to the simulated_group object
* @param meeter_being Pointer to the being doing the meeting
* @param met_being Pointer to the being which was met
* @param internal Non-zero if this is an internal dialogue
......@@ -1635,7 +1635,7 @@ static void being_second_sense(ape_simulation * local_sim, n_byte addr00, n_byte
* @param additional_write No operation value
* @return Sensor value
*/
static n_byte brain_third_sense(ape_simulation * sim, simulated_being * meeter_being, simulated_being * met_being, n_byte internal, n_byte switcher, n_byte * additional_write)
static n_byte brain_third_sense(simulated_group * group, simulated_being * meeter_being, simulated_being * met_being, n_byte internal, n_byte switcher, n_byte * additional_write)
{
n_byte half_switcher = switcher >> 1;
simulated_being * important_being = ((switcher & 1) ? met_being : meeter_being);
......@@ -1706,7 +1706,7 @@ static n_byte brain_third_sense(ape_simulation * sim, simulated_being * meeter_b
return additional_write[0]; /** no op case. Not sure if the compiler will recognize that though */
}
static void brain_first_action(ape_simulation * local_sim, n_byte awake,
static void brain_first_action(simulated_group * group, n_byte awake,
n_byte * local_addr00, n_byte * local_addr10,
simulated_being * meeter_being, simulated_being * met_being, n_int episode_index,
simulated_iepisodic * episodic, n_byte pspace0, n_int actor_index,
......@@ -1820,7 +1820,7 @@ static void brain_first_action(ape_simulation * local_sim, n_byte awake,
/**
* @brief Two beings meet and chat, or a being engages in an internal dialogue
* @param sim Pointer to the simulation object
* @param group Pointer to the simulated_group object
* @param awake Whether the being is awake
* @param meeter_being Pointer to the being doing the meeting
* @param met_being Pointer to the being which was met
......@@ -1829,7 +1829,7 @@ static void brain_first_action(ape_simulation * local_sim, n_byte awake,
* @param being_index Social graph index of the being which is the current focus of attention
*/
void brain_dialogue(
ape_simulation * sim,
simulated_group* group,
n_byte awake,
simulated_being * meeter_being,
simulated_being * met_being,
......@@ -1890,23 +1890,23 @@ void brain_dialogue(
/** General sensor */
case BRAINCODE_SEN:
{
addr1[0] = brain_first_sense(sim, meeter_being, met_being, meeter_social_graph, actor_index, addr0[0]);
addr1[0] = brain_first_sense(group, meeter_being, met_being, meeter_social_graph, actor_index, addr0[0]);
break;
}
case BRAINCODE_SEN2:
{
being_second_sense(sim, addr0[0], &addr1[0], meeter_being, met_being, actor_index, IS_CONST1, episode_index, episodic);
being_second_sense(group, addr0[0], &addr1[0], meeter_being, met_being, actor_index, IS_CONST1, episode_index, episodic);
break;
}
case BRAINCODE_SEN3:
addr1[0] = brain_third_sense(sim, meeter_being, met_being, internal, addr0[0], addr1);
addr1[0] = brain_third_sense(group, meeter_being, met_being, internal, addr0[0], addr1);
break;
/** Action */
case BRAINCODE_ACT:
{
brain_first_action(sim, awake, &addr0[0], &addr1[0], meeter_being, met_being, episode_index,
brain_first_action(group, awake, &addr0[0], &addr1[0], meeter_being, met_being, episode_index,
episodic, pspace[0], actor_index, meeter_social_graph, IS_CONST1);
break;
}
......
......@@ -85,13 +85,12 @@ void drives_sociability_loop_no_sim(simulated_being * other, void * data)
* @brief Social drive governs how likely the being is to interact with others.
* This affects behaviors such as grooming, chatting and mating
* @param local Pointer to the ape
* @param sim Pointer to the simulation
* @param group Pointer to the simulated_group
*/
static void drives_sociability(
simulated_being * local,
ape_simulation * sim)
simulated_group * group)
{
simulated_group * group = &(sim->group);
drives_sociability_data dsd;
dsd.beings_in_vacinity = 0;
dsd.being = local;
......@@ -104,12 +103,10 @@ static void drives_sociability(
* @brief Updates the sex drive
* @param local Pointer to the ape
* @param awake whether the ape is awake
* @param local_sim Pointer to the simulation
*/
static void drives_sex(
simulated_being * local,
n_int awake,
ape_simulation * local_sim)
n_int awake)
{
n_int i,max;
simulated_isocial * local_social_graph = being_social(local);
......@@ -246,10 +243,10 @@ void drives_fatigue(
}
}
void drives_cycle(ape_simulation * local_sim, simulated_being * local_being, void * data)
void drives_cycle(simulated_group * group, simulated_being * local_being, void * data)
{
drives_hunger(local_being);
drives_sociability(local_being, local_sim);
drives_sex(local_being, local_being->delta.awake, local_sim);
drives_sociability(local_being, group);
drives_sex(local_being, local_being->delta.awake);
drives_fatigue(local_being);
}
......@@ -348,23 +348,23 @@ n_int being_speaking(simulated_being * value);
n_genetics * being_fetal_genetics(simulated_being * value);
n_int social_set_relationship(ape_simulation * sim, simulated_being * meeter_being, n_byte relationship,simulated_being * met_being);
n_int social_set_relationship(simulated_group * group, simulated_being * meeter_being, n_byte relationship,simulated_being * met_being);
n_int social_get_relationship(simulated_being * meeter_being,
n_byte relationship);
n_int social_network(ape_simulation *sim, simulated_being * meeter_being, simulated_being * met_being, n_uint distance);
n_int social_network(simulated_group * group, simulated_being * meeter_being, simulated_being * met_being, n_uint distance);
n_byte social_groom(ape_simulation * sim,
n_byte social_groom(simulated_group * group,
simulated_being * meeter_being,
simulated_being * met_being,
n_uint distance,
n_int awake,
n_byte2 familiarity);
n_byte2 social_squabble(simulated_being * meeter_being, simulated_being * met_being, n_uint distance, n_int is_female, ape_simulation * sim);
n_int social_mate(simulated_being * meeter_being, simulated_being * met_being, n_int being_index, n_uint distance, ape_simulation * sim);
n_int social_chat(simulated_being * meeter_being, simulated_being * met_being, n_int being_index, ape_simulation * sim);
n_byte2 social_squabble(simulated_being * meeter_being, simulated_being * met_being, n_uint distance, n_int is_female, simulated_group * group);
n_int social_mate(simulated_being * meeter_being, simulated_being * met_being, n_int being_index, n_uint distance, simulated_group * group);
n_int social_chat(simulated_being * meeter_being, simulated_being * met_being, n_int being_index, simulated_group * group);
void episodic_food(simulated_being * local, n_int energy, n_byte food_type);
......@@ -487,7 +487,7 @@ typedef struct
simulated_being * local;
} being_listen_struct;
void being_listen(ape_simulation * sim, simulated_being * local, void * data);
void being_listen(simulated_group * group, simulated_being * local, void * data);
void being_listen_loop_no_sim(simulated_being * other, void * data);
......@@ -514,10 +514,10 @@ void being_erase(simulated_being * value);
n_uint being_affect(simulated_being * local, n_byte is_positive);
void episodic_cycle(ape_simulation * local_sim, simulated_being * local, void * data);
void episodic_cycle(simulated_group * group, simulated_being * local, void * data);
void episodic_cycle_no_sim(simulated_being * local_being, void * data);
void being_cycle_awake(ape_simulation * sim, simulated_being * local);
void being_cycle_awake(simulated_group * group, simulated_being * local);
void being_cycle_universal(simulated_being * local);
typedef struct
......@@ -528,7 +528,7 @@ typedef struct
void drives_sociability_loop_no_sim(simulated_being * other, void * data);
void drives_cycle(ape_simulation * local_sim, simulated_being * local_being, void * data);
void drives_cycle(simulated_group * group, simulated_being * local_being, void * data);
void drives_fatigue(simulated_being * local);
void drives_hunger(simulated_being * local);
......@@ -548,13 +548,13 @@ void being_set_goal_location(simulated_being * local, n_byte2 lx, n_byte2 ly);
n_int being_check_goal(simulated_being * local, goal_types goal);
void being_goal_cycle(simulated_being * local);
void being_set_select_name(ape_simulation * sim, n_string name);
n_string being_get_select_name(ape_simulation * sim);
void being_set_select_name(simulated_group * group, n_string name);
n_string being_get_select_name(simulated_group * group);
n_int being_name_comparison(simulated_being * value, n_byte2 gender_name, n_byte2 family_name);
void social_graph_link_name(
ape_simulation * local_sim,
simulated_group * group,
simulated_being * local_being,
n_int social_graph_index,
n_byte met, n_string name);
......@@ -570,7 +570,7 @@ void being_relationship_description(n_int index, n_string description);
n_string being_body_inventory_description(n_int index);
void brain_dialogue(
ape_simulation * sim,
simulated_group * group,
n_byte awake,
simulated_being * meeter_being,
simulated_being * met_being,
......@@ -578,9 +578,9 @@ void brain_dialogue(
n_byte * bc1,
n_int being_index);
simulated_being * being_from_name(ape_simulation * sim, n_string name);
simulated_being * being_from_name(simulated_group * group, n_string name);
void being_remove(ape_simulation * local_sim);
void being_remove(simulated_group * group);
void brain_three_byte_command(n_string string, n_byte * response);
......@@ -601,7 +601,7 @@ void being_genetic_wandering(simulated_being * local, being_nearest * nearest);
void being_territory_index(simulated_being * local);
void being_calculate_speed(simulated_being * local, n_int tmp_speed, n_byte2 loc_state);
simulated_being * being_find_name(ape_simulation * sim, n_byte2 first_gender, n_byte2 family);
simulated_being * being_find_name(simulated_group * group, n_byte2 first_gender, n_byte2 family);
void being_move(simulated_being * local, n_int vel, n_byte kind);
n_byte being_awake(simulated_being * local);
......@@ -612,9 +612,9 @@ void speak_out(n_string filename, n_string paragraph);
void social_conception(simulated_being * female,
simulated_being * male,
ape_simulation * sim);
simulated_group * group);
void social_initial_loop(ape_simulation * local, simulated_being * local_being, void * data);
void social_initial_loop(simulated_group * group, simulated_being * local_being, void * data);
void social_secondary_loop_no_sim(simulated_being * local_being, void * data);
......@@ -622,7 +622,7 @@ void being_tidy_loop_no_sim(simulated_being * local_being, void * data);
void being_recalibrate_honor_loop_no_sim(simulated_being * value, void * data);
void being_remove_loop1(ape_simulation * local_sim, simulated_being * local_being, void * data);
void being_remove_loop1(simulated_group * group, simulated_being * local_being, void * data);
typedef struct
{
......@@ -632,13 +632,13 @@ typedef struct
n_uint count;
} being_remove_loop2_struct;
void being_remove_loop2(ape_simulation * local_sim, simulated_being * local, void * data);
void being_remove_loop2(simulated_group * group, simulated_being * local, void * data);
being_remove_loop2_struct * being_remove_initial(ape_simulation * local_sim);
being_remove_loop2_struct * being_remove_initial(simulated_group * group);
void being_remains_init(simulated_remains * remains);
n_int being_index(ape_simulation * sim, simulated_being * local);
n_int being_index(simulated_group * group, simulated_being * local);
void being_high_res(simulated_being * value, n_vect2 * vector);
......
......@@ -254,7 +254,7 @@ enum inventory_type being_carried(simulated_being * value, enum BODY_INVENTORY_T
void being_drop(simulated_being * value, enum BODY_INVENTORY_TYPES location);
void being_take(simulated_being * value, enum BODY_INVENTORY_TYPES location, enum inventory_type object);
void being_remains(ape_simulation * sim, simulated_being * dead);
void being_remains(simulated_group * group, simulated_being * dead);
void brain_cycle(n_byte * local, n_byte2 * constants);
......
......@@ -464,14 +464,14 @@ static void social_meet_update_features(
/**
* @brief Returns a string for the name of the ape in the given social graph array index.
* @param local_sim Pointer to the simulation
* @param group Pointer to the simulated_group
* @param local_being Pinter to the ape
* @param social_graph_index Array index within the social graph
* @param met BEING_MEETER=return name for the meeter, BEING_MET=return name for the met
* @param name Returned ape name
*/
void social_graph_link_name(
ape_simulation * local_sim,
simulated_group * group,
simulated_being * local_being,
n_int social_graph_index,
n_byte met,
......@@ -509,13 +509,13 @@ void social_graph_link_name(
/**
* @brief Align learned preferences with another ape, depending upon
* whether it is part of the ingroup or outgroup.
* @param local_sim Pointer to the simulation
* @param group Pointer to the simulated_group
* @param meeter_being Pointer to the ape doing the meeting
* @param met_being Pointer to the ape being met
* @param social_graph_index Array index within the meeter social graph for the met ape
*/
static void social_group_align_preferences(
ape_simulation * local_sim,
simulated_group * group,
simulated_being * meeter_being,
simulated_being * met_being,
n_int social_graph_index)
......@@ -994,10 +994,10 @@ n_int social_get_relationship(
* @param meeter_being Pointer to the ape doing the meeting
* @param relationship The type of relationship
* @param met_being Pointer to the ape being met
* @param sim Pointer to the simulation
* @param group Pointer to the simulated_group
* @return Array index of the meeter social graph, -1 if not met
*/
n_int social_set_relationship(ape_simulation * sim,
n_int social_set_relationship(simulated_group * group,
simulated_being * meeter_being,
n_byte relationship,
simulated_being * met_being)
......@@ -1032,10 +1032,10 @@ n_int social_set_relationship(ape_simulation * sim,
* @param meeter_being Pointer to the ape doing the meeting
* @param met_being Pointer to the ape being met
* @param distance Distance between the apes
* @param sim Pointer to the simulation
* @param group Pointer to the simulated_group
* @return Array index of the meeter social graph, -1 if not met
*/
n_int social_network(ape_simulation *sim,
n_int social_network(simulated_group * group,
simulated_being * meeter_being,
simulated_being * met_being,
n_uint distance)
......@@ -1081,11 +1081,11 @@ static void social_parasite_cycle(simulated_being * meeter_being, simulated_bein
* @param distance Distance between the apes
* @param awake Whether the met being is awake
* @param familiarity Familiarity with the met ape
* @param sim Pointer to the simulation
* @param group Pointer to the simulated_group
* @return 1 if grooming, 0 otherwise
*/
n_byte social_groom(
ape_simulation * sim,
simulated_group * group,
simulated_being * meeter_being,
simulated_being * met_being,
n_uint distance,
......@@ -1185,7 +1185,7 @@ n_byte social_groom(
* @param met_being Pointer to the ape being met
* @param distance Distance between the apes
* @param is_female Whether the met being is female
* @param sim Pointer to the simulation
* @param group Pointer to the simulated_group
* @return The new being state: showforce/attack
*/
n_byte2 social_squabble(
......@@ -1193,7 +1193,7 @@ n_byte2 social_squabble(
simulated_being * met_being,
n_uint distance,
n_int is_female,
ape_simulation * sim)
simulated_group * group)
{
n_uint agro;
n_byte2 ret_val = 0;
......@@ -1344,14 +1344,13 @@ n_uint social_respect_mean(
* details of the father and resets drives and goals.
* @param female Pointer to the mother
* @param male Pointer to the father
* @param sim Pointer to the simulation
* @param group Pointer to the simulated_group
*/
/*static*/ void social_conception(
simulated_being * female,
simulated_being * male,
ape_simulation * sim)
simulated_group * group)
{
simulated_group * group = &(sim->group);
if ((male == 0L) || (female == 0L))
{
......@@ -1402,7 +1401,7 @@ n_uint social_respect_mean(
* @param met_being Pointer to the ape whi is being met
* @param being_index Array index for the met individual within the social graph of the meeter
* @param distance The Distance between the two apes
* @param sim Pointer to the simulation
* @param group Pointer to simulated_group
* @return The being state: reproducing or not
*/
n_int social_mate(
......@@ -1410,7 +1409,7 @@ n_int social_mate(
simulated_being * met_being,
n_int being_index,
n_uint distance,
ape_simulation * sim)
simulated_group * group)
{
n_int loc_state = 0;
n_int attraction = 0;
......@@ -1464,7 +1463,7 @@ n_int social_mate(
{
if (being_pregnant(meeter_being) == 0)
{
social_conception(meeter_being, met_being, sim);
social_conception(meeter_being, met_being, group);
}
}
}
......@@ -1578,14 +1577,14 @@ static void social_chat_territory(
* @param meeter_being Pointer to the being doing the meeting
* @param met_being Pointer to the being which is being met
* @param being_index Array index for the met individual within the social graph of the meeter
* @param sim Pointer to the simulation
* @param group Pointer to the simulated_group
* @return A non-zero value if speaking
*/
n_int social_chat(
simulated_being * meeter_being,
simulated_being * met_being,
n_int being_index,
ape_simulation * sim)
simulated_group * group)
{
n_int idx,i=0;
n_byte relationship_index;
......@@ -1726,7 +1725,7 @@ n_int social_chat(
#ifdef BRAINCODE_ON
brain_dialogue(
sim,1,meeter_being,met_being,
group,1,meeter_being,met_being,
being_braincode_external(meeter_being),
being_braincode_external(met_being),
being_index);
......@@ -1734,7 +1733,7 @@ n_int social_chat(
#endif
#ifdef EPISODIC_ON
social_group_align_preferences(
sim,meeter_being,met_being,being_index);
group,meeter_being,met_being,being_index);
#endif
if (speaking != 0)
{
......@@ -1776,7 +1775,7 @@ void social_goals(simulated_being * local)
being_goal_cycle(local);
}
void social_initial_loop(ape_simulation * local, simulated_being * local_being, void * data)
void social_initial_loop(simulated_group * group, simulated_being * local_being, void * data)
{
n_uint respect_mean = social_respect_mean(local_being);
n_uint social_loop = 0;
......@@ -1792,7 +1791,7 @@ void social_initial_loop(ape_simulation * local, simulated_being * local_being,
if (!SOCIAL_GRAPH_ENTRY_EMPTY(being_social(local_being),social_loop))
{
specific_being = being_find_name(local, specific_individual->first_name[BEING_MET], specific_individual->family_name[BEING_MET]);
specific_being = being_find_name(group, specific_individual->first_name[BEING_MET], specific_individual->family_name[BEING_MET]);
if (specific_being != 0L)
{
......
This diff is collapsed.
......@@ -130,8 +130,6 @@ typedef enum
n_byte * draw_weather_grayscale(void);
void draw_meters(ape_simulation * local_sim);
void vascular_draw(n_genetics * genetics,
n_byte * buffer,
n_vect2* img,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -46,14 +46,13 @@
void transfer_debug_csv(n_file * fil, n_byte initial)
{
ape_simulation * local_sim = sim_sim();
simulated_group * group = &(local_sim->group);
simulated_group * group = sim_group();
io_write_csv(fil, (n_byte *)(&(group->beings[0])), simulated_file_format, FIL_BEI, initial);
}
/* provide an output file buffer to be written */
static void transfer_land(n_file * tranfer_out, ape_simulation * value, simulated_file_entry * format)
static void transfer_land(n_file * tranfer_out, simulated_group * group, simulated_file_entry * format)
{
n_byte2 loc_signature[2] = {(n_byte2)SIMULATED_APE_SIGNATURE, (n_byte2)VERSION_NUMBER};
......@@ -68,10 +67,8 @@ static void transfer_land(n_file * tranfer_out, ape_simulation * value, simulate
#endif
}
static void transfer_being(n_file * tranfer_out, ape_simulation * value, n_int being, simulated_file_entry * format)
static void transfer_being(n_file * tranfer_out, simulated_group * group, n_int being, simulated_file_entry * format)
{
simulated_group * group = &(value->group);
#ifdef USE_FIL_SOE
n_int loop = (SOCIAL_SIZE * being);
n_int loop_end = loop + SOCIAL_SIZE;
......@@ -207,8 +204,7 @@ static n_object * transfer_sim_obj(void)
n_file * tranfer_out_json(void)
{
n_file *output_file = 0L;
ape_simulation *local_sim = sim_sim();
simulated_group * group = &(local_sim->group);
simulated_group * group = sim_group();
n_object * simulation_object = object_object(0L, "information", transfer_sim_obj());
......@@ -237,8 +233,7 @@ n_file * tranfer_out_json(void)
n_file * tranfer_out(void)
{
ape_simulation *local_sim = sim_sim();
simulated_group * group = &(local_sim->group);
simulated_group * group = sim_group();
n_file *returnFile = io_file_new();
n_int loop = 0;
......@@ -256,11 +251,11 @@ n_file * tranfer_out(void)
io_write_buff(returnFile, fluff, 0L, FILE_COPYRIGHT, 0L);
transfer_land(returnFile, local_sim, (simulated_file_entry *)simulated_file_format);
transfer_land(returnFile, group, (simulated_file_entry *)simulated_file_format);
while (loop < (n_int)(group->num))
{
transfer_being(returnFile, local_sim, loop, (simulated_file_entry *)simulated_file_format);
transfer_being(returnFile, group, loop, (simulated_file_entry *)simulated_file_format);
loop++;
}
......@@ -276,7 +271,7 @@ n_int tranfer_in(n_file * input_file)
n_uint social_count = 0;
n_uint episodic_count = 0;
ape_simulation * local_sim = sim_sim();
simulated_group * group = sim_group();
n_uint size_buffer = io_find_size_data((simulated_file_entry *)simulated_file_format);
temp_store = (n_byte *)memory_new(size_buffer);
......@@ -314,7 +309,6 @@ n_int tranfer_in(n_file * input_file)
if (ret_val < FILE_EOF)
{
n_uint loop_end = 0;
simulated_group * group = &(local_sim->group);
switch (ret_val)
{
......@@ -385,7 +379,6 @@ n_int tranfer_in(n_file * input_file)
if (ret_val == FILE_EOF)
{
simulated_group * group = &(local_sim->group);
group->num = ape_count;
return 0;
}
......
......@@ -964,13 +964,6 @@ typedef struct
n_uint count_frames;
} simulated_timing;
typedef struct
{
simulated_group group;
simulated_timing timing;
} ape_simulation;
/* macros defined to ease in the vectorised code */
......@@ -984,13 +977,13 @@ typedef struct
#define BRAIN_OFFSET(num) (num)
typedef void (loop_fn)(ape_simulation * sim, simulated_being * actual, void * data);
typedef void (loop_fn)(simulated_group * group, simulated_being * actual, void * data);
typedef void (loop_no_sim_fn)(simulated_being * actual, void * data);
void loop_no_thread(ape_simulation * sim, simulated_being * being_not, loop_fn bf_func, void * data);
void loop_no_thread(simulated_group * group, simulated_being * being_not, loop_fn bf_func, void * data);
void loop_being_no_sim(simulated_being * beings, n_uint number_beings, loop_no_sim_fn bf_func, void * data);
void loop_being(ape_simulation * sim, loop_fn bf_func, n_int beings_per_thread);
void loop_being(simulated_group * group, loop_fn bf_func, n_int beings_per_thread);
n_int being_location_x(simulated_being * value);
n_int being_location_y(simulated_being * value);
......@@ -1003,7 +996,7 @@ typedef void (console_generic)(void *ptr, n_string ape_name, simulated_being * l
typedef void (line_braincode)(n_string pointer, n_int line);
#ifdef BRAINCODE_ON
void command_populate_braincode(ape_simulation * local_sim, line_braincode function);
void command_populate_braincode(simulated_group * group, line_braincode function);
#endif
n_file * death_record_file_ready(void);
......@@ -1023,9 +1016,10 @@ n_int tranfer_in(n_file * input_file);
n_int sim_interpret(n_file * input_file);
void sim_close(void);
n_uint sim_memory_allocated(n_int max);
simulated_timing * sim_timing(void);
simulated_group * sim_group(void);
ape_simulation * sim_sim(void);
n_uint sim_memory_allocated(n_int max);
void sim_flood(void);
......@@ -1068,7 +1062,7 @@ void watch_control(void *ptr, n_string beingname, simulated_being * local_being,
n_int command_speak(void * ptr, n_string response, n_console_output output_function);
n_int command_alphabet(void * ptr, n_string response, n_console_output output_function);
void command_change_selected(ape_simulation * sim, n_byte forwards);
void command_change_selected(simulated_group * group, n_byte forwards);
n_int command_stop(void * ptr, n_string response, n_console_output output_function);
n_int command_idea(void * ptr, n_string response, n_console_output output_function);
......@@ -1077,7 +1071,7 @@ n_int command_braincode(void * ptr, n_string response, n_console_output output_f
n_int command_speech(void * ptr, n_string response, n_console_output output_function);
n_int command_relationship_count(n_int friend_type);
simulated_being * command_relationship_being(ape_simulation * sim, n_int friend_type, n_int location);
simulated_being * command_relationship_being(simulated_group * group, n_int friend_type, n_int location);
n_int command_social_graph(void * ptr, n_string response, n_console_output output_function);
n_int command_genome(void * ptr, n_string response, n_console_output output_function);
......
......@@ -255,6 +255,4 @@ static const simulated_file_entry simulated_file_format[]=
n_int command_executing(void);
void command_change_selected(ape_simulation * sim, n_byte forwards);
#endif /* SIMULATEDAPE_UNIVERSE_INTERNAL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment