Noble Ape
The Central Directories of the Noble Ape Simulation.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Typedefs | Enumerations | Functions
noble.h File Reference

This is the interface between the Noble toolkit and what consumes the Noble Toolkit. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  n_version
struct  n_vect2
struct  n_spacetime
struct  noble_file_entry
struct  noble_console_command
struct  n_join
struct  n_background8
struct  n_color8
struct  n_file
struct  n_file_chain
struct  n_ae_error
struct  n_land
struct  n_brace
struct  n_interpret
struct  n_individual_interpret

Macros

#define SCRIPT_DEBUG   /* Add all the runtime debug */
#define EXECUTE_THREADED
#define SHORT_VERSION_NAME   "Noble Ape 0.699 "
#define FULL_DATE   __DATE__
#define VERSION_NUMBER   699
#define COPYRIGHT_DATE   "Copyright 1996 - 2014 "
#define FULL_VERSION_COPYRIGHT   "Copyright Tom Barbalet, 1996-2014."
#define NOBLE_APE_SIGNATURE   (('N'<< 8) | 'A')
#define NOBLE_WARFARE_SIGNATURE   (('N'<< 8) | 'W')
#define COPYRIGHT_NAME   "Tom Barbalet. "
#define COPYRIGHT_FOLLOW   "All rights reserved."
#define PACKED_DATA_BLOCK   (32*32*32*2)
#define TWO_PI   ((n_double)(6.2831853071795864769252867665590057683943))
#define SINE_MAXIMUM   (26880)
#define STRING_BLOCK_SIZE   (2048)
#define NA_ASSERT(test, message)   /* test message */
#define AUDIO_FFT_MAX_BITS   (15)
#define AUDIO_FFT_MAX_BUFFER   (1<<AUDIO_FFT_MAX_BITS)
#define POPULATED(ch)   ((ch[0] != 0) || (ch[1] != 0) || (ch[2] != 0) || (ch[3] != 0) || (ch[4] != 0) || (ch[5] != 0))
#define FILE_COPYRIGHT   0x00
#define FILE_INCL(num)   ((num) & 0xf0)
#define FILE_KIND(num)   ((num) & 0x0f)
#define FILE_EOF   0x0100
#define ASCII_NUMBER(val)   (((val) >= '0') && ((val) <= '9'))
#define ASCII_LOWERCASE(val)   (((val) >= 'a') && ((val) <= 'z'))
#define ASCII_UPPERCASE(val)   (((val) >= 'A') && ((val) <= 'Z'))
#define FILE_OKAY   0x0000
#define FILE_ERROR   (-1)
#define NEW_SD_MULTIPLE   26880
 sine and cosine conversation
#define BRAINCODE_SIZE   128
#define BRAINCODE_PROBES   (BRAINCODE_SIZE>>3)
#define BRAINCODE_PSPACE_REGISTERS   3
#define BRAINCODE_MAX_FREQUENCY   16
#define BRAINCODE_BYTES_PER_INSTRUCTION   3
#define BRAINCODE_BLOCK_COPY   16
#define BRAINCODE_MAX_ADDRESS   (BRAINCODE_SIZE*2)
#define BRAINCODE_ADDRESS(i)   ((i) % BRAINCODE_MAX_ADDRESS)
#define SHOW_ERROR(val)   (draw_error(val, __FILE__, __LINE__))
#define IO_LOWER_CHAR(value)   if(ASCII_UPPERCASE(value)) (value) += 'a' - 'A'
#define MAP_BITS   (9)
#define MAP_DIMENSION   (1<<(MAP_BITS))
#define MAP_AREA   (1<<(2*MAP_BITS))
#define APESPACE_TO_MAPSPACE(num)   ((num)>>6)
#define HI_RES_MAP_BITS   (MAP_BITS+3)
#define HI_RES_MAP_DIMENSION   (1<<(HI_RES_MAP_BITS))
#define HI_RES_MAP_AREA   (1<<(2*HI_RES_MAP_BITS))
#define APESPACE_TO_HR_MAPSPACE(num)   ((num)>>3)
#define MAPSPACE_TO_APESPACE(num)   ((num)<<6)
#define MAP_APE_RESOLUTION_SIZE   (MAPSPACE_TO_APESPACE(MAP_DIMENSION))
#define APESPACE_BOUNDS   ((MAP_APE_RESOLUTION_SIZE)-1)
#define APESPACE_CONFINED(num)   (n_byte2)((num)>APESPACE_BOUNDS ? APESPACE_BOUNDS : ((num)<0 ? 0 : (num)))
#define APESPACE_WRAP(num)   (n_byte2)((num + APESPACE_BOUNDS)&(APESPACE_BOUNDS-1))
#define LAND_TILE_EDGE   (256)
#define POSITIVE_LAND_COORD(num)   ((num+(3*MAP_DIMENSION))&(MAP_DIMENSION-1))
#define POSITIVE_LAND_COORD_HIRES(num)   ((num+(3*HI_RES_MAP_DIMENSION))&(HI_RES_MAP_DIMENSION-1))
#define NUMBER_LAND_TILES   (MAP_DIMENSION/LAND_TILE_EDGE)
#define WEATHER_TO_MAPSPACE(num)   ((num)*2)
#define LAND_DITHER(x, y, z)   (((x+y+z)&15)-(((x&y)|z)&7)-((x|(y&z))&7))
#define OFFSCREENSIZE   (MAP_AREA + TERRAIN_WINDOW_AREA + GRAPH_WINDOW_AREA)
#define WEATHER_CLOUD   (32768)
#define WEATHER_RAIN   (98304)
#define TIME_HOUR_MINUTES   (60)
#define TIME_DAY_MINUTES   (TIME_HOUR_MINUTES * 24)
#define TIME_MONTH_MINUTES   (TIME_DAY_MINUTES * 28)
#define TIME_YEAR_MINUTES   (TIME_MONTH_MINUTES * 13)
#define TIME_YEAR_DAYS   (7 * 52) /*364 also = 13 * 28 */
#define TIME_CENTURY_DAYS   (TIME_YEAR_DAYS * 100)
#define LUNAR_ORBIT_MINS   39312
#define WATER_TEST(pz, w)   ((pz)<(w))
#define WATER_MAP   128
#define TIDE_AMPLITUDE_LUNAR   8
#define TIDE_AMPLITUDE_SOLAR   2
#define TIDE_MAX   (WATER_MAP + TIDE_AMPLITUDE_LUNAR + TIDE_AMPLITUDE_SOLAR)
#define IS_NIGHT(num)   ((((num)>>5) < (11))||(((num)>>5) > (36)))
#define IS_DAWNDUSK(num)   ((((num)>>5) == (11))||(((num)>>5) == (36)))
#define NIGHT_END_POINT   (256)
#define DAWN_END_POINT   (384)
#define DAY_END_POINT   (1152)
#define DUSK_END_POINT   (1184)
#define MAX_MODIFIED_TIME   (238)
#define NIGHT_TIME_DIVISION(time)   ((time)>>4)
#define DAWN_DUSK_TIME_DIVISION(time)   ((time)>>3)
#define DAY_TIME_DIVISION(time)   ((time)>>2)
#define ASCII_QUOTE(num)   ((num) == '"')
#define ASCII_TEXT(num)   ((ASCII_UPPERCASE(num) || ASCII_LOWERCASE(num)) || ((num) == '_'))
#define ASCII_SEMICOLON(num)   ((num) == ';')
#define ASCII_EQUAL(num)   ((num) == '=')
#define ASCII_BRACKET(num)   (((num) == '(')||((num) == ')'))
#define ASCII_BRACES(num)   (((num) == '{')||((num) == '}'))
#define ASCII_LOGICAL(num)   ((((num) == '&')||((num) == '|'))||(((num) == '^')||((num) == '!')))
#define ASCII_ARITHMETIC(num)   ((((num) == '+')||((num) == '-'))||(((num) == '*')||((num) == '/')))
#define ASCII_DIRECTIONAL(num)   (((num)=='<')||((num)=='>'))
#define CODE_VALUE_REQUIRED(num)   (((num) == APESCRIPT_OPERATOR || (num) == APESCRIPT_NUMBER) || ((num) == APESCRIPT_TEXT))
#define SIZEOF_NUMBER_WRITE   (sizeof(n_int))
#define VARIABLE_INPUT(num, code)   ((num)>((code)->input_greater))
#define VARIABLE_SPECIAL(num, code)   ((num)<((code)->special_less))
#define ABS(a)   (((a) < 0) ? -(a) : (a))
#define NUMBER_MAX   256
#define VARIABLE_MAX   256
#define BRACES_MAX   16
#define SIZE_OF_EVALUATE   (SIZEOF_NUMBER_WRITE+SIZEOF_NUMBER_WRITE+1) /* (tA=XtB) */
#define CYCLE_COUNT_RESET   4096
#define MAIN_NOT_RUN   0
#define MAIN_RUN   1
#define VARIABLE_WIDTH   32
#define SC_DEBUG_STRING(ptr, string)   scdebug_string(ptr, string)
#define SC_DEBUG_NUMBER(ptr, number)   scdebug_int(ptr, number)
#define SC_DEBUG_NEWLINE(ptr)   scdebug_newline(ptr)
#define SC_DEBUG_UP(ptr)   scdebug_tabstep(ptr,1)
#define SC_DEBUG_DOWN(ptr)   scdebug_tabstep(ptr,-1)
#define SC_DEBUG_ON(ptr)   scdebug_writeon(ptr)
#define SC_DEBUG_OFF(ptr)   scdebug_writeoff(ptr)

Typedefs

typedef double n_double
typedef char * n_string
typedef const char * n_constant_string
typedef char n_string_block [STRING_BLOCK_SIZE]
typedef unsigned char n_byte
typedef unsigned short n_byte2
typedef unsigned int n_byte4
typedef int n_c_int
typedef unsigned long n_uint
typedef long n_int
typedef short n_audio
typedef n_stringn_console_input )(n_string value, n_int length)
typedef void( n_console_output )(n_constant_string value)
typedef n_byten_pixel )(n_int px, n_int py, n_int dx, n_int dy, void *information)
typedef n_intn_memory_location )(n_int px, n_int py)
typedef n_byte2n_patch )(n_byte2 *local)
typedef n_intn_console )(void *ptr, n_string response, n_console_output output_function)
typedef n_intn_file_in )(n_byte *buff, n_uint len)
typedef n_byte *( n_file_out )(n_uint *len)
typedef void( n_file_specific )(n_string string, n_byte *reference)
typedef n_intexecute_function )(void *general_data, void *read_data, void *write_data)
typedef n_intscript_input )(void *individual, n_byte kind, n_int value)
typedef n_intscript_output )(void *code, void *individual, n_byte *kind, n_int *number)
typedef void( script_external )(void *individual, void *structure, void *data)
typedef n_byte variable_string [VARIABLE_WIDTH]

Enumerations

enum  file_element_type {
  FILE_TYPE_BYTE = 0x01, FILE_TYPE_BYTE2 = 0x02, FILE_TYPE_BYTE_EXT = 0x03, FILE_TYPE_PACKED = 0x05,
  FILE_TYPE_BYTE4 = 0x06
}
enum  window_num { NUM_VIEW = (0), NUM_TERRAIN = (1), NUM_GRAPH = (2) }
enum  braincode_locations { BRAINCODE_EXTERNAL = 0, BRAINCODE_INTERNAL }
enum  BRAINCODE_COMMANDS {
  BRAINCODE_DAT0 = 0, BRAINCODE_DAT1, BRAINCODE_ADD, BRAINCODE_SUB,
  BRAINCODE_MUL, BRAINCODE_DIV, BRAINCODE_MOD, BRAINCODE_MVB,
  BRAINCODE_MOV, BRAINCODE_JMP, BRAINCODE_CTR, BRAINCODE_SWP,
  BRAINCODE_INV, BRAINCODE_STP, BRAINCODE_LTP, BRAINCODE_JMZ,
  BRAINCODE_JMN, BRAINCODE_DJN, BRAINCODE_AND, BRAINCODE_OR,
  BRAINCODE_SEQ, BRAINCODE_SNE, BRAINCODE_SLT, BRAINCODE_SEN,
  BRAINCODE_SEN2, BRAINCODE_SEN3, BRAINCODE_ACT, BRAINCODE_ACT2,
  BRAINCODE_ACT3, BRAINCODE_ANE, BRAINCODE_INSTRUCTIONS
}
enum  graph_commands {
  GC_CLEAR_BRAINCODE = -1, GC_IDEOSPHERE = 0, GC_BRAINCODE, GC_GENEPOOL,
  GC_HONOR, GC_PATHOGENS, GC_RELATIONSHIPS, GC_PREFERENCES,
  GC_PHASESPACE, GC_SOCIALSIM, GC_MEET_PLACES, GC_VASCULAR
}
enum  weather_values {
  WEATHER_SEVEN_ERROR = -1, WEATHER_SEVEN_SUNNY_DAY = 0, WEATHER_SEVEN_CLOUDY_DAY = 1, WEATHER_SEVEN_RAINY_DAY = 2,
  WEATHER_SEVEN_CLEAR_NIGHT = 3, WEATHER_SEVEN_CLOUDY_NIGHT = 4, WEATHER_SEVEN_RAINY_NIGHT = 5, WEATHER_SEVEN_DAWN_DUSK = 6
}
enum  window_information {
  TERRAIN_WINDOW_WIDTH = (2048), TERRAIN_WINDOW_HEIGHT = (1536), TERRAIN_WINDOW_AREA = (TERRAIN_WINDOW_WIDTH * TERRAIN_WINDOW_HEIGHT), GRAPH_WINDOW_WIDTH_BITS = 9,
  GRAPH_WINDOW_WIDTH = (1<<GRAPH_WINDOW_WIDTH_BITS), GRAPH_WINDOW_HEIGHT = (512), GRAPH_WINDOW_AREA = (GRAPH_WINDOW_WIDTH * GRAPH_WINDOW_HEIGHT * 3)
}
enum  KIND_OF_USE { KIND_LOAD_FILE = 0, KIND_NEW_SIMULATION, KIND_START_UP, KIND_MEMORY_SETUP }
enum  AE_ENUM {
  AE_NO_ERROR = -1, AE_UNKNOWN_ERROR, AE_NUMBER_EXPECTED, AE_NUMBER_OUT_OF_RANGE,
  AE_MAXIMUM_NUMBERS_REACHED, AE_MAXIMUM_SCRIPT_SIZE_REACHED, AE_MAXIMUM_VARIABLES_REACHED, AE_UNKNOWN_SYNTAX_PARSER_BUFFER,
  AE_UNKNOWN_SYNTAX_PARSER_CONVERT, AE_SELECTED_ENTITY_OUT_OF_RANGE, AE_COORDINATES_OUT_OF_RANGE, AE_VALUE_OUT_OF_RANGE,
  AE_TOO_MANY_CLOSE_BRACES, AE_MAXIMUM_BRACES_REACHED, AE_FIRST_VALUE_FAILED, AE_SECOND_VALUE_FAILED,
  AE_UNKNOWN_SYNTAX_MISSING_EQUALS, AE_UNKNOWN_SYNTAX_NO_COMMAND, AE_WRONG_END, AE_LINE_START_INCORRECT,
  AE_OUTPUT_SET_AS_INPUT_VARIABLE, AE_IF_WHILE_NOT_FOLLOWED_BY_BRACKET, AE_FUNCTION_ISNT_VARIABLE, AE_NON_FUNCTION_APPLIED,
  AE_FUNCTION_DEFINED_PRIOR, AE_FUNCTION_OUT_OF_RANGE, AE_WITHOUT_SEMICOLON, AE_WITHOUT_OPEN_BRACE,
  AE_FUNCTION_SETTING_FAILED, AE_ERROR_STARTING_MAIN, AE_CODE_AFTER_MAIN, AE_NO_CLOSE_BRACE_TO_END_OF_FILE,
  AE_CODE_OUTSIDE_FUNCTION, AE_INPUT_VARIABLE_WITHOUT_EQUALS, AE_ASSIGN_VALUE_FAILED, AE_UNKNOWN_SYNTAX_FROM_INTERPRET,
  AE_NO_MAIN_CODE, AE_NUMBER_ERRORS
}
enum  PRIMARY_APESCRIPT { VARIABLE_FUNCTION = 0, VARIABLE_RUN, VARIABLE_WHILE, VARIABLE_IF }
enum  SYNTAX_APESCRIPT {
  SYNTAX_MINUS = 0, SYNTAX_ADDITION, SYNTAX_MULTIPLY, SYNTAX_AND,
  SYNTAX_XOR, SYNTAX_OR, SYNTAX_GREATER_THAN, SYNTAX_LESS_THAN,
  SYNTAX_EQUAL_TO, SYNTAX_NOT_EQUAL_TO, SYNTAX_CONDITIONAL_AND, SYNTAX_CONDITIONAL_OR,
  SYNTAX_DIVISION, SYNTAX_MODULUS, SYNTAX_BITSHIFT_RIGHT, SYNTAX_BITSHIFT_LEFT,
  SYNTAX_LESS_EQUAL, SYNTAX_GREATER_EQUAL, SYNTAX_EQUALS
}
enum  SYNTAX_ADDITIONAL_BRAINCODE { SYNTAX_MOVE = SYNTAX_EQUALS + 1, SYNTAX_JUMP_TO, SYNTAX_JUMP_EQUAL_ZERO, SYNTAX_DATA }
enum  APESCRIPT_INTERPRET_TYPES {
  APESCRIPT_OPEN_BRACKET = ('('), APESCRIPT_CLOSE_BRACKET = (')'), APESCRIPT_OPEN_BRACE = ('{'), APESCRIPT_CLOSE_BRACE = ('}'),
  APESCRIPT_OPERATOR = ('='), APESCRIPT_NUMBER = ('n'), APESCRIPT_TEXT = ('t'), APESCRIPT_SEMICOLON = (';'),
  APESCRIPT_FAILURE = ('F'), APESCRIPT_FUNCTION = ('f'), APESCRIPT_RUN = ('r'), APESCRIPT_STRING = ('"')
}

Functions

void audio_fft (n_byte inverse, n_uint power_sample)
void audio_clear_buffers (n_uint length)
void audio_clear_output (n_audio *audio, n_uint length)
void audio_equal_output (n_audio *audio, n_uint length)
void audio_multiply_output (n_audio *audio, n_uint length)
void audio_set_frequency (n_uint entry, n_uint value)
n_int draw_error (n_constant_string error_text, n_constant_string location, n_int line_number)
void execute_add (execute_function function, void *general_data, void *read_data, void *write_data)
void execute_group (execute_function *function, void *general_data, void *read_data, n_int count, n_int size)
void execute_init (void)
void execute_close (void)
void execute_complete_added (void)
void execute_threads (n_int value)
n_int execute_threads_value (void)
n_int execute_toggle (n_int toggle)
void vect2_byte2 (n_vect2 *converter, n_byte2 *input)
void vect2_add (n_vect2 *equals, n_vect2 *initial, n_vect2 *second)
void vect2_center (n_vect2 *center, n_vect2 *initial, n_vect2 *second)
void vect2_subtract (n_vect2 *equals, n_vect2 *initial, n_vect2 *second)
void vect2_multiplier (n_vect2 *equals, n_vect2 *initial, n_vect2 *second, n_int multiplier, n_int divisor)
void vect2_d (n_vect2 *initial, n_vect2 *second, n_int multiplier, n_int divisor)
n_int vect2_dot (n_vect2 *initial, n_vect2 *second, n_int multiplier, n_int divisor)
void vect2_rotate90 (n_vect2 *rotation)
void vect2_direction (n_vect2 *initial, n_int direction, n_int divisor)
void vect2_offset (n_vect2 *initial, n_int dx, n_int dy)
void vect2_back_byte2 (n_vect2 *converter, n_byte2 *output)
void vect2_copy (n_vect2 *to, n_vect2 *from)
void vect2_populate (n_vect2 *value, n_int x, n_int y)
void vect2_rotation (n_vect2 *location, n_vect2 *rotation)
n_int vect2_nonzero (n_vect2 *nonzero)
n_vect2vect2_min_max_init (void)
void vect2_min_max (n_vect2 *points, n_int number, n_vect2 *maxmin)
n_bytemath_general_allocation (n_byte *bc0, n_byte *bc1, n_int i)
void math_general_execution (n_int instruction, n_int is_constant0, n_int is_constant1, n_byte *addr0, n_byte *addr1, n_int value0, n_int *i, n_int is_const0, n_int is_const1, n_byte *pspace, n_byte **maddr0, n_byte **maddr1, n_byte *bc0, n_byte *bc1, n_int braincode_min_loop)
n_byte4 math_hash_fnv1 (n_constant_string key)
n_uint math_hash (n_byte *values, n_uint length)
void math_bilinear_8_times (n_byte *side512, n_byte *data, n_byte double_spread)
n_uint math_root (n_uint squ)
n_byte math_turn_towards (n_vect2 *p, n_byte fac, n_byte turn)
n_byte2 math_random (n_byte2 *local)
void math_random3 (n_byte2 *local)
n_byte math_join (n_int sx, n_int sy, n_int dx, n_int dy, n_join *draw)
n_int math_spread_byte (n_byte val)
void math_pack (n_int size, n_byte value, n_byte *alloc1, n_byte *alloc2)
n_int math_memory_location (n_int px, n_int py)
void math_patch (n_byte *local_map, n_memory_location *mem_func, n_patch *func, n_byte2 *arg, n_int refine)
void math_round (n_byte *local_map, n_byte *scratch, n_memory_location *mem_func)
void math_round_smarter (n_byte *local_map, n_byte *scratch, n_memory_location *mem_func)
n_int math_sine (n_int direction, n_int divisor)
n_byte math_join_vect2 (n_int sx, n_int sy, n_vect2 *vect, n_join *draw)
n_byte math_line_vect (n_vect2 *point1, n_vect2 *point2, n_join *draw)
n_byte math_line (n_int x1, n_int y1, n_int x2, n_int y2, n_join *draw)
void io_entry_execution (n_int argc, n_string *argv)
void io_command_line_execution_set (void)
n_int io_command_line_execution (void)
void io_lower (n_string value, n_int length)
void io_whitespace (n_file *input)
void io_audit_file (const noble_file_entry *format, n_byte section_to_audit)
void io_search_file_format (const noble_file_entry *format, n_string compare)
void io_string_write (n_string dest, n_string insert, n_int *pos)
n_int io_read_bin (n_file *fil, n_byte *local_byte)
n_int io_file_write (n_file *fil, n_byte byte)
void io_file_reused (n_file *fil)
n_int io_write (n_file *fil, n_constant_string ch, n_byte new_line)
n_int io_writenumber (n_file *fil, n_int loc_val, n_uint numer, n_uint denom)
n_int io_length (n_string value, n_int max)
n_int io_find (n_string check, n_int from, n_int max, n_string value_find, n_int value_find_length)
n_int io_read_buff (n_file *fil, n_byte *data, const noble_file_entry *commands)
n_int io_write_buff (n_file *fil, void *data, const noble_file_entry *commands, n_byte command_num, n_file_specific *func)
n_int io_write_csv (n_file *fil, n_byte *data, const noble_file_entry *commands, n_byte command_num, n_byte initial)
void io_copy (n_byte *from, n_byte *to, n_uint number)
void * io_new (n_uint bytes)
void io_free (void **ptr)
void * io_new_range (n_uint memory_min, n_uint *memory_allocated)
n_fileio_file_new (void)
void io_file_free (n_file **file)
n_int io_number (n_string number_string, n_int *actual_value, n_int *decimal_divisor)
void audio_aiff_header (void *fptr, n_uint total_samples)
void audio_aiff_body (void *fptr, n_audio *samples, n_uint number_samples)
n_int io_quit (void *ptr, n_string response, n_console_output output_function)
n_int io_help (void *ptr, n_string response, n_console_output output_function)
n_string io_console_entry_clean (n_string string, n_int length)
n_string io_console_entry (n_string string, n_int length)
void io_console_out (n_constant_string value)
n_int io_console (void *ptr, noble_console_command *commands, n_console_input input_function, n_console_output output_function)
void io_erase (n_byte *buf_offscr, n_uint nestop)
n_int io_disk_read (n_file *local_file, n_string file_name)
n_int io_disk_write (n_file *local_file, n_string file_name)
n_int io_disk_check (n_constant_string file_name)
n_stringio_tab_delimit_to_n_string_ptr (n_file *tab_file, n_int *size_value, n_int *row_value)
void io_three_string_combination (n_string output, n_string first, n_string second, n_string third, n_int count)
void io_time_to_string (n_string value, n_int minutes, n_int days)
n_int io_read_byte4 (n_file *fil, n_uint *actual_value, n_byte *final_char)
n_int io_writenum (n_file *fil, n_int loc_val, n_byte ekind, n_byte new_line)
n_int io_command (n_file *fil, const noble_file_entry *commands)
n_int io_read_data (n_file *fil, n_byte2 command, n_byte *data_read)
void io_help_line (noble_console_command *specific, n_console_output output_function)
void io_console_quit (void)
void io_output_contents (n_file *file)
n_fileio_file_ready (n_int entry, n_file *file)
void io_file_cleanup (n_int *entry, n_file **file)
void io_file_writeon (n_int *entry, n_file **file, n_byte blocked_write)
void io_file_writeoff (n_int *entry, n_file *file)
void io_file_string (n_int entry, n_file *file, n_constant_string string)
void io_offset (n_byte *start, n_byte *point, n_string text)
n_int io_find_size_data (noble_file_entry *commands)
void compress_compress (n_file *input, n_file *output)
void compress_expand (n_file *input, n_file *output)
void weather_init (n_land *local_land)
void weather_wind_vector (n_land *local_land, n_vect2 *pos, n_vect2 *wind)
n_int weather_pressure (n_land *local_land, n_int px, n_int py)
void weather_cycle (n_land *local_land)
weather_values weather_seven_values (n_land *local_land, n_int px, n_int py)
void land_init (n_land *local_land, n_byte *scratch, n_byte double_spread)
void land_clear (n_land *local, KIND_OF_USE kind, n_byte4 start)
void land_cycle (n_land *local_land)
void land_vect2 (n_vect2 *output, n_int *actual_z, n_land *local, n_vect2 *location)
n_int land_operator_interpolated (n_land *local_land, n_int locx, n_int locy, n_byte *kind)
n_int land_map_dimension (n_land *land)
n_int land_map_bits (n_land *land)
void land_tide (n_land *local_land)
n_int land_location (n_land *land, n_int px, n_int py)
void io_int_to_bytes (n_int value, n_byte *bytes)
n_int io_bytes_to_int (n_byte *bytes)
n_int io_apescript_error (void *ptr, AE_ENUM value)
n_interpretparse_convert (n_file *input, n_int main_entry, variable_string *variables)
void interpret_individual (n_individual_interpret *individual)
void interpret_cleanup (n_interpret **to_clean)
n_int interpret_cycle (n_interpret *code, n_individual_interpret *individual, n_int exit_offset, void *structure, void *data, script_external *start, script_external *end)
n_filescdebug_file_ready (void)
void scdebug_file_cleanup (void)
void scdebug_string (void *ptr, n_constant_string string)
void scdebug_int (void *ptr, n_int number)
void scdebug_newline (void *ptr)
void scdebug_tabstep (void *ptr, n_int steps)
n_string scdebug_variable (n_int variable)
void scdebug_writeon (void *ptr)
void scdebug_writeoff (void *ptr)
n_int spacetime_after (n_spacetime *initial, n_spacetime *second)
void spacetime_copy (n_spacetime *to, n_spacetime *from)
n_int spacetime_before_now (n_spacetime *initial, n_land *now)
void spacetime_set (n_spacetime *set, n_land *local, n_byte2 *location)

Detailed Description

This is the interface between the Noble toolkit and what consumes the Noble Toolkit.

Definition in file noble.h.


Macro Definition Documentation

#define ABS (   a)    (((a) < 0) ? -(a) : (a))

Definition at line 947 of file noble.h.

#define APESPACE_BOUNDS   ((MAP_APE_RESOLUTION_SIZE)-1)

Definition at line 757 of file noble.h.

#define APESPACE_CONFINED (   num)    (n_byte2)((num)>APESPACE_BOUNDS ? APESPACE_BOUNDS : ((num)<0 ? 0 : (num)))

Definition at line 759 of file noble.h.

#define APESPACE_TO_HR_MAPSPACE (   num)    ((num)>>3)

Definition at line 752 of file noble.h.

#define APESPACE_TO_MAPSPACE (   num)    ((num)>>6)

Definition at line 745 of file noble.h.

#define APESPACE_WRAP (   num)    (n_byte2)((num + APESPACE_BOUNDS)&(APESPACE_BOUNDS-1))

Definition at line 760 of file noble.h.

#define ASCII_ARITHMETIC (   num)    ((((num) == '+')||((num) == '-'))||(((num) == '*')||((num) == '/')))

Definition at line 932 of file noble.h.

#define ASCII_BRACES (   num)    (((num) == '{')||((num) == '}'))

Definition at line 929 of file noble.h.

#define ASCII_BRACKET (   num)    (((num) == '(')||((num) == ')'))

Definition at line 928 of file noble.h.

#define ASCII_DIRECTIONAL (   num)    (((num)=='<')||((num)=='>'))

Definition at line 934 of file noble.h.

#define ASCII_EQUAL (   num)    ((num) == '=')

Definition at line 926 of file noble.h.

#define ASCII_LOGICAL (   num)    ((((num) == '&')||((num) == '|'))||(((num) == '^')||((num) == '!')))

Definition at line 931 of file noble.h.

#define ASCII_LOWERCASE (   val)    (((val) >= 'a') && ((val) <= 'z'))

Definition at line 237 of file noble.h.

#define ASCII_NUMBER (   val)    (((val) >= '0') && ((val) <= '9'))

Definition at line 236 of file noble.h.

#define ASCII_QUOTE (   num)    ((num) == '"')

Definition at line 920 of file noble.h.

#define ASCII_SEMICOLON (   num)    ((num) == ';')

Definition at line 924 of file noble.h.

#define ASCII_TEXT (   num)    ((ASCII_UPPERCASE(num) || ASCII_LOWERCASE(num)) || ((num) == '_'))

Definition at line 922 of file noble.h.

#define ASCII_UPPERCASE (   val)    (((val) >= 'A') && ((val) <= 'Z'))

Definition at line 238 of file noble.h.

#define AUDIO_FFT_MAX_BITS   (15)

Definition at line 151 of file noble.h.

#define AUDIO_FFT_MAX_BUFFER   (1<<AUDIO_FFT_MAX_BITS)

Definition at line 152 of file noble.h.

#define BRACES_MAX   16

Definition at line 953 of file noble.h.

#define BRAINCODE_ADDRESS (   i)    ((i) % BRAINCODE_MAX_ADDRESS)

Definition at line 355 of file noble.h.

#define BRAINCODE_BLOCK_COPY   16

Definition at line 352 of file noble.h.

#define BRAINCODE_BYTES_PER_INSTRUCTION   3

Definition at line 349 of file noble.h.

#define BRAINCODE_MAX_ADDRESS   (BRAINCODE_SIZE*2)

Definition at line 354 of file noble.h.

#define BRAINCODE_MAX_FREQUENCY   16

Definition at line 346 of file noble.h.

#define BRAINCODE_PROBES   (BRAINCODE_SIZE>>3)

Definition at line 342 of file noble.h.

#define BRAINCODE_PSPACE_REGISTERS   3

Definition at line 344 of file noble.h.

#define BRAINCODE_SIZE   128

Definition at line 339 of file noble.h.

#define CODE_VALUE_REQUIRED (   num)    (((num) == APESCRIPT_OPERATOR || (num) == APESCRIPT_NUMBER) || ((num) == APESCRIPT_TEXT))

Definition at line 936 of file noble.h.

#define COPYRIGHT_DATE   "Copyright 1996 - 2014 "

Definition at line 77 of file noble.h.

#define COPYRIGHT_FOLLOW   "All rights reserved."

Definition at line 86 of file noble.h.

#define COPYRIGHT_NAME   "Tom Barbalet. "

Definition at line 85 of file noble.h.

#define CYCLE_COUNT_RESET   4096

Definition at line 956 of file noble.h.

#define DAWN_DUSK_TIME_DIVISION (   time)    ((time)>>3)

Definition at line 813 of file noble.h.

#define DAWN_END_POINT   (384)

Definition at line 806 of file noble.h.

#define DAY_END_POINT   (1152)

Definition at line 807 of file noble.h.

#define DAY_TIME_DIVISION (   time)    ((time)>>2)

Definition at line 814 of file noble.h.

#define DUSK_END_POINT   (1184)

Definition at line 808 of file noble.h.

#define EXECUTE_THREADED

Definition at line 56 of file noble.h.

#define FILE_COPYRIGHT   0x00

Definition at line 220 of file noble.h.

#define FILE_EOF   0x0100

Definition at line 234 of file noble.h.

#define FILE_ERROR   (-1)

Definition at line 241 of file noble.h.

#define FILE_INCL (   num)    ((num) & 0xf0)

Definition at line 231 of file noble.h.

#define FILE_KIND (   num)    ((num) & 0x0f)

Definition at line 232 of file noble.h.

#define FILE_OKAY   0x0000

Definition at line 240 of file noble.h.

#define FULL_DATE   __DATE__

Definition at line 73 of file noble.h.

#define FULL_VERSION_COPYRIGHT   "Copyright Tom Barbalet, 1996-2014."

Definition at line 79 of file noble.h.

#define HI_RES_MAP_AREA   (1<<(2*HI_RES_MAP_BITS))

Definition at line 750 of file noble.h.

#define HI_RES_MAP_BITS   (MAP_BITS+3)

Definition at line 747 of file noble.h.

#define HI_RES_MAP_DIMENSION   (1<<(HI_RES_MAP_BITS))

Definition at line 749 of file noble.h.

#define IO_LOWER_CHAR (   value)    if(ASCII_UPPERCASE(value)) (value) += 'a' - 'A'

Definition at line 573 of file noble.h.

#define IS_DAWNDUSK (   num)    ((((num)>>5) == (11))||(((num)>>5) == (36)))

Definition at line 803 of file noble.h.

#define IS_NIGHT (   num)    ((((num)>>5) < (11))||(((num)>>5) > (36)))

Definition at line 802 of file noble.h.

#define LAND_DITHER (   x,
  y,
 
)    (((x+y+z)&15)-(((x&y)|z)&7)-((x|(y&z))&7))

Definition at line 768 of file noble.h.

#define LAND_TILE_EDGE   (256)

Definition at line 762 of file noble.h.

#define LUNAR_ORBIT_MINS   39312

Definition at line 790 of file noble.h.

#define MAIN_NOT_RUN   0

Definition at line 958 of file noble.h.

#define MAIN_RUN   1

Definition at line 959 of file noble.h.

#define MAP_APE_RESOLUTION_SIZE   (MAPSPACE_TO_APESPACE(MAP_DIMENSION))

Definition at line 756 of file noble.h.

#define MAP_AREA   (1<<(2*MAP_BITS))

Definition at line 743 of file noble.h.

#define MAP_BITS   (9)

Definition at line 738 of file noble.h.

#define MAP_DIMENSION   (1<<(MAP_BITS))

Definition at line 742 of file noble.h.

#define MAPSPACE_TO_APESPACE (   num)    ((num)<<6)

Definition at line 754 of file noble.h.

#define MAX_MODIFIED_TIME   (238)

Definition at line 810 of file noble.h.

#define NA_ASSERT (   test,
  message 
)    /* test message */

Definition at line 147 of file noble.h.

#define NEW_SD_MULTIPLE   26880

sine and cosine conversation

Definition at line 327 of file noble.h.

#define NIGHT_END_POINT   (256)

Definition at line 805 of file noble.h.

#define NIGHT_TIME_DIVISION (   time)    ((time)>>4)

Definition at line 812 of file noble.h.

#define NOBLE_APE_SIGNATURE   (('N'<< 8) | 'A')

Definition at line 82 of file noble.h.

#define NOBLE_WARFARE_SIGNATURE   (('N'<< 8) | 'W')

Definition at line 83 of file noble.h.

#define NUMBER_LAND_TILES   (MAP_DIMENSION/LAND_TILE_EDGE)

Definition at line 765 of file noble.h.

#define NUMBER_MAX   256

Definition at line 950 of file noble.h.

#define OFFSCREENSIZE   (MAP_AREA + TERRAIN_WINDOW_AREA + GRAPH_WINDOW_AREA)

Definition at line 776 of file noble.h.

#define PACKED_DATA_BLOCK   (32*32*32*2)

Definition at line 88 of file noble.h.

#define POPULATED (   ch)    ((ch[0] != 0) || (ch[1] != 0) || (ch[2] != 0) || (ch[3] != 0) || (ch[4] != 0) || (ch[5] != 0))

Definition at line 216 of file noble.h.

#define POSITIVE_LAND_COORD (   num)    ((num+(3*MAP_DIMENSION))&(MAP_DIMENSION-1))

Definition at line 763 of file noble.h.

#define POSITIVE_LAND_COORD_HIRES (   num)    ((num+(3*HI_RES_MAP_DIMENSION))&(HI_RES_MAP_DIMENSION-1))

Definition at line 764 of file noble.h.

#define SC_DEBUG_DOWN (   ptr)    scdebug_tabstep(ptr,-1)

Definition at line 1064 of file noble.h.

#define SC_DEBUG_NEWLINE (   ptr)    scdebug_newline(ptr)

Definition at line 1062 of file noble.h.

#define SC_DEBUG_NUMBER (   ptr,
  number 
)    scdebug_int(ptr, number)

Definition at line 1061 of file noble.h.

#define SC_DEBUG_OFF (   ptr)    scdebug_writeoff(ptr)

Definition at line 1066 of file noble.h.

#define SC_DEBUG_ON (   ptr)    scdebug_writeon(ptr)

Definition at line 1065 of file noble.h.

#define SC_DEBUG_STRING (   ptr,
  string 
)    scdebug_string(ptr, string)

Definition at line 1060 of file noble.h.

#define SC_DEBUG_UP (   ptr)    scdebug_tabstep(ptr,1)

Definition at line 1063 of file noble.h.

#define SCRIPT_DEBUG   /* Add all the runtime debug */

Definition at line 45 of file noble.h.

#define SHORT_VERSION_NAME   "Noble Ape 0.699 "

Definition at line 72 of file noble.h.

#define SHOW_ERROR (   val)    (draw_error(val, __FILE__, __LINE__))

Definition at line 571 of file noble.h.

#define SINE_MAXIMUM   (26880)

Definition at line 94 of file noble.h.

#define SIZE_OF_EVALUATE   (SIZEOF_NUMBER_WRITE+SIZEOF_NUMBER_WRITE+1) /* (tA=XtB) */

Definition at line 954 of file noble.h.

#define SIZEOF_NUMBER_WRITE   (sizeof(n_int))

Definition at line 938 of file noble.h.

#define STRING_BLOCK_SIZE   (2048)

Definition at line 102 of file noble.h.

#define TIDE_AMPLITUDE_LUNAR   8

Definition at line 796 of file noble.h.

#define TIDE_AMPLITUDE_SOLAR   2

Definition at line 797 of file noble.h.

Definition at line 799 of file noble.h.

#define TIME_CENTURY_DAYS   (TIME_YEAR_DAYS * 100)

Definition at line 788 of file noble.h.

#define TIME_DAY_MINUTES   (TIME_HOUR_MINUTES * 24)

Definition at line 784 of file noble.h.

#define TIME_HOUR_MINUTES   (60)

Definition at line 783 of file noble.h.

#define TIME_MONTH_MINUTES   (TIME_DAY_MINUTES * 28)

Definition at line 785 of file noble.h.

#define TIME_YEAR_DAYS   (7 * 52) /*364 also = 13 * 28 */

Definition at line 787 of file noble.h.

#define TIME_YEAR_MINUTES   (TIME_MONTH_MINUTES * 13)

Definition at line 786 of file noble.h.

#define TWO_PI   ((n_double)(6.2831853071795864769252867665590057683943))

Definition at line 92 of file noble.h.

#define VARIABLE_INPUT (   num,
  code 
)    ((num)>((code)->input_greater))

Definition at line 943 of file noble.h.

#define VARIABLE_MAX   256

Definition at line 951 of file noble.h.

#define VARIABLE_SPECIAL (   num,
  code 
)    ((num)<((code)->special_less))

Definition at line 944 of file noble.h.

#define VARIABLE_WIDTH   32

Definition at line 984 of file noble.h.

#define VERSION_NUMBER   699

Definition at line 76 of file noble.h.

#define WATER_MAP   128

Definition at line 794 of file noble.h.

#define WATER_TEST (   pz,
 
)    ((pz)<(w))

Definition at line 792 of file noble.h.

#define WEATHER_CLOUD   (32768)

Definition at line 780 of file noble.h.

#define WEATHER_RAIN   (98304)

Definition at line 781 of file noble.h.

#define WEATHER_TO_MAPSPACE (   num)    ((num)*2)

Definition at line 766 of file noble.h.


Typedef Documentation

typedef n_int( execute_function)(void *general_data, void *read_data, void *write_data)

Definition at line 576 of file noble.h.

typedef short n_audio

Definition at line 136 of file noble.h.

This is a single byte data unit.

Definition at line 108 of file noble.h.

This is a two byte data unit. There is no expectations on the byte ordering.

Definition at line 112 of file noble.h.

typedef unsigned int n_byte4

Definition at line 114 of file noble.h.

typedef int n_c_int

Definition at line 115 of file noble.h.

typedef n_int( n_console)(void *ptr, n_string response, n_console_output output_function)

Definition at line 253 of file noble.h.

typedef n_string( n_console_input)(n_string value, n_int length)

Definition at line 243 of file noble.h.

typedef void( n_console_output)(n_constant_string value)

Definition at line 245 of file noble.h.

typedef const char* n_constant_string

Definition at line 100 of file noble.h.

typedef double n_double

Definition at line 90 of file noble.h.

typedef n_int( n_file_in)(n_byte *buff, n_uint len)

Definition at line 255 of file noble.h.

typedef n_byte*( n_file_out)(n_uint *len)

Definition at line 257 of file noble.h.

typedef void( n_file_specific)(n_string string, n_byte *reference)

Definition at line 316 of file noble.h.

This is the native integer data unit. It can be whatever length is specified by the implementation.

Definition at line 127 of file noble.h.

typedef n_int( n_memory_location)(n_int px, n_int py)

Definition at line 249 of file noble.h.

typedef n_byte2( n_patch)(n_byte2 *local)

Definition at line 251 of file noble.h.

typedef n_byte( n_pixel)(n_int px, n_int py, n_int dx, n_int dy, void *information)

Definition at line 247 of file noble.h.

This is the string format for the Noble Ape development

Definition at line 98 of file noble.h.

typedef char n_string_block[STRING_BLOCK_SIZE]

Definition at line 104 of file noble.h.

This is a four byte data unit. Please note that this form may be shown as unsigned int on some 64-bit implementations.

Definition at line 122 of file noble.h.

typedef void( script_external)(void *individual, void *structure, void *data)

Definition at line 982 of file noble.h.

typedef n_int( script_input)(void *individual, n_byte kind, n_int value)

Definition at line 970 of file noble.h.

typedef n_int( script_output)(void *code, void *individual, n_byte *kind, n_int *number)

Definition at line 980 of file noble.h.

typedef n_byte variable_string[VARIABLE_WIDTH]

Definition at line 986 of file noble.h.


Enumeration Type Documentation

enum AE_ENUM
Enumerator:
AE_NO_ERROR 
AE_UNKNOWN_ERROR 
AE_NUMBER_EXPECTED 
AE_NUMBER_OUT_OF_RANGE 
AE_MAXIMUM_NUMBERS_REACHED 
AE_MAXIMUM_SCRIPT_SIZE_REACHED 
AE_MAXIMUM_VARIABLES_REACHED 
AE_UNKNOWN_SYNTAX_PARSER_BUFFER 
AE_UNKNOWN_SYNTAX_PARSER_CONVERT 
AE_SELECTED_ENTITY_OUT_OF_RANGE 
AE_COORDINATES_OUT_OF_RANGE 
AE_VALUE_OUT_OF_RANGE 
AE_TOO_MANY_CLOSE_BRACES 
AE_MAXIMUM_BRACES_REACHED 
AE_FIRST_VALUE_FAILED 
AE_SECOND_VALUE_FAILED 
AE_UNKNOWN_SYNTAX_MISSING_EQUALS 
AE_UNKNOWN_SYNTAX_NO_COMMAND 
AE_WRONG_END 
AE_LINE_START_INCORRECT 
AE_OUTPUT_SET_AS_INPUT_VARIABLE 
AE_IF_WHILE_NOT_FOLLOWED_BY_BRACKET 
AE_FUNCTION_ISNT_VARIABLE 
AE_NON_FUNCTION_APPLIED 
AE_FUNCTION_DEFINED_PRIOR 
AE_FUNCTION_OUT_OF_RANGE 
AE_WITHOUT_SEMICOLON 
AE_WITHOUT_OPEN_BRACE 
AE_FUNCTION_SETTING_FAILED 
AE_ERROR_STARTING_MAIN 
AE_CODE_AFTER_MAIN 
AE_NO_CLOSE_BRACE_TO_END_OF_FILE 
AE_CODE_OUTSIDE_FUNCTION 
AE_INPUT_VARIABLE_WITHOUT_EQUALS 
AE_ASSIGN_VALUE_FAILED 
AE_UNKNOWN_SYNTAX_FROM_INTERPRET 
AE_NO_MAIN_CODE 
AE_NUMBER_ERRORS 

Definition at line 464 of file noble.h.

Enumerator:
APESCRIPT_OPEN_BRACKET 
APESCRIPT_CLOSE_BRACKET 
APESCRIPT_OPEN_BRACE 
APESCRIPT_CLOSE_BRACE 
APESCRIPT_OPERATOR 
APESCRIPT_NUMBER 
APESCRIPT_TEXT 
APESCRIPT_SEMICOLON 
APESCRIPT_FAILURE 
APESCRIPT_FUNCTION 
APESCRIPT_RUN 
APESCRIPT_STRING 

Definition at line 904 of file noble.h.

Enumerator:
BRAINCODE_DAT0 
BRAINCODE_DAT1 
BRAINCODE_ADD 
BRAINCODE_SUB 
BRAINCODE_MUL 
BRAINCODE_DIV 
BRAINCODE_MOD 
BRAINCODE_MVB 
BRAINCODE_MOV 
BRAINCODE_JMP 
BRAINCODE_CTR 
BRAINCODE_SWP 
BRAINCODE_INV 
BRAINCODE_STP 
BRAINCODE_LTP 
BRAINCODE_JMZ 
BRAINCODE_JMN 
BRAINCODE_DJN 
BRAINCODE_AND 
BRAINCODE_OR 
BRAINCODE_SEQ 
BRAINCODE_SNE 
BRAINCODE_SLT 
BRAINCODE_SEN 
BRAINCODE_SEN2 
BRAINCODE_SEN3 
BRAINCODE_ACT 
BRAINCODE_ACT2 
BRAINCODE_ACT3 
BRAINCODE_ANE 
BRAINCODE_INSTRUCTIONS 

Definition at line 365 of file noble.h.

Enumerator:
BRAINCODE_EXTERNAL 
BRAINCODE_INTERNAL 

Definition at line 357 of file noble.h.

Enumerator:
FILE_TYPE_BYTE 
FILE_TYPE_BYTE2 
FILE_TYPE_BYTE_EXT 
FILE_TYPE_PACKED 
FILE_TYPE_BYTE4 

Definition at line 222 of file noble.h.

Enumerator:
GC_CLEAR_BRAINCODE 
GC_IDEOSPHERE 
GC_BRAINCODE 
GC_GENEPOOL 
GC_HONOR 
GC_PATHOGENS 
GC_RELATIONSHIPS 
GC_PREFERENCES 
GC_PHASESPACE 
GC_SOCIALSIM 
GC_MEET_PLACES 
GC_VASCULAR 

Definition at line 412 of file noble.h.

Enumerator:
KIND_LOAD_FILE 
KIND_NEW_SIMULATION 
KIND_START_UP 
KIND_MEMORY_SETUP 

Definition at line 456 of file noble.h.

Enumerator:
VARIABLE_FUNCTION 
VARIABLE_RUN 
VARIABLE_WHILE 
VARIABLE_IF 

Definition at line 860 of file noble.h.

Enumerator:
SYNTAX_MOVE 
SYNTAX_JUMP_TO 
SYNTAX_JUMP_EQUAL_ZERO 
SYNTAX_DATA 

Definition at line 896 of file noble.h.

Enumerator:
SYNTAX_MINUS 
SYNTAX_ADDITION 
SYNTAX_MULTIPLY 
SYNTAX_AND 
SYNTAX_XOR 
SYNTAX_OR 
SYNTAX_GREATER_THAN 
SYNTAX_LESS_THAN 
SYNTAX_EQUAL_TO 
SYNTAX_NOT_EQUAL_TO 
SYNTAX_CONDITIONAL_AND 
SYNTAX_CONDITIONAL_OR 
SYNTAX_DIVISION 
SYNTAX_MODULUS 
SYNTAX_BITSHIFT_RIGHT 
SYNTAX_BITSHIFT_LEFT 
SYNTAX_LESS_EQUAL 
SYNTAX_GREATER_EQUAL 
SYNTAX_EQUALS 

Definition at line 868 of file noble.h.

Enumerator:
WEATHER_SEVEN_ERROR 
WEATHER_SEVEN_SUNNY_DAY 
WEATHER_SEVEN_CLOUDY_DAY 
WEATHER_SEVEN_RAINY_DAY 
WEATHER_SEVEN_CLEAR_NIGHT 
WEATHER_SEVEN_CLOUDY_NIGHT 
WEATHER_SEVEN_RAINY_NIGHT 
WEATHER_SEVEN_DAWN_DUSK 

Definition at line 431 of file noble.h.

Enumerator:
TERRAIN_WINDOW_WIDTH 
TERRAIN_WINDOW_HEIGHT 
TERRAIN_WINDOW_AREA 
GRAPH_WINDOW_WIDTH_BITS 
GRAPH_WINDOW_WIDTH 
GRAPH_WINDOW_HEIGHT 
GRAPH_WINDOW_AREA 

Definition at line 443 of file noble.h.

enum window_num
Enumerator:
NUM_VIEW 
NUM_TERRAIN 
NUM_GRAPH 

Definition at line 329 of file noble.h.


Function Documentation

void audio_aiff_body ( void *  fptr,
n_audio samples,
n_uint  number_samples 
)

Definition at line 274 of file audio.c.

Here is the caller graph for this function:

void audio_aiff_header ( void *  fptr,
n_uint  total_samples 
)

Definition at line 323 of file audio.c.

Here is the caller graph for this function:

void audio_clear_buffers ( n_uint  length)

Clears all the buffers associated with the FFT.

Parameters:
lengththe length of the buffer to be cleared.

Definition at line 196 of file audio.c.

Here is the caller graph for this function:

void audio_clear_output ( n_audio audio,
n_uint  length 
)

Clears an audio output buffer

Parameters:
audiothe audio buffer to be cleared.
lengththe length of the buffer to be cleared.

Definition at line 214 of file audio.c.

Here is the caller graph for this function:

void audio_equal_output ( n_audio audio,
n_uint  length 
)

Sets an audio ouput buffer to the FFT time-domain buffer.

Parameters:
audiothe audio buffer to be set.
lengththe length of the buffer to be set.

Definition at line 229 of file audio.c.

Here is the caller graph for this function:

void audio_fft ( n_byte  inverse,
n_uint  power_sample 
)

Perform a fast fourier transform.

Parameters:
inverseif this is an inverse FFT.
power_samplethe number of bits of the FFT cell size.

Definition at line 74 of file audio.c.

Here is the caller graph for this function:

void audio_multiply_output ( n_audio audio,
n_uint  length 
)

Multiplies an audio ouput buffer to the FFT time-domain buffer.

Parameters:
audiothe audio buffer to be multiplied.
lengththe length of the buffer to be multiplied.

Definition at line 244 of file audio.c.

Here is the caller graph for this function:

void audio_set_frequency ( n_uint  entry,
n_uint  value 
)

Sets frequency values in the frequency FFT buffer.

Parameters:
entrythe frequency entry point.
valuethe specific value to set in the frequency entry.

Definition at line 259 of file audio.c.

Here is the caller graph for this function:

void compress_compress ( n_file input,
n_file output 
)

Definition at line 176 of file compress.c.

Here is the call graph for this function:

void compress_expand ( n_file input,
n_file output 
)

Definition at line 228 of file compress.c.

Here is the call graph for this function:

n_int draw_error ( n_constant_string  error_text,
n_constant_string  location,
n_int  line_number 
)

Definition at line 1418 of file draw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void execute_add ( execute_function  function,
void *  general_data,
void *  read_data,
void *  write_data 
)
void execute_close ( void  )

Definition at line 180 of file execute.c.

Here is the caller graph for this function:

void execute_complete_added ( void  )

Definition at line 168 of file execute.c.

Here is the caller graph for this function:

void execute_group ( execute_function function,
void *  general_data,
void *  read_data,
n_int  count,
n_int  size 
)

Definition at line 163 of file execute.c.

Here is the caller graph for this function:

void execute_init ( void  )

Definition at line 300 of file execute.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void execute_threads ( n_int  value)

Definition at line 197 of file execute.c.

n_int execute_threads_value ( void  )

Definition at line 206 of file execute.c.

Here is the caller graph for this function:

n_int execute_toggle ( n_int  toggle)
void interpret_cleanup ( n_interpret **  to_clean)

Makes sure all the data associated with the interpreter is freed etc.

Parameters:
to_cleanThe pointer to the n_interpret struct that is being expunged.

Definition at line 602 of file interpret.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int interpret_cycle ( n_interpret code,
n_individual_interpret individual,
n_int  exit_offset,
void *  structure,
void *  data,
script_external start,
script_external end 
)

This processes a single cycle of the ApeScript interpreter.

Parameters:
codethe ApeScript code to be executed.
exit_offsetif greater than minus one, the value entry to indicate exiting interpreter.
structurethe structure to be passed into the start and end functions.
startthe function to be run at the start of the ApeScript cycle.
endthe function to be run at the end of the ApeScript cycle.
Returns:
-1 in error case, 0 in leave and don't cycle back, 1 in leave and continue to cycle back.

Definition at line 627 of file interpret.c.

void interpret_individual ( n_individual_interpret individual)

Definition at line 591 of file interpret.c.

n_int io_apescript_error ( void *  ptr,
AE_ENUM  value 
)

Definition at line 1748 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void io_audit_file ( const noble_file_entry format,
n_byte  section_to_audit 
)

Definition at line 1499 of file io.c.

n_int io_bytes_to_int ( n_byte bytes)

Definition at line 202 of file io.c.

Here is the call graph for this function:

n_int io_command ( n_file fil,
const noble_file_entry commands 
)

Definition at line 830 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_command_line_execution ( void  )

Definition at line 69 of file io.c.

Here is the caller graph for this function:

void io_command_line_execution_set ( void  )

Definition at line 64 of file io.c.

Here is the caller graph for this function:

n_int io_console ( void *  ptr,
noble_console_command commands,
n_console_input  input_function,
n_console_output  output_function 
)

Definition at line 1660 of file io.c.

Here is the call graph for this function:

n_string io_console_entry ( n_string  string,
n_int  length 
)

Definition at line 1643 of file io.c.

Here is the call graph for this function:

n_string io_console_entry_clean ( n_string  string,
n_int  length 
)

Definition at line 1638 of file io.c.

Here is the caller graph for this function:

void io_console_out ( n_constant_string  value)

Definition at line 1649 of file io.c.

Here is the caller graph for this function:

void io_console_quit ( void  )

Definition at line 1655 of file io.c.

Here is the caller graph for this function:

void io_copy ( n_byte from,
n_byte to,
n_uint  number 
)

This is a historical legacy function as all platforms now use memcpy. Although in the future this may change.

Parameters:
frompointer to copy from.
topointer to copy to.
numberthe number of bytes to copy.

Definition at line 91 of file io.c.

Here is the caller graph for this function:

n_int io_disk_check ( n_constant_string  file_name)

Appends a file to disk.

Parameters:
local_filethe pointer to the n_file data that is written to disk.
file_namethe name of the file to be appended.
Returns:
FILE_ERROR if there is a problem and FILE_OKAY if it is successful.

Definition at line 292 of file io.c.

n_int io_disk_read ( n_file local_file,
n_string  file_name 
)

Reads a file from disk.

Parameters:
local_filethe pointer to the n_file data that will have the file stored in it.
file_namethe name of the file to be read.
Returns:
FILE_ERROR if there is a problem and FILE_OKAY if it is successful.

Definition at line 217 of file io.c.

Here is the call graph for this function:

n_int io_disk_write ( n_file local_file,
n_string  file_name 
)

Writes a file to disk.

Parameters:
local_filethe pointer to the n_file data that is written to disk.
file_namethe name of the file to be written.
Returns:
FILE_ERROR if there is a problem and FILE_OKAY if it is successful.

Definition at line 254 of file io.c.

Here is the caller graph for this function:

void io_entry_execution ( n_int  argc,
n_string argv 
)

Definition at line 74 of file io.c.

Here is the call graph for this function:

void io_erase ( n_byte buf_offscr,
n_uint  nestop 
)

Definition at line 1413 of file io.c.

Here is the caller graph for this function:

void io_file_cleanup ( n_int entry,
n_file **  file 
)

Definition at line 1794 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void io_file_free ( n_file **  file)

Frees the file pointer

Parameters:
filethe pointer to be freed.

Definition at line 188 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_file* io_file_new ( void  )

Allocates a new file.

Returns:
a 4k worth of data file pointer.

Definition at line 165 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_file* io_file_ready ( n_int  entry,
n_file file 
)

Definition at line 1785 of file io.c.

Here is the caller graph for this function:

void io_file_reused ( n_file fil)

Definition at line 663 of file io.c.

Here is the call graph for this function:

void io_file_string ( n_int  entry,
n_file file,
n_constant_string  string 
)

Definition at line 1843 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_file_write ( n_file fil,
n_byte  byte 
)

This is a dynamic write to file function which will increase the file size and allocated a larger data buffer if the original end of the file is reached. It is very useful for a number of dynamic file applications through the simulation.

Parameters:
filThe file data to be written to.
byteThe byte/character to be written.
Returns:
Whether the parsing was successful or -1 on failure.

Definition at line 625 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void io_file_writeoff ( n_int entry,
n_file file 
)

Definition at line 1832 of file io.c.

Here is the caller graph for this function:

void io_file_writeon ( n_int entry,
n_file **  file,
n_byte  blocked_write 
)

Definition at line 1808 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_find ( n_string  check,
n_int  from,
n_int  max,
n_string  value_find,
n_int  value_find_length 
)

Definition at line 714 of file io.c.

Here is the caller graph for this function:

n_int io_find_size_data ( noble_file_entry commands)

Definition at line 870 of file io.c.

Here is the caller graph for this function:

void io_free ( void **  ptr)

This is a historical legacy function as all platforms now use free. Although in the future this may change.

Parameters:
ptrthe void * pointer to be freed. Should really be a void ** to catch the 0L-ing.

Definition at line 115 of file io.c.

Here is the caller graph for this function:

n_int io_help ( void *  ptr,
n_string  response,
n_console_output  output_function 
)

Definition at line 1585 of file io.c.

Here is the call graph for this function:

void io_help_line ( noble_console_command specific,
n_console_output  output_function 
)

Definition at line 1578 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void io_int_to_bytes ( n_int  value,
n_byte bytes 
)

Definition at line 197 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_length ( n_string  value,
n_int  max 
)

Definition at line 680 of file io.c.

Here is the caller graph for this function:

void io_lower ( n_string  value,
n_int  length 
)

Moves the string to lower case for the length shown.

Parameters:
valuethe string with the case to be lowered.
lengththe number of bytes to be lowered.
Returns:
a void* pointer of the allocated bytes.

Definition at line 151 of file io.c.

Here is the caller graph for this function:

void* io_new ( n_uint  bytes)

This is a historical legacy function as all platforms now use malloc. Although in the future this may change.

Parameters:
bytesnumber of bytes to allocate.
Returns:
a void* pointer of the allocated bytes.

Definition at line 101 of file io.c.

Here is the caller graph for this function:

void* io_new_range ( n_uint  memory_min,
n_uint memory_allocated 
)

This is allocates a range of memory depending on availability.

Parameters:
memory_minthe minimum possible allocated memory before returning 0L.
memory_allocatedthe starting value for memory size and returning the actual size.
Returns:
a void* pointer of the allocated bytes.

Definition at line 130 of file io.c.

n_int io_number ( n_string  number_string,
n_int actual_value,
n_int decimal_divisor 
)

Read a number from a string.

Parameters:
number_stringthe string to be read from.
actual_valuethe actual value read.
decimal_divisorthe value required to provide a decimal version.
Returns:
number of characters read in condition of success and -1 in condition of failure.

Definition at line 473 of file io.c.

Here is the caller graph for this function:

void io_offset ( n_byte start,
n_byte point,
n_string  text 
)

Definition at line 1573 of file io.c.

void io_output_contents ( n_file file)

Definition at line 999 of file io.c.

Here is the caller graph for this function:

n_int io_quit ( void *  ptr,
n_string  response,
n_console_output  output_function 
)

Definition at line 1633 of file io.c.

Here is the caller graph for this function:

n_int io_read_bin ( n_file fil,
n_byte local_byte 
)

Reads binary data from the file pointer.

Parameters:
filthe pointer to the n_file data that is read from.
local_bytethe single byte.
Returns:
FILE_ERROR if there is a problem and FILE_OKAY if it is successful.

Definition at line 318 of file io.c.

Here is the caller graph for this function:

n_int io_read_buff ( n_file fil,
n_byte data,
const noble_file_entry commands 
)

This function takes a file and parses the file date with the commands shown into the output data. This function is extremely powerful because it allows all different kinds of format-rich text data to be converted into binary information based on the command information passed in to this function too.

Parameters:
filThe file data to be parsed.
dataThe resultant output data.
commandsThe commands used to parse the output data.
Returns:
Whether the parsing was successful or -1 on failure.

Definition at line 1025 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_read_byte4 ( n_file fil,
n_uint actual_value,
n_byte final_char 
)

Read a four byte value from n_file

Parameters:
filthe pointer to the n_file data that is read from.
actual_valuethe actual value read.
final_charthe final character (after the last number).
Returns:
number of characters read in condition of success and -1 in condition of failure.

Definition at line 438 of file io.c.

Here is the caller graph for this function:

n_int io_read_data ( n_file fil,
n_byte2  command,
n_byte data_read 
)

Definition at line 916 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void io_search_file_format ( const noble_file_entry format,
n_string  compare 
)

Definition at line 1418 of file io.c.

Here is the caller graph for this function:

void io_string_write ( n_string  dest,
n_string  insert,
n_int pos 
)

Definition at line 1733 of file io.c.

Here is the caller graph for this function:

n_string* io_tab_delimit_to_n_string_ptr ( n_file tab_file,
n_int size_value,
n_int row_value 
)

Converts a tab delimited file to a series of string pointers

Parameters:
tab_filethe pointer to the n_file data that is read from.
size_valuethe pointer to the total number.
row_valuethe pointer to the number of columns per row.
Returns:
string pointers.

Definition at line 353 of file io.c.

Here is the call graph for this function:

void io_three_string_combination ( n_string  output,
n_string  first,
n_string  second,
n_string  third,
n_int  count 
)

Definition at line 1544 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void io_time_to_string ( n_string  value,
n_int  minutes,
n_int  days 
)

Definition at line 1565 of file io.c.

Here is the caller graph for this function:

void io_whitespace ( n_file input)

Removes the whitespace from the initial file - CRs, LFs, tabs and spaces.

Parameters:
inputthe file pointer that will have the white space removed.

Definition at line 570 of file io.c.

Here is the caller graph for this function:

n_int io_write ( n_file fil,
n_constant_string  ch,
n_byte  new_line 
)

Definition at line 740 of file io.c.

Here is the caller graph for this function:

n_int io_write_buff ( n_file fil,
void *  data,
const noble_file_entry commands,
n_byte  command_num,
n_file_specific func 
)

This function takes a block of data and various format-rules (through the commands) and applies these rules to produce an output datafile. In many regards this can be thought of as the inverse of io_read_buff.

Parameters:
filThe file data that is produced.
dataThe resultant output data.
commandsThe commands used to parse data to the output file.
command_numOutput the command number block of commands.
funcAllows a file specific function to be injected to add additional format requirments.
Returns:
Whether the parsing was successful.

Definition at line 1112 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_write_csv ( n_file fil,
n_byte data,
const noble_file_entry commands,
n_byte  command_num,
n_byte  initial 
)

Definition at line 1316 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_writenum ( n_file fil,
n_int  loc_val,
n_byte  ekind,
n_byte  new_line 
)

Definition at line 818 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int io_writenumber ( n_file fil,
n_int  loc_val,
n_uint  numer,
n_uint  denom 
)

Definition at line 768 of file io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void land_clear ( n_land local,
KIND_OF_USE  kind,
n_byte4  start 
)

Definition at line 525 of file land.c.

Here is the caller graph for this function:

void land_cycle ( n_land local_land)

Definition at line 374 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void land_init ( n_land local_land,
n_byte scratch,
n_byte  double_spread 
)

Definition at line 549 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int land_location ( n_land land,
n_int  px,
n_int  py 
)

Definition at line 345 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int land_map_bits ( n_land land)

Definition at line 339 of file land.c.

Here is the caller graph for this function:

n_int land_map_dimension ( n_land land)

Definition at line 333 of file land.c.

Here is the caller graph for this function:

n_int land_operator_interpolated ( n_land local_land,
n_int  locx,
n_int  locy,
n_byte kind 
)

Definition at line 501 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void land_tide ( n_land local_land)

Definition at line 350 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void land_vect2 ( n_vect2 output,
n_int actual_z,
n_land local,
n_vect2 location 
)

Definition at line 595 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void math_bilinear_8_times ( n_byte side512,
n_byte data,
n_byte  double_spread 
)

Definition at line 866 of file math.c.

Here is the caller graph for this function:

n_byte* math_general_allocation ( n_byte bc0,
n_byte bc1,
n_int  i 
)

address within this being

Address within the other being

Definition at line 945 of file math.c.

Here is the caller graph for this function:

void math_general_execution ( n_int  instruction,
n_int  is_constant0,
n_int  is_constant1,
n_byte addr0,
n_byte addr1,
n_int  value0,
n_int i,
n_int  is_const0,
n_int  is_const1,
n_byte pspace,
n_byte **  maddr0,
n_byte **  maddr1,
n_byte bc0,
n_byte bc1,
n_int  braincode_min_loop 
)

Logical and

Logical or

Move a byte, with no particular alignment

Move a block of instructions

Add

Subtract

Multiply

Divide

Modulus

Count up or down

Goto

Goto if zero

Goto if not zero

Goto and decrement if not zero

If two values are equal then skip the next n instructions

If two values are not equal then skip the next n instructions

Skip the next n instructions if less than

No operation (data only)

swap

invert

Save to Pspace

Load from Pspace

Definition at line 956 of file math.c.

Here is the caller graph for this function:

n_uint math_hash ( n_byte values,
n_uint  length 
)

Creates a near-unique integer value from a block of data. This is similar to CRC or other hash methods.

Parameters:
valuesThe data in byte chunks.
lengthThe length of the data in bytes.
Returns:
The hash value produced.

Definition at line 709 of file math.c.

Here is the call graph for this function:

n_byte4 math_hash_fnv1 ( n_constant_string  key)

Definition at line 694 of file math.c.

n_byte math_join ( n_int  sx,
n_int  sy,
n_int  dx,
n_int  dy,
n_join draw 
)

This is used to produce a series of steps between two points useful for drawing a line or a line of sight test.

Parameters:
sxThe starting x location.
syThe starting y location.
dxThe distance to be traveled in the x direction.
dyThe distance to be traveled in the y direction.
drawThe generic draw function used to traverse the line points.
Returns:
This is 0 if the line draw is completed successfully and 1 if it exits through the generic draw function's request.

Definition at line 594 of file math.c.

Here is the caller graph for this function:

n_byte math_join_vect2 ( n_int  sx,
n_int  sy,
n_vect2 vect,
n_join draw 
)

Definition at line 675 of file math.c.

Here is the call graph for this function:

n_byte math_line ( n_int  x1,
n_int  y1,
n_int  x2,
n_int  y2,
n_join draw 
)

Definition at line 687 of file math.c.

Here is the call graph for this function:

n_byte math_line_vect ( n_vect2 point1,
n_vect2 point2,
n_join draw 
)

Definition at line 680 of file math.c.

Here is the call graph for this function:

n_int math_memory_location ( n_int  px,
n_int  py 
)

Definition at line 340 of file math.c.

Here is the caller graph for this function:

void math_pack ( n_int  size,
n_byte  value,
n_byte alloc1,
n_byte alloc2 
)

Definition at line 328 of file math.c.

Here is the caller graph for this function:

void math_patch ( n_byte local_map,
n_memory_location mem_func,
n_patch func,
n_byte2 arg,
n_int  refine 
)

This function creates the fractal landscapes and the genetic fur patterns currently.

Parameters:
local_mappointer to the map array
functhe n_patch function that takes the form n_byte2 (n_patch)(n_byte2 * local)
argthe pointer that is passed into the patch function
patch_bitseach side of the map is 2^patch_bits, total area is 2^(patch_bits*2)

size of the local tiles

number of 256 x 256 tiles in each dimension

begin the tile traversal in the y dimension

begin the tile traversal in the x dimension

scan through the span_minor values

each of the smaller tiles are based on 256 * 256 tiles

perform rotation on 2,3,6,7,10,11 etc

include the wrap around for the 45 degree rotation cases in particular

Definition at line 496 of file math.c.

Here is the caller graph for this function:

n_byte2 math_random ( n_byte2 local)

Generates a random number from two change-able two-byte random number values passed into the function in the form of a pointer.

Parameters:
localThe pointer leading to both the two-byte numbers used to seed (and change in the process).
Returns:
The two-byte random number produced.

Definition at line 825 of file math.c.

Here is the caller graph for this function:

void math_random3 ( n_byte2 local)

Definition at line 856 of file math.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_uint math_root ( n_uint  squ)

Definition at line 922 of file math.c.

void math_round ( n_byte local_map,
n_byte scratch,
n_memory_location mem_func 
)

Perform four nearest neighbor blur runs

Definition at line 349 of file math.c.

void math_round_smarter ( n_byte local_map,
n_byte scratch,
n_memory_location mem_func 
)

Perform four nearest neighbor blur runs

Definition at line 444 of file math.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int math_sine ( n_int  direction,
n_int  divisor 
)

This produces a sine value

Parameters:
direction256 units per rotation
divisorThe divisor for the output value
Returns:
The sine value

Definition at line 204 of file math.c.

Here is the caller graph for this function:

n_int math_spread_byte ( n_byte  val)

Definition at line 807 of file math.c.

Here is the caller graph for this function:

n_byte math_turn_towards ( n_vect2 p,
n_byte  fac,
n_byte  turn 
)

Calculates the direction location needs to turn to turn towards a vector.

Parameters:
pxThe x vector direction.
pyThe y vector direction.
facThe current direction facing.
turnThe number of facing angle units that could be turned (it may not be the number of angle units turned).
Returns:
The new direction facing value.

Definition at line 757 of file math.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_interpret* parse_convert ( n_file input,
n_int  main_entry,
variable_string variables 
)

Turns an input file into an interpret-able pointer.

Parameters:
inputThe file pointer containing the ApeScript text data.
main_entryThe variable defined as main. In the case of this implementation of ApeScript, being.
variablesThe pointer to the variable string used for debugging to output the actual variable names.
Returns:
The interpreter pointer created from the file pointer.

Definition at line 436 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void scdebug_file_cleanup ( void  )

Definition at line 98 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_file* scdebug_file_ready ( void  )

Definition at line 93 of file parse.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void scdebug_int ( void *  ptr,
n_int  number 
)

Definition at line 137 of file parse.c.

Here is the call graph for this function:

void scdebug_newline ( void *  ptr)

Definition at line 153 of file parse.c.

Here is the call graph for this function:

void scdebug_string ( void *  ptr,
n_constant_string  string 
)

Definition at line 116 of file parse.c.

Here is the call graph for this function:

void scdebug_tabstep ( void *  ptr,
n_int  steps 
)

Definition at line 184 of file parse.c.

n_string scdebug_variable ( n_int  variable)

Definition at line 123 of file parse.c.

void scdebug_writeoff ( void *  ptr)

Definition at line 109 of file parse.c.

Here is the call graph for this function:

void scdebug_writeon ( void *  ptr)

Definition at line 103 of file parse.c.

Here is the call graph for this function:

n_int spacetime_after ( n_spacetime initial,
n_spacetime second 
)

Definition at line 622 of file land.c.

Here is the caller graph for this function:

n_int spacetime_before_now ( n_spacetime initial,
n_land now 
)

Definition at line 639 of file land.c.

Here is the caller graph for this function:

void spacetime_copy ( n_spacetime to,
n_spacetime from 
)

Definition at line 656 of file land.c.

Here is the caller graph for this function:

void spacetime_set ( n_spacetime set,
n_land local,
n_byte2 location 
)

Definition at line 665 of file land.c.

void vect2_add ( n_vect2 equals,
n_vect2 initial,
n_vect2 second 
)

Adds two 2d vectors into a resultant vector.

Parameters:
equalsthe vector that holds the result.
initialthe first vector to be added.
secondthe second vector to be added.

Definition at line 88 of file math.c.

Here is the caller graph for this function:

void vect2_back_byte2 ( n_vect2 converter,
n_byte2 output 
)

Definition at line 241 of file math.c.

Here is the caller graph for this function:

void vect2_byte2 ( n_vect2 converter,
n_byte2 input 
)

Converts an array of n_byte2 to a 2d vector (n_vect2)

Parameters:
converterthe vector to hold the information.
inputthe n_byte2 that is converted to the n_vect2.

Definition at line 70 of file math.c.

Here is the caller graph for this function:

void vect2_center ( n_vect2 center,
n_vect2 initial,
n_vect2 second 
)

Definition at line 103 of file math.c.

Here is the call graph for this function:

void vect2_copy ( n_vect2 to,
n_vect2 from 
)

Definition at line 258 of file math.c.

void vect2_d ( n_vect2 initial,
n_vect2 second,
n_int  multiplier,
n_int  divisor 
)

Adds one 2d vector with another 2d vector times a multiplier divided by a divisor.

Parameters:
equalsthe vector that holds the result.
initialthe first vector that takes the summation of the second vector.
secondthe second vector to be multiplied.
multiplierthe scalar multiplier.
divisorthe the scalar divisor.

Definition at line 163 of file math.c.

Here is the caller graph for this function:

void vect2_direction ( n_vect2 initial,
n_int  direction,
n_int  divisor 
)

This produces a direction vector

Parameters:
initialThe vector output
direction256 units per rotation
divisorThe divisor for the output value

Definition at line 223 of file math.c.

Here is the caller graph for this function:

n_int vect2_dot ( n_vect2 initial,
n_vect2 second,
n_int  multiplier,
n_int  divisor 
)

This produces the dot product of two vectors with the scalar multiplier and divisor noted.

Parameters:
initialThe first vector
secondThe second vector
referenceThe specific Noble Ape checked for being awake
Returns:
The resultant scalar

Definition at line 185 of file math.c.

Here is the caller graph for this function:

void vect2_min_max ( n_vect2 points,
n_int  number,
n_vect2 maxmin 
)

Definition at line 298 of file math.c.

n_vect2* vect2_min_max_init ( void  )

Definition at line 286 of file math.c.

Here is the call graph for this function:

void vect2_multiplier ( n_vect2 equals,
n_vect2 initial,
n_vect2 second,
n_int  multiplier,
n_int  divisor 
)

Multiplies one 2d vector with another 2d vector times a multiplier divided by a divisor.

Parameters:
equalsthe vector that holds the result.
initialthe first vector.
secondthe second vector to be multiplied.
multiplierthe scalar multiplier.
divisorthe the scalar divisor.

Definition at line 138 of file math.c.

n_int vect2_nonzero ( n_vect2 nonzero)

Definition at line 281 of file math.c.

void vect2_offset ( n_vect2 initial,
n_int  dx,
n_int  dy 
)

Definition at line 231 of file math.c.

void vect2_populate ( n_vect2 value,
n_int  x,
n_int  y 
)

Definition at line 264 of file math.c.

Here is the caller graph for this function:

void vect2_rotate90 ( n_vect2 rotation)

Definition at line 210 of file math.c.

void vect2_rotation ( n_vect2 location,
n_vect2 rotation 
)

Definition at line 270 of file math.c.

void vect2_subtract ( n_vect2 equals,
n_vect2 initial,
n_vect2 second 
)

Subtracts one 2d vector from another 2d vector into a resultant vector.

Parameters:
equalsthe vector that holds the result.
initialthe first vector.
secondthe second vector to be subtracted.

Definition at line 116 of file math.c.

Here is the caller graph for this function:

void weather_cycle ( n_land local_land)

Definition at line 138 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void weather_init ( n_land local_land)

Definition at line 188 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int weather_pressure ( n_land local_land,
n_int  px,
n_int  py 
)

Definition at line 264 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

weather_values weather_seven_values ( n_land local_land,
n_int  px,
n_int  py 
)

Definition at line 289 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void weather_wind_vector ( n_land local_land,
n_vect2 pos,
n_vect2 wind 
)

Definition at line 274 of file land.c.

Here is the call graph for this function:

Here is the caller graph for this function: