Splitted loadsave.c :
- loadsave.c : common things - fileformats.c : format that make a full backup of any picture without palette loss - miscfileformats.c : formats that are not saving all the picture (palette only, pixels only, constrained palette) I was not very precise in the splitting and we may rethink the flags that mark if a picture is fully saved or not... it was not updated after we decided to allow the full palette range 0.255 instead of 0.63, so most of the atari format were marked as saving everything. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1120 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									7105566433
								
							
						
					
					
						commit
						1a2ac678e0
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@ -279,7 +279,7 @@ endif
 | 
			
		||||
.PHONY : all debug release clean depend zip version force install uninstall
 | 
			
		||||
 | 
			
		||||
# This is the list of the objects we want to build. Dependancies are built by "make depend" automatically.
 | 
			
		||||
OBJ = $(OBJDIR)/main.o $(OBJDIR)/init.o $(OBJDIR)/graph.o $(OBJDIR)/sdlscreen.o  $(OBJDIR)/misc.o $(OBJDIR)/special.o $(OBJDIR)/buttons.o $(OBJDIR)/palette.o $(OBJDIR)/help.o $(OBJDIR)/operatio.o $(OBJDIR)/pages.o $(OBJDIR)/loadsave.o $(OBJDIR)/readline.o $(OBJDIR)/engine.o $(OBJDIR)/filesel.o $(OBJDIR)/op_c.o $(OBJDIR)/readini.o $(OBJDIR)/saveini.o $(OBJDIR)/shade.o $(OBJDIR)/keyboard.o $(OBJDIR)/io.o $(OBJDIR)/version.o $(OBJDIR)/text.o $(OBJDIR)/SFont.o $(OBJDIR)/setup.o $(OBJDIR)/pxsimple.o $(OBJDIR)/pxtall.o $(OBJDIR)/pxwide.o $(OBJDIR)/pxdouble.o $(OBJDIR)/pxtriple.o $(OBJDIR)/pxtall2.o $(OBJDIR)/pxwide2.o $(OBJDIR)/pxquad.o $(OBJDIR)/windows.o $(OBJDIR)/brush.o $(OBJDIR)/realpath.o $(OBJDIR)/mountlist.o $(OBJDIR)/input.o $(OBJDIR)/hotkeys.o $(OBJDIR)/transform.o $(OBJDIR)/pversion.o $(OBJDIR)/factory.o $(PLATFORMOBJ)
 | 
			
		||||
OBJ = $(OBJDIR)/main.o $(OBJDIR)/init.o $(OBJDIR)/graph.o $(OBJDIR)/sdlscreen.o  $(OBJDIR)/misc.o $(OBJDIR)/special.o $(OBJDIR)/buttons.o $(OBJDIR)/palette.o $(OBJDIR)/help.o $(OBJDIR)/operatio.o $(OBJDIR)/pages.o $(OBJDIR)/loadsave.o $(OBJDIR)/readline.o $(OBJDIR)/engine.o $(OBJDIR)/filesel.o $(OBJDIR)/op_c.o $(OBJDIR)/readini.o $(OBJDIR)/saveini.o $(OBJDIR)/shade.o $(OBJDIR)/keyboard.o $(OBJDIR)/io.o $(OBJDIR)/version.o $(OBJDIR)/text.o $(OBJDIR)/SFont.o $(OBJDIR)/setup.o $(OBJDIR)/pxsimple.o $(OBJDIR)/pxtall.o $(OBJDIR)/pxwide.o $(OBJDIR)/pxdouble.o $(OBJDIR)/pxtriple.o $(OBJDIR)/pxtall2.o $(OBJDIR)/pxwide2.o $(OBJDIR)/pxquad.o $(OBJDIR)/windows.o $(OBJDIR)/brush.o $(OBJDIR)/realpath.o $(OBJDIR)/mountlist.o $(OBJDIR)/input.o $(OBJDIR)/hotkeys.o $(OBJDIR)/transform.o $(OBJDIR)/pversion.o $(OBJDIR)/factory.o $(PLATFORMOBJ) $(OBJDIR)/fileformats.o $(OBJDIR)/miscfileformats.o
 | 
			
		||||
 | 
			
		||||
SKIN_FILES = skins/skin_classic.png skins/skin_modern.png skins/font_Classic.png skins/font_Fun.png
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3496
									
								
								fileformats.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3496
									
								
								fileformats.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										6131
									
								
								loadsave.c
									
									
									
									
									
								
							
							
						
						
									
										6131
									
								
								loadsave.c
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										33
									
								
								loadsave.h
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								loadsave.h
									
									
									
									
									
								
							@ -22,9 +22,9 @@
 | 
			
		||||
/// Also handles showing the preview in fileselectors.
 | 
			
		||||
//////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
void Pixel_load_in_current_screen(word x_pos,word y_pos,byte color);
 | 
			
		||||
void Pixel_load_in_preview      (word x_pos,word y_pos,byte color);
 | 
			
		||||
void Pixel_load_in_brush       (word x_pos,word y_pos,byte color);
 | 
			
		||||
void Pixel_load_in_current_screen (word x_pos, word y_pos, byte color);
 | 
			
		||||
void Pixel_load_in_preview (word x_pos, word y_pos, byte color);
 | 
			
		||||
void Pixel_load_in_brush (word x_pos, word y_pos, byte color);
 | 
			
		||||
 | 
			
		||||
void Get_full_filename(char * filename, byte is_colorix_format);
 | 
			
		||||
 | 
			
		||||
@ -33,6 +33,7 @@ void Get_full_filename(char * filename, byte is_colorix_format);
 | 
			
		||||
/// Handles loading an image or a brush, or previewing only.
 | 
			
		||||
/// @param image true if the fileselector is the one for loading images (not brush)
 | 
			
		||||
void Load_image(byte image);
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// High-level picture saving function.
 | 
			
		||||
/// @param image true if the image should be saved (instead of the brush)
 | 
			
		||||
@ -67,9 +68,31 @@ T_Format * Get_fileformat(byte format);
 | 
			
		||||
// -- File formats
 | 
			
		||||
 | 
			
		||||
#ifndef __no_pnglib__
 | 
			
		||||
#define NB_KNOWN_FORMATS         18    ///< Total number of known file formats.
 | 
			
		||||
#define NB_KNOWN_FORMATS 18 ///< Total number of known file formats.
 | 
			
		||||
#else
 | 
			
		||||
// Without pnglib
 | 
			
		||||
#define NB_KNOWN_FORMATS         17    ///< Total number of known file formats.
 | 
			
		||||
#define NB_KNOWN_FORMATS 17 ///< Total number of known file formats.
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// This is here and not in fileformats.c because the emergency save uses it...
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
  byte Filler1[6];
 | 
			
		||||
  word Width;
 | 
			
		||||
  word Height;
 | 
			
		||||
  byte Filler2[118];
 | 
			
		||||
  T_Palette Palette;
 | 
			
		||||
} T_IMG_Header;
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
// Données pour la gestion du chargement en 24b
 | 
			
		||||
#define FORMAT_24B 0x100
 | 
			
		||||
typedef void (* Func_24b_display) (short,short,byte,byte,byte);
 | 
			
		||||
extern int Image_24b;
 | 
			
		||||
 | 
			
		||||
extern T_Components * Buffer_image_24b;
 | 
			
		||||
extern Func_24b_display Pixel_load_24b;
 | 
			
		||||
 | 
			
		||||
void Pixel_load_in_24b_preview(short x_pos,short y_pos,byte r,byte g,byte b);
 | 
			
		||||
extern enum PIXEL_RATIO Ratio_of_loaded_image;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2485
									
								
								miscfileformats.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2485
									
								
								miscfileformats.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user