Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --neoGeo_intiVisor_v2.lua
- --Para SF2ce en Fightcade2
- --Desarrollado por : intiMarqo
- --16/12/2021
- --https://www.youtube.com/channel/UC86un-0H23nsI14ZBXS23EQ
- --https://www.twitch.tv/intimarqo
- print('*** IntiVisor v2.0 para Fightcade2 ***')
- print('by IntiMarqo')
- print('https://www.youtube.com/channel/UC86un-0H23nsI14ZBXS23EQ')
- print('Alterado by MakeMeet layout, cores e add novos jogos...')
- local t_color = {
- on1=0xFF0000FF, on2=0x000000FF, off1=0xFFFFFFFF, off2=0x000000FF
- }
- local juego6botones = {"xmvsf", "ssf2tnl", "sf2mix", "sf2ce","sf2hf","ssf2xjr1","sfa2u","sfa3","sfiii3nr1","mvsc"} --,"jojobanr1"
- local juego4botones = {"garou","rbffspec","kof94","kof95","kof96","kof97","kof98","kof99","kof2002","kf2k2pls","samsho2","samsho3","samsho4","samsho5","samsh5sp","karnovr","svcsplus"}
- local gd = require "gd"
- png={}
- img={}
- -- local K_NEGRO = 0X000000FF --local K_CINZA = 0x858585FF
- local K_COLOR_RR = 0xFF3F4FFF
- local K_COLOR_OO = 0xEE9433FF
- local K_COLOR_YY = 0xE8D400FF
- local K_COLOR_BB = 0x5EB4F4FF
- local K_COLOR_P1 = 0X87CEFAFF
- local K_P1_BGROUND = 0x86A9BFFF --local K_P1_BGROUND = 0x69B4D0FF
- local K_COLOR_P2 = 0XFF6347FF
- local K_P2_BGROUND = 0xBB7E76FF --local K_P2_BGROUND = 0xAE9297FF --local K_P2_BGROUND = 0xE94029FF
- function verEntradasJoystick6()
- local t_entrada = {}
- local width,height = emu.screenwidth() ,emu.screenheight() --local OffsetJOYs = 169
- --agrega
- local J1x = 67 --xx JOYS POSIÇÃO
- local y1 = 18 -1 --yy JOYS POSIÇÃO
- --Quita
- local x2 = 08 + J1x --08 Fator de correção final da tela
- local y2 = y1
- gui.box(J1x, height - y1 - 11 , J1x + 45 , height - y1 +2 ,K_P1_BGROUND)
- t_entrada[1 .. "^"] = {J1x + 7 , height - y1 - 11, "P" .. 1 .. " Up"}
- t_entrada[1 .. "v"] = {J1x + 7 , height - y1 - 4, "P" .. 1 .. " Down"}
- t_entrada[1 .. "<"] = {J1x + 2 , height - y1 - 8, "P" .. 1 .. " Left"}
- t_entrada[1 .. ">"] = {J1x + 12 , height - y1 - 8, "P" .. 1 .. " Right"}
- t_entrada[1 .. "LP"] = {J1x + 17 , height - y1 - 11, "P" .. 1 .. " Weak Punch"}
- t_entrada[1 .. "MP"] = {J1x + 27 , height - y1 - 11, "P" .. 1 .. " Medium Punch"}
- t_entrada[1 .. "HP"] = {J1x + 37 , height - y1 - 11, "P" .. 1 .. " Strong Punch"}
- t_entrada[1 .. "LK"] = {J1x + 17 , height - y1 - 4, "P" .. 1 .. " Weak Kick"}
- t_entrada[1 .. "MK"] = {J1x + 27 , height - y1 - 4, "P" .. 1 .. " Medium Kick"}
- t_entrada[1 .. "HK"] = {J1x + 37 , height - y1 - 4, "P" .. 1 .. " Strong Kick"}
- gui.box(width - x2 - 37 , height - y2 - 11 , width - x2 + 7 , height - y2 +2 ,K_P2_BGROUND)
- t_entrada[2 .. "^"] = {width - x2 - 30 , height - y2 - 11, "P" .. 2 .. " Up"}
- t_entrada[2 .. "v"] = {width - x2 - 30 , height - y2 - 4, "P" .. 2 .. " Down"}
- t_entrada[2 .. "<"] = {width - x2 - 35 , height - y2 - 8, "P" .. 2 .. " Left"}
- t_entrada[2 .. ">"] = {width - x2 - 25 , height - y2 - 8, "P" .. 2 .. " Right"}
- t_entrada[2 .. "LP"] = {width - x2 - 20 , height - y2 - 11, "P" .. 2 .. " Weak Punch"}
- t_entrada[2 .. "MP"] = {width - x2 - 10 , height - y2 - 11, "P" .. 2 .. " Medium Punch"}
- t_entrada[2 .. "HP"] = {width - x2 - 1 , height - y2 - 11, "P" .. 2 .. " Strong Punch"}
- t_entrada[2 .. "LK"] = {width - x2 - 20 , height - y2 - 4, "P" .. 2 .. " Weak Kick"}
- t_entrada[2 .. "MK"] = {width - x2 - 10 , height - y2 - 4, "P" .. 2 .. " Medium Kick"}
- t_entrada[2 .. "HK"] = {width - x2 - 1 , height - y2 - 4, "P" .. 2 .. " Strong Kick"}
- for k,v in pairs(t_entrada) do
- local color1,color2 = t_color.on1,t_color.on2
- if joypad.get()[v[3]] == false then color1,color2 = t_color.off1,t_color.off2 end
- gui.text(v[1], v[2], string.sub(k, 2), color1, color2)
- end
- end
- local function hexdump_to_string(hexdump)
- local str = ""
- for n = 1, hexdump:len(), 2 do
- str = str .. string.char("0x" .. hexdump:sub(n,n+1))
- end
- return str
- end
- local function readimages()
- local width,height = emu.screenwidth() ,emu.screenheight()
- -- img[1] = gd.createFromPngStr(hexdump_to_string(png[1])):gdStr()
- -- gui.gdoverlay((width/2)-35,height-15, img[1])
- end
- function verEntradasJoystick4()
- local t_entrada = {}
- local width,height = emu.screenwidth() ,emu.screenheight() --local OffsetJOYs = 131
- --agrega
- local J1x = 57 --xx JOYS POSIÇÃO
- local y1 = 24 --yy JOYS POSIÇÃO
- --Quita
- local x2 = 04 + J1x --04 Fator de correção final da tela
- local y2 = y1
- gui.box(J1x, height - y1 - 11 , J1x + 40 , height - y1 +2 ,K_P1_BGROUND)
- t_entrada[1 .. "^"] = {J1x + 7 , height - y1 - 11, "P" .. 1 .. " Up"}
- t_entrada[1 .. "v"] = {J1x + 7 , height - y1 - 4, "P" .. 1 .. " Down"}
- t_entrada[1 .. "<"] = {J1x + 2 , height - y1 - 8, "P" .. 1 .. " Left"}
- t_entrada[1 .. ">"] = {J1x + 12 , height - y1 - 8, "P" .. 1 .. " Right"}
- t_entrada[1 .. "A"] = {J1x + 18 , height - y1 - 8, "P" .. 1 .. " Button A"}
- t_entrada[1 .. "B"] = {J1x + 24 , height - y1 - 8, "P" .. 1 .. " Button B"}
- t_entrada[1 .. "C"] = {J1x + 30 , height - y1 - 8, "P" .. 1 .. " Button C"}
- t_entrada[1 .. "D"] = {J1x + 36 , height - y1 - 8, "P" .. 1 .. " Button D"}
- gui.box(width - x2 - 37 , height - y2 - 11 , width - x2 + 3 , height - y2 +2 ,K_P2_BGROUND)
- t_entrada[2 .. "^"] = {width - x2 - 30 , height - y2 - 11, "P" .. 2 .. " Up"}
- t_entrada[2 .. "v"] = {width - x2 - 30 , height - y2 - 4, "P" .. 2 .. " Down"}
- t_entrada[2 .. "<"] = {width - x2 - 35 , height - y2 - 8, "P" .. 2 .. " Left"}
- t_entrada[2 .. ">"] = {width - x2 - 25 , height - y2 - 8, "P" .. 2 .. " Right"}
- t_entrada[2 .. "A"] = {width - x2 - 19 , height - y2 - 8, "P" .. 2 .. " Button A"}
- t_entrada[2 .. "B"] = {width - x2 - 13 , height - y2 - 8, "P" .. 2 .. " Button B"}
- t_entrada[2 .. "C"] = {width - x2 - 7 , height - y2 - 8, "P" .. 2 .. " Button C"}
- t_entrada[2 .. "D"] = {width - x2 - 1 , height - y2 - 8, "P" .. 2 .. " Button D"}
- for k,v in pairs(t_entrada) do
- local color1,color2 = t_color.on1,t_color.on2
- if joypad.get()[v[3]] == false then color1,color2 = t_color.off1,t_color.off2 end
- gui.text(v[1], v[2], string.sub(k, 2), color1, color2)
- end
- end
- local fpsValor, tamanoMaxstring=60 , 18
- local countPressLP=0
- local countPressMP=0
- local countPressHP=0
- local countPressLK=0
- local countPressMK=0
- local countPressHK=0
- local countPress2LP=0
- local countPress2MP=0
- local countPress2HP=0
- local countPress2LK=0
- local countPress2MK=0
- local countPress2HK=0
- function cortarstring(string)
- local resp = string.sub(string,2,2)
- if resp == '-' then
- resp = string.sub(string,3)
- else
- resp = string.sub(string,4)
- end
- return resp
- end
- local contadorEntradasPorSegundoLP=fpsValor
- local countPressLP=0
- local indCambioLP=true
- local stringLP=''
- function detectorLP()
- -- LEGENDA 6 Botões
- gui.text(2,218 - 1,' Toques / segs --> 1-5 Normal 6-13 Rapido 14-19 Possivel 20-30 Turbo Real')
- gui.text(2,218 - 1,' 1-5 Normal',K_COLOR_BB)
- gui.text(2,218 - 1,' 6-13 Rapido',K_COLOR_YY)
- gui.text(2,218 - 1,' 14-19 Possivel',K_COLOR_OO)
- gui.text(2,218 - 1,' 20-30 Turbo Real',K_COLOR_RR)
- gui.text(100, 40 ,'-- P1 --',K_COLOR_P1)
- gui.text(2 , 49 ,'LP',K_COLOR_P1)
- local inp = joypad.get()
- local xx1 = 11 -- xx
- local yy1 = 49
- local xx2 = 90 -- xx
- local yy2 = 55
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2 --xx
- local y1 = 49
- if inp["P1 Weak Punch"] then
- if indCambioLP then
- countPressLP = countPressLP+1
- indCambioLP = not indCambioLP
- end
- else
- indCambioLP=true
- end
- if countPressLP > 0 then
- contadorEntradasPorSegundoLP=contadorEntradasPorSegundoLP-1
- end
- if contadorEntradasPorSegundoLP==0 and countPressLP>0 then
- if string.len(stringLP) > tamanoMaxstring then
- stringLP=cortarstring(stringLP)
- end
- if stringLP == '' then
- stringLP=countPressLP
- else
- stringLP=stringLP..'-'..countPressLP
- end
- contadorEntradasPorSegundoLP=fpsValor
- countPressLP=0
- indCambioLP=true
- end
- gui.text(J1x,y1,stringLP)
- end
- local contadorEntradasPorSegundoMP=fpsValor
- local countPressMP=0
- local stringMP=''
- local indCambioMP=true
- function detectorMP()
- gui.text(2 , 58 ,'MP',K_COLOR_P1)
- local inp = joypad.get()
- local xx1 = 11
- local yy1 = 49 + 9
- local xx2 = 90
- local yy2 = 55 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2
- local y1 = 49+9
- if inp["P1 Medium Punch"] then
- if indCambioMP then
- countPressMP = countPressMP+1
- indCambioMP = not indCambioMP
- end
- else
- indCambioMP=true
- end
- if countPressMP > 0 then
- contadorEntradasPorSegundoMP=contadorEntradasPorSegundoMP-1
- end
- if contadorEntradasPorSegundoMP==0 and countPressMP>0 then
- if string.len(stringMP) > tamanoMaxstring then
- stringMP=cortarstring(stringMP)
- end
- if stringMP == '' then
- stringMP=countPressMP
- else
- stringMP=stringMP..'-'..countPressMP
- end
- contadorEntradasPorSegundoMP=fpsValor
- countPressMP=0
- indCambioMP=true
- end
- gui.text(J1x,y1,stringMP)
- end
- local contadorEntradasPorSegundoHP=fpsValor
- local countPressHP=0
- local stringHP=''
- local indCambioHP=true
- function detectorHP()
- gui.text(2 , 58+9 ,'HP',K_COLOR_P1)
- local inp = joypad.get()
- local xx1 = 11
- local yy1 = 49 + 9 + 9
- local xx2 = 90
- local yy2 = 55 + 9 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2
- local y1 = 49+9 + 9
- if inp["P1 Strong Punch"] then
- if indCambioHP then
- countPressHP = countPressHP+1
- indCambioHP = not indCambioHP
- end
- else
- indCambioHP=true
- end
- if countPressHP > 0 then
- contadorEntradasPorSegundoHP=contadorEntradasPorSegundoHP-1
- end
- if contadorEntradasPorSegundoHP==0 and countPressHP>0 then
- if string.len(stringHP) > tamanoMaxstring then
- stringHP=cortarstring(stringHP)
- end
- if stringHP == '' then
- stringHP=countPressHP
- else
- stringHP=stringHP..'-'..countPressHP
- end
- contadorEntradasPorSegundoHP=fpsValor
- countPressHP=0
- indCambioHP=true
- end
- gui.text(J1x,y1,stringHP)
- end
- local contadorEntradasPorSegundoLK=fpsValor
- local countPressLK=0
- local stringLK=''
- local indCambioLK=true
- function detectorLK()
- gui.text(2 + 50 +45, 49 + 0,'LK',K_COLOR_P1)
- local inp = joypad.get()
- local xx1 = 9 + 50 + 47
- local yy1 = 49
- local xx2 = 48 + 50 + 90
- local yy2 = 55
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2+90+5
- local y1 = 49
- if inp["P1 Weak Kick"] then
- if indCambioLK then
- countPressLK = countPressLK+1
- indCambioLK = not indCambioLK
- end
- else
- indCambioLK=true
- end
- if countPressLK > 0 then
- contadorEntradasPorSegundoLK=contadorEntradasPorSegundoLK-1
- end
- if contadorEntradasPorSegundoLK==0 and countPressLK>0 then
- if string.len(stringLK) > tamanoMaxstring then
- stringLK=cortarstring(stringLK)
- end
- if stringLK == '' then
- stringLK=countPressLK
- else
- stringLK=stringLK..'-'..countPressLK
- end
- contadorEntradasPorSegundoLK=fpsValor
- countPressLK=0
- indCambioLK=true
- end
- gui.text(J1x,y1,stringLK)
- end
- local contadorEntradasPorSegundoMK=fpsValor
- local countPressMK=0
- local stringMK=''
- local indCambioMK=true
- function detectorMK()
- gui.text(2 + 50 +45 , 49 + 9 , 'MK',K_COLOR_P1)
- local inp = joypad.get()
- local xx1 = 9 + 50 + 47
- local yy1 = 49 + 9
- local xx2 = 48 + 50 + 90
- local yy2 = 55 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2+90+5
- local y1 = 49 + 9
- if inp["P1 Medium Kick"] then
- if indCambioMK then
- countPressMK = countPressMK+1
- indCambioMK = not indCambioMK
- end
- else
- indCambioMK=true
- end
- if countPressMK > 0 then
- contadorEntradasPorSegundoMK=contadorEntradasPorSegundoMK-1
- end
- if contadorEntradasPorSegundoMK==0 and countPressMK>0 then
- if string.len(stringMK) > tamanoMaxstring then
- stringMK=cortarstring(stringMK)
- end
- if stringMK == '' then
- stringMK=countPressMK
- else
- stringMK=stringMK..'-'..countPressMK
- end
- contadorEntradasPorSegundoMK=fpsValor
- countPressMK=0
- indCambioMK=true
- end
- gui.text(J1x,y1,stringMK)
- end
- local contadorEntradasPorSegundoHK=fpsValor
- local countPressHK=0
- local stringHK=''
- local indCambioHK=true
- function detectorHK()
- gui.text(2 + 50 +45, 49 + 9+9,'HK',K_COLOR_P1)
- local inp = joypad.get()
- local xx1 = 9 + 50 + 47
- local yy1 = 49 + 9 + 9
- local xx2 = 48 + 50 + 90
- local yy2 = 55 + 9 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2+90+5
- local y1 = 49+9+9
- if inp["P1 Strong Kick"] then
- if indCambioHK then
- countPressHK = countPressHK+1
- indCambioHK = not indCambioHK
- end
- else
- indCambioHK=true
- end
- if countPressHK > 0 then
- contadorEntradasPorSegundoHK=contadorEntradasPorSegundoHK-1
- end
- if contadorEntradasPorSegundoHK==0 and countPressHK>0 then
- if string.len(stringHK) > tamanoMaxstring then
- stringHK=cortarstring(stringHK)
- end
- if stringHK == '' then
- stringHK=countPressHK
- else
- stringHK=stringHK..'-'..countPressHK
- end
- contadorEntradasPorSegundoHK=fpsValor
- countPressHK=0
- indCambioHK=true
- end
- gui.text(J1x,y1,stringHK)
- end
- local contadorEntradasPorSegundo2LP=fpsValor
- local countPress2LP=0
- local string2LP=''
- local indCambio2LP=true
- function detector2LP()
- gui.text(10 + 240, 40 ,'-- P2 --',K_COLOR_P2)
- gui.text(2 + 194, 49 ,'LP',K_COLOR_P2)
- local inp = joypad.get()
- local xx1 = 11 + 194-- xx
- local yy1 = 49
- local xx2 = 90 + 194-- xx
- local yy2 = 55
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11 + 2 +194--xx
- local y1 = 49
- if inp["P2 Weak Punch"] then
- if indCambio2LP then
- countPress2LP = countPress2LP+1
- indCambio2LP = not indCambio2LP
- end
- else
- indCambio2LP=true
- end
- if countPress2LP > 0 then
- contadorEntradasPorSegundo2LP=contadorEntradasPorSegundo2LP-1
- end
- if contadorEntradasPorSegundo2LP==0 and countPress2LP>0 then
- if string.len(string2LP) > tamanoMaxstring then
- string2LP=cortarstring(string2LP)
- end
- if string2LP == '' then
- string2LP=countPress2LP
- else
- string2LP=string2LP..'-'..countPress2LP
- end
- contadorEntradasPorSegundo2LP=fpsValor
- countPress2LP=0
- indCambio2LP=true
- end
- gui.text(J1x,y1,string2LP)
- end
- local contadorEntradasPorSegundo2MP=fpsValor
- local countPress2MP=0
- local string2MP=''
- local indCambio2MP=true
- function detector2MP()
- gui.text(2+194 , 49+9,'MP',K_COLOR_P2)
- local inp = joypad.get()
- local xx1 = 11 + 194 -- xx
- local yy1 = 49 + 9
- local xx2 = 90 + 194 -- xx
- local yy2 = 55 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11+2 + 194 --xx
- local y1 = 49+9
- if inp["P2 Medium Punch"] then
- if indCambio2MP then
- countPress2MP = countPress2MP+1
- indCambio2MP = not indCambio2MP
- end
- else
- indCambio2MP=true
- end
- if countPress2MP > 0 then
- contadorEntradasPorSegundo2MP=contadorEntradasPorSegundo2MP-1
- end
- if contadorEntradasPorSegundo2MP==0 and countPress2MP>0 then
- if string.len(string2MP) > tamanoMaxstring then
- string2MP=cortarstring(string2MP)
- end
- if string2MP == '' then
- string2MP=countPress2MP
- else
- string2MP=string2MP..'-'..countPress2MP
- end
- contadorEntradasPorSegundo2MP=fpsValor
- countPress2MP=0
- indCambio2MP=true
- end
- gui.text(J1x,y1,string2MP)
- end
- local contadorEntradasPorSegundo2HP=fpsValor
- local countPress2HP=0
- local string2HP=''
- local indCambio2HP=true
- function detector2HP()
- gui.text(2+194 , 49+9+9,'HP',K_COLOR_P2)
- local inp = joypad.get()
- local xx1 = 11 + 194 -- xx
- local yy1 = 49 + 9 + 9
- local xx2 = 90 + 194 -- xx
- local yy2 = 55 + 9 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11+2 +194 --xx
- local y1 = 49+9 + 9
- if inp["P2 Strong Punch"] then
- if indCambio2HP then
- countPress2HP = countPress2HP+1
- indCambio2HP = not indCambio2HP
- end
- else
- indCambio2HP=true
- end
- if countPress2HP > 0 then
- contadorEntradasPorSegundo2HP=contadorEntradasPorSegundo2HP-1
- end
- if contadorEntradasPorSegundo2HP==0 and countPress2HP>0 then
- if string.len(string2HP) > tamanoMaxstring then
- string2HP=cortarstring(string2HP)
- end
- if string2HP == '' then
- string2HP=countPress2HP
- else
- string2HP=string2HP..'-'..countPress2HP
- end
- contadorEntradasPorSegundo2HP=fpsValor
- countPress2HP=0
- indCambio2HP=true
- end
- gui.text(J1x,y1,string2HP)
- end
- local contadorEntradasPorSegundo2LK=fpsValor
- local countPress2LK=0
- local string2LK=''
- local indCambio2LK=true
- function detector2LK()
- gui.text(2 + 194+96, 49 ,'LK',K_COLOR_P2)
- local inp = joypad.get()
- local xx1 = 11 + 194 + 96 -- xx
- local yy1 = 49 -- + 9
- local xx2 = 90 + 194 + 96-- xx
- local yy2 = 55 -- + 8
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11 + 2 +194 + 96--xx
- local y1 = 49
- if inp["P2 Weak Kick"] then
- if indCambio2LK then
- countPress2LK = countPress2LK+1
- indCambio2LK = not indCambio2LK
- end
- else
- indCambio2LK=true
- end
- if countPress2LK > 0 then
- contadorEntradasPorSegundo2LK=contadorEntradasPorSegundo2LK-1
- end
- if contadorEntradasPorSegundo2LK==0 and countPress2LK>0 then
- if string.len(string2LK) > tamanoMaxstring then
- string2LK=cortarstring(string2LK)
- end
- if string2LK == '' then
- string2LK=countPress2LK
- else
- string2LK=string2LK..'-'..countPress2LK
- end
- contadorEntradasPorSegundo2LK=fpsValor
- countPress2LK=0
- indCambio2LK=true
- end
- gui.text(J1x,y1,string2LK)
- end
- local contadorEntradasPorSegundo2MK=fpsValor
- local countPress2MK=0
- local string2MK=''
- local indCambio2MK=true
- function detector2MK()
- gui.text(2 + 194+96, 49+9 ,'MK',K_COLOR_P2)
- local inp = joypad.get()
- local xx1 = 11 + 194 + 96 -- xx
- local yy1 = 49 + 9
- local xx2 = 90 + 194 + 96-- xx
- local yy2 = 55 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11 + 2 +194 + 96--xx
- local y1 = 49 +9
- if inp["P2 Medium Kick"] then
- if indCambio2MK then
- countPress2MK = countPress2MK+1
- indCambio2MK = not indCambio2MK
- end
- else
- indCambio2MK=true
- end
- if countPress2MK > 0 then
- contadorEntradasPorSegundo2MK=contadorEntradasPorSegundo2MK-1
- end
- if contadorEntradasPorSegundo2MK==0 and countPress2MK>0 then
- if string.len(string2MK) > tamanoMaxstring then
- string2MK=cortarstring(string2MK)
- end
- if string2MK == '' then
- string2MK=countPress2MK
- else
- string2MK=string2MK..'-'..countPress2MK
- end
- contadorEntradasPorSegundo2MK=fpsValor
- countPress2MK=0
- indCambio2MK=true
- end
- gui.text(J1x,y1,string2MK)
- end
- local contadorEntradasPorSegundo2HK=fpsValor
- local countPress2HK=0
- local string2HK=''
- local indCambio2HK=true
- function detector2HK()
- gui.text(2 + 194+96, 49+9+9 ,'HK',K_COLOR_P2)
- local inp = joypad.get()
- local xx1 = 11 + 194 + 96 -- xx
- local yy1 = 49 + 9 + 9
- local xx2 = 90 + 194 + 96 -- xx
- local yy2 = 55 + 9 +9
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11 + 2 +194 + 96--xx
- local y1 = 49 +9 + 9
- if inp["P2 Strong Kick"] then
- if indCambio2HK then
- countPress2HK = countPress2HK+1
- indCambio2HK = not indCambio2HK
- end
- else
- indCambio2HK=true
- end
- if countPress2HK > 0 then
- contadorEntradasPorSegundo2HK=contadorEntradasPorSegundo2HK-1
- end
- if contadorEntradasPorSegundo2HK==0 and countPress2HK>0 then
- if string.len(string2HK) > tamanoMaxstring then
- string2HK=cortarstring(string2HK)
- end
- if string2HK == '' then
- string2HK=countPress2HK
- else
- string2HK=string2HK..'-'..countPress2HK
- end
- contadorEntradasPorSegundo2HK=fpsValor
- countPress2HK=0
- indCambio2HK=true
- end
- gui.text(J1x,y1,string2HK)
- end
- local contadorEntradasPorSegundoLP4=fpsValor
- local countPressLP4=0
- local indCambioLP4=true
- local stringLP4=''
- function detectorLP4()
- local b1x = 67 -8
- local b1y = 40
- gui.text(b1x, b1y ,'-- P1 --',K_COLOR_P1) --xxxxxxxxxx
- gui.text(2 , 49 ,'A',K_COLOR_P1)
- local inp = joypad.get()
- local xx1 = 11 -- xx
- local yy1 = 49
- local xx2 = 90 -- xx
- local yy2 = 55
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2 --xx
- local y1 = 49
- if inp["P1 Button A"] then
- if indCambioLP4 then
- countPressLP4 = countPressLP4+1
- indCambioLP4 = not indCambioLP4
- end
- else
- indCambioLP4=true
- end
- if countPressLP4 > 0 then
- contadorEntradasPorSegundoLP4=contadorEntradasPorSegundoLP4-1
- end
- if contadorEntradasPorSegundoLP4==0 and countPressLP4>0 then
- if string.len(stringLP4) > tamanoMaxstring then
- stringLP4=cortarstring(stringLP4)
- end
- if stringLP4 == '' then
- stringLP4=countPressLP4
- else
- stringLP4=stringLP4..'-'..countPressLP4
- end
- contadorEntradasPorSegundoLP4=fpsValor
- countPressLP4=0
- indCambioLP4=true
- end
- gui.text(J1x,y1,stringLP4)
- end
- local contadorEntradasPorSegundoMP4=fpsValor
- local countPressMP4=0
- local stringMP4=''
- local indCambioMP4=true
- function detectorMP4()
- gui.text(2 , 58 ,'B',K_COLOR_P1)
- local xx1 = 11
- local yy1 = 49 + 9
- local xx2 = 90
- local yy2 = 55 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2
- local y1 = 49+9
- local inp = joypad.get()
- if inp["P1 Button B"] then
- if indCambioMP4 then
- countPressMP4 = countPressMP4+1
- indCambioMP4 = not indCambioMP4
- end
- else
- indCambioMP4=true
- end
- if countPressMP4 > 0 then
- contadorEntradasPorSegundoMP4=contadorEntradasPorSegundoMP4-1
- end
- if contadorEntradasPorSegundoMP4==0 and countPressMP4>0 then
- if string.len(stringMP4) > tamanoMaxstring then
- stringMP4=cortarstring(stringMP4)
- end
- if stringMP4 == '' then
- stringMP4=countPressMP4
- else
- stringMP4=stringMP4..'-'..countPressMP4
- end
- contadorEntradasPorSegundoMP4=fpsValor
- countPressMP4=0
- indCambioMP4=true
- end
- gui.text(J1x,y1,stringMP4)
- end
- local contadorEntradasPorSegundoLK4=fpsValor
- local countPressLK4=0
- local stringLK4=''
- local indCambioLK4=true
- function detectorLK4()
- gui.text(2 , 58 + 9 ,'C',K_COLOR_P1)
- local xx1 = 11
- local yy1 = 49 + 9 + 9
- local xx2 = 90
- local yy2 = 55 + 9 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2
- local y1 = 49+9 + 9
- local inp = joypad.get()
- if inp["P1 Button C"] then
- if indCambioLK4 then
- countPressLK4 = countPressLK4+1
- indCambioLK4 = not indCambioLK4
- end
- else
- indCambioLK4=true
- end
- if countPressLK4 > 0 then
- contadorEntradasPorSegundoLK4=contadorEntradasPorSegundoLK4-1
- end
- if contadorEntradasPorSegundoLK4==0 and countPressLK4>0 then
- if string.len(stringLK4) > tamanoMaxstring then
- stringLK4=cortarstring(stringLK4)
- end
- if stringLK4 == '' then
- stringLK4=countPressLK4
- else
- stringLK4=stringLK4..'-'..countPressLK4
- end
- contadorEntradasPorSegundoLK4=fpsValor
- countPressLK4=0
- indCambioLK4=true
- end
- gui.text(J1x,y1,stringLK4)
- end
- local contadorEntradasPorSegundoMK4=fpsValor
- local countPressMK4=0
- local stringMK4=''
- local indCambioMK4=true
- function detectorMK4()
- gui.text(2 , 58 +9 + 9 ,'D',K_COLOR_P1)
- local xx1 = 11
- local yy1 = 49 + 9 + 9 +9
- local xx2 = 90
- local yy2 = 55 + 9 + 9 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P1_BGROUND)
- local J1x = 11+2
- local y1 = 49+9 + 9 + 9
- local inp = joypad.get()
- if inp["P1 Button D"] then
- if indCambioMK4 then
- countPressMK4 = countPressMK4+1
- indCambioMK4 = not indCambioMK4
- end
- else
- indCambioMK4=true
- end
- if countPressMK4 > 0 then
- contadorEntradasPorSegundoMK4=contadorEntradasPorSegundoMK4-1
- end
- if contadorEntradasPorSegundoMK4==0 and countPressMK4>0 then
- if string.len(stringMK4) > tamanoMaxstring then
- stringMK4=cortarstring(stringMK4)
- end
- if stringMK4 == '' then
- stringMK4=countPressMK4
- else
- stringMK4=stringMK4..'-'..countPressMK4
- end
- contadorEntradasPorSegundoMK4=fpsValor
- countPressMK4=0
- indCambioMK4=true
- end
- gui.text(J1x,y1,stringMK4)
- end
- local contadorEntradasPorSegundo2LP4=fpsValor
- local countPress2LP4=0
- local string2LP4=''
- local indCambio2LP4=true
- function detector2LP4()
- -- LEGENDA 4 Botões
- gui.text(2,218 - 1,' Toques -> 1-5 Normal 6-13 Rapido 14-19 Possivel 20-30 Turbo Real')
- gui.text(2,218 - 1,' 1-5 Normal',K_COLOR_BB)
- gui.text(2,218 - 1,' 6-13 Rapido',K_COLOR_YY)
- gui.text(2,218 - 1,' 14-19 Possivel',K_COLOR_OO)
- gui.text(2,218 - 1,' 20-30 Turbo Real',K_COLOR_RR)
- gui.text(272 -67, 40 ,'-- P2 --',K_COLOR_P2) --xxxxxxxx
- gui.text(2 + 194, 49 ,'A',K_COLOR_P2)
- local xx1 = 11 +194-- xx
- local yy1 = 49
- local xx2 = 90 +194-- xx
- local yy2 = 55
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11 + 2 +194--xx
- local y1 = 49
- local inp = joypad.get()
- if inp["P2 Button A"] then
- if indCambio2LP4 then
- countPress2LP4 = countPress2LP4+1
- indCambio2LP4 = not indCambio2LP4
- end
- else
- indCambio2LP4=true
- end
- if countPress2LP4 > 0 then
- contadorEntradasPorSegundo2LP4=contadorEntradasPorSegundo2LP4-1
- end
- if contadorEntradasPorSegundo2LP4==0 and countPress2LP4>0 then
- if string.len(string2LP4) > tamanoMaxstring then
- string2LP4=cortarstring(string2LP4)
- end
- if string2LP4 == '' then
- string2LP4=countPress2LP4
- else
- string2LP4=string2LP4..'-'..countPress2LP4
- end
- contadorEntradasPorSegundo2LP4=fpsValor
- countPress2LP4=0
- indCambio2LP4=true
- end
- gui.text(J1x,y1,string2LP4)
- end
- local contadorEntradasPorSegundo2MP4=fpsValor
- local countPress2MP4=0
- local string2MP4=''
- local indCambio2MP4=true
- function detector2MP4()
- gui.text(2+194 , 49+9,'B',K_COLOR_P2)
- local xx1 = 11 + 194-- xx
- local yy1 = 49+9
- local xx2 = 90 + 194-- xx
- local yy2 = 55+9
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11+2 + 194 --xx
- local y1 = 49+9
- local inp = joypad.get()
- if inp["P2 Button B"] then
- if indCambio2MP4 then
- countPress2MP4 = countPress2MP4+1
- indCambio2MP4 = not indCambio2MP4
- end
- else
- indCambio2MP4=true
- end
- if countPress2MP4 > 0 then
- contadorEntradasPorSegundo2MP4=contadorEntradasPorSegundo2MP4-1
- end
- if contadorEntradasPorSegundo2MP4==0 and countPress2MP4>0 then
- if string.len(string2MP4) > tamanoMaxstring then
- string2MP4=cortarstring(string2MP4)
- end
- if string2MP4 == '' then
- string2MP4=countPress2MP4
- else
- string2MP4=string2MP4..'-'..countPress2MP4
- end
- contadorEntradasPorSegundo2MP4=fpsValor
- countPress2MP4=0
- indCambio2MP4=true
- end
- gui.text(J1x,y1,string2MP4)
- end
- local contadorEntradasPorSegundo2LK4=fpsValor
- local countPress2LK4=0
- local string2LK4=''
- local indCambio2LK4=true
- function detector2LK4()
- gui.text(2+194 , 49+9+9,'C',K_COLOR_P2)
- local xx1 = 11 + 194-- xx
- local yy1 = 49+9 + 9
- local xx2 = 90 + 194-- xx
- local yy2 = 55+9 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11+2 + 194 --xx
- local y1 = 49+9 +9
- local inp = joypad.get()
- if inp["P2 Button C"] then
- if indCambio2LK4 then
- countPress2LK4 = countPress2LK4+1
- indCambio2LK4 = not indCambio2LK4
- end
- else
- indCambio2LK4=true
- end
- if countPress2LK4 > 0 then
- contadorEntradasPorSegundo2LK4=contadorEntradasPorSegundo2LK4-1
- end
- if contadorEntradasPorSegundo2LK4==0 and countPress2LK4>0 then
- if string.len(string2LK4) > tamanoMaxstring then
- string2LK4=cortarstring(string2LK4)
- end
- if string2LK4 == '' then
- string2LK4=countPress2LK4
- else
- string2LK4=string2LK4..'-'..countPress2LK4
- end
- contadorEntradasPorSegundo2LK4=fpsValor
- countPress2LK4=0
- indCambio2LK4=true
- end
- gui.text(J1x,y1,string2LK4)
- end
- local contadorEntradasPorSegundo2MK4=fpsValor
- local countPress2MK4=0
- local string2MK4=''
- local indCambio2MK4=true
- function detector2MK4()
- gui.text(2+194 , 49+9+9+9,'D',K_COLOR_P2)
- local xx1 = 11 + 194-- xx
- local yy1 = 49+9 + 9 +9
- local xx2 = 90 + 194-- xx
- local yy2 = 55+9 + 9 + 9
- gui.box(xx1,yy1,xx2,yy2,K_P2_BGROUND)
- local J1x = 11+2 + 194 --xx
- local y1 = 49+9 +9 + 9
- local inp = joypad.get()
- if inp["P2 Button D"] then
- if indCambio2MK4 then
- countPress2MK4 = countPress2MK4+1
- indCambio2MK4 = not indCambio2MK4
- end
- else
- indCambio2MK4=true
- end
- if countPress2MK4 > 0 then
- contadorEntradasPorSegundo2MK4=contadorEntradasPorSegundo2MK4-1
- end
- if contadorEntradasPorSegundo2MK4==0 and countPress2MK4>0 then
- if string.len(string2MK4) > tamanoMaxstring then
- string2MK4=cortarstring(string2MK4)
- end
- if string2MK4 == '' then
- string2MK4=countPress2MK4
- else
- string2MK4=string2MK4..'-'..countPress2MK4
- end
- contadorEntradasPorSegundo2MK4=fpsValor
- countPress2MK4=0
- indCambio2MK4=true
- end
- gui.text(J1x,y1,string2MK4)
- end
- function imprimeTexto(leyenda,pie)
- -- gui.text(2,76 + leyenda, ' -- Toques / segs --')
- -- gui.text(2,84 + leyenda, ' 1 - 5 Normal ')
- -- gui.text(2,92 + leyenda, ' 6 - 13 Rapido')
- -- gui.text(2,100 + leyenda, '14 - 19 Possivel Turbo')
- -- gui.text(2,108 + leyenda, '20 - 30 Turbo')
- end
- local function buscarElemento(tabla, elem)
- for _,v in pairs(tabla) do
- if elem == v then
- return true
- end
- end
- return false
- end
- function determinaJuego()
- local gameName= emu.romname()
- if buscarElemento(juego6botones,gameName) then
- return 1
- elseif buscarElemento(juego4botones,gameName) then
- return 2
- else
- return 0
- end
- end
- gui.register(function()
- readimages()
- end)
- emu.registerbefore( function()
- png[1]="89504e470d0a1a0a0000000d49484452000000470000000b08060000002d2a9008000000017352474200aece1ce90000000467414d410000b18f0bfc6105000000097048597300000ec400000ec401952b0e1b0000019c49444154484bed55db75c3200c75d2762906621ea661198651851e58029936cd697f529d73138c9e5cc9f840817f5c027f52810600352fca052917a825f3f3c62f57544085ecf633ee90c343399f41ae3d0b4beb79039b54d4a6613dc9eabce11e0928ce45120766c71f3edafb4dd87c57cda0fd0625e19aec65cd7a35f0415aada0a433e3428c4a2b90b6dd3753227b6e9a26df542a3d93b46a0bc4a2d1f654a28f769773f45a593d4faa819eabb8c990a9896b424c9bb2ee874ac359d99c26670de6109111faca5a0be70622f9c64e75fa0a704e6980da6e2043b4d41ad568083c37a342fda83d468e8e758fe54946385f3924090e792d90c5ce759620d342f5add31961dc3b01897f428e76946414a19d9557d416e7c8e94002fb653fde1fcef91d72cc61168cbab08633c6acf7e498664f9b3f2447822d90e1217187d8e4ecf7cfc8b9e8e849eaf9821cf1c52c9e982037addd5909b1714c8eed044e81f5e3602b063b2ea9cf89cf09ed24320a5ebae6c07da2b617f20539a35623643be71e1f83a73ee52f86f7e303eec71b1c37c4fd86ff774460f87238e013de6d755c5af52cd20000000049454e44ae426082"
- if (string.len(png[1]) == 1038) then
- if determinaJuego()==1 then
- verEntradasJoystick6()
- detectorLP()
- detectorMP()
- detectorHP()
- detectorLK()
- detectorMK()
- detectorHK()
- detector2LP()
- detector2MP()
- detector2HP()
- detector2LK()
- detector2MK()
- detector2HK()
- imprimeTexto(0,216)
- end
- if determinaJuego()==2 then
- verEntradasJoystick4()
- detectorLP4()
- detectorMP4()
- detectorLK4()
- detectorMK4()
- detector2LP4()
- detector2MP4()
- detector2LK4()
- detector2MK4()
- imprimeTexto(12,210)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement