:D
This commit is contained in:
commit
09ade10207
117 changed files with 2153 additions and 0 deletions
20
eastern flames/scripts/draw_sprite_at/draw_sprite_at.gml
Normal file
20
eastern flames/scripts/draw_sprite_at/draw_sprite_at.gml
Normal file
|
@ -0,0 +1,20 @@
|
|||
function draw_sprite_at(sprite_index, image_index, x, y, maxwidth, maxheight) {
|
||||
var ratio1 = maxwidth/sprite_get_width(sprite_index);
|
||||
var ratio2 = maxheight/sprite_get_height(sprite_index);
|
||||
if ratio2 > ratio1 {
|
||||
var ratio = ratio2;
|
||||
} else {
|
||||
var ratio = ratio1;
|
||||
}
|
||||
draw_sprite_stretched(sprite_index, image_index, x-sprite_get_xoffset(sprite_index)*ratio, y-sprite_get_yoffset(sprite_index)*ratio, sprite_get_width(sprite_index)*ratio, sprite_get_height(sprite_index)*ratio);
|
||||
}
|
||||
function draw_sprite_at_ext(sprite_index, image_index, x, y, maxwidth, maxheight, color, alpha) {
|
||||
var ratio1 = maxwidth/sprite_get_width(sprite_index);
|
||||
var ratio2 = maxheight/sprite_get_height(sprite_index);
|
||||
if ratio2 > ratio1 {
|
||||
var ratio = ratio2;
|
||||
} else {
|
||||
var ratio = ratio1;
|
||||
}
|
||||
draw_sprite_stretched_ext(sprite_index, image_index, x-sprite_get_xoffset(sprite_index)*ratio, y-sprite_get_yoffset(sprite_index)*ratio, sprite_get_width(sprite_index)*ratio, sprite_get_height(sprite_index)*ratio, color, alpha);
|
||||
}
|
12
eastern flames/scripts/draw_sprite_at/draw_sprite_at.yy
Normal file
12
eastern flames/scripts/draw_sprite_at/draw_sprite_at.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "drawing",
|
||||
"path": "folders/Scripts/drawing.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "draw_sprite_at",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue