Files
perfect-dark/src/include/game/bondgun.h
T
2024-08-17 17:15:55 +10:00

188 lines
10 KiB
C

#ifndef _IN_GAME_BONDGUN_H
#define _IN_GAME_BONDGUN_H
#include <ultra64.h>
#include "data.h"
#include "types.h"
void bgun_reset(void);
void bgun_stop(void);
void bgun_rumble(s32 handnum, s32 weaponnum);
s32 bgun_get_unequipped_reload_index(s32 weaponnum);
void bgun_tick_unequipped_reload(void);
bool bgun_test_gun_vis_command(struct gunviscmd *cmd, struct hand *hand);
void bgun_set_part_visible(s16 partnum, bool visible, struct hand *hand, struct modeldef *modeldef);
void bgun_execute_gun_vis_commands(struct hand *hand, struct modeldef *arg1, struct gunviscmd *command);
void bgun0f098030(struct hand *hand, struct modeldef *arg1);
f32 bgun0f09815c(struct hand *hand);
void bgun0f0981e8(struct hand *hand, struct modeldef *modeldef);
bool bgun0f098884(struct guncmd *cmd, struct gset *gset);
void bgun_start_animation(struct guncmd *cmd, s32 handnum, struct hand *hand);
bool bgun0f098a44(struct hand *hand, s32 time);
bool bgun_is_anim_busy(struct hand *hand);
void bgun_reset_anim(struct hand *hand);
void bgun_get_weapon_info(struct handweaponinfo *info, s32 handnum);
s32 bgun0f098ca0(s32 arg0, struct handweaponinfo *info, struct hand *hand);
void bgun0f098df8(s32 weaponfunc, struct handweaponinfo *info, struct hand *hand, u8 onebullet, u8 checkunequipped);
void bgun0f098f8c(struct handweaponinfo *info, struct hand *hand);
bool bgun0f099008(s32 handnum);
bool bgun0f0990b0(struct weaponfunc *basefunc, struct weapon *weapon);
bool bgun0f099188(struct hand *hand, s32 gunfunc);
s32 bgun_tick_inc_idle(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
void bgun_set_arm_pitch(struct hand *hand, f32 angle);
s32 bgun_tick_inc_auto_switch(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
bool bgun_is_reloading(struct hand *hand);
s32 bgun_tick_inc_reload(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
s32 bgun_tick_inc_change_func(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func);
void bgun0f09a6f8(struct handweaponinfo *info, s32 handnum, struct hand *hand, struct weaponfunc *func);
bool bgun_tick_recoil(struct hand *hand, struct handweaponinfo *info, s32 handnum, struct weaponfunc_shoot *func);
bool bgun_tick_inc_attacking_shoot(struct handweaponinfo *info, s32 handnum, struct hand *hand);
bool bgun_tick_inc_attacking_throw(s32 handnum, struct hand *hand);
s32 bgun_get_min_clip_qty(s32 weaponnum, s32 funcnum);
bool bgun_tick_inc_attacking_melee(s32 handnum, struct hand *hand);
bool bgun_tick_inc_attacking_special(struct hand *hand);
s32 bgun_tick_inc_attack_empty(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
s32 bgun_tick_inc_attack(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
bool bgun_is_ready_to_switch(s32 handnum);
bool bgun_can_free_weapon(s32 handnum);
bool bgun0f09bf44(s32 handnum);
s32 bgun_tick_inc_change_gun(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
s32 bgun_tick_inc_state2(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
s32 bgun_tick_inc(struct handweaponinfo *info, s32 handnum, s32 lvupdate);
bool bgun_set_state(s32 handnum, s32 state);
void bgun_tick_hand(s32 handnum);
void bgun_tick_switch(void);
void bgun_init_hand_anims(void);
f32 bgun_get_noise_radius(s32 handnum);
void bgun_decrease_noise_radius(void);
void bgun_calculate_blend(s32 hand);
void bgun_update_blend(struct hand *hand, s32 handnum);
void bgun0f09d8dc(f32 breathing, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
bool bgun_is_loaded(void);
u32 bgun_get_gun_mem_type(void);
u8 *bgun_get_gun_mem(void);
u32 bgun_calculate_gun_mem_capacity(void);
void bgun_free_gun_mem(void);
void bgun_set_gun_mem_weapon(s32 weaponnum);
void bgun_enter_flux(void);
bool bgun_change_gun_mem(s32 newowner);
void bgun_tick_gun_load(void);
void bgun_tick_master_load(void);
void bgun_tick_load(void);
bool bgun_load_all(void);
struct modeldef *bgun_get_cart_modeldef(void);
void bgun0f09ebcc(struct defaultobj *obj, struct coord *coord, RoomNum *rooms, Mtxf *matrix1, struct coord *velocity, Mtxf *matrix2, struct prop *prop, struct coord *pos);
void bgun0f09ed2c(struct defaultobj *obj, struct coord *coord, Mtxf *arg2, struct coord *velocity, Mtxf *arg4);
struct defaultobj *bgun_create_thrown_projectile2(struct chrdata *chr, struct gset *gset, struct coord *pos, RoomNum *rooms, Mtxf *arg4, struct coord *velocity);
void bgun_create_thrown_projectile(s32 handnum, struct gset *gset);
void bgun_update_held_rocket(s32 handnum);
void bgun_create_held_rocket(s32 handnum, struct weaponfunc_shootprojectile *func);
void bgun_free_held_rocket(s32 handnum);
void bgun_create_fired_projectile(s32 handnum);
void bgun_swivel(f32 autoaimx, f32 autoaimy, f32 crossdamp, f32 aimdamp);
void bgun_swivel_with_damp(f32 screenx, f32 screeny, f32 damp);
void bgun_swivel_without_damp(f32 arg0, f32 arg1);
void bgun_get_cross_pos(f32 *x, f32 *y);
void bgun0f0a0c08(struct coord *arg0, struct coord *arg1);
void bgun0f0a0c44(s32 handnum, struct coord *arg1, struct coord *arg2);
void bgun_calculate_player_shot_spread(struct coord *arg0, struct coord *arg1, s32 handnum, bool dorandom);
void bgun_calculate_bot_shot_spread(struct coord *arg0, s32 weaponnum, s32 funcnum, bool arg3, s32 crouchpos, bool dual);
void bgun_set_last_shoot_info(struct coord *pos, struct coord *dir, s32 handnum);
s32 bgun_get_shots_to_take(s32 handnum);
void bgun_free_weapon(s32 handnum);
void bgun_tick_switch2(void);
void bgun_equip_weapon(s32 weaponnum);
s32 bgun_get_weapon_num(s32 handnum);
bool bgun0f0a1a10(s32 weaponnum);
s32 bgun_get_switch_to_weapon(s32 handnum);
void bgun_switch_to_previous(void);
void bgun_cycle_forward(void);
void bgun_cycle_back(void);
bool bgun_has_ammo_for_weapon(s32 weaponnum);
void bgun_auto_switch_weapon(void);
void bgun_equip_weapon2(s32 handnum, s32 weaponnum);
s32 bgun_is_firing(s32 handnum);
s32 bgun_get_attack_type(s32 handnum);
char *bgun_get_name(s32 weaponnum);
u16 bgun_get_name_id(s32 weaponnum);
char *bgun_get_short_name(s32 arg0);
void bgun_reload_if_possible(s32 handnum);
void bgun_set_adjust_pos(f32 angle);
void bgun_start_slide(s32 handnum);
void bgun_update_slide(s32 handnum);
f32 bgun0f0a2498(f32 arg0, f32 arg1, f32 arg2, f32 arg3);
void bgun0f0a24f0(struct coord *arg0, s32 handnum);
bool bgun0f0a27c8(void);
void bgun_handle_player_dead(void);
bool bgun_is_mission_critical(s32 weaponnum);
void bgun_disarm(struct prop *attacker);
void bgun_execute_model_cmd_list(s32 *arg0);
s32 bgun_create_model_cmd_list(struct model *model, struct modelnode *node, s32 *ptr);
void bgun_start_detonate_animation(s32 playernum);
void bgun_update_gangsta(struct hand *hand, s32 handnum, struct coord *arg2, struct weaponfunc *funcdef, Mtxf *arg4, Mtxf *arg5);
void bgun_update_smoke(struct hand *hand, s32 handnum, s32 weaponnum, struct weaponfunc *funcdef);
void bgun_update_lasersight(struct hand *hand, struct modeldef *modeldef, s32 handnum, u8 *allocation);
void bgun_update_reaper(struct hand *hand, struct modeldef *modeldef);
void bgun_update_sniper_rifle(struct modeldef *modeldef, u8 *allocation);
void bgun_update_devastator(struct hand *hand, u8 *allocation, struct modeldef *modeldef);
void bgun_update_shotgun(struct hand *hand, u8 *allocation, bool *arg2, struct modeldef *modeldef);
void bgun_update_laser(struct hand *hand);
void bgun_update_magnum(struct hand *hand, s32 handnum, struct modeldef *modeldef, Mtxf *mtx);
void bgun_update_rocket_launcher(struct hand *hand, s32 handnum, struct weaponfunc_shootprojectile *func);
void bgun0f0a45d0(struct hand *hand, struct modeldef *modeldef, bool isdetonator);
void bgun_tick_eject(struct hand *hand, struct modeldef *modeldef, bool isdetonator);
void bgun0f0a4e44(struct hand *hand, struct weapon *weapondef, struct modeldef *modeldef, struct weaponfunc *funcdef, s32 maxburst, u8 *allocation, s32 weaponnum, bool **arg7, s32 mtxindex, Mtxf *arg9, Mtxf *arg10);
void bgun_create_fx(struct hand *hand, s32 handnum, struct weaponfunc *funcdef, s32 weaponnum, struct modeldef *modeldef, u8 *allocation);
void bgun0f0a5550(s32 handnum);
void bgun_tick_mauler_charge(void);
void bgun_tick_gameplay2(void);
s32 bgun_allocate_fireslot(void);
void bgun_render(Gfx **gdl);
struct sndstate **bgun_allocate_audio_handle(void);
void bgun_play_prop_hit_sound(struct gset *gset, struct prop *prop, s32 texturenum);
void bgun_play_glass_hit_sound(struct coord *pos, RoomNum *rooms, s32 texturenum);
void bgun_play_bg_hit_sound(struct gset *gset, struct coord *hitpos, s32 texturenum, RoomNum *rooms);
void bgun_set_trigger_on(s32 handnum, bool on);
s32 bgun_consider_toggle_gun_function(s32 usedowntime, bool trigpressed, bool fromactivemenu);
void bgun0f0a8c50(void);
bool bgun_is_using_secondary_function(void);
void bgun_tick_gameplay(bool triggeron);
void bgun_set_passive_mode(bool enable);
void bgun_set_aim_type(u32 aimtype);
void bgun_set_aim_pos(struct coord *coord);
void bgun_set_hit_pos(struct coord *coord);
void bgun0f0a9494(u32 operation);
void bgun0f0a94d0(u32 operation, struct coord *pos, struct coord *rot);
void bgun_set_gun_ammo_visible(u32 reason, bool enable);
void bgun_set_ammo_quantity(s32 ammotype, s32 quantity);
s32 bgun_get_reserved_ammo_count(s32 type);
s32 bgun_get_ammo_count(s32 ammotype);
s32 bgun_get_capacity_by_ammotype(s32 ammotype);
bool bgun_ammotype_allows_unlimited_ammo(u32 ammotype);
void bgun_give_max_ammo(bool force);
u32 bgun_get_ammo_type_for_weapon(u32 weaponnum, u32 func);
s32 bgun_get_ammo_qty_for_weapon(u32 weaponnum, u32 func);
void bgun_set_ammo_qty_for_weapon(u32 weaponnum, u32 func, u32 quantity);
s32 bgun_get_ammo_capacity_for_weapon(s32 weaponnum, s32 func);
Gfx *bgun_draw_hud_string(Gfx *gdl, char *text, s32 x, bool halign, s32 y, s32 valign, u32 colour);
Gfx *bgun_draw_hud_integer(Gfx *gdl, s32 value, s32 x, bool halign, s32 y, s32 valign, u32 colour);
void bgun_reset_abmag(struct abmag *abmag);
void bgun0f0a9da8(struct abmag *abmag, s32 remaining, s32 capacity, s32 height);
Gfx *bgun_draw_hud_gauge(Gfx *gdl, s32 x1, s32 y1, s32 x2, s32 y2, struct abmag *abmag, s32 remaining, s32 capacity, u32 vacantcolour, u32 occupiedcolour, bool flip);
Gfx *bgun_draw_hud(Gfx *gdl);
void bgun_add_boost(s32 arg0);
void bgun_subtract_boost(s32 arg0);
void bgun_apply_boost(void);
void bgun_revert_boost(void);
void bgun_tick_boost(void);
void bgun_set_sight_visible(u32 bits, bool visible);
Gfx *bgun_draw_sight(Gfx *gdl);
void bgun0f0abd30(s32 handnum);
s32 bgun_get_weapon_num2(s32 handnum);
s8 bgun_free_fireslot_wrapper(s32 fireslot);
s8 bgun_free_fireslot(s32 fireslot);
#endif