Clean up markup for PlaceSprite and EraseSprite and clarify some stuff
authorWuzzy
Fri, 01 Jan 2016 17:00:40 +0000
changeset 692 111f39408390
parent 691 30323b8a8830
child 693 4e3ab1b3ff32
Clean up markup for PlaceSprite and EraseSprite and clarify some stuff
LuaAPI.wiki
--- a/LuaAPI.wiki	Fri Jan 01 16:53:29 2016 +0000
+++ b/LuaAPI.wiki	Fri Jan 01 17:00:40 2016 +0000
@@ -941,7 +941,7 @@
  * `sprCustom1`
  * `sprCustom2`
 
-Tint is for an RGBA colouring to apply, this works about the same as Tint in gears.  Behind indicates the sprite should not replace existing land. flipHoriz and flipVert are for flipping the sprite vertically and horizontally before placing.
+`tint` is for an RGBA colouring to apply, this works about the same as `Tint` in gears. `behind` indicates the sprite should not replace existing land. `flipHoriz` and `flipVert` are for mirroring the sprite vertically and horizontally before placing, respectively.
 The 9th and later arguments specify land flags (see the constants section) to be used for the newly created terrain. If omited, `lfNormal` is assumed.
 
 Example:
@@ -952,18 +952,18 @@
 -- Places the rubber band sprite as bouncy terrain at (2836, 634). The `frameIdx` 1 is for the decreasing right rubber band.</code>
 
 ==== <tt>!EraseSprite(x, y, sprite, frameIdx, eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert, [, landFlag, ...])</tt> ====
-Erases a [Sprites sprite] at the specified position (`x`, `y`) on the map. `frameIdx` is the frame index starting by 0. sprite, frameIdx, flipHoriz and flipVert behave the same as in PlaceSprite.
+Erases a [Sprites sprite] at the specified position (`x`, `y`) on the map. `frameIdx` is the frame index starting by 0. `sprite`, `frameIdx`, `flipHoriz` and `flipVert` behave the same as in `PlaceSprite`. For `sprite`, the same subset of sprites is permitted.
 
-Set eraseOnLFMatch to true to erase all land for a pixel that matches any of the passed in land flags.  This is useful if, for example, an lfBouncy sprite was placed "behind" land using PlaceSprite and you want to remove it without destroying the non-bouncy terrain.
+Set `eraseOnLFMatch` to `true` to erase all land for a pixel that matches any of the passed in land flags.  This is useful if, for example, an `lfBouncy` sprite was placed “behind” land using `PlaceSprite` and you want to remove it without destroying the non-bouncy terrain.
 
-Set onlyEraseLF to true to only remove specific land flags.  If for example a sprite consists of lfIndestructible and lfBouncy, and you call EraseSprite with onlyEraseLF and lfIndestructible set, the sprite will remain bouncy but can be destroyed.  You can use this to entirely remove all land flags from a sprite - at this point the sprite will be visual only, painted on the map but with no collision.
+Set `onlyEraseLF` to `true` to only remove specific land flags. If for example a sprite consists of `lfIndestructible` and `lfBouncy`, and you call `EraseSprite` with `onlyEraseLF` and `lfIndestructible` set, the sprite will remain bouncy but can be destroyed.  You can use this to entirely remove all land flags from a sprite—at this point the sprite will be visual only, painted on the map but with no collision.
 
-Example:
+Examples:
 
 <code language="lua">EraseSprite(2836, 634, sprAmGirder, 5)
--- Removes the girder sprite at (2836, 634). The `frameIdx` 5 is for the long decreasing right girder.</code>
+-- Removes the girder sprite at (2836, 634). The frameIdx 5 is for the long decreasing right girder.</code>
 <code language="lua">EraseSprite(1411, 625, sprAmRubber, 1, true, true, nil, nil, lfIndestructible)
--- Removes indestructibility from a rubber band sprite at (2836, 634). The `frameIdx` 1 is for the decreasing right rubber band.</code>
+-- Removes indestructibility from a rubber band sprite at (2836, 634). The frameIdx 1 is for the decreasing right rubber band.</code>
 
 ==== <tt>!AddPoint(x, y [, width [, erase] ])</tt> (0.9.21) ====
 This function is used to draw your own maps using Lua. The maps drawn with this are of type “hand-drawn”.