mirror of
https://github.com/PoshoDev/DexTool.git
synced 2026-04-27 09:36:53 -05:00
455 lines
12 KiB
XML
455 lines
12 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><undefined></parentName>
|
|
<maskName><undefined></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 & ENUM
|
|
|
|
enum dex
|
|
{
|
|
idno,
|
|
dexno,
|
|
pokemon,
|
|
form,
|
|
type1,
|
|
type2,
|
|
boxable,
|
|
sprite,
|
|
own
|
|
}
|
|
|
|
global.dexdata = csv_load("pokedata");
|
|
</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);
|
|
|
|
for (var i=0; i<=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<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;
|
|
}
|
|
|
|
for (var i=0; i<5; i++) // Box Y
|
|
for (var j=0; j<6; j++) // Box X
|
|
{
|
|
if (global.current<global.dex_len)
|
|
{
|
|
with instance_create(j, i, obj_slot)
|
|
{
|
|
idno = global.dexdata[global.current, dex.idno];
|
|
dexno = global.dexdata[global.current, dex.dexno];
|
|
pokemon = global.dexdata[global.current, dex.pokemon];
|
|
form = global.dexdata[global.current, dex.form];
|
|
type1 = global.dexdata[global.current, dex.type1];
|
|
type2 = global.dexdata[global.current, dex.type2];
|
|
|
|
own = global.savedata[global.current];
|
|
|
|
color = get_color3(own, false);
|
|
|
|
image_speed = 0;
|
|
hover = false;
|
|
spr = make_sprite(pokemon, form);
|
|
|
|
slot_box = global.box_count;
|
|
slot_x = j;
|
|
slot_y = i;
|
|
|
|
plus_x = 0;
|
|
plus_y = 0;
|
|
spr_plus = 1;
|
|
|
|
show_debug_message("Spawned #"+dexno+" "+pokemon+" "+form+".");
|
|
}
|
|
|
|
global.current++;
|
|
}
|
|
}
|
|
}
|
|
</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 & 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)
|
|
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())
|
|
{
|
|
global.current_box--;
|
|
|
|
if (global.current_box < 1)
|
|
global.current_box = 1;
|
|
else
|
|
scroll_do();
|
|
}
|
|
else if (mouse_wheel_down())
|
|
{
|
|
global.current_box++;
|
|
|
|
if (global.current_box > 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>
|
|
</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>
|