This commit is contained in:
flo 2017-04-11 21:50:16 +02:00
parent 748f31e91f
commit 55494a34b4
7 changed files with 16 additions and 13 deletions

View File

@ -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

View File

@ -41,4 +41,7 @@ SRC = $(notdir $(wildcard $(SRCDIR)/*.[cs]))
# INCLUDES
INC = $(notdir $(wildcard $(INCDIR)/*.h))
# SPRITES
FONT = $(notdir $(wildcard $(FONTDIR)/*.bmp))
# END OF FILE

View File

@ -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)
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Binary file not shown.

View File

@ -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;