Project

General

Profile

Revision 215

bullet not drawing completely has been fixed

View differences:

graph.c
331 331
void (sprite_src2pic)(const sprite_t *p, int16_t x, int16_t y, int16_t *u, int16_t *v){
332 332
    double dx = (x - p->x)/p->scale;
333 333
    double dy = (y - p->y)/p->scale;
334
    int16_t du = dx*p->c - dy*p->s + 0.5;
335
    int16_t dv = dx*p->s + dy*p->c + 0.5;
334
    int16_t du = dx*p->c - dy*p->s - 0.5;
335
    int16_t dv = dx*p->s + dy*p->c - 0.5;
336 336
    *u = du + basic_sprite_get_u0(p->bsp);
337 337
    *v = dv + basic_sprite_get_v0(p->bsp);
338 338
}

Also available in: Unified diff