Skip to content

Commit

Permalink
Fix variable reference error
Browse files Browse the repository at this point in the history
  • Loading branch information
niksudan committed Feb 21, 2015
1 parent 7135e18 commit 17d0d15
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions prettylight.gmx/prettylight.project.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<object>objects\objLightControl</object>
</objects>
</objects>
<rooms name="rooms"/>
<help>
<rtf>help.rtf</rtf>
</help>
Expand Down
2 changes: 1 addition & 1 deletion prettylight.gmx/scripts/lights_draw.gml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ draw_clear_alpha( alc, ala );
draw_set_blend_mode( bm_add );
for ( var i = 0; i < ds_list_size( light_list ); i ++ ) {
with ( ds_list_find_value( light_list , i ) ) {
draw_sprite_ext( ls , li , x - view_xview[view_id] + xo , y - view_yview[view_id] + yo , xs , ys , rs , cs , as );
draw_sprite_ext( ls , li , x - view_xview[global.light_view_id] + xo , y - view_yview[global.light_view_id] + yo , xs , ys , rs , cs , as );
}
};
draw_set_blend_mode( bm_normal );
Expand Down
14 changes: 7 additions & 7 deletions prettylight.gmx/scripts/lights_init.gml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ lights_set_blur_amount( 3 );

// Initialise surfaces
draw_set_color(c_white);
view_id = argument[1];
lights = surface_create( view_wview[view_id], view_hview[view_id] );
blurring = surface_create( view_wview[view_id], view_hview[view_id] );
result = surface_create( view_wview[view_id], view_hview[view_id] );
global.light_view_id = argument[1];
lights = surface_create( view_wview[global.light_view_id], view_hview[global.light_view_id] );
blurring = surface_create( view_wview[global.light_view_id], view_hview[global.light_view_id] );
result = surface_create( view_wview[global.light_view_id], view_hview[global.light_view_id] );

// Configure light alpha
var s1 = sprite_duplicate( sprLight );
Expand All @@ -32,9 +32,9 @@ sprite_set_alpha_from_sprite( s1, s2 );
// Initialise gaussian blur shader
uni_resolution_hoz = shader_get_uniform( shd_gaussian_horizontal, "resolution" );
uni_resolution_vert = shader_get_uniform( shd_gaussian_vertical, "resolution" );
var_resolution_x = view_wview[view_id] / bov;
var_resolution_y = view_hview[view_id] / bov;
var_resolution_x = view_wview[global.light_view_id] / bov;
var_resolution_y = view_hview[global.light_view_id] / bov;
shader_enabled = argument[0];

// Initialize light list
light_list = ds_list_create();
light_list = ds_list_create();
8 changes: 4 additions & 4 deletions prettylight.gmx/scripts/lights_step.gml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

// Catch surface errors
if ( !surface_exists( lights ) ) {
lights = surface_create( view_wview[view_id], view_hview[view_id] );
lights = surface_create( view_wview[global.light_view_id], view_hview[global.light_view_id] );
}
if ( !surface_exists( blurring ) ) {
blurring = surface_create( view_wview[view_id], view_hview[view_id] );
blurring = surface_create( view_wview[global.light_view_id], view_hview[global.light_view_id] );
}
if ( !surface_exists( result ) ) {
result = surface_create( view_wview[view_id], view_hview[view_id] );
}
result = surface_create( view_wview[global.light_view_id], view_hview[global.light_view_id] );
}
Binary file added prettylight.gmx/sprites/images/Thumbs.db
Binary file not shown.
Binary file modified prettylight.gmz
Binary file not shown.

0 comments on commit 17d0d15

Please sign in to comment.