项目作者: dolovnyak

项目描述 :
`Graphic` project at School21 (finished, will not be updated)
高级语言: C
项目地址: git://github.com/dolovnyak/landscape-render.git
创建时间: 2019-12-07T17:03:27Z
项目社区:https://github.com/dolovnyak/landscape-render

开源协议:

下载


landscape-render

" class="reference-link">MacOS - Build

This program renders the landscape in the format below:

  1. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  2. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  3. 0 0 10 10 0 0 10 10 0 0 0 10 10 10 10 10 0 0 0
  4. 0 0 10 10 0 0 10 10 0 0 0 0 0 0 0 10 10 0 0
  5. 0 0 10 10 0 0 10 10 0 0 0 0 0 0 0 10 10 0 0
  6. 0 0 10 10 10 10 10 10 0 0 0 0 10 10 10 10 0 0 0
  7. 0 0 0 10 10 10 10 10 0 0 0 10 10 0 0 0 0 0 0
  8. 0 0 0 0 0 0 10 10 0 0 0 10 10 0 0 0 0 0 0
  9. 0 0 0 0 0 0 10 10 0 0 0 10 10 10 10 10 10 0 0
  10. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  11. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

The position of the number is the local x, y coordinates, the value of the number is the local height.\
(Central number have local position 0,0)

Implimented:

  • Rotations
  • Bresenham line
  • Wu’s line
  • Maps parsing

Build and run on MacOS

  1. make
  2. ./ls-render maps/'map_name'

Controls

  • ESC - Close the program.
  • W/A/S/D - Move the map.
  • Q/E - Spin the map.
  • R/T - Start/Stop auto spin.
  • J + auto spin (R) - Nice moving.
  • Hold LMB - Map will follow mouse cursor.
  • Mouse wheel - Zoom.
  • CTRL + mouse wheel - Height.
  • L - Switch mode.
  • O - Small optimization for Breshenham mode.

Screenshots:

Image alt
Image alt
Image alt
Image alt
Image alt