99ce514ce8
Fix a case where the image could be in layer mode while the anim toolbar is visible. Note that from now on, if main and spare are single-image, changing the type of one will not change the type of the other.
Yves Rizoud
2012-03-15 19:51:19 +00:00
55f4884e34
Fix a few compilation warnings on Linux; Fix a possible bug in Mode5 loader; Removed a pair of debug printfs in realpath.c
Yves Rizoud
2012-03-14 19:17:35 +00:00
30e8079236
Fix crash when using Magnifier shortcut while the mouse is on a layer button (issue 480)
Yves Rizoud
2012-03-13 19:55:51 +00:00
be96447f3b
Anim: Improved support of extreme durations (O included to 655.350s included); Adding frames now inherits parent's duration cleanly; Default duration now 100ms (instead of 1ms). Removed blanks in Time window and made tooltips more explicit for next/prev frame, thanks to 00ai99 for reporting.
Yves Rizoud
2012-03-13 00:21:12 +00:00
8081c9527d
Quick fix for realpath needing PATH_MAX following Haiku patch.
Adrien Destugues
2012-03-12 21:26:13 +00:00
7d6d3ad875
Fix the Tilemap mode : When grid was visible, the copied tiles were erasing the grid. Now the grid is refreshed as needed.
Yves Rizoud
2012-03-11 17:41:52 +00:00
145c9545e7
Fix the 'FX' button that didn't refresh its state when swapping pages between an image with Tilemap ON (button should be highlighted) and an image with Tilemap OFF (button not highlighted)
Yves Rizoud
2012-03-11 16:50:28 +00:00
5af6f7bd4d
Fix crash of layer preview in some sizes, and removed overdraw
Yves Rizoud
2012-03-09 20:06:55 +00:00
747f9e8526
Fix most of issue 462 : Inconsistent directories in file selectors for image and brush.
Yves Rizoud
2012-03-09 01:18:23 +00:00
dcffab6c79
Fix layer preview : * Avoids running its own event loop and intercepting keyboard shortcuts * Show all the layers (lined up with the buttons) * Do not draw outside of screen when picture has strange dimensions.
Adrien Destugues
2012-03-08 18:56:39 +00:00
b435ff2582
Added minimal support of ANIM format as part of the LBM loader : The first frame can be read.
Yves Rizoud
2012-03-07 19:44:37 +00:00
341fa77a93
Fix the skin 'scenish' that was broken recently, and fix the new 'Fill' mouse cursor (Issue 457) in all skins to use the small version : the bigger one gets clipped as Grafx2 only uses 15x15 icons internallly.
Yves Rizoud
2012-03-07 19:30:58 +00:00
d34a2abc37
Added forgotten change of standard INI file, oops. This probably caused the settings for Tilemap mode to not be saved.
Yves Rizoud
2012-03-07 19:27:30 +00:00
af8316c279
* Second attempt at fixing #448. * Fix another bug with realpath in Haiku (relying on nonstandard behaviour)
Adrien Destugues
2012-03-06 21:05:54 +00:00
8852f59a95
Loading a GIF animation now shows first image instead of last image
Yves Rizoud
2012-03-04 17:26:48 +00:00
641be48aad
Removed last occurrence of 'NOLAYERS' and refreshed Makefile dependencies
Yves Rizoud
2012-03-04 17:10:26 +00:00
a292f4e356
Fileselector : Now only previews frame 1 of animations, instead of loading everything
Yves Rizoud
2012-03-04 17:03:46 +00:00
20055dca31
Fix loading of GIF animations that use the 'restore to BGcolor' disposal method.
Yves Rizoud
2012-03-04 16:53:40 +00:00
4386f8d679
Fix 'unselect' appearance of some anim buttons. Fix display of mouse cursor when opening windows 'Anim Time' and 'Layers'
Yves Rizoud
2012-03-04 15:57:39 +00:00
de6b3ac8d1
Toolbars now automatically switch to anim/layers when required
Yves Rizoud
2012-03-04 15:35:20 +00:00
e73eb2786a
Animation now has correct visual display and input feedback. Loading GIF guesses it's an anim if it loops, layers otherwise : Some rare non-looping GIF anims (usaully broken) will be misunderstood as layered. Editing of anims and layers seems flawless and stable. Still requires an auto-switch to the best toolbar (anim/layers) when relevant, but you can already switch manually.
Yves Rizoud
2012-03-02 23:19:47 +00:00
db50b4ebdc
More unification of layers and anim version: toolbars work. You can switch toolbars by right-clicking the icon from status bar: it proposes 'Anim' only while the current image has 1 layer (see Button_toggle_toolbar()). The animation-specific stuff (rendering...) isn't activated yet, see all the NOLAYERS places remaining. Also will need a trick for keyboard shortcuts to work on multiple buttons, and extra code on swap-to-spare, undo, redo, load etc. to sync toolbars with Image_type.
Yves Rizoud
2012-02-27 23:19:23 +00:00
2343dcb54c
Internal: Moved tooltips inside Buttons_pool, and Buttons_pool from globals.h to to windows.c/h for easier modification
Yves Rizoud
2012-02-27 01:36:40 +00:00
d38f5ee981
CPC mode 5 : replaced the global Constraint_mode by a state (Image_mode) in each versioned T_Page: This allows keeping it sane when swapping to Spare, and when Undo/Redoing. Also fixed the first page when program starts, it was unnecessarily allocating pointers for the maximum number of layers(16)/frames(999)
Yves Rizoud
2012-02-27 00:47:18 +00:00
55d0889bc8
Change rendering system to use function pointers, see Issue 31 c38 : preliminary work to make the same executable handle Layers or Anims. Fixed an old issue where Lasso-ing a brush with right mouse button wouldn't erase cleanly (visual). Fixed an old issue where picking colors in layer 5 would not 'see' through layers.
Yves Rizoud
2012-02-22 23:47:53 +00:00
8ea1ab7fc8
fixed makefile for macosx again
Franck Charlet
2012-02-20 19:56:52 +00:00
b92d66911f
Should fix#448: make sure we go to the main file directory when wqloading one at startup.
Adrien Destugues
2012-02-15 18:34:25 +00:00
f77f38e238
When running new version of Grafx2 for first time, new shortcuts take priority over user's. Useful for the space=pan (issue 233) that replaces default space=left-click. Also improved pan to display updated xy coords.
Yves Rizoud
2012-02-03 23:32:32 +00:00
cbcb7a6b8f
Issue 233: Added mouse panning. Default is 'space' for new users, others need pick a key in Help screen.
Yves Rizoud
2012-02-01 00:56:21 +00:00
46f2ec9475
Patch by Syllable software to complete Syllable support. Thanks!
Adrien Destugues
2012-01-15 13:52:31 +00:00
7137e1fc05
Strings with more than 24 chars were not properly null-terminated before sending them to Print_in_menu, causing random data to appear in the status bar since Print_in_menu will print more chars if there's space.
Adrien Destugues
2012-01-11 18:29:46 +00:00
941817b915
More fixes (still not ok...)
Adrien Destugues
2012-01-08 21:52:35 +00:00
44d8a23fbe
More improvements to the makefile to get everything in. But still not working...
Adrien Destugues
2012-01-08 21:49:26 +00:00
d74649ffbc
Make sure XOR helpers are shown even after drawing the first circle/ellipse Update helpfile credits.
Adrien Destugues
2012-01-08 21:16:46 +00:00
781cda3a47
Add a distinctive icon for the fill (and color replace) tool. Thanks to DawnBringer for icon drawing. All skins use the same icon, feel free to draw something else for them.
Adrien Destugues
2012-01-08 20:44:05 +00:00
5a8d016691
Fix Makefile for Mac OS X: * Switch to Mac OS X Lion (doesn't xhange much, if someone still wants to do a build on Tiger for PPC support it's easy) * Cleanup things that got messed up by the $(shell) changes * Add some comments that can be uncommented when building with MacPorts, instead of the more official OSX frameworks. This seems easier to setup, but does not provide portable binaries (the SDL framework can't be embedded in the app).
Adrien Destugues
2012-01-08 20:32:02 +00:00
bcb0b563ee
Add XOR-line helper when drawing circles and ellipses.
Adrien Destugues
2012-01-08 14:15:55 +00:00
cf617715d7
* Fix missing parenthses in function call (!). Still wondering why gcc compiled it... * Remove useless goto, code flow does what's needed already.
Adrien Destugues
2012-01-01 16:29:04 +00:00
dda62b043a
Fix some bugs with layer quick-preview: * Compute the height of the preview matching the image aspect ratio, to avoid relying on the menu being shown. Also put the preview above the menu, to not hide other buttons. * Exit the popup loop when a button is clicked. This works for show/hide, but not for selecting a layer ? I don't get why... Any idea ?
Adrien Destugues
2012-01-01 16:15:53 +00:00
6e8d18baed
Fix error in volume computation that led to weird results. Fixes all problems reported by DawnBringer :).
Adrien Destugues
2012-01-01 12:13:12 +00:00
1b805666e7
Add a quick-preview when hovering the layer buttons.
Adrien Destugues
2011-12-31 17:16:44 +00:00
9acd46841d
Allow up to 35x13 chars in verbose messages (including lua messages). Fixes#467.
Adrien Destugues
2011-12-31 13:43:19 +00:00
836c224169
Display font dropdown in skin menu with the selected font. Fixes#450.
Adrien Destugues
2011-12-31 13:27:17 +00:00
ee6ddf139b
* Fix issue with the color reduction: the node index was off by one, leading to a write out of the allocated memory, and, of course, strange crashes because of it. * Add some const in function parameters, just to make sure. * Cleanup the comments, because I got lost in my own code...
Adrien Destugues
2011-12-30 23:12:14 +00:00
179110bdc5
Fix build with gcc4 on Haiku.
Adrien Destugues
2011-12-04 10:34:05 +00:00
0236d5342a
Rework the color reduction algorithm: * Split clusters according to their volume (narrow covering) instead of occurence count. This ensures clusters representating a lot of colors are split; and a lot of pixels with near colors are grouped together, which is what we want for low-color work. * Rework memory management of clusters. Some of them were not malloc'ed but put on the stack, and then inserted in the list. Also avoid copying+deleting a cluster in CT_Get, return the original instead. * Use an union in the cluster struct to pack it a bit, since some data is used only in the color reduction phase, and some only in the palette lookup.
Adrien Destugues
2011-11-28 22:31:06 +00:00
dae1bc856b
Tilemap mode: Undo and Redo only refresh tilemap when image size changes. Lua scripts that change image size also refresh tilemap
Yves Rizoud
2011-11-26 14:46:09 +00:00
4813314638
* Remove debug output * Further optimization to the colortree, now allocated in one single chunk of 4090 bytes (2051 times better than original code!). Not doing all the malloc/frees should be slightly faster, and it also helps with cache locality (the whole tree can fit in the cache). * Remove the useless color "balancing" multipliers that did more harm than good.
Adrien Destugues
2011-11-23 21:26:43 +00:00
58e8194f40
Compilation fix for dependencies
Yves Rizoud
2011-11-23 19:05:12 +00:00
d3a107bb7c
Finished working on the new color lookup system. There is room for optimization and maybe bugfixing. The cluster table size is now: 511*15 = 7665bytes, this is 1094 times better than the color table.
Adrien Destugues
2011-11-22 21:38:03 +00:00
91e7d459a3
WIP on new color reduction data structures. The 8megabytes conversion table is replaced by an octree taking 10kbytes (800 times better !) The conversion is done with full 24bit precision instead of 19 bits (8 green, 6 red, 5 blue) previously.
Adrien Destugues
2011-11-21 21:56:07 +00:00
30edcddd07
Fix a color imprecision in the ILBM (IFF) loader. It has existed forever in the SDL port, though it was always better than the 6bit/channel of the DOS version.
Yves Rizoud
2011-11-16 23:01:19 +00:00
b448a600fc
Tilemap: helpfile, fix loss of mouse cursor when tile count window appears
Yves Rizoud
2011-11-13 23:49:31 +00:00
496148d485
Tilemap effect: Added a menu to set options. Options saved and reloaded in .INI. Added support for shortcuts (but no helpfile so far, so you can't set them)
Yves Rizoud
2011-11-13 23:21:59 +00:00
d60a4441d1
Max Grid size increased: from 80 to 999. Kudos to Robinson and X-Man for planning 15 years ahead and storing the settings as 16bit in the config file.
Yves Rizoud
2011-11-13 14:06:09 +00:00
1fd7b42fcc
Fixed Brush grab and Lasso grab tools to work with tilemap (when right-clicking to clear)
Yves Rizoud
2011-11-12 16:26:36 +00:00
eb4bab6d67
Fixed Fill tool to work with tilemap
Yves Rizoud
2011-11-12 16:10:59 +00:00
e7d37cf367
Tilemap: now separate for main and spare. Safeties added in most places necessary (auto-recompute tilemap after load, undo, etc)
Yves Rizoud
2011-11-11 22:57:35 +00:00
83fff59f66
Tilemap: waiting window during computation, shows tile count when done
Yves Rizoud
2011-11-11 17:23:26 +00:00
e9a2ad8e81
Tilemap: Support for x-flipped and xy-flipped (180°) tiles
Yves Rizoud
2011-11-11 15:39:23 +00:00
3b989f3eb3
Tilemap: support Y-flipped tiles
Yves Rizoud
2011-11-10 19:59:19 +00:00
914ec63c90
Compilation fix for GNU make v3.79 : "else ifeq" is only supported on v3.81+
Yves Rizoud
2011-11-09 19:57:39 +00:00
82860387bc
Added missing source file, and make the tilemap depend on current layer instead of the sum of layers
Yves Rizoud
2011-11-08 23:38:14 +00:00
ef030fec3f
Tilemap mode improved to analyze and detect identical tiles, so you write in real time on all occurences of same tile. Works very well but unfinished, will crash or have other problems when you resize image
Yves Rizoud
2011-11-08 23:11:18 +00:00
a60a33c204
Tilemap mode works, and it's faster than I thought possible.
Yves Rizoud
2011-11-07 00:06:17 +00:00
1b4b242a06
Split Display_paintbrush() in two: one function for preview, another function (Draw_paintbrush()) for image modification. Should be functionally identical, but code becomes simpler.
Yves Rizoud
2011-11-06 19:38:55 +00:00
f1f658ded4
Start of tilemap. Only a togglable effect
Yves Rizoud
2011-11-06 19:03:27 +00:00
59a20c6e3e
GIF format now saves pixel ratio in the Logical Screen Descriptor if you use tall or wide pixels. I know no viewer that respects it, so the only effect is that Grafx2 automatically switches to the right scaler when you reload the file.
Yves Rizoud
2011-10-31 19:45:57 +00:00
b232e51c4c
Added help entries for anim functions. Fixed a compilation warning and a wrong anim button refresh.
Yves Rizoud
2011-10-31 18:52:13 +00:00
51a9ad0132
Icon for effect '8-bit'. Added in all skins
Yves Rizoud
2011-10-25 22:15:14 +00:00
e9acd1e8e4
The scroll tool (adjust) now works in the 'nolayers' version
Yves Rizoud
2011-10-24 23:12:01 +00:00
8fb16e7089
Re-integrated anim in trunk, fixing the 999-layer limit at the same time
Yves Rizoud
2011-10-19 23:35:56 +00:00
775ee56ed0
Paste in Text tool: fix a graphic overflow. Palette reduce: use DawnBringer's formula for color likeness
Yves Rizoud
2011-10-01 19:26:13 +00:00
db3293060f
Clipboard paste: Support carriage returns and characters 128-255
Yves Rizoud
2011-09-27 00:03:16 +00:00
22d3f19df3
* Add lua stuff to write to spare page * Use it in Tiler to put the tilemap in the spare.
Adrien Destugues
2011-09-25 20:37:45 +00:00
6e30a87f4c
Some fixes to the Tiler script.
Adrien Destugues
2011-09-25 18:20:49 +00:00
da48c58445
* Sync Brush Factory documentation and sourcecode * Remove useless and undocumented function getbrushtransparentcolor (does the same as getbackcolor)
Adrien Destugues
2011-09-25 14:35:50 +00:00
87b7c45da4
Respect cursor position when pasting.
Adrien Destugues
2011-09-25 12:03:06 +00:00
d34c3d9df5
Clipboard paste support for Haiku.
Adrien Destugues
2011-09-25 11:48:37 +00:00
afa22ae0ac
Experimental "paste" support for text fields.
Adrien Destugues
2011-09-25 08:45:48 +00:00
4dc40e7784
Add lua getfilename function (that also returns the path).
Adrien Destugues
2011-09-24 13:38:54 +00:00
1d510d40bc
Remove unused vars. I think there are others since the IO_Context introduction ?
Adrien Destugues
2011-09-24 13:29:42 +00:00
a8f03cfb20
fix issue #435 : resizing not precise enough on small pictures/brushes.
Adrien Destugues
2011-09-24 13:15:25 +00:00
51c1a6de09
Add Tiler, a factory script that extracts (unique) tiles from spare to main page.
Adrien Destugues
2011-09-24 11:15:27 +00:00
66ff11b4f2
added extra step for Atari MiNT/TOS target (cross and native builds). Explicit program flags and stack setting.
nokturnal
2011-08-03 16:16:05 +00:00
8ba389e06b
Lua: matchcolor2() now takes an optional argument that is the weight of lightness in color proximity algorithm (instead of the 0.25 default).
Yves Rizoud
2011-07-18 23:08:33 +00:00
f2316f12e2
Lua: statusmessage() now clears remainder of line
Yves Rizoud
2011-07-16 19:15:08 +00:00
51ddfe4f86
Fix build on Windows ( $shell in makefile). Lua: waitinput now additionally returns mouse position in image coordinates
Yves Rizoud
2011-07-16 18:57:55 +00:00
6672966661
* Avoid crash when enabling mode 5 without enough layers (they are created) * Display error code to terminal when loading an image fails. Mainly for debugging purposes. * Use different error codes for different errors in ILBM loader.
Adrien Destugues
2011-07-12 19:31:48 +00:00
e875597964
Merge the "CPC Mode 5" branch to trunk. Note this alsoincludes the "oldies" branch.
Adrien Destugues
2011-06-19 20:15:22 +00:00
706049a2d9
Merge all changes from trunk in CPCMode5 branch.
Adrien Destugues
2011-06-19 18:30:53 +00:00
2d95dac3b0
Add a warning if the native fileselector isn't available.
Adrien Destugues
2011-06-18 16:08:40 +00:00
f53734636d
Use $(shell ...) instead of ... for calling the shell in variable configuration. Consequences : * This is a GNU Make extension, so it may not work with BSD Make and others * However, backticks relied on an sh shell, which may not be the case everywhere (AmigaOS comes to mind)
Adrien Destugues
2011-06-18 16:00:26 +00:00