From 77f3c5763e797a441d06ccecc84fed9cbf4beceb Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sun, 14 Sep 2008 00:11:55 +0000 Subject: [PATCH] Work on directory handling in save/load, Mingw support for the config utility, with a larger font I made some time ago (I hoped the e' would work for Be'zier curves, but no) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@144 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- cfg_new/8pxfont.png | Bin 0 -> 1776 bytes cfg_new/Makefile | 9 +++++++-- cfg_new/SFont.c | 1 + cfg_new/gfxcfg.c | 15 +++++++++------ files.c | 4 ++++ 5 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 cfg_new/8pxfont.png diff --git a/cfg_new/8pxfont.png b/cfg_new/8pxfont.png new file mode 100644 index 0000000000000000000000000000000000000000..76196a7bcf48a0112b429a5530d5e61e5a60f61d GIT binary patch literal 1776 zcmd5*ZBUa(5MGQ90s$gTMVTO}ML~=j0Tm^+FC{2ADKa*EX#~VrXbmPv28bRYCYC7S zV=zE;q9`~TYy^rprur686cAGs>qoE=P+E-;iV6zUx6l`V*Z;b?rER?$iU}g~M+s~$uRwS<53P6Df9zO&?NdRFso5^$CwCZ$xa_acgLXd+` z5Yy(vLb{|_tyVJLXf)zDuGj0eTCGZ@LI{aOB7s1_o2;kmyDL z96%4C1yBJXvJ3zL01tozzye?ZPyq-6tX3e)F&Y8KL9Yj`7E~%g2t*o$&vV92T$`z@WkherPl^lWAnL zaSS7Q*9e75sWeleNLH))Ivv+w@NaMTG@0lY%QQO#(5y73naMV?F&yLT_(F|Ps+1}+ z73yTQj;}Lt4ekEzCQp-vZkdh-f=074nPxWIh+#ONuM-M2QmIm*$W*J7$#*swxb5x! zCX=VdLjM3y<}e805Fj7`5uhaiC%{ZX^#Rcg#3>*S0FeL$1_bj1{zt+;n!)%_^pAz( zr$+14mNUve4Z5$A7!L@Wr7;c3Je>g3MEI+?-Y9?}VbKy85J3lw><5Ir5yB9PK}dp- z0wE1TdW4!0x{r_rA%g5A0J@0n-5?>GIe#N>H@UZygvO=;IJittn|n{PN#ZDFVcZ~o za_&$}cZr!jn?F8P)FW(l8O=qW&a%4m9JgC8{$ICZJJDmm6oENZx>Olt&zoJm4l;!jUM;ru;W~p_3ND) zF zBJ)3-vdaGK>EV#-=Uzj~k*GBRgUmw#iuB_i4R<*5?a`^v@!Ly%UI&J}SRws2+fVFX zl$#yfq|NE9%AdMrcIxtSAj-C1JF#M}Z5b^7SD^>H0Ow5-RD;}g)W})NOCgr?nLUzFDq=%ZSC&#GCq9;&MlAEj>v!T z?nIU~4lO0Pbo74ke!;Dxz}}njnT?S)@;`Q}pIDlO9XER0s@5g1Ja{5}EI|BBb#-#{ zf|8r{4&$0NReqYm4b54lbRQeK(;DTHs0LGXc8HIw?|G`KRUAh1$!ZOo^#7zQCgl}7 zKIz@Yj61EzChFWpA<@@86Rn2IP4zkVg6tj@IQg223o6!mUl!$!Cz_)tB>0)5zc|TX zl@Z(A8yepiQl>7`vg&J+hpcO7Tv%PW$X-0_{mY<4uHTb^)k6hg)k#s+wP}yz-&4lA zPV3)rd=F(~r)(ZA`AxP%lVx1jQz7BbUmo6(=Yx$?a!S*C0)&;wHF3Z_uY763>p+D1 zobPL1AH?Q*So7Y%vG!8c;?7%b={49BD zIJ522HAh{eA*n4VXQrk5(hDb#9^zb8(SGOQDQv1R1MhclYIB~O>^k##$?so~-xk6` L!nrkHB^>-0Kb9e; literal 0 HcmV?d00001 diff --git a/cfg_new/Makefile b/cfg_new/Makefile index b2670fd6..d5607500 100644 --- a/cfg_new/Makefile +++ b/cfg_new/Makefile @@ -1,11 +1,16 @@ +ifdef COMSPEC +COPT = -Wall -O -g -ggdb -Dmain=SDL_main +LOPT = `sdl-config --libs` -lSDL_image -g +else COPT = -c `sdl-config --cflags` -Wall -g LOPT = `sdl-config --libs` -lSDL_image -lSDL_gfx -g +endif gfxcfg: gfxcfg.o SFont.o gcc gfxcfg.o SFont.o -o gfxcfg $(LOPT) gfxcfg.o: gfxcfg.c SFont.h scancodes.h - gcc gfxcfg.c -o gfxcfg.o $(COPT) + gcc -c gfxcfg.c -o gfxcfg.o $(COPT) SFont.o: SFont.h SFont.c - gcc SFont.c -o SFont.o $(COPT) + gcc -c SFont.c -o SFont.o $(COPT) diff --git a/cfg_new/SFont.c b/cfg_new/SFont.c index 2afa9364..e8de407e 100644 --- a/cfg_new/SFont.c +++ b/cfg_new/SFont.c @@ -25,6 +25,7 @@ karlb@gmx.net */ #include +#include #include #include diff --git a/cfg_new/gfxcfg.c b/cfg_new/gfxcfg.c index 530f7760..00080288 100644 --- a/cfg_new/gfxcfg.c +++ b/cfg_new/gfxcfg.c @@ -1,5 +1,7 @@ //C #include +#include +#include //POSIX #include @@ -7,7 +9,8 @@ //SDL #include #include -#include +#include +//#include //mine #include "SFont.h" @@ -403,11 +406,11 @@ bool Initialiser_config() "Allows you to replace all the pixels of the color pointed by the mouse with", "the fore-color or the back-color.", true,0x0121); /*Shift + F*/ - Definir_option(31,"B‚zier""s curves", + Definir_option(31,"Bézier""s curves", "Allows you to draw B‚zier""s curves.", "", true,0x0017); /*I*/ - Definir_option(32,"B‚zier""s curve with 3 or 4 points", + Definir_option(32,"Bézier""s curve with 3 or 4 points", "Allows you to choose whether you want to draw B‚zier""s curves with 3 or 4", "points.", true,0x0117); /*Shift + I*/ @@ -754,7 +757,7 @@ bool Initialiser_config() Definir_option(112,"Center brush attachment point", "Set the attachement of the user-defined brush to its center.", "", - true,0x028F); /*Ctrl + 5 (pav‚ num‚rique)*/ + true,0x028F); /*Ctrl + 5 (pavé numérique)*/ Definir_option(113,"Top-left brush attachment point", "Set the attachement of the user-defined brush to its top-left corner.", "", @@ -1121,7 +1124,7 @@ void Enregistrer_config() /*** Main program ***/ -int main(void) +int main(int argc, char * argv[]) { if (Verifier_ecriture_possible()) @@ -1132,7 +1135,7 @@ int main(void) SDL_WM_SetCaption ("Grafx2 configuration tool","../gfx2.gif"); /* On initialise SFont */ - MyFont = SFont_InitFont(IMG_Load("5pxtinyfont.png")); + MyFont = SFont_InitFont(IMG_Load("8pxfont.png")); Dessiner_ecran_principal(); diff --git a/files.c b/files.c index 9872e15c..c8711554 100644 --- a/files.c +++ b/files.c @@ -168,6 +168,10 @@ void Ajouter_element_a_la_liste(struct dirent* Enreg) Element_temporaire->Type = (Enreg->d_type == DT_DIR); #elif __WATCOMC__ Element_temporaire->Type = (Enreg->d_attr & _A_SUBDIR); + #else + struct stat Infos_enreg; + stat(Enreg->d_name,&Infos_enreg); + Element_temporaire->Type = S_ISDIR(Infos_enreg.st_mode); #endif Element_temporaire->Suivant =Liste_du_fileselect;