Also, with my code above, you could allocate a second bitmap as a friend of the window (still no need for BMF_DISPLAYABLE, and especially not BMF_MINPLANES), then blit from the planar one to the second one, then free up the planar one.
Now you have the menu converted to the correct format by CGX/P96, and when you blit it into the window it will be faster.
Example:
[color=006600]
struct BitMap *menubm = NULL;
bool load_menu( void )
{
struct BitMap *tempbm = NULL;
struct RastPort temprp;
BPTR m;
bool loadok = false;
if(( menubm = AllocBitMap( 640, 480, 8, BMF_DISPLAYABLE, win->RPort->BitMap ) ) == NULL) return false;
InitRastPort( &temprp );
temprp.bitmap = menubm;
if( tempbm = AllocBitMap( 640, 480, 8, 0, 0 ) )
{
if( m = Open( "GFX/game_menu", MODE_OLDFILE ) )
{
Read( m, tempbm->planes[0], 80*480 );
Read( m, tempbm->planes[1], 80*480 );
Read( m, tempbm->planes[2], 80*480 );
Read( m, tempbm->planes[3], 80*480 );
Read( m, tempbm->planes[4], 80*480 );
Read( m, tempbm->planes[5], 80*480 );
Read( m, tempbm->planes[6], 80*480 );
Read( m, tempbm->planes[7], 80*480 );
BltBitMapRastPort( tempbm, 0, 0, &temprp, 0, 0, 640, 480, 0x0C0 );
loadok = true;
Close( m );
}
FreeBitMap( tempbm );
}
return loadok;
}
void show_menu( void )
{
BltBitMapRastPort( menubm, 0, 0, win->RPort, win->BorderLeft, win->BorderTop, 640, 480, 0x0C0 );
}
void free_menu( void )
{
if( menubm != NULL ) FreeBitMap( menubm );
}
[/color]