<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Shellrider</id>
	<title>MiniScript Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Shellrider"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/wiki/Special:Contributions/Shellrider"/>
	<updated>2026-05-13T21:56:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Qa.assert&amp;diff=1436</id>
		<title>Qa.assert</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Qa.assert&amp;diff=1436"/>
		<updated>2025-09-20T13:06:32Z</updated>

		<summary type="html">&lt;p&gt;Shellrider: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use this function if you want to make sure that a specific fact is true at a certain point of your program. The function takes an condition and an optional description as parameters. This is often useful when writing tests or to check inputs to functions. In case the condition is not met this function uses [[qa.abort|abort(errMsg)]] to halt script execution and print a stack trace.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
  import &amp;quot;qa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  createPerson = function (age)&lt;br /&gt;
    qa.assert age &amp;gt;= 0, &amp;quot;age can not be negative&amp;quot;&lt;br /&gt;
    noob = {}&lt;br /&gt;
    noob.age = age&lt;br /&gt;
    return noob&lt;br /&gt;
  end function&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shellrider</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Qa.assert&amp;diff=1435</id>
		<title>Qa.assert</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Qa.assert&amp;diff=1435"/>
		<updated>2025-09-20T13:06:00Z</updated>

		<summary type="html">&lt;p&gt;Shellrider: Created page with &amp;quot;You can use this function if you want to make sure that a specific fact is true at a certain point of your program. The function takes an condition and an optional description...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use this function if you want to make sure that a specific fact is true at a certain point of your program. The function takes an condition and an optional description as parameters. This is often useful when writing tests or to check inputs to functions. In case the condition is not met this function uses [[qa.abort|abort(errMsg)]] to halt script execution and print a stack trace.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
  import &amp;quot;qa&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  createPerson = function (age)&lt;br /&gt;
    qa.assert(age &amp;gt;= 0, &amp;quot;age can not be negative)&lt;br /&gt;
    noob = {}&lt;br /&gt;
    noob.age = age&lt;br /&gt;
    return noob&lt;br /&gt;
  end function&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shellrider</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Sprite&amp;diff=1421</id>
		<title>Sprite</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Sprite&amp;diff=1421"/>
		<updated>2025-07-04T09:36:52Z</updated>

		<summary type="html">&lt;p&gt;Shellrider: Change pare to pair. Either it was a mistake before, or it was less accessible language. Pair is more easily understood.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;Sprite&amp;lt;/c&amp;gt; is a built-in class in the [[Mini Micro]] API.  It represents an image which can be added to a [[SpriteDisplay]], enabling it to be drawn to the screen very efficiently while also being scaled, rotated, or tinted, and layered consistently with other sprites and the surrounding displays.&lt;br /&gt;
&lt;br /&gt;
== Methods and properties used with Sprite objects ==&lt;br /&gt;
&lt;br /&gt;
Use these methods on Sprite instances, created with &amp;lt;c&amp;gt;[[new]] Sprite&amp;lt;/c&amp;gt;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method or Property !! Purpose !! Type&lt;br /&gt;
|-&lt;br /&gt;
| colspan=3 style=&amp;quot;text-align: center;&amp;quot; | '''Edit and read'''&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.image]] || image displayed  by the sprite || [[Image]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.x]] || horizontal position of the sprite || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.y]] || vertical position of the sprite || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.scale]] || sprite scale (default 1.0) || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.rotation]] || sprite rotation (degrees counter-clockwise) || number&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.tint]] || tint color (defaults to white) || string (color)&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.localBounds]] || stores the local bounds of the sprite || [[Bounds]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=3 style=&amp;quot;text-align: center;&amp;quot; | '''Read only'''&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.worldBounds]] || computes world bounds from local bounds and current position || pair of numbers&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.contains]](''x'', ''y'') || return whether the sprite contains the given world point || bool&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.overlaps]](''other'') || return whether this sprite is touching another sprite or [[Bounds]] || bool&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.corners]] || return &amp;lt;c&amp;gt;[x,y]&amp;lt;/c&amp;gt; screen positions of the four corners of this sprite, counter-clockwise from bottom left || 4 pairs of numbers&lt;br /&gt;
|-&lt;br /&gt;
| colspan=3  style=&amp;quot;text-align: center;&amp;quot;| '''Run'''&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| [[Sprite.setCorners]] ''corners''|| set new screen positions for the four sprite corners (counter-clockwise from bottom left)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage Notes (Soda) ==&lt;br /&gt;
&lt;br /&gt;
In [[Soda]] there is currently only one, implicit, [[Display]].  So to add sprites to this display, push them onto a global list called &amp;lt;c&amp;gt;sprites&amp;lt;/c&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Soda]] does not currently support [[Sprite.corners]] or [[Sprite.setCorners]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
This example creates a sprite, loads it into display 4 (which by default is a [[SpriteDisplay]]), and rotates it through 360 degrees.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;spr = new Sprite&lt;br /&gt;
spr.image = file.loadImage(&amp;quot;/sys/pics/Wumpus.png&amp;quot;)&lt;br /&gt;
display(4).sprites.push spr&lt;br /&gt;
spr.x = 480&lt;br /&gt;
spr.y = 320&lt;br /&gt;
for r in range(0,360)&lt;br /&gt;
   spr.rotation = r&lt;br /&gt;
   yield&lt;br /&gt;
end for&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[How to move a sprite forward]]&lt;br /&gt;
* [[How to detect a click on a sprite]]&lt;br /&gt;
* [[How to move a sprite with directional inputs]]&lt;br /&gt;
* [[How to load a sprite from the web]]&lt;br /&gt;
* [[How to make a sprite translucent]]&lt;br /&gt;
* [[How to move a sprite towards a target]]&lt;br /&gt;
* [[How to point a sprite at a target]]&lt;br /&gt;
* [[How to use a sprite sheet]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Mini Micro]]&lt;br /&gt;
[[Category: Soda]]&lt;/div&gt;</summary>
		<author><name>Shellrider</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=Color.lerp&amp;diff=740</id>
		<title>Color.lerp</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=Color.lerp&amp;diff=740"/>
		<updated>2021-07-09T11:39:20Z</updated>

		<summary type="html">&lt;p&gt;Shellrider: Initial write up of color.lerp&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;color.lerp&amp;lt;/c&amp;gt; is a method that implements linear interpolation between two colors. It is commonly used for changing colors over time or painting gradients.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
The method has this signature: &amp;lt;c&amp;gt;color.lerp c1, c2, t&amp;lt;/c&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| c1|| First color in hexcolor format&lt;br /&gt;
|-&lt;br /&gt;
| c2|| Second color in hexcolor format&lt;br /&gt;
|-&lt;br /&gt;
| t|| Variable for how far to interpolate between the two colors (t &amp;lt;= 0 retunrs c1, t &amp;gt;= 0 returns c2, 0 &amp;lt; t &amp;lt; 1 returns color inbetween)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;&lt;br /&gt;
color.lerp color.red, color.blue, 0&lt;br /&gt;
 #FF0000FF&lt;br /&gt;
color.lerp color.red, color.blue, 1&lt;br /&gt;
 #0000FFFF&lt;br /&gt;
color.lerp color.red, color.blue, 0.5&lt;br /&gt;
 #7F007FFF&lt;br /&gt;
color.lerp color.red, color.blue, 0.25&lt;br /&gt;
 #BF003FFF&lt;br /&gt;
&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also [[Color]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>Shellrider</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=TileDisplay.cellTint&amp;diff=721</id>
		<title>TileDisplay.cellTint</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=TileDisplay.cellTint&amp;diff=721"/>
		<updated>2021-07-08T08:49:19Z</updated>

		<summary type="html">&lt;p&gt;Shellrider: Initial write up of page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;c&amp;gt;TileDisplay.cellTint&amp;lt;/c&amp;gt; is a method to get the tint colour of a specific cell in the [[TileDisplay]].&lt;br /&gt;
&lt;br /&gt;
== Example usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;c&amp;gt;display(4).cellTint(1,1)&amp;lt;/c&amp;gt; returns the tint colour of cell 1,1.&lt;br /&gt;
&lt;br /&gt;
To set the tint colour of a cell use [[TileDisplay.setCellTint]]&lt;br /&gt;
&lt;br /&gt;
See also: [[TileDisplay.tileSet]], [[TileDisplay]], [[TileDisplay.setCellTint]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>Shellrider</name></author>
		
	</entry>
	<entry>
		<id>http://miniscript.org/w/index.php?title=TileDisplay.cellSize&amp;diff=720</id>
		<title>TileDisplay.cellSize</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=TileDisplay.cellSize&amp;diff=720"/>
		<updated>2021-07-08T08:37:14Z</updated>

		<summary type="html">&lt;p&gt;Shellrider: Initial write up of page analogous to TileDisplay.tileSetTileSize&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;lt;c&amp;gt;TileDisplay.cellSize&amp;lt;/c&amp;gt; property defines the size (in pixels) of the tiles drawn to the screen by a [[TileDisplay]].&lt;br /&gt;
&lt;br /&gt;
The value may be either:&lt;br /&gt;
* a simple [[number]], used as both the width and the height of square tiles; or&lt;br /&gt;
* a &amp;lt;c&amp;gt;[width, height]&amp;lt;/c&amp;gt; list (i.e. a 2-element list of numbers), defining the tile width and height separately.&lt;br /&gt;
&lt;br /&gt;
To set the size of the tiles in the source image, use [[TileDisplay.tileSetTileSize]]&lt;br /&gt;
&lt;br /&gt;
See also: [[TileDisplay.tileSet]], [[TileDisplay.setCell]], [[TileDisplay.tileSetTileSize]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;/div&gt;</summary>
		<author><name>Shellrider</name></author>
		
	</entry>
</feed>