<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Reposition</id>
	<title>Reposition - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sierrahelp.com/index.php?action=history&amp;feed=atom&amp;title=Reposition"/>
	<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Reposition&amp;action=history"/>
	<updated>2026-12-02T15:20:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Reposition&amp;diff=70830&amp;oldid=prev</id>
		<title>Andrew Branscom: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Reposition&amp;diff=70830&amp;oldid=prev"/>
		<updated>2025-02-16T20:58:21Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:58, 16 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Reposition&amp;diff=70829&amp;oldid=prev</id>
		<title>Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Reposition&amp;diff=70829&amp;oldid=prev"/>
		<updated>2024-06-03T05:11:43Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:11, 3 June 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Andrew Branscom</name></author>
	</entry>
	<entry>
		<id>http://wiki.sierrahelp.com/index.php?title=Reposition&amp;diff=70828&amp;oldid=prev</id>
		<title>sierraw&gt;Andrew Branscom: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.sierrahelp.com/index.php?title=Reposition&amp;diff=70828&amp;oldid=prev"/>
		<updated>2022-01-28T16:19:47Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;reposition&amp;#039;&amp;#039;&amp;#039; command changes the position of a screen object currently drawn on the screen by an amount relative to its current position.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
reposition([[screen object|obj]] oA, [[variable|var]] vDX, [[variable|var]] vDY);&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
The position of [[screen object]] &amp;#039;&amp;#039;&amp;#039;oA&amp;#039;&amp;#039;&amp;#039; is changed to (X + &amp;#039;&amp;#039;&amp;#039;vDX&amp;#039;&amp;#039;&amp;#039;, Y + &amp;#039;&amp;#039;&amp;#039;vDY&amp;#039;&amp;#039;&amp;#039;) where X and Y are its current coordinates. The values of &amp;#039;&amp;#039;&amp;#039;vDX&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;vDY&amp;#039;&amp;#039;&amp;#039; are treated as 8 bit signed numbers (values &amp;amp;gt;= 128 are negative numbers, i.e. 255 = -1, 254 = -2, etc.) Mathematically this is represented as &amp;lt;code&amp;gt;delta = value - 256&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The new location is validated using the [[shuffle]] function.&lt;br /&gt;
&lt;br /&gt;
The [[WinAGI]] compiler allows negative numbers to be assigned to [[variable|variables]] to facilitate use of the &amp;#039;&amp;#039;&amp;#039;reposition&amp;#039;&amp;#039;&amp;#039; command. The negative number is automatically converted to the correct unsigned 8-bit value. Other AGI compilers may not support this feature.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;reposition&amp;#039;&amp;#039;&amp;#039; command erases the [[screen object]] from its old location before redrawing it in its new location.&lt;br /&gt;
&lt;br /&gt;
This command can be executed on a [[screen object]] that has been [[animate.obj|initialized]] but not yet [[draw|drawn]]. In this case it will reposition the object without redrawing it.&lt;br /&gt;
&lt;br /&gt;
Use the &amp;#039;&amp;#039;&amp;#039;[[reposition.to]]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;[[reposition.to.v]]&amp;#039;&amp;#039;&amp;#039; commands to change an object&amp;#039;s position using absolute coordinates.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
AGI does not check that object number &amp;#039;&amp;#039;&amp;#039;oA&amp;#039;&amp;#039;&amp;#039; is a valid [[screen object]]. If it is not, this command will overwrite other data on the [[memory heap]], which may cause unexpected results, including possibly [[crashing AGI]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
[ move an object down 32 pixels, over 8 pixels&lt;br /&gt;
v255 = 8;&lt;br /&gt;
v201 = 0;&lt;br /&gt;
v201 = v201 - v255;  [ convert to negative value&lt;br /&gt;
v255 = 32;&lt;br /&gt;
v202 = 0;&lt;br /&gt;
v202 = v202 - v255;  [ convert to negative value&lt;br /&gt;
reposition(o4, v201, v202);  [ make the move&lt;br /&gt;
&lt;br /&gt;
[ in WinAGI you can do this:&lt;br /&gt;
v201 = -8;&lt;br /&gt;
v202 = -32;&lt;br /&gt;
reposition(o4, v201, v202);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in all AGI versions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 40 (0x28 hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[position]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[position.v]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[reposition.to]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[reposition.to.v]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>sierraw&gt;Andrew Branscom</name></author>
	</entry>
</feed>