浏览代码

Screenshots and todo reduction.

Herbert Wolverson 5 年之前
父节点
当前提交
e00eff2ff9
共有 4 个文件被更改,包括 12 次插入10 次删除
  1. 二进制
      book/src/c4-s1.gif
  2. 二进制
      book/src/c5-s1.gif
  3. 9 7
      book/src/chapter_4.md
  4. 3 3
      book/src/chapter_5.md

二进制
book/src/c4-s1.gif


二进制
book/src/c5-s1.gif


文件差异内容过多而无法显示
+ 9 - 7
book/src/chapter_4.md


+ 3 - 3
book/src/chapter_5.md

@@ -315,7 +315,7 @@ pub fn draw_map(ecs: &World, ctx : &mut Rltk) {
 }
 }
 ```
 ```
 
 
-If you run the example now (`cargo run`), it will show you just what the player can see. There's no memory, and performance is quite awful - but it's there and about right. TODO - SCREENSHOT
+If you run the example now (`cargo run`), it will show you just what the player can see. There's no memory, and performance is quite awful - but it's there and about right.
 
 
 It's clear that we're on the right track, but we need a more efficient way to do things. It would be nice if the player could remember the map as they see it, too.
 It's clear that we're on the right track, but we need a more efficient way to do things. It would be nice if the player could remember the map as they see it, too.
 
 
@@ -419,7 +419,7 @@ impl<'a> System<'a> for VisibilitySystem {
 
 
 The main changes here are that we're getting the Entities list along with components, and obtaining read-only access to the Players storage. We add those to the list of things to iterate in the list, and add a `let p : Option<&Player> = player.get(ent);` to see if this is the player. The rather cryptic `if let Some(p) = p` runs only if there is a `Player` component. Then we calculate the index, and mark it revealed.
 The main changes here are that we're getting the Entities list along with components, and obtaining read-only access to the Players storage. We add those to the list of things to iterate in the list, and add a `let p : Option<&Player> = player.get(ent);` to see if this is the player. The rather cryptic `if let Some(p) = p` runs only if there is a `Player` component. Then we calculate the index, and mark it revealed.
 
 
-If you run (`cargo run`) the project now, it is MASSIVELY faster than the previous version, and remembers where you've been (TODO: SCREENSHOT).
+If you run (`cargo run`) the project now, it is MASSIVELY faster than the previous version, and remembers where you've been.
 
 
 # Speeding it up even more - recalculating visibility when we need to
 # Speeding it up even more - recalculating visibility when we need to
 
 
@@ -543,7 +543,7 @@ pub fn draw_map(ecs: &World, ctx : &mut Rltk) {
 
 
 If you `cargo run` your project, you will now have visible tiles as slightly cyan floors and green walls - and grey as they move out of view. Performance should be great! Congratulations - you now have a nice, working field-of-view system.
 If you `cargo run` your project, you will now have visible tiles as slightly cyan floors and green walls - and grey as they move out of view. Performance should be great! Congratulations - you now have a nice, working field-of-view system.
 
 
-TODO: SCREENSHOT
+![Screenshot](./c5-s1.gif)
 
 
 **The source code for this chapter may be found [here](https://github.com/thebracket/rustrogueliketutorial/tree/master/chapter-05-fov)**
 **The source code for this chapter may be found [here](https://github.com/thebracket/rustrogueliketutorial/tree/master/chapter-05-fov)**