1. 04 Jul, 2020 2 commits
    • Jeffrey Lee's avatar
      Adjust USBDriver scrollwheel fix · 25c1b2b6
      Jeffrey Lee authored
      Starting with USBDriver 1.30, the scrollwheel is now handled in a
      sensible manner, so there's no longer any need to ignore four out of
      every five wheel events.
      
      Version 2.36. Tagged as 'Paint-2_36'
      25c1b2b6
    • Jeffrey Lee's avatar
      Sprite compatibility report fix · ab784d97
      Jeffrey Lee authored
      As documented in PRM5A, RISC OS 3.5 doesn't support new-format sprites
      which have masks. Update the sprite info dialogue "compatibility" field
      to reflect this, reporting that the sprite is compatible with RISC OS
      3.6 instead.
      ab784d97
  2. 23 May, 2020 1 commit
    • Robert Sprowson's avatar
      Add choices dialogue, don't set Paint$Options · 5ddfba1a
      Robert Sprowson authored
      Messages/Templates: Extra interactive help, new menu templates, new choices dialogue.
      PaintChoice.c/h: New source file to handle the choices dialogue, also added to Makefile.
      
      Main.c/h: Transfer ownership of initial_options to PaintChoice.c. Delete setting & parsing of Paint$Options. Export - and constify - Matches() for use elsewhere. Define MAXZOOMFACTOR and replace 999's elsewhere.
      Menus.c: Remove advanced options menu, these are now in choices.
      MenuD.h: Defines for the iconbar menu, remove advanced options menu.
      
      Version 2.35. Tagged as 'Paint-2_35'
      5ddfba1a
  3. 09 May, 2020 3 commits
    • ROOL's avatar
      Minor fixes · 420bdd39
      ROOL authored
      Detail:
        * Fix for 2 colours being editing when the palette is in artist friendly view
        * Disabled 'Rearrange user palette' option by default to keep confusion to a minimum
        * Remove ^P shortcut for 'Edit palette' which could cause a submenu error in some situations
      Admin:
        Submission for Paint bounty.
      
      Version 2.34. Tagged as 'Paint-2_34'
      420bdd39
    • ROOL's avatar
      Add wrap option to move sprite tool · b1f2d2db
      ROOL authored
      Detail:
        Implements a wrap option to the 'Move Sprite' tool, enabled via a check box.
        Code sharing with the camera/scissor tool via copy_to_temporary_sprite() and delete_temporary_sprite().
      Admin:
        Submission for the Paint bounty.
      
      Version 2.33. Tagged as 'Paint-2_33'
      b1f2d2db
    • ROOL's avatar
      Fix for mask errors with camera/scissor tool · 1cf50826
      ROOL authored
      Detail:
        Longstanding bug where use of the camera or scissor tool in Export mode with 'new' 1bpp mask sprites didn't work. Change to use SpriteExtend's scaled mask op.
        Ref: https://www.riscosopen.org/tracker/tickets/481
      Admin:
        Submission for Paint bounty.
      1cf50826
  4. 06 Apr, 2020 1 commit
  5. 29 Feb, 2020 1 commit
    • Robert Sprowson's avatar
      Fix loading palettes to all new & 256 colour old sprites · 182c9f8d
      Robert Sprowson authored
      A check (marked DF-300) rejected any attempt to load a palette into a new (ie. RISC OS 3.50+) style sprite. This is bogus because bbc_modevar() is perfectly happy to process a sprite mode word and return Log2bpp, which is all that was required. Confirmed on RISC OS 3.50 with
        SYS"OS_ReadModeVariable",&202D0169,9 TO,,log2bpp
      which gives 3 for a 256 colour 180dpi sprite.
      Ref: https://www.riscosopen.org//forum/forums/4/topics/14966
      
      Second, a logic error introduced in Paint-2_26 meant that loading from a file any 256 entry palette (old or new sprite) would result in the palette being reset to the kernel default. This is because there are 2 callers of menus_set_palette() with non-NULL palette pointers, but only 1 wants a default palette. Signal this case by passing -256 entries.
      
      Version 2.31. Tagged as 'Paint-2_31'
      182c9f8d
  6. 28 Dec, 2019 1 commit
    • ROOL's avatar
      Messages update · bdc9c4ae
      ROOL authored
      Detail:
        Move the menu entry tokens out of the !Help messages section so they don't get tokenised.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.30. Not tagged
      bdc9c4ae
  7. 17 Dec, 2019 6 commits
    • ROOL's avatar
      Improve reciprocity of zooming · 8b3c9626
      ROOL authored
      Detail:
        Previously a small (eg. 100x100) sprite being
        * zoomed in until it fills the screen
        * zoom 1:1
        * zoom in again
        would lead to a large black border in width as the sprite grew, but not in height. Now ensures the width is clamped to the minimum sprite width.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.30. Tagged as 'Paint-2_30'
      8b3c9626
    • ROOL's avatar
      Reduce redraws of colour panel · 9e2713db
      ROOL authored
      Detail:
        The colour panel swatch was being redrawn unnecessarily on every open window request due to not knowing whether the furniture icons had changed size. Now, only recalculate the sizes and force a redraw on a mode change event, this eliminates the flicker when moving the sprite window around.
      Admin:
        Submission for the Paint bounty.
      9e2713db
    • ROOL's avatar
      Fix for left edge adjustment · ea656225
      ROOL authored
      Detail:
        Edge Adjustment of the left edge on Adjust size was broken due to copy/paste error.
      Admin:
        Submission for the Paint bounty.
      ea656225
    • ROOL's avatar
      Treat 'New sprite' as dialogue window · c8a3984c
      ROOL authored
      Detail:
        Now that there a popup menus on the create sprite window, it can't be used as a menu dialogue (because the Wimp only allows one window) from a submenu arrow. Change the menu entry to add an ellipsis and open it as a plain dialogue window.
      Admin:
        Submission for the Paint bounty.
      c8a3984c
    • ROOL's avatar
      Open popup menus in Style Guide approved place · 33abefef
      ROOL authored
      Detail:
        In the create sprite dialogue the menus for colour/palette didn't open in the right place. Compute the offset as the Style Guide recommends.
      Admin:
        Submission for the Paint bounty.
      33abefef
    • ROOL's avatar
      Promote width variable · 6ac43b06
      ROOL authored
      Detail:
        Promoted the colour panel variables used to store dimensions based off the window furniture sizes to use ints instead of chars as they could, at least theoretically, exceed 255 OS units on a custom desktop.
      Admin:
        Submission for the Paint bounty.
      6ac43b06
  8. 14 Dec, 2019 1 commit
    • ROOL's avatar
      Fix for camera and scissor tool in 'export' mode · 05b310f2
      ROOL authored
      Detail:
        * 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).
      Admin:
        See also https://www.riscosopen.org/forum/forums/4/topics/14698
        Submission for the Paint bounty.
      
      Version 2.29. Tagged as 'Paint-2_29'
      05b310f2
  9. 26 Sep, 2019 2 commits
    • ROOL's avatar
      Fix to artist friendly remapping · e137ee5d
      ROOL authored
      Detail:
        Remapping would never occur if the confirmation box was disabled.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.28. Not tagged
      e137ee5d
    • ROOL's avatar
      Colour handling fixes · b886fe56
      ROOL authored
      Detail:
        * 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.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.28. Tagged as 'Paint-2_28'
      b886fe56
  10. 22 Sep, 2019 1 commit
    • ROOL's avatar
      Zoom resize, focus, and keyboard shortcuts · 6a84fc4e
      ROOL authored
      Detail:
        * 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
      Admin:
        Submission for the Paint bounty.
      
      Version 2.27. Tagged as 'Paint-2_27'
      6a84fc4e
  11. 25 Aug, 2019 1 commit
    • ROOL's avatar
      Colour handling enhancements · 18f461a5
      ROOL authored
      Detail:
        * 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
      Admin:
        Submission for the Paint bounty.
      
      Version 2.26. Tagged as 'Paint-2_26'
      18f461a5
  12. 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'
      eff0967c
  13. 08 Jun, 2019 1 commit
    • ROOL's avatar
      Add clipboard/cut and paste to sprite filer · 3be21b3b
      ROOL authored
      Detail:
        * 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
      Admin:
        Submission for Clipboard Support bounty.
      
      Version 2.24. Tagged as 'Paint-2_24'
      3be21b3b
  14. 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.
      fbb7e4e0
  15. 10 Mar, 2018 1 commit
  16. 11 Nov, 2017 1 commit
    • ROOL's avatar
      Add mousewheel zoom/scroll and auto scrolling of selected tools · 82cd0dc4
      ROOL authored
      Detail:
        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
      Admin:
        Submission for the Paint bounty.
      
      Version 2.23. Tagged as 'Paint-2_23'
      82cd0dc4
  17. 23 Sep, 2017 1 commit
    • ROOL's avatar
      Add 4k and 64k new sprite selector · 6e3eb1c1
      ROOL authored
      Detail:
        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.
      Admin:
        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'
      6e3eb1c1
  18. 20 May, 2017 2 commits
    • ROOL's avatar
      Moderate spray can density based on time not CPU speed · 205da1f5
      ROOL authored
      Detail:
        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.
      Admin:
        Submission for the Paint bounty.
      
      Version 2.21. Tagged as 'Paint-2_21'
      205da1f5
    • ROOL's avatar
      Warning suppression · c2a2a721
      ROOL authored
      Detail:
        3 fewer compiler warnings.
      Admin:
        Submission for the Paint bounty.
        Built, but no run time testing.
      c2a2a721
  19. 14 Oct, 2015 1 commit
    • Jeffrey Lee's avatar
      Fix unreliable sorting of sprites · 617dbd01
      Jeffrey Lee authored
      Detail:
        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)
      Admin:
        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)
        https://www.riscosopen.org/forum/forums/4/topics/3657
      
      
      Version 2.20. Tagged as 'Paint-2_20'
      617dbd01
  20. 26 Sep, 2015 1 commit
  21. 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'
      b10e0ce4
  22. 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'
      cb500e0e
  23. 27 Mar, 2014 1 commit
    • Jeffrey Lee's avatar
      Various bugfixes. Improve sprite info dialog. · 3a9a3a2c
      Jeffrey Lee authored
      Detail:
        - 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
      Admin:
        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:
        http://www.riscosopen.org/forum/forums/8/topics/2146?page=5#posts-31272
      
      
      Version 2.16. Tagged as 'Paint-2_16'
      3a9a3a2c
  24. 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
      Detail:
        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.
      Admin:
        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:
        http://www.riscosopen.org/wiki/documentation/show/Extended%20Framebuffer%20Format%20Specification
      
      
      Version 2.15. Tagged as 'Paint-2_15'
      fafa11de
  25. 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'
      8cfa18c5
  26. 05 Sep, 2012 1 commit
  27. 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'
      938add00
  28. 11 Aug, 2012 1 commit
  29. 09 Aug, 2012 1 commit
  30. 14 Jan, 2012 1 commit