types: rename O_GUN_ITEM to O_PISTOL_ITEM

This commit is contained in:
walkawayy 2024-08-10 11:17:50 -04:00
parent d283624109
commit a0066a9a4e
13 changed files with 17 additions and 16 deletions

View file

@ -32,7 +32,7 @@
void Game_ProcessInput(void)
{
if (g_Config.enable_numeric_keys) {
if (g_InputDB.equip_pistols && Inv_RequestItem(O_GUN_ITEM)) {
if (g_InputDB.equip_pistols && Inv_RequestItem(O_PISTOL_ITEM)) {
g_Lara.request_gun_type = LGT_PISTOLS;
} else if (g_InputDB.equip_shotgun && Inv_RequestItem(O_SHOTGUN_ITEM)) {
g_Lara.request_gun_type = LGT_SHOTGUN;

View file

@ -1259,7 +1259,7 @@ GameFlow_InterpretSequence(int32_t level_num, GAMEFLOW_LEVEL_TYPE level_type)
Inv_AddItemNTimes(
give_item_data->object_num, give_item_data->quantity);
if (g_Lara.gun_type == LGT_UNARMED) {
if (Inv_RequestItem(O_GUN_ITEM)) {
if (Inv_RequestItem(O_PISTOL_ITEM)) {
g_GameInfo.current[level_num].gun_type = LGT_PISTOLS;
} else if (Inv_RequestItem(O_SHOTGUN_ITEM)) {
g_GameInfo.current[level_num].gun_type = LGT_SHOTGUN;

View file

@ -38,7 +38,8 @@ void Gun_Control(void)
draw = true;
}
} else if (g_Input.draw) {
if (g_Lara.gun_type == LGT_UNARMED && Inv_RequestItem(O_GUN_ITEM)) {
if (g_Lara.gun_type == LGT_UNARMED
&& Inv_RequestItem(O_PISTOL_ITEM)) {
g_Lara.gun_type = LGT_PISTOLS;
Gun_InitialiseNewWeapon();
}

View file

@ -424,7 +424,7 @@ int32_t Gun_FireWeapon(
if (ammo->ammo <= 0) {
ammo->ammo = 0;
Sound_Effect(SFX_LARA_EMPTY, &src->pos, SPM_NORMAL);
if (Inv_RequestItem(O_GUN_ITEM)) {
if (Inv_RequestItem(O_PISTOL_ITEM)) {
g_Lara.request_gun_type = LGT_PISTOLS;
} else {
g_Lara.gun_status = LGS_UNDRAW;

View file

@ -33,7 +33,7 @@ bool Inv_AddItem(int32_t item_num)
}
switch (item_num) {
case O_GUN_ITEM:
case O_PISTOL_ITEM:
case O_GUN_OPTION:
Inv_InsertItem(&g_InvItemPistols);
return true;

View file

@ -327,7 +327,7 @@ void Lara_UseItem(GAME_OBJECT_ID object_num)
{
LOG_INFO("%d", object_num);
switch (object_num) {
case O_GUN_ITEM:
case O_PISTOL_ITEM:
case O_GUN_OPTION:
g_Lara.request_gun_type = LGT_PISTOLS;
if (g_Lara.gun_status == LGS_ARMLESS
@ -534,7 +534,7 @@ void Lara_InitialiseInventory(int32_t level_num)
}
if (resume->flags.got_pistols) {
Inv_AddItem(O_GUN_ITEM);
Inv_AddItem(O_PISTOL_ITEM);
}
if (resume->flags.got_magnums) {

View file

@ -221,7 +221,7 @@ bool Lara_Cheat_GiveAllGuns(void)
return false;
}
Inv_AddItem(O_GUN_ITEM);
Inv_AddItem(O_PISTOL_ITEM);
Inv_AddItem(O_MAGNUM_ITEM);
Inv_AddItem(O_UZI_ITEM);
Inv_AddItem(O_SHOTGUN_ITEM);
@ -240,7 +240,7 @@ bool Lara_Cheat_GiveAllItems(void)
return false;
}
Inv_AddItem(O_GUN_ITEM);
Inv_AddItem(O_PISTOL_ITEM);
if (!Inv_RequestItem(O_SHOTGUN_ITEM)) {
Inv_AddItem(O_SHOTGUN_ITEM);

View file

@ -73,7 +73,7 @@ const GAME_OBJECT_ID g_PlaceholderObjects[] = {
const GAME_OBJECT_ID g_PickupObjects[] = {
// clang-format off
O_GUN_ITEM,
O_PISTOL_ITEM,
O_SHOTGUN_ITEM,
O_MAGNUM_ITEM,
O_UZI_ITEM,
@ -192,7 +192,7 @@ static const GAME_OBJECT_PAIR m_KeyItemToReceptacleMap[] = {
const GAME_OBJECT_PAIR g_ItemToInvObjectMap[] = {
// clang-format off
{ O_GUN_ITEM, O_GUN_OPTION },
{ O_PISTOL_ITEM, O_GUN_OPTION },
{ O_SHOTGUN_ITEM, O_SHOTGUN_OPTION },
{ O_MAGNUM_ITEM, O_MAGNUM_OPTION },
{ O_UZI_ITEM, O_UZI_OPTION },

View file

@ -137,7 +137,7 @@ static const ITEM_NAME m_ItemNames[] = {
{ O_PLAYER_3, "^player([- ]?3)?$" },
{ O_PLAYER_4, "^player([- ]?4)?$" },
{ O_SAVEGAME_ITEM, "^(save(game)?[- ]?)?crystal$" },
{ O_GUN_ITEM, "^pistols$" },
{ O_PISTOL_ITEM, "^pistols$" },
{ O_SHOTGUN_ITEM, "^(sg|shotgun)$" },
{ O_MAGNUM_ITEM, "^magnums?$" },
{ O_UZI_ITEM, "^uzis?$" },

View file

@ -307,7 +307,7 @@ void Savegame_PersistGameToCurrentInfo(int level_num)
current->flags.costume = 0;
current->pistol_ammo = 1000;
if (Inv_RequestItem(O_GUN_ITEM)) {
if (Inv_RequestItem(O_PISTOL_ITEM)) {
current->flags.got_pistols = 1;
} else {
current->flags.got_pistols = 0;

View file

@ -179,7 +179,7 @@ void Setup_MiscObjects(void)
Pickup_Setup(&g_Objects[O_PUZZLE_ITEM2]);
Pickup_Setup(&g_Objects[O_PUZZLE_ITEM3]);
Pickup_Setup(&g_Objects[O_PUZZLE_ITEM4]);
Pickup_Setup(&g_Objects[O_GUN_ITEM]);
Pickup_Setup(&g_Objects[O_PISTOL_ITEM]);
Pickup_Setup(&g_Objects[O_SHOTGUN_ITEM]);
Pickup_Setup(&g_Objects[O_MAGNUM_ITEM]);
Pickup_Setup(&g_Objects[O_UZI_ITEM]);

View file

@ -34,7 +34,7 @@ static struct {
int16_t m_PickupObjs[] = { O_PICKUP_ITEM1, O_PICKUP_ITEM2, O_KEY_ITEM1,
O_KEY_ITEM2, O_KEY_ITEM3, O_KEY_ITEM4,
O_PUZZLE_ITEM1, O_PUZZLE_ITEM2, O_PUZZLE_ITEM3,
O_PUZZLE_ITEM4, O_GUN_ITEM, O_SHOTGUN_ITEM,
O_PUZZLE_ITEM4, O_PISTOL_ITEM, O_SHOTGUN_ITEM,
O_MAGNUM_ITEM, O_UZI_ITEM, O_GUN_AMMO_ITEM,
O_SG_AMMO_ITEM, O_MAG_AMMO_ITEM, O_UZI_AMMO_ITEM,
O_EXPLOSIVE_ITEM, O_MEDI_ITEM, O_BIGMEDI_ITEM,

View file

@ -109,7 +109,7 @@ typedef enum GAME_OBJECT_ID {
O_PASSPORT_CLOSED = 81,
O_MAP_CLOSED = 82,
O_SAVEGAME_ITEM = 83,
O_GUN_ITEM = 84,
O_PISTOL_ITEM = 84,
O_SHOTGUN_ITEM = 85,
O_MAGNUM_ITEM = 86,
O_UZI_ITEM = 87,