DexTool/LivingDexSS.gmx/objects/obj_global.object.gmx
2020-02-17 14:23:11 -06:00

384 lines
11 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>&lt;undefined&gt;</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
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);
</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")
for (var i=0; i&lt;=global.dex_len; i++)
global.savedata[i] = ini_read_real("Pokemon", string(i), 0);
global.current_box = ini_read_real("Navigation", "Current Box", 1);
ini_close();
show_debug_message("LOADED SAVE FILE.");
}
else
{
ini_open("save.ini");
ini_write_real("Info", "Number", 0.1);
ini_close();
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);
global.box_header[global.box_count].number = global.box_count;
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)
{
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 = sprite_add("Icons\Regular\"+string(pokemon)+".png",0,true,false,19,14);
slot_box = global.box_count;
slot_x = j;
slot_y = i;
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="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 &lt; 1)
global.current_box = 1;
else
scroll_do();
}
else if (mouse_wheel_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>color = get_color3(global.selected[dex.own], false);
draw_set_color(color);
/// DRAW HOVER INFO
var len = global.box_len/8;
var hal = len/2;
var mid = room_width*0.75;
draw_set_font(global.font)
draw_set_halign(fa_middle)
draw_text_transformed(mid, room_height*0.1, scr_zeros(global.selected[dex.dexno]), len, len, 0);
draw_text_transformed(mid, room_height*0.5, global.selected[dex.pokemon], len, len, 0);
draw_set_color(c_white);
if (global.selected[dex.type2] != "")
{
draw_sprite_ext(spr_type, scr_typeget(global.selected[dex.type1]), mid-(30*hal)-hal, room_height*0.6, hal, hal, image_angle, image_blend, image_alpha);
draw_sprite_ext(spr_type, scr_typeget(global.selected[dex.type2]), mid+hal, room_height*0.6, hal, hal, image_angle, image_blend, image_alpha);
}
else
{
}
</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>