1 /* 2 * Copyright (C) Volition, Inc. 1999. All rights reserved. 3 * 4 * All source code herein is the property of Volition, Inc. You may not sell 5 * or otherwise commercially exploit the source or things you created based on the 6 * source. 7 * 8 */ 9 10 11 12 #ifndef _HUDLOCK_H 13 #define _HUDLOCK_H 14 15 #include "hud/hud.h" 16 17 void hud_init_missile_lock(); 18 void hud_draw_lock_triangles(int center_x, int center_y, float frametime); 19 void hud_calculate_lock_position(float frametime); 20 void hud_calculate_lock_start_pos(); 21 void hud_show_lock_indicator(float frametime, vec3d *lock_point_pos); 22 void hud_do_lock_indicator(float frametime); 23 void hud_stop_looped_locking_sounds(); 24 void hud_lock_reset(float lock_time_scale=1.0f); 25 26 class HudGaugeLock: public HudGauge 27 { 28 protected: 29 hud_anim Lock_gauge; 30 hud_anim Lock_anim; 31 32 bool loop_locked_anim; 33 34 int Lock_gauge_half_w; 35 int Lock_gauge_half_h; 36 int Lockspin_half_w; 37 int Lockspin_half_h; 38 float Lock_triangle_height; 39 float Lock_triangle_base; 40 int Lock_target_box_width; 41 int Lock_target_box_height; 42 43 int Rotate_time_id; 44 int Lock_gauge_draw_stamp; 45 int Lock_gauge_draw; 46 public: 47 HudGaugeLock(); 48 void initBitmaps(char *lock_gauge_fname, char *lock_anim_fname); 49 void initGaugeHalfSize(int w, int h); 50 void initSpinHalfSize(int w, int h); 51 void initTriHeight(float h); 52 void initTriBase(float length); 53 void initTargetBoxSize(int w, int h); 54 void initLoopLockedAnim(bool loop); 55 56 void render(float frametime); 57 void renderLockTriangles(int center_x, int center_y, float frametime); 58 void renderLockTrianglesOld(int center_x, int center_y, int radius); 59 void pageIn(); 60 void initialize(); 61 }; 62 63 #endif 64