首页| 行业标准| 论文文档| 电子资料| 图纸模型
购买积分 购买会员 激活码充值

您现在的位置是:团子下载站 > Linux/Unix编程 > srand[getpid[]] /* initialize some of the memory */ memset[heightmap, 0, MAPSIZE*MAPSIZE]

srand[getpid[]] /* initialize some of the memory */ memset[heightmap, 0, MAPSIZE*MAPSIZE]

  • 资源大小:12 K
  • 上传时间:2021-03-31
  • 下载次数:0次
  • 浏览次数:31次
  • 资源积分:1积分
  • 标      签: MAPSIZE initialize heightmap getpid

资 源 简 介

srand[getpid[]] /* initialize some of the memory */ memset[heightmap, 0, MAPSIZE*MAPSIZE] memset[vpage, 0, RENDERWIDTH * RENDERHEIGHT] printf["Creating dx d fractal terrain ", MAPSIZE, MAPSIZE] heightmap[0] = [rand[] 128] + 64 // initialize starting point on map CreateFractalMap[0, 0, MAPSIZE, MAPSIZE] printf["Smoothing terrain "] for [i = 0 i < 5 i++] SmoothMap[] MakeColorMap[]
VIP VIP