srand[getpid[]]
/* initialize some of the memory */
memset[heightmap, 0, MapSIZE*MapSIZE]
memset[vpage, 0, RENDERWIDTH * RENDERHEIGHT]
printf["Creating dx d fractal terrain\n", MapSIZE, MapSIZE]
heightmap[0] = [rand[] 128] + 64 // initialize starting point on map
CreateFractalMap[0, 0, MapSIZE, MapSIZE]
printf["Smoothing terrain\n"]
for [i = 0 i < 5 i++]
SmoothMap[]
MakeColorMap[]
标签:
MapSIZE
initialize
heightmap
getpid
上传时间:
2014-01-04
上传用户:ainimao
srand[getpid[]]
/* initialize some of the memory */
memset[heightmap, 0, MapSIZE*MapSIZE]
memset[vpage, 0, RENDERWIDTH * RENDERHEIGHT]
printf["Creating dx d fractal terrain\n", MapSIZE, MapSIZE]
heightmap[0] = [rand[] 128] + 64 // initialize starting point on map
CreateFractalMap[0, 0, MapSIZE, MapSIZE]
printf["Smoothing terrain\n"]
for [i = 0 i < 5 i++]
SmoothMap[]
MakeColorMap[]
标签:
MapSIZE
initialize
heightmap
getpid
上传时间:
2013-12-25
上传用户:CSUSheep