Project

General

Profile

Revision 204

bullet things

View differences:

proj/src/proj.c
118 118
        gunner_t *shooter2 = gunner_ctor(bsp_shooter, bsp_nothing);
119 119
        gunner_set_pos(shooter2, -50, -50);
120 120

  
121
        ent_t *bullet = ent_ctor(get_bullet(), bsp_nothing);
122
        ent_set_pos(bullet, 400, 400);
121
        bullet_t *bullet = bullet_ctor(get_bullet());
122
        bullet_set_pos(bullet, 400, 400);
123 123

  
124 124
        graph_clear_screen();
125 125
        gunner_draw(shooter1);
......
156 156
                                if (no_interrupts % refresh_count_value == 0) {
157 157
                                    update_movement(shooter1);
158 158
                                    update_scale();
159
                                    ent_set_origin(gunner_get_x(shooter1)-ent_get_XLength()/2.0,
160
                                                   gunner_get_y(shooter1)-ent_get_YLength()/2.0);
159
                                    ent_set_origin(bullet_get_x(bullet)-ent_get_XLength()/2.0,
160
                                                   bullet_get_y(bullet)-ent_get_YLength()/2.0);
161 161

  
162 162
                                    sprite_set_pos(sp_crosshair, get_mouse_X(), get_mouse_Y());
163 163
                                    double angle = get_mouse_angle(shooter1);
......
165 165
                                    graph_clear_screen();
166 166
                                    gunner_draw(shooter2);
167 167
                                    gunner_draw(shooter1);
168
                                    ent_draw(bullet);
168
                                    bullet_draw(bullet);
169 169
                                    sprite_draw(sp_crosshair);
170 170
                                    graph_draw();
171 171
                                }

Also available in: Unified diff