68 Commits

Author SHA1 Message Date
Adrien Destugues
bdf86b06a8 More joystick fixes and some patches to the makefile (we need a different name for the strip binary when cross compiling). Please update your platform with new STRIP = strip line ...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@464 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-05 22:23:57 +00:00
Adrien Destugues
132eabcde5 Some work on a port for the gp2x. Runs up to the splashscreen, but as there is no mouse i have to make the program usable with a joystick.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@462 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-05 21:12:46 +00:00
Adrien Destugues
806e491650 Little fix for AROS linking
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@459 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-05 15:32:29 +00:00
Adrien Destugues
2c8fe249e6 Adds a listing of all the mountpoints under linux. I used a piece of code from gnulib, but i'm not sure it's a very good idea. It works for me and should be easy to adapt for many other platforms. This may need some tweaking to work also under beos and skyos (and possibly other unix-like), but if not done, the function will be compiled empty and will not harm anyone.
Also, cleans some warnings that occurs with -pedantic -c99 options to gcc, and some little things pointed by splint.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@458 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-05 15:26:59 +00:00
Adrien Destugues
5971f4c9e3 MorphOS port, and some tweaks to the config tool to make it look a little bit less ugly. We should probably use a better color palette for it anyways.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@456 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-01-04 20:41:22 +00:00
Pete Gordon
0b7b96ae75 Enabled TTF fonts in OS4 build, scans system default directory for TTF
files.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@450 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-31 21:36:47 +00:00
Adrien Destugues
0c8bd5e0d4 Fixes the makefile.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@440 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-29 18:02:04 +00:00
Adrien Destugues
0eb18b7619 SkyOS port. Thanks again Begasus :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@437 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-29 17:48:02 +00:00
Adrien Destugues
30184d82e9 Some more fixes for AROS build.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@436 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-29 17:15:56 +00:00
Adrien Destugues
9bc64e8adb Fixes the crash with the gradrect. But there are still some screen corruption (and missing lines) problems...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@429 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-27 17:25:20 +00:00
Adrien Destugues
63d595a3ed No longer include dll in non-windows release archives
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@428 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-27 15:13:34 +00:00
Adrien Destugues
79aca71830 Fixes issue #78 and some more makefile tuning (ziprelease names the archives according to the platform)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@427 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-27 15:10:35 +00:00
Adrien Destugues
f180b13f29 Makefile tuning for beos
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@424 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-27 14:17:25 +00:00
Adrien Destugues
321187693c Fixes realpath for beos uses. As beos also misses fchdir...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@423 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-27 13:57:53 +00:00
Adrien Destugues
77f745e1f0 Oops, i messed up some little things there :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@422 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-27 11:46:10 +00:00
Adrien Destugues
e2fe9dcd79 Added some pathes for AROS operating system. We need someone to test it out now :)
Also, there is a realpath implementation there wich may be useful for BeOS too


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@421 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-27 11:43:03 +00:00
Adrien Destugues
c004c90d90 Splitted graph.c in multiple files. Compiles but there is a lot of warnings about declarations. I'm cleaning it up but i wanted to commit that before starting to get conflicts
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@395 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-16 22:02:22 +00:00
Yves Rizoud
d4dcf44f7c Support for "wide pixel" mode (Each pixel is 2x1). Run the program with "/wide" argument to test.
Now you can draw graphics for Amstrad CPC's "mode 0" :)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@385 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-15 21:00:18 +00:00
Yves Rizoud
d2300cc2c1 Support for "tall pixel" mode (Each pixel is 1x2). Run the program with "/tall" argument to test.
The following tools don't take the ratio into account;
Circle,
Grad rectangle,
Brush rotation,
Resizable brushes (diamond, squares, circles...)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@376 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-13 16:20:37 +00:00
Yves Rizoud
14accb544b Palette now uses RGB components in the full 0-255 range instead of 0-63.
All palette functions can be used in HSL color space too (multi-select, etc).
Fixed some more missing refreshes in Palette screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@368 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-12-03 01:03:32 +00:00
Yves Rizoud
6413bdc474 Upload of the Win32 icons and DLLs
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@366 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-29 00:49:06 +00:00
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