Commit 5958a073 authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL
Browse files

Add themeable icon bar tiles

Allow theme designers to use a different sprite for the background tile of the iconbar, distinct from the other windows. This looks for 'tile_i' before falling back to 'tile_1' as before, in addition to the existing 'tile_m' for menus.

Version 5.81. Tagged as 'Wimp-5_81'
parent 583685c0
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
Module_MajorVersion SETS "5.80"
Module_Version SETA 580
Module_MajorVersion SETS "5.81"
Module_Version SETA 581
Module_MinorVersion SETS ""
Module_Date SETS "17 Oct 2020"
Module_ApplicationDate SETS "17-Oct-20"
Module_Date SETS "10 Jul 2021"
Module_ApplicationDate SETS "10-Jul-21"
Module_ComponentName SETS "Wimp"
Module_FullVersion SETS "5.80"
Module_HelpVersion SETS "5.80 (17 Oct 2020)"
Module_FullVersion SETS "5.81"
Module_HelpVersion SETS "5.81 (10 Jul 2021)"
END
/* (5.80)
/* (5.81)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 5.80
#define Module_MajorVersion_CMHG 5.81
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Oct 2020
#define Module_Date_CMHG 10 Jul 2021
#define Module_MajorVersion "5.80"
#define Module_Version 580
#define Module_MajorVersion "5.81"
#define Module_Version 581
#define Module_MinorVersion ""
#define Module_Date "17 Oct 2020"
#define Module_Date "10 Jul 2021"
#define Module_ApplicationDate "17-Oct-20"
#define Module_ApplicationDate "10-Jul-21"
#define Module_ComponentName "Wimp"
#define Module_FullVersion "5.80"
#define Module_HelpVersion "5.80 (17 Oct 2020)"
#define Module_LibraryVersionInfo "5:80"
#define Module_FullVersion "5.81"
#define Module_HelpVersion "5.81 (10 Jul 2021)"
#define Module_LibraryVersionInfo "5:81"
......@@ -52,7 +52,7 @@ $lab CMP $rb,#0
plotspritebackground
Push "r0-r5,lr"
Debug tiling,"Enterring plotspritebackground",r0,r6,r7,r8,r9,r10
Debug tiling,"Entering plotspritebackground",r0,r6,r7,r8,r9,r10
cmp r0,#15
bhi %FT02
......@@ -64,6 +64,12 @@ plotspritebackground
]
mov r5,r0 ; r5 = window bg colour
ldr r0,iconbarhandle
Abs r0,r0
teq r0,handle
moveq r5,#17 ; if the current window is the iconbar try tile_i
beq %FT01
ldr r0,[handle,#w_taskhandle]
cmp r0,#-1 ; if the current window is a menu
bne %FT01
......@@ -304,17 +310,20 @@ get_base_tile_sprite_name
teq r5,#16
moveq r0,#'m'
streqb r0,[r7],#1
beq %F00 ; it's a menu, so now 'tile_m'
beq %F00 ; it's a menu, so produce 'tile_m'
teq r5,#17
moveq r0,#'i'
beq %F00 ; it's the iconbar, so produce 'tile_i'
cmp r5,#10
movhs r0,#'1'
strhsb r0,[r7],#1 ; >= to 10 so put in the 1 'tile_1'
addhs r0,r5,#'0'-10 ; and set r0 to the second character of the number
addlo r0,r5,#'0' ; else r0 = the single digit number
strb r0,[r7],#1
00 mov r0,#0 ; finished, so terminate the name
00 strb r0,[r7],#1
mov r0,#0 ; finished, so terminate the name
strb r0,[r7,#0]
Pull "r0,pc"
......@@ -431,22 +440,29 @@ find_tile_sprite_all_depths
; or V set if no sprite could be found
ROUT
Push "r5,lr"
00
ldr r5,log2bpp
mov r14,#1
mov r5,r14,LSL r5 ; r6 = bpp of current screen mode
mov r5,r14,LSL r5 ; r5 = bpp of current screen mode
00 bl write_tile_sprite_name_bpp
05 bl write_tile_sprite_name_bpp
bl find_tile_sprite
Pull "r5,pc",VC
mov r5,r5,LSR #1
cmp r5,#8
bhs %BT00
bhs %BT05 ; if no match for current bpp, only search to 8bpp (no lower)
mov r5,#0
strb r5,[r7,#0] ; failed to find any variant of the sprite so try the default
strb r5,[r7,#0] ; failed to find any variant of the sprite so try the base name
bl find_tile_sprite
Pull "r5,pc",VC
ldrb r5,[r7,#-1]
teq r5,#'i' ; tile_i is optional
moveq r5,#'1' ; have another go but with tile_1 instead
streqb r5,[r7,#-1]
beq %BT00
Pull "r5,pc"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment