add KikooDX + Times without F6

This commit is contained in:
Tituya 2021-05-05 13:28:21 +02:00
parent 1ebf43efb7
commit b705042fa8
6 changed files with 14 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -51,6 +51,7 @@ static void startmenu_launcher() {
game(&id_level, 1, &type);
} break;
case MenuAllMode: {
id_level = 1;
game(&id_level, 0, &type);
} break;
case MenuTutorial: {

View File

@ -86,14 +86,15 @@ char level_selection(int *id_level)
dimage(0, 0, &img_speedrun);
if (sto != 0)
check_medal(round(sto * 0.01 * FPS), *id_level, 335, 8);
dtext(340, 214, C_BLACK, "TIMES");
dtext(190, 45, C_BLACK, "Time : ");
dprint(80, 20, C_BLACK, "Level : %d", *id_level);
if (sto != 0)
dprint(194, 60, C_RED, "%.2j", sto);
else
dprint(202, 60, C_RED, "/");
draw_time(*id_level);
dupdate();
if (keydown_any(KEY_SHIFT, KEY_EXE, 0)) {
if (!check) {
del_level(level);
@ -102,10 +103,6 @@ char level_selection(int *id_level)
} else
check = 0;
if (keydown(KEY_F6)) {
draw_time(*id_level);
}
if (keydown_any(KEY_EXIT, KEY_MENU, 0)) {
if (!buffer)
return 0;

22
time.py
View File

@ -2,6 +2,9 @@ gold = 1.2
argent = 1.5
bronze = 2
x = 340
y = 140
timeslevel = open("times.lvl","r+")
dest = open("generated/times.c","w")
lvm = open("generated/include/define.h","r")
@ -44,18 +47,15 @@ if(frame_level/FPS < (unsigned int)(time*"+str(bronze)+") || (frame_level/FPS <=
\n\
void draw_time(int id_level)\n\
{\n\
dclear(C_WHITE);\n\
float time=1.0;\n")
dest.write("\ntime = level_time[id_level-1];\n\n\
dsubimage(172,90,&img_medals,36,0,12,12,DIMAGE_NONE);\n\
dprint(187,90,C_BLACK,\"%.2j\",(int)(time*100));\n\
dsubimage(172,110,&img_medals,24,0,12,12,DIMAGE_NONE);\n\
dprint(187,110,C_BLACK,\"%.2j\",(int)(time*"+str(gold)+"*100));\n\
dsubimage(172,130,&img_medals,12,0,12,12,DIMAGE_NONE); \n\
dprint(187,130,C_BLACK,\"%.2j\",(int)(time*"+str(argent)+"*100));\n\
dsubimage(172,150,&img_medals,0,0,12,12,DIMAGE_NONE); \n\
dprint(187,150,C_BLACK,\"%.2j\",(int)(time*"+str(bronze)+"*100));\n\
dupdate();\n\
getkey();\n\
dsubimage("+str(x)+","+str(y)+",&img_medals,36,0,12,12,DIMAGE_NONE);\n\
dprint("+str(x+15)+","+str(y)+",C_BLACK,\"%.2j\",(int)(time*100));\n\
dsubimage("+str(x)+","+str(y+20)+",&img_medals,24,0,12,12,DIMAGE_NONE);\n\
dprint("+str(x+15)+","+str(y+20)+",C_BLACK,\"%.2j\",(int)(time*"+str(gold)+"*100));\n\
dsubimage("+str(x)+","+str(y+40)+",&img_medals,12,0,12,12,DIMAGE_NONE); \n\
dprint("+str(x+15)+","+str(y+40)+",C_BLACK,\"%.2j\",(int)(time*"+str(argent)+"*100));\n\
dsubimage("+str(x)+","+str(y+60)+",&img_medals,0,0,12,12,DIMAGE_NONE); \n\
dprint("+str(x+15)+","+str(y+60)+",C_BLACK,\"%.2j\",(int)(time*"+str(bronze)+"*100));\n\
}")