ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.79 by root, Sun May 14 22:24:14 2006 UTC vs.
Revision 1.80 by root, Sun May 14 22:58:24 2006 UTC

7 7
8#include "EXTERN.h" 8#include "EXTERN.h"
9#include "perl.h" 9#include "perl.h"
10#include "XSUB.h" 10#include "XSUB.h"
11 11
12#include <math.h>
12#include <string.h> 13#include <string.h>
13#include <stdio.h> 14#include <stdio.h>
14 15
15#include <SDL.h> 16#include <SDL.h>
16#include <SDL_endian.h> 17#include <SDL_endian.h>
1589void glEnd () 1590void glEnd ()
1590 1591
1591void glColor (float r, float g, float b, float a = 1.0) 1592void glColor (float r, float g, float b, float a = 1.0)
1592 PROTOTYPE: @ 1593 PROTOTYPE: @
1593 CODE: 1594 CODE:
1594 // 255.999 is close enough to correctness (256 and clamp) 1595 glColor4ub (MIN ((int)r * 256., 255),
1595 glColor4ub (r * 255.999, g * 255.999, b * 255.999, a * 255.999); 1596 MIN ((int)g * 256., 255),
1597 MIN ((int)b * 256., 255),
1598 MIN ((int)a * 256., 255));
1596 1599
1597void glVertex (float x, float y, float z = 0.) 1600void glVertex (float x, float y, float z = 0.)
1598 CODE: 1601 CODE:
1599 glVertex3f (x, y, z); 1602 glVertex3f (x, y, z);
1600 1603

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines