1 |
if (hoopx < 650) |
2 |
draw_sprite_ext(spr_bball_hoop_back, 0, hoopx, y - 250, 2, 2, 0, image_blend, image_alpha); |
3 |
if (drawa == 1) |
4 |
{ |
5 |
alphysy += 30; |
6 |
heightdown = (alphysy + 154) - (y - 52); |
7 |
if (heightdown < 0) |
8 |
heightdown = 0; |
9 |
width = 88; |
10 |
height = 154 - heightdown; |
11 |
if (height > 0) |
12 |
{ |
13 |
draw_sprite_part(spr_adate_intotrash, 0, 0, 0, 88, height, x - 40, alphysy); |
14 |
} |
15 |
else |
16 |
{ |
17 |
drawa = 0; |
18 |
snd_play(snd_impact); |
19 |
snd_stop(snd_fall); |
20 |
} |
21 |
} |
22 |
if (hoopx < 650) |
23 |
draw_sprite_ext(spr_bball_hoop, 0, hoopx, y - 250, 2, 2, 0, image_blend, image_alpha); |
24 |
yoff = floor(acounter) * 2; |
25 |
draw_sprite_ext(spr_adate_trashcan_bottom, 0, x + xoff, y - floor(yoff), 2, 2, rot, image_blend, image_alpha); |
26 |
if (acounter < 4) |
27 |
draw_sprite_ext(spr_adate_trashcan_top, 0, x + topx, y - floor(yoff), 2, 2, 0, image_blend, image_alpha); |
28 |
if (aturn == 1) |
29 |
{ |
30 |
draw_sprite_ext(spr_adate_atrashbottom, floor(acounter), x + 8, y, 2, 2, 0, image_blend, image_alpha); |
31 |
if (acounter >= 4) |
32 |
draw_sprite_ext(spr_adate_atrashtop, global.faceemotion, x + topx + 8, y - yoff, 2, 2, 0, image_blend, image_alpha); |
33 |
if (acounter < 4) |
34 |
acounter += 0.5; |
35 |
} |
36 |
if (con == 1) |
37 |
{ |
38 |
if (hoopx > (x - 60)) |
39 |
hoopx -= 25; |
40 |
else |
41 |
hoopx = x - 60; |
42 |
if (topx < 100) |
43 |
{ |
44 |
topx += 10; |
45 |
} |
46 |
else |
47 |
{ |
48 |
snd_play(snd_fall); |
49 |
con = 3; |
50 |
drawa = 1; |
51 |
sinerf = 30; |
52 |
siner = 0; |
53 |
} |
54 |
} |
55 |
if (con == 3 && drawa == 0) |
56 |
{ |
57 |
siner += 1; |
58 |
sinerf -= 2; |
59 |
rot = sin(siner / 1) * sinerf; |
60 |
xoff = sin(siner / 1) * sinerf; |
61 |
if (sinerf <= 0) |
62 |
{ |
63 |
rot = 0; |
64 |
xoff = 0; |
65 |
con = 4; |
66 |
alarm[4] = 10; |
67 |
} |
68 |
} |
69 |
if (con == 5) |
70 |
{ |
71 |
if (hoopx < 650) |
72 |
hoopx += 20; |
73 |
else |
74 |
hoopx = 650; |
75 |
if (topx > 0) |
76 |
topx -= 10; |
77 |
else |
78 |
con = 6; |
79 |
} |
80 |
if (fadein == 1) |
81 |
{ |
82 |
image_blend = merge_color(c_white, image_blend, 0.7); |
83 |
fadecounter += 1; |
84 |
if (fadecounter > 20) |
85 |
{ |
86 |
fadein = 0; |
87 |
image_blend = c_white; |
88 |
} |
89 |
} |
90 |
if (shake > 0) |
91 |
{ |
92 |
x = (xstart + random(shake)) - random(shake); |
93 |
y = (ystart + random(shake)) - random(shake); |
94 |
} |