éditeur exporte images

This commit is contained in:
Tituya 2020-08-29 17:19:05 +02:00
parent 102d857fa6
commit 852f5d9460
12 changed files with 12 additions and 19 deletions

BIN
AST3.g3a

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 461 B

View File

@ -60,4 +60,8 @@ for i in range(int(''.join(list(filter(str.isdigit, lvm.readline()))))):
save.write("}}\nvoid del_level(char level[])\n{memcpy(level,\"\
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",350);}\n\n\
void set_levelname(int id_level)\n{\nchar *levelname[] = {")
save.write(("\""+'","'.join(names)+'"};\ndprint_opt(180, 25, C_RED, C_BLACK, DTEXT_LEFT, DTEXT_TOP, \"%s\", levelname[id_level-1]);\n}'))
save.write(("\""+'","'.join(names)+'"};\ndprint_opt(180, 25, C_RED, C_BLACK, DTEXT_LEFT, DTEXT_TOP, \"%s\", levelname[id_level-1]);\n}'))
#copy the textures from editor
import shutil
shutil.copytree("editor/img","assets-cg/img", dirs_exist_ok=True)

View File

@ -68,9 +68,9 @@ def place():
if grille[a][b]=="1":
fenetre.blit(pygame.transform.scale(solid_0,(52,52)),(52*b,52*a))
if grille[a][b]=="s" and int(gravityid)==6:
fenetre.blit(pygame.transform.scale(player,(39,39)),(52*b,52*a+13))
fenetre.blit(pygame.transform.scale(player.subsurface((0,0),(12,12)),(39,39)),(52*b,52*a+13))
elif grille[a][b]=="s" and int(gravityid)==7:
fenetre.blit(pygame.transform.scale(player,(39,39)),(52*b,52*a))
fenetre.blit(pygame.transform.scale(player.subsurface((0,0),(12,12)),(39,39)),(52*b,52*a))
if grille[a][b]=="e":
fenetre.blit(pygame.transform.scale(end,(52,52)),(52*b,52*a))
if grille[a][b]=="d":

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 656 B

View File

@ -1,4 +1,3 @@
111111111111111111111111100000000c300000000000100000000000c3000000K0k0l1000111ddd1111aaa111111111h11111ddd1111aaa1ddddd00000110000001110001d000000000110s00001110001d000000000111111001110001d0011d1100110b01001110001d00e000000110S01001110001d000000000110001001110001d011111000100t01000m00001d000000000000001000m00001ddddd00000011111111111111111111111116
9
13

View File

@ -1,11 +0,0 @@
f = open("times.lvl","r+")
lvm = open(f"include/define.h","r")
ids=f.readlines()
names=[]
for i in ids:
names.append(i.rstrip())
for i in range(int(''.join(list(filter(str.isdigit, lvm.readline()))))):
hop=names[i].find("-")
if hop!=-1: names[i]=names[i][hop+1:]
else: names[i]=""
print(names)

View File

@ -129,7 +129,8 @@ void draw_blackout(int x, int y)
void draw_timer(unsigned int frame)
{
dprint_opt(0, 0, C_WHITE, C_BLACK, DTEXT_LEFT, DTEXT_TOP, "%u.%02u",(frame)/FPS, (frame)%FPS);
float framefloat = frame;
dprint_opt(0, 0, C_WHITE, C_BLACK, DTEXT_LEFT, DTEXT_TOP, "%.2j", (int)(framefloat/FPS*100));
}
void draw_end(int framelevel, int id_level, char record)

View File

@ -131,6 +131,6 @@ void del_level(char level[])
void set_levelname(int id_level)
{
char *levelname[] = {"Tituya","Tituya","Massena","Tituya","Tituya","Tituya","Tituya","Tituya","Massena","Tituya","Tituya","Tituya","Tituya","Tituya","Tituya"};
char *levelname[] = {"KikooDX","KikooDX","KikooDX","KikooDX","KikooDX","KikooDX","KikooDX","KikooDX","Massena","Massena","Tituya","Tituya","Tituya","Tituya","Tituya"};
dprint_opt(180, 25, C_RED, C_BLACK, DTEXT_LEFT, DTEXT_TOP, "%s", levelname[id_level-1]);
}

View File

@ -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.85,8.67,5.64,3.50,3.54,8.42,6.67,7.60,9.20,5.77,6.04,10.38,5.34,7.67,6.24};
float level_time[] = {5.80,8.62,5.14,3.22,3.25,8.20,6.60,7.18,9.20,5.22,6.04,10.38,5.34,7.61,6.05};
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.85,8.67,5.64,3.50,3.54,8.42,6.67,7.60,9.20,5.77,6.04,10.38,5.34,7.67,6.24};
float level_time[] = {5.80,8.62,5.14,3.22,3.25,8.20,6.60,7.18,9.20,5.22,6.04,10.38,5.34,7.61,6.05};
time = level_time[id_level-1];
dsubimage(172,90,&img_medals,36,0,12,12,DIMAGE_NONE);