Difference between revisions of "09C8"
Jump to navigation
Jump to search
(page rewrite) |
|||
Line 1: | Line 1: | ||
− | + | {{OpCode | |
− | + | | games = {{Icon|SA}} | |
− | ''' | + | | command = ARE_SUBTITLES_SWITCHED_ON |
+ | | description = Checks if subtitles are switched on | ||
+ | | syntax1 = 09C8: menu_subtitles_switched_on | ||
+ | | p1t = [''none''] | ||
+ | }} | ||
− | + | This conditional opcode returns true if the subtitles menu option is switched on. | |
− | |||
− | [[Category: | + | == For GTA III and Vice City == |
+ | This opcode does not exist in GTA III and Vice City but it is possible to check if subtitles are switched on. The following example, using Sanny Builder with [[CLEO]] for GTA III and Vice City in an external script (not the main one) and tested on US v1.0, should work similarly to this opcode. Place this at the end of the file for Vice City: | ||
+ | <syntaxhighlight lang="scm"> | ||
+ | :opcode_09C8 | ||
+ | 05E0: 0@ = read_memory 0x869650 size 1 virtual_protect 0 | ||
+ | 0@ == 1 | ||
+ | 05F6: ret 0 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | or for GTA III: | ||
+ | <syntaxhighlight lang="scm"> | ||
+ | :opcode_09C8 | ||
+ | 05E0: 0@ = read_memory 0x5F2E54 size 1 virtual_protect 0 | ||
+ | 0@ == 1 | ||
+ | 05F6: ret 0 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Use this line as a substitute for opcode 09C8. This can be placed anywhere within the external script as a conditional statement: | ||
+ | <syntaxhighlight lang="scm"> | ||
+ | // ... | ||
+ | if | ||
+ | 05F5: call_scm_func @opcode_09C8 inputs 0 | ||
+ | then | ||
+ | // [RETURNED TRUE] | ||
+ | else | ||
+ | // [RETURNED FALSE] | ||
+ | end | ||
+ | // ... | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Keywords == | ||
+ | check, are, menu, subtitle, subtitles, option, switch, switched, on | ||
+ | |||
+ | [[Category:Code Snippets]] |
Latest revision as of 16:19, 4 June 2016
- Description
- Checks if subtitles are switched on
- Syntax
- 09C8: menu_subtitles_switched_on
- Parameter
- [none]
This conditional opcode returns true if the subtitles menu option is switched on.
For GTA III and Vice City
This opcode does not exist in GTA III and Vice City but it is possible to check if subtitles are switched on. The following example, using Sanny Builder with CLEO for GTA III and Vice City in an external script (not the main one) and tested on US v1.0, should work similarly to this opcode. Place this at the end of the file for Vice City:
:opcode_09C8
05E0: 0@ = read_memory 0x869650 size 1 virtual_protect 0
0@ == 1
05F6: ret 0
or for GTA III:
:opcode_09C8
05E0: 0@ = read_memory 0x5F2E54 size 1 virtual_protect 0
0@ == 1
05F6: ret 0
Use this line as a substitute for opcode 09C8. This can be placed anywhere within the external script as a conditional statement:
// ...
if
05F5: call_scm_func @opcode_09C8 inputs 0
then
// [RETURNED TRUE]
else
// [RETURNED FALSE]
end
// ...
Keywords
check, are, menu, subtitle, subtitles, option, switch, switched, on