1. 19 Apr, 2014 1 commit
    • Robert Sprowson's avatar
      Fix for missing window backgrounds/scroll bars when tiled sprite op not supported · f0e0f3ad
      Robert Sprowson authored
      For the backgrounds, the code was switched with 'standalone' however the Wimp actively wipes SA_FLAGS in its makefile so the standalone switch is always false during the install phase of a disc build. Also, the standalone switch is used to include resources which are ordinarily handled by the boot sequence prefixing the WindowManager$Path rather than using ResourceFS.
      For the scroll bars, the decision to plot manually was being made by looking at the V flag on return from Tool_SpriteOp, except that that function uses EntryS/EXITS so the caller can't see the return flags.
      Added new switch CanTileManually, removed 0 use tilewithspriteops switch.
      Changed single use of NoFontBodge switch to use preferred 'outlinefont'.
      Tested on RISC OS 4.02.
      
      Version 5.41. Tagged as 'Wimp-5_41'
      f0e0f3ad
  2. 09 Mar, 2014 1 commit
    • Jeffrey Lee's avatar
      Fix to build with HdrSrc-2_42. Use OS_SpriteOp 65 where possible. · 41cb4f23
      Jeffrey Lee authored
      Detail:
        s/Wimp01 - Update Wimp_SpriteOp handler to cope with the new SpriteReason_BadReasonCode value. Initialise unused bits of spritebits to 1 so that it acts as a whitelist, only allowing through operations that we know are safe.
        s/Tiling3D - Use OS_SpriteOp 65 for drawing tiled window backgrounds. Softload versions will fall back to using the old manual tiling code if OS_SpriteOp 65 is unavailable.
        s/Wimp10 - Use OS_SpriteOp 65 for drawing the tiled sprites that make up scrollbar wells and bars. Falls back to manual tiling in softload versions.
      Admin:
        Tested on Iyonix, BB-xM
        Requires HdrSrc-2_42
      
      
      Version 5.37. Tagged as 'Wimp-5_37'
      41cb4f23
  3. 01 Mar, 2014 1 commit
    • Jeffrey Lee's avatar
      Implement sprite translation table caching · 9187a060
      Jeffrey Lee authored
      Detail:
        This set of changes allows the Wimp to cache the last-used translation table, and cleans up some instances where translation tables were being generated and then not used
        s/Wimp01 - Expand selecttable_args to store all 8 registers needed by ColourTrans_GenerateTable. Add 1K of space for caching the palette that the cached translation table was generated from. Remove unused spriteX, spriteY variables.
        s/Wimp04 - Split cachespritedata in two. cachespritedata now only caches the basic information, while the new cachespritepixtable rotuine will generate a translation table (shaded/inverted if required). This allows table generation to be deferred until we're just about to render the sprite, ensuring that the table isn't generated only to not be used. Also updated icon sprite rendering to check the sprite is within the graphics window before attempting to render it, allowing removal of one more case where tables can be needlessly generated.
        s/NewSWIs, s/Wimp09 - Change ADR to ADRL
        s/Tiling, s/Tiling3D - Use cachespritepixtable when needed
      Admin:
        Tested on Iyonix, BB-xM, StrongARM RiscPC
      
      
      Version 5.36. Tagged as 'Wimp-5_36'
      9187a060
  4. 08 Sep, 2013 1 commit
    • Robert Sprowson's avatar
      3 minor fixes, 2 minor enhancements · a9c3b548
      Robert Sprowson authored
      Makefile:
      * Conditionally copy the disc resources, saving a little build time.
      Wimp10.s; hdr/Wimp:
      * Issue Service_WimpToolSpritesChanged when the tool sprite area is changed.
      Wimp05:
      * Fix bug in softloaded versions of the Wimp where menus would randomly lose the keyboard shortcut text. This was caused by use of an LDR to retrieve a byte wide variable. This specifically affected some softloads because the Wimp gets squeezed, and during unsqueezing the Wimp's workspace ends up being allocated from the same bit of RMA that used to contain the squeezed copy of the module (=lots of random numbers).
      Wimp09:
      * Fix bug where configuring WimpSpritePrecedence to ROM when a theme is loaded would cause redrawing of window textures to fail. This is because the Wimp intersects the ROM and RAM sprite areas and deletes any duplicates from the RAM area when remaking the fast lookup sprite list. So if the RAM sprites include the "tile_1" (etc) sprite on redrawing the desktop the Wimp points to this, then intersects the lists and deletes the sprite, leaving the pointers pointing at junk. Now, on deleting something, the window tile pointers are invalidated. Fixes ticket #346.
      Wimp02:
      * Fix bug where the title bar text, when the desktop font is the system font, is incorrectly rendered in the colour selected by WimpVisualFlag -WindowOutlineColour. The Wimp now restores the text colour if -WOC has set the graphics colour to something other than black.
      
      Administrative -
      In Wimp01, swap a couple of SpriteReasons from magic numbers. In the init of variables use the common reset_all_tiling_sprite function.
      In Tiling3D, more SpriteReasons, and rationalise the registers used in reset_all_tiling_sprites.
      
      Version 5.32. Tagged as 'Wimp-5_32'
      a9c3b548
  5. 06 Aug, 2013 1 commit
    • Jeffrey Lee's avatar
      Replace OS_SpriteOp reason code magic numbers with definitions. Add support for new screen modes. · fa42b0ad
      Jeffrey Lee authored
      Detail:
        s/Tiling, s/Tiling3D, s/Watchdog, s/Wimp05, s/Wimp07, s/Wimp09 - Replaced OS_SpriteOp reason code magic numbers with symbolic definitions.
        s/Wimp01 - Update *WimpMode / Wimp_SetMode to use OS_ScreenMode 13 (mode string to specifer) in place of its own code if a mode specifier string has been given. Note - mode number handling is unchanged, so a mode specifier string which begins with a mode number will currently have the specifier part ignored.
        s/Wimp01, s/Wimp02 - Flag_* -> ModeFlag_* renaming
        s/Wimp02 - Fix mode specifier copying to only stop copying when we hit a mode variable of -1. Previous code would also stop if the variable value was -1. Update mode set code to apply the Wimp's special greyscale palettes if the greyscale mode flag is set (i.e. greyscale mode was set via specifier generated by OS_ScreenMode 13)
      Admin:
        Tested on BB-xM
      
      
      Version 5.31. Tagged as 'Wimp-5_31'
      fa42b0ad
  6. 28 Mar, 2013 1 commit
    • Robert Sprowson's avatar
      Add support for wide translation tables for window tool furniture · cd1be707
      Robert Sprowson authored
      With the introduction of 16bpp/32bpp modes it became possible to request tables from ColourTrans which used > 1 byte per colour, but the Wimp wasn't using this extension. Therefore tool sprites designed in 8bpp or less would be quantised horribly when plotted in a 16bpp or 32bpp mode.
      The Wimp now requests and plots with a wide table, and to avoid thrashing ColourTrans so much with the prevalence of individually paletted icon sprites, keeps the table seperately to the icon sprites ones. At worst (in 32bpp) this uses an extra 256x4 bytes of RAM.
      Trace.s: Split out the tracing routines from Wimp10 as it was getting a bit big.
      Tiling.s: Namespace change for the icons versus tools distinction. Removed some unnecessary PC+8/PC+12 confused NOPs.
      Tiling3D.s: Namespace change for the icons versus tools distinction.
      Wimp01.s: New set of variables to track the tool translation tables separately. Various jiggling to keep ADRs in range.
      Wimp02.s: Namespace change. Remove some double handling in Wimp_SetColourMapping.
      Wimp04.s: Namespace change. Made factor rationalisation common to both the icon and tool grinding code. Removed dual use of cachespritedata for both icons and tools. The tintfunc moves to Wimp10. Service_InvalidateCache confusion resolved by adding a new flag to remember that the tools need regenerating rather than just marking the tool list as missing (which subsequently got restored in Tool_SpriteOp without actually doing any palette work.
      Wimp10.s: Label tools_area renamed as it was immensely confusing to have that (which was actually holding the RMA allocation of the tool_list) and tool_area (which contains the sprite area) hanging around. Changed references to use tools-only cachetolspritedata routine. Added 'wide' flags to sprite op and colour trans calls. Tool_SpriteOp changed to actually regenerate the colour tables when they're known invalid (previously the tools list pointer was merely restored and no colour tables used). Trace functions extracted. Resolved confusion as to what recache_tools_trans and recache_tools_trans2 should be doing.
      
      Tested with 4bpp "NewLook" sprites in 4bpp/8bpp/16bpp/32bpp and 8bpp smooth greyscaled "Steel" tool sprites in same modes.
      Also ran a task window doing repeated Service_InvalidateCache calls while monitoring the RMA for leaks.
      Generally navigated around some directories to ensure that inverse icons (during double click) and filer windows (with individually paletted sprites) were being rendered.
      
      Version 5.20. Tagged as 'Wimp-5_20'
      cd1be707
  7. 30 Oct, 2002 1 commit
    • Ben Avison's avatar
      Merged in RISC OS 4.02 changes (including ROM patches). Also som bugfixes. · 3b1e336c
      Ben Avison authored
      Detail:
        RISC OS 4 changes:
        * Font blending for desktop font (based on NC code, but now configurable)
        * 3-D window/menu/iconbar borders
        * Textured menu backgrounds
        * Loss of rubout box in unfilled text+sprite icons
        * *WimpVisualFlags controls various aspects of cosmetic changes above
        * Iconise button "slot" glyph slightly shorter (but only adopted in the RO400
          Resource directory)
        * Command window has front-window flag set
        * Byte at +39 of the window block has gained two new flag bits:
            bit 2 set => this window must never be given a 3D border
            bit 3 set => this window must always be given a 3D border
            (note that ResEd erroneously created windows with both bits set,
            this case is treated as though both bits were clear)
        * Another two colour specifiers on the end of C validation string command
          for icons controls the foreground and background colours to be used when
          the icon is selected
        * Pointer shape is correctly reprogrammed by the creation of icon
          underneath it
        * Full stops in writable icons are treated the same as spaces from the
          point of view of cursor navigation
        * spritesize routine returns a size of 0 if the sprite didn't exist
          (probably fixes some rendering problems)
        * Adjust-click on back icon brings window to front
        My changes:
        * DeleteRight turned on
        * Icon bar title background is set to default in all resource sets (avoids
          translation table recalc)
        * Error box title now cream across all resource sets
        * RISC OS 4 changes made 32-bit compatible / high addresses safe
        * Undocumented FullIconClipping option disabled
        * Command help made consistent for internationalised and non-
          internationalised builds
        * WimpVisualFlags defaults made sensible
        * Menu side width affected by ThreeD option at *run* time not assemble time
        * Right-clicking on menus with writable items no longer data aborts
        * Auto-opened menus are now at RHS of current icon (matches RISC OS 3.1)
        * Colour menus were knackered unless menu tiling was enabled
        * Fixed a bug whereby adding messages to a task that wanted all messages
          actually caused it to lose all other messages. The RISC OS 4 fix for
          this didn't work
        * Fixed bug introduced in version 4.76: tasks that wanted no messages got
          all of them
        * Autoscrolling is updated every 8 cs rather than every 12 cs
        * Added menu texture to pre-RISC OS 4 sprites files
      Admin:
        Tested on Tungsten.
      
      Version 4.78. Tagged as 'Wimp-4_78'
      3b1e336c