Fixes the crash with the gradrect. But there are still some screen corruption (and missing lines) problems...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@429 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									63d595a3ed
								
							
						
					
					
						commit
						9bc64e8adb
					
				
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
									
									
									
									
								
							@ -44,7 +44,7 @@ ifdef COMSPEC
 | 
				
			|||||||
  OBJRES = $(OBJDIR)/winres.o
 | 
					  OBJRES = $(OBJDIR)/winres.o
 | 
				
			||||||
  CFGOBJRES = $(OBJDIR)/wincfgres.o
 | 
					  CFGOBJRES = $(OBJDIR)/wincfgres.o
 | 
				
			||||||
  PLATFORM = win32 #no uname so we'll do that ourselve
 | 
					  PLATFORM = win32 #no uname so we'll do that ourselve
 | 
				
			||||||
  PLATFORMFILES = SDL.dll SDL_image.dll libpng13.dll zlib1.dll #some misc files we have to add to the release archive
 | 
					  PLATFORMFILES = SDL.dll SDL_image.dll libpng13.dll zlib1.dll $(TTFLIBS) #some misc files we have to add to the release archive under windows.
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  PLATFORM = $(shell uname)
 | 
					  PLATFORM = $(shell uname)
 | 
				
			||||||
@ -164,7 +164,7 @@ release : $(BIN) $(CFGBIN)
 | 
				
			|||||||
# A release zip archive
 | 
					# A release zip archive
 | 
				
			||||||
ziprelease: version $(BIN) $(BINCFG) release
 | 
					ziprelease: version $(BIN) $(BINCFG) release
 | 
				
			||||||
	tar cvzf src-svn`svnversion | sed 's/:/-/'`.tgz *.c *.h Makefile Makefile.dep gfx2.ico gfx2cfg.ico
 | 
						tar cvzf src-svn`svnversion | sed 's/:/-/'`.tgz *.c *.h Makefile Makefile.dep gfx2.ico gfx2cfg.ico
 | 
				
			||||||
	zip grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-$(PLATFORM).zip $(BIN) $(CFGBIN) gfx2.dat gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt fonts/8pxfont.png $(TTFLIBS) doc/README-zlib1.txt doc/README-SDL.txt doc/README-SDL_image.txt doc/README-SDL_ttf.txt fonts/Tuffy.ttf src-svn`svnversion | sed 's/:/-/'`.tgz $(PLATFORMFILES)
 | 
						zip grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-$(PLATFORM).zip $(BIN) $(CFGBIN) gfx2.dat gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt fonts/8pxfont.png doc/README-zlib1.txt doc/README-SDL.txt doc/README-SDL_image.txt doc/README-SDL_ttf.txt fonts/Tuffy.ttf src-svn`svnversion | sed 's/:/-/'`.tgz $(PLATFORMFILES)
 | 
				
			||||||
	$(DELCOMMAND) src-svn`svnversion | sed 's/:/-/'`.tgz
 | 
						$(DELCOMMAND) src-svn`svnversion | sed 's/:/-/'`.tgz
 | 
				
			||||||
	tar cvzf grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-src.tgz *.c *.h Makefile Makefile.dep gfx2.dat gfx2.ico gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt fonts/8pxfont.png fonts/Tuffy.ttf
 | 
						tar cvzf grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-src.tgz *.c *.h Makefile Makefile.dep gfx2.dat gfx2.ico gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt fonts/8pxfont.png fonts/Tuffy.ttf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								divers.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								divers.c
									
									
									
									
									
								
							@ -331,7 +331,6 @@ int Get_input(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (bl)
 | 
					    if (bl)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
    DEBUG("warp",Operation_Taille_pile);
 | 
					 | 
				
			||||||
      SDL_WarpMouse(
 | 
					      SDL_WarpMouse(
 | 
				
			||||||
        INPUT_Nouveau_Mouse_X*Pixel_width,
 | 
					        INPUT_Nouveau_Mouse_X*Pixel_width,
 | 
				
			||||||
        INPUT_Nouveau_Mouse_Y*Pixel_height
 | 
					        INPUT_Nouveau_Mouse_Y*Pixel_height
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										32
									
								
								operatio.c
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								operatio.c
									
									
									
									
									
								
							@ -4299,34 +4299,46 @@ void Rectangle_Degrade_0_5(void)
 | 
				
			|||||||
  UpdateRect(Min(RAX,RBX)-Principal_Decalage_X,Min(RAY,RBY)-Principal_Decalage_Y,largeur+1-decalage_largeur,hauteur+1-decalage_hauteur);
 | 
					  UpdateRect(Min(RAX,RBX)-Principal_Decalage_X,Min(RAY,RBY)-Principal_Decalage_Y,largeur+1-decalage_largeur,hauteur+1-decalage_hauteur);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Dessin dans la zone zoomée
 | 
					  // Dessin dans la zone zoomée
 | 
				
			||||||
  if(Loupe_Mode)
 | 
					  if(Loupe_Mode && Min(RAX,RBX)<Limite_visible_Droite_Zoom && Max(RAX,RBX)>Limite_Gauche_Zoom && Min(RAY,RBY)<Limite_visible_Bas_Zoom && Max(RAY,RBY)>Limite_Haut_Zoom )
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    decalage_largeur = 0;
 | 
					    decalage_largeur = 0;
 | 
				
			||||||
    if(Min(RAX,RBX)<Limite_Gauche_Zoom)
 | 
					    decalage_hauteur=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if(Min(RAX,RBX)<Limite_Gauche_Zoom) // On dépasse du zoom à gauche
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
	decalage_largeur += Limite_Gauche_Zoom - Min(RAX,RAY);
 | 
						decalage_largeur += Limite_Gauche_Zoom - Min(RAX,RAY);
 | 
				
			||||||
	decalage_gauche = Limite_Gauche_Zoom;
 | 
						decalage_gauche = Limite_Gauche_Zoom;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if(Max(RAX,RAY)>Limite_visible_Droite_Zoom)
 | 
					
 | 
				
			||||||
 | 
					    if(Max(RAX,RAY)>Limite_visible_Droite_Zoom) // On dépasse du zoom à droite
 | 
				
			||||||
	decalage_largeur += Max(RAX,RAY) - Limite_visible_Droite_Zoom;
 | 
						decalage_largeur += Max(RAX,RAY) - Limite_visible_Droite_Zoom;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    decalage_hauteur=0;
 | 
					    if(Min(RAY,RBY)<Limite_Haut_Zoom) // On dépasse du zoom en haut
 | 
				
			||||||
    if(Min(RAY,RBY)<Limite_Haut_Zoom)
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
	decalage_hauteur += Limite_Haut_Zoom - Min(RAY,RBY);
 | 
						decalage_hauteur += Limite_Haut_Zoom - Min(RAY,RBY);
 | 
				
			||||||
	decalage_haut = Limite_Haut_Zoom;
 | 
						decalage_haut = Limite_Haut_Zoom;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if(Max(RAY,RBY)>Limite_visible_Bas_Zoom)
 | 
					
 | 
				
			||||||
 | 
					    if(Max(RAY,RBY)>Limite_visible_Bas_Zoom) // On dépasse du zoom en bas
 | 
				
			||||||
	decalage_hauteur += Max(RAX,RAY) + Limite_visible_Bas_Zoom;
 | 
						decalage_hauteur += Max(RAX,RAY) + Limite_visible_Bas_Zoom;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(decalage_haut==0)
 | 
					    if(largeur > decalage_largeur)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if(decalage_haut==0) // La ligne du haut est visible
 | 
				
			||||||
	Ligne_horizontale_XOR_Zoom(decalage_gauche>0?decalage_gauche:Min(RAX,RBX),Min(RAY,RBY),largeur-decalage_largeur);
 | 
						Ligne_horizontale_XOR_Zoom(decalage_gauche>0?decalage_gauche:Min(RAX,RBX),Min(RAY,RBY),largeur-decalage_largeur);
 | 
				
			||||||
    if(Max(RAY,RBY)<Limite_visible_Bas_Zoom)
 | 
					
 | 
				
			||||||
 | 
					      if(Max(RAY,RBY)<Limite_visible_Bas_Zoom) // La  ligne du bas est visible
 | 
				
			||||||
	Ligne_horizontale_XOR_Zoom(decalage_gauche>0?decalage_gauche:Min(RAX,RBX),Max(RAY,RBY),largeur-decalage_largeur);
 | 
						Ligne_horizontale_XOR_Zoom(decalage_gauche>0?decalage_gauche:Min(RAX,RBX),Max(RAY,RBY),largeur-decalage_largeur);
 | 
				
			||||||
    if(decalage_gauche==0)
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if(hauteur>decalage_hauteur)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if(decalage_gauche==0) // La ligne de gauche est visible
 | 
				
			||||||
	Ligne_verticale_XOR_Zoom(Min(RAX,RBX),decalage_haut>0?decalage_haut:Min(RAY,RBY),hauteur-decalage_hauteur);
 | 
						Ligne_verticale_XOR_Zoom(Min(RAX,RBX),decalage_haut>0?decalage_haut:Min(RAY,RBY),hauteur-decalage_hauteur);
 | 
				
			||||||
    if(Max(RAX,RBX)<Limite_visible_Droite_Zoom)
 | 
					
 | 
				
			||||||
 | 
					      if(Max(RAX,RBX)<Limite_visible_Droite_Zoom) // La ligne de droite est visible
 | 
				
			||||||
	Ligne_verticale_XOR_Zoom(Max(RAX,RBX),decalage_haut>0?decalage_haut:Min(RAY,RBY),hauteur-decalage_hauteur);
 | 
						Ligne_verticale_XOR_Zoom(Max(RAX,RBX),decalage_haut>0?decalage_haut:Min(RAY,RBY),hauteur-decalage_hauteur);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Operation_PUSH(RAX);
 | 
					  Operation_PUSH(RAX);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user