Project

General

Profile

Revision 290

fixed menu lag

View differences:

proj.c
159 159
                            case TIMER0_IRQ:
160 160
                                switch (game_state) {
161 161
                                case MENU:
162
                                    if (no_interrupts % 2 == 0){
163
                                        graph_clear_screen();
164
                                        game_state = menu_update_state(main_menu, click);
165
                                        menu_draw(main_menu);
162
                                    graph_clear_screen();
163
                                    game_state = menu_update_state(main_menu, click);
164
                                    menu_draw(main_menu);
166 165

  
167
                                        click = 0;
166
                                    click = 0;
168 167

  
169
                                        sprite_set_pos(sp_crosshair, *mouse_x, *mouse_y);
170
                                        sprite_draw(sp_crosshair);
171
                                        graph_draw();
172
                                    }
168
                                    sprite_set_pos(sp_crosshair, *mouse_x, *mouse_y);
169
                                    sprite_draw(sp_crosshair);
170
                                    graph_draw();
173 171
                                    break;
174 172
                                case GAME:
175 173
                                    if (no_interrupts % 60 == 0) timer_update(in_game_timer);

Also available in: Unified diff