From 8bef582eab88148bc62d9899354bf67ad0580715 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Thu, 15 Dec 2016 22:12:51 +1100 Subject: [PATCH] Minor Edits --- Region-Pager-Base.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Region-Pager-Base.md b/Region-Pager-Base.md index 5ed6bd2..032d591 100644 --- a/Region-Pager-Base.md +++ b/Region-Pager-Base.md @@ -16,19 +16,19 @@ This takes an `x`, `y`, and `z` parameter (`z` is zero indexed), indicating a ti bool SetSolid(int x, int y, int b); ``` -This takes an `x` and `y` zero indexed parameter, indicating a tile in the map. `b` indicates whether it should be solid (true) or not (false). This function retreives a region with `GetRegion`, then it calls that region's `SetSolid`. +This takes an `x` and `y` parameter, indicating a tile in the map. `b` indicates whether it should be solid (true) or not (false). This function retreives a region with `GetRegion`, then it calls that region's `SetSolid`. ```C++ bool GetSolid(int x, int y); ``` -This takes an `x` and `y` zero indexed parameter, indicating a tile in the map. It returns whether it's solid (true) or not (false). This function retreives a region with `GetRegion`, then it calls that region's `GetSolid`. +This takes an `x` and `y` parameter, indicating a tile in the map. It returns whether it's solid (true) or not (false). This function retreives a region with `GetRegion`, then it calls that region's `GetSolid`. ```C++ Region* GetRegion(int x, int y); ``` -This is the universal function for accessing a region object. You can pass any integer value as `x` and `y`, and the correct region will be retrieved. First, it calls `FindRegion`. If that fails, it calls `LoadRegion`. Finally, if that fails, it calls `CreateRegion` as a last resort. Therefore, this will always return a `Region` object. +This is the universal function for accessing a `Region` object. You can pass any integer value as `x` and `y`, and the correct region will be retrieved. First, it calls `FindRegion`. If that fails, it calls `LoadRegion`. Finally, if that fails, it calls `CreateRegion` as a last resort. Therefore, this will always return a pointer to a `Region` object. ```C++ Region* FindRegion(int x, int y); @@ -58,13 +58,13 @@ This will fail, and return nullptr. It's intended for overwriting by RegionPager Region* CreateRegion(int x, int y); ``` -This will create a `Region` object with the coordinates `x` and `y`, add it to the RegionPagerBase, and return it. If an object with those coordinates already exist, it will throw an exception. +This will create a `Region` object with the coordinates `x` and `y`, add it to RegionPagerBase, and return it. If an object with those coordinates already exist, it will throw an exception. ```C++ void UnloadIf(std::function fn); ``` -This takes a function with the prototype `bool f(Region const&)` as a parameter. Each `Region` object that causes that function to return true will be destroyed and removed from the RegionPagerBase. +This takes a function with the prototype `bool f(Region const&)` as a parameter. Each `Region` object that causes that function to return true will be destroyed and removed from RegionPagerBase. ```C++ void UnloadAll(); @@ -76,7 +76,7 @@ This will destroy and unload all `Region` objects. void ForEach(std::function fn); ``` -This takes a function with the prototype `void f(Region&)` as a parameter, and passes each `Region` object to it. This is used for applying a certain function to each object inside RegionPagerLua. +This takes a function with the prototype `void f(Region&)` as a parameter, and passes each `Region` object to it, one at a time. This is used for applying a certain function to each object inside RegionPagerBase. ```C++ std::list* GetContainer();