⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gamedstar.h

📁 是一个基于热血战国协议的网络游戏。现在脱机客户端先放出来给大家研究
💻 H
字号:

/*
 * name: GameDStar.h
 *
 * desc: 游戏路径,这个是D*寻路算法,和A*不一样的
 *
*/

#pragma once
#include "StdAfx.h"

class CGameMap;
class CGameMir;
class CGameDStar
{
public://函数
	CGameDStar(CGameMap& map, CGameMir&game);
	~CGameDStar(void);
	u64 Init( DWORD x, DWORD y, long dis=2);
	BOOL GetPath(const POINT& Start, std::vector<POINT>& Path);
	DWORD GetDist(DWORD, DWORD);
	void GetTarget(POINT& t);
	void Free(void);

protected://变量
	CGameMap &m_Map;
	CGameMir &m_Game;
	DWORD    *m_DStarArray;
	DWORD    m_DStarWidth;
	DWORD    m_DStarHeight;
	POINT    m_DStarTarget;

	static bool NotInPath(const POINT& Point, const std::vector<POINT>& Path);
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -