Difference between revisions of "03DA"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with "{{Icon|3}} {{Icon|VC}} '''NO_SPECIAL_CAMERA_FOR_THIS_GARAGE''' <hr /> '''Description''' : Disables special camera for the garage '''Syntax''' : 03DA: set_garage [''garage...")
 
(highlight)
 
Line 1: Line 1:
{{Icon|3}} {{Icon|VC}} '''NO_SPECIAL_CAMERA_FOR_THIS_GARAGE'''
+
{{OpCode
<hr />
+
| games      = {{Icon|3}} {{Icon|VC}}
'''Description'''
+
| command    = NO_SPECIAL_CAMERA_FOR_THIS_GARAGE
: Disables special camera for the [[garage]]
+
| description = Disables special camera for the [[garage]]
'''Syntax'''
+
| syntax1    = 03DA: set_garage [''garage handle''] camera_follows_player
: 03DA: set_garage [''garage handle''] camera_follows_player
+
| p1t        = [''garage handle'']
'''Parameter'''
+
| p1d        = The [[Garage#List of Garages|handle of the garage]]
: [''garage handle'']
+
}}
:: The [[Garage#List of Garages|handle of the garage]]
 
  
 
By default, when a garage is created, entering the garage places the camera outside the garage at a fixed position and the camera will track the player character as you move around in the garage (this does not happen when in standard controls on foot in Vice City). This opcode disables that special camera for the garage, allowing the regular game camera to be in control.
 
By default, when a garage is created, entering the garage places the camera outside the garage at a fixed position and the camera will track the player character as you move around in the garage (this does not happen when in standard controls on foot in Vice City). This opcode disables that special camera for the garage, allowing the regular game camera to be in control.
Line 13: Line 12:
 
== Reenabling special camera ==
 
== Reenabling special camera ==
 
This supplemental code allows you to reenable the special camera for the garage. It uses Sanny Builder with [[CLEO]] for GTA III and Vice City in an external script (not the main one) and tested on US v1.0. Place this at the end of the file for Vice City:
 
This supplemental code allows you to reenable the special camera for the garage. It uses Sanny Builder with [[CLEO]] for GTA III and Vice City in an external script (not the main one) and tested on US v1.0. Place this at the end of the file for Vice City:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
:opcode_03DA_supplement
+
<span class="nl">:opcode_03DA_supplement</span>
// 0@ - input param (garage handle)
+
<span class="c1">// 0@ - input param (garage handle)</span>
0@ *= 0xA8  // size of each garage struct
+
<span class="nv">0@</span> *= <span class="m">0xA8</span> <span class="c1">// size of each garage struct</span>
0@ += 0x812668  // base address for garages
+
<span class="nv">0@</span> += <span class="m">0x812668</span> <span class="c1">// base address for garages</span>
0@ += 0x1A  // special camera for garage
+
<span class="nv">0@</span> += <span class="m">0x1A</span> <span class="c1">// special camera for garage</span>
05DF: write_memory 0@ size 1 value 0 virtual_protect 0  // set value
+
05DF: write_memory <span class="nv">0@</span> size <span class="m">1</span> value <span class="m">0</span> virtual_protect <span class="m">0</span> <span class="c1">// set value</span>
05F6: ret 0
+
05F6: ret <span class="m">0</span>
</syntaxhighlight>
+
}}
  
 
or for GTA III:
 
or for GTA III:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
:opcode_03DA_supplement
+
<span class="nl">:opcode_03DA_supplement</span>
// 0@ - input param (garage handle)
+
<span class="c1">// 0@ - input param (garage handle)</span>
0@ *= 0x8C  // size of each garage struct
+
<span class="nv">0@</span> *= <span class="m">0x8C</span> <span class="c1">// size of each garage struct</span>
0@ += 0x72BCD0  // base address for garages
+
<span class="nv">0@</span> += <span class="m">0x72BCD0</span> <span class="c1">// base address for garages</span>
0@ += 0x1A  // special camera for garage
+
<span class="nv">0@</span> += <span class="m">0x1A</span> <span class="c1">// special camera for garage</span>
05DF: write_memory 0@ size 1 value 0 virtual_protect 0  // set value
+
05DF: write_memory <span class="nv">0@</span> size <span class="m">1</span> value <span class="m">0</span> virtual_protect <span class="m">0</span> <span class="c1">// set value</span>
05F6: ret 0
+
05F6: ret <span class="m">0</span>
</syntaxhighlight>
+
}}
  
 
Use this line as a supplement for opcode 03DA. This can be placed anywhere within the external script:
 
Use this line as a supplement for opcode 03DA. This can be placed anywhere within the external script:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
05F5: call_scm_func @opcode_03DA_supplement inputs 1 garage [garage handle]
+
05F5: call_scm_func <span class="nl">@opcode_03DA_supplement</span> inputs <span class="m">1</span> garage [garage handle]
</syntaxhighlight>
+
}}
  
 
== Keywords ==
 
== Keywords ==
 
set, garage, special, camera, follows, player
 
set, garage, special, camera, follows, player
  
[[Category:OpCodes]]
 
 
[[Category:Code Snippets]]
 
[[Category:Code Snippets]]

Latest revision as of 03:58, 25 November 2016

GTA III Vice City NO_SPECIAL_CAMERA_FOR_THIS_GARAGE


Description
Disables special camera for the garage
Syntax
03DA: set_garage [garage handle] camera_follows_player
Parameter
[garage handle]
The handle of the garage

By default, when a garage is created, entering the garage places the camera outside the garage at a fixed position and the camera will track the player character as you move around in the garage (this does not happen when in standard controls on foot in Vice City). This opcode disables that special camera for the garage, allowing the regular game camera to be in control.

Reenabling special camera

This supplemental code allows you to reenable the special camera for the garage. It uses Sanny Builder with CLEO for GTA III and Vice City in an external script (not the main one) and tested on US v1.0. Place this at the end of the file for Vice City:

:opcode_03DA_supplement
// 0@ - input param (garage handle)
0@ *= 0xA8  // size of each garage struct
0@ += 0x812668  // base address for garages
0@ += 0x1A  // special camera for garage
05DF: write_memory 0@ size 1 value 0 virtual_protect 0  // set value
05F6: ret 0

or for GTA III:

:opcode_03DA_supplement
// 0@ - input param (garage handle)
0@ *= 0x8C  // size of each garage struct
0@ += 0x72BCD0  // base address for garages
0@ += 0x1A  // special camera for garage
05DF: write_memory 0@ size 1 value 0 virtual_protect 0  // set value
05F6: ret 0

Use this line as a supplement for opcode 03DA. This can be placed anywhere within the external script:

05F5: call_scm_func @opcode_03DA_supplement inputs 1 garage [garage handle]

Keywords

set, garage, special, camera, follows, player