grafx2 and gfxcfg now have a 32x32 icon while running. (gif image in install dir.)
(win32): Added embedded icon for gfxcfg.exe. Only 32x32 version, because lazy. Tested on Win98 and Linux. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@355 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
6e7fa8690c
commit
b49cbc3acf
13
Makefile
13
Makefile
@ -33,6 +33,7 @@ ifdef COMSPEC
|
|||||||
# Resources (icon)
|
# Resources (icon)
|
||||||
WINDRES = windres.exe
|
WINDRES = windres.exe
|
||||||
OBJRES = $(OBJDIR)/winres.o
|
OBJRES = $(OBJDIR)/winres.o
|
||||||
|
CFGOBJRES = $(OBJDIR)/wincfgres.o
|
||||||
else
|
else
|
||||||
|
|
||||||
PLATFORM = $(shell uname)
|
PLATFORM = $(shell uname)
|
||||||
@ -129,15 +130,15 @@ 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
|
tar cvzf src-svn`svnversion | sed 's/:/-/'`.tgz *.c *.h Makefile Makefile.dep
|
||||||
zip grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-win32.zip $(BIN) $(CFGBIN) gfx2.dat gfx2.ico doc/gpl-2.0.txt SDL.dll fonts/8pxfont.png SDL_image.dll zlib1.dll libpng13.dll $(TTFLIBS) fonts/Tuffy.ttf src-svn`svnversion | sed 's/:/-/'`.tgz
|
zip grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-win32.zip $(BIN) $(CFGBIN) gfx2.dat gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt SDL.dll fonts/8pxfont.png SDL_image.dll zlib1.dll libpng13.dll $(TTFLIBS) fonts/Tuffy.ttf src-svn`svnversion | sed 's/:/-/'`.tgz
|
||||||
$(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 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
|
||||||
|
|
||||||
$(BIN) : $(OBJ) $(OBJRES)
|
$(BIN) : $(OBJ) $(OBJRES)
|
||||||
$(CC) $(OBJ) $(OBJRES) -o $(BIN) $(LOPT)
|
$(CC) $(OBJ) $(OBJRES) -o $(BIN) $(LOPT)
|
||||||
|
|
||||||
$(CFGBIN) : $(CFGOBJ)
|
$(CFGBIN) : $(CFGOBJ) $(CFGOBJRES)
|
||||||
$(CC) $(CFGOBJ) -o $(CFGBIN) $(LOPT)
|
$(CC) $(CFGOBJ) $(CFGOBJRES) -o $(CFGBIN) $(LOPT)
|
||||||
|
|
||||||
# SVN revision number
|
# SVN revision number
|
||||||
version.c :
|
version.c :
|
||||||
@ -157,9 +158,11 @@ depend :
|
|||||||
|
|
||||||
$(OBJDIR)/winres.o : gfx2.ico
|
$(OBJDIR)/winres.o : gfx2.ico
|
||||||
echo "1 ICON \"gfx2.ico\"" | $(WINDRES) -o $(OBJDIR)/winres.o
|
echo "1 ICON \"gfx2.ico\"" | $(WINDRES) -o $(OBJDIR)/winres.o
|
||||||
|
$(OBJDIR)/wincfgres.o : gfx2cfg.ico
|
||||||
|
echo "1 ICON \"gfx2cfg.ico\"" | $(WINDRES) -o $(OBJDIR)/wincfgres.o
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
$(DELCOMMAND) $(OBJ) $(CFGOBJ) $(OBJDIR)/version.o $(OBJRES)
|
$(DELCOMMAND) $(OBJ) $(CFGOBJ) $(OBJDIR)/version.o $(OBJRES) $(CFGOBJRES)
|
||||||
$(DELCOMMAND) $(BIN) $(CFGBIN)
|
$(DELCOMMAND) $(BIN) $(CFGBIN)
|
||||||
|
|
||||||
test :
|
test :
|
||||||
|
|||||||
BIN
gfx2.gif
BIN
gfx2.gif
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
gfx2cfg.gif
Normal file
BIN
gfx2cfg.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
18
gfxcfg.c
18
gfxcfg.c
@ -655,7 +655,23 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char *argv[])
|
|||||||
/* On initialise SDL */
|
/* On initialise SDL */
|
||||||
SDL_Init(SDL_INIT_VIDEO);
|
SDL_Init(SDL_INIT_VIDEO);
|
||||||
Ecran = SDL_SetVideoMode(640,480,8,0);
|
Ecran = SDL_SetVideoMode(640,480,8,0);
|
||||||
SDL_WM_SetCaption ("Grafx2 configuration tool","../gfx2.gif");
|
SDL_WM_SetCaption ("Grafx2 configuration tool","Gfx2Cfg");
|
||||||
|
{
|
||||||
|
// Routine pour définir l'icone.
|
||||||
|
SDL_Surface * Icone = IMG_Load("gfx2cfg.gif");
|
||||||
|
byte *Masque_icone;
|
||||||
|
if (Icone)
|
||||||
|
{
|
||||||
|
int x,y;
|
||||||
|
Masque_icone=malloc(128);
|
||||||
|
memset(Masque_icone,0,128);
|
||||||
|
for (y=0;y<32;y++)
|
||||||
|
for (x=0;x<32;x++)
|
||||||
|
if (((byte *)(Icone->pixels))[(y*32+x)] != 255)
|
||||||
|
Masque_icone[(y*32+x)/8] |=0x80>>(x&7);
|
||||||
|
SDL_WM_SetIcon(Icone,Masque_icone);
|
||||||
|
}
|
||||||
|
}
|
||||||
SDL_EnableKeyRepeat(250, 32);
|
SDL_EnableKeyRepeat(250, 32);
|
||||||
SDL_EnableUNICODE(SDL_ENABLE);
|
SDL_EnableUNICODE(SDL_ENABLE);
|
||||||
|
|
||||||
|
|||||||
22
main.c
22
main.c
@ -37,6 +37,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL/SDL.h>
|
||||||
|
#include <SDL/SDL_image.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "pages.h"
|
#include "pages.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
@ -329,8 +330,25 @@ void Initialisation_du_programme(int argc,char * argv[])
|
|||||||
SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO);
|
SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO);
|
||||||
SDL_EnableKeyRepeat(250, 32);
|
SDL_EnableKeyRepeat(250, 32);
|
||||||
SDL_EnableUNICODE(SDL_ENABLE);
|
SDL_EnableUNICODE(SDL_ENABLE);
|
||||||
SDL_WM_SetCaption("GrafX2 beta "POURCENTAGE_VERSION" - USE AT YOUR OWN RISK","grafx2.gif");
|
SDL_WM_SetCaption("GrafX2 beta "POURCENTAGE_VERSION" - USE AT YOUR OWN RISK","GrafX2");
|
||||||
|
{
|
||||||
|
// Routine pour définir l'icone.
|
||||||
|
char Chemin_icone[256];
|
||||||
|
sprintf(Chemin_icone, "%s%s", Repertoire_du_programme, "gfx2.gif");
|
||||||
|
SDL_Surface * Icone = IMG_Load(Chemin_icone);
|
||||||
|
if (Icone)
|
||||||
|
{
|
||||||
|
byte *Masque_icone;
|
||||||
|
int x,y;
|
||||||
|
Masque_icone=malloc(128);
|
||||||
|
memset(Masque_icone,0,128);
|
||||||
|
for (y=0;y<32;y++)
|
||||||
|
for (x=0;x<32;x++)
|
||||||
|
if (((byte *)(Icone->pixels))[(y*32+x)] != 255)
|
||||||
|
Masque_icone[(y*32+x)/8] |=0x80>>(x&7);
|
||||||
|
SDL_WM_SetIcon(Icone,Masque_icone);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Texte
|
// Texte
|
||||||
Initialisation_Texte();
|
Initialisation_Texte();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user