|
1
|
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"))
|
|
2
|
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);
|
|
3
|
else
|
|
4
|
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);
|
|
5
|
if (forecast_alpha > 0)
|
|
6
|
{
|
|
7
|
draw_set_font(fnt_main);
|
|
8
|
draw_set_halign(fa_center);
|
|
9
|
for (var _f = 0; _f < array_length(forecasts); _f++)
|
|
10
|
{
|
|
11
|
var _forecast = forecasts[_f];
|
|
12
|
var _forecast_lanino = _forecast[1];
|
|
13
|
var _forecast_elnina = _forecast[2];
|
|
14
|
_xx = 202 + (78 * _f);
|
|
15
|
_yy = 100 - (10 * _f);
|
|
16
|
_yy += (sin((current_time / 200) + _f) * 2);
|
|
17
|
draw_sprite_ext(spr_glass_pane, 0, _xx, _yy, 2, 2, 0, c_white, forecast_alpha);
|
|
18
|
var _temp = _forecast[0];
|
|
19
|
var _temp_color;
|
|
20
|
if (_temp < 50)
|
|
21
|
_temp_color = merge_color(c_aqua, c_white, clamp(_temp / 50, 0, 1));
|
|
22
|
else if (_temp < 80)
|
|
23
|
_temp_color = merge_color(c_white, c_yellow, clamp((_temp - 50) / 30, 0, 1));
|
|
24
|
else
|
|
25
|
_temp_color = merge_color(c_yellow, c_red, clamp((_temp - 80) / 40, 0, 1));
|
|
26
|
if (use_celsius)
|
|
27
|
_temp = round((_temp - 32) * 0.5556);
|
|
28
|
draw_text_transformed_color(_xx + 27, _yy + 115, _temp, 2, 2, 25, _temp_color, _temp_color, _temp_color, _temp_color, forecast_alpha);
|
|
29
|
var _w1_x = (_xx + 24) - 10;
|
|
30
|
var _w1_y = _yy + 36;
|
|
31
|
var _w2_x = _xx + 44 + 10;
|
|
32
|
var _w2_y = _yy + 76;
|
|
33
|
var _lanino_scale = 2;
|
|
34
|
var _elnina_scale = 2;
|
|
35
|
draw_sprite_ext(_forecast_lanino, 0, _w1_x, _w1_y, _lanino_scale, _lanino_scale, 0, c_white, forecast_alpha);
|
|
36
|
draw_sprite_ext(_forecast_elnina, 0, _w2_x, _w2_y, _elnina_scale, _elnina_scale, 0, c_white, forecast_alpha);
|
|
37
|
}
|
|
38
|
draw_set_alpha(1);
|
|
39
|
draw_set_halign(fa_left);
|
|
40
|
}
|
|
41
|
if (global.fighting == 0)
|
|
42
|
{
|
|
43
|
debug_print("battle over");
|
|
44
|
mus_volume(global.batmusic[1], 0, 60);
|
|
45
|
mus_volume(global.currentsong[1], 0, 0);
|
|
46
|
snd_resume(global.currentsong[1]);
|
|
47
|
mus_volume(global.currentsong[1], 1, 60);
|
|
48
|
safe_delete(tenna);
|
|
49
|
instance_destroy();
|
|
50
|
}
|