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.139 by root, Mon Aug 14 03:04:17 2006 UTC vs.
Revision 1.141 by root, Fri Aug 18 01:01:00 2006 UTC

154 rect.width = (rect.width + PANGO_SCALE - 1) / PANGO_SCALE; 154 rect.width = (rect.width + PANGO_SCALE - 1) / PANGO_SCALE;
155 rect.height = (rect.height + PANGO_SCALE - 1) / PANGO_SCALE; 155 rect.height = (rect.height + PANGO_SCALE - 1) / PANGO_SCALE;
156 156
157 if (!rect.width) rect.width = 1; 157 if (!rect.width) rect.width = 1;
158 if (!rect.height) rect.height = 1; 158 if (!rect.height) rect.height = 1;
159
160 rect.width = (rect.width + 3) & ~3;
161 159
162 *w = rect.width; 160 *w = rect.width;
163 *h = rect.height; 161 *h = rect.height;
164} 162}
165 163
1262 self->y += MAP_EXTEND_Y; 1260 self->y += MAP_EXTEND_Y;
1263 } 1261 }
1264} 1262}
1265 1263
1266void 1264void
1267map1a_update (CFPlus::Map self, SV *data_) 1265map1a_update (CFPlus::Map self, SV *data_, int extmap)
1268 CODE: 1266 CODE:
1269{ 1267{
1270 uint8_t *data = (uint8_t *)SvPVbyte_nolen (data_); 1268 uint8_t *data = (uint8_t *)SvPVbyte_nolen (data_);
1271 uint8_t *data_end = (uint8_t *)SvEND (data_); 1269 uint8_t *data_end = (uint8_t *)SvEND (data_);
1272 mapcell *cell; 1270 mapcell *cell;
1289 cell->face [0] = 0; 1287 cell->face [0] = 0;
1290 cell->face [1] = 0; 1288 cell->face [1] = 0;
1291 cell->face [2] = 0; 1289 cell->face [2] = 0;
1292 } 1290 }
1293 1291
1292 if (flags & 8)
1293 {
1294 fprintf (stderr, "oi\n");//D
1295 if (extmap)
1296 {
1297 uint8_t ext, cmd;
1298
1299 do
1300 {
1301
1302 ext = *data++;
1303 cmd = ext & 0x7f;
1304
1305 fprintf (stderr, "extcmd = %x\n", ext);//D
1306
1307 if (ext < 4)
1308 cell->darkness = 255 - ext * 64;
1309 }
1310 while (cmd & 0x80);
1311 }
1312 else
1294 cell->darkness = flags & 8 ? *data++ : 255; 1313 cell->darkness = flags & 8 ? *data++ : 255;
1314 }
1295 1315
1296 //TODO: don't trust server data to be in-range(!) 1316 //TODO: don't trust server data to be in-range(!)
1297 1317
1298 if (flags & 4) 1318 if (flags & 4)
1299 { 1319 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines