Moved GUI skin files to "skins/" sub-directory.

Update makefile (install and uninstall only copy and delete the basic skin)
Added Ilkke's GUI skin to svn.
Skin can be specified by command-line argument "/skin <file>" (relative to program data).
Grafx2's default FG and BG colors are now white and black (instead of 15 and 0).
Credits: Fixed a typo caused by mass translation ("GRAFX2 CREATED (by)").
Credits: Added TeeEmCe to bugfinders.
Updated helpfiles (Resolution, Save, Freehand-draw)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@707 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-03-30 23:50:40 +00:00
parent 14a08f35dc
commit 927fafacbe
7 changed files with 1691 additions and 1650 deletions

View File

@ -248,9 +248,9 @@ release : $(BIN)
# Create a zip archive ready for upload to the website, including binaries and sourcecode # Create a zip archive ready for upload to the website, including binaries and sourcecode
ziprelease: version $(BIN) release ziprelease: version $(BIN) release
tar cvzf src-svn`svnversion | sed 's/:/-/'`.tgz *.c *.h Makefile Makefile.dep gfx2.ico tar cvzf src-svn`svnversion | sed 's/:/-/'`.tgz *.c *.h Makefile Makefile.dep gfx2.ico
$(ZIP) $(ZIPOPT) grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-$(PLATFORM).$(ZIP) $(BIN) gfx2def.ini gfx2gui.gif gfx2.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) $(ZIP) $(ZIPOPT) grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-$(PLATFORM).$(ZIP) $(BIN) gfx2def.ini skins/base.gif gfx2.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 gfx2def.ini gfx2gui.gif gfx2.ico gfx2.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 gfx2def.ini skins/base.gif gfx2.ico gfx2.gif doc/gpl-2.0.txt fonts/8pxfont.png fonts/Tuffy.ttf
$(BIN) : $(OBJ) $(OBJRES) $(BIN) : $(OBJ) $(OBJRES)
$(CC) $(OBJ) $(OBJRES) -o $(BIN) $(LOPT) $(CC) $(OBJ) $(OBJRES) -o $(BIN) $(LOPT)
@ -287,10 +287,11 @@ install : $(BIN)
$(if $(wildcard $(datadir)/grafx2),,$(MKDIR) $(datadir)/grafx2) $(if $(wildcard $(datadir)/grafx2),,$(MKDIR) $(datadir)/grafx2)
$(CP) $(BIN) $(datadir)/grafx2/ $(CP) $(BIN) $(datadir)/grafx2/
$(CP) gfx2def.ini $(datadir)/grafx2/ $(CP) gfx2def.ini $(datadir)/grafx2/
$(CP) gfx2gui.gif $(datadir)/grafx2/
$(CP) gfx2.gif $(datadir)/grafx2/ $(CP) gfx2.gif $(datadir)/grafx2/
$(if $(wildcard $(datadir)/grafx2/fonts),,$(MKDIR) $(datadir)/grafx2/fonts) $(if $(wildcard $(datadir)/grafx2/fonts),,$(MKDIR) $(datadir)/grafx2/fonts)
cd fonts && $(CP) * $(datadir)/grafx2/fonts/ cd fonts && $(CP) * $(datadir)/grafx2/fonts/ && cd ..
$(if $(wildcard $(datadir)/grafx2/skins),,$(MKDIR) $(datadir)/grafx2/skins)
$(CP) skins/base.gif $(datadir)/grafx2/skins/
@echo Install complete @echo Install complete
# Linux uninstallation of the program # Linux uninstallation of the program
@ -298,11 +299,11 @@ uninstall :
$(DELCOMMAND) $(bindir)/grafx2 $(DELCOMMAND) $(bindir)/grafx2
$(DELCOMMAND) $(datadir)/grafx2/$(BIN) $(DELCOMMAND) $(datadir)/grafx2/$(BIN)
$(DELCOMMAND) $(datadir)/grafx2/gfx2def.ini $(DELCOMMAND) $(datadir)/grafx2/gfx2def.ini
$(DELCOMMAND) $(datadir)/grafx2/gfx2gui.gif
$(DELCOMMAND) $(datadir)/grafx2/gfx2.gif $(DELCOMMAND) $(datadir)/grafx2/gfx2.gif
$(DELCOMMAND) $(datadir)/grafx2/fonts/* $(DELCOMMAND) $(datadir)/grafx2/fonts/*
$(if $(wildcard $(datadir)/grafx2/fonts),,$(RMDIR) $(datadir)/grafx2/fonts) $(if $(wildcard $(datadir)/grafx2/fonts),,$(RMDIR) $(datadir)/grafx2/fonts)
$(if $(wildcard $(datadir)/grafx2),,$(RMDIR) $(datadir)/grafx2) $(DELCOMMAND) $(datadir)/grafx2/skins/base.gif
$(if $(wildcard $(datadir)/grafx2/skins),,$(RMDIR) $(datadir)/grafx2/skins)
@echo Uninstall complete @echo Uninstall complete
-include Makefile.dep -include Makefile.dep

View File

@ -250,7 +250,7 @@ static const T_Help_table helptable_help[] =
}; };
static const T_Help_table helptable_credits[] = static const T_Help_table helptable_credits[] =
{ {
HELP_TITLE(" GRAFX2 IS CREATED by") HELP_TITLE(" GRAFX2 IS CREATED BY")
HELP_BOLD (" SUNSET DESIGN") HELP_BOLD (" SUNSET DESIGN")
HELP_BOLD (" AUTHORS OF GRAFX2.0 BETA 96.5%") HELP_BOLD (" AUTHORS OF GRAFX2.0 BETA 96.5%")
HELP_TEXT ("") HELP_TEXT ("")
@ -260,62 +260,63 @@ static const T_Help_table helptable_credits[] =
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT (" Re-licensed GrafX2 under the GPL in 2001") HELP_TEXT (" Re-licensed GrafX2 under the GPL in 2001")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" THE GRAFX2 PROJECT TEAM") // HELP_BOLD (" THE GRAFX2 PROJECT TEAM")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT(" Adrien Destugues (pulkomandy\100gmail.com)") // HELP_TEXT (" Adrien Destugues (pulkomandy\100gmail.com)")
HELP_TEXT(" Yves Rizoud (yrizoud\100gmail.com)") // HELP_TEXT (" Yves Rizoud (yrizoud\100gmail.com)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT(" Got the source back to life in 2006") // HELP_TEXT (" Got the source back to life in 2006")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" ART") // HELP_BOLD (" ART")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT(" GrafX2 logo by Made (www.m4de.com)") // HELP_TEXT (" GrafX2 logo by Made (www.m4de.com)")
HELP_TEXT(" Icons and fonts by X-Man ") // HELP_TEXT (" Icons and fonts by X-Man ")
HELP_TEXT (" Additional graphics by iLKke") HELP_TEXT (" Additional graphics by iLKke")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT(" Pixelled all the graphics") // HELP_TEXT (" Pixelled all the graphics")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TITLE(" OTHER MACHINES PORTS") // HELP_TITLE(" OTHER MACHINES PORTS")
HELP_BOLD (" AMIGA OS 4 PORT") // HELP_BOLD (" AMIGA OS 4 PORT")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT(" Peter Gordon (pete\100petergordon.org.uk)") // HELP_TEXT (" Peter Gordon (pete\100petergordon.org.uk)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" AROS PORT") // HELP_BOLD (" AROS PORT")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT(" Fernando Mastandrea (masta.uy\100gmail.com)")// HELP_TEXT (" Fernando Mastandrea (masta.uy\100gmail.com)")
HELP_TEXT(" Markus Weiss (mweiss\100id-architekten.de)") // HELP_TEXT (" Markus Weiss (mweiss\100id-architekten.de)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" FREEBSD PORT") // HELP_BOLD (" FREEBSD PORT")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT(" Jean-Baptiste Berlioz") // HELP_TEXT (" Jean-Baptiste Berlioz")
HELP_TEXT (" (tobe\100freemind-tobe.com)") HELP_TEXT (" (tobe\100freemind-tobe.com)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" HAIKU OS AND BEOS PORT") // HELP_BOLD (" HAIKU OS AND BEOS PORT")
HELP_TEXT("") //
HELP_TEXT(" Luc Schrijvers (begasus\100skynet.be)") //
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" MAC OS X PORT") // HELP_TEXT (" Luc Schrijvers (begasus\100skynet.be)")
HELP_TEXT("") // HELP_TEXT ("")
HELP_TEXT(" Franck Charlet (hitchhikr\100australia.edu)")// HELP_BOLD (" MAC OS X PORT")
HELP_TEXT ("")
HELP_TEXT (" Franck Charlet (hitchhikr\100australia.edu)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" MORPHOS PORT") HELP_BOLD (" MORPHOS PORT")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT (" Rusback (rusback\100wanadoo.fr)") HELP_TEXT (" Rusback (rusback\100wanadoo.fr)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" SKYOS PORT") // HELP_BOLD (" SKYOS PORT")
HELP_TEXT("") // HELP_TEXT ("")
HELP_TEXT(" Luc Schrijvers (begasus\100skynet.be)") // HELP_TEXT (" Luc Schrijvers (begasus\100skynet.be)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT (" Made it work on your favourite toaster") HELP_TEXT (" Made it work on your favourite toaster")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD(" BUGFINDERS") // HELP_BOLD(" BUGFINDERS")
HELP_TEXT("") // HELP_TEXT ("")
HELP_TEXT (" BDCIron Ced El Topo ") HELP_TEXT (" BDCIron Ced El Topo ")
HELP_TEXT (" fallenblood Frost Grimmy ") HELP_TEXT (" fallenblood Frost Grimmy ")
HELP_TEXT (" iLKke keito kusma ") HELP_TEXT (" iLKke keito kusma ")
HELP_TEXT (" Lord Graga mind MooZ ") HELP_TEXT (" Lord Graga mind MooZ ")
HELP_TEXT(" richienyhus tempest Timo Kurrpa") HELP_TEXT (" richienyhus TeeEmCee tempest ")
HELP_TEXT(" titus^Rab Tobé 00ai99") HELP_TEXT (" Timo Kurrpa titus^Rab Tobé ")
HELP_TEXT (" 00ai99")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT (" Posted the annoying bugreports") HELP_TEXT (" Posted the annoying bugreports")
HELP_TEXT ("") HELP_TEXT ("")
@ -544,7 +545,7 @@ static const T_Help_table helptable_draw[] =
HELP_LINK ("(Key:%s)",0x100+BUTTON_DRAW) HELP_LINK ("(Key:%s)",0x100+BUTTON_DRAW)
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("Selects the current hand-drawing mode as the") HELP_TEXT ("Selects the current hand-drawing mode as the")
HELP_TEXT("active drawing tool. There are 3") HELP_TEXT ("active drawing tool. There are 4")
HELP_TEXT ("hand-drawing modes:") HELP_TEXT ("hand-drawing modes:")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("Continuous hand-drawing: as you move the") HELP_TEXT ("Continuous hand-drawing: as you move the")
@ -565,6 +566,11 @@ static const T_Help_table helptable_draw[] =
HELP_TEXT ("only pasted at the position where you first") HELP_TEXT ("only pasted at the position where you first")
HELP_TEXT ("clicked.") HELP_TEXT ("clicked.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("Contour fill: Draws pixels like continuous")
HELP_TEXT ("mode, but when you release the button Grafx2")
HELP_TEXT ("draws a line back to your starting position,")
HELP_TEXT ("and fills the area. This tool doesn't use the")
HELP_TEXT ("current brush, but single pixels.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD (" RIGHT CLICK") HELP_BOLD (" RIGHT CLICK")
HELP_LINK ("(Key:%s)",0x200+BUTTON_DRAW) HELP_LINK ("(Key:%s)",0x200+BUTTON_DRAW)
@ -1608,25 +1614,32 @@ static const T_Help_table helptable_resolution[] =
HELP_LINK ("(Key:%s)",0x100+BUTTON_RESOL) HELP_LINK ("(Key:%s)",0x100+BUTTON_RESOL)
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("Displays a menu where you can define the") HELP_TEXT ("Displays a menu where you can define the")
HELP_TEXT("size of your picture (up to 1024x768) by") HELP_TEXT ("size of your picture and choose the")
HELP_TEXT("clicking in the boxes named \"Width\" and") HELP_TEXT ("screen resolution.")
HELP_TEXT("\"Height\"; and the resolution in which you")
HELP_TEXT("want to draw (in the list).")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT("Clicking on a resolution button with the") HELP_TEXT ("- Image size")
HELP_TEXT("right mouse button will not only set the") HELP_TEXT ("Click in the boxes named \"Width\" and")
HELP_TEXT("resolution of the screen, but also set the") HELP_TEXT ("\"Height\" to change the size of the image")
HELP_TEXT("picture dimensions to the screen ones.") HELP_TEXT ("you're editing, up to 9999x9999.")
HELP_TEXT ("You can also right-click a video mode to")
HELP_TEXT ("copy its dimensions to the image's.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT("Resolutions written in dark gray are VESA") HELP_TEXT ("- Pixel size")
HELP_TEXT("modes that aren't supported by your video") HELP_TEXT ("If you choose Double pixels, Grafx2 will")
HELP_TEXT("card. If you have some modes like that, you") HELP_TEXT ("emulate lower resolutions by drawing a 2x2")
HELP_TEXT("should try to run a VESA driver such as") HELP_TEXT ("rectangle for each pixel. As a result, the")
HELP_TEXT("Univesa or Univbe before running the") HELP_TEXT ("image will appear bigger in the normal view.")
HELP_TEXT("program. If these modes still aren't") HELP_TEXT ("If you choose 'Wide' or 'Tall' pixels, it")
HELP_TEXT("available, then this means that your video") HELP_TEXT ("will simulate video modes that have")
HELP_TEXT("card really doesn't support them.") HELP_TEXT ("non-square pixels.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("- Video mode")
HELP_TEXT ("Click on a video mode to select it.")
HELP_TEXT ("Grafx2 only lists modes that are detected")
HELP_TEXT ("as available on your computer. Depending on")
HELP_TEXT ("your video card and drivers, there can be")
HELP_TEXT ("a huge difference in the number of modes")
HELP_TEXT ("it can propose.")
HELP_TEXT ("The small buttons on the left-hand side of") HELP_TEXT ("The small buttons on the left-hand side of")
HELP_TEXT ("the lines in the list of modes have been") HELP_TEXT ("the lines in the list of modes have been")
HELP_TEXT ("designed to allow you to disable some modes") HELP_TEXT ("designed to allow you to disable some modes")
@ -1652,7 +1665,7 @@ static const T_Help_table helptable_resolution[] =
HELP_TEXT ("the mode your want in the list; so you can") HELP_TEXT ("the mode your want in the list; so you can")
HELP_TEXT ("tag your favoutite ones in white, so that it") HELP_TEXT ("tag your favoutite ones in white, so that it")
HELP_TEXT ("will be easier to locate them. (Note: you") HELP_TEXT ("will be easier to locate them. (Note: you")
HELP_TEXT("cannot disable the standard 320x200 mode)") HELP_TEXT ("cannot disable the standard windowed mode)")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("- Dark gray: It allows you to indicate which") HELP_TEXT ("- Dark gray: It allows you to indicate which")
HELP_TEXT ("modes are not really perfect (flickering,") HELP_TEXT ("modes are not really perfect (flickering,")
@ -1664,8 +1677,8 @@ static const T_Help_table helptable_resolution[] =
HELP_TEXT ("- Black: Use it for totally unsupported") HELP_TEXT ("- Black: Use it for totally unsupported")
HELP_TEXT ("modes. Thus, these modes won't be selected") HELP_TEXT ("modes. Thus, these modes won't be selected")
HELP_TEXT ("the \"auto-set res.\" and the program will") HELP_TEXT ("the \"auto-set res.\" and the program will")
HELP_TEXT("prevent you from selecting them from the") HELP_TEXT ("not let you select them from the list of")
HELP_TEXT("menu of resolutions.") HELP_TEXT ("resolutions.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD ("RIGHT CLICK") HELP_BOLD ("RIGHT CLICK")
HELP_LINK ("(Key:%s)",0x200+BUTTON_RESOL) HELP_LINK ("(Key:%s)",0x200+BUTTON_RESOL)
@ -1716,9 +1729,9 @@ static const T_Help_table helptable_save[] =
HELP_TEXT ("Displays a fileselector where the following") HELP_TEXT ("Displays a fileselector where the following")
HELP_TEXT ("options are available:") HELP_TEXT ("options are available:")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT("- Drives: Allow you to change the current") HELP_TEXT ("- Select drive: Allow you to change the")
HELP_TEXT("drive. You can use <Alt>+ <Letter> to change") HELP_TEXT ("current drive.or volume (depending on your")
HELP_TEXT("drives too.") HELP_TEXT ("operating system")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("- Format: Allows you to choose the file") HELP_TEXT ("- Format: Allows you to choose the file")
HELP_TEXT ("format you want. (PAL and KCF file formats") HELP_TEXT ("format you want. (PAL and KCF file formats")
@ -1729,6 +1742,14 @@ static const T_Help_table helptable_save[] =
HELP_TEXT ("default (according to the format) will be") HELP_TEXT ("default (according to the format) will be")
HELP_TEXT ("used.") HELP_TEXT ("used.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("- Bookmarks: The four dropdown buttons allow")
HELP_TEXT ("you to bookmark frequently used directories.")
HELP_TEXT ("Use right-click to open a contextual menu")
HELP_TEXT ("to Set it (memorize current directory),")
HELP_TEXT ("Rename it to change its label, and Clear it")
HELP_TEXT ("if you no longer need it. Use left-click to")
HELP_TEXT ("change to the memorized directory.")
HELP_TEXT ("")
HELP_TEXT ("- File-list: Allows you to flick through the") HELP_TEXT ("- File-list: Allows you to flick through the")
HELP_TEXT ("disk tree or to overwrite an existing file.") HELP_TEXT ("disk tree or to overwrite an existing file.")
HELP_TEXT ("") HELP_TEXT ("")
@ -1737,19 +1758,19 @@ static const T_Help_table helptable_save[] =
HELP_TEXT ("directory, it must be empty to be removed.") HELP_TEXT ("directory, it must be empty to be removed.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("- Save: Saves the picture with the current") HELP_TEXT ("- Save: Saves the picture with the current")
HELP_TEXT("filename, with the chosen format and with") HELP_TEXT ("filename, with the chosen format. If the ")
HELP_TEXT("the current comment (for PKM files). If the")
HELP_TEXT ("current filename represents a directory,") HELP_TEXT ("current filename represents a directory,")
HELP_TEXT ("you'll enter it.") HELP_TEXT ("you'll enter it.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("- Comment (Txt): If you're using the PKM") HELP_TEXT ("- Comment (Txt): If you're using the PKM")
HELP_TEXT("format, you can type in a comment on your") HELP_TEXT ("or PNG format, you can type in a comment on")
HELP_TEXT("picture.") HELP_TEXT ("your picture. It will be memorized in the")
HELP_TEXT ("image.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_TEXT ("Note: The Backspace key brings you directly") HELP_TEXT ("Note: The Backspace key brings you directly")
HELP_TEXT("to the parent directory. Type in the 1st") HELP_TEXT ("to the parent directory. You can also type")
HELP_TEXT("letters of a filename you are looking for to") HELP_TEXT ("the first letters of a filename you are")
HELP_TEXT("access it faster.") HELP_TEXT ("looking for, to access it faster.")
HELP_TEXT ("") HELP_TEXT ("")
HELP_BOLD ("RIGHT CLICK") HELP_BOLD ("RIGHT CLICK")
HELP_LINK ("(Key:%s)",0x200+BUTTON_SAVE) HELP_LINK ("(Key:%s)",0x200+BUTTON_SAVE)

7
init.c
View File

@ -235,7 +235,7 @@ void Center_GUI_cursor(byte *cursor_buffer, int cursor_number)
GFX_cursor_sprite[cursor_number][y][x]=cursor_buffer[(start_y+y)*29+start_x+x]; GFX_cursor_sprite[cursor_number][y][x]=cursor_buffer[(start_y+y)*29+start_x+x];
} }
void Load_DAT(void) void Load_graphics(const char * skin_file)
{ {
int index; int index;
char filename[MAX_PATH_CHARACTERS]; char filename[MAX_PATH_CHARACTERS];
@ -253,7 +253,8 @@ void Load_DAT(void)
// Lecture du fichier "skin" // Lecture du fichier "skin"
strcpy(filename,Repertoire_des_donnees); strcpy(filename,Repertoire_des_donnees);
strcat(filename,"gfx2gui.gif"); strcat(filename,skin_file);
gui=IMG_Load(filename); gui=IMG_Load(filename);
if (!gui) if (!gui)
{ {
@ -374,7 +375,7 @@ void Load_DAT(void)
else else
GUI_seek_right(gui, &cursor_x, cursor_y, neutral_color, "mouse cursor"); GUI_seek_right(gui, &cursor_x, cursor_y, neutral_color, "mouse cursor");
Read_GUI_block(gui, cursor_x, cursor_y, mouse_cursor_area, 29, 29, "mouse cursor",1); Read_GUI_block(gui, cursor_x, cursor_y, mouse_cursor_area, 29, 29, "mouse cursor",1);
Center_GUI_cursor(mouse_cursor_area,i); Center_GUI_cursor((byte *)mouse_cursor_area,i);
cursor_x+=29; cursor_x+=29;
} }
cursor_y+=29; cursor_y+=29;

2
init.h
View File

@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
void Load_DAT(void); void Load_graphics(const char * skin_file);
void Init_buttons(void); void Init_buttons(void);
void Init_operations(void); void Init_operations(void);
int Load_CFG(int reload_all); int Load_CFG(int reload_all);

44
main.c
View File

@ -72,8 +72,8 @@
extern DECLSPEC int SDLCALL SDL_putenv(const char *variable); extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
#endif #endif
byte Old_lines_number; // old nombre de lignes de l'écran // filename for the current GUI skin file.
static char Gui_skin_file[MAX_PATH_CHARACTERS]= "skins" PATH_SEPARATOR "base.gif";
//--- Affichage de la syntaxe, et de la liste des modes vidéos disponibles --- //--- Affichage de la syntaxe, et de la liste des modes vidéos disponibles ---
void Display_syntax(void) void Display_syntax(void)
@ -85,6 +85,7 @@ void Display_syntax(void)
printf("\t/wide to emulate a video mode with wide pixels (2x1)\n"); printf("\t/wide to emulate a video mode with wide pixels (2x1)\n");
printf("\t/tall to emulate a video mode with tall pixels (1x2)\n"); printf("\t/tall to emulate a video mode with tall pixels (1x2)\n");
printf("\t/double to emulate a video mode with double pixels (2x2)\n"); printf("\t/double to emulate a video mode with double pixels (2x2)\n");
printf("\t/skin <filename> use an alternate file with the menu graphics\n");
printf("\t/mode <videomode> to set a video mode\n\n"); printf("\t/mode <videomode> to set a video mode\n\n");
printf("Available video modes:\n\n"); printf("Available video modes:\n\n");
for (mode_index=0; mode_index<Nb_video_modes; mode_index++) for (mode_index=0; mode_index<Nb_video_modes; mode_index++)
@ -251,6 +252,21 @@ void Analyze_command_line(int argc,char * argv[])
exit(0); exit(0);
} }
} }
else if ( !strcmp(argv[index],"/skin") )
{
// GUI skin file
index++;
if (index<argc)
{
strcpy(Gui_skin_file,argv[index]);
}
else
{
Error(ERROR_COMMAND_LINE);
Display_syntax();
exit(0);
}
}
else else
{ {
// Si ce n'est pas un paramètre, c'est le nom du fichier à ouvrir // Si ce n'est pas un paramètre, c'est le nom du fichier à ouvrir
@ -425,8 +441,6 @@ int Init_program(int argc,char * argv[])
Pixel_in_menu=Pixel_in_toolbar; Pixel_in_menu=Pixel_in_toolbar;
Menu_is_visible=1; Menu_is_visible=1;
// Données sur les couleurs et la palette: // Données sur les couleurs et la palette:
Fore_color=15;
Back_color=0;
First_color_in_palette=0; First_color_in_palette=0;
// Données sur le curseur: // Données sur le curseur:
Cursor_shape=CURSOR_SHAPE_TARGET; Cursor_shape=CURSOR_SHAPE_TARGET;
@ -495,8 +509,6 @@ int Init_program(int argc,char * argv[])
Windows_open=0; Windows_open=0;
// Charger les sprites et la palette
Load_DAT();
// Charger la configuration des touches // Charger la configuration des touches
Set_config_defaults(); Set_config_defaults();
switch(Load_CFG(1)) switch(Load_CFG(1))
@ -516,19 +528,24 @@ int Init_program(int argc,char * argv[])
if (temp) if (temp)
Error(temp); Error(temp);
// Infos sur les trames (Sieve)
Sieve_mode=0;
Copy_preset_sieve(0);
Analyze_command_line(argc,argv);
// Charger les sprites et la palette
Load_graphics(Gui_skin_file);
// Transfert des valeurs du .INI qui ne changent pas dans des variables // Transfert des valeurs du .INI qui ne changent pas dans des variables
// plus accessibles: // plus accessibles:
Default_palette[MC_Black]=Fav_menu_colors[0]=Config.Fav_menu_colors[0]; Default_palette[MC_Black]=Fav_menu_colors[0]=Config.Fav_menu_colors[0];
Default_palette[MC_Dark] =Fav_menu_colors[1]=Config.Fav_menu_colors[1]; Default_palette[MC_Dark] =Fav_menu_colors[1]=Config.Fav_menu_colors[1];
Default_palette[MC_Light]=Fav_menu_colors[2]=Config.Fav_menu_colors[2]; Default_palette[MC_Light]=Fav_menu_colors[2]=Config.Fav_menu_colors[2];
Default_palette[MC_White]=Fav_menu_colors[3]=Config.Fav_menu_colors[3]; Default_palette[MC_White]=Fav_menu_colors[3]=Config.Fav_menu_colors[3];
memcpy(Main_palette,Default_palette,sizeof(T_Palette));
Compute_optimal_menu_colors(Default_palette); Compute_optimal_menu_colors(Default_palette);
Fore_color=MC_White;
// Infos sur les trames (Sieve) Back_color=MC_Black;
Sieve_mode=0;
Copy_preset_sieve(0);
// Prise en compte de la fonte // Prise en compte de la fonte
if (Config.Font) if (Config.Font)
@ -536,6 +553,8 @@ int Init_program(int argc,char * argv[])
else else
Menu_font=GFX_system_font; Menu_font=GFX_system_font;
memcpy(Main_palette,Default_palette,sizeof(T_Palette));
// Allocation de mémoire pour la brosse // Allocation de mémoire pour la brosse
if (!(Brush =(byte *)malloc( 1* 1))) Error(ERROR_MEMORY); if (!(Brush =(byte *)malloc( 1* 1))) Error(ERROR_MEMORY);
if (!(Smear_brush =(byte *)malloc(MAX_PAINTBRUSH_SIZE*MAX_PAINTBRUSH_SIZE))) Error(ERROR_MEMORY); if (!(Smear_brush =(byte *)malloc(MAX_PAINTBRUSH_SIZE*MAX_PAINTBRUSH_SIZE))) Error(ERROR_MEMORY);
@ -546,7 +565,6 @@ int Init_program(int argc,char * argv[])
Paintbrush_width=1; Paintbrush_width=1;
Paintbrush_height=1; Paintbrush_height=1;
Analyze_command_line(argc,argv);
starting_videomode=Current_resolution; starting_videomode=Current_resolution;
Horizontal_line_buffer=NULL; Horizontal_line_buffer=NULL;
Screen_width=Screen_height=Current_resolution=0; Screen_width=Screen_height=Current_resolution=0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
skins/ilkke.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB