130Fermer132
deephLe 09/05/2013 à 15:58
Ok, ça te dérange si je change quelques noms de labels ?

Autrement je suis en train de lire ton code, et je ne comprend pas trop pourquoi mettre un compteur pour la détection des touches directionnelles ?
;********************************* ld hl,menu_key_loop ;* push hl ;* where to jump ;********************************* ld a,$fe ;check arrows call get_key or $f0 ;erase bits 4-7 ld b,a inc b ;if b+1 = 0, b = $FF then no arrows have been pushed ld hl,cursor_wait ;the counter jr nz,$+4 ;jump if a key has been pushed ld (hl),b ;reset the counter ret dec (hl) ;counter-1 ret p ;quit if plus (>=0) ld (hl),cursor_speed ;refill the counter

Autant ralentir un peu la boucle avec un "ld b,cursor_speed\ call wait", non ?