Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 9.98 KB | None | 0 0
  1.  
  2.     if (zh_link_is_child() == 0) {
  3.  
  4.     load_data_from_rom(0x80600000, 0x0078C000, 0x1000, 0); //Fly
  5.     load_data_from_rom(0x80601000, 0x0078D000, 0x1000, 0); //Koktun
  6.     load_data_from_rom(0x80602000, 0x0078E000, 0x1000, 0); //Gor
  7.     load_data_from_rom(0x80603000, 0x0078F000, 0x1000, 0); //Zora
  8.     load_data_from_rom(0x80604000, 0x00791000, 0x1000, 0); //Iron
  9.     load_data_from_rom(0x80605000, 0x00792000, 0x1000, 0); //Hover
  10.  
  11.     //DPAD
  12.     en->tilepad.x = 262;
  13.     en->tilepad.y = 85;
  14.     en->tilepad.origin_anchor = G_TX_ANCHOR_C;
  15.     en->tilepad.width = 24;
  16.     en->tilepad.height= 24;
  17.     en->texturepad.timg = (long unsigned int)&asset_dpad;
  18.     en->texturepad.width = 32;
  19.     en->texturepad.height = 32;
  20.     en->texturepad.fmt = 3;
  21.     en->texturepad.bitsiz = G_IM_SIZ_16b;
  22.  
  23.  
  24.     //Koktun
  25.     en->tilekoktun.y = 102;
  26.     en->tilekoktun.origin_anchor = G_TX_ANCHOR_C;
  27.     en->tilekoktun.width = 11;
  28.     en->tilekoktun.height= 11;
  29.     en->texturekoktun.timg = 0x80601000;
  30.     en->texturekoktun.width = 32;
  31.     en->texturekoktun.height = 32;
  32.     en->texturekoktun.fmt = 0;
  33.     en->texturekoktun.bitsiz = G_IM_SIZ_32b;
  34.  
  35.     //Gor
  36.     en->tilegor.y = 102;
  37.     en->tilegor.origin_anchor = G_TX_ANCHOR_C;
  38.     en->tilegor.width = 11;
  39.     en->tilegor.height= 11;
  40.     en->texturegor.timg = 0x80602000;
  41.     en->texturegor.width = 32;
  42.     en->texturegor.height = 32;
  43.     en->texturegor.fmt = 0;
  44.     en->texturegor.bitsiz = G_IM_SIZ_32b;
  45.  
  46.     //Zora
  47.     en->tilezora.y = 102;
  48.     en->tilezora.origin_anchor = G_TX_ANCHOR_C;
  49.     en->tilezora.width = 11;
  50.     en->tilezora.height= 11;
  51.     en->texturezora.timg = 0x80603000;
  52.     en->texturezora.width = 32;
  53.     en->texturezora.height = 32;
  54.     en->texturezora.fmt = 0;
  55.     en->texturezora.bitsiz = G_IM_SIZ_32b;
  56.  
  57.     //Fly
  58.     en->tilefly.y = 102;
  59.     en->tilefly.origin_anchor = G_TX_ANCHOR_C;
  60.     en->tilefly.width = 11;
  61.     en->tilefly.height= 11;
  62.     en->texturefly.timg = 0x80600000;
  63.     en->texturefly.width = 32;
  64.     en->texturefly.height = 32;
  65.     en->texturefly.fmt = 0;
  66.     en->texturefly.bitsiz = G_IM_SIZ_32b;
  67.  
  68.     //Iron
  69.     en->tileiron.x = 280;
  70.     en->tileiron.y = 85;
  71.     en->tileiron.origin_anchor = G_TX_ANCHOR_C;
  72.     en->tileiron.width = 12;
  73.     en->tileiron.height= 12;
  74.     en->textureiron.timg = 0x80604000;
  75.     en->textureiron.width = 32;
  76.     en->textureiron.height = 32;
  77.     en->textureiron.fmt = 0;
  78.     en->textureiron.bitsiz = G_IM_SIZ_32b;
  79.  
  80.     //Hover
  81.     en->tilehover.x = 244;
  82.     en->tilehover.y = 85;
  83.     en->tilehover.width = 12;
  84.     en->tilehover.height= 12;
  85.     en->tilehover.origin_anchor = G_TX_ANCHOR_C;
  86.     en->texturehover.timg = 0x80605000;
  87.     en->texturehover.width = 32;
  88.     en->texturehover.height = 32;
  89.     en->texturehover.fmt = 0;
  90.     en->texturehover.bitsiz = G_IM_SIZ_32b;
  91.  
  92.         }
  93. }
  94.  
  95.  
  96.  
  97.  
  98.         if ((en->player.state_flags_1 == 0) && (interface_flag!=1) && (busy == 0)) {
  99.             if (tunic_possed == 0xF) {
  100.                 if (tunic_equip == 1) {
  101.                     en->tilekoktun.x = 256;
  102.                     en->tilegor.x = 261;
  103.                     en->tilezora.x = 266;
  104.                     en->tilefly.x = 271;
  105.                     en->tilekoktun.width = 15;
  106.                     en->tilekoktun.height= 15;
  107.                     en->tilegor.width = 11;
  108.                     en->tilegor.height= 11;
  109.                     en->tilezora.width = 11;
  110.                     en->tilezora.height= 11;
  111.                     en->tilefly.width = 11;
  112.                     en->tilefly.height= 11;
  113.                 }
  114.                 if (tunic_equip == 2) {
  115.                     en->tilekoktun.x = 271;
  116.                     en->tilegor.x = 256;
  117.                     en->tilezora.x = 261;
  118.                     en->tilefly.x = 266;
  119.                     en->tilegor.width = 15;
  120.                     en->tilegor.height= 15;
  121.                     en->tilekoktun.width = 11;
  122.                     en->tilekoktun.height= 11;
  123.                     en->tilezora.width = 11;
  124.                     en->tilezora.height= 11;
  125.                     en->tilefly.width = 11;
  126.                     en->tilefly.height= 11;
  127.                 }
  128.                 if (tunic_equip == 3) {
  129.                     en->tilekoktun.x = 266;
  130.                     en->tilegor.x = 271;
  131.                     en->tilezora.x = 256;
  132.                     en->tilefly.x = 261;
  133.                     en->tilezora.width = 15;
  134.                     en->tilezora.height= 15;
  135.                     en->tilekoktun.width = 11;
  136.                     en->tilekoktun.height= 11;
  137.                     en->tilegor.width = 11;
  138.                     en->tilegor.height= 11;
  139.                     en->tilefly.width = 11;
  140.                     en->tilefly.height= 11;
  141.                 }
  142.                 if (tunic_equip == 6) {
  143.                     en->tilekoktun.x = 261;
  144.                     en->tilegor.x = 266;
  145.                     en->tilezora.x = 271;
  146.                     en->tilefly.x = 256;
  147.                     en->tilefly.width = 15;
  148.                     en->tilefly.height= 15;
  149.                     en->tilekoktun.width = 11;
  150.                     en->tilekoktun.height= 11;
  151.                     en->tilegor.width = 11;
  152.                     en->tilegor.height= 11;
  153.                     en->tilezora.width = 11;
  154.                     en->tilezora.height= 11;
  155.                 }
  156.             }
  157.             else if (tunic_possed == 7){
  158.                 if (tunic_equip == 1){
  159.                     en->tilekoktun.x = 256;
  160.                     en->tilegor.x = 264;
  161.                     en->tilezora.x = 271;
  162.                     en->tilekoktun.width = 15;
  163.                     en->tilekoktun.height= 15;
  164.                     en->tilegor.width = 11;
  165.                     en->tilegor.height= 11;
  166.                     en->tilezora.width = 11;
  167.                     en->tilezora.height= 11;
  168.                 }
  169.                 if (tunic_equip == 2) {
  170.                     en->tilekoktun.x = 271;
  171.                     en->tilegor.x = 256;
  172.                     en->tilezora.x = 264;
  173.                     en->tilegor.width = 15;
  174.                     en->tilegor.height= 15;
  175.                     en->tilekoktun.width = 11;
  176.                     en->tilekoktun.height= 11;
  177.                     en->tilezora.width = 11;
  178.                     en->tilezora.height= 11;
  179.                 }
  180.                 if (tunic_equip == 3) {
  181.                     en->tilekoktun.x = 264;
  182.                     en->tilegor.x = 271;
  183.                     en->tilezora.x = 256;
  184.                     en->tilezora.width = 15;
  185.                     en->tilezora.height= 15;
  186.                     en->tilekoktun.width = 11;
  187.                     en->tilekoktun.height= 11;
  188.                     en->tilegor.width = 11;
  189.                     en->tilegor.height= 11;
  190.                 }
  191.             }
  192.             else if (tunic_possed == 5){
  193.                 if (tunic_equip == 1){
  194.                     en->tilekoktun.x = 261;
  195.                     en->tilezora.x = 266;
  196.                     en->tilekoktun.width = 15;
  197.                     en->tilekoktun.height= 15;
  198.                     en->tilezora.width = 11;
  199.                     en->tilezora.height= 11;
  200.                 }
  201.                 if (tunic_equip == 3) {
  202.                     en->tilekoktun.x = 266;
  203.                     en->tilezora.x = 261;
  204.                     en->tilezora.width = 15;
  205.                     en->tilezora.height= 15;
  206.                     en->tilekoktun.width = 11;
  207.                     en->tilekoktun.height= 11;
  208.                 }
  209.             }
  210.             else if (tunic_possed == 3){
  211.                 if (tunic_equip == 1){
  212.                     en->tilekoktun.x = 261;
  213.                     en->tilegor.x = 266;
  214.                     en->tilekoktun.width = 15;
  215.                     en->tilekoktun.height= 15;
  216.                     en->tilegor.width = 11;
  217.                     en->tilegor.height= 11;
  218.                 }
  219.                 if (tunic_equip == 3) {
  220.                     en->tilekoktun.x = 266;
  221.                     en->tilegor.x = 261;
  222.                     en->tilegor.width = 15;
  223.                     en->tilegor.height= 15;
  224.                     en->tilekoktun.width = 11;
  225.                     en->tilekoktun.height= 11;
  226.                 }
  227.             }
  228.  
  229.  
  230. if ((zh_link_is_child() == 0) && ((boots_possed > 1) || (tunic_possed > 1)) ) {
  231.         zh_draw_ui_sprite(&OVERLAY, &en->texturepad, &en->tilepad);
  232.         if (boots_possed == 5) {
  233.             if (boots_equip == 3) {
  234.                     en->tilehover.width = 18;
  235.                     en->tilehover.height = 18;
  236.             }
  237.             else {
  238.                     en->tilehover.width = 11;
  239.                     en->tilehover.height= 11;
  240.             }
  241.             zh_draw_ui_sprite(&OVERLAY, &en->texturehover, &en->tilehover);
  242.         }
  243.         if (boots_possed == 3) {
  244.             zh_draw_ui_sprite(&OVERLAY, &en->textureiron, &en->tileiron);
  245.         }
  246.         if (boots_possed == 7) {
  247.             zh_draw_ui_sprite(&OVERLAY, &en->texturehover, &en->tilehover);
  248.             zh_draw_ui_sprite(&OVERLAY, &en->textureiron, &en->tileiron);
  249.         }
  250.         if (tunic_possed == 0xF) {
  251.            
  252.             switch (tunic_equip) {
  253.                 case 1 :
  254.                 zh_draw_ui_sprite(&OVERLAY, &en->texturefly, &en->tilefly);
  255.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  256.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  257.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  258.                 break;
  259.                 case 2 :
  260.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  261.                 zh_draw_ui_sprite(&OVERLAY, &en->texturefly, &en->tilefly);
  262.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  263.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  264.                 break;
  265.                 case 3 :
  266.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  267.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  268.                 zh_draw_ui_sprite(&OVERLAY, &en->texturefly, &en->tilefly);
  269.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  270.                 break;
  271.                 case 6 :
  272.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  273.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  274.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  275.                 zh_draw_ui_sprite(&OVERLAY, &en->texturefly, &en->tilefly);
  276.                 break;
  277.             }
  278.         }
  279.         if (tunic_possed == 0x7) {
  280.             switch (tunic_equip) {
  281.                 case 1:
  282.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  283.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  284.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  285.                 break;
  286.                 case 2 :
  287.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  288.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  289.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  290.                 break;
  291.                 case 3 :
  292.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  293.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  294.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  295.                 break;
  296.             }
  297.         }
  298.                 if (tunic_possed == 0x5) {
  299.                     switch (tunic_equip) {
  300.                 case 1 :
  301.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  302.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  303.                 break;
  304.                 case 3 :
  305.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  306.                 zh_draw_ui_sprite(&OVERLAY, &en->texturezora, &en->tilezora);
  307.                 break;
  308.                     }
  309.                 }
  310.         if (tunic_possed == 0x3) {
  311.             switch (tunic_equip) {
  312.                 case 1 :
  313.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  314.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  315.                 break;
  316.                 case 2 :
  317.                 zh_draw_ui_sprite(&OVERLAY, &en->texturekoktun, &en->tilekoktun);
  318.                 zh_draw_ui_sprite(&OVERLAY, &en->texturegor, &en->tilegor);
  319.                 break;
  320.             }
  321.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement