|
1
|
if (blush > 0)
|
|
2
|
blush_alpha = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (blush_alpha, 1, 0.1);
|
|
3
|
else
|
|
4
|
blush_alpha = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (blush_alpha, 0, 0.1);
|
|
5
|
if (sprite_index == spr_mike_small || sprite_index == spr_mike_s)
|
|
6
|
{
|
|
7
|
anim[0] += 1;
|
|
8
|
anim[10] += 50;
|
|
9
|
if (talking)
|
|
10
|
{
|
|
11
|
talk_ind += 0.5;
|
|
12
|
if (talk_ind > 3)
|
|
13
|
talk_ind = 0;
|
|
14
|
anim[5] = min(anim[5], 60);
|
|
15
|
anim[1] += sin(anim[0] - 90) * 2;
|
|
16
|
if (anim[0] > 150)
|
|
17
|
anim[0] = 0;
|
|
18
|
}
|
|
19
|
else
|
|
20
|
{
|
|
21
|
talk_ind = 0;
|
|
22
|
anim[1] = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (anim[1], 0, 1);
|
|
23
|
anim[5] += 1;
|
|
24
|
}
|
|
25
|
anim[2] = cos(anim[10] / 200) * 2;
|
|
26
|
anim[3] = sin(100 + (anim[10] / 400)) - cos(anim[10] / 200);
|
|
27
|
if (anim[5] > 60)
|
|
28
|
{
|
|
29
|
anim[7] += sin(50 + (anim[5] * 100)) * 0.05;
|
|
30
|
if (anim[5] > 120)
|
|
31
|
anim[5] = 0;
|
|
32
|
}
|
|
33
|
else
|
|
34
|
{
|
|
35
|
anim[7] += (0 - anim[7]) * 0.1;
|
|
36
|
}
|
|
37
|
anim[8] = 22 + (-22 * (1 - anim[7]));
|
|
38
|
draw_sprite_ext(spr_mike_small, 1, x, y - anim[8], image_xscale * xscale, (image_yscale * yscale) + anim[7], image_angle, image_blend, image_alpha);
|
|
39
|
draw_sprite_ext(spr_mike_small, 2, x, (y - anim[8]) + anim[1], image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
40
|
if (sad && !talking)
|
|
41
|
draw_sprite_ext(spr_mike_small, 10, x, ((y + 2) - anim[8]) + anim[1], image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
42
|
else
|
|
43
|
draw_sprite_ext(spr_mike_small, 3 + clamp(talk_ind, 0, 3), x, (y - anim[8]) + anim[1], image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
44
|
if (blush_alpha > 0)
|
|
45
|
{
|
|
46
|
draw_sprite_ext(spr_blush, 0, x - (8 * image_xscale), ((y - anim[8]) + anim[1]) - (10 * image_yscale), 1, 1, 0, c_white, blush_alpha);
|
|
47
|
draw_sprite_ext(spr_blush, 0, x + (8 * image_xscale), ((y - anim[8]) + anim[1]) - (10 * image_yscale), 1, 1, 0, c_white, blush_alpha);
|
|
48
|
}
|
|
49
|
draw_sprite_ext(spr_mike_small, 7, x + anim[2], (y - anim[8]) + anim[3], image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
50
|
draw_sprite_ext(spr_mike_small, 8, x + anim[3], (y - anim[8]) + anim[2], image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
51
|
draw_sprite_ext(spr_mike_small, 9, x, y - anim[8], image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
52
|
}
|
|
53
|
else if (sprite_index == spr_mike_med || sprite_index == spr_mike_m || sprite_index == spr_mike_med_sad)
|
|
54
|
{
|
|
55
|
var _sp = sprite_index;
|
|
56
|
image_speed = 1;
|
|
57
|
if (sprite_index == spr_mike_m)
|
|
58
|
{
|
|
59
|
_sp = 2133;
|
|
60
|
image_speed = 0.25;
|
|
61
|
}
|
|
62
|
draw_sprite_ext(_sp, image_index, x, y, image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
63
|
if (blush_alpha > 0)
|
|
64
|
{
|
|
65
|
var bx = 8;
|
|
66
|
var bx2 = -20;
|
|
67
|
var by = sin(image_index);
|
|
68
|
if (image_index > 4)
|
|
69
|
bx2 = -10;
|
|
70
|
blush_x += ((bx2 - blush_x) * 0.25);
|
|
71
|
draw_sprite_ext(spr_blush, 0, (x - (bx * image_xscale)) + (round(blush_x / 2) * 2), (((y + by) - anim[8]) + anim[1]) - (10 * image_yscale), 1, 1, 0, c_white, blush_alpha);
|
|
72
|
draw_sprite_ext(spr_blush, 0, x + (bx * image_xscale) + (round(blush_x / 2) * 2), (((y + by) - anim[8]) + anim[1]) - (10 * image_yscale), 1, 1, 0, c_white, blush_alpha);
|
|
73
|
}
|
|
74
|
}
|
|
75
|
else if (sprite_index == spr_mike_big || sprite_index == spr_mike_l)
|
|
76
|
{
|
|
77
|
anim[0] += 1;
|
|
78
|
anim[10] += 50;
|
|
79
|
if (talking)
|
|
80
|
{
|
|
81
|
anim[5] = min(anim[5], 60);
|
|
82
|
anim[1] -= sin((anim[0] - 120) / 4) * 2;
|
|
83
|
if (anim[0] > 260)
|
|
84
|
anim[0] = 0;
|
|
85
|
}
|
|
86
|
else
|
|
87
|
{
|
|
88
|
anim[1] = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (anim[1], 0, 1);
|
|
89
|
anim[5] += 1;
|
|
90
|
}
|
|
91
|
anim[2] = cos(anim[10] / 200) * 2;
|
|
92
|
anim[3] = sin(100 + (anim[10] / 400)) - cos(anim[10] / 200);
|
|
93
|
if (anim[5] > 90)
|
|
94
|
{
|
|
95
|
anim[7] += sin(50 + (anim[5] * 75)) * 0.03;
|
|
96
|
if (anim[5] > 150)
|
|
97
|
anim[5] = 0;
|
|
98
|
}
|
|
99
|
else
|
|
100
|
{
|
|
101
|
anim[7] += (0 - anim[7]) * 0.1;
|
|
102
|
}
|
|
103
|
anim[8] = 43 + (-43 * (1 - anim[7]));
|
|
104
|
draw_sprite_ext(spr_mike_big, 1, x + anim[2], (y - anim[8]) + anim[3], image_xscale * xscale, image_yscale * yscale, image_angle, image_blend, image_alpha);
|
|
105
|
draw_sprite_ext(spr_mike_big, 2, x, y - anim[8], image_xscale * xscale, (image_yscale * yscale) + anim[7], image_angle, image_blend, image_alpha);
|
|
106
|
draw_sprite_ext(spr_mike_big, 3, x, y - anim[8], image_xscale * xscale, (image_yscale * yscale) + anim[7], image_angle, image_blend, image_alpha);
|
|
107
|
draw_sprite_ext(spr_mike_big, 6, x, y - anim[8], image_xscale * xscale, image_yscale * yscale, image_angle + anim[1], image_blend, image_alpha);
|
|
108
|
draw_sprite_ext(spr_mike_big, 5, x, y - anim[8], image_xscale * xscale, image_yscale * yscale, image_angle + anim[1], image_blend, image_alpha);
|
|
109
|
draw_sprite_ext(spr_mike_big, 4, x, y - anim[8], image_xscale * xscale, image_yscale * yscale, image_angle - anim[2], image_blend, image_alpha);
|
|
110
|
if (blush_alpha > 0)
|
|
111
|
{
|
|
112
|
var bx = 6;
|
|
113
|
var bx2 = -14 - anim[1];
|
|
114
|
blush_x += ((bx2 - blush_x) * 0.25);
|
|
115
|
draw_sprite_ext(spr_blush, 0, (x - (bx * image_xscale)) + (round(blush_x / 2) * 2), y - anim[8] - (20 * image_yscale), 1, 1, 0, c_white, blush_alpha);
|
|
116
|
draw_sprite_ext(spr_blush, 0, x + (bx * image_xscale) + (round(blush_x / 2) * 2), y - anim[8] - (20 * image_yscale), 1, 1, 0, c_white, blush_alpha);
|
|
117
|
}
|
|
118
|
}
|
|
119
|
else if (sprite_index == spr_shadowman_reload)
|
|
120
|
{
|
|
121
|
draw_sprite_ext(sprite_index, image_index, x - (sprite_width / 2), (y - (sprite_height / 2)) + 10, 2, 2, 0, c_white, 1);
|
|
122
|
}
|
|
123
|
else
|
|
124
|
{
|
|
125
|
draw_sprite_ext(sprite_index, image_index, x - (sprite_width / 2), y - (sprite_height / 2), 2, 2, 0, c_white, 1);
|
|
126
|
}
|