<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gtamods.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=0AA6</id>
	<title>0AA6 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://gtamods.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=0AA6"/>
	<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=0AA6&amp;action=history"/>
	<updated>2026-04-06T18:57:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=0AA6&amp;diff=16856&amp;oldid=prev</id>
		<title>Spaceeinstein: Created page with &quot;{{This|For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05E3.}} {{OpCode | games       = {{Icon|t}} (with CLEO) | description = Calls a method | syntax1...&quot;</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=0AA6&amp;diff=16856&amp;oldid=prev"/>
		<updated>2017-02-09T00:12:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{This|For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05E3.}} {{OpCode | games       = {{Icon|t}} (with &lt;a href=&quot;/wiki/CLEO&quot; title=&quot;CLEO&quot;&gt;CLEO&lt;/a&gt;) | description = Calls a method | syntax1...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{This|For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05E3.}}&lt;br /&gt;
{{OpCode&lt;br /&gt;
| games       = {{Icon|t}} (with [[CLEO]])&lt;br /&gt;
| description = Calls a method&lt;br /&gt;
| syntax1     = 0AA6: call_method [''int1''] struct [''int2''] num_params [''int3''] pop [''int4''] ( [''any''] ... )&lt;br /&gt;
| p1t         = [''int1'']&lt;br /&gt;
| p1d         = [[:Category:Memory Addresses|Memory address]]&lt;br /&gt;
| p2t         = [''int2'']&lt;br /&gt;
| p2d         = Structure&lt;br /&gt;
| p3t         = [''int3'']&lt;br /&gt;
| p3d         = Number of parameters&lt;br /&gt;
| p4t         = [''int4'']&lt;br /&gt;
| p4d         = Size to pop&lt;br /&gt;
| p5t         = [''any'']&lt;br /&gt;
| p5d         = Any values to push (optional)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This [[CLEO]] opcode calls a method (also known as a non-static member function in C++) located at the memory address. These functions use the [[wikipedia:X86 calling conventions#thiscall|thiscall calling convention]]. When they are called, a &amp;quot;this&amp;quot; pointer referencing the object's structure is passed to the function. The number of parameters determines the number of arguments to pass onto the call stack. The size to pop depends if the caller or callee cleans the call stack. If the callee cleans the stack (which generally happens for the thiscall calling convention), the size to pop should be ''0''. The order to pass the arguments is reversed from the function's parameter order.&lt;br /&gt;
&lt;br /&gt;
For example, a method call in C++ in Vice City can look like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
TheCamera.CCamera::CamShake(1.0, 10.0, 20.0, 30.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;TheCamera&amp;lt;/code&amp;gt; is the structure for the game's camera object located at 0x7E4688. &amp;lt;code&amp;gt;[[Function Memory Addresses (VC)#CCamera|CCamera::CamShake]]&amp;lt;/code&amp;gt; is a member function located at 0x46FF21 with four parameters all accepting floating-point values: intensity, x-coordinate, y-coordinate, and z-coordinate. To call this function using this opcode in Vice City, it should look like this:&lt;br /&gt;
{{Pre|class=sb-code|1=&lt;br /&gt;
0AA6: call_method &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;0x46FF21&amp;lt;/span&amp;gt; struct &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;0x7E4688&amp;lt;/span&amp;gt; num_params &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;4&amp;lt;/span&amp;gt; pop &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;0&amp;lt;/span&amp;gt; z &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;30.0&amp;lt;/span&amp;gt; y &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;20.0&amp;lt;/span&amp;gt; x &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;10.0&amp;lt;/span&amp;gt; intensity &amp;lt;span class=&amp;quot;m&amp;quot;&amp;gt;1.0&amp;lt;/span&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
:''See [[0136#For Vice City]], [[0ADC#Example]]''&lt;br /&gt;
&lt;br /&gt;
== Keywords ==&lt;br /&gt;
call, method, member, function&lt;br /&gt;
&lt;br /&gt;
[[Category:CLEO Opcodes]]&lt;/div&gt;</summary>
		<author><name>Spaceeinstein</name></author>
		
	</entry>
</feed>