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

Comparing deliantra/Deliantra-Client/rendercache.c (file contents):
Revision 1.8 by root, Tue Dec 25 18:58:32 2007 UTC vs.
Revision 1.9 by root, Sun Jan 13 08:31:45 2008 UTC

76} 76}
77 77
78static void 78static void
79rc_glyph (rc_array_t *arr, int u, int v, int w, int h, int x, int y) 79rc_glyph (rc_array_t *arr, int u, int v, int w, int h, int x, int y)
80{ 80{
81 if (w && h)
82 {
81 U8 *c; 83 U8 *c;
82 STRLEN len = SvCUR (arr); 84 STRLEN len = SvCUR (arr);
83 SvGROW (arr, len + 2 * 2 + 1 * 4); 85 SvGROW (arr, len + 2 * 2 + 1 * 4);
84 c = (U8 *)SvEND (arr); 86 c = (U8 *)SvEND (arr);
85 87
86 x += w; 88 x += w;
87 y += h; 89 y += h;
88 90
89 *c++ = u; 91 *c++ = u;
90 *c++ = v; 92 *c++ = v;
91 *c++ = w; 93 *c++ = w;
92 *c++ = h; 94 *c++ = h;
93 95
94 // use ber-encoding for up to 14 bits (16k) 96 // use ber-encoding for up to 14 bits (16k)
95 *c = 0x80 | (x >> 7); c += (x >> 7) ? 1 : 0; *c++ = x & 0x7f; 97 *c = 0x80 | (x >> 7); c += (x >> 7) ? 1 : 0; *c++ = x & 0x7f;
96 *c = 0x80 | (y >> 7); c += (y >> 7) ? 1 : 0; *c++ = y & 0x7f; 98 *c = 0x80 | (y >> 7); c += (y >> 7) ? 1 : 0; *c++ = y & 0x7f;
97 99
98 SvCUR_set (arr, c - (U8 *)SvPVX (arr)); 100 SvCUR_set (arr, c - (U8 *)SvPVX (arr));
101 }
99} 102}
100 103
101static void 104static void
102rc_draw (rc_t *rc) 105rc_draw (rc_t *rc)
103{ 106{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines