diff --git a/Makefile b/Makefile index 209de3c..2b0a69d 100755 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ include $(CURDIR)/Makefile.config # DEDUCED VARS -ALLOBJ = $(patsubst %,$(OBJDIR)/%.o,$(SRC)) +ALLOBJ = $(patsubst %,$(OBJDIR)/%.o,$(SRC) $(FONT)) ALLINC = $(INC:%=$(INCDIR)/%) # RULES diff --git a/Makefile.config b/Makefile.config index 89aaf2e..4429636 100755 --- a/Makefile.config +++ b/Makefile.config @@ -41,4 +41,7 @@ SRC = $(notdir $(wildcard $(SRCDIR)/*.[cs])) # INCLUDES INC = $(notdir $(wildcard $(INCDIR)/*.h)) + # SPRITES + FONT = $(notdir $(wildcard $(FONTDIR)/*.bmp)) + # END OF FILE diff --git a/include/periodiq.h b/include/periodiq.h index 8688a92..5c5f9a5 100644 --- a/include/periodiq.h +++ b/include/periodiq.h @@ -4,7 +4,7 @@ unsigned int key; - struct Element +struct Element { unsigned char nom[14]; // le nom unsigned char symbol[4]; // le symbole @@ -19,8 +19,6 @@ unsigned int famille : 4; unsigned int etat : 3; - - unsigned char config_electro[7];// la config électronique //octet de flottement //align(4) }; diff --git a/modern.bmp b/modern.bmp deleted file mode 100644 index 0340f76..0000000 Binary files a/modern.bmp and /dev/null differ diff --git a/obj/modern.bmp.o b/obj/modern.bmp.o deleted file mode 100644 index 959c5ee..0000000 Binary files a/obj/modern.bmp.o and /dev/null differ diff --git a/obj/periodiq.c.o b/obj/periodiq.c.o deleted file mode 100644 index 9e023c7..0000000 Binary files a/obj/periodiq.c.o and /dev/null differ diff --git a/src/periodiq.c b/src/periodiq.c index e862673..a88276f 100644 --- a/src/periodiq.c +++ b/src/periodiq.c @@ -294,11 +294,11 @@ text_configure(&modern, color_black); case KEY_DOWN : y++; break; case KEY_UP : y--; break; - case KEY_F4 : chang=tableauEleMini(chang); break; - case KEY_F2 : chang=find(chang); break; - case KEY_F3 : calcul_mole(); break; + // case KEY_F4 : chang=tableauEleMini(chang); break; + //case KEY_F2 : chang=find(chang); break; + // case KEY_F3 : calcul_mole(); break; - case KEY_F6 : case KEY_EXE : chang=detailsElement(chang); break; + case KEY_F6 : case KEY_EXE : chang=detailsElement(3); break; case KEY_EXIT : return; } @@ -449,6 +449,7 @@ int detailsElement(int a) { const char buffer[50]; char descente=-9; + int nb; while (1) { @@ -462,10 +463,11 @@ while (1) sprintf(buffer, "%d", a+1); // détail des éléments dtext((10-a/25), descente+15, buffer); - sprintf(buffer, "masse molaire %.3f g/mol", elements[a].masse_mol); - dtext(1, descente+23, buffer); + //sprintf(buffer, ); + //dtext(1, descente+23, buffer); - dtext(20, descente+40, "propriete de base :"); // + dprint(1, descente+23, "masse molaire %d.%03d g/mol", elements[a].masse_mol/1000, elements[a].masse_mol % 1000); + dupdate(); /* if (elements[a].groupe>=1) { @@ -519,8 +521,8 @@ while (1) switch (key) { - case KEY_RIGHT : a-=1, descente=-9; break; - case KEY_LEFT : a+=1, descente=-9; break; + case KEY_LEFT : a-=1, descente=-9; break; + case KEY_RIGHT : a+=1, descente=-9; break; case KEY_DOWN : descente-=4; break; case KEY_UP : descente+=4; break; case KEY_F6 : case KEY_EXE : case KEY_EXIT : return a;