.module trigger_16_interact

.include "vm.i"
.include "data/game_globals.i"
.include "macro.i"

.globl _fade_frames_per_step, _camera_settings, ___bank_scene_5, _scene_5

.area _CODE_255

.LOCAL_ACTOR = -4

___bank_trigger_16_interact = 255
.globl ___bank_trigger_16_interact

_trigger_16_interact::
        VM_LOCK

        VM_RESERVE              4

GBVM$trigger_16_interact$541b068c_0227_425c_90a4_e34413beb95b$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script = .
.globl GBVM$trigger_16_interact$541b068c_0227_425c_90a4_e34413beb95b$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script
        ; If
        ; -- If Truthy
        VM_IF_CONST             .NE, VAR_QUEST3_0, 0, 1$, 0
GBVM$trigger_16_interact$ff7f5f35_a032_4717_a954_05faa215e9c9$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script = .
.globl GBVM$trigger_16_interact$ff7f5f35_a032_4717_a954_05faa215e9c9$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script
        ; Text Dialogue
        VM_LOAD_TEXT            0
        .asciz "Its locked?"
        VM_OVERLAY_CLEAR        0, 0, 20, 4, .UI_COLOR_WHITE, .UI_DRAW_FRAME
        VM_OVERLAY_MOVE_TO      0, 18, .OVERLAY_SPEED_INSTANT
        VM_OVERLAY_MOVE_TO      0, 14, .OVERLAY_IN_SPEED
        VM_OVERLAY_SET_SCROLL   1, 1, 18, 5, .UI_COLOR_WHITE
        VM_DISPLAY_TEXT
        VM_OVERLAY_WAIT         .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT | .UI_WAIT_BTN_ANY)/
        VM_LOAD_TEXT            0
        .asciz "fate6 had the key\012last!"
        VM_OVERLAY_CLEAR        0, 0, 20, 4, .UI_COLOR_WHITE, .UI_DRAW_FRAME
        VM_DISPLAY_TEXT
        VM_OVERLAY_WAIT         .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT | .UI_WAIT_BTN_ANY)/
        VM_LOAD_TEXT            0
        .asciz "I should head to\012his place."
        VM_OVERLAY_CLEAR        0, 0, 20, 4, .UI_COLOR_WHITE, .UI_DRAW_FRAME
        VM_DISPLAY_TEXT
        VM_OVERLAY_WAIT         .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT | .UI_WAIT_BTN_ANY)/
        VM_OVERLAY_MOVE_TO      0, 18, .OVERLAY_OUT_SPEED
        VM_OVERLAY_WAIT         .UI_MODAL, ^/(.UI_WAIT_WINDOW | .UI_WAIT_TEXT)/

        VM_JUMP                 2$
1$:
GBVM$trigger_16_interact$965bcb68_8580_4cc2_99ef_f7c5683dd787$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script = .
.globl GBVM$trigger_16_interact$965bcb68_8580_4cc2_99ef_f7c5683dd787$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script
        ; Variable Set To
        VM_SET_CONST            VAR_QUEST4_0, 1

GBVM$trigger_16_interact$03be24c0_f516_4659_bb08_0fae3748c432$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script = .
.globl GBVM$trigger_16_interact$03be24c0_f516_4659_bb08_0fae3748c432$aae81f2f_404d_41db_a9fd_32c62d07c37e$trigger$d8fc0432_d96c_4127_b071_aa458082c9cb$script
        ; Load Scene
        VM_SET_CONST_INT8       _fade_frames_per_step, 3
        VM_FADE_OUT             1
        ; -- Calculate coordinate values
        VM_RPN
            .R_INT16    1152
            .R_REF_SET  ^/(.LOCAL_ACTOR + 1)/
            .R_INT16    1920
            .R_REF_SET  ^/(.LOCAL_ACTOR + 2)/
            .R_STOP
        VM_SET_CONST            .LOCAL_ACTOR, 0
        VM_ACTOR_SET_POS        .LOCAL_ACTOR
        VM_ACTOR_SET_DIR        .LOCAL_ACTOR, .DIR_UP
        VM_SET_CONST_INT8       _camera_settings, .CAMERA_LOCK
        VM_RAISE                EXCEPTION_CHANGE_SCENE, 3
            IMPORT_FAR_PTR_DATA _scene_5

2$:

GBVM_END$trigger_16_interact$541b068c_0227_425c_90a4_e34413beb95b = .
.globl GBVM_END$trigger_16_interact$541b068c_0227_425c_90a4_e34413beb95b
        ; Stop Script
        VM_STOP
