Page 1 of 1

SetMousePointer on AmigaOS3.x

Posted: Fri Oct 15, 2021 12:40 pm
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.

Re: SetMousePointer on AmigaOS3.x

Posted: Sun Oct 17, 2021 12:04 am
by airsoftsoftwair
That’s currently not possible but now that Hollywood also supports palette brushes this might be a useful addition…

Re: SetMousePointer on AmigaOS3.x

Posted: Mon Oct 18, 2021 10:39 am
by Juan Carlos
Humm, the solution load the brush and set the palette?

Re: SetMousePointer on AmigaOS3.x

Posted: Mon Oct 18, 2021 10:26 pm
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.

Re: SetMousePointer on AmigaOS3.x

Posted: Sat Nov 06, 2021 7:12 pm
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()

Re: SetMousePointer on AmigaOS3.x

Posted: Wed Nov 10, 2021 9:38 am
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!?

Re: SetMousePointer on AmigaOS3.x

Posted: Wed Nov 10, 2021 11:31 am
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.

Re: SetMousePointer on AmigaOS3.x

Posted: Sat Nov 13, 2021 4:20 pm
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.