Advertisement
corumbaplay

turbo neoGeo_intiVisor_v2

Aug 2nd, 2023 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 31.97 KB | Gaming | 0 0
  1.  
  2. --neoGeo_intiVisor_v2.lua
  3. --Para SF2ce en Fightcade2
  4. --Desarrollado por : intiMarqo
  5. --16/12/2021
  6. --https://www.youtube.com/channel/UC86un-0H23nsI14ZBXS23EQ
  7. --https://www.twitch.tv/intimarqo
  8.  
  9.     print('*** IntiVisor v2.0 para Fightcade2 ***')
  10.     print('by IntiMarqo')
  11.     print('https://www.youtube.com/channel/UC86un-0H23nsI14ZBXS23EQ')
  12.     print('Alterado by MakeMeet   layout, cores e add novos jogos...')
  13. local t_color = {
  14.         on1=0xFF0000FF, on2=0x000000FF, off1=0xFFFFFFFF, off2=0x000000FF
  15.     }
  16. local juego6botones = {"xmvsf", "ssf2tnl", "sf2mix", "sf2ce","sf2hf","ssf2xjr1","sfa2u","sfa3","sfiii3nr1","mvsc"} --,"jojobanr1"
  17. local juego4botones = {"garou","rbffspec","kof94","kof95","kof96","kof97","kof98","kof99","kof2002","kf2k2pls","samsho2","samsho3","samsho4","samsho5","samsh5sp","karnovr","svcsplus"}
  18.  
  19. local gd = require "gd"
  20. png={}
  21. img={}
  22.  
  23. -- local K_NEGRO = 0X000000FF --local K_CINZA = 0x858585FF
  24. local K_COLOR_RR = 0xFF3F4FFF
  25. local K_COLOR_OO = 0xEE9433FF
  26. local K_COLOR_YY = 0xE8D400FF
  27. local K_COLOR_BB = 0x5EB4F4FF
  28. local K_COLOR_P1 = 0X87CEFAFF
  29. local K_P1_BGROUND = 0x86A9BFFF --local K_P1_BGROUND = 0x69B4D0FF
  30. local K_COLOR_P2 = 0XFF6347FF
  31. local K_P2_BGROUND = 0xBB7E76FF --local K_P2_BGROUND = 0xAE9297FF --local K_P2_BGROUND = 0xE94029FF
  32.  
  33. function verEntradasJoystick6()
  34.     local t_entrada = {}
  35.     local width,height = emu.screenwidth() ,emu.screenheight()  --local OffsetJOYs = 169
  36.     --agrega
  37.     local J1x = 67 --xx JOYS POSIÇÃO
  38.     local y1 = 18 -1 --yy JOYS POSIÇÃO
  39.     --Quita
  40.     local x2 = 08 + J1x --08 Fator de correção final da tela
  41.     local y2 = y1
  42.    
  43.     gui.box(J1x, height - y1 - 11 , J1x + 45 , height - y1 +2 ,K_P1_BGROUND)
  44.    
  45.         t_entrada[1 .. "^"] =  {J1x + 7  , height - y1 - 11, "P" .. 1 .. " Up"}
  46.         t_entrada[1 .. "v"] =  {J1x + 7  , height - y1 -  4, "P" .. 1 .. " Down"}
  47.         t_entrada[1 .. "<"] =  {J1x + 2  , height - y1 -  8, "P" .. 1 .. " Left"}
  48.         t_entrada[1 .. ">"] =  {J1x + 12 , height - y1 -  8, "P" .. 1 .. " Right"}
  49.         t_entrada[1 .. "LP"] = {J1x + 17 , height - y1 - 11, "P" .. 1 .. " Weak Punch"}
  50.         t_entrada[1 .. "MP"] = {J1x + 27 , height - y1 - 11, "P" .. 1 .. " Medium Punch"}
  51.         t_entrada[1 .. "HP"] = {J1x + 37 , height - y1 - 11, "P" .. 1 .. " Strong Punch"}
  52.         t_entrada[1 .. "LK"] = {J1x + 17 , height - y1 -  4, "P" .. 1 .. " Weak Kick"}
  53.         t_entrada[1 .. "MK"] = {J1x + 27 , height - y1 -  4, "P" .. 1 .. " Medium Kick"}
  54.         t_entrada[1 .. "HK"] = {J1x + 37 , height - y1 -  4, "P" .. 1 .. " Strong Kick"}
  55.    
  56.     gui.box(width - x2 - 37 , height - y2 - 11 , width - x2 + 7 , height - y2 +2 ,K_P2_BGROUND)
  57.    
  58.         t_entrada[2 .. "^"] =  {width - x2 - 30 ,  height - y2 - 11, "P" .. 2 .. " Up"}
  59.         t_entrada[2 .. "v"] =  {width - x2 - 30 ,  height - y2 -  4, "P" .. 2 .. " Down"}
  60.         t_entrada[2 .. "<"] =  {width - x2 - 35 ,  height - y2 -  8, "P" .. 2 .. " Left"}
  61.         t_entrada[2 .. ">"] =  {width - x2 - 25 ,  height - y2 -  8, "P" .. 2 .. " Right"}
  62.         t_entrada[2 .. "LP"] = {width - x2 - 20 ,  height - y2 - 11, "P" .. 2 .. " Weak Punch"}
  63.         t_entrada[2 .. "MP"] = {width - x2 - 10 ,  height - y2 - 11, "P" .. 2 .. " Medium Punch"}
  64.         t_entrada[2 .. "HP"] = {width - x2 - 1 ,   height - y2 - 11, "P" .. 2 .. " Strong Punch"}
  65.         t_entrada[2 .. "LK"] = {width - x2 - 20 ,  height - y2 -  4, "P" .. 2 .. " Weak Kick"}
  66.         t_entrada[2 .. "MK"] = {width - x2 - 10 ,  height - y2 -  4, "P" .. 2 .. " Medium Kick"}
  67.         t_entrada[2 .. "HK"] = {width - x2 - 1 ,   height - y2 -  4, "P" .. 2 .. " Strong Kick"}
  68.    
  69.     for k,v in pairs(t_entrada) do
  70.         local color1,color2 = t_color.on1,t_color.on2
  71.         if joypad.get()[v[3]] == false  then color1,color2 = t_color.off1,t_color.off2 end
  72.         gui.text(v[1], v[2], string.sub(k, 2), color1, color2)
  73.     end
  74. end
  75.  
  76. local function hexdump_to_string(hexdump)
  77.     local str = ""
  78.     for n = 1, hexdump:len(), 2 do
  79.         str = str .. string.char("0x" .. hexdump:sub(n,n+1))
  80.     end
  81.     return str
  82. end
  83.  
  84. local function readimages()
  85.     local width,height = emu.screenwidth() ,emu.screenheight()
  86. --  img[1] = gd.createFromPngStr(hexdump_to_string(png[1])):gdStr()
  87. --  gui.gdoverlay((width/2)-35,height-15, img[1])
  88.  
  89. end
  90.  
  91. function verEntradasJoystick4()
  92.     local t_entrada = {}
  93.     local width,height = emu.screenwidth() ,emu.screenheight()  --local OffsetJOYs = 131
  94.     --agrega
  95.     local J1x = 57 --xx JOYS POSIÇÃO  
  96.     local y1 = 24  --yy JOYS POSIÇÃO
  97.     --Quita
  98.     local x2 = 04 + J1x --04 Fator de correção final da tela
  99.     local y2 = y1
  100.    
  101.     gui.box(J1x, height - y1 - 11 , J1x + 40 , height - y1 +2 ,K_P1_BGROUND)
  102.    
  103.         t_entrada[1 .. "^"] =  {J1x + 7  , height - y1 - 11, "P" .. 1 .. " Up"}
  104.         t_entrada[1 .. "v"] =  {J1x + 7  , height - y1 -  4, "P" .. 1 .. " Down"}
  105.         t_entrada[1 .. "<"] =  {J1x + 2  , height - y1 -  8, "P" .. 1 .. " Left"}
  106.         t_entrada[1 .. ">"] =  {J1x + 12 , height - y1 -  8, "P" .. 1 .. " Right"}
  107.         t_entrada[1 .. "A"] = {J1x + 18 , height - y1 -   8, "P" .. 1 .. " Button A"}
  108.         t_entrada[1 .. "B"] = {J1x + 24 , height - y1 -   8, "P" .. 1 .. " Button B"}
  109.         t_entrada[1 .. "C"] = {J1x + 30 , height - y1 -   8, "P" .. 1 .. " Button C"}
  110.         t_entrada[1 .. "D"] = {J1x + 36 , height - y1 -   8, "P" .. 1 .. " Button D"}
  111.    
  112.     gui.box(width - x2 - 37 , height - y2 - 11 , width - x2 + 3 , height - y2 +2 ,K_P2_BGROUND)
  113.    
  114.         t_entrada[2 .. "^"] =  {width - x2 - 30 ,  height - y2 - 11, "P" .. 2 .. " Up"}
  115.         t_entrada[2 .. "v"] =  {width - x2 - 30 ,  height - y2 -  4, "P" .. 2 .. " Down"}
  116.         t_entrada[2 .. "<"] =  {width - x2 - 35 ,  height - y2 -  8, "P" .. 2 .. " Left"}
  117.         t_entrada[2 .. ">"] =  {width - x2 - 25 ,  height - y2 -  8, "P" .. 2 .. " Right"}
  118.         t_entrada[2 .. "A"] = {width - x2 - 19 ,  height -   y2 - 8, "P" .. 2 .. " Button A"}
  119.         t_entrada[2 .. "B"] = {width - x2 - 13 ,  height -   y2 - 8, "P" .. 2 .. " Button B"}
  120.         t_entrada[2 .. "C"] = {width - x2 - 7 ,   height -   y2 - 8, "P" .. 2 .. " Button C"}
  121.         t_entrada[2 .. "D"] = {width - x2 - 1 ,  height -    y2 - 8, "P" .. 2 .. " Button D"}
  122.    
  123.     for k,v in pairs(t_entrada) do
  124.         local color1,color2 = t_color.on1,t_color.on2
  125.         if joypad.get()[v[3]] == false  then color1,color2 = t_color.off1,t_color.off2 end
  126.         gui.text(v[1], v[2], string.sub(k, 2), color1, color2)
  127.     end
  128. end
  129.  
  130. local fpsValor, tamanoMaxstring=60 , 18
  131.  
  132. local countPressLP=0
  133. local countPressMP=0
  134. local countPressHP=0
  135. local countPressLK=0
  136. local countPressMK=0
  137. local countPressHK=0
  138.  
  139.  
  140. local countPress2LP=0
  141. local countPress2MP=0
  142. local countPress2HP=0
  143. local countPress2LK=0
  144. local countPress2MK=0
  145. local countPress2HK=0
  146.  
  147.  
  148.  
  149. function cortarstring(string)
  150.     local resp = string.sub(string,2,2)
  151.          if resp == '-' then
  152.             resp = string.sub(string,3)
  153.          else
  154.             resp = string.sub(string,4)
  155.          end
  156.         return resp
  157. end
  158.  
  159. local contadorEntradasPorSegundoLP=fpsValor
  160. local countPressLP=0
  161. local indCambioLP=true
  162. local stringLP=''
  163. function detectorLP()
  164.  
  165. -- LEGENDA 6 Botões
  166.     gui.text(2,218 - 1,'  Toques / segs -->  1-5 Normal  6-13 Rapido        14-19 Possivel  20-30 Turbo Real')
  167.     gui.text(2,218 - 1,'                     1-5 Normal',K_COLOR_BB)
  168.     gui.text(2,218 - 1,'                                 6-13 Rapido',K_COLOR_YY)
  169.     gui.text(2,218 - 1,'                                                    14-19 Possivel',K_COLOR_OO)
  170.     gui.text(2,218 - 1,'                                                                    20-30 Turbo Real',K_COLOR_RR)  
  171.    
  172.     gui.text(100, 40 ,'-- P1 --',K_COLOR_P1)
  173.     gui.text(2 , 49 ,'LP',K_COLOR_P1)
  174.    
  175.     local inp = joypad.get()
  176.    
  177.     local xx1 = 11 -- xx
  178.     local yy1 = 49
  179.     local xx2 = 90 -- xx
  180.     local yy2 = 55
  181.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  182.    
  183.     local J1x = 11+2 --xx
  184.     local y1 = 49
  185.    
  186.     if inp["P1 Weak Punch"] then
  187.         if indCambioLP then
  188.             countPressLP = countPressLP+1
  189.             indCambioLP    = not indCambioLP
  190.         end
  191.     else
  192.         indCambioLP=true
  193.     end
  194.    
  195.     if  countPressLP > 0 then
  196.         contadorEntradasPorSegundoLP=contadorEntradasPorSegundoLP-1
  197.     end
  198.    
  199.     if contadorEntradasPorSegundoLP==0 and countPressLP>0 then
  200.            
  201.             if  string.len(stringLP) > tamanoMaxstring then
  202.                  stringLP=cortarstring(stringLP)
  203.             end
  204.            
  205.             if stringLP == '' then
  206.                 stringLP=countPressLP
  207.             else
  208.                 stringLP=stringLP..'-'..countPressLP
  209.             end
  210.  
  211.             contadorEntradasPorSegundoLP=fpsValor
  212.             countPressLP=0
  213.             indCambioLP=true
  214.        
  215.     end
  216.    
  217.     gui.text(J1x,y1,stringLP)
  218.    
  219. end
  220.  
  221. local contadorEntradasPorSegundoMP=fpsValor
  222. local countPressMP=0
  223. local stringMP=''
  224. local indCambioMP=true
  225. function detectorMP()
  226.    
  227.     gui.text(2 , 58 ,'MP',K_COLOR_P1)
  228.    
  229.     local inp = joypad.get()
  230.    
  231.     local xx1 = 11
  232.     local yy1 = 49 + 9
  233.     local xx2 = 90
  234.     local yy2 = 55 + 9
  235.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  236.    
  237.    
  238.     local J1x = 11+2
  239.     local y1 = 49+9
  240.    
  241.     if inp["P1 Medium Punch"] then
  242.         if indCambioMP then
  243.             countPressMP = countPressMP+1
  244.             indCambioMP    = not indCambioMP
  245.         end
  246.     else
  247.         indCambioMP=true
  248.     end
  249.    
  250.     if  countPressMP > 0 then
  251.         contadorEntradasPorSegundoMP=contadorEntradasPorSegundoMP-1
  252.     end
  253.    
  254.     if contadorEntradasPorSegundoMP==0 and countPressMP>0 then
  255.            
  256.             if  string.len(stringMP) > tamanoMaxstring then
  257.                 stringMP=cortarstring(stringMP)
  258.             end
  259.            
  260.             if stringMP == '' then
  261.                 stringMP=countPressMP
  262.             else
  263.                 stringMP=stringMP..'-'..countPressMP
  264.             end
  265.  
  266.             contadorEntradasPorSegundoMP=fpsValor
  267.             countPressMP=0
  268.             indCambioMP=true
  269.        
  270.     end
  271.    
  272.     gui.text(J1x,y1,stringMP)
  273.    
  274. end
  275.  
  276. local contadorEntradasPorSegundoHP=fpsValor
  277. local countPressHP=0
  278. local stringHP=''
  279. local indCambioHP=true
  280. function detectorHP()
  281.    
  282.     gui.text(2 , 58+9 ,'HP',K_COLOR_P1)
  283.    
  284.     local inp = joypad.get()
  285.    
  286.     local xx1 = 11
  287.     local yy1 = 49 + 9 + 9
  288.     local xx2 = 90
  289.     local yy2 = 55 + 9 + 9
  290.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  291.    
  292.     local J1x = 11+2
  293.     local y1 = 49+9 + 9
  294.    
  295.     if inp["P1 Strong Punch"] then
  296.         if indCambioHP then
  297.             countPressHP = countPressHP+1
  298.             indCambioHP    = not indCambioHP
  299.         end
  300.     else
  301.         indCambioHP=true
  302.     end
  303.    
  304.     if  countPressHP > 0 then
  305.         contadorEntradasPorSegundoHP=contadorEntradasPorSegundoHP-1
  306.     end
  307.    
  308.     if contadorEntradasPorSegundoHP==0 and countPressHP>0 then
  309.            
  310.             if  string.len(stringHP) > tamanoMaxstring then
  311.                 stringHP=cortarstring(stringHP)
  312.             end
  313.            
  314.             if stringHP == '' then
  315.                 stringHP=countPressHP
  316.             else
  317.                 stringHP=stringHP..'-'..countPressHP
  318.             end
  319.  
  320.             contadorEntradasPorSegundoHP=fpsValor
  321.             countPressHP=0
  322.             indCambioHP=true
  323.        
  324.     end
  325.    
  326.    
  327.     gui.text(J1x,y1,stringHP)
  328.    
  329. end
  330.  
  331. local contadorEntradasPorSegundoLK=fpsValor
  332. local countPressLK=0
  333. local stringLK=''
  334. local indCambioLK=true
  335. function detectorLK()
  336.    
  337.     gui.text(2 + 50 +45, 49 + 0,'LK',K_COLOR_P1)
  338.    
  339.     local inp = joypad.get()
  340.    
  341.     local xx1 = 9 + 50 + 47
  342.     local yy1 = 49
  343.     local xx2 = 48 + 50 + 90
  344.     local yy2 = 55
  345.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  346.    
  347.     local J1x = 11+2+90+5
  348.     local y1 = 49
  349.    
  350.     if inp["P1 Weak Kick"] then
  351.         if indCambioLK then
  352.             countPressLK = countPressLK+1
  353.             indCambioLK    = not indCambioLK
  354.         end
  355.     else
  356.         indCambioLK=true
  357.     end
  358.    
  359.     if  countPressLK > 0 then
  360.         contadorEntradasPorSegundoLK=contadorEntradasPorSegundoLK-1
  361.     end
  362.    
  363.     if contadorEntradasPorSegundoLK==0 and countPressLK>0 then
  364.            
  365.             if  string.len(stringLK) > tamanoMaxstring then
  366.                 stringLK=cortarstring(stringLK)
  367.             end
  368.            
  369.             if stringLK == '' then
  370.                 stringLK=countPressLK
  371.             else
  372.                 stringLK=stringLK..'-'..countPressLK
  373.             end
  374.  
  375.             contadorEntradasPorSegundoLK=fpsValor
  376.             countPressLK=0
  377.             indCambioLK=true
  378.        
  379.     end
  380.    
  381.     gui.text(J1x,y1,stringLK)
  382. end
  383.  
  384. local contadorEntradasPorSegundoMK=fpsValor
  385. local countPressMK=0
  386. local stringMK=''
  387. local indCambioMK=true
  388. function detectorMK()
  389.    
  390.     gui.text(2 + 50 +45  , 49 + 9 , 'MK',K_COLOR_P1)
  391.    
  392.     local inp = joypad.get()
  393.    
  394.     local xx1 = 9 + 50 + 47
  395.     local yy1 = 49 +  9
  396.     local xx2 = 48 + 50 + 90
  397.     local yy2 = 55 +  9
  398.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  399.    
  400.     local J1x = 11+2+90+5
  401.     local y1 = 49 + 9
  402.    
  403.     if inp["P1 Medium Kick"] then
  404.         if indCambioMK then
  405.             countPressMK = countPressMK+1
  406.             indCambioMK    = not indCambioMK
  407.         end
  408.     else
  409.         indCambioMK=true
  410.     end
  411.    
  412.     if  countPressMK > 0 then
  413.         contadorEntradasPorSegundoMK=contadorEntradasPorSegundoMK-1
  414.     end
  415.    
  416.     if contadorEntradasPorSegundoMK==0 and countPressMK>0 then
  417.            
  418.             if  string.len(stringMK) > tamanoMaxstring then
  419.                 stringMK=cortarstring(stringMK)
  420.             end
  421.            
  422.             if stringMK == '' then
  423.                 stringMK=countPressMK
  424.             else
  425.                 stringMK=stringMK..'-'..countPressMK
  426.             end
  427.  
  428.             contadorEntradasPorSegundoMK=fpsValor
  429.             countPressMK=0
  430.             indCambioMK=true
  431.        
  432.     end
  433.    
  434.     gui.text(J1x,y1,stringMK)
  435.    
  436. end
  437.  
  438.  
  439. local contadorEntradasPorSegundoHK=fpsValor
  440. local countPressHK=0
  441. local stringHK=''
  442. local indCambioHK=true
  443. function detectorHK()
  444.    
  445.     gui.text(2 + 50 +45, 49 + 9+9,'HK',K_COLOR_P1)
  446.    
  447.     local inp = joypad.get()
  448.    
  449.     local xx1 = 9 + 50 + 47
  450.     local yy1 = 49 +  9 + 9
  451.     local xx2 = 48 + 50 + 90
  452.     local yy2 = 55 +  9 + 9
  453.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  454.    
  455.     local J1x = 11+2+90+5
  456.     local y1 = 49+9+9
  457.    
  458.     if inp["P1 Strong Kick"] then
  459.         if indCambioHK then
  460.             countPressHK = countPressHK+1
  461.             indCambioHK    = not indCambioHK
  462.         end
  463.     else
  464.         indCambioHK=true
  465.     end
  466.    
  467.     if  countPressHK > 0 then
  468.         contadorEntradasPorSegundoHK=contadorEntradasPorSegundoHK-1
  469.     end
  470.    
  471.     if contadorEntradasPorSegundoHK==0 and countPressHK>0 then
  472.            
  473.             if  string.len(stringHK) > tamanoMaxstring then
  474.                 stringHK=cortarstring(stringHK)
  475.             end
  476.            
  477.             if stringHK == '' then
  478.                 stringHK=countPressHK
  479.             else
  480.                 stringHK=stringHK..'-'..countPressHK
  481.             end
  482.  
  483.             contadorEntradasPorSegundoHK=fpsValor
  484.             countPressHK=0
  485.             indCambioHK=true
  486.        
  487.     end
  488.    
  489.     gui.text(J1x,y1,stringHK)
  490. end
  491.  
  492.  
  493. local contadorEntradasPorSegundo2LP=fpsValor
  494. local countPress2LP=0
  495. local string2LP=''
  496. local indCambio2LP=true
  497. function detector2LP()
  498.  
  499.     gui.text(10 + 240, 40 ,'-- P2 --',K_COLOR_P2)
  500.     gui.text(2 + 194, 49 ,'LP',K_COLOR_P2)
  501.    
  502.     local inp = joypad.get()
  503.    
  504.     local xx1 = 11 + 194-- xx
  505.     local yy1 = 49
  506.     local xx2 = 90 + 194-- xx
  507.     local yy2 = 55
  508.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  509.    
  510.     local J1x = 11 + 2 +194--xx
  511.     local y1 = 49
  512.    
  513.     if inp["P2 Weak Punch"] then
  514.         if indCambio2LP then
  515.             countPress2LP = countPress2LP+1
  516.             indCambio2LP    = not indCambio2LP
  517.         end
  518.     else
  519.         indCambio2LP=true
  520.     end
  521.    
  522.     if  countPress2LP > 0 then
  523.         contadorEntradasPorSegundo2LP=contadorEntradasPorSegundo2LP-1
  524.     end
  525.    
  526.     if contadorEntradasPorSegundo2LP==0 and countPress2LP>0 then
  527.            
  528.             if  string.len(string2LP) > tamanoMaxstring then
  529.                 string2LP=cortarstring(string2LP)
  530.             end
  531.            
  532.             if string2LP == '' then
  533.                 string2LP=countPress2LP
  534.             else
  535.                 string2LP=string2LP..'-'..countPress2LP
  536.             end
  537.  
  538.             contadorEntradasPorSegundo2LP=fpsValor
  539.             countPress2LP=0
  540.             indCambio2LP=true
  541.        
  542.     end
  543.    
  544.     gui.text(J1x,y1,string2LP)
  545.    
  546. end
  547.  
  548. local contadorEntradasPorSegundo2MP=fpsValor
  549. local countPress2MP=0
  550. local string2MP=''
  551. local indCambio2MP=true
  552. function detector2MP()
  553.    
  554.     gui.text(2+194 , 49+9,'MP',K_COLOR_P2)
  555.    
  556.     local inp = joypad.get()
  557.    
  558.     local xx1 = 11 + 194 -- xx
  559.     local yy1 = 49 + 9
  560.     local xx2 = 90 + 194 -- xx
  561.     local yy2 = 55 + 9
  562.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  563.    
  564.     local J1x = 11+2 + 194 --xx
  565.     local y1 = 49+9
  566.    
  567.     if inp["P2 Medium Punch"] then
  568.         if indCambio2MP then
  569.             countPress2MP   = countPress2MP+1
  570.             indCambio2MP    = not indCambio2MP
  571.         end
  572.     else
  573.         indCambio2MP=true
  574.     end
  575.    
  576.     if  countPress2MP > 0 then
  577.         contadorEntradasPorSegundo2MP=contadorEntradasPorSegundo2MP-1
  578.     end
  579.    
  580.     if contadorEntradasPorSegundo2MP==0 and countPress2MP>0 then
  581.            
  582.             if  string.len(string2MP) > tamanoMaxstring then
  583.                 string2MP=cortarstring(string2MP)
  584.             end
  585.            
  586.             if string2MP == '' then
  587.                 string2MP=countPress2MP
  588.             else
  589.                 string2MP=string2MP..'-'..countPress2MP
  590.             end
  591.  
  592.             contadorEntradasPorSegundo2MP=fpsValor
  593.             countPress2MP=0
  594.             indCambio2MP=true
  595.        
  596.     end
  597.    
  598.     gui.text(J1x,y1,string2MP)
  599.    
  600. end
  601.  
  602. local contadorEntradasPorSegundo2HP=fpsValor
  603. local countPress2HP=0
  604. local string2HP=''
  605. local indCambio2HP=true
  606. function detector2HP()
  607.    
  608.     gui.text(2+194 , 49+9+9,'HP',K_COLOR_P2)
  609.    
  610.     local inp = joypad.get()
  611.    
  612.     local xx1 = 11 + 194 -- xx
  613.     local yy1 = 49 + 9 + 9
  614.     local xx2 = 90 + 194 -- xx
  615.     local yy2 = 55 + 9 + 9
  616.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  617.    
  618.     local J1x = 11+2 +194 --xx
  619.     local y1 = 49+9 + 9
  620.    
  621.     if inp["P2 Strong Punch"] then
  622.         if indCambio2HP then
  623.             countPress2HP = countPress2HP+1
  624.             indCambio2HP    = not indCambio2HP
  625.         end
  626.     else
  627.         indCambio2HP=true
  628.     end
  629.    
  630.     if  countPress2HP > 0 then
  631.         contadorEntradasPorSegundo2HP=contadorEntradasPorSegundo2HP-1
  632.     end
  633.    
  634.     if contadorEntradasPorSegundo2HP==0 and countPress2HP>0 then
  635.            
  636.             if  string.len(string2HP) > tamanoMaxstring then
  637.                 string2HP=cortarstring(string2HP)
  638.             end
  639.            
  640.             if string2HP == '' then
  641.                 string2HP=countPress2HP
  642.             else
  643.                 string2HP=string2HP..'-'..countPress2HP
  644.             end
  645.  
  646.             contadorEntradasPorSegundo2HP=fpsValor
  647.             countPress2HP=0
  648.             indCambio2HP=true
  649.        
  650.     end
  651.    
  652.     gui.text(J1x,y1,string2HP)
  653.    
  654. end
  655.  
  656. local contadorEntradasPorSegundo2LK=fpsValor
  657. local countPress2LK=0
  658. local string2LK=''
  659. local indCambio2LK=true
  660. function detector2LK()
  661.    
  662.    
  663.     gui.text(2 + 194+96, 49 ,'LK',K_COLOR_P2)
  664.    
  665.     local inp = joypad.get()
  666.    
  667.     local xx1 = 11 + 194 + 96 -- xx
  668.     local yy1 = 49 -- + 9
  669.     local xx2 = 90 + 194 + 96-- xx
  670.     local yy2 = 55 -- + 8
  671.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  672.    
  673.     local J1x = 11 + 2 +194 + 96--xx
  674.     local y1 = 49
  675.    
  676.     if inp["P2 Weak Kick"] then    
  677.         if indCambio2LK then
  678.             countPress2LK = countPress2LK+1
  679.             indCambio2LK    = not indCambio2LK
  680.         end
  681.     else
  682.         indCambio2LK=true
  683.     end
  684.    
  685.     if  countPress2LK > 0 then
  686.         contadorEntradasPorSegundo2LK=contadorEntradasPorSegundo2LK-1
  687.     end
  688.    
  689.     if contadorEntradasPorSegundo2LK==0 and countPress2LK>0 then
  690.            
  691.             if  string.len(string2LK) > tamanoMaxstring then
  692.                 string2LK=cortarstring(string2LK)
  693.             end
  694.            
  695.             if string2LK == '' then
  696.                 string2LK=countPress2LK
  697.             else
  698.                 string2LK=string2LK..'-'..countPress2LK
  699.             end
  700.  
  701.             contadorEntradasPorSegundo2LK=fpsValor
  702.             countPress2LK=0
  703.             indCambio2LK=true
  704.        
  705.     end
  706.    
  707.     gui.text(J1x,y1,string2LK)
  708. end
  709.  
  710. local contadorEntradasPorSegundo2MK=fpsValor
  711. local countPress2MK=0
  712. local string2MK=''
  713. local indCambio2MK=true
  714. function detector2MK()
  715.    
  716.     gui.text(2 + 194+96, 49+9 ,'MK',K_COLOR_P2)
  717.    
  718.     local inp = joypad.get()
  719.    
  720.     local xx1 = 11 + 194 + 96 -- xx
  721.     local yy1 = 49 + 9
  722.     local xx2 = 90 + 194 + 96-- xx
  723.     local yy2 = 55 + 9
  724.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  725.    
  726.     local J1x = 11 + 2 +194 + 96--xx
  727.     local y1 = 49 +9
  728.    
  729.     if inp["P2 Medium Kick"] then
  730.         if indCambio2MK then
  731.             countPress2MK = countPress2MK+1
  732.             indCambio2MK    = not indCambio2MK
  733.         end
  734.     else
  735.         indCambio2MK=true
  736.     end
  737.    
  738.     if  countPress2MK > 0 then
  739.         contadorEntradasPorSegundo2MK=contadorEntradasPorSegundo2MK-1
  740.     end
  741.    
  742.     if contadorEntradasPorSegundo2MK==0 and countPress2MK>0 then
  743.            
  744.             if  string.len(string2MK) > tamanoMaxstring then
  745.                 string2MK=cortarstring(string2MK)
  746.             end
  747.            
  748.             if string2MK == '' then
  749.                 string2MK=countPress2MK
  750.             else
  751.                 string2MK=string2MK..'-'..countPress2MK
  752.             end
  753.  
  754.             contadorEntradasPorSegundo2MK=fpsValor
  755.             countPress2MK=0
  756.             indCambio2MK=true
  757.        
  758.     end
  759.    
  760.     gui.text(J1x,y1,string2MK)
  761.    
  762. end
  763.  
  764. local contadorEntradasPorSegundo2HK=fpsValor
  765. local countPress2HK=0
  766. local string2HK=''
  767. local indCambio2HK=true
  768. function detector2HK()
  769.    
  770.     gui.text(2 + 194+96, 49+9+9 ,'HK',K_COLOR_P2)
  771.    
  772.     local inp = joypad.get()
  773.    
  774.     local xx1 = 11 + 194 + 96  -- xx
  775.     local yy1 = 49 + 9  + 9
  776.     local xx2 = 90 + 194 + 96  -- xx
  777.     local yy2 = 55 + 9  +9  
  778.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  779.    
  780.     local J1x = 11 + 2 +194 + 96--xx
  781.     local y1 = 49 +9 + 9
  782.    
  783.     if inp["P2 Strong Kick"] then
  784.         if indCambio2HK then
  785.             countPress2HK = countPress2HK+1
  786.             indCambio2HK    = not indCambio2HK
  787.         end
  788.     else
  789.         indCambio2HK=true
  790.     end
  791.    
  792.     if  countPress2HK > 0 then
  793.         contadorEntradasPorSegundo2HK=contadorEntradasPorSegundo2HK-1
  794.     end
  795.    
  796.     if contadorEntradasPorSegundo2HK==0 and countPress2HK>0 then
  797.            
  798.             if  string.len(string2HK) > tamanoMaxstring then
  799.                 string2HK=cortarstring(string2HK)
  800.             end
  801.            
  802.             if string2HK == '' then
  803.                 string2HK=countPress2HK
  804.             else
  805.                 string2HK=string2HK..'-'..countPress2HK
  806.             end
  807.  
  808.             contadorEntradasPorSegundo2HK=fpsValor
  809.             countPress2HK=0
  810.             indCambio2HK=true
  811.        
  812.     end
  813.    
  814.     gui.text(J1x,y1,string2HK)
  815.    
  816. end
  817.  
  818.  
  819.  
  820. local contadorEntradasPorSegundoLP4=fpsValor
  821. local countPressLP4=0
  822. local indCambioLP4=true
  823. local stringLP4=''
  824. function detectorLP4()
  825.     local b1x = 67 -8
  826.     local b1y = 40
  827.     gui.text(b1x, b1y ,'-- P1 --',K_COLOR_P1) --xxxxxxxxxx
  828.     gui.text(2 , 49 ,'A',K_COLOR_P1)
  829.    
  830.     local inp = joypad.get()
  831.    
  832.     local xx1 = 11 -- xx
  833.     local yy1 = 49
  834.     local xx2 = 90 -- xx
  835.     local yy2 = 55
  836.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  837.    
  838.     local J1x = 11+2 --xx
  839.     local y1 = 49
  840.    
  841.     if inp["P1 Button A"] then
  842.         if indCambioLP4 then
  843.             countPressLP4 = countPressLP4+1
  844.             indCambioLP4    = not indCambioLP4
  845.         end
  846.     else
  847.         indCambioLP4=true
  848.     end
  849.    
  850.     if  countPressLP4 > 0 then
  851.         contadorEntradasPorSegundoLP4=contadorEntradasPorSegundoLP4-1
  852.     end
  853.    
  854.     if contadorEntradasPorSegundoLP4==0 and countPressLP4>0 then
  855.            
  856.             if  string.len(stringLP4) > tamanoMaxstring then
  857.                  stringLP4=cortarstring(stringLP4)
  858.             end
  859.            
  860.             if stringLP4 == '' then
  861.                 stringLP4=countPressLP4
  862.             else
  863.                 stringLP4=stringLP4..'-'..countPressLP4
  864.             end
  865.  
  866.             contadorEntradasPorSegundoLP4=fpsValor
  867.             countPressLP4=0
  868.             indCambioLP4=true
  869.        
  870.     end
  871.    
  872.    
  873.     gui.text(J1x,y1,stringLP4)
  874.    
  875. end
  876.  
  877. local contadorEntradasPorSegundoMP4=fpsValor
  878. local countPressMP4=0
  879. local stringMP4=''
  880. local indCambioMP4=true
  881. function detectorMP4()
  882.    
  883.     gui.text(2 , 58 ,'B',K_COLOR_P1)
  884.     local xx1 = 11
  885.     local yy1 = 49 + 9
  886.     local xx2 = 90
  887.     local yy2 = 55 + 9
  888.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  889.    
  890.     local J1x = 11+2
  891.     local y1 = 49+9
  892.    
  893.     local inp = joypad.get()
  894.    
  895.     if inp["P1 Button B"] then
  896.         if indCambioMP4 then
  897.             countPressMP4 = countPressMP4+1
  898.             indCambioMP4    = not indCambioMP4
  899.         end
  900.     else
  901.         indCambioMP4=true
  902.     end
  903.    
  904.     if  countPressMP4 > 0 then
  905.         contadorEntradasPorSegundoMP4=contadorEntradasPorSegundoMP4-1
  906.     end
  907.    
  908.     if contadorEntradasPorSegundoMP4==0 and countPressMP4>0 then
  909.            
  910.             if  string.len(stringMP4) > tamanoMaxstring then
  911.                 stringMP4=cortarstring(stringMP4)
  912.             end
  913.            
  914.             if stringMP4 == '' then
  915.                 stringMP4=countPressMP4
  916.             else
  917.                 stringMP4=stringMP4..'-'..countPressMP4
  918.             end
  919.  
  920.             contadorEntradasPorSegundoMP4=fpsValor
  921.             countPressMP4=0
  922.             indCambioMP4=true
  923.        
  924.     end
  925.    
  926.     gui.text(J1x,y1,stringMP4)
  927.    
  928. end
  929.  
  930.  
  931.  
  932. local contadorEntradasPorSegundoLK4=fpsValor
  933. local countPressLK4=0
  934. local stringLK4=''
  935. local indCambioLK4=true
  936. function detectorLK4()
  937.    
  938.     gui.text(2 , 58 + 9 ,'C',K_COLOR_P1)
  939.     local xx1 = 11
  940.     local yy1 = 49 + 9 + 9
  941.     local xx2 = 90
  942.     local yy2 = 55 + 9 + 9
  943.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  944.    
  945.     local J1x = 11+2
  946.     local y1 = 49+9 + 9
  947.    
  948.     local inp = joypad.get()
  949.    
  950.     if inp["P1 Button C"] then
  951.         if indCambioLK4 then
  952.             countPressLK4 = countPressLK4+1
  953.             indCambioLK4  = not indCambioLK4
  954.         end
  955.     else
  956.         indCambioLK4=true
  957.     end
  958.    
  959.     if  countPressLK4 > 0 then
  960.         contadorEntradasPorSegundoLK4=contadorEntradasPorSegundoLK4-1
  961.     end
  962.    
  963.     if contadorEntradasPorSegundoLK4==0 and countPressLK4>0 then
  964.            
  965.             if  string.len(stringLK4) > tamanoMaxstring then
  966.                 stringLK4=cortarstring(stringLK4)
  967.             end
  968.            
  969.             if stringLK4 == '' then
  970.                 stringLK4=countPressLK4
  971.             else
  972.                 stringLK4=stringLK4..'-'..countPressLK4
  973.             end
  974.  
  975.             contadorEntradasPorSegundoLK4=fpsValor
  976.             countPressLK4=0
  977.             indCambioLK4=true
  978.        
  979.     end
  980.    
  981.     gui.text(J1x,y1,stringLK4)
  982. end
  983.  
  984. local contadorEntradasPorSegundoMK4=fpsValor
  985. local countPressMK4=0
  986. local stringMK4=''
  987. local indCambioMK4=true
  988. function detectorMK4()
  989.    
  990.     gui.text(2 , 58 +9 + 9  ,'D',K_COLOR_P1)
  991.     local xx1 = 11
  992.     local yy1 = 49 + 9 + 9 +9
  993.     local xx2 = 90
  994.     local yy2 = 55 + 9 + 9 + 9
  995.     gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
  996.    
  997.     local J1x = 11+2
  998.     local y1 = 49+9 + 9 + 9
  999.    
  1000.     local inp = joypad.get()
  1001.    
  1002.     if inp["P1 Button D"] then
  1003.         if indCambioMK4 then
  1004.             countPressMK4 = countPressMK4+1
  1005.             indCambioMK4    = not indCambioMK4
  1006.         end
  1007.     else
  1008.         indCambioMK4=true
  1009.     end
  1010.    
  1011.     if  countPressMK4 > 0 then
  1012.         contadorEntradasPorSegundoMK4=contadorEntradasPorSegundoMK4-1
  1013.     end
  1014.    
  1015.     if contadorEntradasPorSegundoMK4==0 and countPressMK4>0 then
  1016.            
  1017.             if  string.len(stringMK4) > tamanoMaxstring then
  1018.                 stringMK4=cortarstring(stringMK4)
  1019.             end
  1020.            
  1021.             if stringMK4 == '' then
  1022.                 stringMK4=countPressMK4
  1023.             else
  1024.                 stringMK4=stringMK4..'-'..countPressMK4
  1025.             end
  1026.  
  1027.             contadorEntradasPorSegundoMK4=fpsValor
  1028.             countPressMK4=0
  1029.             indCambioMK4=true
  1030.        
  1031.     end
  1032.    
  1033.     gui.text(J1x,y1,stringMK4)
  1034.    
  1035. end
  1036.  
  1037.  
  1038. local contadorEntradasPorSegundo2LP4=fpsValor
  1039. local countPress2LP4=0
  1040. local string2LP4=''
  1041. local indCambio2LP4=true
  1042. function detector2LP4()
  1043.  
  1044. -- LEGENDA 4 Botões
  1045.     gui.text(2,218 - 1,' Toques ->  1-5 Normal  6-13 Rapido       14-19 Possivel  20-30 Turbo Real')
  1046.     gui.text(2,218 - 1,'            1-5 Normal',K_COLOR_BB)
  1047.     gui.text(2,218 - 1,'                        6-13 Rapido',K_COLOR_YY)
  1048.     gui.text(2,218 - 1,'                                          14-19 Possivel',K_COLOR_OO)
  1049.     gui.text(2,218 - 1,'                                                          20-30 Turbo Real',K_COLOR_RR)
  1050.  
  1051.     gui.text(272 -67, 40 ,'-- P2 --',K_COLOR_P2) --xxxxxxxx
  1052.     gui.text(2 + 194, 49 ,'A',K_COLOR_P2)
  1053.    
  1054.     local xx1 = 11 +194-- xx
  1055.     local yy1 = 49
  1056.     local xx2 = 90 +194-- xx
  1057.     local yy2 = 55
  1058.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  1059.    
  1060.     local J1x = 11 + 2 +194--xx
  1061.     local y1 = 49
  1062.    
  1063.     local inp = joypad.get()
  1064.    
  1065.    
  1066.     if inp["P2 Button A"] then
  1067.         if indCambio2LP4 then
  1068.             countPress2LP4 = countPress2LP4+1
  1069.             indCambio2LP4    = not indCambio2LP4
  1070.         end
  1071.     else
  1072.         indCambio2LP4=true
  1073.     end
  1074.    
  1075.     if  countPress2LP4 > 0 then
  1076.         contadorEntradasPorSegundo2LP4=contadorEntradasPorSegundo2LP4-1
  1077.     end
  1078.    
  1079.     if contadorEntradasPorSegundo2LP4==0 and countPress2LP4>0 then
  1080.            
  1081.             if  string.len(string2LP4) > tamanoMaxstring then
  1082.                 string2LP4=cortarstring(string2LP4)
  1083.             end
  1084.            
  1085.             if string2LP4 == '' then
  1086.                 string2LP4=countPress2LP4
  1087.             else
  1088.                 string2LP4=string2LP4..'-'..countPress2LP4
  1089.             end
  1090.  
  1091.             contadorEntradasPorSegundo2LP4=fpsValor
  1092.             countPress2LP4=0
  1093.             indCambio2LP4=true
  1094.        
  1095.     end
  1096.    
  1097.     gui.text(J1x,y1,string2LP4)
  1098.    
  1099. end
  1100.  
  1101. local contadorEntradasPorSegundo2MP4=fpsValor
  1102. local countPress2MP4=0
  1103. local string2MP4=''
  1104. local indCambio2MP4=true
  1105. function detector2MP4()
  1106.    
  1107.     gui.text(2+194 , 49+9,'B',K_COLOR_P2)
  1108.    
  1109.     local xx1 = 11 + 194-- xx
  1110.     local yy1 = 49+9
  1111.     local xx2 = 90 + 194-- xx
  1112.     local yy2 = 55+9
  1113.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  1114.    
  1115.     local J1x = 11+2 + 194 --xx
  1116.     local y1 = 49+9
  1117.    
  1118.     local inp = joypad.get()
  1119.    
  1120.     if inp["P2 Button B"] then
  1121.         if indCambio2MP4 then
  1122.             countPress2MP4   = countPress2MP4+1
  1123.             indCambio2MP4    = not indCambio2MP4
  1124.         end
  1125.     else
  1126.         indCambio2MP4=true
  1127.     end
  1128.    
  1129.     if  countPress2MP4 > 0 then
  1130.         contadorEntradasPorSegundo2MP4=contadorEntradasPorSegundo2MP4-1
  1131.     end
  1132.    
  1133.     if contadorEntradasPorSegundo2MP4==0 and countPress2MP4>0 then
  1134.            
  1135.             if  string.len(string2MP4) > tamanoMaxstring then
  1136.                 string2MP4=cortarstring(string2MP4)
  1137.             end
  1138.            
  1139.             if string2MP4 == '' then
  1140.                 string2MP4=countPress2MP4
  1141.             else
  1142.                 string2MP4=string2MP4..'-'..countPress2MP4
  1143.             end
  1144.  
  1145.             contadorEntradasPorSegundo2MP4=fpsValor
  1146.             countPress2MP4=0
  1147.             indCambio2MP4=true
  1148.        
  1149.     end
  1150.    
  1151.     gui.text(J1x,y1,string2MP4)
  1152.    
  1153. end
  1154.  
  1155.  
  1156. local contadorEntradasPorSegundo2LK4=fpsValor
  1157. local countPress2LK4=0
  1158. local string2LK4=''
  1159. local indCambio2LK4=true
  1160. function detector2LK4()
  1161.    
  1162.     gui.text(2+194 , 49+9+9,'C',K_COLOR_P2)
  1163.    
  1164.     local xx1 = 11 + 194-- xx
  1165.     local yy1 = 49+9 + 9
  1166.     local xx2 = 90 + 194-- xx
  1167.     local yy2 = 55+9 + 9
  1168.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  1169.    
  1170.     local J1x = 11+2 + 194 --xx
  1171.     local y1 = 49+9 +9
  1172.    
  1173.     local inp = joypad.get()
  1174.    
  1175.     if inp["P2 Button C"] then    
  1176.         if indCambio2LK4 then
  1177.             countPress2LK4 = countPress2LK4+1
  1178.             indCambio2LK4    = not indCambio2LK4
  1179.         end
  1180.     else
  1181.         indCambio2LK4=true
  1182.     end
  1183.    
  1184.     if  countPress2LK4 > 0 then
  1185.         contadorEntradasPorSegundo2LK4=contadorEntradasPorSegundo2LK4-1
  1186.     end
  1187.    
  1188.     if contadorEntradasPorSegundo2LK4==0 and countPress2LK4>0 then
  1189.            
  1190.             if  string.len(string2LK4) > tamanoMaxstring then
  1191.                 string2LK4=cortarstring(string2LK4)
  1192.             end
  1193.            
  1194.             if string2LK4 == '' then
  1195.                 string2LK4=countPress2LK4
  1196.             else
  1197.                 string2LK4=string2LK4..'-'..countPress2LK4
  1198.             end
  1199.  
  1200.             contadorEntradasPorSegundo2LK4=fpsValor
  1201.             countPress2LK4=0
  1202.             indCambio2LK4=true
  1203.        
  1204.     end
  1205.    
  1206.     gui.text(J1x,y1,string2LK4)
  1207. end
  1208.  
  1209. local contadorEntradasPorSegundo2MK4=fpsValor
  1210. local countPress2MK4=0
  1211. local string2MK4=''
  1212. local indCambio2MK4=true
  1213. function detector2MK4()
  1214.    
  1215.     gui.text(2+194 , 49+9+9+9,'D',K_COLOR_P2)
  1216.    
  1217.     local xx1 = 11 + 194-- xx
  1218.     local yy1 = 49+9 + 9 +9
  1219.     local xx2 = 90 + 194-- xx
  1220.     local yy2 = 55+9 + 9 + 9
  1221.     gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
  1222.    
  1223.     local J1x = 11+2 + 194 --xx
  1224.     local y1 = 49+9 +9  + 9
  1225.    
  1226.     local inp = joypad.get()
  1227.    
  1228.     if inp["P2 Button D"] then
  1229.         if indCambio2MK4 then
  1230.             countPress2MK4 = countPress2MK4+1
  1231.             indCambio2MK4   = not indCambio2MK4
  1232.         end
  1233.     else
  1234.         indCambio2MK4=true
  1235.     end
  1236.    
  1237.     if  countPress2MK4 > 0 then
  1238.         contadorEntradasPorSegundo2MK4=contadorEntradasPorSegundo2MK4-1
  1239.     end
  1240.    
  1241.     if contadorEntradasPorSegundo2MK4==0 and countPress2MK4>0 then
  1242.            
  1243.             if  string.len(string2MK4) > tamanoMaxstring then
  1244.                 string2MK4=cortarstring(string2MK4)
  1245.             end
  1246.            
  1247.             if string2MK4 == '' then
  1248.                 string2MK4=countPress2MK4
  1249.             else
  1250.                 string2MK4=string2MK4..'-'..countPress2MK4
  1251.             end
  1252.  
  1253.             contadorEntradasPorSegundo2MK4=fpsValor
  1254.             countPress2MK4=0
  1255.             indCambio2MK4=true
  1256.        
  1257.     end
  1258.    
  1259.     gui.text(J1x,y1,string2MK4)
  1260.    
  1261. end
  1262.  
  1263. function imprimeTexto(leyenda,pie)
  1264. --  gui.text(2,76 + leyenda, ' -- Toques / segs --')
  1265. --  gui.text(2,84 + leyenda, ' 1 - 5  Normal ')
  1266. --  gui.text(2,92 + leyenda, ' 6 - 13 Rapido')
  1267. --  gui.text(2,100 + leyenda, '14 - 19 Possivel Turbo')
  1268. --  gui.text(2,108 + leyenda, '20 - 30 Turbo')
  1269. end
  1270.  
  1271.  local function buscarElemento(tabla, elem)
  1272.     for _,v in pairs(tabla) do
  1273.         if elem == v then
  1274.             return true
  1275.         end
  1276.     end
  1277.     return false
  1278. end
  1279.  
  1280. function determinaJuego()
  1281.     local gameName= emu.romname()
  1282.    
  1283.     if buscarElemento(juego6botones,gameName) then
  1284.         return 1
  1285.     elseif buscarElemento(juego4botones,gameName) then
  1286.         return 2
  1287.     else  
  1288.         return 0
  1289.     end
  1290. end
  1291.  
  1292. gui.register(function()
  1293.     readimages()
  1294. end)
  1295.  
  1296. emu.registerbefore( function()
  1297.     png[1]="89504e470d0a1a0a0000000d49484452000000470000000b08060000002d2a9008000000017352474200aece1ce90000000467414d410000b18f0bfc6105000000097048597300000ec400000ec401952b0e1b0000019c49444154484bed55db75c3200c75d2762906621ea661198651851e58029936cd697f529d73138c9e5cc9f840817f5c027f52810600352fca052917a825f3f3c62f57544085ecf633ee90c343399f41ae3d0b4beb79039b54d4a6613dc9eabce11e0928ce45120766c71f3edafb4dd87c57cda0fd0625e19aec65cd7a35f0415aada0a433e3428c4a2b90b6dd3753227b6e9a26df542a3d93b46a0bc4a2d1f654a28f769773f45a593d4faa819eabb8c990a9896b424c9bb2ee874ac359d99c26670de6109111faca5a0be70622f9c64e75fa0a704e6980da6e2043b4d41ad568083c37a342fda83d468e8e758fe54946385f3924090e792d90c5ce759620d342f5add31961dc3b01897f428e76946414a19d9557d416e7c8e94002fb653fde1fcef91d72cc61168cbab08633c6acf7e498664f9b3f2447822d90e1217187d8e4ecf7cfc8b9e8e849eaf9821cf1c52c9e982037addd5909b1714c8eed044e81f5e3602b063b2ea9cf89cf09ed24320a5ebae6c07da2b617f20539a35623643be71e1f83a73ee52f86f7e303eec71b1c37c4fd86ff774460f87238e013de6d755c5af52cd20000000049454e44ae426082"
  1298.     if (string.len(png[1]) == 1038) then
  1299.         if determinaJuego()==1 then
  1300.         verEntradasJoystick6()
  1301.         detectorLP()
  1302.         detectorMP()
  1303.         detectorHP()
  1304.         detectorLK()
  1305.         detectorMK()
  1306.         detectorHK()
  1307.         detector2LP()
  1308.         detector2MP()
  1309.         detector2HP()
  1310.         detector2LK()
  1311.         detector2MK()
  1312.         detector2HK()
  1313.         imprimeTexto(0,216)
  1314.         end
  1315.        
  1316.         if determinaJuego()==2 then
  1317.         verEntradasJoystick4()
  1318.         detectorLP4()
  1319.         detectorMP4()
  1320.         detectorLK4()
  1321.         detectorMK4()
  1322.         detector2LP4()
  1323.         detector2MP4()
  1324.         detector2LK4()
  1325.         detector2MK4() 
  1326.         imprimeTexto(12,210)
  1327.         end
  1328.     end
  1329. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement