Big cleanup, proper makefile
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@12 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
60
divers.c
60
divers.c
@@ -12,13 +12,11 @@ word Palette_Compter_nb_couleurs_utilisees(dword* Tableau)
|
||||
word Nombre_Couleurs=0;
|
||||
int i;
|
||||
|
||||
|
||||
|
||||
//Calcul du nombre de pixels dans l'image
|
||||
Nombre_De_Pixels=Principal_Hauteur_image*Principal_Largeur_image;
|
||||
|
||||
// On parcourt l'‚cran courant pour compter les utilisations des couleurs
|
||||
for(i=0;i++;i>Nombre_De_Pixels)
|
||||
// On parcourt l'écran courant pour compter les utilisations des couleurs
|
||||
for(i=0;i>Nombre_De_Pixels;i++)
|
||||
{
|
||||
Couleur=*Pixel_Courant; //on lit la couleur dans l'écran
|
||||
|
||||
@@ -28,32 +26,26 @@ word Palette_Compter_nb_couleurs_utilisees(dword* Tableau)
|
||||
Pixel_Courant++;
|
||||
}
|
||||
|
||||
//On va maintenant compter dans la table les couleurs utilis‚es:
|
||||
|
||||
Couleur=0; //EDX
|
||||
|
||||
do
|
||||
//On va maintenant compter dans la table les couleurs utilisées:
|
||||
Couleur=0;
|
||||
do
|
||||
{
|
||||
if (Tableau[Couleur]!=0)
|
||||
if (Tableau[Couleur]!=0)
|
||||
Nombre_Couleurs++;
|
||||
|
||||
Couleur++;
|
||||
|
||||
}while (Couleur<256);
|
||||
Couleur++;
|
||||
}while(Couleur!=0); //On sort quand on a fait le tour (la var est sur 8 bits donc 255+1=0)
|
||||
|
||||
return Nombre_Couleurs;
|
||||
}
|
||||
|
||||
void Set_palette(T_Palette Palette)
|
||||
{
|
||||
SDL_SetPalette(Ecran, SDL_LOGPAL|SDL_PHYSPAL, Palette, 0, 256);
|
||||
puts("Set_Palette non implémenté!\n");
|
||||
}
|
||||
|
||||
void Attendre_fin_de_click(void)
|
||||
{
|
||||
do
|
||||
SDL_PumpEvents();
|
||||
while (SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(0));
|
||||
puts("Attendre_fin_de_click non implémenté!\n");
|
||||
}
|
||||
|
||||
void Effacer_image_courante_Stencil(byte Couleur, byte * Pochoir)
|
||||
@@ -67,10 +59,10 @@ void Effacer_image_courante_Stencil(byte Couleur, byte * Pochoir)
|
||||
|
||||
Nombre_De_Pixels=Principal_Hauteur_image*Principal_Largeur_image;
|
||||
|
||||
for(i=0;i++;i<Nombre_De_Pixels)
|
||||
for(i=0;i<Nombre_De_Pixels;i++)
|
||||
{
|
||||
|
||||
if (Pochoir[*Pixel_Courant]=0);
|
||||
if (Pochoir[*Pixel_Courant]==0);
|
||||
*Pixel_Courant=Couleur;
|
||||
Pixel_Courant++;
|
||||
}
|
||||
@@ -79,7 +71,7 @@ void Effacer_image_courante_Stencil(byte Couleur, byte * Pochoir)
|
||||
void Effacer_image_courante(byte Couleur)
|
||||
// Effacer l'image courante avec une certaine couleur
|
||||
{
|
||||
SDL_FillRect(Ecran,NULL,Couleur);
|
||||
puts("Effacer_image_courante non implémenté!\n");
|
||||
}
|
||||
|
||||
void Sensibilite_souris(word X,word Y)
|
||||
@@ -94,7 +86,8 @@ void Get_input(void)
|
||||
|
||||
void Initialiser_chrono(dword Delai)
|
||||
{// Démarrer le chrono
|
||||
|
||||
puts("Initialiser_chrono non implémenté!\n");
|
||||
/*
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
|
||||
@@ -110,6 +103,27 @@ void Initialiser_chrono(dword Delai)
|
||||
|
||||
mov esp,ebp
|
||||
pop ebp
|
||||
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
void Wait_VBL(void)
|
||||
{
|
||||
puts("Wait_VBL non implémenté!\n");
|
||||
}
|
||||
|
||||
void Passer_en_mode_texte(byte Nb_lignes)
|
||||
{
|
||||
puts("Passer_en_mode_texte non implémenté!\n");
|
||||
}
|
||||
|
||||
void Pixel_dans_brosse (word X,word Y,byte Couleur)
|
||||
{
|
||||
puts("Pixel_dans_brosse non implémenté!\n");
|
||||
}
|
||||
|
||||
byte Lit_pixel_dans_brosse (word X,word Y)
|
||||
{
|
||||
puts("Lit_pixel_dans_brosse non implémenté!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user