mirror of
https://github.com/PoshoDev/DexTool.git
synced 2026-08-20 01:24:14 -05:00
Prettying up code a bit.
This commit is contained in:
@@ -134,6 +134,14 @@
|
||||
"resourceType": "GMIncludedFile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": "01109f28-4eca-fc23-b0d9-649acb9c158c",
|
||||
"Value": {
|
||||
"id": "7e1eab98-49d1-5c6f-ebfe-dc1f5b61e3e5",
|
||||
"resourcePath": "scripts\\initials_set\\initials_set.yy",
|
||||
"resourceType": "GMScript"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": "0114af16-544a-47b5-9361-edceacf54387",
|
||||
"Value": {
|
||||
@@ -1398,6 +1406,14 @@
|
||||
"resourceType": "GMIncludedFile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": "0c8bde50-6fda-efe6-8809-de6b265ccbcc",
|
||||
"Value": {
|
||||
"id": "be205714-8cc7-4ca8-bb9d-e415f9cac929",
|
||||
"resourcePath": "scripts\\boxes_spawn\\boxes_spawn.yy",
|
||||
"resourceType": "GMScript"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": "0c94b312-e27e-4ecf-ac65-7b02c19732b8",
|
||||
"Value": {
|
||||
@@ -25457,7 +25473,9 @@
|
||||
"961739d9-bcef-9d3d-a9a7-6d0487191e8e",
|
||||
"9d9efccc-e28a-2782-ecbe-3ea08da108d6",
|
||||
"baf1e68b-6877-c2da-aed5-31f319313796",
|
||||
"27426a5b-252b-ce49-0d97-9a0b620973f4"
|
||||
"27426a5b-252b-ce49-0d97-9a0b620973f4",
|
||||
"01109f28-4eca-fc23-b0d9-649acb9c158c",
|
||||
"0c8bde50-6fda-efe6-8809-de6b265ccbcc"
|
||||
],
|
||||
"tutorial": ""
|
||||
}
|
||||
@@ -1,89 +1,7 @@
|
||||
/// @description DEX LOAD & ENUM (+GALAR DEX)
|
||||
/// @param +GALAR DEX
|
||||
|
||||
dex_data_load();
|
||||
|
||||
|
||||
/// INITIALS
|
||||
|
||||
global.window_width = window_get_width();
|
||||
global.window_height = window_get_height();
|
||||
|
||||
scr_window_resize();
|
||||
|
||||
global.window_width = window_get_width();
|
||||
global.window_height = window_get_height();
|
||||
|
||||
global.box_len = global.window_width/2/7;
|
||||
global.icon_scale = 2;
|
||||
|
||||
global.font = font_add_sprite_ext(spr_font,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZéÉ#-'!?():@_.% /♂♀",true,1)
|
||||
|
||||
global.selected[dex.dexno] = "001";
|
||||
global.selected[dex.pokemon] = "BULBASAUR";
|
||||
global.selected[dex.form] = "";
|
||||
global.selected[dex.type1] = "Grass";
|
||||
global.selected[dex.type2] = "Poison";
|
||||
global.selected[dex.sprite] = -1;
|
||||
global.selected[dex.own] = 0;
|
||||
|
||||
global.dex_len = array_height_2d(global.dexdata);
|
||||
|
||||
global.hud_pokemon_rate = 0.225;
|
||||
|
||||
global.mouse_x_prev = mouse_x;
|
||||
global.mouse_y_prev = mouse_x;
|
||||
|
||||
global.various = false;
|
||||
global.various_to = 0;
|
||||
|
||||
/// SAVE DATA
|
||||
initials_set();
|
||||
savedata_load();
|
||||
|
||||
dex_galar_load(global.show_galar);
|
||||
|
||||
/// SPAWN SLOTS
|
||||
|
||||
var pos_x = 0;
|
||||
var pos_y = 0;
|
||||
|
||||
global.current = 1;
|
||||
|
||||
for (global.box_count=1; global.current<global.dex_len; global.box_count++)
|
||||
{
|
||||
global.box_header[global.box_count] = instance_create(0, 0, obj_header);
|
||||
|
||||
with (global.box_header[global.box_count])
|
||||
{
|
||||
number = global.box_count;
|
||||
image_index = get_gen(global.dexdata[global.current, dex.dexno])-1;
|
||||
show_debug_message("Spawned Box "+string(global.box_count)+" with PKMN #"+string(global.dexdata[global.current, dex.dexno])+" from Gen "+string(get_gen(global.dexdata[global.current, dex.dexno])))
|
||||
image_speed = 0;
|
||||
}
|
||||
|
||||
var jump = false;
|
||||
|
||||
for (var i=0; i<5; i++) // Box Y
|
||||
for (var j=0; j<6; j++) // Box X
|
||||
{
|
||||
if (global.current<global.dex_len && !jump)
|
||||
{
|
||||
while(!check_skip(global.current) /*|| global.savedata[global.current]*/)
|
||||
global.current++;
|
||||
|
||||
if (!check_jump(j, i, global.current))
|
||||
{
|
||||
if (check_galar(global.current, global.show_galar))
|
||||
make_slot(j, i, global.current);
|
||||
|
||||
global.current++;
|
||||
}
|
||||
else
|
||||
jump = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* */
|
||||
script_execute(scr_window_resize,0,0,0,0,0);
|
||||
/* */
|
||||
boxes_spawn();
|
||||
scr_window_resize();
|
||||
|
||||
@@ -13,5 +13,4 @@ draw_type_hud(global.selected[dex.type1], global.selected[dex.type2], 4.5);
|
||||
|
||||
|
||||
// Debug
|
||||
|
||||
draw_guidelines(true);
|
||||
|
||||
@@ -1 +1 @@
|
||||
script_execute(make_screenshot,0,0,0,0,0);
|
||||
make_screenshot();
|
||||
|
||||
43
Project/DexTool/scripts/boxes_spawn/boxes_spawn.gml
Normal file
43
Project/DexTool/scripts/boxes_spawn/boxes_spawn.gml
Normal file
@@ -0,0 +1,43 @@
|
||||
///boxes_spawn()
|
||||
|
||||
/// SPAWN SLOTS
|
||||
|
||||
var pos_x = 0;
|
||||
var pos_y = 0;
|
||||
|
||||
global.current = 1;
|
||||
|
||||
for (global.box_count=1; global.current<global.dex_len; global.box_count++)
|
||||
{
|
||||
global.box_header[global.box_count] = instance_create(0, 0, obj_header);
|
||||
|
||||
with (global.box_header[global.box_count])
|
||||
{
|
||||
number = global.box_count;
|
||||
image_index = get_gen(global.dexdata[global.current, dex.dexno])-1;
|
||||
show_debug_message("Spawned Box "+string(global.box_count)+" with PKMN #"+string(global.dexdata[global.current, dex.dexno])+" from Gen "+string(get_gen(global.dexdata[global.current, dex.dexno])))
|
||||
image_speed = 0;
|
||||
}
|
||||
|
||||
var jump = false;
|
||||
|
||||
for (var i=0; i<5; i++) // Box Y
|
||||
for (var j=0; j<6; j++) // Box X
|
||||
{
|
||||
if (global.current<global.dex_len && !jump)
|
||||
{
|
||||
while(!check_skip(global.current) /*|| global.savedata[global.current]*/)
|
||||
global.current++;
|
||||
|
||||
if (!check_jump(j, i, global.current))
|
||||
{
|
||||
if (check_galar(global.current, global.show_galar))
|
||||
make_slot(j, i, global.current);
|
||||
|
||||
global.current++;
|
||||
}
|
||||
else
|
||||
jump = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Project/DexTool/scripts/boxes_spawn/boxes_spawn.yy
Normal file
8
Project/DexTool/scripts/boxes_spawn/boxes_spawn.yy
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "0c8bde50-6fda-efe6-8809-de6b265ccbcc",
|
||||
"modelName": "GMScript",
|
||||
"mvc": "1.0",
|
||||
"name": "boxes_spawn",
|
||||
"IsCompatibility": false,
|
||||
"IsDnD": false
|
||||
}
|
||||
32
Project/DexTool/scripts/initials_set/initials_set.gml
Normal file
32
Project/DexTool/scripts/initials_set/initials_set.gml
Normal file
@@ -0,0 +1,32 @@
|
||||
///initials_set()
|
||||
|
||||
global.window_width = window_get_width();
|
||||
global.window_height = window_get_height();
|
||||
|
||||
scr_window_resize();
|
||||
|
||||
global.window_width = window_get_width();
|
||||
global.window_height = window_get_height();
|
||||
|
||||
global.box_len = global.window_width/2/7;
|
||||
global.icon_scale = 2;
|
||||
|
||||
global.font = font_add_sprite_ext(spr_font,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZéÉ#-'!?():@_.% /♂♀",true,1)
|
||||
|
||||
global.selected[dex.dexno] = "001";
|
||||
global.selected[dex.pokemon] = "BULBASAUR";
|
||||
global.selected[dex.form] = "";
|
||||
global.selected[dex.type1] = "Grass";
|
||||
global.selected[dex.type2] = "Poison";
|
||||
global.selected[dex.sprite] = -1;
|
||||
global.selected[dex.own] = 0;
|
||||
|
||||
global.dex_len = array_height_2d(global.dexdata);
|
||||
|
||||
global.hud_pokemon_rate = 0.225;
|
||||
|
||||
global.mouse_x_prev = mouse_x;
|
||||
global.mouse_y_prev = mouse_x;
|
||||
|
||||
global.various = false;
|
||||
global.various_to = 0;
|
||||
8
Project/DexTool/scripts/initials_set/initials_set.yy
Normal file
8
Project/DexTool/scripts/initials_set/initials_set.yy
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "01109f28-4eca-fc23-b0d9-649acb9c158c",
|
||||
"modelName": "GMScript",
|
||||
"mvc": "1.0",
|
||||
"name": "initials_set",
|
||||
"IsCompatibility": false,
|
||||
"IsDnD": false
|
||||
}
|
||||
@@ -38,7 +38,9 @@
|
||||
"961739d9-bcef-9d3d-a9a7-6d0487191e8e",
|
||||
"9d9efccc-e28a-2782-ecbe-3ea08da108d6",
|
||||
"baf1e68b-6877-c2da-aed5-31f319313796",
|
||||
"27426a5b-252b-ce49-0d97-9a0b620973f4"
|
||||
"27426a5b-252b-ce49-0d97-9a0b620973f4",
|
||||
"01109f28-4eca-fc23-b0d9-649acb9c158c",
|
||||
"0c8bde50-6fda-efe6-8809-de6b265ccbcc"
|
||||
],
|
||||
"filterType": "GMScript",
|
||||
"folderName": "scripts",
|
||||
|
||||
Reference in New Issue
Block a user