petite update temps + éditeur
This commit is contained in:
parent
3ae7f47cfb
commit
b92d895a03
|
@ -126,7 +126,9 @@ font = pygame.font.SysFont('arial',25,True)
|
|||
#Defini la suite des blocs pendant les changements (cliquer sur un 1 va donner un 2...)
|
||||
suite=["0","1","d","s","e","k","3","K","a","c","m","t","l","b","B","i","S","h"]
|
||||
|
||||
lvm = open(f"include/define.h","r")
|
||||
id_level = 0
|
||||
id_level_max = int(''.join(list(filter(str.isdigit, lvm.readline()))))
|
||||
gravityid = 6
|
||||
disa = 10
|
||||
app = 13
|
||||
|
@ -161,7 +163,7 @@ while securite==False:
|
|||
elif event.type == pygame.KEYDOWN:
|
||||
carac= event.dict['unicode']
|
||||
if carac == "d":
|
||||
id_level+=1
|
||||
if id_level_max>id_level: id_level+=1
|
||||
load(id_level)
|
||||
place()
|
||||
if carac == "q":
|
||||
|
@ -187,6 +189,10 @@ while securite==False:
|
|||
if carac == "a":
|
||||
lock=""
|
||||
place()
|
||||
if carac == "n":
|
||||
newgrille()
|
||||
write()
|
||||
place()
|
||||
if event.key == pygame.K_LSHIFT:
|
||||
if gravityid=="7":
|
||||
gravityid="6"
|
||||
|
|
|
@ -15,7 +15,7 @@ Pour ouvrir (python + pygame):
|
|||
- F baisser temps avant disparition blocs -
|
||||
- SHIFT changer le sens de la gravité par défaut (gravité affichée en haut à gauche)
|
||||
- A supprime le bloc bloqué dans la main.
|
||||
|
||||
- N pour reset la pièce en entier
|
||||
|
||||
Click gauche : tourner parmis les blocs dans le sens horaire
|
||||
Click droit : tourner parmis les blocs dans le sens anti-horaire
|
||||
|
|
|
@ -54,7 +54,7 @@ void game(int *id_level, char mode, char *type)
|
|||
|
||||
float vspd = 1.0;
|
||||
float hspd = 0;
|
||||
if(*id_level==10 && *type==1) *type = 2;
|
||||
if(*id_level==10 && *type!=3) *type = 2;
|
||||
else if(*type!=3) *type = 1;
|
||||
extern bopti_image_t img_speedrun;
|
||||
set_level(*id_level, level, &start_x, &start_y, &gravity, &appear, &disappear);
|
||||
|
|
|
@ -8,7 +8,7 @@ void check_medal(unsigned int frame_level, int id_level, int x, int y)
|
|||
{
|
||||
float time=1.0;
|
||||
float framefloat = frame_level;
|
||||
float level_time[] = {5.91,8.76,5.83,3.58,3.64,8.62,6.92,7.68,9.86,6.25,6.26,10.86,5.42,8.35,7.53};
|
||||
float level_time[] = {5.86,8.76,5.80,3.52,3.58,8.62,6.73,7.65,9.62,6.04,6.23,10.78,5.39,8.35,7.45};
|
||||
time = level_time[id_level-1];
|
||||
|
||||
if(frame_level/FPS < (unsigned int)time || (frame_level/FPS <= (unsigned int)time &&
|
||||
|
@ -25,7 +25,7 @@ void draw_time(int id_level)
|
|||
{
|
||||
dclear(C_WHITE);
|
||||
float time=1.0;
|
||||
float level_time[] = {5.91,8.76,5.83,3.58,3.64,8.62,6.92,7.68,9.86,6.25,6.26,10.86,5.42,8.35,7.53};
|
||||
float level_time[] = {5.86,8.76,5.80,3.52,3.58,8.62,6.73,7.65,9.62,6.04,6.23,10.78,5.39,8.35,7.45};
|
||||
time = level_time[id_level-1];
|
||||
|
||||
dsubimage(172,90,&img_medals,36,0,12,12,DIMAGE_NONE);
|
||||
|
|
Loading…
Reference in New Issue