Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_LWF02_bg_Create_0

(view raw script w/o annotations or w/e)
1
layer_name = ["BACKGROUND"];
2
if (room == room_town_north)
3
    layer_name = ["ASSETS_Buildings_2", "TILES_Trees_4", "ASSETS_Festival_5300", "ASSETS_Festival_950000", "ASSETS_Buildings_1", "ASSETS_Trees", "TILES_Trees_1", "TILES_Trees_2", "TILES_Trees_3", "TILES_Ground_1", "TILES_Ground_2", "TILES_Ground_3", "TILES_Ground_4", "ASSETS_Ground", "DEPTHSORT", "ASSETS_Festival_Night"];
4
else if (room == room_town_mid)
5
    layer_name = ["ASSETS_Festival_5000", "TILES_Depth_5000", "ASSETS_Buildings_Depth_5000", "ASSETS_Festival_5100", "DEPTHSORT", "ASSETS_Festival_990000", "TILES_Depth_990000", "TILES_Depth_993000", "ASSETS_Buildings_Depth_994000", "ASSETS_Depth_995200", "TILES_Depth_995250", "TILES_Depth_995500", "TILES_Depth_995000", "TILES_Depth_996000", "ASSETS_Depth_998000", "TILES_Depth_1000000", "ASSESTS_Festival_Night"];
6
else if (room == room_town_south)
7
    layer_name = ["TILES_Depth_5000", "ASSETS_Festival_5100", "DEPTHSORT", "ASSETS_Festival_980000", "ASSETS_Depth_980000", "ASSETS_Festival_990000", "ASSETS_Buildings_Depth_982000", "ASSETS_Depth_985000", "TILES_Depth_990000", "TILES_Depth_992000", "TILES_Depth_994000", "ASSETS_Festival_995000", "TILES_Depth_995000", "TILES_Depth_996000", "TILES_Depth_997500", "TILES_Depth_1000000", "ASSETS_Festival_Night"];
8
else if (room == room_town_school)
9
    layer_name = ["TILES_Depth_5000", "TILES_Depth_950000", "ASSETS_Depth_955000", "TILES_Depth_990000", "ASSETS_Depth_995000", "ASSETS_Depth_996000", "TILES_Depth_1000000", "ASSETS_Festival_Night"];
10
else if (room == room_schoollobby)
11
    layer_name = ["BACKGROUND_ASSETS"];
12
else if (room == room_schooldoor)
13
    layer_name = ["Compatibility_Tiles_Depth_1000000", "Compatibility_Tiles_Depth_995000"];
14
plot_begin = 0;
15
plot_end = 300;
16
overlay = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(-10, -10, spr_whitepx_10);
17
overlay.image_xscale = (room_width / 10) + 2;
18
overlay.image_yscale = (room_height / 10) + 2;
19
overlay.image_blend = merge_color(c_black, c_navy, 0.5);
20
overlay.image_alpha = 0.6;
21
overlay.depth = 990;
22
palette_sprite = 8;
23
palette_index = 1;
24
pal_swap_layer_init();
25
for (var i = 0; i < array_length(layer_name); i++)
26
{
27
    pal_swap_enable_layer(layer_name[i]);
28
    pal_swap_set_layer(palette_sprite, palette_index, layer_name[i], false);
29
}
30
pal_swap_reset();