… | |
… | |
821 | |
821 | |
822 | const_iv (FOW_DARKNESS) |
822 | const_iv (FOW_DARKNESS) |
823 | # undef const_iv |
823 | # undef const_iv |
824 | }; |
824 | }; |
825 | |
825 | |
826 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
826 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--) |
827 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
827 | newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); |
828 | |
828 | |
829 | assert (SDLK_MODIFIER_MIN == SDLK_NUMLOCK); |
829 | assert (SDLK_MODIFIER_MIN == SDLK_NUMLOCK); |
830 | assert (SDLK_MODIFIER_MAX == SDLK_COMPOSE); |
830 | assert (SDLK_MODIFIER_MAX == SDLK_COMPOSE); |
831 | } |
831 | } |
832 | |
832 | |
… | |
… | |
2566 | int x, y; |
2566 | int x, y; |
2567 | int sw1 = sw + 2; |
2567 | int sw1 = sw + 2; |
2568 | int sh1 = sh + 2; |
2568 | int sh1 = sh + 2; |
2569 | int sh3 = sh * 3; |
2569 | int sh3 = sh * 3; |
2570 | int sw3 = sw * 3; |
2570 | int sw3 = sw * 3; |
2571 | uint8_t *darkness1 = (uint8_t *)malloc (sw1 * sh1); |
|
|
2572 | SV *darkness3_sv = sv_2mortal (newSV (sw3 * sh3)); |
2571 | SV *darkness3_sv = sv_2mortal (newSV (sw3 * sh3)); |
2573 | uint8_t *darkness3 = (uint8_t *)SvPVX (darkness3_sv); |
2572 | uint8_t *darkness3 = (uint8_t *)SvPVX (darkness3_sv); |
|
|
2573 | uint8_t *darkness1 = (uint8_t *)malloc (sw1 * sh1); |
|
|
2574 | memset (darkness1, 0, sw1*sh1); |
2574 | |
2575 | |
2575 | SvPOK_only (darkness3_sv); |
2576 | SvPOK_only (darkness3_sv); |
2576 | SvCUR_set (darkness3_sv, sw3 * sh3); |
2577 | SvCUR_set (darkness3_sv, sw3 * sh3); |
2577 | |
2578 | |
2578 | mx += self->x - 1; |
2579 | mx += self->x - 1; |
… | |
… | |
3157 | const_iv (GL_FUNC_SUBTRACT), |
3158 | const_iv (GL_FUNC_SUBTRACT), |
3158 | const_iv (GL_FUNC_REVERSE_SUBTRACT), |
3159 | const_iv (GL_FUNC_REVERSE_SUBTRACT), |
3159 | # undef const_iv |
3160 | # undef const_iv |
3160 | }; |
3161 | }; |
3161 | |
3162 | |
3162 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
3163 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--) |
3163 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
3164 | newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); |
3164 | |
3165 | |
3165 | texture_av = newAV (); |
3166 | texture_av = newAV (); |
3166 | AvREAL_off (texture_av); |
3167 | AvREAL_off (texture_av); |
3167 | } |
3168 | } |
3168 | |
3169 | |