… | |
… | |
701 | Mix_AllocateChannels (int numchans = -1) |
701 | Mix_AllocateChannels (int numchans = -1) |
702 | |
702 | |
703 | void |
703 | void |
704 | lowdelay (int fd, int val = 1) |
704 | lowdelay (int fd, int val = 1) |
705 | CODE: |
705 | CODE: |
706 | #ifndef _WIN32 |
|
|
707 | setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); |
706 | setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, (void *)&val, sizeof (val)); |
708 | #endif |
|
|
709 | |
707 | |
710 | void |
708 | void |
711 | win32_proxy_info () |
709 | win32_proxy_info () |
712 | PPCODE: |
710 | PPCODE: |
713 | { |
711 | { |
… | |
… | |
1567 | draw (CFPlus::Map self, int mx, int my, int sw, int sh, int T) |
1565 | draw (CFPlus::Map self, int mx, int my, int sw, int sh, int T) |
1568 | CODE: |
1566 | CODE: |
1569 | { |
1567 | { |
1570 | HV *smooth = (HV *)sv_2mortal ((SV *)newHV ()); |
1568 | HV *smooth = (HV *)sv_2mortal ((SV *)newHV ()); |
1571 | uint32_t smooth_level[256 / 32]; // one bit for every possible smooth level |
1569 | uint32_t smooth_level[256 / 32]; // one bit for every possible smooth level |
1572 | uint8_t smooth_max[256][256]; |
1570 | static uint8_t smooth_max[256][256]; // egad, fats and wasteful on memory (64k) |
1573 | smooth_key skey; |
1571 | smooth_key skey; |
1574 | int x, y, z; |
1572 | int x, y, z; |
1575 | int last_name; |
1573 | int last_name; |
1576 | |
1574 | |
1577 | // thats current max. sorry. |
1575 | // thats current max. sorry. |
… | |
… | |
1608 | for (x = 0; x < sw; x++) |
1606 | for (x = 0; x < sw; x++) |
1609 | if (row->c0 <= x + mx && x + mx < row->c1) |
1607 | if (row->c0 <= x + mx && x + mx < row->c1) |
1610 | { |
1608 | { |
1611 | mapcell *cell = row->col + (x + mx - row->c0); |
1609 | mapcell *cell = row->col + (x + mx - row->c0); |
1612 | |
1610 | |
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; |
1611 | smooth_max[x + 1][y + 1] = |
1618 | } |
1612 | MAX (self->tex [cell->tile [0]].smoothlevel, |
|
|
1613 | MAX (self->tex [cell->tile [1]].smoothlevel, |
|
|
1614 | self->tex [cell->tile [2]].smoothlevel)); |
1619 | } |
1615 | } |
1620 | } |
1616 | } |
1621 | |
1617 | |
1622 | for (z = 0; z <= 2; z++) |
1618 | for (z = 0; z <= 2; z++) |
1623 | { |
1619 | { |