|
1
|
if (digit_flash_timer > 0)
|
|
2
|
digit_flash_timer--;
|
|
3
|
if (scr_isphasescr_isphase
function scr_isphase(arg0)
{
__isphase = 0;
if (arg0 == "menu" && global.myfight == 0)
__isphase = 1;
if (arg0 == "acting" && global.myfight == 3)
__isphase = 1;
if (arg0 == "victory" && global.myfight == 7)
__isphase = 1;
if (arg0 == "attack" || arg0 == "fight")
{
if (global.myfight == 1)
__isphase = 1;
}
if (arg0 == "spell" || arg0 == "item")
{
if (global.myfight == 4)
__isphase = 1;
}
if (arg0 == "enemytalk" || arg0 == "balloon")
{
if (global.mnfight == 1)
__isphase = 1;
}
if (arg0 == "enemyattack" || arg0 == "bullets")
{
if (global.mnfight == 2)
__isphase = 1;
}
return __isphase;
} ("menu") || scr_isphasescr_isphase
function scr_isphase(arg0)
{
__isphase = 0;
if (arg0 == "menu" && global.myfight == 0)
__isphase = 1;
if (arg0 == "acting" && global.myfight == 3)
__isphase = 1;
if (arg0 == "victory" && global.myfight == 7)
__isphase = 1;
if (arg0 == "attack" || arg0 == "fight")
{
if (global.myfight == 1)
__isphase = 1;
}
if (arg0 == "spell" || arg0 == "item")
{
if (global.myfight == 4)
__isphase = 1;
}
if (arg0 == "enemytalk" || arg0 == "balloon")
{
if (global.mnfight == 1)
__isphase = 1;
}
if (arg0 == "enemyattack" || arg0 == "bullets")
{
if (global.mnfight == 2)
__isphase = 1;
}
return __isphase;
} ("acting") || ilovetv_increase == 99)
|
|
4
|
digit_alpha = scr_movetowardsscr_movetowards
function scr_movetowards(arg0, arg1, arg2)
{
if (arg0 == arg1)
return arg0;
else if (arg0 > arg1)
return max(arg0 - arg2, arg1);
else
return min(arg0 + arg2, arg1);
}
function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0)
{
scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1);
}
function scr_obj_movetowards_point(arg0, arg1, arg2)
{
var _distance = point_distance(x, y, arg0, arg1);
if (arg2 >= _distance)
{
x = arg0;
y = arg1;
}
else
{
var _direction = point_direction(x, y, arg0, arg1);
x += lengthdir_x(arg2, _direction);
y += lengthdir_y(arg2, _direction);
}
} (digit_alpha, 1, 0.1);
|
|
5
|
else
|
|
6
|
digit_alpha = scr_movetowardsscr_movetowards
function scr_movetowards(arg0, arg1, arg2)
{
if (arg0 == arg1)
return arg0;
else if (arg0 > arg1)
return max(arg0 - arg2, arg1);
else
return min(arg0 + arg2, arg1);
}
function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0)
{
scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1);
}
function scr_obj_movetowards_point(arg0, arg1, arg2)
{
var _distance = point_distance(x, y, arg0, arg1);
if (arg2 >= _distance)
{
x = arg0;
y = arg1;
}
else
{
var _direction = point_direction(x, y, arg0, arg1);
x += lengthdir_x(arg2, _direction);
y += lengthdir_y(arg2, _direction);
}
} (digit_alpha, 0, 0.1);
|
|
7
|
if (digit_alpha > 0)
|
|
8
|
{
|
|
9
|
var _first_digit = ilovetv div 10;
|
|
10
|
var _second_digit = ilovetv % 10;
|
|
11
|
var _col_factor = sin((digit_flash_timer / digit_flash_duration) * pi);
|
|
12
|
var _col2 = merge_color(c_red, c_white, 0.5);
|
|
13
|
if (ballooncon == 26)
|
|
14
|
_col2 = merge_color(c_red, c_white, 0.25);
|
|
15
|
var _col = merge_color(c_red, _col2, _col_factor);
|
|
16
|
if (ilovetv == 99)
|
|
17
|
{
|
|
18
|
_col_factor = (sin(current_time / 30) * 0.15) + 0.5;
|
|
19
|
_col = merge_color(c_orange, c_yellow, _col_factor);
|
|
20
|
}
|
|
21
|
var _xx = 280;
|
|
22
|
var _yy = 20;
|
|
23
|
draw_sprite_ext(spr_tv_counter_numbers, _first_digit, _xx, _yy, 2, 2, 0, _col, digit_alpha);
|
|
24
|
draw_sprite_ext(spr_tv_counter_numbers, _second_digit, _xx + 40, _yy, 2, 2, 0, _col, digit_alpha);
|
|
25
|
}
|
|
26
|
if (intro >= 4 && scr_isphasescr_isphase
function scr_isphase(arg0)
{
__isphase = 0;
if (arg0 == "menu" && global.myfight == 0)
__isphase = 1;
if (arg0 == "acting" && global.myfight == 3)
__isphase = 1;
if (arg0 == "victory" && global.myfight == 7)
__isphase = 1;
if (arg0 == "attack" || arg0 == "fight")
{
if (global.myfight == 1)
__isphase = 1;
}
if (arg0 == "spell" || arg0 == "item")
{
if (global.myfight == 4)
__isphase = 1;
}
if (arg0 == "enemytalk" || arg0 == "balloon")
{
if (global.mnfight == 1)
__isphase = 1;
}
if (arg0 == "enemyattack" || arg0 == "bullets")
{
if (global.mnfight == 2)
__isphase = 1;
}
return __isphase;
} ("menu"))
|
|
27
|
forecast_alpha = scr_movetowardsscr_movetowards
function scr_movetowards(arg0, arg1, arg2)
{
if (arg0 == arg1)
return arg0;
else if (arg0 > arg1)
return max(arg0 - arg2, arg1);
else
return min(arg0 + arg2, arg1);
}
function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0)
{
scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1);
}
function scr_obj_movetowards_point(arg0, arg1, arg2)
{
var _distance = point_distance(x, y, arg0, arg1);
if (arg2 >= _distance)
{
x = arg0;
y = arg1;
}
else
{
var _direction = point_direction(x, y, arg0, arg1);
x += lengthdir_x(arg2, _direction);
y += lengthdir_y(arg2, _direction);
}
} (forecast_alpha, 1, 0.1);
|
|
28
|
else
|
|
29
|
forecast_alpha = scr_movetowardsscr_movetowards
function scr_movetowards(arg0, arg1, arg2)
{
if (arg0 == arg1)
return arg0;
else if (arg0 > arg1)
return max(arg0 - arg2, arg1);
else
return min(arg0 + arg2, arg1);
}
function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0)
{
scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1);
}
function scr_obj_movetowards_point(arg0, arg1, arg2)
{
var _distance = point_distance(x, y, arg0, arg1);
if (arg2 >= _distance)
{
x = arg0;
y = arg1;
}
else
{
var _direction = point_direction(x, y, arg0, arg1);
x += lengthdir_x(arg2, _direction);
y += lengthdir_y(arg2, _direction);
}
} (forecast_alpha, 0, 0.1);
|
|
30
|
if (forecast_alpha > 0)
|
|
31
|
{
|
|
32
|
draw_set_font(fnt_main);
|
|
33
|
draw_set_halign(fa_center);
|
|
34
|
for (var _f = 0; _f < array_length(forecasts); _f++)
|
|
35
|
{
|
|
36
|
var _forecast = forecasts[_f];
|
|
37
|
var _forecast_lanino = _forecast[1];
|
|
38
|
var _forecast_elnina = _forecast[2];
|
|
39
|
var _xx = 202 + (78 * _f);
|
|
40
|
var _yy = 100 - (10 * _f);
|
|
41
|
_yy += (sin((current_time / 200) + _f) * 2);
|
|
42
|
draw_sprite_ext(spr_glass_pane, 0, _xx, _yy, 2, 2, 0, c_white, forecast_alpha);
|
|
43
|
var _temp = _forecast[0];
|
|
44
|
var _temp_color;
|
|
45
|
if (forecast_turn == 6)
|
|
46
|
{
|
|
47
|
_temp = (lastchosen == "lanino") ? 999 : -999;
|
|
48
|
_temp_color = (lastchosen == "lanino") ? merge_color(c_red, c_orange, (sin(current_time / 100) * 0.5) + 0.5) : merge_color(c_aqua, c_blue, (sin(current_time / 100) * 0.25) + 0.25);
|
|
49
|
}
|
|
50
|
else
|
|
51
|
{
|
|
52
|
if (_temp < 50)
|
|
53
|
_temp_color = merge_color(c_aqua, c_white, clamp(_temp / 50, 0, 1));
|
|
54
|
else if (_temp < 80)
|
|
55
|
_temp_color = merge_color(c_white, c_yellow, clamp((_temp - 50) / 30, 0, 1));
|
|
56
|
else
|
|
57
|
_temp_color = merge_color(c_yellow, c_red, clamp((_temp - 80) / 40, 0, 1));
|
|
58
|
if (use_celsius)
|
|
59
|
_temp = round((_temp - 32) * 0.5556);
|
|
60
|
}
|
|
61
|
draw_text_transformed_color(_xx + 27, _yy + 115, _temp, 2, 2, 25, _temp_color, _temp_color, _temp_color, _temp_color, forecast_alpha);
|
|
62
|
var _w1_x = (_xx + 24) - 10;
|
|
63
|
var _w1_y = _yy + 36;
|
|
64
|
var _w2_x = _xx + 44 + 10;
|
|
65
|
var _w2_y = _yy + 76;
|
|
66
|
if (forecast_turn == 6)
|
|
67
|
{
|
|
68
|
if (lastchosen == "lanino")
|
|
69
|
{
|
|
70
|
draw_sprite_ext(spr_weather_sun, 0, _w1_x + irandom(2), _w1_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
71
|
draw_sprite_ext(spr_weather_sun, 0, _w2_x + irandom(2), _w1_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
72
|
draw_sprite_ext(spr_weather_sun, 0, _w1_x + irandom(2), _w2_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
73
|
draw_sprite_ext(spr_weather_sun, 0, _w2_x + irandom(2), _w2_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
74
|
}
|
|
75
|
else
|
|
76
|
{
|
|
77
|
draw_sprite_ext(spr_weather_snow, 0, _w1_x + irandom(2), _w1_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
78
|
draw_sprite_ext(spr_weather_snow, 0, _w2_x + irandom(2), _w1_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
79
|
draw_sprite_ext(spr_weather_snow, 0, _w1_x + irandom(2), _w2_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
80
|
draw_sprite_ext(spr_weather_snow, 0, _w2_x + irandom(2), _w2_y + irandom(2), 3, 3, 0, c_white, forecast_alpha);
|
|
81
|
}
|
|
82
|
}
|
|
83
|
else
|
|
84
|
{
|
|
85
|
var _lanino_scale = 2;
|
|
86
|
var _elnina_scale = 2;
|
|
87
|
if (forecast_turn >= 3)
|
|
88
|
{
|
|
89
|
if (lastchosen == "lanino")
|
|
90
|
{
|
|
91
|
_w1_x += (1 - irandom(2));
|
|
92
|
_w1_y += (1 - irandom(2));
|
|
93
|
_lanino_scale = 2 + ((forecast_turn - 2) * 1);
|
|
94
|
_elnina_scale = 2;
|
|
95
|
}
|
|
96
|
else
|
|
97
|
{
|
|
98
|
_w2_x += (1 - irandom(2));
|
|
99
|
_w2_y += (1 - irandom(2));
|
|
100
|
_lanino_scale = 2;
|
|
101
|
_elnina_scale = 2 + ((forecast_turn - 2) * 1);
|
|
102
|
}
|
|
103
|
}
|
|
104
|
draw_sprite_ext(_forecast_lanino, 0, _w1_x, _w1_y, _lanino_scale, _lanino_scale, 0, c_white, forecast_alpha);
|
|
105
|
draw_sprite_ext(_forecast_elnina, 0, _w2_x, _w2_y, _elnina_scale, _elnina_scale, 0, c_white, forecast_alpha);
|
|
106
|
}
|
|
107
|
}
|
|
108
|
draw_set_alpha(1);
|
|
109
|
draw_set_halign(fa_left);
|
|
110
|
}
|
|
111
|
if (global.fighting == 0)
|
|
112
|
{
|
|
113
|
debug_print("battle over");
|
|
114
|
mus_volume(global.batmusic[1], 0, 60);
|
|
115
|
mus_volume(global.currentsong[1], 0, 0);
|
|
116
|
safe_delete(tenna);
|
|
117
|
instance_destroy();
|
|
118
|
}
|