Noble Ape
The Central Directories of the Noble Ape Simulation.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Functions | Variables
draw.c File Reference
#include "gui.h"
#include <stdio.h>
Include dependency graph for draw.c:

Go to the source code of this file.

Data Structures

struct  draw_terrain_scan_struct

Macros

#define MAX_NUMBER_ERRORS   35
#define UNDRAW_MAX   100000
#define ledfir(x, y, dx, dy, c)   if(((val >> c)&1)) (*local_draw)((x + off_x + offset),((y + off_y)), dx, dy, local_info)
#define POS_HIRES(num)   ((num+(HI_RES_MAP_DIMENSION*2))&(HI_RES_MAP_DIMENSION-1))
#define CONVERT_X(x, cx)   (n_uint)((POS_HIRES((x)+cx)) )
#define CONVERT_Y(y, cy)   (n_uint)((POS_HIRES((y)+cy)) << HI_RES_MAP_BITS)
#define CONVERT_XY(x, y)   (CONVERT_X(x) | CONVERT_Y(y))
#define SUBSTA(c)   ((c<<8)|c)
#define mndivmin   15
#define mndivhr   180
#define mndivmonth   7
#define mndivyear   91
#define FACING_OFFSIDE   ((terrain_dim_x-(512-411)))
#define SP_EN_OFFSIDE   ((terrain_dim_x-(512-325)))
#define GENETICS_X   (terrain_dim_x-69)
#define GENETICS_Y   (55)
#define GENDER_X   (terrain_dim_x-110)
#define GENDER_Y   (10)
#define ACTIVE_PIXEL(px, py)   sketch_psetc(POSITIVE_LAND_COORD(px),POSITIVE_LAND_COORD(py),COLOUR_RED)
#define ERASER_PIXEL(px, py)

Functions

void graph_draw (noble_simulation *local_sim, n_byte *graph, n_int dim_x, n_int dim_y)
n_int draw_toggle_weather (void)
n_int draw_toggle_brain (void)
n_int draw_toggle_braincode (void)
n_int draw_toggle_territory (void)
n_int draw_toggle_tide_daylight (void)
void draw_undraw_clear (void)
n_bytedraw_offscreen (n_byte *value)
n_bytedraw_pointer (n_byte which_one)
void draw_about (n_constant_string platform)
void draw_string_line (n_constant_string str, n_int off_x, n_int off_y, n_join *draw)
void draw_string (n_constant_string str, n_int off_x, n_int off_y, n_join *draw)
void draw_fit (n_byte *points, n_byte2 *color_fit)
void draw_color_time (n_byte2 *color_fit, n_byte2 time)
n_int draw_error (n_constant_string error_text, n_constant_string location, n_int line_number)
void draw_terrain_coord (n_int *co_x, n_int *co_y)
void draw_window (n_int dim_x, n_int dim_y)
n_int draw_cycle (void)

Variables

n_byte check_about = 0
n_uint tilt_z = 118
n_byte terrain_turn = 0
n_byte land_points []

Macro Definition Documentation

#define ACTIVE_PIXEL (   px,
  py 
)    sketch_psetc(POSITIVE_LAND_COORD(px),POSITIVE_LAND_COORD(py),COLOUR_RED)

Definition at line 1024 of file draw.c.

#define CONVERT_X (   x,
  cx 
)    (n_uint)((POS_HIRES((x)+cx)) )

Definition at line 522 of file draw.c.

#define CONVERT_XY (   x,
 
)    (CONVERT_X(x) | CONVERT_Y(y))

Definition at line 525 of file draw.c.

#define CONVERT_Y (   y,
  cy 
)    (n_uint)((POS_HIRES((y)+cy)) << HI_RES_MAP_BITS)

Definition at line 523 of file draw.c.

#define ERASER_PIXEL (   px,
  py 
)
Value:
(n_byte)local_val)

Definition at line 1025 of file draw.c.

#define FACING_OFFSIDE   ((terrain_dim_x-(512-411)))
#define GENDER_X   (terrain_dim_x-110)
#define GENDER_Y   (10)
#define GENETICS_X   (terrain_dim_x-69)
#define GENETICS_Y   (55)
#define ledfir (   x,
  y,
  dx,
  dy,
 
)    if(((val >> c)&1)) (*local_draw)((x + off_x + offset),((y + off_y)), dx, dy, local_info)

Definition at line 445 of file draw.c.

#define MAX_NUMBER_ERRORS   35

Definition at line 140 of file draw.c.

#define mndivhr   180

Definition at line 785 of file draw.c.

#define mndivmin   15

Definition at line 784 of file draw.c.

#define mndivmonth   7

Definition at line 787 of file draw.c.

#define mndivyear   91

Definition at line 788 of file draw.c.

#define POS_HIRES (   num)    ((num+(HI_RES_MAP_DIMENSION*2))&(HI_RES_MAP_DIMENSION-1))

Definition at line 520 of file draw.c.

#define SP_EN_OFFSIDE   ((terrain_dim_x-(512-325)))
#define SUBSTA (   c)    ((c<<8)|c)

Definition at line 527 of file draw.c.

#define UNDRAW_MAX   100000

Definition at line 191 of file draw.c.


Function Documentation

void draw_about ( n_constant_string  platform)

Definition at line 367 of file draw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_color_time ( n_byte2 color_fit,
n_byte2  time 
)

Definition at line 613 of file draw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int draw_cycle ( void  )

Definition at line 1710 of file draw.c.

Here is the call graph for this function:

Here is the caller 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 draw_fit ( n_byte points,
n_byte2 color_fit 
)

Definition at line 543 of file draw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte* draw_offscreen ( n_byte value)

Definition at line 217 of file draw.c.

n_byte* draw_pointer ( n_byte  which_one)

Definition at line 287 of file draw.c.

Here is the caller graph for this function:

void draw_string ( n_constant_string  str,
n_int  off_x,
n_int  off_y,
n_join draw 
)

Definition at line 509 of file draw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_string_line ( n_constant_string  str,
n_int  off_x,
n_int  off_y,
n_join draw 
)

This is used to produce letter LED style letters through the generic draw function specified.

Parameters:
strThe string to be drawn.
off_xThe starting x location for the string to be drawn.
off_yThe starting y location for the string to be drawn.
drawThe generic draw function used to draw the character.

Definition at line 456 of file draw.c.

Here is the caller graph for this function:

void draw_terrain_coord ( n_int co_x,
n_int co_y 
)

Definition at line 1697 of file draw.c.

n_int draw_toggle_brain ( void  )

Definition at line 165 of file draw.c.

Here is the caller graph for this function:

n_int draw_toggle_braincode ( void  )

Definition at line 171 of file draw.c.

Here is the caller graph for this function:

n_int draw_toggle_territory ( void  )

Definition at line 177 of file draw.c.

Here is the caller graph for this function:

n_int draw_toggle_tide_daylight ( void  )

Definition at line 183 of file draw.c.

Here is the caller graph for this function:

n_int draw_toggle_weather ( void  )

Definition at line 159 of file draw.c.

Here is the caller graph for this function:

void draw_undraw_clear ( void  )

Definition at line 197 of file draw.c.

void draw_window ( n_int  dim_x,
n_int  dim_y 
)

Definition at line 1704 of file draw.c.

Here is the caller graph for this function:

void graph_draw ( noble_simulation local_sim,
n_byte graph,
n_int  dim_x,
n_int  dim_y 
)

Variable Documentation

n_byte check_about = 0

Definition at line 149 of file draw.c.

n_byte land_points[]
Initial value:
{
0, 0, 0, 0,
106, 43, 70, 120,
125, 107, 201, 202,
128, 255, 255, 239,
150, 88, 169, 79,
190, 8, 15, 7,
208, 208, 216, 206,
255, 255, 255, 255
}

Definition at line 531 of file draw.c.

n_byte terrain_turn = 0

Definition at line 151 of file draw.c.

n_uint tilt_z = 118

Definition at line 150 of file draw.c.