diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0083964 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +modules/__pycache__/arrow.cpython-310.pyc +modules/__pycache__/emulateur_display.cpython-310.pyc diff --git a/start.py b/start.py index d7f25c6..275d7bf 100755 --- a/start.py +++ b/start.py @@ -105,38 +105,37 @@ def ViewEmu(cL,xL,yL,cM,xM,yM,cR,xR,yR): print("Curent Emu : " + str(res[cM])) def leftKey(GetEmuMod): - global cpt - cpt = cpt - 1 - if cpt < 0: - cpt = EmuCpt - Lcpt = cpt - Mcpt = cpt + 1 - Rcpt = cpt + 2 - if Mcpt > EmuCpt: - Mcpt = 0 - Rcpt = 1 - if Rcpt > EmuCpt: - Rcpt = 0 if GetEmuMod == 0: + global cpt + cpt = cpt - 1 + if cpt < 0: + cpt = EmuCpt + Lcpt = cpt + Mcpt = cpt + 1 + Rcpt = cpt + 2 + if Mcpt > EmuCpt: + Mcpt = 0 + Rcpt = 1 + if Rcpt > EmuCpt: + Rcpt = 0 print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt)) ViewEmu(Lcpt,LeftSquareX, LeftSquareY,Mcpt,MiddleSquareX, MiddleSquareY,Rcpt,RightSquareX, RightSquareY) def rightKey(GetEmuMod): - global cpt - cpt = cpt + 1 - if cpt > EmuCpt: - cpt = 0 - Lcpt = cpt - Mcpt = cpt + 1 - Rcpt = cpt + 2 - if Mcpt > EmuCpt: - Mcpt = 0 - Rcpt = 1 - if Rcpt > EmuCpt: - Rcpt = 0 - if GetEmuMod == 0: + global cpt + cpt = cpt + 1 + if cpt > EmuCpt: + cpt = 0 + Lcpt = cpt + Mcpt = cpt + 1 + Rcpt = cpt + 2 + if Mcpt > EmuCpt: + Mcpt = 0 + Rcpt = 1 + if Rcpt > EmuCpt: + Rcpt = 0 print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt)) ViewEmu(Lcpt,LeftSquareX, LeftSquareY,Mcpt,MiddleSquareX, MiddleSquareY,Rcpt,RightSquareX, RightSquareY)