1. 14 Dec, 2019 1 commit
    • ROOL's avatar
      Fix for camera and scissor tool in 'export' mode · 05b310f2
      ROOL authored
        * If the source sprite has an old-style bit mask, solid pixels in the exported sprite's mask may have a different value to the source sprite's. For example 0xFF -> 0xFC.
        * The OS seems to render such intermediate mask values inconsistently.
        Applicable GCOL commands have now replaced with OS_SetColour calls (taken from another fix elsewhere in the code that dates back to Acorn).
        See also https://www.riscosopen.org/forum/forums/4/topics/14698
        Submission for the Paint bounty.
      Version 2.29. Tagged as 'Paint-2_29'
  2. 26 Sep, 2019 2 commits
    • ROOL's avatar
      Fix to artist friendly remapping · e137ee5d
      ROOL authored
        Remapping would never occur if the confirmation box was disabled.
        Submission for the Paint bounty.
      Version 2.28. Not tagged
    • ROOL's avatar
      Colour handling fixes · b886fe56
      ROOL authored
        * Menus rearranged so "Advanced" is renamed "Palette options"; "Extra click for input focus" moved to the Paint menu.
        * The "Highlight background colour" menu option has been removed to simplify the interface.
        * To address all the differences of opinion around the artist-friendly palette arrangement, the default behaviour is to not show the confirmation dialogue box plus a further menu option "Rearrange user palettes" (ticked by default).
          If the latter's unticked, the remapping to artist-friendly (upon Edit palette) will never take place; if it's ticked, the remapping will always take place except when the confirmation box is enabled and the user clicks Default.
        * Greyed out palette options when there's not a full/default 256-colour palette, as appropriate.
        * Help text updated to reflect these changes.
        Submission for the Paint bounty.
      Version 2.28. Tagged as 'Paint-2_28'
  3. 22 Sep, 2019 1 commit
    • ROOL's avatar
      Zoom resize, focus, and keyboard shortcuts · 6a84fc4e
      ROOL authored
        * Sprite editor windows gain input focus on first click (there's an option to disable this behaviour too)
        * Zoom with Ctrl+resize window (in addition to Ctrl+Scrollwheel already implemented)
        * Key shortcuts in Sprite editor windows
        Submission for the Paint bounty.
      Version 2.27. Tagged as 'Paint-2_27'
  4. 25 Aug, 2019 1 commit
    • ROOL's avatar
      Colour handling enhancements · 18f461a5
      ROOL authored
        * Artist friendly colour ordering of 256 colour palette, and option to reorder pixel data for the remapped palette
        * Full 256 colour sprites can be created (as well as 64/16 entry VIDC compatible ones)
        * Colour indicator swatch in the bottom left corner of the sprite window
        * Adjust click on colours to paint with background colour
        * Shift-select as a shortcut to Paint > Select colour
        * Shift-adjust ditto for background colour
        Submission for the Paint bounty.
      Version 2.26. Tagged as 'Paint-2_26'
  5. 17 Aug, 2019 1 commit
    • ROOL's avatar
      Tool idle event and trace bug fixes · eff0967c
      ROOL authored
      Long standing disable of idle events when they are needed. Steps to recreate:
      * Create a sprite with a palette
      * Paint a little with any brush tool
      * Go to Paint > Edit palette to open the colour picker (ensuring that the menu tree, the mouse, and the colour picker are within the bounds of the sprite view being painted)
      * Collapse the menu tree and carry on painting with the brush tool
      The brush tool now only produces output on click, not drag. This is because the idle events are no longer enabled, they were lost in merely opening the picker.
      "oh god a sprite window's gone walkies" observed in trace during development.
      Triggered when sprwindow_delete() is called when there's only one sprite window and you close it. This is because of an earlier change which commented out
        beforeus = /*(main_sprite_window *) &*/us->sprite->windows;
      The additional addressof operation would have introduced one extra iteration to the loop that followed (with the beforeus->link variable at offset 0, it would just dereference the pointer on the first iteration). Now the case of beforeus == us is explicitly checked.
      Submission for the Paint bounty.
      Version 2.25. Tagged as 'Paint-2_25'
  6. 08 Jun, 2019 1 commit
    • ROOL's avatar
      Add clipboard/cut and paste to sprite filer · 3be21b3b
      ROOL authored
        * Sprite filer window can now gain input focus
        * Change sprite/selection menu to add clipboard operations
        * Change 'Copy' to 'Copy as' to keep original copy with rename option
        * Add clipboard copy/paste/cut functionality
        * Add key bindings for clipboard bits
        * Remove existing drag of selection and replace with drag and drop protocol data export
        * Add drag and drop data import
        Submission for Clipboard Support bounty.
      Version 2.24. Tagged as 'Paint-2_24'
  7. 11 Aug, 2018 1 commit
    • Robert Sprowson's avatar
      Minor debug fixes · fbb7e4e0
      Robert Sprowson authored
      PSprite.c: move the trace message up before the label, so if tb is NULL there isn't a NULL pointer dereference
      guard.c: refactor assert() to not check ptr!=0 a second time
      Found by cppcheck static analysis.
      Tagged as Paint-2_23-1 since both are debug code only.
  8. 10 Mar, 2018 1 commit
  9. 11 Nov, 2017 1 commit
    • ROOL's avatar
      Add mousewheel zoom/scroll and auto scrolling of selected tools · 82cd0dc4
      ROOL authored
        The mouse wheel can now be used to
        * scroll up/down
        * +shift to scroll left/right
        * +control to zoom in/out
        on an open sprite editing window.
        The sprite editing window will auto scroll when the mouse approaches the border with
        * the move whole sprite "hand" tool
        * the copy block "camera" tool
        * the move block "scissors" tool
        Submission for the Paint bounty.
      Version 2.23. Tagged as 'Paint-2_23'
  10. 23 Sep, 2017 1 commit
    • ROOL's avatar
      Add 4k and 64k new sprite selector · 6e3eb1c1
      ROOL authored
        Put in minimal support to create 4k and 64k sprites (currently, TBGR only) so that the User Guide chapter makes sense.
        Previously it was only possible to create such sprites by switching to that mode and doing a screen capture.
        Tested on RISC OS 4.02 (ie. without 4k & 64k support) and RISC OS 5.23 (ie. with).
      Version 2.22. Tagged as 'Paint-2_22'
  11. 20 May, 2017 2 commits
    • ROOL's avatar
      Moderate spray can density based on time not CPU speed · 205da1f5
      ROOL authored
        The spray tool rate was ultimately determined by the number of wimp polls per second, which on a fast CPU can be 10,000's making the spray can more of a circle drawing tool.
        Use OS_ReadMonotonicTime to moderate the spray rate, so the speed of the CPU doesn't matter.
        Default density increased to 100 to achieve roughly the same density as a StrongARM Risc PC would previously.
        Submission for the Paint bounty.
      Version 2.21. Tagged as 'Paint-2_21'
    • ROOL's avatar
      Warning suppression · c2a2a721
      ROOL authored
        3 fewer compiler warnings.
        Submission for the Paint bounty.
        Built, but no run time testing.
  12. 14 Oct, 2015 1 commit
    • Jeffrey Lee's avatar
      Fix unreliable sorting of sprites · 617dbd01
      Jeffrey Lee authored
        c/Menus - Fix sprite sort code to take into account the fact that variable-length array allocations may cause flex blocks to be moved (due to CLib allocating the array from the heap)
        Tested on Raspberry Pi
        Appears to fix 'sort by name' sometimes resulting in a random sort order being used
        Will hopefully fix 'out of memory' error reported on forums (unable to reproduce here, but this is a likely cause)
      Version 2.20. Tagged as 'Paint-2_20'
  13. 26 Sep, 2015 1 commit
  14. 01 Jun, 2015 1 commit
    • Robert Sprowson's avatar
      Turn off close icon on transitory dbox · b10e0ce4
      Robert Sprowson authored
      The 'shapshot' window shouldn't have a close icon, otherwise it automatically gets an iconise icon, and you can't sensibly iconise or uniconise it as it's transitory.
      Version 2.18. Tagged as 'Paint-2_18'
  15. 31 Jul, 2014 1 commit
    • Robert Sprowson's avatar
      Build fix · cb500e0e
      Robert Sprowson authored
      Message_SetPrinter renamed.
      Version 2.17. Tagged as 'Paint-2_17'
  16. 27 Mar, 2014 1 commit
    • Jeffrey Lee's avatar
      Various bugfixes. Improve sprite info dialog. · 3a9a3a2c
      Jeffrey Lee authored
        - Handling of currently selected foreground & background colour rewritten; colour is now stored as a 'main_colour' struct, in order to allow representation of alpha level, pixel colour/palette index (which must be 4 bytes for things like CMYK) and ECF index (previously encoded as negative colour values). Fixes crashes when editing RISC OS 5 32bpp ARGB sprites. Note that although the alpha level is now stored internally, and tools should mostly respect it, palette/colour picker limitations mean that only 0/255 is available when selecting colours.
        - "Select colour" code rewritten to decode all the new pixel formats correctly; colours_entry() now accepts a sprite mode word instead of a number-of-colours value
        - "Full info" display tweaked to give more information about the mask (now displays no mask, normal mask, alpha mask, alpha channel)
        - Sprite info dialog extended to display lots more information, including OS version compatibility
        - Fix sprite menu to disallow add/remove mask option if the sprite has a RISC OS 5 alpha channel
        - Fix ECF pattern that's used for the background of masked sprites to get black/white colour values from ColourTrans when in >8bpp modes, to ensure correct colours in new RISC OS 5 modes
        - Fix palette window to render ECF patterns correctly - when creating the sprite that shows the ECF pattern in the palette, psprite_setup_ecf() was failing to set its palette due to passing a sprite pointer to ColourTrans but setting the flags as if it was a sprite name
        - Fix sprwindow_redisplay() and sprwindow_invalidate() to refresh the display correctly when in full info mode; was previously assuming only one column of sprites visible
        - Fix sprites with alpha channels to have the mask ECF pattern plotted in the background
        Files changed:
        - Resources/UK/Messages, Resources/UK/Templates,fec, c/Colours, c/Main, c/Menus, c/PSprite, c/SprWindow, c/Tools, h/Colours, h/MenuD, h/PSprite, h/main
        Tested on BB-xM
        Amongst others, fixes issue reported on forums with spritefile window not refreshing correctly when in full info display with multiple columns:
      Version 2.16. Tagged as 'Paint-2_16'
  17. 06 Aug, 2013 1 commit
    • Jeffrey Lee's avatar
      Fix rendering issues in new screen modes. Add basic support for new sprite types. · fafa11de
      Jeffrey Lee authored
        c/Main, c/PSprite, h/main - Update window background rendering & sprite translation table caching to work properly with new screen modes.
        c/Main, c/Menus, c/PSprite, h/PSprite, h/main - Code to generate description text for sprite colour count now uses new shared function, psprite_get_colours(), which understands the new sprite formats and won't crash horribly if given something unknown.
        Tested on BB-xM with new format sprites and new screen modes
        Needs extending to report more info about new format sprites (RGB order, alpha channel, wide mask, etc.) along with relevant editing facilities.
        Part of an implementation of the Extended Framebuffer Format spec:
      Version 2.15. Tagged as 'Paint-2_15'
  18. 13 Jul, 2013 1 commit
    • Robert Sprowson's avatar
      Don't silently do nothing when trying to rename to a duplicate name · 8cfa18c5
      Robert Sprowson authored
      Paint, when renaming a sprite via alt-clicking on the name, would silently do nothing if the target name already exists. This was different behaviour to renaming via the menu (which gives "Sprite name already exists") and the Filer (which gives "Filename already exists". Now, alt-click-rename also gives a suitable error.
      Version 2.14. Tagged as 'Paint-2_14'
  19. 05 Sep, 2012 1 commit
  20. 22 Aug, 2012 1 commit
    • Robert Sprowson's avatar
      Sprite filer selection logic made consistent with filer · 938add00
      Robert Sprowson authored
      Specifically, in the filer when you menu click on a file it is temporarily selected. Clicking on a different file loses the first temporary selection and moves the highlight to the new file. This behaviour is skipped if there are already files selected (using left or right click).
      This change makes !Paint behave this way too, previously the menu click was a permanent selection, so menu clicking elsewhere on a different sprite would actually manipulate the sprite selected some time earlier - very confusing.
      Tidy ups
       * Remove hardwired mouse button bitmask operations, now uses defines from <wimp.h>.
       * Use OS_Byte numbers from header
      Version 2.12. Tagged as 'Paint-2_12'
  21. 11 Aug, 2012 1 commit
  22. 09 Aug, 2012 1 commit
  23. 14 Jan, 2012 1 commit
  24. 24 Sep, 2011 1 commit
  25. 24 Jul, 2011 1 commit
    • Jeffrey Lee's avatar
      Fix CATCH_SIGNALS code to report the right error if WIMP$ScrapDir is undefined · 58d77a84
      Jeffrey Lee authored
        c/Main - Previously the signal handling code was using a pointer to the original error block when reporting the error to the user. This could cause the wrong error to be reported in some situations (e.g. if WIMP$ScrapDir is undefined). Instead, the code now stores a copy of the error block on the stack.
        Tested on rev A2 BB-xM
      Version 2.08. Tagged as 'Paint-2_08'
  26. 12 Dec, 2010 1 commit
    • Robert Sprowson's avatar
      Colour picker help made more helpful. · ee21e95d
      Robert Sprowson authored
      Previously, the help requests would end up in the background event handler which didn't look at the window handle and would just return "This is paint" even if the handle was that of the colour picker dialogue.
      Also now passes documented 0x80000000 and 0x7FFFFFFF on opening rather than zero.
      Version 2.07. Tagged as 'Paint-2_07'
  27. 11 Dec, 2010 1 commit
  28. 07 Dec, 2010 4 commits
    • Robert Sprowson's avatar
      Fix crashes when dragging from the sprite filer to the filer to save sprite(s). · 97539240
      Robert Sprowson authored
      The use of DragASprite tended to cause an abort somewhere in the kernel's sprite handling code for some reason, changed this to instead create a temporary WIMP icon on the sprite filer in question which can than be referred to in a normal call to xfersend(). The rest of the save is then handled by the normal xfersend() handlers and the temporary icon destroyed since the WIMP takes a copy anyway.
      Has the extra benefits
       * Dragging from the sprite filer now obeys the 'solid drag' flags.
       * Dragging from the sprite filer no longer crashes if dropping back on the originating filer window itself.
      When dragging a selection from the filer the selection is cleared at the end of the drag, to match the behaviour of the desktop filer. When saving a selection from the 'Selection' menu, they are not deselected.
      Changed to use the 'package' icon when dragging multiple sprites, or file_ff9 for singles.
      Version 2.06. Tagged as 'Paint-2_06'
    • Robert Sprowson's avatar
      Minor reformatting step. · a0724eed
      Robert Sprowson authored
      Not tested, not tagged.
    • Robert Sprowson's avatar
      Switch to using common JPEG code in RISC_OSLib. · e5100890
      Robert Sprowson authored
      Allows better sharing when !Draw is also in ROM.
      Fix long (long) standing bug of not being able to drag JPEGs into !Paint using the RAM transfer protocol - some dubious pointer arithmetic meant the wrong address of JPEG data was used and so gave an error.
      The 3 paths that result in a JPEG->Sprite conversion now share code too.
      Remove local definition of FileType_JPEG, use that in the exports.
      Version 2.05. Tagged as 'Paint-2_05'
    • Robert Sprowson's avatar
      Simplify _swix to os_swix. · a42c3c38
      Robert Sprowson authored
      Function main_icon_bboxes() reordered to only call the SWIs it needs to fulfil the requested information.
      Version 2.04. Tagged as 'Paint-2_04'
  29. 06 Dec, 2010 1 commit
  30. 05 Dec, 2010 3 commits
    • Robert Sprowson's avatar
      Redundant files removed. · af6ac588
      Robert Sprowson authored
    • Robert Sprowson's avatar
      Redundant files removed. · 2c57b174
      Robert Sprowson authored
    • Robert Sprowson's avatar
      Prune the plethora of targets a bit. · cba6e241
      Robert Sprowson authored
      Spurious ';' after an if at line 2386 of c.Main deleted, something to do with scroll wheel support. Untested.
      Refer to FileType_ using the filetypes header file.
      Internationalised "Selection" when saving a sprite selection.
      main_save_selection wasn't checking if fwrite() worked so never reported 'disc full'.
      Turn on egg timer during main_save_selection().
      Fix (de)selection bug when in full sprite info view, the 'spritesperrow' was being rounded down to zero, and unlike everywhere else it wasn't being adjusted back to a minimum of 1.
      Version 2.03. Tagged as 'Paint-2_03'
  31. 29 Nov, 2010 1 commit
    • Robert Sprowson's avatar
      Fix abort when sorting the sprites by name and one or more sprite viewers are... · 52984de9
      Robert Sprowson authored
      Fix abort when sorting the sprites by name and one or more sprite viewers are open, also massively simplified it since the copying around of main_sprite blocks was pointless - much simpler to just rejoin the linked list leaving the data in place.
      *Tidy up
       Delete awk.*, change to use central 'AwkVers' script.
       Delete h.types.
       Delete h.Paint, it's a duplicate of h.main.
       Delete writepixel, swap to using the one in RISCOS_Lib
       Retire 'h.fixes', switches collapsed, bugfixes proven after 18 years use.
       Cast away some warnings.
       Sprinkled in some consts, moved pointer qualifiers to get syntax colouring
       Remove local SWI defines, read from <swis.h> now.
       !MkInstall now installs into <Install$Dir>.Apps
      *Little UI changes
       Make the colour number in the colour picker be in the right place vertically
       and correct horizontal position of 'T' and 'E' for ECFs.
       In the create new sprite dialogue box the 32k and 16M options are shaded
       when a palette is requested, this avoids the problem of selecting a deep
       colour mode (which trapped the radio icon in a shaded paletted selection).
       The 'Selection' menu is now shaded when there are zero sprites in the
      *Sprite filer
       Fix tiled main window fill to work in EX0 modes and not overwrite in EX2
       modes (was using the sprite's mode word not the current mode to deduce eigen
       factors), leading to odd chequer board areas not being redrawn.
       Refactored main_clear_background() to use stronger typing of RISC_OSLib
       rather than _swix where possible.
       A failure to get the Wimp pixel translation table now falls back to solid
       Double clicking on a sprite in the sprite file window no longer leaves it
       selected, to mimic the filer.
       Set DISPLAY_MARGIN to 0 to counter for the recent increase from 32 to 40
       of main_FILER_TextHeight
       Added 'Sort by size' after 'Sort by name'
      Version 2.02. Tagged as 'Paint-2_02'
  32. 01 Oct, 2009 1 commit
  33. 31 May, 2009 1 commit
    • Peter Naulls's avatar
      Normalise include paths · 664c19d1
      Peter Naulls authored
       Use Unix style paths for includes
       Part of path changes in all C modules in Apps
      Version 2.00. Not tagged