From 793627a26531982e9a4043d9cb0e72edb3dcb744 Mon Sep 17 00:00:00 2001 From: guillaume Date: Sun, 4 Dec 2022 15:08:35 +0100 Subject: [PATCH] [UPDATE] navigation base emu/rom --- modules/__pycache__/arrow.cpython-310.pyc | Bin 585 -> 0 bytes .../emulateur_display.cpython-310.pyc | Bin 477 -> 0 bytes start.py | 53 ++++++++++++------ 3 files changed, 36 insertions(+), 17 deletions(-) delete mode 100644 modules/__pycache__/arrow.cpython-310.pyc delete mode 100644 modules/__pycache__/emulateur_display.cpython-310.pyc diff --git a/modules/__pycache__/arrow.cpython-310.pyc b/modules/__pycache__/arrow.cpython-310.pyc deleted file mode 100644 index e539ba28bcead69c831664dd8dc3693aaebb016b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcmah`Jx{|h5Vf6;y3kUFN@ZZk+J(#@gb<}-K6UOZV=>y1V!6tl8Wla9%zh<0d8K6_f45AUOxqhX8^Ix+b?oFyVlw z!WABPCj24k)?(=YJ{V(f4@|cK4D_xjC5Aq+XF_2X^svFQ)gShPiChG^l3GjAb*z`G zWM-^CPi7*UTlc<5Oi8ULALPuGMENl8^Ee!5QyGqmBu%3NA`zJ=93>`XSCuWU_~NP}%uhGZd4{?)*15~;4gU*TJ8eq< diff --git a/modules/__pycache__/emulateur_display.cpython-310.pyc b/modules/__pycache__/emulateur_display.cpython-310.pyc deleted file mode 100644 index 49dbbf3000df4010c26dc99da497d69bdcb8901a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 477 zcmY*WyH3ME5WMw61aKk>iu{5bEJdP22q{odkR}bGi4N~2n4Fz(52Q$zD4^vd=-`*G zq2Mp5*t3b0thBQ;TCI1-x9oNg7{$luOa4vu$BXRe(ITN^m2l zO5}!Db1Blub#DqpDaKEhD{;FkC$6{C9qj7K;ESn!y5#pXdsvntn_F7OEitYZ9EH_c zxkM|4&O~V?t+r~4g EmuCpt: runMcpt = 0 @@ -100,7 +104,7 @@ def ViewEmu(cL,xL,yL,cM,xM,yM,cR,xR,yR): Cnv.create_image(xR, yR, image=PNfR) print("Curent Emu : " + str(res[cM])) -def leftKey(): +def leftKey(GetEmuMod): global cpt cpt = cpt - 1 if cpt < 0: @@ -113,10 +117,11 @@ def leftKey(): Rcpt = 1 if Rcpt > EmuCpt: Rcpt = 0 + if GetEmuMod == 0: + print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt)) + ViewEmu(Lcpt,LeftSquareX, LeftSquareY,Mcpt,MiddleSquareX, MiddleSquareY,Rcpt,RightSquareX, RightSquareY) - ViewEmu(Lcpt,LeftSquareX, LeftSquareY,Mcpt,MiddleSquareX, MiddleSquareY,Rcpt,RightSquareX, RightSquareY) - -def rightKey(): +def rightKey(GetEmuMod): global cpt cpt = cpt + 1 if cpt > EmuCpt: @@ -131,11 +136,25 @@ def rightKey(): Rcpt = 0 - ViewEmu(Lcpt,LeftSquareX, LeftSquareY,Mcpt,MiddleSquareX, MiddleSquareY,Rcpt,RightSquareX, RightSquareY) + if GetEmuMod == 0: + print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt)) + ViewEmu(Lcpt,LeftSquareX, LeftSquareY,Mcpt,MiddleSquareX, MiddleSquareY,Rcpt,RightSquareX, RightSquareY) + +def Escape(GetEmuMod): + if GetEmuMod == 0: + print("Ciao !!") + arkadeus.quit() + if GetEmuMod == 1: + #Cnv.delete("all") + global EmuMod + global cpt + cpt = 0 + EmuMod = 0 + + BackgroundEmu() + ViewEmu(cpt,LeftSquareX, LeftSquareY,cpt+1,MiddleSquareX, MiddleSquareY,cpt+2,RightSquareX, RightSquareY) + -def Escape(event): - print("ESC key pressed") - arkadeus.quit() arkadeus= Tk() @@ -214,10 +233,10 @@ Cnv.pack(fill = "both", expand = True) BackgroundEmu() ViewEmu(cpt,LeftSquareX, LeftSquareY,cpt+1,MiddleSquareX, MiddleSquareY,cpt+2,RightSquareX, RightSquareY) -arkadeus.bind("", lambda event: leftKey()) -arkadeus.bind("", lambda event: rightKey()) -arkadeus.bind("", lambda event: EnterEmu()) -arkadeus.bind('',Escape) +arkadeus.bind("", lambda event: leftKey(EmuMod)) +arkadeus.bind("", lambda event: rightKey(EmuMod)) +arkadeus.bind("", lambda event: EnterEmu(EmuMod)) +arkadeus.bind('',lambda event : Escape(EmuMod)) arkadeus.mainloop()