Browse Source

Spelling check run, add intro, README and LICENSE files.

Herbert Wolverson 4 years ago
parent
commit
950a51f641

+ 19 - 0
.vscode/spellright.dict

@@ -1 +1,20 @@
 
+roguelikedev
+toml
+Github
+rustup
+Greenskins
+renderable
+destructuring
+renderables
+libtcod
+Moria
+spawner
+Qud
+AoE
+enum
+Serde
+spawners
+saveable
+serializer
+deserializer

+ 8 - 0
LICENSE

@@ -0,0 +1,8 @@
+Copyright 2019 Herbert Wolverson (DBA Bracket Productions)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
+and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 3 - 0
README.md

@@ -0,0 +1,3 @@
+# Roguelike Tutorial - in Rust
+
+Welcome to the Roguelike Tutorial - in Rust. This is intended to accompany [rltk_rs](https://github.com/thebracket/rltk_rs), my roguelike terminal library for Rust. You can read the ready-formatted version here: [http://bfnightly.bracketproductions.com/rustbook/](http://bfnightly.bracketproductions.com/rustbook/).

+ 4 - 0
book/src/SUMMARY.md

@@ -1,5 +1,9 @@
 # Summary
 
+[Introduction](./chapter_0.md)
+
+*Section 1*
+
 - [Chapter 1 - Hello Rust](./chapter_1.md)
 - [Chapter 2 - Entities & Components](./chapter_2.md)
 - [Chapter 3 - Walking A Map](./chapter_3.md)

File diff suppressed because it is too large
+ 25 - 0
book/src/chapter_0.md


+ 2 - 2
book/src/chapter_11.md

@@ -324,7 +324,7 @@ pub fn player(ecs : &mut World, player_x : i32, player_y : i32) -> Entity {
 }
 ```
 
-The new line (`.marked::<SimpleMarker<SerializeMe>>()`) needs to be repeated for all of our spawners in this file. It's worth looking at the source for this chaper; to avoid making a *huge* chapter full of source code, I've omitted the repeated details.
+The new line (`.marked::<SimpleMarker<SerializeMe>>()`) needs to be repeated for all of our spawners in this file. It's worth looking at the source for this chapter; to avoid making a *huge* chapter full of source code, I've omitted the repeated details.
 
 ## Serializing components that don't contain an Entity
 
@@ -659,7 +659,7 @@ gui::MainMenuSelection::LoadGame => {
 
 # Wrap-up
 
-Ths has been a long chapter, with quite heavy content. The great news is that we now have a framework for loading and saving the game whenever we want to. Adding components has gained some steps: we have to register them in `main`, tag them for `Serialize, Deserialize`, and remember to add them to our component type lists in `saveload_system.rs`. That could be easier - but it's a very solid foundation.
+This has been a long chapter, with quite heavy content. The great news is that we now have a framework for loading and saving the game whenever we want to. Adding components has gained some steps: we have to register them in `main`, tag them for `Serialize, Deserialize`, and remember to add them to our component type lists in `saveload_system.rs`. That could be easier - but it's a very solid foundation.
 
 **The source code for this chapter may be found [here](https://github.com/thebracket/rustrogueliketutorial/tree/master/chapter-11-loadsave)**
 

File diff suppressed because it is too large
+ 5 - 5
book/src/chapter_2.md


+ 1 - 1
book/src/chapter_3.md

@@ -79,7 +79,7 @@ Specs includes a concept of "resources" - shared data the whole ECS can use. So
 gs.ecs.insert(new_map());
 ```
 
-The map is now available from anywhere the ECS can see! Now inside your code, you can access the map with the rather unwieldy `let map = self.ecs.get_mut::<Vec<TileType>>();`; it's available to systems in an easier fasion.
+The map is now available from anywhere the ECS can see! Now inside your code, you can access the map with the rather unwieldy `let map = self.ecs.get_mut::<Vec<TileType>>();`; it's available to systems in an easier fashion.
 
 ## Draw the map
 

+ 2 - 2
book/src/chapter_5.md

@@ -16,7 +16,7 @@ This chapter starts with the code from chapter 4.
 
 # Map refactor
 
-We'll keep map-related functions and data together, to keep things clear as we make an ever-more-complicated game. The bulk of this is createing a new `Map` structure, and moving our helper functions to its implementation.
+We'll keep map-related functions and data together, to keep things clear as we make an ever-more-complicated game. The bulk of this is creating a new `Map` structure, and moving our helper functions to its implementation.
 
 ```rust
 extern crate rltk;
@@ -273,7 +273,7 @@ There's quite a bit here, and the viewshed is actually the simplest part:
 
 * We've added a `ReadExpect<'a, Map>` - meaning that the system should be passed our `Map` for use. We used `ReadExpect`, because not having a map is a failure.
 * In the loop, we first clear the list of visible tiles.
-* Then we call RLTK's `field_of_view` function, providing the starting point (the location of the entity, from `pos`), the range (from the viewshed), and a sligthtly convoluted "dereference, then get a reference" to unwrap `Map` from the ECS.
+* Then we call RLTK's `field_of_view` function, providing the starting point (the location of the entity, from `pos`), the range (from the viewshed), and a slightly convoluted "dereference, then get a reference" to unwrap `Map` from the ECS.
 
 This will now run every frame (which is overkill, more on that later) - and store a list of visible tiles.
 

+ 1 - 1
book/src/chapter_7.md

@@ -659,7 +659,7 @@ Let's replace `RunState` with something more descriptive of each phase:
 pub enum RunState { AwaitingInput, PreRun, PlayerTurn, MonsterTurn }
 ```
 
-If you're running Visual Studio Code with RLS, half your project just turned red. That's ok, we'll refactor one step at a time. We're going to *remove* the runstate altogether from the main `GameState`:
+If you're running Visual Studio Code with RLS, half your project just turned red. That's ok, we'll refactor one step at a time. We're going to *remove* the `RunState` altogether from the main `GameState`:
 
 ```rust
 pub struct State {

+ 1 - 1
book/src/chapter_8.md

@@ -198,7 +198,7 @@ ctx.set_bg(mouse_pos.0, mouse_pos.1, RGB::named(rltk::MAGENTA));
 
 This sets the background of the cell at which the mouse is pointed to magenta. As you can see, mouse information arrives from RLTK as part of the context.
 
-Now we'll introduct a new function, `draw_tooltips` and call it at the end of `draw_ui`. New new function looks like this:
+Now we'll introduce a new function, `draw_tooltips` and call it at the end of `draw_ui`. New new function looks like this:
 
 ```rust
 fn draw_tooltips(ecs: &World, ctx : &mut Rltk) {