| 79 | } |
| 80 | |
| 81 | void WBFireAnimFrame(object *obj, otype_wb_info *static_wb, int wb_index) { |
| 82 | dynamic_wb_info *p_dwb = &obj->dynamic_wb[wb_index]; |
| 83 | const int cur_mask = p_dwb->wb_anim_mask; |
| 84 | |
| 85 | p_dwb->wb_anim_frame += Frametime * ((static_wb->anim_end_frame[cur_mask] - static_wb->anim_start_frame[cur_mask]) / |
| 86 | static_wb->anim_time[cur_mask]); |
| 87 | |
| 88 | if ((p_dwb->flags & DWBF_ANIM_FIRED) == 0) { |
| 89 | if (p_dwb->wb_anim_frame >= static_wb->anim_fire_frame[cur_mask]) { |
| 90 | WBFireBattery(obj, static_wb, wb_index); |
| 91 | p_dwb->flags |= DWBF_ANIM_FIRED; |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | if (p_dwb->wb_anim_frame >= static_wb->anim_end_frame[cur_mask]) { |
| 96 | p_dwb->wb_anim_frame = 0.0; |
| 97 | p_dwb->flags &= ~(DWBF_ANIM_FIRED | DWBF_ANIMATING); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | bool WBIsBatteryReady(object *obj, otype_wb_info *static_wb, int wb_index) { |
| 102 | dynamic_wb_info *p_dwb = &obj->dynamic_wb[wb_index]; |
no test coverage detected