mirror of
https://github.com/PoshoDev/DexTool.git
synced 2026-04-25 07:53:01 -05:00
01/08/2020 #2
This commit is contained in:
parent
bb3a97018d
commit
59e0e33137
|
|
@ -52455,6 +52455,7 @@
|
|||
<script>scripts\form_get_alcremie.gml</script>
|
||||
<script>scripts\check_skip.gml</script>
|
||||
<script>scripts\check_jump.gml</script>
|
||||
<script>scripts\make_screenshot.gml</script>
|
||||
</scripts>
|
||||
<objects name="objects">
|
||||
<object>objects\obj_global</object>
|
||||
|
|
|
|||
|
|
@ -425,20 +425,40 @@ draw_guidelines(false);
|
|||
<event eventtype="9" enumb="83">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<id>601</id>
|
||||
<kind>0</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<exetype>1</exetype>
|
||||
<functionname>action_execute_script</functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<kind>9</kind>
|
||||
<script>make_screenshot</script>
|
||||
</argument>
|
||||
<argument>
|
||||
<kind>0</kind>
|
||||
<string></string>
|
||||
</argument>
|
||||
<argument>
|
||||
<kind>0</kind>
|
||||
<string></string>
|
||||
</argument>
|
||||
<argument>
|
||||
<kind>0</kind>
|
||||
<string></string>
|
||||
</argument>
|
||||
<argument>
|
||||
<kind>0</kind>
|
||||
<string></string>
|
||||
</argument>
|
||||
<argument>
|
||||
<kind>0</kind>
|
||||
<string></string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
|
|
|||
86
LivingDexSS.gmx/scripts/make_screenshot.gml
Normal file
86
LivingDexSS.gmx/scripts/make_screenshot.gml
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
// Set Size
|
||||
|
||||
//var size_w = 40*6*6 + 4*7;
|
||||
//var size_h = ceil(global.box_count-1)/6 * 30 + 4*(ceil(global.box_count-1)+1)
|
||||
|
||||
var slots_per_line = 32;
|
||||
var slots_h = ceil(global.dex_len/slots_per_line);
|
||||
|
||||
var slot_w = 40;
|
||||
var slot_h = 30;
|
||||
|
||||
var size_w = slots_per_line * slot_w + slot_w;
|
||||
var size_h = slots_h * slot_h;
|
||||
|
||||
var surf = surface_create(size_w, size_h);
|
||||
surface_set_target(surf);
|
||||
draw_clear(c_white);
|
||||
|
||||
// Slots
|
||||
var current = 1;
|
||||
|
||||
for (var i=1; i<=slots_h; i++)
|
||||
for (var j=1; j<slots_per_line; j++)
|
||||
if (current<global.dex_len)
|
||||
{
|
||||
while(!check_skip(current))
|
||||
current++;
|
||||
|
||||
var px = j*slot_w;
|
||||
var py = i*slot_h;
|
||||
|
||||
if (global.savedata[current])
|
||||
{
|
||||
draw_set_color(c_red);
|
||||
draw_rectangle(px, py, px+slot_w, py+slot_h, false);
|
||||
}
|
||||
|
||||
draw_set_color(c_black);
|
||||
draw_rectangle(px, py, px+slot_w, py+slot_h, true);
|
||||
|
||||
draw_sprite(make_sprite(global.dexdata[current, dex.pokemon], global.dexdata[current, dex.form]), 0, j*slot_w+slot_w/2, i*slot_h+slot_h/2);
|
||||
|
||||
show_debug_message("Snapshot: Drew #"+global.dexdata[current, dex.dexno]+" "+global.dexdata[current, dex.pokemon]+".");
|
||||
|
||||
current++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
|
||||
// Sprites
|
||||
|
||||
/*for (i=1; i<=slots_h; i++)
|
||||
for (var j=1; j<slots_per_line; j++)
|
||||
if (current<global.dex_len)
|
||||
{
|
||||
while(!check_skip(current))
|
||||
current++;
|
||||
|
||||
var px = j*slot_w;
|
||||
var py = i*slot_h;
|
||||
|
||||
draw_sprite(make_sprite(global.dexdata[current, dex.pokemon], global.dexdata[current, dex.form]), 0, slot_w/2, slot_h/2);
|
||||
|
||||
current++;
|
||||
|
||||
show_debug_message("Snapshot: Drew #"+global.dexdata[current, dex.dexno]+" "+global.dexdata[current, dex.pokemon]+".");
|
||||
}*/
|
||||
|
||||
// Saving
|
||||
|
||||
surface_reset_target();
|
||||
sprtemp = sprite_create_from_surface(surf,0,0,size_w,size_h,false,false,0,0)
|
||||
surface_free(surf)
|
||||
|
||||
var filename = "dex";
|
||||
var ext = ".png";
|
||||
sprite_save(sprtemp, 0, filename+ext);
|
||||
|
||||
var user = string(environment_get_variable("USERNAME"));
|
||||
var dir = "C:\Users\"+string(user)+"\Pictures";
|
||||
var savestring = dir+"\"+filename+".png";
|
||||
var fromstring = "C:\Users\"+user+"\AppData\Local\LivingDexSS\"+filename+ext;
|
||||
file_move_ns(fromstring, savestring);
|
||||
|
||||
show_debug_message("Image exported as '"+savestring+"'.");
|
||||
|
|
@ -9,7 +9,7 @@ var str = pkmn;
|
|||
if (form != "")
|
||||
{
|
||||
str = form_get_string(pkmn, form);
|
||||
show_debug_message(str);
|
||||
//show_debug_message(str);
|
||||
}
|
||||
|
||||
sprtemp = sprite_add("Icons\Regular\"+string(str)+".png",0,false,false,19,14);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user