// auto-transcompiled — see *.dnd.json for canonical truth
//image_speed = 0.666;

/*instance_create(x,y,mb_bodydraw);
instance_create(x,y,mb_optiondraw);*/
global.iv_infomaxlength = 14;
if(!is_string(global.iv_info)) global.iv_info = "";

global.iv_iconmax = 8; //Maximum letters in a line of icon title text
global.iv_selxmax = 5; //Maximum items in a row
global.iv_selymax = 5; //Maximum items in a column
global.iv_iconxpad = 32; //Padding on either side of each icon, in pixels
global.iv_iconypad = 40; //Padding on top of each icon, in pixels
//global.iv_toprow = 0; //The top row visible in the inventory, used for
                      //scrolling through items.

if(!is_string(global.iv_selicon)) global.iv_selicon = "";

//The item database is where all of the items in the user's inventory are
//actually stored. The first array index represents the type of items, and
//the second is the index of the item stored under that type.
//[0,?] - Stackable
//[1,?] - Key
//[2+,?] - Collective items of type col_type_index + 2 (col. indices below)
//----------
//[x,0] - Number of items under this category
//[x,1+] - Items under this category; all values and properties of that item
//are stored in a single string with a format common to others of that
//specific item type (unless, perhaps, it is a key item)
global.iv_totalcats = 6; //2 + No. Collective Categories

if(nullcheck(global.iv_itemdb[0,0])) {global.iv_itemdb[0,0] = 0;} //Thennn I dunno what.
if(nullcheck(global.iv_itemdb[1,0])) {global.iv_itemdb[1,0] = 0;} //Thennn I dunno what.

//make some friends
if(global.iv_itemdb[2,0] == 0)
{
global.iv_itemdb[2,0] = 1;
global.iv_itemdb[2,1] = "99|Add New Data";
/*global.iv_itemdb[2,2] = "1|Goaspad";
global.iv_itemdb[2,3] = "2|Jarhead111";
global.iv_itemdb[2,4] = "3|Celysus";
global.iv_itemdb[2,5] = "4|Ritz";
global.iv_itemdb[2,6] = "5|Zak";
global.iv_itemdb[2,7] = "6|Saber Mage";
global.iv_itemdb[2,8] = "7|Nerdy Bandit";
global.iv_itemdb[2,9] = "8|chickanbone";
global.iv_itemdb[2,10] = "9|DimJim";
global.iv_itemdb[2,11] = "10|KanoYugoro";
global.iv_itemdb[2,12] = "11|camper30";
global.iv_itemdb[2,13] = "12|cholf";
global.iv_itemdb[2,14] = "13|jkb";*/
/*global.iv_itemdb[2,15] = "14|V. McSchweistarvegan";
global.iv_itemdb[2,16] = "15|Townshend P.H.D.";
global.iv_itemdb[2,17] = "16|Vein Dropper";
global.iv_itemdb[2,18] = "17|Quevmutrauph";
global.iv_itemdb[2,19] = "18|Dwekto Tweetrin";
global.iv_itemdb[2,20] = "19|A Plan Man";
global.iv_itemdb[2,21] = "20|Huh??";
global.iv_itemdb[2,22] = "21|What?";
global.iv_itemdb[2,23] = "22|Who?";
global.iv_itemdb[2,24] = "23|Where?";
global.iv_itemdb[2,25] = "24|How?!?!?!";
global.iv_itemdb[2,26] = "25|Why??";
global.iv_itemdb[2,27] = "26|Wallabee????";
global.iv_itemdb[2,28] = "27|Oh Okay";
global.iv_itemdb[2,29] = "28|Sounds Great";
global.iv_itemdb[2,30] = "29|Fantasticles";
global.iv_itemdb[2,31] = "30|Glue";
global.iv_itemdb[2,32] = "31|Popsicle Stick";
global.iv_itemdb[2,33] = "32|Crayon";
global.iv_itemdb[2,34] = "33|Crown";
global.iv_itemdb[2,35] = "34|K|20\/\/N";
global.iv_itemdb[2,36] = "35|Wuuuuutt";
global.iv_itemdb[2,37] = "36|KINGDOM HEARTS!";
global.iv_itemdb[2,38] = "37|D.T.D.";
global.iv_itemdb[2,39] = "38|Riku";
global.iv_itemdb[2,40] = "39|Kairi";
global.iv_itemdb[2,41] = "40|Sora";
global.iv_itemdb[2,42] = "41|Donald";
global.iv_itemdb[2,43] = "42|and Goofy";
global.iv_itemdb[2,44] = "43|Hayner!";
global.iv_itemdb[2,45] = "44|Pence!!";
global.iv_itemdb[2,46] = "45|Olette!!!";
global.iv_itemdb[2,47] = "46|Saber Mage!!!!";
global.iv_itemdb[2,48] = "47|Axulllll";
global.iv_itemdb[2,49] = "48|The Cheat";
global.iv_itemdb[2,50] = "49|Da Tort";*/
}

//make some messages
if(global.iv_itemdb[4,0] == 0)
{
global.iv_itemdb[4,0] = 2;
global.iv_itemdb[4,1] = "Test#1#Vance Serori#2#MM/DD/YY#3#HH:MM:SS _M#4#This is the test message data body text. Hurray! I guess???";
global.iv_itemdb[4,2] = "Test No. 2#1#Saber Mage#2#MM/DD/YY#3#HH:MM:SS _M#4#Yay for second test message data!";
}

//make some colors
if(global.iv_itemdb[5,0] == 0)
{
global.iv_itemdb[5,0] = 5;
global.iv_itemdb[5,1] = "1|0";
global.iv_itemdb[5,2] = "2|0";
global.iv_itemdb[5,3] = "3|0";
global.iv_itemdb[5,4] = "4|0";
global.iv_itemdb[5,5] = "5|0";
}

//The item table is a 2-D array that represents the table-like item setup
//actually shown in the inventory. The items in this table are taken from
//the list in global.iv_itemdb that matches the currently selected item type,
//and copied into the item table with a "wrap" applied to them when there are
//more in a row than global.iv_selxmax allows.
//global.iv_itemtable[0,0] = 0;

//------------------
//-Selection Levels-
//------------------
//0 - Item Category Tabs
//1 - Collective Item Type
//2 - Item Select
//3 - Action Select
if(global.iv_sellevel == 3) global.iv_sellevel = 2;



//--------------------
//-Item Category Tabs-
//--------------------
//0 - Collective
//1 - Stackable
//2 - Key
//global.iv_tabindex = 0;

//----------------------
//-Collective Item Type-
//----------------------
//0 - Friend Data
//1 - Link Data
//2 - Message Data
//3 - Spectrum Data
//
//Empty types will only appear once data of that type is acquired. The menu
//should pass over all unacquired data types.
//global.iv_coltype = 0;
global.iv_coltypes[0] = 4;
global.iv_coltypes[1] = "Friend Data";
global.iv_coltypes[2] = "Link Data";
global.iv_coltypes[3] = "Message Data";
global.iv_coltypes[4] = "Spectrum Data";

//Row and column selection.
//global.iv_selx = 0;
//global.iv_sely = 0;

//----------------------
//-Action Index-
//----------------------
//The action options change depending on the type of item you have selected.
//Possible options: Use, Send, Drop (for Message Data), Delete, Duplicate,
//Edit (for Message Data created by the player), View, Equip
global.iv_action = 0;
//[0,0] - No. Actions
//[1,0+] - Actions' Names
//[2,0+] - Actions' Descriptions
//[3,0+] - Actions' Code
//global.iv_actions[0,0] = 0;



if(global.iv_sellevel == 2)
{
iv_setactions(iv_tabcol2db());
}

iv_formattable(iv_tabcol2db());
