Plananarama palettemode
Posted: Thu Aug 22, 2024 3:10 pm
I have this LCD game port of Caveman which works well on systems with graphics card, but I wanted test how it would perform on Amigas without gfx card.
First test was in default mode and I tested in Winuae with a plain OS3.2 setup, and also a OS3.1 setup. Both with 020 without fpu.
It runs, but very slow. I tried both with and without FBlit and BlazeWCP, but I cant say I noticed any major speed differences.
Then I want to try out in palettemode, and here is where I struggle to get it running.
First I have this code, which works
Then I have made the graphics in three resolutions, in three different folders and I have some code here for the user to choose to run the game in high, medium or low resolution. After this it loads the main game screen by using a bgpic from choosen folder.
Now the DisplayBGPic function will give me the error "incompatible pixel color depth" and quit.
I also tried loading the palette from the LoadBGPic function, but then it will give the error that the choosen png image does not have a palette.
How can I resolve this issue?
First test was in default mode and I tested in Winuae with a plain OS3.2 setup, and also a OS3.1 setup. Both with 020 without fpu.
It runs, but very slow. I tried both with and without FBlit and BlazeWCP, but I cant say I noticed any major speed differences.
Then I want to try out in palettemode, and here is where I struggle to get it running.
First I have this code, which works
Code: Select all
@REQUIRE "plananarama", {Link = True, PaletteMode = True}
@DISPLAY {Width = 320, Height = 256, Title = "Caveman",ScaleMode = #SCALEMODE_AUTO, Sizeable = True, Borderless = True, PALETTE = #PALETTE_AGA}
SetPaletteMode(#PALETTEMODE_PEN)Code: Select all
LoadBGPic(1, GetDirectoryEntry(seldir, "bg_caveman.png"))
DisplayBGPic(1, {Palette = #PALETTE_AGA})I also tried loading the palette from the LoadBGPic function, but then it will give the error that the choosen png image does not have a palette.
How can I resolve this issue?