24 August 2019, 14:07 | #21 | |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Quote:
Something like this: Code:
; Xor %100001 with the default $224 to get the rear playfield behind all sprites, and the front playfield behind channels 0 & 1 only ; $1C00 sets 2nd playfield palette to start at 16 ; Xor $23 with the default $11 to set sprite bank 3 for odd & joined sprites, and bank 2 for even sprites DisplayControls 0, Xor(%100001, $224), $1C00, Xor($23, $11) |
|
14 January 2020, 23:40 | #22 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
I just want all sprites to be above the bitplanes (no dual playfield)
BPLCON2 was set to 0, and sprites are behind the bitplanes. Tried to set to $1F made no difference. Someone help? |
15 January 2020, 00:57 | #23 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
$24
|
15 January 2020, 06:45 | #24 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
bplcon2 <= $24: that works. Thanks! All sprites are on the foreground.
I wonder why the documentation is so hard to understand / lacks simple basic examples like this. That's the second time someone answers with an hex value and I put it in my code and it works exactly as I intended. Thanks again. |
15 January 2020, 09:52 | #25 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Just to explain the magic number: some examples are sadly lacking from the Blitz documentation, but the register is universal across languages so you can read more detail about it here. For a non-dual-playfield display, bits 5-3 set the priority, with %100 being what you're looking for to put all sprites above the playfield. So you want a value of %00100000, which is $20 (or %00100100 to also cover dual playfield displays, which is $24).
The additional problem is that Blitz XORs the default value with the given value, so to apply a value, you need to bear this in mind as simply giving the desired value won't always work. That's why I pre-XOR the values in my examples, so I would do it this way for sprite priority: Code:
DisplayControls 0, Xor(%00100100, $224), $1C00, 0 |
15 January 2020, 17:02 | #26 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
thanks! I see that a lot of things can be done with sprites/playfields, and it can depend on the sprite number as well!
|
15 January 2020, 18:37 | #27 |
Long time Amiga Owner
Join Date: Jun 2017
Location: Uxbridge Canada
Age: 56
Posts: 182
|
Daedalus:
I am always so impressed with you. Your wealth of knowledge is amazing. Is there not a autobiography on you? Your accomplishments, reward etc? I for one would read that. RC |
15 January 2020, 22:03 | #28 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Haha, cheers! That's just a misspent youth, nothing more
|
15 January 2020, 22:57 | #29 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,410
|
On the topic of sprite priorities, are there some good examples in either games of demos of sprites used while having "odd" or unusual priority schemes?
I've often wondered what could be achieved this way and some examples always kickstart my imagination. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing sprite images in long display lists | phx | Coders. Asm / Hardware | 2 | 12 March 2016 20:13 |
MagicMenu Task Priority | NovaCoder | support.Apps | 2 | 10 February 2013 10:42 |
More settings in priority panel | Thom87 | request.UAE Wishlist | 2 | 24 January 2008 15:23 |
priority resets after reset | jrom | support.WinUAE | 0 | 10 April 2004 16:05 |
|
|