-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow program to work without the Realtime Blur extension files
- Loading branch information
Showing
8 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Provided as a replacement to blur_scripts.gml, which belongs to | ||
* the Realtime Blur extension by Foxy Of Jungle: | ||
* https://marketplace.yoyogames.com/assets/9540/blur-realtime-performance | ||
* | ||
* Since it's a paid extension, the source code cannot be published | ||
* to the repository, so the extension files must be added manually | ||
* to the project folder after cloning. | ||
* | ||
* Note Block Studio will work just fine without the extension, but | ||
* the transparency effects for the Fluent theme will be missing the | ||
* blur effect. | ||
*/ | ||
|
||
function sprite_create_blur_alt(sprite, downamount, width, height, blurradius, quality, directions) { | ||
// Returns a sprite index | ||
try { | ||
return sprite_create_blur(sprite, downamount, width, height, blurradius, quality, directions); | ||
} catch (exc) { | ||
var surf = surface_create(width, height); | ||
surface_set_target(surf); | ||
draw_sprite_stretched(sprite, 0, 0, 0, width, height); | ||
surface_reset_target(); | ||
var spr = sprite_create_from_surface(surf, 0, 0, width, height, 0, 0, 0, 0); | ||
surface_free(surf); | ||
return spr; | ||
} | ||
} | ||
|
||
function draw_surface_blur_alt(surface, x, y, w, h, downamount) { | ||
try { | ||
draw_surface_blur(surface, x, y, w, h, downamount); | ||
} catch (exc) { | ||
var surf = surface_create(w, h); | ||
surface_set_target(surf); | ||
draw_surface_part(surf, x, y, w, h, 0, 0); | ||
surface_reset_target(); | ||
surface_free(surf); | ||
} | ||
} | ||
|
||
// NB: wave, sprite_blur_clear and sprite_draw_blur were suppressed | ||
// from this script as they aren't currently used. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters