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.297 by root, Tue Dec 22 00:08:11 2009 UTC vs.
Revision 1.299 by root, Tue Dec 22 01:37:41 2009 UTC

41#include <SDL_opengl.h> 41#include <SDL_opengl.h>
42 42
43/* work around os x broken headers */ 43/* work around os x broken headers */
44#ifdef __MACOSX__ 44#ifdef __MACOSX__
45typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); 45typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
46typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
47typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
46#endif 48#endif
47 49
48#define PANGO_ENABLE_BACKEND 50#define PANGO_ENABLE_BACKEND
49#define G_DISABLE_CAST_CHECKS 51#define G_DISABLE_CAST_CHECKS
50 52
928 930
929 SDL_WM_SetCaption ("Deliantra MORPG Client " VERSION, "Deliantra"); 931 SDL_WM_SetCaption ("Deliantra MORPG Client " VERSION, "Deliantra");
930#define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name); 932#define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name);
931#include "glfunc.h" 933#include "glfunc.h"
932#undef GL_FUNC 934#undef GL_FUNC
935
936 if (!gl.ActiveTexture ) gl.ActiveTexture = gl.ActiveTextureARB;
937 if (!gl.MultiTexCoord2f) gl.MultiTexCoord2f = gl.MultiTexCoord2fARB;
933 } 938 }
934} 939}
935 OUTPUT: 940 OUTPUT:
936 RETVAL 941 RETVAL
937 942
1670void 1675void
1671draw_fow_texture (float intensity, int hidden_tex, int name1, uint8_t *data1, float s, float t, int w, int h, float blend = 0.f, int dx = 0, int dy = 0, int name2 = 0, uint8_t *data2 = data1) 1676draw_fow_texture (float intensity, int hidden_tex, int name1, uint8_t *data1, float s, float t, int w, int h, float blend = 0.f, int dx = 0, int dy = 0, int name2 = 0, uint8_t *data2 = data1)
1672 PROTOTYPE: @ 1677 PROTOTYPE: @
1673 CODE: 1678 CODE:
1674{ 1679{
1675 glEnable (GL_TEXTURE_2D);
1676 glEnable (GL_BLEND); 1680 glEnable (GL_BLEND);
1677 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 1681 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1682 glEnable (GL_TEXTURE_2D);
1678 glBindTexture (GL_TEXTURE_2D, name1); 1683 glBindTexture (GL_TEXTURE_2D, name1);
1679 1684
1680 glColor3f (intensity, intensity, intensity); 1685 glColor3f (intensity, intensity, intensity);
1681 glPushMatrix (); 1686 glPushMatrix ();
1682 glScalef (1./3, 1./3, 1.); 1687 glScalef (1./3, 1./3, 1.);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines