47 Commits

Author SHA1 Message Date
Yves Rizoud
ff27c5dcf9 BIG change in directory handling:
- Unix users can "make install" and "make uninstall" (as root).
- Installation creates shortcuts "grafx2" and "gfx2cfg" in /usr/local/bin
- Installation puts data files (icon GIFs, gfx2.dat,..) and the actual binaries in /usr/local/share/grafx2
- At runtime, the programs search and create configuration files (gfx2.cfg and gfx2.ini) in ~/.grafx2
(But if there are some present in program's own directory, they override)
- Uninstall removes programs and data, but leaves all users' configurations.

Win32: User's config directory is %APPDATA%\GrafX2
Win98: %APPDATA% is not set by default, so the program falls back to executable's directory.

Tested on Debian Linux
Partially tested on Win XP (early version)
Tested on Win98


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@365 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-28 23:50:28 +00:00
Yves Rizoud
3d4def25f0 More Haiku fixes (gcc v2 support, actually)cf. Issue 61
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@364 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-26 21:56:36 +00:00
Yves Rizoud
b49cbc3acf 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
2008-11-18 22:53:28 +00:00
Yves Rizoud
6e7fa8690c Icon: gfx2.ico now contains 2 more versions, re-pixelled in 16x16 and 48x48
(win32): When compiled, the icon is embedded in executable.

Tested on win98 and linux.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@354 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-18 20:39:34 +00:00
Yves Rizoud
c4f6cf7762 Changed a lot of platform-specific code to "simplify" it:
A Unix-like system is now considered the default.
The number of platform-specific blocks is down to:
   win32: 13, watcomc: 3, linux: 4, macosx: 16, amigaos4: 8, beos/haiku: 1
Removed linux.c, implemented the relevant functions for all platforms.
(win32) In Stats screen, included free memory report
(macosx) Conversion_ANSI: Fixed the __macosx__ with wrong case from my former 'fix', sorry.
(macosx) readline.c : Removed a manual "Update_necessaire=1", because normally
all calls to UpdateRect() will set this flag already. Don't hesitate to call 
Flush_Update() anywhere where it's lacking, but you shouldn't put it inside a  #ifdef __macosx__
(win32) Packaging: 'make ziprelease' now includes libpng13.dll and zlib1.dll
(win32) Hacked something to resolve naming conflict of MOD_SHIFT constants with windows.h
(all) Resolution: Fixed the black space that appeared between button and label,
the memory overwrite also caused resolutions above number 2 to disappear from list.
 
Tested fine on Linux (without TTF) and Windows


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@345 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 16:25:37 +00:00
Adrien Destugues
d5143b5f82 Implemented font listing under linux in a quite hacky way. The directory list returned by XGetFontPath is not really usable, there are some path with appended :unscaled for non-ttf fonts, so i needed to add some null-pointer check to for_each_file after the opendir to avoid a crash. I think most of my ttf fonts gets listed, but at a quick glance i find some duplicates and the list is not alphabetically sorted. That would be a great improvement (sort and remove duplicates).
Also renamed Mask to Mask_table because XLib.h already defines some var called Mask.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@337 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-13 20:20:47 +00:00
Yves Rizoud
83bfd14393 Text: Help screen (F1), and font detection by file extension (unknown files are ignored)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@329 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-06 23:37:24 +00:00
Adrien Destugues
746b000d06 small fix to the beos/haiku compile options. still crash ...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@328 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-06 16:31:20 +00:00
Adrien Destugues
3422eeff46 Patch from begasus to allow building under haiku and beos. The program is crashing when you launch it (segmentation violation).
I'm not sure the way to get the program directory we use is ok for beos, but the official way of doing that is using C++ code.
Maybe it's time to switch to some more unix way to store the config files...

This should also fix watcom build (very untested as i'm using mingw to cross compile windows builds now)
Also added begasus to the credits screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@325 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-05 18:59:55 +00:00
Yves Rizoud
bd23cc6f76 Text with SFont, unfinished. Also merged in some Makefile tweaks by xeron
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@318 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-29 20:04:25 +00:00
Yves Rizoud
c28a01522a (linux) Makefile: fixed dependencies checking
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@307 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-25 13:15:26 +00:00
Yves Rizoud
f2b551a3da Makefile: version.o in right directory now, ziprelease now adds -nottf to
archive names if TrueType support was disabled. Otherwise, the 435Kb DLLs are 
included in the win32 archive. The sample font is archived, too.

TODO: texte.c should expose a public function that reports if texte.o was
compiled with TTF off. This way, the stats screen can display the information.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@306 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 23:10:59 +00:00
Yves Rizoud
45f1dfeb7b TEXT Tool, first work-in-progress commit.
Truetype only, compile with "make NOTTF=1" if you don't want to bother with it.
Only TTF is done, aliased (ok) and non-aliased (backgound color is
currently stuck to color index 0)
The Clear button doesn't update the window.
Only one font (certified to be public domain).
Preview not done.
Font selector not done.
SFont support not done.
Limit 30 characters.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@305 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 22:13:53 +00:00
Adrien Destugues
a327f92805 New makefile including os4 build. Thanks xeron ! :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@303 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 07:57:55 +00:00
Adrien Destugues
fc41bbe89d Implemented palette sorting. There are problems as we're sortig with HSL color system and the rgb2hl function doesn't return s... we'll have to add that as we can't say if we're looking at red or grey (both have H=0).
Also, there is a problem with the makefile under linux. The .dep is set for checking the .o in the win32 folder. It still works but recompiles everything at each change.

Also added a button to enable HSL color editing in the palette screen. We'll need a hls2rgb function, and some other tweaks and reworks to the palette screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@290 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-19 18:52:10 +00:00
Yves Rizoud
4a3b324a52 Compilation: .o files in a subdirectory of obj/
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@289 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-18 21:55:30 +00:00
Yves Rizoud
b488ec9272 Fixed stricter compilation warnings, deleted unused asm code
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@288 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-18 19:23:35 +00:00
Yves Rizoud
a2d3374c9c The SVN revision used to compile is now reported in the Statistics window.
Needs testing on linux, including the cross-compilation. Pkm, see if the
naming scheme suits you.

HOWTO: "make version" and "make ziprelease" both force an update of version.c,
by querying the directory's svn status. Developers can use "make version" for
their own usage. Do not upload your version.c in svn, it's a generated file.
PACKAGING: version.c must be included in source packages, so that
non-developpers who have no svn can build with the constant file that shipped
with the sources.
Commit any pending changes first, then make ziprelease, and run
grafx2 to check that the Statistics window shows something like "123",
not "123M" (which means "rev123 + local modifications")
This will have created the src and win32 packages.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@274 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-17 00:02:33 +00:00
Adrien Destugues
c4be0a319a Updated the makefile for proper cross building
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@244 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-13 18:16:09 +00:00
Adrien Destugues
1af06aec53 moved cfg folder to oldfiles dir
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@238 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 18:07:48 +00:00
Yves Rizoud
e91ef156b1 Makefile fixes
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@236 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 14:29:27 +00:00
Adrien Destugues
2bf228cc6c Fixups for building under linux...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@235 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 11:07:27 +00:00
Yves Rizoud
35e9c2ee10 In 'Make ziprelease', added missing font, plus sources to conform GPL.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@232 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 01:34:22 +00:00
Yves Rizoud
f293fd4694 Default config is set when gfx2.cfg is missing or corrupt
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@231 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-12 01:23:13 +00:00
Yves Rizoud
f4ec27a25f Config sources are now in main directory
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@230 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-11 19:21:28 +00:00
Yves Rizoud
5fd1e42ea0 Copyright notices in source files
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@217 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-08 19:40:47 +00:00
Adrien Destugues
c33dd599cd We still need the cfg file in the releases
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@214 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 19:05:09 +00:00
Adrien Destugues
b01b598141 ini and cfg files are not needed and will be regenerated from default settings on load
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@208 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-07 14:58:03 +00:00
Adrien Destugues
710c08e158 Some corrections. Take care of adding sdl.dll to the zip.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@185 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 16:37:54 +00:00
Adrien Destugues
d5cdb4dcf0 Some modifications to the makefile to enable cross compiling a windows binary from linux. Also added a way to create a .zip ready for upload on the website.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@184 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 16:29:30 +00:00
Adrien Destugues
92c4340dbd Video modes can now be windowed or fullscreen. Quite hacky, however. We would need a way to :
-Easily change the number of video modes in the list (i'd like to use my 1440x900 screen at full resoluution !)
-Maybe add a resizeable window mode, but that would require more work, so i'd like to keep that for 2.0 .

In the meantime, i've made the list symetric, ie, mode are loaded from the cfg file and when the list is processed, each mode is copied to a fullscreen equivalent. Note this way of doing things will prevent the config file to save the selected video mode properly, so the program will switch to the default 800x600 windowed. When you load an image, Grafx2 will switch back to windowed mode when selecting the appropriate resolution for that image.

The NB_MODES_VIDEO constant is also only the HALF of the actually available video modes


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@183 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 15:12:40 +00:00
Yves Rizoud
cd6b94f594 'make zip' now archives 'new_cfg' too
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@182 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-30 02:32:33 +00:00
Yves Rizoud
acfe5836ce Grafx2 can now read and convert gfx2.cfg from the original DOS (96.5%) format.
Older .cfg files in svn were saved incorrectly: the wrong size of chunk #5
(0x0101 instead of 0xE1) made it impossible to re-read the file in gfxcfg.

gfxcfg can read and save gfx2.cfg. Upward compatibility is provided:
- If new chunk types are added to the format, it only needs a re-compile. Older
files can be read and saved.
- If new keyboard shortcuts are added (134 currently), the older files can be
read and the default shortcut will be used for missing keys.

Fixed many endianness cases, hopefully
Fixed LBM loading : bug in ASM->C conversion of Couleur_ILBM_line()
Broke PCX loading : argh!


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@176 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-29 23:15:08 +00:00
Yves Rizoud
73ca66c084 Keyboard: Converted hardware scancodes to SDL keysyms.
Version becomes 97.0%, Charger_CFG() auto-converts 96.5% format as needed.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@169 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-26 23:08:21 +00:00
Yves Rizoud
8c9f66625d Makefile: "zip" target to create a .tgz source archive. Docs: added GPL license.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@167 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-25 19:13:01 +00:00
Yves Rizoud
37ca8d13aa More work on endianness,
fixed the save/load box to display names in 8+3 format,
files can now be loaded in command-line.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@142 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-13 20:05:16 +00:00
Yves Rizoud
3894c39631 Updated makefile for MingW support, fixed some strict compilation warnings.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@133 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-11 23:40:06 +00:00
Adrien Destugues
cd2af629d4 Builds chade.o and link it.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@132 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-09-11 12:36:05 +00:00
Adrien Destugues
216ea8c9c2 pi1 and paletized pcx loading works. Saving untested, truecolor pcx still broken (but does not crash and preview seems ok ?!)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@109 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-08-10 10:25:29 +00:00
Adrien Destugues
ce4f050709 Removed some accents in two filenames to avoid problems with some locale settings when doing a checkout
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@96 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-08-09 15:36:49 +00:00
Adrien Destugues
e2a92f8b69 Made some corrections to the makefile to make it build under linux again :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@67 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-07-28 12:02:39 +00:00
Adrien Destugues
6233c24a9d More work on screen updates : handling of cursor display (but not erasing :(), and update of the menu buttons. Also, big speedup on text drawing.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@59 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-07-24 10:13:46 +00:00
Adrien Destugues
272506e850 Fixed all warnings, some little bugs, and improved compatibility with >1GB RAM
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@54 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-07-21 12:47:32 +00:00
Adrien Destugues
7240396ae6 Mouse input is now fully working (we can even release a mouse button :) quite useful :))
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@52 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-04-05 11:54:10 +00:00
Adrien Destugues
50d60aa753 Correction de nombreux bugs dans la gestionde la souris et du clavier
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@51 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-04-05 09:48:19 +00:00
Adrien Destugues
86edb4d1fb Correction de quelaues bugs: attente fin clic, sauvegarde sous nux, désactivation de distcc ds le makefile, début de gestion clavier (pas encore ascii mais bas niveau)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@48 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-03-31 12:00:21 +00:00
Adrien Destugues
ac387ca2ff Encore du nettoyage
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@31 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2007-10-31 18:13:12 +00:00