您的位置:首页 > 编程语言

ZZH:魔兽世界之001:如何枚举得到WOW的各个地图和如何生成WOW Minimmap

2010-03-29 09:15 239 查看
如何枚举得到WOW的各个地图
通过对WoWmapview中的Menu::Menu代码分析,得到如下内容:
DBFilesClient//Map.dbc :This client database describes the various top level maps (also called continents) the game uses. All dungeon instances have their own map as well.
通过对DBFilesClient//Map.dbc的枚举得到每个top level map的 WorldID
World name (used for loading World/Maps/%s/%s.wdt)
World description

如何生成WOW Minimmap
通过对WoWmapview中的World类的成员函数World::initMinimap的分析,得到如下内容
解析wdl,其中的wdl包括了MAOF chunk 和 MapAreaLow array,通过解析这些数据得到1map = 64x64maptile,1maptile = 17x17+16x16 heightmap点(16bit)
使用512x512 minimap texture来覆盖64x64maptiles,那么1个tile 就对应 了8x8 pixels
根据heightmap生成minimap texture,不同的height对应不同的颜色,height < 0的对应blue表示水平面下
我:ZZH1234567@163.com
msn: http://fotoone.spaces.live.com/
sina:http://blog.sina.com.cn/wincapture
csdn: http://blog.csdn.net/zzh1234567
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  代码分析 menu database