Working load and save for PKM files !

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@108 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2008-08-09 21:14:33 +00:00
parent 2091a1b071
commit bf0127e306
3 changed files with 26 additions and 1 deletions

View File

@ -2773,6 +2773,8 @@ byte Bouton_Load_ou_Save(byte Load, byte Image)
if ( (!Load) && (Format_Commentaire[Principal_Format-1]) ) if ( (!Load) && (Format_Commentaire[Principal_Format-1]) )
Print_dans_fenetre(46,176,Principal_Commentaire,CM_Noir,CM_Clair); Print_dans_fenetre(46,176,Principal_Commentaire,CM_Noir,CM_Clair);
Afficher_curseur(); Afficher_curseur();
SDL_UpdateRect(Ecran_SDL,Fenetre_Pos_X+27*Menu_Facteur_X,Fenetre_Pos_Y+55*Menu_Facteur_Y,Menu_Facteur_X<<9,Menu_Facteur_Y<<4);
} }
Nouvelle_preview=0; Nouvelle_preview=0;
@ -2792,6 +2794,7 @@ byte Bouton_Load_ou_Save(byte Load, byte Image)
Effacer_curseur(); Effacer_curseur();
Charger_image(Image); Charger_image(Image);
SDL_UpdateRect(Ecran_SDL,ToWinX(179),ToWinY(88),ToWinL(124),ToWinH(84));
Afficher_curseur(); Afficher_curseur();
// Après le chargement de la preview, on restaure tout ce qui aurait // Après le chargement de la preview, on restaure tout ce qui aurait

View File

@ -317,6 +317,11 @@ void Dessiner_preview_palette(void)
Block(Preview_Pos_X+(((Indice>>4)*7)*Menu_Facteur_X), Block(Preview_Pos_X+(((Indice>>4)*7)*Menu_Facteur_X),
Preview_Pos_Y+(((Indice&15)*5)*Menu_Facteur_Y), Preview_Pos_Y+(((Indice&15)*5)*Menu_Facteur_Y),
5*Menu_Facteur_X,5*Menu_Facteur_Y,Indice); 5*Menu_Facteur_X,5*Menu_Facteur_Y,Indice);
SDL_UpdateRect(Ecran_SDL,
Preview_Pos_X*Menu_Facteur_X,
Preview_Pos_Y*Menu_Facteur_Y,
5*Menu_Facteur_X*256,5*Menu_Facteur_Y*256);
} }

View File

@ -209,7 +209,24 @@ void Clear_brush_SDL (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word
void Remap_screen_SDL (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion) void Remap_screen_SDL (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion)
{ {
UNIMPLEMENTED // EDI = coords a l'écran
byte* EDI = Ecran + Pos_Y * Largeur_ecran + Pos_X;
int dx,cx;
// Pour chaque ligne
for(dx=Hauteur;dx>0;dx--)
{
// Pour chaque pixel
for(cx=Largeur;cx>0;cx--)
{
*EDI = Table_de_conversion[*EDI];
EDI ++;
}
EDI = EDI + Largeur_ecran - Largeur;
}
SDL_UpdateRect(Ecran_SDL,Pos_X,Pos_Y,Largeur,Hauteur);
} }
void Afficher_une_ligne_ecran_SDL (word Pos_X,word Pos_Y,word Largeur,byte * Ligne) void Afficher_une_ligne_ecran_SDL (word Pos_X,word Pos_Y,word Largeur,byte * Ligne)