📄 path2.c
字号:
#include "..\\include\\move.h"
#define __GLOBAL__
#include "..\\include\\globals.h"
#include "..\\include\\prototyp.h"
#define HEURISTIC(x,y,xd,yd) \
(5*((long)(sqrt((x-xd)*(x-xd)+(y-yd)*(y-yd)))))
extern long total_open[],total_iterations[],total_closed[],total_sort[];
extern long direction_cost[];
long current_search_id=0;
unsigned short *fast_path(unit_type *u,long xd,long yd,long *size,long search_mask) {
//This is a version of A* which uses the searchspace for storing its
//nodes. The big advantage is that one iteration takes O(1) instead of
//O(n). For n iterations this then comes to O(n) instead of O(n
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -