Reordering a bit.

This commit is contained in:
TheGreenTie
2020-03-01 18:30:44 -06:00
parent eccd3eccec
commit d9f123b438
9263 changed files with 1393 additions and 62623 deletions

View File

@@ -0,0 +1,25 @@
// Initialise the global array that allows the lookup of the depth of a given object
// GM2.0 does not have a depth on objects so on import from 1.x a global array is created
// NOTE: MacroExpansion is used to insert the array initialisation at import time
gml_pragma( "global", "__global_object_depths()");
// insert the generated arrays here
global.__objectDepths[0] = 0; // obj_global
global.__objectDepths[1] = 0; // obj_slot
global.__objectDepths[2] = 0; // obj_header
global.__objectNames[0] = "obj_global";
global.__objectNames[1] = "obj_slot";
global.__objectNames[2] = "obj_header";
// create another array that has the correct entries
var len = array_length_1d(global.__objectDepths);
global.__objectID2Depth = [];
for( var i=0; i<len; ++i ) {
var objID = asset_get_index( global.__objectNames[i] );
if (objID >= 0) {
global.__objectID2Depth[ objID ] = global.__objectDepths[i];
} // end if
} // end for

View File

@@ -0,0 +1,8 @@
{
"id": "ac8c8340-c548-499d-8832-1749194e8f3d",
"modelName": "GMScript",
"mvc": "1.0",
"name": "__global_object_depths",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,5 @@
gml_pragma( "global", "__init_global();");
// set any global defaults
layer_force_draw_depth(true,0); // force all layers to draw at depth 0
draw_set_colour( c_black );

View File

@@ -0,0 +1,8 @@
{
"id": "3247001c-7534-4dfa-8b6f-ceb476a8fffa",
"modelName": "GMScript",
"mvc": "1.0",
"name": "__init_global",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,20 @@
enum e__VW
{
XView,
YView,
WView,
HView,
Angle,
HBorder,
VBorder,
HSpeed,
VSpeed,
Object,
Visible,
XPort,
YPort,
WPort,
HPort,
Camera,
SurfaceID,
};

View File

@@ -0,0 +1,8 @@
{
"id": "cbd4e6c3-a230-4859-b701-f265d466f46e",
"modelName": "GMScript",
"mvc": "1.0",
"name": "__init_view",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,28 @@
var __prop = argument0;
var __index = argument1;
var __res = -1;
switch(__prop)
{
case e__VW.XView: var __cam = view_get_camera(__index); __res = camera_get_view_x(__cam); break;
case e__VW.YView: var __cam = view_get_camera(__index); __res = camera_get_view_y(__cam); break;
case e__VW.WView: var __cam = view_get_camera(__index); __res = camera_get_view_width(__cam); break;
case e__VW.HView: var __cam = view_get_camera(__index); __res = camera_get_view_height(__cam); break;
case e__VW.Angle: var __cam = view_get_camera(__index); __res = camera_get_view_angle(__cam); break;
case e__VW.HBorder: var __cam = view_get_camera(__index); __res = camera_get_view_border_x(__cam); break;
case e__VW.VBorder: var __cam = view_get_camera(__index); __res = camera_get_view_border_y(__cam); break;
case e__VW.HSpeed: var __cam = view_get_camera(__index); __res = camera_get_view_speed_x(__cam); break;
case e__VW.VSpeed: var __cam = view_get_camera(__index); __res = camera_get_view_speed_y(__cam); break;
case e__VW.Object: var __cam = view_get_camera(__index); __res = camera_get_view_target(__cam); break;
case e__VW.Visible: __res = view_get_visible(__index); break;
case e__VW.XPort: __res = view_get_xport(__index); break;
case e__VW.YPort: __res = view_get_yport(__index); break;
case e__VW.WPort: __res = view_get_wport(__index); break;
case e__VW.HPort: __res = view_get_hport(__index); break;
case e__VW.Camera: __res = view_get_camera(__index); break;
case e__VW.SurfaceID: __res = view_get_surface_id(__index); break;
default: break;
};
return __res;

View File

@@ -0,0 +1,8 @@
{
"id": "4f1414c1-89bb-4b0c-89ea-25807a54e262",
"modelName": "GMScript",
"mvc": "1.0",
"name": "__view_get",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,9 @@
var __prop = argument0;
var __index = argument1;
var __val = argument2;
__view_set_internal(__prop, __index, __val);
var __res = __view_get(__prop, __index);
return __res;

View File

@@ -0,0 +1,8 @@
{
"id": "9203d081-7e67-4811-957c-66be4b20579f",
"modelName": "GMScript",
"mvc": "1.0",
"name": "__view_set",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,27 @@
var __prop = argument0;
var __index = argument1;
var __val = argument2;
switch(__prop)
{
case e__VW.XView: var __cam = view_get_camera(__index); camera_set_view_pos(__cam, __val, camera_get_view_y(__cam)); break;
case e__VW.YView: var __cam = view_get_camera(__index); camera_set_view_pos(__cam, camera_get_view_x(__cam), __val); break;
case e__VW.WView: var __cam = view_get_camera(__index); camera_set_view_size(__cam, __val, camera_get_view_height(__cam)); break;
case e__VW.HView: var __cam = view_get_camera(__index); camera_set_view_size(__cam, camera_get_view_width(__cam), __val); break;
case e__VW.Angle: var __cam = view_get_camera(__index); camera_set_view_angle(__cam, __val); break;
case e__VW.HBorder: var __cam = view_get_camera(__index); camera_set_view_border(__cam, __val, camera_get_view_border_y(__cam)); break;
case e__VW.VBorder: var __cam = view_get_camera(__index); camera_set_view_border(__cam, camera_get_view_border_x(__cam), __val); break;
case e__VW.HSpeed: var __cam = view_get_camera(__index); camera_set_view_speed(__cam, __val, camera_get_view_speed_y(__cam)); break;
case e__VW.VSpeed: var __cam = view_get_camera(__index); camera_set_view_speed(__cam, camera_get_view_speed_x(__cam), __val); break;
case e__VW.Object: var __cam = view_get_camera(__index); camera_set_view_target(__cam, __val); break;
case e__VW.Visible: __res = view_set_visible(__index, __val); break;
case e__VW.XPort: __res = view_set_xport(__index, __val); break;
case e__VW.YPort: __res = view_set_yport(__index, __val); break;
case e__VW.WPort: __res = view_set_wport(__index, __val); break;
case e__VW.HPort: __res = view_set_hport(__index, __val); break;
case e__VW.Camera: __res = view_set_camera(__index, __val); break;
case e__VW.SurfaceID: __res = view_set_surface_id(__index, __val); break;
default: break;
};
return 0;

View File

@@ -0,0 +1,8 @@
{
"id": "e257f1de-10d0-486a-a721-c70dd8b0aa73",
"modelName": "GMScript",
"mvc": "1.0",
"name": "__view_set_internal",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,6 @@
/// @description Creates an instance of a given object at a given position.
/// @param x The x position the object will be created at.
/// @param y The y position the object will be created at.
/// @param obj The object to create an instance of.
var myDepth = object_get_depth( argument2 );
return instance_create_depth( argument0, argument1, myDepth, argument2 );

View File

@@ -0,0 +1,8 @@
{
"id": "2fb3e13b-ff75-432a-9a72-85efa55fd834",
"modelName": "GMScript",
"mvc": "1.0",
"name": "instance_create",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,10 @@
/// @description Returns the depth of the specified object.
/// @param {Number} obj The index of the object to check
/// @return {Number} depth of the object
var objID = argument0;
var ret = 0;
if (objID >= 0) && (objID < array_length_1d(global.__objectID2Depth)) {
ret = global.__objectID2Depth[objID];
} // end if
return ret;

View File

@@ -0,0 +1,8 @@
{
"id": "47499278-a397-46b2-ab97-0c5fc9c1e1cc",
"modelName": "GMScript",
"mvc": "1.0",
"name": "object_get_depth",
"IsCompatibility": true,
"IsDnD": false
}

View File

@@ -0,0 +1,15 @@
///align_x(region, unit%)
var zone = argument0;
var percent = argument1;
switch(zone)
{
case region.mid_right:
var x_start = global.window_width*0.75 + global.window_width*0.25/2;
break;
}
var deplacement = global.unit * percent;
return x_start + deplacement;

View File

@@ -0,0 +1,8 @@
{
"id": "46940c02-accc-0a61-a238-03c213c44822",
"modelName": "GMScript",
"mvc": "1.0",
"name": "align_x",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,15 @@
///button_align_y(region, unit%)
var zone = argument0;
var percent = argument1;
switch(zone)
{
case region.mid_right:
var y_start = global.window_height * 0.7;
break;
}
var deplacement = global.unit * percent;
return y_start + deplacement + __view_get(e__VW.YView, 0);

View File

@@ -0,0 +1,8 @@
{
"id": "e5c6bbdd-36db-453b-9a43-7cd0c52b31ba",
"modelName": "GMScript",
"mvc": "1.0",
"name": "align_y",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,10 @@
///box_gen_jump(gen)
var gen = argument0;
if (gen==0 || gen==9)
gen = array_length_1d(global.gen_header);
global.current_box = global.gen_header[gen - 1];
scroll_do();

View File

@@ -0,0 +1,8 @@
{
"id": "4a34078c-7fa4-d9ca-eb35-df0a0ce93667",
"modelName": "GMScript",
"mvc": "1.0",
"name": "box_gen_jump",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,3 @@
///box_scale_update();
global.box_scale = sprite_get_width(spr_slot)*global.icon_scale;

View File

@@ -0,0 +1,8 @@
{
"id": "a95b1f81-6bd5-5928-0dad-3e233aa7e8b7",
"modelName": "GMScript",
"mvc": "1.0",
"name": "box_scale_update",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,55 @@
///boxes_spawn()
if (file_exists(working_directory+"/Logs/MissingSprites.log"))
file_delete(working_directory+"/Logs/MissingSprites.log");
/// SPAWN SLOTS
var pos_x = 0;
var pos_y = 0;
global.current = 1;
var jump = true;
var gen_current = 0;
for (global.box_count=1; global.current<global.dex_len; global.box_count++)
{
// Headers
with (instance_create(0, 0, obj_header))
{
global.box_header[global.box_count] = self;
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;
if (check_genfirst(global.dexdata[global.current, dex.pokemon], false))
global.gen_header[gen_current++] = global.box_count;
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;
}
}
}
global.gen_header[gen_current] = global.box_count-1; // Last header.

View File

@@ -0,0 +1,8 @@
{
"id": "0c8bde50-6fda-efe6-8809-de6b265ccbcc",
"modelName": "GMScript",
"mvc": "1.0",
"name": "boxes_spawn",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,3 @@
///button_align_x(region, unit%)
return align_x(argument0, argument1) - (sprite_get_width(sprite_index) * scale * length)/2;

View File

@@ -0,0 +1,8 @@
{
"id": "6ee30c99-62bc-bcf5-3853-e159533ab6d0",
"modelName": "GMScript",
"mvc": "1.0",
"name": "button_align_x",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,3 @@
///button_align_y(region, unit%)
return align_y(argument0, argument1) - (sprite_get_height(sprite_index) * scale)/2;

View File

@@ -0,0 +1,8 @@
{
"id": "9081971b-e1be-521f-34be-38fcfa32f684",
"modelName": "GMScript",
"mvc": "1.0",
"name": "button_align_y",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,8 @@
///button_create(x, y, type)
var hold = instance_create_depth(0, 0, depth-1, obj_button);
with (hold)
button_set(argument0, argument1, argument2);
return hold;

View File

@@ -0,0 +1,8 @@
{
"id": "c07397b8-105a-cf00-f119-47f5091762ab",
"modelName": "GMScript",
"mvc": "1.0",
"name": "button_create",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,19 @@
///button_do(type)
switch(argument0)
{
case but.plus:
global.counter++;
savedata_write(savedata_section_get(global.show_shiny)+" Count", global.selecting.idno, global.counter);
change_add();
break;
case but.minus:
if (global.counter > 0)
global.counter--;
savedata_write(savedata_section_get(global.show_shiny)+" Count", global.selecting.idno, global.counter);
change_add();
break;
}

View File

@@ -0,0 +1,8 @@
{
"id": "2370f9cd-bc43-8204-019c-9bc13fa8d58f",
"modelName": "GMScript",
"mvc": "1.0",
"name": "button_do",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,25 @@
///button_plusminus_shortcut(button, pressed?)
var button = argument0;
var pressed = argument1;
if (instance_exists(obj_lock))
{
switch(button)
{
case but.plus: var hold = obj_lock.plus; break;
case but.minus: var hold = obj_lock.minus; break;
default:
show_debug_message("ERROR: Wrong parameter assignment.");
return;
break;
}
hold.hover = true;
hold.pressed = pressed;
if (pressed)
with (hold)
button_do(type);
}

View File

@@ -0,0 +1,8 @@
{
"id": "b0a1886d-571c-9ed1-098f-65abb5bf18f6",
"modelName": "GMScript",
"mvc": "1.0",
"name": "button_plusminus_shortcut",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,39 @@
///button_set(x_, y_, type)
x_ = argument0;
y_ = argument1;
type = argument2;
image_speed = 0;
length = 0.25;
scale = global.icon_scale;
color = c_white;
halign = fa_center;
valign = fa_middle;
switch(type)
{
case but.plus:
text = "+";
image_index = 4;
scale = global.icon_scale * 1.5;
x_ = button_align_x(region.mid_right, 1.5);
y_ = button_align_y(region.mid_right, 0);
break;
case but.minus:
text = "-";
image_index = 4;
x_ = button_align_x(region.mid_right, -1.5);
y_ = button_align_y(region.mid_right, 0);
break;
};
x = x_;
y = y_;
width = sprite_get_width(sprite_index) * scale * length;
height = sprite_get_height(sprite_index) * scale;

View File

@@ -0,0 +1,8 @@
{
"id": "51d00fa8-eb85-4086-a732-a161d9d217d8",
"modelName": "GMScript",
"mvc": "1.0",
"name": "button_set",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,5 @@
///button_update_all()
if (instance_exists(obj_button))
with (obj_button)
button_set(x_, y_, type);

View File

@@ -0,0 +1,8 @@
{
"id": "5c7fb6ce-864a-a30e-f665-d51d74835878",
"modelName": "GMScript",
"mvc": "1.0",
"name": "button_update_all",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,9 @@
///change_add()
if (!global.change)
{
global.change = true;
global.change_time = current_time;
show_debug_message("Change made.");
}

View File

@@ -0,0 +1,8 @@
{
"id": "0a65669e-f5cb-22e9-10a6-eac0e321de31",
"modelName": "GMScript",
"mvc": "1.0",
"name": "change_add",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,11 @@
///change_backup()
var timeto = 300000;
if (global.change && current_time>global.change_time+timeto)
{
global.change = false;
global.change_time = current_time;
change_backup_make();
}

View File

@@ -0,0 +1,8 @@
{
"id": "8b60df32-c201-4d7d-5dc4-f2a2376232c3",
"modelName": "GMScript",
"mvc": "1.0",
"name": "change_backup",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,13 @@
///change_backup_make()
if (file_exists("save.ini"))
{
if (!directory_exists("Backups"))
directory_create("Backups")
var filename = "save_"+string(date_get_second_of_year(date_current_datetime()))+".ini";
file_copy("save.ini", working_directory+"/Backups/"+filename);
show_debug_message("Saved Backup as "+filename+".");
}

View File

@@ -0,0 +1,8 @@
{
"id": "5933be0c-4eea-58cb-0a29-3d63b4efa531",
"modelName": "GMScript",
"mvc": "1.0",
"name": "change_backup_make",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,22 @@
/// @description check_galar(id, show?)
/// @param id
/// @param show?
var idee = argument0;
var show = argument1;
// Sanity Check™
if (!show)
return true;
var nat = global.dexdata[idee, dex.dexno];
for (var i=1; i<array_height_2d(global.galardata); i++)
{
//show_debug_message("Comparing "+nat+" to "+global.galardata[i, gdex.galarno]);
if (nat == global.galardata[i, gdex.dexno])
return true;
}
return false;

View File

@@ -0,0 +1,8 @@
{
"id": "f9ef32bc-566b-4f55-b4ad-0c7ece021e10",
"modelName": "GMScript",
"mvc": "1.0",
"name": "check_galar",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,26 @@
///gen_checkfirst(pkmn, ignoreBULBASAUR?)
var pkmn = argument0;
var ignore = argument1;
// Sanity Check
if (ignore && pkmn=="BULBASAUR")
return false;
switch(pkmn)
{
case "BULBASAUR":
case "CHIKORITA":
case "TREECKO":
case "TURTWIG":
case "VICTINI":
case "CHESPIN":
case "ROWLET":
case "GROOKEY":
return true;
break;
default:
return false;
break;
}

View File

@@ -0,0 +1,8 @@
{
"id": "5d6dc131-402b-45b8-c0ee-331d3e8a9908",
"modelName": "GMScript",
"mvc": "1.0",
"name": "check_genfirst",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,9 @@
var px = argument0;
var py = argument1;
var pkmn = global.dexdata[argument2, dex.pokemon];
var form = global.dexdata[argument2, dex.form];
if (px || py)
return check_genfirst(pkmn, true);
return false;

View File

@@ -0,0 +1,8 @@
{
"id": "5613b2cc-c046-476d-8550-02c1c597e3c6",
"modelName": "GMScript",
"mvc": "1.0",
"name": "check_jump",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,27 @@
var pkmn = global.dexdata[argument0, dex.pokemon];
var form = global.dexdata[argument0, dex.form];
var bank = global.dexdata[argument0, dex.bankable];
if (bank == "FALSE")
return false;
switch(form)
{
case "MEGA":
case "MEGA (X)":
case "MEGA (Y)":
case "PRIMAL":
return false;
break;
}
switch(pkmn)
{
case "ARCEUS":
case "SILVALLY":
if (form != "NORMAL")
return false;
break;
}
return true;

View File

@@ -0,0 +1,8 @@
{
"id": "3f1a1302-f9d9-434e-ba08-373fb5c37d32",
"modelName": "GMScript",
"mvc": "1.0",
"name": "check_skip",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,19 @@
/// @description click_slot(value)
/// @param value
own = argument0;
spr_plus = 0.75;
color = get_color3(own, true);
global.selected[dex.own] = own;
global.savedata[idno] = own;
// Auto-Saves
if (savedata_write(savedata_section_get(global.show_shiny), string(idno), own))
show_debug_message("Saved "+pokemon+" as "+string(own)+".");
else
show_debug_message("ERROR: Save file somehow went missing.");
change_add();

View File

@@ -0,0 +1,8 @@
{
"id": "26b4abd4-e9db-4d44-8984-3d22a5b89407",
"modelName": "GMScript",
"mvc": "1.0",
"name": "click_slot",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,19 @@
///dex_data_load()
// National Dex data loading
enum dex
{
idno,
dexno,
pokemon,
form,
type1,
type2,
boxable,
bankable,
sprite,
own
}
global.dexdata = csv_load("pokedata");

View File

@@ -0,0 +1,8 @@
{
"id": "27426a5b-252b-ce49-0d97-9a0b620973f4",
"modelName": "GMScript",
"mvc": "1.0",
"name": "dex_data_load",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,15 @@
///dex_galar_load()
// Galar Dex data loading
enum gdex
{
galarno,
dexno,
pokemon,
type1,
type2
}
if (global.show_galar)
global.galardata = csv_load("galardex");

View File

@@ -0,0 +1,8 @@
{
"id": "baf1e68b-6877-c2da-aed5-31f319313796",
"modelName": "GMScript",
"mvc": "1.0",
"name": "dex_galar_load",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,27 @@
/// @description draw_guidelines(debug only?)
/// @param debug only?
if (argument0 || debug_mode)
{
// Upper
draw_rectangle(global.window_width/2, __view_get( e__VW.YView, 0 ), global.window_width-1, global.window_height*0.6+__view_get( e__VW.YView, 0 ), true)
// Mid-Left
draw_rectangle(global.window_width/2, global.window_height*0.6+__view_get( e__VW.YView, 0 ), global.window_width*0.75-1, global.window_height*0.8+__view_get( e__VW.YView, 0 ), true)
// Mid-Right
draw_rectangle(global.window_width*0.75, global.window_height*0.6+__view_get( e__VW.YView, 0 ), global.window_width-1, global.window_height*0.8+__view_get( e__VW.YView, 0 ), true)
draw_line_color(global.window_width*0.75 + global.window_width*0.25/2, global.window_height*0.6+__view_get( e__VW.YView, 0 ), global.window_width*0.75 + global.window_width*0.25/2, global.window_height*0.8+__view_get( e__VW.YView, 0 ), c_green, c_green)
draw_line_color(global.window_width*0.75, global.window_height * 0.7+__view_get( e__VW.YView, 0 ), global.window_width, global.window_height * 0.7+__view_get( e__VW.YView, 0 ), c_green, c_green)
// Bottom
draw_rectangle(global.window_width/2, global.window_height*0.8+__view_get( e__VW.YView, 0 ), global.window_width-1, global.window_height-1+__view_get( e__VW.YView, 0 ), true)
// Pokémon
if (sprite_exists(global.selected[dex.sprite]))
draw_rectangle( global.window_width*0.75 - sprite_get_width(global.selected[dex.sprite])/2 * global.icon_scale*3,
global.window_height*global.hud_pokemon_rate - sprite_get_height(global.selected[dex.sprite])/2 * global.icon_scale*3 + __view_get( e__VW.YView, 0 ),
global.window_width*0.75 + sprite_get_width(global.selected[dex.sprite])/2 * global.icon_scale*3,
global.window_height*global.hud_pokemon_rate + sprite_get_height(global.selected[dex.sprite])/2 * global.icon_scale*3 + __view_get( e__VW.YView, 0 ),
true);
}

View File

@@ -0,0 +1,8 @@
{
"id": "fb68057d-3497-4258-9c71-65790c43a93c",
"modelName": "GMScript",
"mvc": "1.0",
"name": "draw_guidelines",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,8 @@
/// @description draw_pokemon_hud(sprite_index)
/// @param sprite_index
var mid_x = global.window_width * 0.75;
var mid_y = global.window_height * global.hud_pokemon_rate + __view_get( e__VW.YView, 0 );
if (sprite_exists(argument0))
draw_sprite_ext(argument0, 0, mid_x, mid_y, global.icon_scale*3, global.icon_scale*3, image_angle, image_blend, image_alpha);

View File

@@ -0,0 +1,8 @@
{
"id": "dfd53f9a-1846-47a9-b5b4-f802ffa16351",
"modelName": "GMScript",
"mvc": "1.0",
"name": "draw_pokemon_hud",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,6 @@
///draw_reset()
// Reset
draw_set_halign(fa_left);
draw_set_valign(fa_top);
draw_set_color(c_white);

View File

@@ -0,0 +1,8 @@
{
"id": "a4583316-ee45-806d-bf28-e6c94f924583",
"modelName": "GMScript",
"mvc": "1.0",
"name": "draw_reset",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,62 @@
/// @description draw_text_hud(string, size, position, color)
/// @param string
/// @param size
/// @param position
/// @param color
/* Text Size Guide
1.0 Small
1.5 Form
2.0 Pokemon Name & No.
-------- */
var str = argument0;
var size = argument1;
var pos = argument2;
var col = argument3;
if (sprite_exists(global.selected[dex.sprite]))
{
var sh = sprite_get_height(global.selected[dex.sprite])/2;
if (pos < 0)
{
var start = sh * global.icon_scale * 3 * (-1) - sprite_get_height(spr_font) * global.icon_scale * 2;
var extra = 1;
}
else if (pos > 0)
{
var start = sh * global.icon_scale * 3;
var extra = -1;
}
else
{
var start = 0;
var extra = 0;
}
}
else
{
var start = 0;
var extra = 0;
}
var len = sprite_get_height(spr_font)*global.icon_scale*2*(pos+extra) + 4*(pos+extra);
var sca = global.icon_scale * size * 2;
var mid_x = global.window_width * 0.75;
var mid_y = global.window_height * global.hud_pokemon_rate + __view_get( e__VW.YView, 0 );
draw_set_font(global.font);
draw_set_halign(fa_middle);
draw_set_color(col);
var final_y = mid_y + start + len;
if (final_y < __view_get( e__VW.YView, 0 ))
final_y = __view_get( e__VW.YView, 0 );
draw_text_transformed(mid_x, final_y, string_hash_to_newline(str), sca, sca, 0);
draw_set_color(c_white);

View File

@@ -0,0 +1,8 @@
{
"id": "90bff3a4-aeaf-45a8-957e-bb987a614bf7",
"modelName": "GMScript",
"mvc": "1.0",
"name": "draw_text_hud",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,20 @@
/// @description draw_text_square(x, y, string, scale, halign, color)
/// @param x
/// @param y
/// @param string
/// @param scale
/// @param halign
/// @param color
var px = argument0;
var py = argument1;
var str = argument2;
var sca = argument3 * global.icon_scale * 2;
var alg = argument4;
var col = argument5;
draw_set_font(global.font);
draw_set_halign(alg);
draw_set_color(col);
draw_text_transformed(px, py, string_hash_to_newline(str), sca, sca, 0);

View File

@@ -0,0 +1,8 @@
{
"id": "3c469568-3932-44b8-9394-ab0d293d02c6",
"modelName": "GMScript",
"mvc": "1.0",
"name": "draw_text_square",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,32 @@
/// @description draw_type_hud(type1, type2, position)
/// @param type1
/// @param type2
/// @param position
var t1 = argument0;
var t2 = argument1;
var pos = argument2;
if (global.selected[dex.form] == "")
pos -= 1.5;
// What a fucking mess...
var mid_x = global.window_width * 0.75;
var mid_y = global.window_height * global.hud_pokemon_rate + __view_get( e__VW.YView, 0 );
var sh = sprite_get_height(global.selected[dex.sprite])/2;
var start = sh * global.icon_scale * 3;
var extra = -1;
var len = sprite_get_height(spr_font)*global.icon_scale*2*(pos+extra) + 4*(pos+extra);
var hal = global.box_len/16;
if (t2 == "")
{
draw_sprite_ext(spr_type, scr_typeget(t1), mid_x-(sprite_get_width(spr_type)*hal/2), mid_y+start+len, hal, hal, image_angle, image_blend, image_alpha);
}
else
{
draw_sprite_ext(spr_type, scr_typeget(t1), mid_x-(sprite_get_width(spr_type)*hal)-hal, mid_y+start+len, hal, hal, image_angle, image_blend, image_alpha);
draw_sprite_ext(spr_type, scr_typeget(t2), mid_x+hal, mid_y+start+len, hal, hal, image_angle, image_blend, image_alpha);
}

View File

@@ -0,0 +1,8 @@
{
"id": "87747b01-e692-422b-8ee2-dfb539a57d2f",
"modelName": "GMScript",
"mvc": "1.0",
"name": "draw_type_hud",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,14 @@
if (string_pos("CARAMEL SWIRL", argument0))
return "CARAMEL SWIRL";
else if (string_pos("LEMON CREAM", argument0))
return "LEMON CREAM";
else if (string_pos("MATCHA CREAM", argument0))
return "MATCHA CREAM";
else if (string_pos("MINT CREAM", argument0))
return "MINT CREAM";
else if (string_pos("RAINBOW SWIRL", argument0))
return "RAINBOW SWIRL";
else if (string_pos("RUBY CREAM", argument0))
return "RUBY CREAM";
else
return "SALTED CREAM";

View File

@@ -0,0 +1,8 @@
{
"id": "04d66643-aa95-4bb8-84e0-923ca6d78459",
"modelName": "GMScript",
"mvc": "1.0",
"name": "form_get_alcremie",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,8 @@
///form_get_exceptions(form)
switch(argument0)
{
case "!": return "EXCLAMATION";
case "?": return "QUESTION";
default: return argument0;
}

View File

@@ -0,0 +1,8 @@
{
"id": "247a6c1c-04b6-7db1-67ff-297c3ee1feca",
"modelName": "GMScript",
"mvc": "1.0",
"name": "form_get_exceptions",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,20 @@
/// @description form_get_gender_major(Pokémon)
/// @param Pokémon
switch(argument0)
{
case "HIPPOPOTAS":
case "HIPPOWDON":
case "UNFEZANT":
case "FRILLISH":
case "JELLICENT":
case "PYROAR":
case "MEOWSTIC":
case "INDEEDEE":
return true;
break;
default:
return false;
break;
}

View File

@@ -0,0 +1,8 @@
{
"id": "4860a7c1-95f6-4fd0-9028-7f3326bfefab",
"modelName": "GMScript",
"mvc": "1.0",
"name": "form_get_gender_major",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,9 @@
/// @description form_get_string(Pokémon, form)
var pkmn = argument0;
var form = form_get_exceptions(argument1);
if (form != "")
return string_insert("-"+form, pkmn, string_length(pkmn)+1);
else
return pkmn;

View File

@@ -0,0 +1,8 @@
{
"id": "c95da417-da21-4287-b38d-25228921d83e",
"modelName": "GMScript",
"mvc": "1.0",
"name": "form_get_string",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,22 @@
/// @description get_color(value, hover?)
/// @param value
/// @param hover?
if (!argument1)
switch(argument0)
{
case 0: return c_white;
case 1: return c_red;
case 2: return c_blue;
case 3: return c_yellow;
case 4: return c_aqua;
}
else
switch(argument0)
{
case 0: return c_gray;
case 1: return c_maroon;
case 2: return c_navy;
case 3: return c_dkgray;
case 4: return c_dkgray;
}

View File

@@ -0,0 +1,8 @@
{
"id": "936d6e83-fc19-4fdf-948c-2bb853e8fe06",
"modelName": "GMScript",
"mvc": "1.0",
"name": "get_color3",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,18 @@
var i = real(argument0);
if (i < 152)
return 1;
else if (i < 252)
return 2;
else if (i < 387)
return 3;
else if (i < 494)
return 4;
else if (i < 650)
return 5;
else if (i < 722)
return 6;
else if (i < 810)
return 7;
else
return 8;

View File

@@ -0,0 +1,8 @@
{
"id": "a81da6f6-3588-4f9a-a596-68f659e864bb",
"modelName": "GMScript",
"mvc": "1.0",
"name": "get_gen",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,10 @@
///hud_draw_counter()
// The famous counter
if (instance_exists(obj_lock) || global.counter>0)
{
draw_set_halign(fa_center);
draw_set_valign(fa_middle);
draw_set_color(c_white);
draw_text_transformed(align_x(region.mid_right, 0), align_y(region.mid_right, 0), global.counter, global.icon_scale*3, global.icon_scale*3, image_angle);
}

View File

@@ -0,0 +1,8 @@
{
"id": "fe4fdbbd-947b-8e06-4930-f2b97cf5a423",
"modelName": "GMScript",
"mvc": "1.0",
"name": "hud_draw_counter",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,12 @@
///hud_draw_selected()
// Display Info
var color = get_color3(global.selected[dex.own], false);
draw_set_color(color);
draw_text_hud(global.selected[dex.dexno], 2, -2, color);
draw_pokemon_hud(global.selected[dex.sprite]);
draw_text_hud(global.selected[dex.pokemon], 2, 1, color);
draw_text_hud(global.selected[dex.form], 1.5, 3, color);
draw_type_hud(global.selected[dex.type1], global.selected[dex.type2], 4.5);

View File

@@ -0,0 +1,8 @@
{
"id": "a6e48265-2887-9dce-6824-b73d2ed253e1",
"modelName": "GMScript",
"mvc": "1.0",
"name": "hud_draw_selected",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,29 @@
///icon_path_get(str[pkmn+form], shiny?)
var str = argument0;
var shiny = argument1;
if (!shiny)
var folder = "Regular";
else
var folder = "Shiny";
var filename = "Icons\\"+folder+"\\"+string(str)+".png";
if (!file_exists(filename))
{
if (!directory_exists("Logs"))
directory_create("Logs")
var log = file_text_open_append(working_directory+"/Logs/MissingSprites.log")
file_text_write_string(log, str+" ("+folder+")");
file_text_writeln(log);
file_text_close(log);
//show_debug_message("Missing Icon: "+str+" ("+folder+")");
if (shiny)
return icon_path_get(str, false);
}
return filename;

View File

@@ -0,0 +1,8 @@
{
"id": "961739d9-bcef-9d3d-a9a7-6d0487191e8e",
"modelName": "GMScript",
"mvc": "1.0",
"name": "icon_path_get",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,31 @@
///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.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;
global.selecting = noone;
global.counter = 9999;
global.change = false;
enum region { boxes, top, mid_left, mid_right, bottom }

View File

@@ -0,0 +1,8 @@
{
"id": "01109f28-4eca-fc23-b0d9-649acb9c158c",
"modelName": "GMScript",
"mvc": "1.0",
"name": "initials_set",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,16 @@
///lock_create(obj_id)
global.selecting = argument0;
selected_set(argument0);
if (!instance_exists(obj_lock))
with (instance_create_depth(x, y, depth-1, obj_lock))
{
plus = button_create(0, 0, but.plus);
minus = button_create(0, 0, but.minus);
}
button_update_all();
selected_output();

View File

@@ -0,0 +1,8 @@
{
"id": "1c861d7a-eed5-61b7-02f5-201672b6f730",
"modelName": "GMScript",
"mvc": "1.0",
"name": "lock_create",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,10 @@
///lock_destroy()
global.selecting = noone;
with (obj_lock.plus) { instance_destroy() };
with (obj_lock.minus) { instance_destroy() };
if (instance_exists(obj_lock))
with (obj_lock)
instance_destroy();

View File

@@ -0,0 +1,8 @@
{
"id": "5e879a22-94f8-a47e-fee7-5e134971dd7f",
"modelName": "GMScript",
"mvc": "1.0",
"name": "lock_destroy",
"IsCompatibility": false,
"IsDnD": false
}

View 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+"'.");

View File

@@ -0,0 +1,8 @@
{
"id": "f9b58311-f42f-4092-8b77-56cf2bed59c9",
"modelName": "GMScript",
"mvc": "1.0",
"name": "make_screenshot",
"IsCompatibility": false,
"IsDnD": false
}

View File

@@ -0,0 +1,33 @@
///make_slot(x_index, y_index, Pokémon index)
var px = argument0;
var py = argument1;
var sel = argument2;
with instance_create(px, py, obj_slot)
{
idno = global.dexdata[sel, dex.idno];
dexno = global.dexdata[sel, dex.dexno];
pokemon = global.dexdata[sel, dex.pokemon];
form = global.dexdata[sel, dex.form];
type1 = global.dexdata[sel, dex.type1];
type2 = global.dexdata[sel, dex.type2];
own = global.savedata[sel];
color = get_color3(own, false);
image_speed = 0;
hover = false;
spr = make_sprite(pokemon, form);
slot_box = global.box_count;
slot_x = px;
slot_y = py;
plus_x = 0;
plus_y = 0;
spr_plus = 1;
//show_debug_message("Spawned #"+dexno+" "+pokemon+" "+form+".");
}

View File

@@ -0,0 +1,8 @@
{
"id": "6df2b0f9-2c05-4c17-b985-f4da9dba1940",
"modelName": "GMScript",
"mvc": "1.0",
"name": "make_slot",
"IsCompatibility": false,
"IsDnD": false
}

Some files were not shown because too many files have changed in this diff Show More