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.176 by root, Tue Apr 10 09:39:48 2007 UTC vs.
Revision 1.178 by root, Tue Apr 10 11:12:53 2007 UTC

1567draw (CFPlus::Map self, int mx, int my, int sw, int sh, int T) 1567draw (CFPlus::Map self, int mx, int my, int sw, int sh, int T)
1568 CODE: 1568 CODE:
1569{ 1569{
1570 HV *smooth = (HV *)sv_2mortal ((SV *)newHV ()); 1570 HV *smooth = (HV *)sv_2mortal ((SV *)newHV ());
1571 uint32_t smooth_level[256 / 32]; // one bit for every possible smooth level 1571 uint32_t smooth_level[256 / 32]; // one bit for every possible smooth level
1572 uint8_t smooth_max[256][256]; 1572 static uint8_t smooth_max[256][256]; // egad, fats and wasteful on memory (64k)
1573 smooth_key skey; 1573 smooth_key skey;
1574 int x, y, z; 1574 int x, y, z;
1575 int last_name; 1575 int last_name;
1576 1576
1577 // thats current max. sorry. 1577 // thats current max. sorry.
1608 for (x = 0; x < sw; x++) 1608 for (x = 0; x < sw; x++)
1609 if (row->c0 <= x + mx && x + mx < row->c1) 1609 if (row->c0 <= x + mx && x + mx < row->c1)
1610 { 1610 {
1611 mapcell *cell = row->col + (x + mx - row->c0); 1611 mapcell *cell = row->col + (x + mx - row->c0);
1612 1612
1613 for (z = 0; z <= 2; z++)
1614 {
1615 uint8_t level = self->tex [cell->tile [z]].smoothlevel;
1616 if (level > smooth_max [x + 1][y + 1])
1617 smooth_max [x + 1][y + 1] = level; 1613 smooth_max[x + 1][y + 1] =
1618 } 1614 MAX (self->tex [cell->tile [0]].smoothlevel,
1615 MAX (self->tex [cell->tile [1]].smoothlevel,
1616 self->tex [cell->tile [2]].smoothlevel));
1619 } 1617 }
1620 } 1618 }
1621 1619
1622 for (z = 0; z <= 2; z++) 1620 for (z = 0; z <= 2; z++)
1623 { 1621 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines