SetMousePointer on AmigaOS3.x

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
Juan Carlos
Posts: 884
Joined: Mon Sep 06, 2010 1:02 pm

SetMousePointer on AmigaOS3.x

Post by Juan Carlos »

It will be possible SetMousePointer with iff/lbm graphics with the OS3.x palette of 4 colors instead of png graphics? because I try to use the lbm graphics to set and change the mouse pointers but doen't work with this Amiga format and with png graphics Hollywood change to AmigaOS3.x palette and the result are an ugly mouse pointers.
Thanks.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SetMousePointer on AmigaOS3.x

Post by airsoftsoftwair »

That’s currently not possible but now that Hollywood also supports palette brushes this might be a useful addition…
User avatar
Juan Carlos
Posts: 884
Joined: Mon Sep 06, 2010 1:02 pm

Re: SetMousePointer on AmigaOS3.x

Post by Juan Carlos »

Humm, the solution load the brush and set the palette?
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SetMousePointer on AmigaOS3.x

Post by airsoftsoftwair »

Juan Carlos wrote: Mon Oct 18, 2021 10:39 am Humm, the solution load the brush and set the palette?
Won’t work because SetPointer() currently doesn’t support palette brushes but as I said, it might make sense to add that for 3.x.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SetMousePointer on AmigaOS3.x

Post by airsoftsoftwair »

Code: Select all

- New [OS3]: On AmigaOS 3, CreatePointer() also supports palette brushes and sprites now; pointers on
  classic Amiga hardware are always palette-based because they are hardware sprites so if you pass palette
  brushes or sprites to CreatePointer() you have full control over the exact pens used by the pointer;
  previously, palette brushes/sprites were first converted to RGB on AmigaOS 3 and then mapped back to
  palette graphics; this can be avoided now by directly passing palette brushes/sprites to CreatePointer()
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

Re: SetMousePointer on AmigaOS3.x

Post by fingus »

airsoftsoftwair wrote: Sat Nov 06, 2021 7:12 pm

Code: Select all

- New [OS3]: On AmigaOS 3, CreatePointer() also supports palette brushes and sprites now; pointers on
  classic Amiga hardware are always palette-based because they are hardware sprites so if you pass palette
  brushes or sprites to CreatePointer() you have full control over the exact pens used by the pointer;
  previously, palette brushes/sprites were first converted to RGB on AmigaOS 3 and then mapped back to
  palette graphics; this can be avoided now by directly passing palette brushes/sprites to CreatePointer()
That is a good thing, what about System-Requests?
It seemed they use always the first 4 Palette-Entries!?
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

Re: SetMousePointer on AmigaOS3.x

Post by fingus »

fingus wrote: Wed Nov 10, 2021 9:38 am
airsoftsoftwair wrote: Sat Nov 06, 2021 7:12 pm

Code: Select all

- New [OS3]: On AmigaOS 3, CreatePointer() also supports palette brushes and sprites now; pointers on
  classic Amiga hardware are always palette-based because they are hardware sprites so if you pass palette
  brushes or sprites to CreatePointer() you have full control over the exact pens used by the pointer;
  previously, palette brushes/sprites were first converted to RGB on AmigaOS 3 and then mapped back to
  palette graphics; this can be avoided now by directly passing palette brushes/sprites to CreatePointer()
That is a good thing, what about System-Requests?
It seemed they use always the first 4 Palette-Entries!?
Here is an Example. On Fullscreen the GUI is mapped to some Palette-Entries.:
Image

Code: Select all

@IF #HW_AMIGAOS3
	@REQUIRE "plananarama", {DitherMode = "None", Precision = "Exact"}
@ENDIF
@DISPLAY {width = 640, height = 480, palette = #PALETTE_AGA, Mode = "Fullscreen"}
CreatePalette(1, #PALETTE_AGA)
SetPalette(1)
SetPaletteMode(#PALETTEMODE_PEN)
SetFillStyle(#FILLCOLOR)

SetPalette(1)
For Local y=0 To 7
	For Local x=0 To 31
		SetDrawPen(pe)
		Box(x*10, y*30, 10, 30)
		pe = pe + 1
	Next
	SetDrawPen(0)
	ppos = ppos + 32
	TextOut(#RIGHT, y*30, ppos)
Next

sel = FileRequest("test")

WaitLeftMouse()
Changing the @REQUIRE "plananarama" Precision to "GUI" doesn´t change it.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SetMousePointer on AmigaOS3.x

Post by airsoftsoftwair »

This problem has already been addressed because some other user reported it earlier (albeit in a different context). From the Plananarama v2.0 history:

Code: Select all

- New: Added "NoBlackBackground" tag; if this is set to TRUE, Plananarama won't set color 0 to
  black when opening in fullscreen mode; this fixes the problem that Plananarama wasn't able to
  draw in grey when opening a 4 color screen

Should fix your issue too.
Post Reply