|
1
|
if (!setupComplete)
|
|
2
|
{
|
|
3
|
puzzleSurfState = surface_create(puzzleSize, puzzleSize);
|
|
4
|
surface_set_target(puzzleSurfState);
|
|
5
|
draw_clear_alpha(c_black, 0);
|
|
6
|
draw_sprite_ext(sprite_index, 1, 0, 0, image_xscale, image_yscale, image_angle, c_white, 1);
|
|
7
|
var _buffer = buffer_create(puzzleSize * puzzleSize * 4, buffer_fixed, 1);
|
|
8
|
buffer_get_surface(_buffer, puzzleSurfState, 0);
|
|
9
|
bufferGoal = buffer_md5(_buffer, 0, buffer_get_size(_buffer));
|
|
10
|
buffer_delete(_buffer);
|
|
11
|
draw_clear_alpha(c_black, 0);
|
|
12
|
surface_reset_target();
|
|
13
|
setupComplete = true;
|
|
14
|
}
|
|
15
|
if (insideOnly && setupComplete && goalCheck && room == room_dw_mansion_darkbulb_3)
|
|
16
|
{
|
|
17
|
with (obj_shapepuzzlepiece)
|
|
18
|
{
|
|
19
|
if (image_index == 6)
|
|
20
|
{
|
|
21
|
var _sideways = (image_angle % 180) != 0;
|
|
22
|
var __x = x;
|
|
23
|
var __y = y;
|
|
24
|
var __yy = y;
|
|
25
|
var __xx = x;
|
|
26
|
if (_sideways)
|
|
27
|
{
|
|
28
|
__x = x + lengthdir_x(20, image_angle - 90);
|
|
29
|
__yy = y + lengthdir_y(108, image_angle);
|
|
30
|
__xx = x + lengthdir_x(106, image_angle - 90);
|
|
31
|
}
|
|
32
|
else
|
|
33
|
{
|
|
34
|
__y = y + lengthdir_y(20, image_angle - 90);
|
|
35
|
__xx = x + lengthdir_x(108, image_angle);
|
|
36
|
__yy = y + lengthdir_y(106, image_angle - 90);
|
|
37
|
}
|
|
38
|
if (min(__xx, __x) < other.x || max(__xx, __x) > (other.x + other.puzzleSize) || min(__yy, __y) < other.y || max(__yy, __y) > (other.y + other.puzzleSize))
|
|
39
|
other.goalCheck = false;
|
|
40
|
}
|
|
41
|
else if (x < other.x || x > (other.x + other.puzzleSize) || y < other.y || y > (other.y + other.puzzleSize))
|
|
42
|
{
|
|
43
|
other.goalCheck = false;
|
|
44
|
}
|
|
45
|
}
|
|
46
|
}
|
|
47
|
if (setupComplete && goalCheck)
|
|
48
|
{
|
|
49
|
if (!surface_exists(puzzleSurfState))
|
|
50
|
puzzleSurfState = surface_create(puzzleSize, puzzleSize);
|
|
51
|
var _xx = x;
|
|
52
|
var _yy = y;
|
|
53
|
surface_set_target(puzzleSurfState);
|
|
54
|
draw_clear_alpha(c_black, 0);
|
|
55
|
gpu_set_colorwriteenable(false, false, false, true);
|
|
56
|
draw_sprite_ext(sprite_index, 1, 0, 0, image_xscale, image_yscale, image_angle, c_white, 1);
|
|
57
|
gpu_set_colorwriteenable(true, true, true, true);
|
|
58
|
gpu_set_blendmode_ext(bm_dest_alpha, bm_inv_dest_alpha);
|
|
59
|
gpu_set_alphatestenable(true);
|
|
60
|
with (obj_shapepuzzlepiece)
|
|
61
|
draw_sprite_ext(sprite_index, image_index, x - _xx, y - _yy, image_xscale, image_yscale, image_angle, c_white, 1);
|
|
62
|
surface_reset_target();
|
|
63
|
gpu_set_alphatestenable(false);
|
|
64
|
gpu_set_blendmode(bm_normal);
|
|
65
|
var _buffer = buffer_create(puzzleSize * puzzleSize * 4, buffer_fixed, 1);
|
|
66
|
buffer_get_surface(_buffer, puzzleSurfState, 0);
|
|
67
|
var _currentState = buffer_md5(_buffer, 0, buffer_get_size(_buffer));
|
|
68
|
if (_currentState == bufferGoal)
|
|
69
|
{
|
|
70
|
snd_play(snd_shadowpendant);
|
|
71
|
goalHit = true;
|
|
72
|
goalCheck = false;
|
|
73
|
with (obj_shapepuzzlepiece)
|
|
74
|
slowOff = true;
|
|
75
|
if (room == room_dw_mansion_darkbulb_1)
|
|
76
|
{
|
|
77
|
with (obj_ch2_scene19a)
|
|
78
|
con = 20;
|
|
79
|
}
|
|
80
|
if (room == room_dw_mansion_darkbulb_2)
|
|
81
|
{
|
|
82
|
with (obj_ch2_scene19b)
|
|
83
|
con = 20;
|
|
84
|
}
|
|
85
|
if (room == room_dw_mansion_darkbulb_3)
|
|
86
|
{
|
|
87
|
with (obj_ch2_scene19c)
|
|
88
|
con = 20;
|
|
89
|
}
|
|
90
|
}
|
|
91
|
buffer_delete(_buffer);
|
|
92
|
}
|
|
93
|
draw_sprite_ext(sprite_index, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, 0.25);
|
|
94
|
if (goalHit)
|
|
95
|
{
|
|
96
|
finalGlow = lerp(finalGlow, 0.7, 0.2);
|
|
97
|
if (finalGlow > 0.69)
|
|
98
|
finalGlow = 0.7;
|
|
99
|
gpu_set_blendmode(bm_add);
|
|
100
|
draw_sprite_ext(sprite_index, 1, x, y, image_xscale, image_yscale, image_angle, c_white, finalGlow);
|
|
101
|
gpu_set_blendmode(bm_normal);
|
|
102
|
with (obj_shapepuzzlepiece)
|
|
103
|
{
|
|
104
|
if (!slowOff)
|
|
105
|
visible = false;
|
|
106
|
}
|
|
107
|
}
|
|
108
|
if (instructionLerp > 0 || inUse)
|
|
109
|
{
|
|
110
|
if (goalHit)
|
|
111
|
instructionLerp = 0;
|
|
112
|
else if (instructionLerp < 1 && inUse)
|
|
113
|
instructionLerp += 0.1;
|
|
114
|
else if (!inUse)
|
|
115
|
instructionLerp -= 0.1;
|
|
116
|
var _easedLerp = scr_ease_outscr_ease_out
function scr_ease_out(arg0, arg1)
{
if (arg1 < -3 || arg1 > 7)
return arg0;
switch (arg1)
{
case -3:
return ease_out_bounce(arg0, 0, 1, 1);
case -2:
return ease_out_elastic(arg0, 0, 1, 1);
case -1:
return ease_out_back(arg0, 0, 1, 1);
case 0:
return arg0;
case 1:
return sin(arg0 * 1.5707963267948966);
case 2:
return -arg0 * (arg0 - 2);
case 6:
return -power(2, -10 * arg0) + 1;
case 7:
arg0--;
return sqrt(1 - (arg0 * arg0));
default:
arg0--;
if (arg1 == 4)
{
return -1 * (power(arg0, arg1) - 1);
break;
}
return power(arg0, arg1) + 1;
}
} (instructionLerp, 3);
|
|
117
|
scr_84_set_draw_fontscr_84_set_draw_font
function scr_84_set_draw_font(arg0)
{
global.chemg_font = arg0;
draw_set_font(scr_84_get_font(arg0));
} ("mainbig");
|
|
118
|
draw_set_halign(fa_left);
|
|
119
|
draw_set_color(c_white);
|
|
120
|
if (global.is_console || obj_gamecontroller.gamepad_active)
|
|
121
|
{
|
|
122
|
var sprite_pos_left = (camerax() - 80) + (_easedLerp * 100);
|
|
123
|
draw_sprite_ext(scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[3], false), 0, sprite_pos_left, cameray() + 400 + 2, 2, 2, 0, c_white, 1);
|
|
124
|
draw_sprite_ext(scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[0], false), 0, sprite_pos_left + 26, cameray() + 400 + 2, 2, 2, 0, c_white, 1);
|
|
125
|
draw_sprite_ext(scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[2], false), 0, sprite_pos_left + 52, cameray() + 400 + 2, 2, 2, 0, c_white, 1);
|
|
126
|
draw_sprite_ext(scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[1], false), 0, sprite_pos_left + 78, cameray() + 400 + 2, 2, 2, 0, c_white, 1);
|
|
127
|
var move_text = stringsetloc(#Move"#Move", "obj_shapepuzzle_slash_Draw_0_gml_181_0" );
|
|
128
|
scr_84_draw_text_outlinescr_84_draw_text_outline
function scr_84_draw_text_outline(arg0, arg1, arg2)
{
var xx = arg0;
var yy = arg1;
var str = arg2;
var __txtcolor__ = draw_get_color();
draw_set_colour(c_black);
draw_text(xx - 1, yy - 1, str);
draw_text(xx + 1, yy - 1, str);
draw_text(xx - 1, yy + 1, str);
draw_text(xx + 1, yy + 1, str);
draw_set_colour(__txtcolor__);
draw_text(xx, yy, str);
} ((camerax() - 80) + (_easedLerp * 100), cameray() + 400, string_hash_to_newline(move_text));
|
|
129
|
var sprite_pos = (camerax() + 720) - (_easedLerp * 100) - 125;
|
|
130
|
var _sprite = scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[4], false);
|
|
131
|
draw_sprite_ext(_sprite, 0, sprite_pos, cameray() + 400 + 2, 2, 2, 0, c_white, 1);
|
|
132
|
_sprite = scr_getbuttonspritescr_getbuttonsprite
function scr_getbuttonsprite(arg0, arg1)
{
var control = arg0;
var isString = arg1;
var button = noone;
var is_dualshock = os_type == os_ps4 || global.gamepad_type == "Sony DualShock 4";
var is_dualsense = os_type == os_ps5 || global.gamepad_type == "DualSense Wireless Controller";
var button_sprite = button_questionmark;
var invert = is_dualshock && (global.typer == 50 || global.typer == 70 || global.typer == 71);
if (isString)
{
if (control == "A")
{
button_sprite = button_xbox_left;
if (scr_is_switch_os())
{
button_sprite = button_switch_left_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps4_dpad_left;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_left_dark : button_ps5_dpad_left;
}
return button_sprite;
}
if (control == "D")
{
button_sprite = button_xbox_right;
if (scr_is_switch_os())
{
button_sprite = button_switch_right_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps4_dpad_right;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_right_dark : button_ps5_dpad_right;
}
return button_sprite;
}
if (control == "W")
{
button_sprite = button_xbox_up;
if (scr_is_switch_os())
{
button_sprite = button_switch_up_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps4_dpad_up;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_up_dark : button_ps5_dpad_up;
}
return button_sprite;
}
if (control == "S")
{
button_sprite = button_xbox_down;
if (scr_is_switch_os())
{
button_sprite = button_switch_down_0;
}
else if (is_dualshock || is_dualsense)
{
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps4_dpad_down;
if (is_dualsense)
button_sprite = invert ? button_ps4_dpad_down_dark : button_ps5_dpad_down;
}
return button_sprite;
}
if (control == "l")
{
button_sprite = button_xbox_left_bumper;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l1;
if (is_dualsense)
button_sprite = button_ps5_l1;
}
if (scr_is_switch_os())
button_sprite = button_switch_l_0;
return button_sprite;
}
if (control == "L")
{
button_sprite = button_xbox_left_trigger;
if (is_dualshock || is_dualsense)
{
button_sprite = button_ps4_l2;
if (is_dualsense)
button_sprite = button_ps5_l2;
}
if (scr_is_switch_os())
button_sprite = button_switch_zl_0;
return button_sprite;
}
if (control == "r")
{
button_sprite = button_xbox_right_bumper;
if (is_dualshock || is_dualsense)
... (global.input_g[5], false);
|
|
133
|
draw_sprite_ext(_sprite, 0, sprite_pos, cameray() + 400 + 32, 2, 2, 0, c_white, 1);
|
|
134
|
draw_set_halign(fa_left);
|
|
135
|
var rotate_text = stringsetloc(Rotate#Quit"Rotate#Quit", "obj_shapepuzzle_slash_Draw_0_gml_192_0" );
|
|
136
|
scr_84_draw_text_outlinescr_84_draw_text_outline
function scr_84_draw_text_outline(arg0, arg1, arg2)
{
var xx = arg0;
var yy = arg1;
var str = arg2;
var __txtcolor__ = draw_get_color();
draw_set_colour(c_black);
draw_text(xx - 1, yy - 1, str);
draw_text(xx + 1, yy - 1, str);
draw_text(xx - 1, yy + 1, str);
draw_text(xx + 1, yy + 1, str);
draw_set_colour(__txtcolor__);
draw_text(xx, yy, str);
} (sprite_pos + 35, cameray() + 400, string_hash_to_newline(rotate_text));
|
|
137
|
}
|
|
138
|
else
|
|
139
|
{
|
|
140
|
scr_84_draw_text_outlinescr_84_draw_text_outline
function scr_84_draw_text_outline(arg0, arg1, arg2)
{
var xx = arg0;
var yy = arg1;
var str = arg2;
var __txtcolor__ = draw_get_color();
draw_set_colour(c_black);
draw_text(xx - 1, yy - 1, str);
draw_text(xx + 1, yy - 1, str);
draw_text(xx - 1, yy + 1, str);
draw_text(xx + 1, yy + 1, str);
draw_set_colour(__txtcolor__);
draw_text(xx, yy, str);
} ((camerax() - 80) + (_easedLerp * 100), cameray() + 400, string_hash_to_newline(stringsetloc([Arrows]#Move"[Arrows]#Move", "obj_shapepuzzle_slash_Draw_0_gml_171_0" )));
|
|
141
|
draw_set_halign(fa_right);
|
|
142
|
scr_84_draw_text_outlinescr_84_draw_text_outline
function scr_84_draw_text_outline(arg0, arg1, arg2)
{
var xx = arg0;
var yy = arg1;
var str = arg2;
var __txtcolor__ = draw_get_color();
draw_set_colour(c_black);
draw_text(xx - 1, yy - 1, str);
draw_text(xx + 1, yy - 1, str);
draw_text(xx - 1, yy + 1, str);
draw_text(xx + 1, yy + 1, str);
draw_set_colour(__txtcolor__);
draw_text(xx, yy, str);
} ((camerax() + 720) - (_easedLerp * 100), cameray() + 400, string_hash_to_newline(stringsetsubloc("~1 Rotate#~2 Quit", scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (4), scr_get_input_namescr_get_input_name
function scr_get_input_name(arg0)
{
var _control = "[?]";
if (global.is_console || obj_gamecontroller.gamepad_active)
{
_control = global.input_g[arg0];
if (_control == gp_padr)
return "\\*D ";
if (_control == gp_padl)
return "\\*A ";
if (_control == gp_padu)
return "\\*W ";
if (_control == gp_padd)
return "\\*S ";
if (_control == global.button0)
return "\\*Z ";
if (_control == global.button1)
return "\\*X ";
if (_control == global.button2)
return "\\*C ";
}
var left_bracket = (global.lang == "en") ? "[" : "[";
var right_bracket = (global.lang == "en") ? "]" : "]";
_control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket;
if (!is_string(_control))
_control = "[?]";
else
return _control;
} (5), "obj_shapepuzzle_slash_Draw_0_gml_173_0")));
|
|
143
|
draw_set_halign(fa_left);
|
|
144
|
}
|
|
145
|
}
|