02A3

From GTAMods Wiki
Jump to navigation Jump to search

GTA III Vice City San Andreas SWITCH_WIDESCREEN


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
VCWidescreenOff.jpg VCWidescreenOn.jpg

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