Make coordinates relative to center

Relative coordinates make it easier to center the image.
The value "auto" is now replaced with simply 0.
The value "native" is replaced with "keep" for consistency.
The value is clamped, so x=-9999 will align to the left border etc.
This commit is contained in:
Lauri Kenttä
2023-09-03 13:21:46 +03:00
parent ad0b71c49b
commit e5616c6cd2
4 changed files with 40 additions and 55 deletions

View File

@@ -8,11 +8,11 @@ boot=MS
# Multiple image lines may be present, in which case one will be picked by random.
# The image line may contain the following parts:
# Any of the following:
# - "n=[0-9]+", a weight for this image in the randomization process. Default: n=1.
# - "x={auto|native|[0-9]+}", the x coordinate. Default: x=auto.
# - "y={auto|native|[0-9]+}", the y coordinate. Default: y=auto.
# - "n=(number)", a weight for this image in the randomization process. Default: n=1.
# - "x=(number)" or "x=keep", the x offset from the center. Default: x=0.
# - "y=(number)" or "y=keep", the y offset from the center. Default: y=0.
# One of the following:
# - "keep" to keep the firmware logo. Sets also x=native,y=native by default.
# - "keep" to keep the firmware logo. Also keeps coordinates by default.
# - "remove" to remove the BGRT. Makes x and y meaningless.
# - "black" to use only a black image. Makes x and y meaningless.
# - "path=..." to read a BMP file.
@@ -22,17 +22,17 @@ boot=MS
# Examples:
# - image=remove
# - image=black
# - image=x=auto,y=0,path=\EFI\HackBGRT\topimage.bmp
# - image= x=0 y=-200 path=\EFI\HackBGRT\topimage.bmp
# - image=n=1,path=\EFI\HackBGRT\splash.bmp
# - image=n=50,path=\EFI\HackBGRT\probable.bmp
# The above examples together would produce
# - 1/54 chance for the default OS logo
# - 1/54 chance for black screen
# - 1/54 chance for topimage.bmp, centered at the top of the screen
# - 1/54 chance for topimage.bmp, 200 px above the center of the screen
# - 1/54 chance for splash.bmp, automatically positioned
# - 50/54 chance for probable.bmp, automatically positioned
# Default: just one image.
image=path=\EFI\HackBGRT\splash.bmp
image= y=-200 path=\EFI\HackBGRT\splash.bmp
# Preferred resolution. Use 0x0 for maximum and -1x-1 for original.
resolution=0x0