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.29 by root, Thu Apr 13 01:55:38 2006 UTC vs.
Revision 1.40 by root, Sat Apr 15 01:13:46 2006 UTC

6#include <stdio.h> 6#include <stdio.h>
7 7
8#include <SDL.h> 8#include <SDL.h>
9#include <SDL_image.h> 9#include <SDL_image.h>
10#include <SDL_opengl.h> 10#include <SDL_opengl.h>
11
12#include <glib/gmacros.h>
11 13
12#include <pango/pango.h> 14#include <pango/pango.h>
13#include <pango/pangofc-fontmap.h> 15#include <pango/pangofc-fontmap.h>
14#include <pango/pangoft2.h> 16#include <pango/pangoft2.h>
15 17
35 37
36static void 38static void
37substitute_func (FcPattern *pattern, gpointer data) 39substitute_func (FcPattern *pattern, gpointer data)
38{ 40{
39 FcPatternAddBool (pattern, FC_HINTING , 1); 41 FcPatternAddBool (pattern, FC_HINTING , 1);
40 FcPatternAddBool (pattern, FC_AUTOHINT, 1); 42 FcPatternAddBool (pattern, FC_AUTOHINT, 0);
41} 43}
42 44
43static void 45static void
44layout_update (CFClient__Layout self) 46layout_update (CFClient__Layout self)
45{ 47{
61 if (!*w) *w = 1; 63 if (!*w) *w = 1;
62 if (!*h) *h = 1; 64 if (!*h) *h = 1;
63} 65}
64 66
65typedef struct { 67typedef struct {
68 GLint name;
69 int w, h;
70 float s, t;
71 uint8_t r, g, b, a;
72} mapface;
73
74typedef struct {
66 int16_t darkness; 75 int16_t darkness;
67 uint16_t face[3]; 76 uint16_t face[3];
68} mapcell; 77} mapcell;
69 78
70typedef struct { 79typedef struct {
71 uint32_t c0, c1; 80 int32_t c0, c1;
72 mapcell *col; 81 mapcell *col;
73} maprow; 82} maprow;
74 83
75typedef struct map { 84typedef struct map {
76 int x, y, w, h; 85 int x, y, w, h;
86 int vx, vy;
77 int faces; 87 int faces;
78 GLint *face; 88 mapface *face;
79 89
80 uint32_t rows; 90 uint32_t rows;
81 maprow *row; 91 maprow *row;
82} *CFClient__Map; 92} *CFClient__Map;
83 93
94static char *
95prepend (char *ptr, int sze, int inc)
96{
97 char *p;
98
99 New (0, p, sze + inc, char);
100 Zero (p, inc, char);
101 Move (ptr, p + inc, sze, char);
102 Safefree (ptr);
103
104 return p;
105}
106
107static char *
108append (char *ptr, int sze, int inc)
109{
110 Renew (ptr, sze + inc, char);
111 Zero (ptr + sze, inc, char);
112
113 return ptr;
114}
115
116#define Append(type,ptr,sze,inc) (ptr) = (type *)append ((char *)ptr, (sze) * sizeof (type), (inc) * sizeof (type))
117#define Prepend(type,ptr,sze,inc) (ptr) = (type *)prepend ((char *)ptr, (sze) * sizeof (type), (inc) * sizeof (type))
118
119static void
120map_clear (CFClient__Map self)
121{
122 int r;
123
124 for (r = 0; r < self->rows; r++)
125 Safefree (self->row[r].col);
126
127 Safefree (self->row);
128
129 self->x = 0;
130 self->y = 0;
131 self->vx = 0;
132 self->vy = 0;
133 self->row = 0;
134 self->rows = 0;
135}
136
84static void 137static void
85map_blank (CFClient__Map self, int x0, int y0, int w, int h) 138map_blank (CFClient__Map self, int x0, int y0, int w, int h)
86{ 139{
87 int x, y; 140 int x, y;
88 141
89 for (y = y0; y < y0 + h; y++) 142 for (y = y0; y < y0 + h; y++)
143 if (y >= 0)
90 { 144 {
91 if (y >= self->rows) 145 if (y >= self->rows)
92 break; 146 break;
93 147
94 maprow *row = self->row + y; 148 maprow *row = self->row + y;
95 149
96 for (x = x0; x < x0 + w; x++) 150 for (x = x0; x < x0 + w; x++)
97 if (x >= row->c0) 151 if (x >= row->c0)
98 { 152 {
99 if (x >= row->c1) 153 if (x >= row->c1)
100 break; 154 break;
101 155
102 row->col[x].darkness = -1; 156 row->col[x - row->c0].darkness = -1;
103 } 157 }
104 } 158 }
105} 159}
106 160
107MODULE = CFClient PACKAGE = CFClient 161MODULE = CFClient PACKAGE = CFClient
108 162
109PROTOTYPES: ENABLE 163PROTOTYPES: ENABLE
189 fmt.colorkey = 0; 243 fmt.colorkey = 0;
190 fmt.alpha = 0; 244 fmt.alpha = 0;
191 245
192 surface2 = SDL_ConvertSurface (surface, &fmt, SDL_SWSURFACE); 246 surface2 = SDL_ConvertSurface (surface, &fmt, SDL_SWSURFACE);
193 247
248 assert (surface2->pitch == surface2->w * 4);
249
194 EXTEND (SP, 5); 250 EXTEND (SP, 5);
195 PUSHs (sv_2mortal (newSViv (surface2->w))); 251 PUSHs (sv_2mortal (newSViv (surface2->w)));
196 PUSHs (sv_2mortal (newSViv (surface2->h))); 252 PUSHs (sv_2mortal (newSViv (surface2->h)));
197 SDL_LockSurface (surface2); 253 SDL_LockSurface (surface2);
198 PUSHs (sv_2mortal (newSVpvn (surface2->pixels, surface2->h * surface2->pitch))); 254 PUSHs (sv_2mortal (newSVpvn (surface2->pixels, surface2->h * surface2->pitch)));
204 SDL_FreeSurface (surface); 260 SDL_FreeSurface (surface);
205 SDL_FreeSurface (surface2); 261 SDL_FreeSurface (surface2);
206} 262}
207 263
208void 264void
265average (int x, int y, uint32_t *data)
266 PPCODE:
267{
268 uint32_t r = 0, g = 0, b = 0, a = 0;
269
270 x = y = x * y;
271
272 while (x--)
273 {
274 uint32_t p = *data++;
275
276 r += (p ) & 255;
277 g += (p >> 8) & 255;
278 b += (p >> 16) & 255;
279 a += (p >> 24) & 255;
280 }
281
282 EXTEND (SP, 4);
283 PUSHs (sv_2mortal (newSViv (r / y)));
284 PUSHs (sv_2mortal (newSViv (g / y)));
285 PUSHs (sv_2mortal (newSViv (b / y)));
286 PUSHs (sv_2mortal (newSViv (a / y)));
287}
288
289void
209fatal (char *message) 290fatal (char *message)
210 CODE: 291 CODE:
211#ifdef WIN32 292#ifdef WIN32
212 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND); 293 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND);
213#else 294#else
214 fprintf (stderr, "%s\n", message); 295 fprintf (stderr, "FATAL: %s\n", message);
215#endif 296#endif
216 exit (1); 297 exit (1);
217 298
218MODULE = CFClient PACKAGE = CFClient::Layout 299MODULE = CFClient PACKAGE = CFClient::Layout
219 300
232 CODE: 313 CODE:
233 g_object_unref (self->pl); 314 g_object_unref (self->pl);
234 Safefree (self); 315 Safefree (self);
235 316
236void 317void
318set_text (CFClient::Layout self, SV *text_)
319 CODE:
320{
321 STRLEN textlen;
322 char *text = SvPVutf8 (text_, textlen);
323
324 pango_layout_set_text (self->pl, text, textlen);
325}
326
327void
237set_markup (CFClient::Layout self, SV *text_) 328set_markup (CFClient::Layout self, SV *text_)
238 CODE: 329 CODE:
239{ 330{
240 STRLEN textlen; 331 STRLEN textlen;
241 char *text = SvPVutf8 (text_, textlen); 332 char *text = SvPVutf8 (text_, textlen);
286 PPCODE: 377 PPCODE:
287{ 378{
288 PangoRectangle strong_pos; 379 PangoRectangle strong_pos;
289 layout_update (self); 380 layout_update (self);
290 pango_layout_get_cursor_pos (self->pl, index, &strong_pos, 0); 381 pango_layout_get_cursor_pos (self->pl, index, &strong_pos, 0);
382
291 EXTEND (SP, 3); 383 EXTEND (SP, 3);
292 PUSHs (sv_2mortal (newSViv (strong_pos.x / PANGO_SCALE))); 384 PUSHs (sv_2mortal (newSViv (strong_pos.x / PANGO_SCALE)));
293 PUSHs (sv_2mortal (newSViv (strong_pos.y / PANGO_SCALE))); 385 PUSHs (sv_2mortal (newSViv (strong_pos.y / PANGO_SCALE)));
294 PUSHs (sv_2mortal (newSViv (strong_pos.height / PANGO_SCALE))); 386 PUSHs (sv_2mortal (newSViv (strong_pos.height / PANGO_SCALE)));
295} 387}
327} 419}
328 420
329MODULE = CFClient PACKAGE = CFClient::Texture 421MODULE = CFClient PACKAGE = CFClient::Texture
330 422
331void 423void
332draw_quad (SV *self, double x, double y, double w = 0, double h = 0) 424draw_quad (SV *self, float x, float y, float w = 0, float h = 0)
333 PROTOTYPE: $$$;$$ 425 PROTOTYPE: $$$;$$
334 CODE: 426 CODE:
335{ 427{
336 HV *hv = (HV *)SvRV (self); 428 HV *hv = (HV *)SvRV (self);
337 double s = SvNV (*hv_fetch (hv, "s", 1, 1)); 429 float s = SvNV (*hv_fetch (hv, "s", 1, 1));
338 double t = SvNV (*hv_fetch (hv, "t", 1, 1)); 430 float t = SvNV (*hv_fetch (hv, "t", 1, 1));
339 int name = SvIV (*hv_fetch (hv, "name", 4, 1)); 431 int name = SvIV (*hv_fetch (hv, "name", 4, 1));
432 int wrap_mode = SvIV (*hv_fetch (hv, "wrap_mode", 9, 1));
340 433
341 if (items < 5) 434 if (items < 5)
342 { 435 {
343 w = SvNV (*hv_fetch (hv, "w", 1, 1)); 436 w = SvNV (*hv_fetch (hv, "w", 1, 1));
344 h = SvNV (*hv_fetch (hv, "h", 1, 1)); 437 h = SvNV (*hv_fetch (hv, "h", 1, 1));
345 } 438 }
346 439
347 glBindTexture (GL_TEXTURE_2D, name); 440 glBindTexture (GL_TEXTURE_2D, name);
441 if (wrap_mode) {
442 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
443 glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
444 }
348 glBegin (GL_QUADS); 445 glBegin (GL_QUADS);
349 glTexCoord2d (0, 0); glVertex2d (x , y ); 446 glTexCoord2f (0, 0); glVertex2f (x , y );
350 glTexCoord2d (0, t); glVertex2d (x , y + h); 447 glTexCoord2f (0, t); glVertex2f (x , y + h);
351 glTexCoord2d (s, t); glVertex2d (x + w, y + h); 448 glTexCoord2f (s, t); glVertex2f (x + w, y + h);
352 glTexCoord2d (s, 0); glVertex2d (x + w, y ); 449 glTexCoord2f (s, 0); glVertex2f (x + w, y );
353 glEnd (); 450 glEnd ();
354} 451}
355 452
356MODULE = CFClient PACKAGE = CFClient::Map 453MODULE = CFClient PACKAGE = CFClient::Map
357 454
361 New (0, RETVAL, 1, struct map); 458 New (0, RETVAL, 1, struct map);
362 RETVAL->x = 0; 459 RETVAL->x = 0;
363 RETVAL->y = 0; 460 RETVAL->y = 0;
364 RETVAL->w = map_width; 461 RETVAL->w = map_width;
365 RETVAL->h = map_height; 462 RETVAL->h = map_height;
463 RETVAL->vx = 0;
464 RETVAL->vy = 0;
366 RETVAL->faces = 1; 465 RETVAL->faces = 8192;
367 Newz (0, RETVAL->face, 1, GLint); 466 Newz (0, RETVAL->face, RETVAL->faces, mapface);
368 RETVAL->rows = 0; 467 RETVAL->rows = 0;
369 RETVAL->row = 0; 468 RETVAL->row = 0;
370 printf ("new map %d,%d\n", map_width, map_height);//D
371 OUTPUT: 469 OUTPUT:
372 RETVAL 470 RETVAL
373 471
374void 472void
375DESTROY (CFClient::Map self) 473DESTROY (CFClient::Map self)
376 CODE: 474 CODE:
377{ 475{
378 int r, c; 476 map_clear (self);
379
380 printf ("detroy map\n");//D
381 Safefree (self->face); 477 Safefree (self->face);
382
383 for (r = 0; r < self->rows; r++)
384 Safefree (self->row[r].col);
385
386 Safefree (self->row);
387 Safefree (self); 478 Safefree (self);
388} 479}
389 480
390void 481void
391set_face (CFClient::Map self, int facenum, int face) 482clear (CFClient::Map self)
392 CODE: 483 CODE:
484 map_clear (self);
485
486void
487set_texture (CFClient::Map self, int face, int name, int w, int h, float s, float t, int r, int g, int b, int a)
488 CODE:
393{ 489{
394 while (self->faces < facenum) 490 while (self->faces < face)
395 { 491 {
396 printf ("setface %d (%d) = %d\n",facenum, self->faces, face);//D
397 Renew (self->face, self->faces * 2, GLint);
398 Zero (self->face + self->faces, self->faces, GLint); 492 Append (mapface, self->face, self->faces, self->faces);
399 self->faces *= 2; 493 self->faces *= 2;
400 } 494 }
401 495
402 self->face [facenum] = face; 496 mapface *f = self->face + face;
497
498 f->name = name;
499 f->w = w;
500 f->h = h;
501 f->s = s;
502 f->t = t;
503 f->r = r;
504 f->g = g;
505 f->b = b;
506 f->a = a;
403} 507}
404 508
405void 509void
406scroll (CFClient::Map self, int dx, int dy) 510scroll (CFClient::Map self, int dx, int dy)
407 CODE: 511 CODE:
408{ 512{
409 printf ("map_scroll %d,%d\n", dx, dy);//D
410 if (dx > 0) 513 if (dx > 0)
411 map_blank (self, self->x, self->y, dx - 1, self->h); 514 map_blank (self, self->x, self->y, dx - 1, self->h);
412 else if (dx < 0) 515 else if (dx < 0)
413 map_blank (self, self->x + self->w + dx + 1, self->y, 1 - dx, self->h); 516 map_blank (self, self->x + self->w + dx + 1, self->y, 1 - dx, self->h);
414 517
420 self->x += dx; 523 self->x += dx;
421 self->y += dy; 524 self->y += dy;
422 525
423 while (self->y < 0) 526 while (self->y < 0)
424 { 527 {
425 maprow *row; 528 Prepend (maprow, self->row, self->rows, MAP_EXTEND_Y);
426
427 New (0, row, self->rows + MAP_EXTEND_Y, maprow);
428 Move (self->row, row + MAP_EXTEND_Y, self->rows, maprow);
429 Zero (row, MAP_EXTEND_Y, maprow);
430 529
431 self->rows += MAP_EXTEND_Y; 530 self->rows += MAP_EXTEND_Y;
432 self->y += MAP_EXTEND_Y; 531 self->y += MAP_EXTEND_Y;
433 self->row = row;
434 } 532 }
435
436 if (self->x < 0)
437 {
438 int y;
439 for (y = 0; y < self->rows; y++)
440 {
441 self->row[y].c0 += self->x;
442 self->row[y].c1 += self->x;
443 }
444
445 self->x = 0;
446 }
447} 533}
448 534
449void 535void
450map1a_update (CFClient::Map self, SV *data_) 536map1a_update (CFClient::Map self, SV *data_)
451 CODE: 537 CODE:
452{ 538{
453 uint8_t *data = (uint8_t *)SvPVbytes_nolen (data_); 539 uint8_t *data = (uint8_t *)SvPVbyte_nolen (data_);
454 uint8_t *data_end = (uint8_t *)SvEND (data_) + 1; 540 uint8_t *data_end = (uint8_t *)SvEND (data_);
455 541
456 while (data < data_end) 542 while (data < data_end)
457 { 543 {
458 int flags = (data [0] << 8) + data [1]; data += 2; 544 int flags = (data [0] << 8) + data [1]; data += 2;
545
459 int x = ((flags >> 10) & 63) + self->x; 546 int x = ((flags >> 10) & 63) + self->x;
460 int y = ((flags >> 4) & 63) + self->y; 547 int y = ((flags >> 4) & 63) + self->y;
461 548
462 while (y >= self->rows) 549 while (y >= self->rows)
463 { 550 {
464 Renew (self->row, self->rows + MAP_EXTEND_Y, maprow);
465 Zero (self->row + self->rows, MAP_EXTEND_Y, maprow); 551 Prepend (maprow, self->row, self->rows, MAP_EXTEND_Y);
466 552
467 self->rows += MAP_EXTEND_Y; 553 self->rows += MAP_EXTEND_Y;
468 } 554 }
469
470 assert (y < self->rows);//D
471 555
472 maprow *row = self->row + y; 556 maprow *row = self->row + y;
473 557
474 if (!row->col) 558 if (!row->col)
475 { 559 {
479 } 563 }
480 564
481 if (row->c0 > x) 565 if (row->c0 > x)
482 { 566 {
483 int extend = row->c0 - x + MAP_EXTEND_X; 567 int extend = row->c0 - x + MAP_EXTEND_X;
484 mapcell *col; 568 Prepend (mapcell, row->col, row->c1 - row->c0, extend);
485
486 New (0, col, row->c1 - row->c0 + extend, mapcell);
487 Move (row->col, col + extend, row->c1 - row->c0, mapcell);
488 Zero (col, extend, mapcell);
489
490 row->col = col;
491 row->c0 -= extend; 569 row->c0 -= extend;
492 } 570 }
493 else if (x >= row->c1) 571 else if (x >= row->c1)
494 { 572 {
495 int extend = x - row->c1 + MAP_EXTEND_X; 573 int extend = x - row->c1 + MAP_EXTEND_X;
496
497 Renew (row->col, row->c1 - row->c0 + extend, mapcell);
498 Zero (row->col + row->c1 - row->c0, extend, mapcell); 574 Append (mapcell, row->col, row->c1 - row->c0, extend);
499
500 row->c1 += extend; 575 row->c1 += extend;
501 } 576 }
502 577
578 assert (y >= 0);
579 assert (y < self->rows);
503 assert (x >= row->c0);//D 580 assert (x >= row->c0);
504 assert (x < row->c1);//D 581 assert (x < row->c1);
505 mapcell *cell = row->col + (x - row->c0); 582 mapcell *cell = row->col + (x - row->c0);
506 583
507 if (flags & 15) 584 if (flags & 15)
508 { 585 {
509 if (cell->darkness < 0) 586 if (cell->darkness < 0 && x < self->w && y < self->h)
510 { 587 {
511 cell->darkness = 0; 588 cell->darkness = 0;
512 cell->face [0] = 0; 589 cell->face [0] = 0;
513 cell->face [1] = 0; 590 cell->face [1] = 0;
514 cell->face [2] = 0; 591 cell->face [2] = 0;
534 else 611 else
535 cell->darkness = -1; 612 cell->darkness = -1;
536 } 613 }
537} 614}
538 615
616SV *
617mapmap (CFClient::Map self, int w, int h)
618 CODE:
619{
620 int x0, x1, x;
621 int y0, y1, y;
622 int z;
623 SV *map_sv = newSV (w * h * sizeof (uint32_t));
624 uint32_t *map = (uint32_t *)SvPVX (map_sv);
625
626 SvPOK_only (map_sv);
627 SvCUR_set (map_sv, w * h * sizeof (uint32_t));
628
629 x0 = self->x - w / 2; x1 = x0 + w;
630 y0 = self->y - h / 2; y1 = y0 + h;
631
632 for (y = y0; y < y1; y++)
633 {
634 maprow *row = 0 <= y && y < self->rows
635 ? self->row + y
636 : 0;
637
638 for (x = x0; x < x1; x++)
639 {
640 int r = 32, g = 32, b = 32, a = 192;
641
642 if (row && row->c0 <= x && x < row->c1)
643 {
644 mapcell *cell = row->col + (x - row->c0);
645
646 for (z = 0; z <= 0; z++)
647 {
648 uint16_t face = cell->face [z];
649
650 if (face)
651 {
652 mapface tex = self->face [face];
653 int a0 = 255 - tex.a;
654 int a1 = tex.a;
655
656 r = (r * a0 + tex.r * a1) / 255;
657 g = (g * a0 + tex.g * a1) / 255;
658 b = (b * a0 + tex.b * a1) / 255;
659 a = (a * a0 + tex.a * a1) / 255;
660 }
661 }
662 }
663
664 *map++ = (r )
665 | (g << 8)
666 | (b << 16)
667 | (a << 24);
668 }
669 }
670
671 RETVAL = map_sv;
672}
673 OUTPUT:
674 RETVAL
675
676void
677draw (CFClient::Map self, int shift_x, int shift_y, int x0, int y0, int sw, int sh)
678 PPCODE:
679{
680 int sw4 = (sw + 3) & ~3;
681 SV *darkness_sv = sv_2mortal (newSV (sw4 * sh));
682 uint8_t *darkness = (uint8_t *)SvPVX (darkness_sv);
683
684 SvPOK_only (darkness_sv);
685 SvCUR_set (darkness_sv, sw4 * sh);
686
687 int vx = self->x + (self->w - sw) / 2 - shift_x;
688 int vy = self->y + (self->h - sh) / 2 - shift_y;
689
690 if (0)
691 {
692 int vx = self->vx = self->w >= sw
693 ? self->x + (self->w - sw) / 2
694 : MIN (self->x, MAX (self->x + self->w - sw + 1, self->vx));
695
696 int vy = self->vy = self->h >= sh
697 ? self->y + (self->h - sh) / 2
698 : MIN (self->y, MAX (self->y + self->h - sh + 1, self->vy));
699 }
700
701 glColor4ub (255, 255, 255, 255);
702
703 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
704 glEnable (GL_BLEND);
705 glEnable (GL_TEXTURE_2D);
706 glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
707
708 int x, y, z;
709
710 int last_name = 0;
711
712 glBegin (GL_QUADS);
713
714 for (z = 0; z < 3; z++)
715 for (y = 0; y < sh; y++)
716 if (0 <= y + vy && y + vy < self->rows)
717 {
718 maprow *row = self->row + (y + vy);
719
720 for (x = 0; x < sw; x++)
721 if (row->c0 <= x + vx && x + vx < row->c1)
722 {
723 mapcell *cell = row->col + (x + vx - row->c0);
724
725 darkness[y * sw4 + x] = cell->darkness < 0
726 ? 255 - FOW_DARKNESS
727 : 255 - cell->darkness;
728
729 uint16_t face = cell->face [z];
730
731 if (face)
732 {
733 mapface tex = self->face [face];
734
735 int px = (x + 1) * 32 - tex.w;
736 int py = (y + 1) * 32 - tex.h;
737
738 if (last_name != tex.name)
739 {
740 glEnd ();
741 last_name = tex.name;
742 glBindTexture (GL_TEXTURE_2D, last_name);
743 glBegin (GL_QUADS);
744 }
745
746 glTexCoord2f (0 , 0 ); glVertex2f (px , py );
747 glTexCoord2f (0 , tex.t); glVertex2f (px , py + tex.h);
748 glTexCoord2f (tex.s, tex.t); glVertex2f (px + tex.w, py + tex.h);
749 glTexCoord2f (tex.s, 0 ); glVertex2f (px + tex.w, py );
750 }
751 }
752 }
753
754 glEnd ();
755
756 glDisable (GL_TEXTURE_2D);
757 glDisable (GL_BLEND);
758
759 EXTEND (SP, 3);
760 PUSHs (sv_2mortal (newSViv (sw4)));
761 PUSHs (sv_2mortal (newSViv (sh)));
762 PUSHs (darkness_sv);
763}
764

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines