11 May 2017, 08:59 | #1 |
Moderator
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,167
|
Displaying multiple CopLists at once
Just at the beginning of a little project and I'm trying to get three CopLists on the screen at once, one is the main game area (coplist 0) and the other two are status panels which will contains score and lives info for the two players.
So I have: Code:
InitCopList 0,60,224,$00005,8,32,0 ; main game display InitCopList 1,44,12,$00005,8,32,0 ; p1 panel InitCopList 2,288,12,$00005,8,32,0 ; p2 panel Bitmap 0,320,224,5:Bitmap 1,320,224,5 ; main game display Bitmap 2,320,16,5:Bitmap 3,320,16,5 ; panel displays [Placeholder tile gfx blit onto bitmaps 0 and 1] [Print "p1 test" and "p2 test" text onto bitmaps 2 and 3] CreateDisplay 1,0,2 Repeat Vwait DisplayBitmap 0,db DisplayBitmap 1,2:DisplayBitmap 2,3 db=1-db UnBuffer db Use Bitmap db Until RawStatus($45):End Any ideas? On other projects, I can have two CopLists displaying fine, but any more than two and I run into problems |
11 May 2017, 10:30 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Hmmm... It sounds to me like you're actually printing the text to the same bitmap since the text is appearing below the other text - are you doing a BitmapOutput command before the first NPrint? Output will default to the last bitmap created unless you tell it otherwise.
If you pop out of Blitz mode (or initialise your bitmaps in Amiga mode), you can save the bitmaps to RAM: in order to see if they really contain what you expect: Code:
SaveBitmap 0, "RAM:bitmap0.iff" SaveBitmap 1, "RAM:bitmap1.iff" Delay_ 50 ; Just to let file access finish before shutting down multitasking. |
11 May 2017, 11:51 | #3 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Not that it has anything to do with your NPrint problem (which Daedalus points out above), but I think you need a few blank lines between your coplists.
|
12 May 2017, 08:56 | #4 |
Moderator
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,167
|
Thanks chaps for the help.
Well, what do you know - it was the BitmapOutput command. What I was doing was using BitmapOutput on both bitmaps 2 and 3, and then using Use Bitmap before using NPrint, but that had no effect - the last bitmap referenced for BitmapOutput was 3, so all text was printed to that. The reason I came to the conclusion I initially did (which was mad, I know) is that I've experimented with multiple CopLists in the past and always had problems getting them to display properly (not text-wise, just in general), so I automatically thought I was missing something. As idrougge points out, on those occasions it might well have been too few blank lines between CopLists but I took care on this occasion to ensure there was a gap of four lines between each one. Anyway, up and running now, so a big thanks to you both for putting me on the right track |
12 May 2017, 11:12 | #5 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
It's been to long since I made a coplist-based Display, I didn't notice that you specified the panels to be only 12 pixels high.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Screen not displaying on 2.6.1 | Amiga1992 | support.WinUAE | 4 | 25 August 2013 17:50 |
CDTV without picture displaying ?? | haynor666 | support.Hardware | 34 | 18 February 2013 05:26 |
Displaying images | Tiddlypeeps | Coders. Tutorials | 40 | 30 August 2012 10:11 |
Displaying sprites | Hewitson | Coders. General | 18 | 27 April 2011 16:35 |
A1200 not displaying correct colours | Magno Boots | support.Hardware | 6 | 09 September 2008 13:40 |
|
|