![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "nilorea/n_common.h"#include "nilorea/n_log.h"#include "nilorea/n_astar.h"#include "nilorea/n_dead_reckoning.h"#include "nilorea/n_iso_engine.h"#include "nilorea/n_trajectory.h"
Include dependency graph for ex_iso_astar.c:Go to the source code of this file.
Macros | |
| #define | M_PI 3.14159265358979323846 |
| #define | MAP_H 20 |
| #define | MAP_W 20 |
| #define | MAX_HEIGHT 5 |
| #define | NUM_TERRAINS 4 |
| #define | TILE_WIDTH 64.0f |
Functions | |
| static void | build_test_map (ISO_MAP *map) |
| static ASTAR_PATH * | demo_astar (const ISO_MAP *map) |
| static void | demo_astar_standalone (void) |
| static void | demo_dead_reckoning (const ISO_MAP *map, const ASTAR_PATH *path) |
| static void | demo_iso_engine (ISO_MAP *map) |
| int | main (int argc, char *argv[]) |
| static void | print_map_ascii (const ISO_MAP *map, const ASTAR_PATH *path) |
Variables | |
| static const char * | terrain_names [] = {"Grass", "Sand", "Water", "Rock"} |
| #define M_PI 3.14159265358979323846 |
Definition at line 57 of file ex_iso_astar.c.
| #define MAP_H 20 |
Definition at line 62 of file ex_iso_astar.c.
| #define MAP_W 20 |
Definition at line 61 of file ex_iso_astar.c.
| #define MAX_HEIGHT 5 |
Definition at line 64 of file ex_iso_astar.c.
| #define NUM_TERRAINS 4 |
Definition at line 63 of file ex_iso_astar.c.
| #define TILE_WIDTH 64.0f |
Definition at line 65 of file ex_iso_astar.c.
|
static |
Definition at line 118 of file ex_iso_astar.c.
References BLCK, ISO_MAP::height, iso_map_set_ability(), iso_map_set_height(), iso_map_set_terrain(), MAX_HEIGHT, WALK, and ISO_MAP::width.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 252 of file ex_iso_astar.c.
References ASTAR_ALLOW_DIAGONAL, ASTAR_COST_CARDINAL, ASTAR_HEURISTIC_CHEBYSHEV, ASTAR_PATH::cost, ISO_MAP::height, iso_map_get_ability(), iso_map_get_height(), ASTAR_PATH::length, n_astar_find_path(), n_astar_grid_free(), n_astar_grid_new(), n_astar_grid_set_cost(), n_astar_grid_set_walkable(), n_astar_path_free(), ASTAR_PATH::nodes, SWIM, WALK, ISO_MAP::width, ASTAR_NODE::x, and ASTAR_NODE::y.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 501 of file ex_iso_astar.c.
References ASTAR_ALLOW_DIAGONAL, ASTAR_CARDINAL_ONLY, ASTAR_HEURISTIC_CHEBYSHEV, ASTAR_HEURISTIC_EUCLIDEAN, ASTAR_HEURISTIC_MANHATTAN, ASTAR_PATH::cost, ASTAR_PATH::length, n_astar_find_path(), n_astar_grid_free(), n_astar_grid_get_walkable(), n_astar_grid_new(), n_astar_grid_set_rect_blocked(), n_astar_path_free(), ASTAR_PATH::nodes, ASTAR_NODE::x, and ASTAR_NODE::y.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 326 of file ex_iso_astar.c.
References DR_ALGO_VEL_ACC, DR_BLEND_CUBIC, DR_BLEND_PVB, DR_BLEND_SNAP, dr_entity_check_threshold(), dr_entity_compute(), dr_entity_create(), dr_entity_destroy(), dr_entity_receive_state(), dr_entity_set_position(), dr_vec3(), dr_vec3_zero(), iso_map_interpolate_height(), ASTAR_PATH::length, ASTAR_PATH::nodes, PHYSICS::position, PHYSICS::speed, TRAJECTORY_2D, trajectory_add_point(), trajectory_delete(), trajectory_get_position(), trajectory_get_speed(), trajectory_new(), DR_ENTITY::update_count, ASTAR_NODE::x, DR_VEC3::x, ASTAR_NODE::y, and DR_VEC3::y.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 171 of file ex_iso_astar.c.
References ISO_PROJECTION::angle_deg, ISO_PROJECTION::half_h, ISO_PROJECTION::half_w, ISO_MAP::height, iso_map_calc_transitions(), iso_map_corner_heights(), iso_map_free(), iso_map_get_ability(), iso_map_get_height(), iso_map_get_terrain(), iso_map_interpolate_height(), iso_map_load(), iso_map_save(), iso_map_to_screen(), iso_screen_to_map(), ISO_MAP::proj, terrain_names, ISO_PROJECTION::tile_lift, and ISO_MAP::width.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 572 of file ex_iso_astar.c.
References build_test_map(), demo_astar(), demo_astar_standalone(), demo_dead_reckoning(), demo_iso_engine(), iso_map_free(), iso_map_new(), iso_map_set_projection(), ISO_PROJ_CLASSIC, LOG_NOTICE, MAP_H, MAP_W, MAX_HEIGHT, n_astar_path_free(), NUM_TERRAINS, print_map_ascii(), set_log_level(), and TILE_WIDTH.
Here is the call graph for this function:
|
static |
Definition at line 70 of file ex_iso_astar.c.
References BLCK, ISO_MAP::height, iso_map_get_ability(), iso_map_get_height(), iso_map_get_terrain(), ASTAR_PATH::length, MAP_H, MAP_W, ASTAR_PATH::nodes, ISO_MAP::width, ASTAR_NODE::x, and ASTAR_NODE::y.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 67 of file ex_iso_astar.c.