Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old November 1, 2011, 14:07   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
[3.4-dev] Cannot compile with BC5

Got this error in main-win.c: unknown symbol AC_SRC_NO_PREMULT_ALPHA.
Looking at wingdi.h, both AC_SRC_ALPHA and AC_SRC_OVER symbols are defined, but not AC_SRC_NO_PREMULT_ALPHA.

Any idea what to do? Define AC_SRC_NO_PREMULT_ALPHA manually? With which value? Use AC_SRC_ALPHA instead?
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 3, 2013, 02:34   #2
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
Got this error in main-win.c: unknown symbol AC_SRC_NO_PREMULT_ALPHA.
Looking at wingdi.h, both AC_SRC_ALPHA and AC_SRC_OVER symbols are defined, but not AC_SRC_NO_PREMULT_ALPHA.

Any idea what to do? Define AC_SRC_NO_PREMULT_ALPHA manually? With which value? Use AC_SRC_ALPHA instead?
I've been waiting for this one too. This is one of the stop-points for me and the 3.4 borg.
APWhite is offline   Reply With Quote
Old February 3, 2013, 19:25   #3
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
Got this error in main-win.c: unknown symbol AC_SRC_NO_PREMULT_ALPHA.
Looking at wingdi.h, both AC_SRC_ALPHA and AC_SRC_OVER symbols are defined, but not AC_SRC_NO_PREMULT_ALPHA.

Any idea what to do? Define AC_SRC_NO_PREMULT_ALPHA manually? With which value? Use AC_SRC_ALPHA instead?
AC_SRC_NO_PREMULT_ALPHA should have been defined in wingdi.h. If it wasn't, it has the value 0x01. If it wasn't, you might want to add a compatibility define:

#ifndef AC_SRC_NO_PREMULT_ALPHA
#define AC_SRC_NO_PREMULT_ALPHA 0x01
#endif
Blue Baron is offline   Reply With Quote
Old February 4, 2013, 13:39   #4
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
The only value that's defines in all versions is AC_SRC_ALPHA. Use that instead of AC_SRC_NO_PREMULT_ALPHA which is not portable.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 4, 2013, 23:27   #5
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
The only value that's defines in all versions is AC_SRC_ALPHA. Use that instead of AC_SRC_NO_PREMULT_ALPHA which is not portable.
Actually, only AC_SRC_ALPHA is used in the code, so I don't know how AC_SRC_NO_PREMULT_ALPHA is being used. (I just did a search for "AC_SRC_" in both 3.4.1 and the current dev version.)

However, I think that AC_SRC_NO_PREMULT_ALPHA is being used internally somewhere, because when I did a google search for AC_SRC_NO_PREMULT_ALPHA the first entry is an old irc dev log from Sept 19, 2011, where Magnate had the same problem. I replied:"Hi magnate: €˜AC_SRC_NO_PREMULT_ALPHA' should be defined in wingdi.h, but that should already be included, since the standard drawing function already uses it. It is in wingdi.h, both in visual studio and mingw."

I can't find anything now to support that "since the standard drawing function already uses it" but I'm sure I did back then.

Later on in the log, d_m writes: "that was one of the mingw bugs before... we needed to define WINVER (or something like it) at a higher level." This could be the problem, I recall that I needed a WINVER of 0x0400, magnate needed a WINVER of 0x0410, and someone else needed 0x0500, though that might have been for the alpha blend function. Perhaps your wingdi.h needs a higher WINVER to define it?

If it is not in your wingdi.h, I guess try adding the compatibility define just below "#include <wingdi.h>"?

hmm I went back through old angband directories and AC_SRC_NO_PREMULT_ALPHA was being used in main-win.c in that period. However, it was changed to AC_SRC_ALPHA sometime between Dec 2011 and Jan 2012. So if you have the line:
"blendfn.AlphaFormat = AC_SRC_NO_PREMULT_ALPHA;//AC_SRC_ALPHA;"
in your main-win.c, then it should be:
"blendfn.AlphaFormat = AC_SRC_ALPHA;"

Whew. Lots of options here, which seems closest to the problem?
Blue Baron is offline   Reply With Quote
Old February 5, 2013, 13:00   #6
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
My code has: blendfn.AlphaFormat = AC_SRC_ALPHA. I guess I changed it at the same time as it was changed.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone got Z+ to compile in VS2008? APWhite Development 1 May 4, 2011 06:52
Trying to compile 3.1.2v2 on OS X kLy Development 0 December 2, 2010 17:45
[O] Error Using Dev-C++ to compile BennyG Variants 8 October 2, 2009 17:51
r1353 compile errors PaulBlay Vanilla 10 April 13, 2009 09:19
Compile failure for 3.0.9 on Mac OS X 10.4.10 TreeFrog Vanilla 4 November 8, 2007 15:58


All times are GMT +1. The time now is 20:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.