Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / No dword? Integers don't handle alpha component!

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Feb 2017 00:36
At least I think that's the issue. My formulas are converted from DBP which uses dwords to store color values.

Take this example for instance:


Those components should make the blue color you see in the pic, except at 50% alpha. Instead, it's giving it a red tint. Higher the alpha value, the more red that gets mixed into my color. The pixels being drawn are in a memblock, so there's no underlying colors that would affect the appearance of the alpha. Would anyone have a solution other than me writing each component to the memblock separately?

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Feb 2017 00:41
Nevermind! Stupid endian formats! Writing as an integer, the format is ABGR!

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Feb 2017 08:27
You can also use MakeColor() which is a neat way to do the same thing.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Feb 2017 09:06 Edited at: 15th Feb 2017 09:09
Except MakeColor() ignores alpha

I use this:
AGK V2 user - Tier 1 (mostly)

Login to post a reply

Server time is: 2024-04-19 08:54:27
Your offset time is: 2024-04-19 08:54:27