View Single Post
Old 06 November 2019, 12:48   #1
amipal
Registered User
 
amipal's Avatar
 
Join Date: Jun 2019
Location: Saltdean, United Kingdom
Posts: 146
Coplists and Colours

Hello all.

I'm pulling my hair out trying to get BlitzBasic 2.1 to display all the colours I'm using in my bitmap. I'm setting up a copper list using the following:
Code:
BitMap #BITMAP_BACKGROUND,320,256,32
BitMap #BITMAP_FOREGROUND,320,256,32

LoadPalette #PALETTE_MAIN,"ADH2:Images/Game/colour_test.iff"
AGAPalRGB #PALETTE_MAIN,0,0,0,0 ;force colour 0 from magenta to black 

LoadBitmap #BITMAP_BACKGROUND,"ADH2:Images/Game/colour_test.iff"
LoadBitmap #BITMAP_FOREGROUND,"ADH2:Images/Game/colour_test.iff"

COPPERLISTYPE.l=$08      ;bitplanes
COPPERLISTYPE+$10        ;smooth-scrolling
COPPERLISTYPE+$20        ;dual-playfield
COPPERLISTYPE+$1000    ;fetch mode 1
COPPERLISTYPE+$10000 ;AGA colours

InitCopList #COPPERLIST_MAIN,44,256,COPPERLISTYPE,8,32,0

VWait 100

BLITZ

DisplayPalette #COPPERLIST_MAIN,#PALETTE_MAIN
CreateDisplay #COPPERLIST_MAIN

While Joyb(0)=0
DisplayBitmap #COPPERLIST_MAIN,#BITMAP_FOREGROUND,100,0,#BITMAP_BACKGROUND,0,0 VWait
Wend
Note that the above is keyed from another screen, so please excuse any typos!

I'm basically trying to create a scrolling background with a static foreground. But the background bitmap only ever shows a total of eight colours - colours 8-15.
The foreground bitmap shows sixteen, colours 0-15.

Is there something fundamentally wrong with my code above?
Does each playfield need its own palette?

Or do I not understand how playfields and bitmaps use the palette?

Thanks for any assistance,
Paul

Last edited by amipal; 06 November 2019 at 20:01.
amipal is offline  
 
Page generated in 0.04539 seconds with 11 queries