Difference between revisions of "02A3"
Jump to navigation
Jump to search
m |
m |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | __NOTOC__ | |
− | + | {{OpCode | |
− | '' | + | | games = {{Icon|t}} |
− | ''' | + | | command = SWITCH_WIDESCREEN |
+ | | description = Enables widescreen | ||
+ | | syntax1 = 02A3: enable_widescreen [''int''] | ||
+ | | p1t = [''int''] | ||
+ | | p1d = 0 = off, {{hint|1|or any value other than 0}} = on | ||
+ | }} | ||
− | This opcode | + | This opcode enables widescreen by placing two black bars on the top and bottom of the screen. It is used mainly for cutscenes to make it look cinematic. When widescreen is enabled, the HUD, radar, crosshairs, scopes are disabled. In Vice City and San Andreas, the game cannot be paused (even minimizing the game won't pause the game when it usually does), text in the middle bottom of the screen is repositioned, text boxes do not appear visually but can be heard appearing, and the screen is squished. |
− | = | + | Widescreen effect in Vice City: |
− | + | {|class="wikitable" | |
− | + | !0 ||1 | |
− | [[ | + | |- |
+ | |[[File:VCWidescreenOff.jpg|256px]] ||[[File:VCWidescreenOn.jpg|256px]] | ||
+ | |} | ||
− | ==Keywords== | + | == Disassembled code == |
− | set, toggle, widescreen, black bars | + | These are disassembled code for this opcode both from PC v1.0 US. |
− | + | === GTA III === | |
+ | <syntaxhighlight lang="nasm"> | ||
+ | loc_44524F: | ||
+ | lea eax, [ebp+10h] ; get address of script's current instruction pointer | ||
+ | mov ecx, ebp ; get address of script for thiscall | ||
+ | push 1 ; push 1 for one parameter to collect | ||
+ | push eax ; push address of script's current instruction pointer | ||
+ | call CRunningScript::CollectParameters ; call CRunningScript::CollectParameters(uint *,short) | ||
+ | cmp ds:ScriptParams[0], 0 ; check whether or not value of first parameter is 0 | ||
+ | jz short loc_445271 | ||
+ | mov ecx, offset TheCamera ; get address of TheCamera for thiscall | ||
+ | call CCamera::SetWideScreenOn ; call CCamera::SetWideScreenOn(void) | ||
+ | jmp short loc_44527B | ||
+ | loc_445271: | ||
+ | mov ecx, offset TheCamera ; get address of TheCamera for thiscall | ||
+ | call CCamera::SetWideScreenOff ; call CCamera::SetWideScreenOff(void) | ||
+ | loc_44527B: | ||
+ | xor al, al ; return 0 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Vice City === | ||
+ | <syntaxhighlight lang="nasm"> | ||
+ | loc_457163: | ||
+ | lea eax, [ebp+10h] ; get address of script's current instruction pointer | ||
+ | mov ecx, ebp ; get address of script for thiscall | ||
+ | push 1 ; push 1 for one parameter to collect | ||
+ | push eax ; push address of script's current instruction pointer | ||
+ | call CRunningScript::CollectParameters ; call CRunningScript::CollectParameters(uint *,short) | ||
+ | cmp ds:ScriptParams[0], 0 ; check whether or not value of first parameter is 0 | ||
+ | jz short loc_457185 | ||
+ | mov ecx, offset TheCamera ; get address of TheCamera for thiscall | ||
+ | call CCamera::SetWideScreenOn ; call CCamera::SetWideScreenOn(void) | ||
+ | jmp short loc_45718F | ||
+ | loc_457185: | ||
+ | mov ecx, offset TheCamera ; get address of TheCamera for thiscall | ||
+ | call CCamera::SetWideScreenOff ; call CCamera::SetWideScreenOff(void) | ||
+ | loc_45718F: | ||
+ | xor al, al ; return 0 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Keywords == | ||
+ | set, toggle, widescreen, black bars, border |
Latest revision as of 04:29, 24 May 2017
- Description
- Enables widescreen
- Syntax
- 02A3: enable_widescreen [int]
- Parameter
- [int]
- 0 = off, 1 = on
This opcode enables widescreen by placing two black bars on the top and bottom of the screen. It is used mainly for cutscenes to make it look cinematic. When widescreen is enabled, the HUD, radar, crosshairs, scopes are disabled. In Vice City and San Andreas, the game cannot be paused (even minimizing the game won't pause the game when it usually does), text in the middle bottom of the screen is repositioned, text boxes do not appear visually but can be heard appearing, and the screen is squished.
Widescreen effect in Vice City:
0 | 1 |
---|---|
Disassembled code
These are disassembled code for this opcode both from PC v1.0 US.
GTA III
loc_44524F:
lea eax, [ebp+10h] ; get address of script's current instruction pointer
mov ecx, ebp ; get address of script for thiscall
push 1 ; push 1 for one parameter to collect
push eax ; push address of script's current instruction pointer
call CRunningScript::CollectParameters ; call CRunningScript::CollectParameters(uint *,short)
cmp ds:ScriptParams[0], 0 ; check whether or not value of first parameter is 0
jz short loc_445271
mov ecx, offset TheCamera ; get address of TheCamera for thiscall
call CCamera::SetWideScreenOn ; call CCamera::SetWideScreenOn(void)
jmp short loc_44527B
loc_445271:
mov ecx, offset TheCamera ; get address of TheCamera for thiscall
call CCamera::SetWideScreenOff ; call CCamera::SetWideScreenOff(void)
loc_44527B:
xor al, al ; return 0
Vice City
loc_457163:
lea eax, [ebp+10h] ; get address of script's current instruction pointer
mov ecx, ebp ; get address of script for thiscall
push 1 ; push 1 for one parameter to collect
push eax ; push address of script's current instruction pointer
call CRunningScript::CollectParameters ; call CRunningScript::CollectParameters(uint *,short)
cmp ds:ScriptParams[0], 0 ; check whether or not value of first parameter is 0
jz short loc_457185
mov ecx, offset TheCamera ; get address of TheCamera for thiscall
call CCamera::SetWideScreenOn ; call CCamera::SetWideScreenOn(void)
jmp short loc_45718F
loc_457185:
mov ecx, offset TheCamera ; get address of TheCamera for thiscall
call CCamera::SetWideScreenOff ; call CCamera::SetWideScreenOff(void)
loc_45718F:
xor al, al ; return 0
Keywords
set, toggle, widescreen, black bars, border