pkgsrc/games/abuse/patches/patch-am
wiz 1d8934beac Make build with gcc3. Patches gleaned from abuse-sdl project.
Use CXX instead of CC for linking c++ code.
2004-07-11 00:11:26 +00:00

22 lines
673 B
Text

$NetBSD: patch-am,v 1.1 2004/07/11 00:11:26 wiz Exp $
--- abuse/src/gamma.c.orig 1996-04-14 22:14:21.000000000 +0200
+++ abuse/src/gamma.c
@@ -136,12 +136,11 @@ void gamma_correct(palette *&pal, int fo
pal=new palette;
for (int i=0;i<256;i++)
{
- double r,g,b;
- uchar or,og,ob;
- old_pal->get(i,or,og,ob);
- pal->set(i,(int)(pow(or/255.0,gamma)*255),
- (int)(pow(og/255.0,gamma)*255),
- (int)(pow(ob/255.0,gamma)*255));
+ uchar oldr,oldg,oldb;
+ old_pal->get(i,oldr,oldg,oldb);
+ pal->set(i,(int)(pow(oldr/255.0,gamma)*255),
+ (int)(pow(oldg/255.0,gamma)*255),
+ (int)(pow(oldb/255.0,gamma)*255));
}
pal->load();