This is the interface between the Noble toolkit and what consumes the Noble Toolkit.
More...
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) |
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_vect2 * | vect2_min_max_init (void) |
| void | vect2_min_max (n_vect2 *points, n_int number, n_vect2 *maxmin) |
| n_byte * | math_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_file * | io_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_string * | io_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_file * | io_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_interpret * | parse_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_file * | scdebug_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) |
This is the interface between the Noble toolkit and what consumes the Noble Toolkit.
Definition in file noble.h.