[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Forcing sprites to use specific palette entries?
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Forcing sprites to use specific palette entries?
- From: John Anderson <corporalmustard@xxxxxxxxx>
- Date: Thu, 12 Aug 2010 10:56:40 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 12 Aug 2010 13:56:53 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=qbeIiF2yahGA0jUuMq5hAsLWPxluGInRKjxLy/08QCY=; b=hjStJxonhid9oJqvI09GMNe+f1KbHE/i6VVeXrHr3xmKybgAwfIzlIr+VBuXRvMccp 4FuUcqCHw1smyKY23PiBFjJfpuHWUBVDhLo/UFuFguF9ibm79Ynv6VqaYQRHKk05YiPW FMN8u5yXQznCvsvEugRMAl7mA1PmNI0beO1/k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=n2JTpm9JkxD2qB9Ejhm9lp3i/f50TQEb+b69c4X3Zc2TwFqXl0Fk6RRHOrRMhJEwd9 fgwC10CfO5RhIwPnzRuORExj+IKLueZ5GpXWLkZ2G4YQX/IME+Q3FjaA9VE63qTdov8F 73pGlex6mHuZ2NtoNB7PwfpTcofcT6Rr5yP5k=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi, I was wondering if it was possible to force an 8-bit colour sprite to use a very particular set of palette entries, like say, Sprite A uses colour indicies 0 - 16, and Sprite B uses 17 - 32. As it stands, pygame automatically assigns the colours in a sprite to the closest colour on the main palette, meaning that it is very hard to predict which colours are where, and thus makes palette swapping a nightmare, is there any way around this?