889 Commits

Author SHA1 Message Date
Yves Rizoud
c150be2664 [layers] merged in the recent changes from trunk
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1162 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-10 20:35:09 +00:00
Adrien Destugues
e6e698c2bd Added vim modelines to all files.
Set them to 2-space indent, I hope this is ok.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1161 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-10 20:08:11 +00:00
Adrien Destugues
2239adbd58 Free memory properly when saving a cpc .scr.
Also allow to save a brush in this format (in "screen" mode).


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1160 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-08 13:22:00 +00:00
Yves Rizoud
45f04503c6 Fix libraw2crtc for compiling on strict C99
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1159 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-07 21:29:20 +00:00
Adrien Destugues
74f723c3b0 Added save function for amstrad cpc scr images. No load available yet, and the code was pretty quickly hacked. Thanks to CloudStrife for providing libraw2crtc.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1158 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-07 16:45:22 +00:00
Adrien Destugues
98306a8f21 Linking with -lm is needed on linux to support bold, an experimental linker from the binutils.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1154 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-06 16:22:38 +00:00
Adrien Destugues
045d8714ad Removed leftover debug.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1150 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-04 18:58:09 +00:00
Adrien Destugues
1141b0ac20 No longer crash when switching to spare (introduced by recent zoom to cursor change)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1146 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-03 22:40:46 +00:00
Adrien Destugues
b6d6fe19b6 Add option to show the grid in grid menu (not only snapping)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1144 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-02 20:15:23 +00:00
Adrien Destugues
2ba2b314d5 Fix build.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1143 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-02 20:01:40 +00:00
Adrien Destugues
db8111373d English comments and notes.
I found some more possible improvements for performance...


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1142 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-02 19:27:12 +00:00
Yves Rizoud
110a7bdd58 [layers] continuted work on no-layer option. No more crash.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1141 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-02 00:10:59 +00:00
Yves Rizoud
3ede1f3a56 [layers] NOLAYERS option at compile time. Unfinished.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1140 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 23:22:43 +00:00
Adrien Destugues
7efea41231 Be more subtle: load immediately if the user pressed enter.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1139 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 22:05:08 +00:00
Adrien Destugues
d41b612931 File selector no longer exits event loop when you enter a filename and exit the textfield.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1138 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 22:00:14 +00:00
Adrien Destugues
1406e74f56 Load and save palettes using JASC "standard" format. Still load old palettes from DOS Grafx2, but now we handle full color :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1137 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 21:55:54 +00:00
Adrien Destugues
a725f0035e Use an int to compute the zoom to cursor instead of a short for better precision and more security (using a short could lead to overflows on big screens/pictures). However there is still a drift, if you zoom in/out a lot of times without moving the mouse you'll notice that the zoom window moves to the down/right corner of the picture. Might be because of the truncate done on the fixed point calculations, but i'm not sure...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1136 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 21:20:42 +00:00
Adrien Destugues
5e3f845176 Center zoom to cursor. May be improved. Testing and reports welcome.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1135 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 19:31:14 +00:00
Yves Rizoud
119e679e32 [layers] Adapted lua bindings to draw/read in current layer (untested)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1134 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 14:31:36 +00:00
Yves Rizoud
fffb90dfaf Proper word-wrapping in Verbose_error_message() box.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1133 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 14:28:48 +00:00
Yves Rizoud
ad4b417afb [layers] Merged changes from trunk (up-to-date now)
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1132 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 01:18:29 +00:00
Yves Rizoud
f38fd068a2 [layers] Merged changes from trunk
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1131 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 01:05:21 +00:00
Yves Rizoud
373e39abe8 Fix a mouse cursor that appeared on palette screen when opening palette
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1130 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-11-01 00:17:48 +00:00
Yves Rizoud
1582d9e6d9 Contextual help for skin window
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1129 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 23:57:32 +00:00
Yves Rizoud
1f7da7c525 Removed deprecated settings 'Mouse correction factor' (issue 23)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1128 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 23:32:32 +00:00
Yves Rizoud
b2feccc039 Restored changes in main() that I overwrote in merge
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1127 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 18:11:13 +00:00
Adrien Destugues
ba36fa675f -Moved test script to "scripts" directory
-Allow to add other scripts to this dir and run them too.
--Cette ligne, et les suivantes ci-dessous, seront ignorées--

A    trunk/scripts
A  + trunk/scripts/test.lua
D    trunk/test.lua
M    trunk/buttons.c
M    trunk/factory.c


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1125 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 17:33:04 +00:00
Yves Rizoud
b021a52fc3 Skins: Fix preview area after loading invalid file
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1124 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 17:16:48 +00:00
Yves Rizoud
e7f34fefe4 Skin preview previews gui colors
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1123 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 17:07:56 +00:00
Adrien Destugues
fb3404e2ba Partial patch to allow loading spare page from command line.
It's not working yet but does not introduce regressions instead.
Cleaned up version of patch proposed on the issue tracker.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1122 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 16:42:08 +00:00
Yves Rizoud
036d8008cb (internal) Skins have their own GUI color indices : avoids sharing/restoring MC_ colors
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1121 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 15:46:07 +00:00
Adrien Destugues
1a2ac678e0 Splitted loadsave.c :
- loadsave.c : common things
- fileformats.c : format that make a full backup of any picture without palette loss
- miscfileformats.c : formats that are not saving all the picture (palette only, pixels only, constrained palette)

I was not very precise in the splitting and we may rethink the flags that mark if a picture is fully saved or not... it was not updated after we decided to allow the full palette range 0.255 instead of 0.63, so most of the atari format were marked as saving everything.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1120 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 15:20:44 +00:00
Yves Rizoud
7105566433 Compilation fixes: A typo, and a cast double->int
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1119 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 13:50:55 +00:00
Adrien Destugues
8114cae1e9 Added (r,g,b)=getcolor(c) to lua binding.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1118 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 13:01:56 +00:00
Adrien Destugues
49cce9643e Load the favorite colors from the skin, not the ini file. We may want to override them, but for now just change the skin's palette.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1116 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 12:10:07 +00:00
Adrien Destugues
2b02ff505f Moved skin preview to the Gfx struct so it is not overwritten if you cancel skin loading.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1115 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 11:19:44 +00:00
Adrien Destugues
a2fd796e59 Proper remapping on skin change in (almost) all cases. I commit this before breaking everything trying to fix the remaining issue...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1114 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 10:44:09 +00:00
Adrien Destugues
f9dc259af5 -Update Doxyfile for newer doxygen version
-Fix some problems with doxygen comments
-Regenerate doxygen documentation


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1111 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-31 09:36:35 +00:00
Adrien Destugues
d4b730cb4d Remap the preview of the skin and use the old colors to draw the list in order to keep the skin changer looking good even if skins use different MC_ indexes.
Thingsd are still messed up after loading a skin but I can't find out why this happens and remap does not seem to help.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1110 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 21:56:56 +00:00
Adrien Destugues
b2a32b93c6 Added version of the classic skin with remapped colors for testing the skin switcher
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1109 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 19:23:24 +00:00
Adrien Destugues
0661e59e1c Preview skins.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1108 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 16:58:37 +00:00
Adrien Destugues
f4defe7e75 Moved "show limits" and "separate colors" to skin dialog
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1107 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 15:19:59 +00:00
Adrien Destugues
7af6b92e3e Reset quicksearch when entering a directory.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1106 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 11:51:07 +00:00
Adrien Destugues
56a4c704fe Added lua binding to select the color brush.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1104 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 10:45:52 +00:00
Adrien Destugues
9b45134596 Apply patch from issue 223 and some more tweaks as later suggested in the comments.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1103 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-30 10:26:44 +00:00
Yves Rizoud
0ae98c2e56 Makefile fixes for lua packaging
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1102 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-29 23:35:59 +00:00
Yves Rizoud
0694f69c9c trunk: Lua binding works on Windows.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1101 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-29 22:50:34 +00:00
Adrien Destugues
b0aa1dcbab Added Ok and Cancel buttons in value requester. Don't do anything in palette screen if user enters strange value, not even a reduction to 256 as this drops unused colors.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1100 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-29 22:05:14 +00:00
Adrien Destugues
2a67c9bdce Refactored (yes, already) the lua API to allow also generating pictures directly.
Updated doc, and added sample script.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1099 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-29 17:27:49 +00:00
Adrien Destugues
06892015ea added lua binding to set a color in the palette
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1097 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2009-10-29 15:52:21 +00:00