Nettoyage, commentaires, fct Copier Image Dans Brosse a tester
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@29 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
ec9e5a33d2
commit
7488c622e6
10
divers.c
10
divers.c
@ -227,7 +227,15 @@ void Remap_general_LOWLEVEL(byte * Table_conv,byte * Buffer,short Largeur,short
|
||||
|
||||
void Copier_image_dans_brosse(short Debut_X,short Debut_Y,short Brosse_Largeur,short Brosse_Hauteur,word Largeur_image)
|
||||
{
|
||||
puts("Copier_image_dans_brosse non implémenté!\n");
|
||||
int i,j;
|
||||
for(i=0;i<Brosse_Hauteur;i++)
|
||||
{
|
||||
for(j=0;j<Brosse_Largeur;j++)
|
||||
{
|
||||
*(Brosse+i*Largeur_image+j)=*(Principal_Ecran+Debut_X+j+(Debut_Y+i)*Largeur_image);
|
||||
}
|
||||
}
|
||||
puts("Copier_image_dans_brosse à tester!\n");
|
||||
}
|
||||
|
||||
byte Lit_pixel_dans_ecran_feedback (word X,word Y)
|
||||
|
||||
4
make.inc
4
make.inc
@ -1,4 +0,0 @@
|
||||
system dos4g
|
||||
op stub=weoslite.exe
|
||||
file video,divers,graph,init,special,boutons,palette,aide,operatio,loadsave,readline,moteur,main,files,dpmi,vesalfb,op_c,op_asm
|
||||
name gfx2
|
||||
57
makefile
57
makefile
@ -1,57 +0,0 @@
|
||||
CC = gcc
|
||||
COPT = -Wall -Os -c
|
||||
LOPT = -lSDL -o grafx2
|
||||
|
||||
gfx2 : main.o init.o graph.o sdlscreen.o divers.o special.o boutons.o palette.o aide.o operatio.o loadsave.o readline.o moteur.o files.o op_c.o linux.o op_asm.o
|
||||
$(CC) $(LOPT) main.o graph.o divers.o init.o files.o linux.o loadsave.o boutons.o moteur.o sdlscreen.o aide.o palette.o operatio.o op_c.o readline.o special.o op_asm.o
|
||||
|
||||
main.o : graph.o const.h struct.h global.h graph.h divers.h init.h boutons.h moteur.h files.h loadsave.h main.c readini.h saveini.h
|
||||
$(CC) $(COPT) main.c
|
||||
|
||||
init.o : const.h struct.h global.h modesvdo.h graph.h boutons.h palette.h aide.h operatio.h init.c readini.c saveini.c
|
||||
$(CC) $(COPT) init.c
|
||||
|
||||
graph.o : divers.o graph.c pages.c const.h struct.h global.h divers.h
|
||||
$(CC) $(COPT) graph.c
|
||||
|
||||
divers.o : global.h const.h divers.c
|
||||
$(CC) $(COPT) divers.c
|
||||
|
||||
special.o : const.h struct.h global.h graph.h moteur.h special.c
|
||||
$(CC) $(COPT) special.c
|
||||
|
||||
boutons.o : boutons.c shade.c const.h struct.h global.h divers.h graph.h moteur.h readline.h files.h loadsave.h init.h readini.h saveini.h
|
||||
$(CC) $(COPT) boutons.c
|
||||
|
||||
palette.o : const.h struct.h global.h divers.h graph.h moteur.h readline.h palette.c
|
||||
$(CC) $(COPT) palette.c
|
||||
|
||||
aide.o : const.h struct.h global.h divers.h graph.h moteur.h aide.c
|
||||
$(CC) $(COPT) aide.c
|
||||
|
||||
moteur.o : const.h struct.h global.h graph.h divers.h moteur.c
|
||||
$(CC) $(COPT) moteur.c
|
||||
|
||||
operatio.o : const.h struct.h global.h divers.h moteur.h graph.h operatio.h operatio.c
|
||||
$(CC) $(COPT) operatio.c
|
||||
|
||||
readline.o : const.h struct.h global.h divers.h graph.h readline.c
|
||||
$(CC) $(COPT) readline.c
|
||||
|
||||
files.o : const.h struct.h global.h graph.h divers.h files.c
|
||||
$(CC) $(COPT) files.c
|
||||
|
||||
loadsave.o : const.h struct.h global.h divers.h graph.h loadsave.c pages.h op_c.h op_asm.h
|
||||
$(CC) $(COPT) loadsave.c
|
||||
|
||||
op_c.o : struct.h op_c.c op_c.h op_asm.h
|
||||
$(CC) $(COPT) op_c.c
|
||||
|
||||
op_asm.o : op_asm.h op_asm.c
|
||||
$(CC) $(COPT) op_asm.c
|
||||
|
||||
sdlscreen.o : sdlscreen.c sdlscreen.h
|
||||
$(CC) $(COPT) sdlscreen.c
|
||||
|
||||
linux.o : linux.h linux.c
|
||||
$(CC) $(COPT) linux.c
|
||||
@ -3,17 +3,20 @@
|
||||
#include "sdlscreen.h"
|
||||
|
||||
void Pixel_SDL (word X,word Y,byte Couleur)
|
||||
/* Affiche un pixel de la Couleur aux coords X;Y à l'écran */
|
||||
{
|
||||
*(((Uint8 *)Ecran_SDL->pixels) + Y * Ecran_SDL->pitch + X)=Couleur;
|
||||
// SDL_UpdateRect(Ecran_SDL,X,Y,0,0);
|
||||
}
|
||||
|
||||
static inline void Pixel_SDL_Fast(word X, word Y,byte Couleur)
|
||||
/* Idem mais on ne rafraichit pas (plus rapide, mais ça ne s'affiche pas tout de suite) */
|
||||
{
|
||||
*(((byte *)Ecran_SDL->pixels) + Y * Ecran_SDL->pitch +X)=Couleur;
|
||||
}
|
||||
|
||||
byte Lit_Pixel_SDL (word X,word Y)
|
||||
/* On retourne la couleur du pixel aux coords données */
|
||||
{
|
||||
Uint8 * p = ((Uint8 *)Ecran_SDL->pixels) + Y * Ecran_SDL -> pitch + X * Ecran_SDL -> format -> BytesPerPixel;
|
||||
return *p;
|
||||
@ -30,6 +33,7 @@ void Afficher_partie_de_l_ecran_SDL (word Largeur,word Hauteur,word Largeu
|
||||
}
|
||||
|
||||
void Block_SDL (word Debut_X,word Debut_Y,word Largeur,word Hauteur,byte Couleur)
|
||||
/* On affiche un rectangle de la couleur donnée */
|
||||
{
|
||||
SDL_Rect rectangle;
|
||||
rectangle.x=Debut_X;
|
||||
@ -66,6 +70,7 @@ void Display_brush_Color_SDL (word Pos_X,word Pos_Y,word Decalage_X,word Decala
|
||||
}
|
||||
|
||||
void Display_brush_Mono_SDL (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse)
|
||||
/* On affiche la brosse en monochrome */
|
||||
{
|
||||
int i,j;
|
||||
for(i=0;i<Hauteur;i++)
|
||||
@ -90,6 +95,7 @@ void Remap_screen_SDL (word Pos_X,word Pos_Y,word Largeur,word Hauteur,b
|
||||
}
|
||||
|
||||
void Afficher_une_ligne_ecran_SDL (word Pos_X,word Pos_Y,word Largeur,byte * Ligne)
|
||||
/* On affiche toute une lignei de pixels. Utilisé pour les textes. */
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<Largeur;i++)
|
||||
@ -125,6 +131,7 @@ void Clear_brush_zoom_SDL (word Pos_X,word Pos_Y,word Decalage_X,word Dec
|
||||
}
|
||||
|
||||
void Set_Mode_SDL()
|
||||
/* On règle larésolution de l'écran */
|
||||
{
|
||||
Ecran_SDL=SDL_SetVideoMode(Largeur_ecran,Hauteur_ecran,8,SDL_SWSURFACE);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user