DexTool/LivingDexSS.gmx/objects/obj_global.object.gmx
2020-02-23 15:44:33 -06:00

532 lines
14 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_piketch</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>0</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events>
<event eventtype="0" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// DEX LOAD &amp; ENUM (+GALAR DEX)
// National Dex data loading
enum dex
{
idno,
dexno,
pokemon,
form,
type1,
type2,
boxable,
bankable,
sprite,
own
}
global.dexdata = csv_load("pokedata");
// Galar Dex data loading
enum gdex
{
galarno,
dexno,
pokemon,
type1,
type2
}
global.galardata = csv_load("galardex");
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// 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;
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// SAVE DATA
if (file_exists("save.ini"))
{
ini_open("save.ini")
global.current_box = ini_read_real("Navigation", "Current Box", 1);
global.show_galar = ini_read_real("Display", "Galar Dex", false);
for (var i=0; i&lt;=global.dex_len; i++)
global.savedata[i] = ini_read_real("Pokemon", string(i), 0);
ini_close();
show_debug_message("LOADED SAVE FILE.");
}
else
{
ini_open("save.ini");
ini_write_real("Info", "Number", 0.1);
ini_close();
global.current_box = 1;
show_debug_message("CREATED SAVE FILE.");
}
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// SPAWN SLOTS
var pos_x = 0;
var pos_y = 0;
global.current = 1;
for (global.box_count=1; global.current&lt;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&lt;5; i++) // Box Y
for (var j=0; j&lt;6; j++) // Box X
{
if (global.current&lt;global.dex_len &amp;&amp; !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;
}
}
}
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>601</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>1</exetype>
<functionname>action_execute_script</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>9</kind>
<script>scr_window_resize</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>
</action>
</event>
<event eventtype="3" enumb="2">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>// UPDATE PREVIOUS MOUSE POSITIONS
global.mouse_x_prev = mouse_x;
global.mouse_y_prev = mouse_y;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="3" enumb="1">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// MOUSE SPEED &amp; DIRECTION
global.mouse_dir_x = mouse_x-global.mouse_x_prev;
global.mouse_dir_y = mouse_y-global.mouse_y_prev;
//show_debug_message("("+string(global.mouse_dir_x)+","+string(global.mouse_dir_y)+")");
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="3" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// WINDOW RESIZE CHECK
if ((window_get_width()!=global.window_width || window_get_height()!=global.window_height) &amp;&amp; window_get_width()&gt;2)
scr_window_resize();
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>global.box_scale = sprite_get_width(spr_slot)*global.icon_scale;
</string>
</argument>
</arguments>
</action>
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// SCROLLING
if (mouse_wheel_up() || keyboard_check_pressed(vk_up))
{
global.current_box--;
if (global.current_box &lt; 1)
global.current_box = 1;
else
scroll_do();
}
else if (mouse_wheel_down() || keyboard_check_pressed(vk_down))
{
global.current_box++;
if (global.current_box &gt; global.box_count-1)
global.current_box = global.box_count-1;
else
scroll_do();
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// DRAW
/// 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);
// Debug
//draw_guidelines(false);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="9" enumb="83">
<action>
<libid>1</libid>
<id>601</id>
<kind>0</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>1</exetype>
<functionname>action_execute_script</functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<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>
</action>
</event>
<event eventtype="9" enumb="71">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>global.show_galar = !global.show_galar
if (file_exists("save.ini"))
{
ini_open("save.ini")
ini_write_real("Display", "Galar Dex", global.show_galar);
ini_close();
}
room_restart();
</string>
</argument>
</arguments>
</action>
</event>
</events>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
<PhysicsObjectGroup>0</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
<PhysicsShapePoints/>
</object>