<NME> NEWINV2.C <BEF> #include "NEWINV2.H" #include "CAMERA.H" #include "CDTRACKS.H" #include "DELTAPAK.H" #include "SPECIFIC.H" #include "LARA.H" #include "DOOR.H" #include "OBJECTS.H" #include "GAMEFLOW.H" #include "CONTROL.H" #include "SAVEGAME.H" #include "HEALTH.H" #include "LARA2GUN.H" #include "LARA1GUN.H" #include INPUT_H #include "EFFECTS.H" #include "CAMERA.H" #include "SOUND.H" #if PC_VERSION #include "GLOBAL.H" #include "DRAWPRIMITIVE.H" #include "GAME.H" #include "WINMAIN.H" #include "DISPLAY.H" #include "DRAW.H" #include "TEXT.H" #elif PSX_VERSION || PSXPC_VERSION || SAT_VERSION #include "SETUP.H" #include "LOADSAVE.H" #include "CD.H" #include "GPU.H" #include "SFX.H" #include "MEMCARD.H" #include "PROFILE.H" #include "MISC.H" #include "TEXT_S.H" #include "DRAWOBJ.H" #include "MATHS.H" #include "DRAW.H" #include "LOAD_LEV.H" #include "BUBBLES.H" #include "GETSTUFF.H" #endif #if PSX_VERSION #include <LIBGPU.H> #endif #if PSXPC_TEST #include <stdint.h> #elif PSX_VERSION || SAT_VERSION typedef unsigned int uintptr_t; #endif #include <assert.h> struct INVOBJ inventry_objects_list[NUM_INV_OBJECTS] = // offset 0x92BE8 { { UZI_ITEM, -4, 1000, ANGLE(90), ANGLE(135), ANGLE(90), 2, STR_UZI, ~0u }, { PISTOLS_ITEM, 6, 1000, ANGLE(90), -21172, -17088, 2, STR_PISTOLS, ~0u }, { SHOTGUN_ITEM, -6, 640, ANGLE(-180), ANGLE(-90), ANGLE(45), 2, STR_SHOTGUN, 1 }, { REVOLVER_ITEM, 0, 800, ANGLE(90), ANGLE(60), 15298, 2, STR_REVOLVER, 1 }, { REVOLVER_ITEM, 0, 800, ANGLE(90), ANGLE(60), 15298, 2, STR_REVOLVER_LASERSIGHT, 7 }, { CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u }, { CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u }, { HK_ITEM, 0, 800, ANGLE(0), ANGLE(-90), ANGLE(0), 2, STR_HK, 1 }, { HK_ITEM, 0, 800, ANGLE(0), ANGLE(-90), ANGLE(0), 2, STR_HK_SILENCED, ~0u }, { SHOTGUN_AMMO1_ITEM, 0, 500, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_SHOTGUN_NORMAL_AMMO, ~0u }, { SHOTGUN_AMMO2_ITEM, 0, 500, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_SHOTGUN_WIDESHOT_AMMO, ~0u }, { HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_SNIPER_MODE, 2 }, { HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_BURST_MODE, 4 }, { HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_RAPID_MODE, 8 }, { HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_AMMO, 1 }, { CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u }, { CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u }, { REVOLVER_AMMO_ITEM, 0, 700, ANGLE(90), -3000, ANGLE(0), 2, STR_REVOLVER_AMMO, ~0u }, { UZI_AMMO_ITEM, 5, 700, ANGLE(0), 5384, ANGLE(0), 2, STR_UZI_AMMO, ~0u }, { PISTOLS_AMMO_ITEM, 4, 700, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_PISTOL_AMMO, ~0u }, { LASERSIGHT_ITEM, 2, 700, ANGLE(90), 2000, ANGLE(0), 2, STR_LASERSIGHT, ~0u }, { SILENCER_ITEM, 1, 900, ANGLE(0), 2000, ANGLE(0), 2, STR_SILENCER, ~0u }, { BIGMEDI_ITEM, 2, 800, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LARGE_MEDIPACK, ~0u }, { SMALLMEDI_ITEM, 0, 512, ANGLE(0), ANGLE(112.5), ANGLE(0), 2, STR_SMALL_MEDIPACK, ~0u }, { BINOCULARS_ITEM, -1, 700, ANGLE(22.5), 2000, ANGLE(0), 2, STR_BINOCULARS, ~0u }, { FLARE_INV_ITEM, 2, 1100, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_FLARES, ~0u }, { COMPASS_ITEM, 2, 1100, ANGLE(-180), ANGLE(0), ANGLE(0), 2, STR_TIMEX_TMX, ~0u }, { MEMCARD_LOAD_INV_ITEM, 2, 4000, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { MEMCARD_SAVE_INV_ITEM, 2, 4000, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_SAVE, ~0u }, { PUZZLE_ITEM1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM2, 14, 600, ANGLE(0), ANGLE(-90), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM3, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM4, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM5, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM6, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM7, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM8, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM1_COMBO1, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM1_COMBO2, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM2_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM2_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM3_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM3_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM4_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM4_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM5_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM5_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM6_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM6_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM7_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM7_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM8_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PUZZLE_ITEM8_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM3, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM4, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM5, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM6, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM7, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM8, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM1_COMBO1, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM1_COMBO2, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM2_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM2_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM3_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM3_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM4_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM4_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM5_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM5_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM6_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM6_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM7_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM7_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM8_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { KEY_ITEM8_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM3, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM4, 2, 800, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM1_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM1_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM2_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM2_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM3_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM3_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM4_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { PICKUP_ITEM4_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u }, { BURNING_TORCH_ITEM, 14, 1200, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u }, { CROWBAR_ITEM, 4, 1900, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_CROWBAR, ~0u }, { EXAMINE1, 4, 1300, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u }, { EXAMINE2, 14, 1200, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u }, { EXAMINE3, 14, 1200, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u }, { WET_CLOTH, -12, 512, ANGLE(90), ANGLE(67.5), ANGLE(112.5), 2, STR_CHLOROFORM_SOAKED_CLOTH, ~0u }, { CROSSBOW_ITEM, 0, 900, ANGLE(45), 6144, ANGLE(0), 2, STR_GRAPPLING_GUN, 1 }, { CROSSBOW_AMMO1_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u }, { CLOTH, -12, 512, ANGLE(90), ANGLE(67.5), ANGLE(112.5), 2, STR_CLOTH, ~0u }, { BOTTLE, 18, 800, ANGLE(-90), ANGLE(0), ANGLE(0), 2, STR_BOTTLE_OF_CHLOROFORM, ~0u }, { PUZZLE_HOLE8, -10, 384, ANGLE(-90), 26624, ANGLE(-90), 10, STR_BOTTLE_OF_CHLOROFORM, ~0u }, }; unsigned char wanky_secrets_table[NUM_TR5_LEVELS] = // offset 0x92BD4 { 0, 3, 3, 3, 3, 3, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }; unsigned short options_table[99] = // offset 0x933B8 { 0x020A, 0x040A, 0x004A, 0x080A, 0x0812, 0x008A, 0x0092, 0x010A, 0x0112, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x000C, 0x000C, 0x0004, 0x0004, 0x0004, 0x0004, 0x8000, 0x1000, 0x2000, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0004, 0x0004, 0x0004, 0x0004, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0004, 0x0004, 0x0020, 0x0020, 0x0020, 0x0004, 0x4002, 0x0004, 0x000C, 0x000C }; short optmessages[11] = // offset 0x93480 { STR_USE, STR_CHOOSE_AMMO, STR_COMBINE, STR_SEPARATE, STR_EQUIP, STR_COMBINE_WITH, STR_LOAD_GAME, STR_SAVE_GAME, STR_EXAMINE, STR_STATISTICS, STR_CHOOSE_WEAPON_MODE }; struct COMBINELIST dels_handy_combine_table[24] = // offset 0x93498 { { combine_revolver_lasersight, 3, 0x14, 4 }, { combine_crossbow_lasersight, 5, 0x14, 6 }, { combine_HK_SILENCER, 7, 0x15, 8 }, { combine_PuzzleItem1, 0x25, 0x26, 0x1D }, { combine_PuzzleItem2, 0x27, 0x28, 0x1E }, { combine_PuzzleItem3, 0x29, 0x2A, 0x1F }, { combine_PuzzleItem4, 0x2B, 0x2C, 0x20 }, { combine_PuzzleItem5, 0x2D, 0x2E, 0x21 }, { combine_PuzzleItem6, 0x2F, 0x30, 0x22 }, { combine_PuzzleItem7, 0x31, 0x32, 0x23 }, { combine_PuzzleItem8, 0x33, 0x34, 0x24 }, { combine_KeyItem1, 0x3D, 0x3E, 0x35 }, { combine_KeyItem2, 0x3F, 0x40, 0x36 }, { combine_KeyItem3, 0x41, 0x42, 0x37 }, { combine_KeyItem4, 0x43, 0x44, 0x38 }, { combine_KeyItem5, 0x45, 0x46, 0x39 }, { combine_KeyItem6, 0x47, 0x48, 0x3A }, { combine_KeyItem7, 0x49, 0x4A, 0x3B }, { combine_KeyItem8, 0x4B, 0x4C, 0x3C }, { combine_PickupItem1, 0x51, 0x52, 0x4D }, { combine_PickupItem2, 0x53, 0x54, 0x4E }, { combine_PickupItem3, 0x55, 0x56, 0x4F }, { combine_PickupItem4, 0x57, 0x58, 0x50 }, { combine_clothbottle, 0x61, 0x62, 0x5E } }; int GLOBAL_enterinventory = -1; // offset 0xA0B30 int GLOBAL_inventoryitemchosen = -1; // offset 0xA0B34 int GLOBAL_lastinvitem = -1; // offset 0xA0B2C short examine_mode = 0; // offset 0xA0B28 short stats_mode = 0; // offset 0xA0B2A int GLOBAL_invkeypadmode = 0; // offset 0xA0B38 int GLOBAL_invkeypadcombination = 0; // offset 0xA0B3C unsigned char keypadx = 0; // offset 0xA0B40 unsigned char keypady = 0; // offset 0xA0B41 unsigned char keypadnuminputs = 0; // offset 0xA0B42 unsigned char keypadpause = 0; // offset 0xA0B43 short inventry_xpos = 0; // offset 0xA0B44 short inventry_ypos = 0; // offset 0xA0B46 unsigned char keypadinputs[4]; // offset 0xA3780 short ammo_selector_fade_val; // offset 0xA3710 short ammo_selector_fade_dir; // offset 0xA371C short combine_ring_fade_val; // offset 0xA370C short combine_ring_fade_dir; // offset 0xA3718 short normal_ring_fade_val; // offset 0xA3708 short normal_ring_fade_dir; // offset 0xA3714 char seperate_type_flag; // offset 0xA3738 char combine_type_flag; // offset 0xA373C short combine_obj1; // offset 0xA3720 short combine_obj2; // offset 0xA3724 char menu_active; // offset 0xA36F0 struct RINGME* rings[2]; // offset 0xA372C char loading_or_saving; // offset 0xA3778 char use_the_bitch; // offset 0xA36FC unsigned char left_debounce; // offset 0xA3760 unsigned char right_debounce; // offset 0xA376C unsigned char up_debounce; // offset 0xA3768 unsigned char down_debounce; // offset 0xA3764 unsigned char select_debounce; // offset 0xA375C unsigned char deselect_debounce; // offset 0xA3770 unsigned char go_left; // offset 0xA36F8 unsigned char go_right; // offset 0xA36D8 unsigned char go_up; // offset 0xA3704 unsigned char go_down; // offset 0xA36F4 unsigned char left_repeat; // offset 0xA36E8 unsigned char right_repeat; // offset 0xA36EC unsigned char go_select; // offset 0xA3734 unsigned char go_deselect; // offset 0xA379C unsigned char ammo_active; // offset 0xA377C char bullshitbollox; // offset 0xA37A4 char _bullshitbollox; // offset 0xA37A0 static unsigned short AmountShotGunAmmo1; // offset 0xA36B8 static unsigned short AmountShotGunAmmo2; // offset 0xA36BA static unsigned short AmountHKAmmo1; // offset 0xA36BC static unsigned short AmountCrossBowAmmo1; // offset 0xA36BE static unsigned short AmountCrossBowAmmo2; // offset 0xA36C0 static unsigned short AmountUziAmmo; // offset 0xA36C2 static unsigned short AmountRevolverAmmo; // offset 0xA36C4 static unsigned short AmountPistolsAmmo; // offset 0xA36C6 static char CurrentPistolsAmmoType; // offset 0xA36C8 static char CurrentUziAmmoType; // offset 0xA36C9 static char CurrentRevolverAmmoType; // offset 0xA36CA static char CurrentShotGunAmmoType; // offset 0xA36CB static char CurrentGrenadeGunAmmoType; // offset 0xA36CC static char CurrentCrossBowAmmoType; // offset 0xA36CD static char StashedCurrentPistolsAmmoType; // offset 0xA36CE static char StashedCurrentUziAmmoType; // offset 0xA36CF static char StashedCurrentRevolverAmmoType; // offset 0xA36D0 static char StashedCurrentShotGunAmmoType; // offset 0xA36D1 static char StashedCurrentGrenadeGunAmmoType; // offset 0xA36D2 static char StashedCurrentCrossBowAmmoType; // offset 0xA36D3 char current_selected_option; // offset 0xA36E0 char Stashedcurrent_selected_option; // offset 0xA36DC struct AMMOLIST ammo_object_list[3]; // offset 0xA3784 char ammo_selector_flag; // offset 0xA3728 char num_ammo_slots; // offset 0xA3758 char* current_ammo_type; // offset 0xA3700 int OBJLIST_SPACING; // offset 0xA3798 char friggrimmer; // offset 0xA36D4 char friggrimmer2; // offset 0xA36E4 char oldLaraBusy; // offset 0xA3774 struct MENUTHANG current_options[3]; // offset 0xA3740 #if PSXENGINE void do_playstation_button_prompts_v1()//416E0(<), 41B34(<) (F) { if (examine_mode) { if (rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem == 0x5C) { PrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_MORE]], FF_NONE); PrintString(496, 232, 5, &gfStringWad[gfStringOffset[STR_HAMMER]], FF_UNK10); } else { //loc_41784 PrintString(SCREEN_WIDTH / 2, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL]], FF_CENTER); } return; } else if(stats_mode) { //loc_41774 PrintString(SCREEN_WIDTH / 2, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL]], FF_CENTER); return; } else if (ammo_active) { //loc_417B8 PrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_SELECT_AMMO]], FF_NONE); } else if (GLOBAL_invkeypadmode) { //loc_417E4 PrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL]], FF_NONE); PrintString(200, 232, 5, &gfStringWad[gfStringOffset[STR_PUSH_KEYPAD]], FF_NONE); } else if (rings[RING_AMMO]->ringactive) { //loc_41838 PrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_COMBINE_BIS]], FF_NONE); } else { //loc_41880 PrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_SELECT_OPTION]], FF_NONE); } //loc_418AC PrintString(496, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL_BIS]], FF_R_JUSTIFY); } #endif void S_DrawPickup(short object_number)//41608(<), 41A5C(<) (F) { #if PC_VERSION phd_LookAt(0, SECTOR(1), 0, 0, 0, 0, 0); SetD3DViewMatrix(); SetViewMatrix(); DrawThreeDeeObject2D( (int)(phd_winxmax / 512.0 * 448.0), (int)(phd_winymax / 256.0 * 216.0), convert_obj_to_invobj(object_number), 128, 0, (GnFrameCounter & 0x7F) << 9, 0, 0, 1); #elif PSX_VERSION || PSXPC_VERSION ClearOTagR(db.pickup_ot, 256); DrawThreeDeeObject2D(PickupX + 448, 200, convert_obj_to_invobj(object_number), 128, 0, (GnFrameCounter & 0x7F) << 9, 0, 0, 1); #if defined(USE_32_BIT_ADDR) db.pickup_ot[0] = db.ot[0]; db.ot[0] = (uintptr_t)&db.pickup_ot[255 * 2]; #else db.pickup_ot[0] = (db.pickup_ot[0] & 0xFF000000) | (db.ot[0] & 0xFFFFFF); db.ot[0] = (db.ot[0] & 0xFF000000) | (uintptr_t)&db.pickup_ot[255] & 0xFFFFFF; #endif #endif } void dels_give_lara_guns_cheat()//41470, 418C4 (F) { #if PC_VERSION ; // null sub #else if(objects[FLARE_INV_ITEM].loaded) { lara.num_flares = -1; } lara.num_small_medipack = -1; lara.num_large_medipack = -1; if (!(gfLevelFlags & GF_LVOP_YOUNG_LARA)) { if (objects[PISTOLS_ITEM].loaded) { lara.num_shotgun_ammo1 = -1; lara.num_shotgun_ammo2 = -1; lara.shotgun_type_carried |= 1; } if (objects[REVOLVER_ITEM].loaded) { lara.num_revolver_ammo = -1; lara.sixshooter_type_carried |= 1; } if (objects[CROSSBOW_ITEM].loaded) { lara.num_crossbow_ammo1 = -1; lara.num_crossbow_ammo2 = -1; lara.crossbow_type_carried |= 1; } if (gfCurrentLevel < LVL5_GIBBY_LEVEL) { lara.crossbow_type_carried = 0xD; lara.num_crossbow_ammo2 = 0; } if (objects[HK_ITEM].loaded) { lara.num_hk_ammo1 = -1; lara.hk_type_carried |= 1; } if(objects[UZI_ITEM].loaded) { lara.num_uzi_ammo = -1; lara.uzis_type_carried |= 1; } if(objects[LASERSIGHT_ITEM].loaded) { lara.lasersight = 1; } if(objects[SILENCER_ITEM].loaded) { lara.silencer = 1; } } #endif } void dels_give_lara_items_cheat()//41324, 41778 (F) { int i; #if PC_VERSION ; // null sub #else if(objects[CROWBAR_ITEM].loaded) { lara.crowbar = 1; } for(i = 0; i < 8; i++) { if(objects[PUZZLE_ITEM1 + i].loaded) { lara.puzzleitems[i] = 1; } } for(i = 0; i < 8; i++) { if(objects[KEY_ITEM1 + i].loaded) { lara.keyitems |= 1 << i; } } for(i = 0; i < 4; i++) { if(objects[PICKUP_ITEM1 + i].loaded) { lara.pickupitems |= 1 << i; } } lara.puzzleitemscombo = 0; lara.keyitemscombo = 0; lara.pickupitemscombo = 0; if(gfCurrentLevel == LVL5_SUBMARINE) { lara.puzzleitems[0] = 0; } if(gfCurrentLevel == LVL5_OLD_MILL) { lara.puzzleitems[2] = 0; } #endif } void do_stats_mode()//412BC, 41710 (F) { stats_mode += 8; if (stats_mode > 128) stats_mode = 128; #if PC_VERSION S_Warn("todo status cunt"); // todo #else DisplayStatsUCunt(); #endif if (go_deselect) { SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); go_deselect = 0; stats_mode = 0; } } void do_examine_mode()//411C4, 41618 (F) { struct INVOBJ* objme = &inventry_objects_list[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem]; int saved_scale = objme->scale1; examine_mode += 8; if (examine_mode > 128) examine_mode = 128; objme->scale1 = 300; DrawThreeDeeObject2D( #if PC_VERSION (phd_centerx + inventry_xpos), (phd_centery / 120.0 * 256.0 + inventry_xpos) / 2, #else inventry_xpos + 256, (inventry_ypos + 240) / 2, #endif rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem, examine_mode, ANGLE(180), ANGLE(90), ANGLE(90), 96, 0); objme->scale1 = saved_scale; if (go_deselect) { SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); go_deselect = 0; examine_mode = 0; } } void do_keypad_mode()//40B54, 40FA8 { UNIMPLEMENTED(); } void init_keypad_mode()//40B2C(<), 40F80(<) (F) { keypadx = 0; keypady = 0; keypadnuminputs = 0; keypadinputs[0] = 0; keypadinputs[1] = 0; keypadinputs[2] = 0; keypadinputs[3] = 0; keypadpause = 0; } int convert_invobj_to_obj(int obj)//40B08(<), 40F5C(<) (F) { return inventry_objects_list[obj].object_number; } int convert_obj_to_invobj(short obj)//40AC4(<), 40F18() (F) { int i; for(i = 0; i < 100; i++) { if (inventry_objects_list[i].object_number == obj) return i; } return 27; } void remove_inventory_item(short object_number)//4097C, 40DD0 (F) { if (object_number >= PICKUP_ITEM1 && object_number <= PICKUP_ITEM4) { lara.pickupitems &= ~(1 << (object_number - PICKUP_ITEM1)); } else if (object_number >= PICKUP_ITEM1_COMBO1 && object_number <= PICKUP_ITEM4_COMBO2) { lara.pickupitemscombo &= ~(1 << (object_number - PICKUP_ITEM1_COMBO1)); } else if (object_number >= KEY_ITEM1 && object_number <= KEY_ITEM8) { lara.keyitems &= ~(1 << (object_number - KEY_ITEM1)); } else if (object_number >= KEY_ITEM1_COMBO1 && object_number <= KEY_ITEM8_COMBO2) { lara.keyitemscombo &= ~(1 << (object_number - KEY_ITEM1_COMBO1)); } else if (object_number >= PUZZLE_ITEM1 && object_number <= PUZZLE_ITEM8) { lara.puzzleitems[object_number - PUZZLE_ITEM1]--; } else if (object_number >= PUZZLE_ITEM1_COMBO1 && object_number <= PUZZLE_ITEM8_COMBO2) { lara.puzzleitemscombo &= ~(1 << (object_number - PUZZLE_ITEM1_COMBO1)); } } int have_i_got_object(short object_number)//4086C, 40CC0 (F) { if (object_number >= PICKUP_ITEM1 && object_number <= PICKUP_ITEM4) { return lara.pickupitems & 1 << (object_number - PICKUP_ITEM1); } if (object_number >= PICKUP_ITEM1_COMBO1 && object_number <= PICKUP_ITEM4_COMBO2) { return lara.pickupitemscombo & 1 << (object_number - PICKUP_ITEM1_COMBO1); } if (object_number >= KEY_ITEM1 && object_number <= KEY_ITEM8) { return lara.keyitems & 1 << (object_number - KEY_ITEM1); } if (object_number >= KEY_ITEM1_COMBO1 && object_number <= KEY_ITEM8_COMBO2) { return lara.keyitemscombo & 1 << (object_number - KEY_ITEM1_COMBO1); } if (object_number >= PUZZLE_ITEM1 && object_number <= PUZZLE_ITEM8) { return lara.puzzleitems[object_number - PUZZLE_ITEM1]; } if (object_number >= PUZZLE_ITEM1_COMBO1 && object_number <= PUZZLE_ITEM8_COMBO2) { return lara.puzzleitemscombo & 1 << (object_number - PUZZLE_ITEM1_COMBO1); } if (object_number == CROWBAR_ITEM) { return lara.crowbar; } if (object_number == WET_CLOTH) { return lara.wetcloth & CLOTH_WET; } return 0; } void NailInvItem(short objnum)//40584, 409D8 (F) { switch (objnum) { case UZI_ITEM: lara.uzis_type_carried = WTYPE_MISSING; lara.num_uzi_ammo = 0; break; case PISTOLS_ITEM: lara.holster = LARA_HOLSTERS; lara.pistols_type_carried = WTYPE_MISSING; lara.gun_status = LG_NO_ARMS; lara.last_gun_type = WEAPON_NONE; lara.gun_type = WEAPON_NONE; lara.request_gun_type = WEAPON_NONE; break; case SHOTGUN_ITEM: lara.shotgun_type_carried = WTYPE_MISSING; lara.num_shotgun_ammo1 = 0; break; case REVOLVER_ITEM: lara.sixshooter_type_carried = WTYPE_MISSING; lara.num_revolver_ammo = 0; break; case CROSSBOW_ITEM: lara.crossbow_type_carried = WTYPE_MISSING; lara.num_crossbow_ammo1 = 0; break; case HK_ITEM: lara.hk_type_carried = WTYPE_MISSING; lara.num_hk_ammo1 = 0; break; case FLARE_INV_ITEM: lara.num_flares = 0; break; case SILENCER_ITEM: lara.silencer = WTYPE_MISSING; break; case LASERSIGHT_ITEM: lara.lasersight = WTYPE_MISSING; break; case BIGMEDI_ITEM: lara.num_large_medipack = 0; break; case SMALLMEDI_ITEM: lara.num_small_medipack = 0; break; case BINOCULARS_ITEM: lara.binoculars = WTYPE_MISSING; break; case CROWBAR_ITEM: lara.crowbar = 0; break; case EXAMINE1: lara.examine1 = 0; break; case EXAMINE2: lara.examine2 = 0; break; case EXAMINE3: lara.examine3 = 0; break; case WET_CLOTH: lara.wetcloth = CLOTH_MISSING; break; case CLOTH: lara.wetcloth = CLOTH_MISSING; break; case BOTTLE: lara.bottle = 0; break; default: if (objnum >= PICKUP_ITEM1 && objnum <= PICKUP_ITEM4) { lara.pickupitems &= ~(1 << (objnum - PICKUP_ITEM1)); } else if (objnum >= PICKUP_ITEM1_COMBO1 && objnum <= PICKUP_ITEM4_COMBO2) { lara.pickupitemscombo &= ~(1 << (objnum - PICKUP_ITEM1_COMBO1)); } else if (objnum >= KEY_ITEM1 && objnum <= KEY_ITEM8) { lara.keyitems &= ~(1 << (objnum - KEY_ITEM1)); } else if (objnum >= KEY_ITEM1_COMBO1 && objnum <= KEY_ITEM8_COMBO2) { lara.keyitemscombo &= ~(1 << (objnum - KEY_ITEM1_COMBO1)); } else if (objnum >= PUZZLE_ITEM1 && objnum <= PUZZLE_ITEM8) { lara.puzzleitems[objnum - PUZZLE_ITEM1] = 0; } else if (objnum >= PUZZLE_ITEM1_COMBO1 && objnum <= PUZZLE_ITEM8_COMBO2) { lara.puzzleitemscombo &= ~(1 << (objnum - PUZZLE_ITEM1_COMBO1)); } break; } } void DEL_picked_up_object(short objnum)//3FEB0, 40304 (F) { switch (objnum) { case UZI_ITEM: if (!(lara.uzis_type_carried & WTYPE_PRESENT)) lara.uzis_type_carried = WTYPE_PRESENT | WTYPE(UZI_NORMAL); if (lara.num_uzi_ammo != -1) lara.num_uzi_ammo += UZI_AMMO_COUNT; return; case PISTOLS_ITEM: if (!(lara.pistols_type_carried & WTYPE_PRESENT)) lara.pistols_type_carried = WTYPE_PRESENT | WTYPE(PISTOLS_NORMAL); lara.num_pistols_ammo = -1; return; case SHOTGUN_ITEM: if (!(lara.shotgun_type_carried & WTYPE_PRESENT)) lara.shotgun_type_carried = WTYPE_PRESENT | WTYPE(SHELL_NORMAL); if (lara.num_shotgun_ammo1 != -1) lara.num_shotgun_ammo1 += SHOTGUN_SHELL_COUNT; return; case REVOLVER_ITEM: if (!(lara.sixshooter_type_carried & WTYPE_PRESENT)) lara.sixshooter_type_carried = WTYPE_PRESENT | WTYPE(REVOLVER_NORMAL); if (lara.num_revolver_ammo != -1) lara.num_revolver_ammo += REVOLVER_AMMO_COUNT; return; case CROSSBOW_ITEM: if (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT) { lara.crossbow_type_carried = WTYPE_PRESENT | WTYPE_LASERSIGHT | WTYPE(GRAPPLING_TYPE_1); lara.num_crossbow_ammo2 = 0; } else { if (!(lara.crossbow_type_carried & WTYPE_PRESENT)) lara.crossbow_type_carried = WTYPE_PRESENT | WTYPE(GRAPPLING_TYPE_1); if (lara.num_crossbow_ammo1 != -1) lara.num_crossbow_ammo1 += GRAPPLING_AMMO_COUNT; } return; case HK_ITEM: SetCutNotPlayed(CUT_RICH_CUT_3); if (!(lara.hk_type_carried & WTYPE_PRESENT)) lara.hk_type_carried = WTYPE_PRESENT | WTYPE(HK_SNIPER); if (gfCurrentLevel != LVL5_ESCAPE_WITH_THE_IRIS) if (lara.num_hk_ammo1 != -1) lara.num_hk_ammo1 += HK_AMMO_COUNT; return; case SHOTGUN_AMMO1_ITEM: if (lara.num_shotgun_ammo1 != -1) lara.num_shotgun_ammo1 += SHOTGUN_SHELL_COUNT; return; case SHOTGUN_AMMO2_ITEM: if (lara.num_shotgun_ammo2 != -1) lara.num_shotgun_ammo2 += SHOTGUN_SHELL_COUNT; return; case HK_AMMO_ITEM: if (lara.num_hk_ammo1 != -1) lara.num_hk_ammo1 += HK_AMMO_COUNT; return; case CROSSBOW_AMMO1_ITEM: if (lara.num_crossbow_ammo1 != -1) ++lara.num_crossbow_ammo1; return; case CROSSBOW_AMMO2_ITEM: if (lara.num_crossbow_ammo2 != -1) lara.num_crossbow_ammo2 += GRAPPLING_AMMO_COUNT; return; case REVOLVER_AMMO_ITEM: if (lara.num_revolver_ammo != -1) lara.num_revolver_ammo += REVOLVER_AMMO_COUNT; return; case UZI_AMMO_ITEM: if (lara.num_uzi_ammo != -1) lara.num_uzi_ammo += UZI_AMMO_COUNT; return; case FLARE_INV_ITEM: if (lara.num_flares != -1) lara.num_flares += 12; return; case SILENCER_ITEM: if (!((lara.uzis_type_carried | (lara.pistols_type_carried | lara.shotgun_type_carried | lara.sixshooter_type_carried | lara.crossbow_type_carried | lara.hk_type_carried)) & WTYPE_SILENCER)) lara.silencer = 1; return; case LASERSIGHT_ITEM: if (!((lara.uzis_type_carried | (lara.pistols_type_carried | lara.shotgun_type_carried | lara.sixshooter_type_carried | lara.crossbow_type_carried | lara.hk_type_carried)) & WTYPE_LASERSIGHT)) lara.lasersight = 1; return; case BIGMEDI_ITEM: if (lara.num_large_medipack != -1) ++lara.num_large_medipack; return; case SMALLMEDI_ITEM: if (lara.num_small_medipack != -1) ++lara.num_small_medipack; return; case BINOCULARS_ITEM: lara.binoculars = WTYPE_PRESENT; return; case PICKUP_ITEM4: IsAtmospherePlaying = 0; S_CDPlay(CDA_XA1_SECRET, 0); lara.pickupitems |= 8u; ++savegame.Level.Secrets; ++savegame.Game.Secrets; if (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT) { ++savegame.CampaignSecrets[3]; } else if (gfCurrentLevel >= LVL5_BASE && gfCurrentLevel <= LVL5_SINKING_SUBMARINE) { ++savegame.CampaignSecrets[2]; } else if (gfCurrentLevel >= LVL5_STREETS_OF_ROME && gfCurrentLevel <= LVL5_COLOSSEUM) { ++savegame.CampaignSecrets[0]; } else if (gfCurrentLevel >= LVL5_GALLOWS_TREE && gfCurrentLevel <= LVL5_OLD_MILL) { ++savegame.CampaignSecrets[1]; } return; case CROWBAR_ITEM: lara.crowbar = 1; return; case EXAMINE1: lara.examine1 = 1; return; case EXAMINE2: lara.examine2 = 1; return; case EXAMINE3: lara.examine3 = 1; return; case WET_CLOTH: lara.wetcloth = CLOTH_WET; return; case CLOTH: lara.wetcloth = CLOTH_DRY; return; case BOTTLE: lara.bottle++; return; default: if (objnum >= PICKUP_ITEM1 && objnum <= PICKUP_ITEM4) { lara.pickupitems |= 1 << (objnum - PICKUP_ITEM1); } else if (objnum >= PICKUP_ITEM1_COMBO1 && objnum <= PICKUP_ITEM4_COMBO2) { lara.pickupitemscombo |= 1 << (objnum - PICKUP_ITEM1_COMBO1); } else if (objnum >= KEY_ITEM1 && objnum <= KEY_ITEM8) { lara.keyitems |= 1 << (objnum - KEY_ITEM1); } else if (objnum >= KEY_ITEM1_COMBO1 && objnum <= KEY_ITEM8_COMBO2) { lara.keyitemscombo |= 1 << (objnum - KEY_ITEM1_COMBO1); } else if (objnum >= PUZZLE_ITEM1 && objnum <= PUZZLE_ITEM8) { lara.puzzleitems[objnum - PUZZLE_ITEM1]++; } else if (objnum >= PUZZLE_ITEM1_COMBO1 && objnum <= PUZZLE_ITEM8_COMBO2) { lara.puzzleitemscombo |= 1 << (objnum - PUZZLE_ITEM1_COMBO1); } } } void use_current_item()//3F9A0, 3FDF4 { SayNo(); UNIMPLEMENTED(); } void setup_objectlist_startposition2(short newobj)//3F938, 3FD8C (F) { int i; for (i = 0; i < 100; i++) { if (inventry_objects_list[rings[RING_INVENTORY]->current_object_list[i].invitem].object_number == newobj) { rings[RING_INVENTORY]->curobjinlist = i; } } } void setup_objectlist_startposition(short newobj)//3F8F0, 3FD44 (F) { int i; for(i = 0; i < 100; i++) { if (rings[RING_INVENTORY]->current_object_list[i].invitem == newobj) { rings[RING_INVENTORY]->curobjinlist = i; } } } void combine_clothbottle(int flag)//3F8D0(<), 3FD24(<) (F) { lara.wetcloth = 2; lara.bottle--; } void combine_PickupItem4(int flag)//3F8AC(<), 3FD00(<) (F) { lara.pickupitems |= (1 << 3); lara.pickupitemscombo &= ~(3 << 6); } void combine_PickupItem3(int flag)//3F888(<), 3FCDC(<) (F) { lara.pickupitems |= (1 << 2); lara.pickupitemscombo &= ~(3 << 4); } void combine_PickupItem2(int flag)//3F864(<), 3FCB8(<) (F) { lara.pickupitems |= (1 << 1); lara.pickupitemscombo &= ~(3 << 2); } void combine_PickupItem1(int flag)//3F840(<), 3FC94(<) (F) { lara.pickupitems |= (1 << 0); lara.pickupitemscombo &= ~(3 << 0); } void combine_KeyItem8(int flag)//3F81C(<), 3FC70(<) (F) { lara.keyitems |= (1 << 7); lara.keyitemscombo &= ~(3 << 14); } void combine_KeyItem7(int flag)//3F7F8(<), 3FC4C(<) (F) { lara.keyitems |= (1 << 6); lara.keyitemscombo &= ~(3 << 12); } void combine_KeyItem6(int flag)//3F7D4(<), 3FC28(<) (F) { lara.keyitems |= (1 << 5); lara.keyitemscombo &= ~(3 << 10); } void combine_KeyItem5(int flag)//3F7B0(<), 3FC04(<) (F) { lara.keyitems |= (1 << 4); lara.keyitemscombo &= ~(3 << 8); } void combine_KeyItem4(int flag)//3F78C(<), 3FBE0(<) (F) { lara.keyitems |= (1 << 3); lara.keyitemscombo &= ~(3 << 6); } void combine_KeyItem3(int flag)//3F768(<), 3FBBC(<) (F) { lara.keyitems |= (1 << 2); lara.keyitemscombo &= ~(3 << 4); } void combine_KeyItem2(int flag)//3F744(<), 3FB98(<) (F) { lara.keyitems |= (1 << 1); lara.keyitemscombo &= ~(3 << 2); } void combine_KeyItem1(int flag)//3F720(<), 3FB74(<) (F) { lara.keyitems |= (1 << 0); lara.keyitemscombo &= ~(3 << 0); } void combine_PuzzleItem8(int flag)//3F700(<), 3FB54(<) (F) { lara.puzzleitems[7] = 1; lara.puzzleitemscombo &= 0x3FFF; } void combine_PuzzleItem7(int flag)//3F6E0(<), 3FB34(<) (F) { lara.puzzleitems[6] = 1; lara.puzzleitemscombo &= 0xCFFF; } void combine_PuzzleItem6(int flag)//3F6C0(<), 3FB14(<) (F) { lara.puzzleitems[5] = 1; lara.puzzleitemscombo &= 0xF3FF; } void combine_PuzzleItem5(int flag)//3F6A0(<), 3FAF4(<) (F) { lara.puzzleitems[4] = 1; lara.puzzleitemscombo &= 0xFCFF; } void combine_PuzzleItem4(int flag)//3F680(<), 3FAD4(<) (F) { lara.puzzleitems[3] = 1; lara.puzzleitemscombo &= 0xFF3F; } void combine_PuzzleItem3(int flag)//3F660(<), 3FAB4(<) (F) { lara.puzzleitems[2] = 1; lara.puzzleitemscombo &= 0xFFCF; } void combine_PuzzleItem2(int flag)//3F640(<), 3FA94(<) (F) { lara.puzzleitems[1] = 1; lara.puzzleitemscombo &= 0xFFF3; } void combine_PuzzleItem1(int flag)//3F620(<), 3FA74(<) (F) { lara.puzzleitems[0] = 1; lara.puzzleitemscombo &= 0xFFFC; } void combine_crossbow_lasersight(int flag)//3F590, 3F9E4 (F) { if (flag) { lara.lasersight = 1; lara.crossbow_type_carried &= ~4; } else { lara.lasersight = 0; lara.crossbow_type_carried |= 4; } if (lara.gun_status && lara.gun_type == WEAPON_CROSSBOW) { undraw_shotgun_meshes(WEAPON_CROSSBOW); draw_shotgun_meshes(WEAPON_CROSSBOW); } } void combine_revolver_lasersight(int flag)//3F500, 3F954 (F) { if (flag) { lara.lasersight = 1; lara.sixshooter_type_carried &= ~WTYPE_LASERSIGHT; } else { lara.lasersight = 0; lara.sixshooter_type_carried |= WTYPE_LASERSIGHT; } if (lara.gun_status && lara.gun_type == WEAPON_REVOLVER) { undraw_pistol_mesh_right(WEAPON_REVOLVER); draw_pistol_meshes(WEAPON_REVOLVER); } } void combine_HK_SILENCER(int flag)//3F4C0(<), 3F914(<) (F) { if(flag == 0) { lara.silencer = 0; lara.hk_type_carried |= WTYPE_SILENCER; } else { lara.silencer = 1; lara.hk_type_carried &= ~WTYPE_SILENCER; } } void seperate_object(short obj)//3F424, 3F878 (F) { int n; for (n = 0; n < 24; n++) { if (dels_handy_combine_table[n].combined_item == obj) break; } dels_handy_combine_table[n].combine_routine(1); construct_object_list(); setup_objectlist_startposition(dels_handy_combine_table[n].item1); } void combine_these_two_objects(short obj1, short obj2)//3F348, 3F79C (F) { int n; for(n = 0; n < 24; n++) { if (dels_handy_combine_table[n].item1 == obj1 && dels_handy_combine_table[n].item2 == obj2) break; } dels_handy_combine_table[n].combine_routine(0); construct_object_list(); setup_objectlist_startposition(dels_handy_combine_table[n].combined_item); handle_object_changeover(RING_INVENTORY); } int do_these_objects_combine(int obj1, int obj2)//3F2DC, 3F730 (F) { int n; for (n = 0; n < 24; n++) { if (dels_handy_combine_table[n].item1 == obj1 && dels_handy_combine_table[n].item2 == obj2) return TRUE; } return FALSE; } int have_i_got_item(short obj)//3F29C, 3F6F0 (F) { int i; for(i = 0; i < 100; i++) { if (rings[RING_INVENTORY]->current_object_list[i].invitem == obj) return TRUE; } return FALSE; } int is_item_currently_combinable(short obj)//3F200(<), 3F654(<) (F) { int n; //loc_3F228 for(n = 0; n < 24; n++) { if (dels_handy_combine_table[n].item1 == obj) { if (have_i_got_item(dels_handy_combine_table[n].item2)) { return TRUE; } //loc_3F24C if (dels_handy_combine_table[n].item2 == obj) { if (have_i_got_item(dels_handy_combine_table[n].item1)) { return TRUE; } }//loc_3F270 }//loc_3F24C } return FALSE; } void update_laras_weapons_status()//3F13C, 3F590 (F) { if(lara.shotgun_type_carried & WTYPE_PRESENT) { lara.shotgun_type_carried &= ~WTYPE_MASK_AMMO; if (CurrentShotGunAmmoType != 0) lara.shotgun_type_carried |= WTYPE(SHELL_WIDESHOT); else lara.shotgun_type_carried |= WTYPE(SHELL_NORMAL); } if (lara.hk_type_carried & WTYPE_PRESENT) { lara.hk_type_carried &= ~WTYPE_MASK_AMMO; if (CurrentGrenadeGunAmmoType == HK_SNIPER) lara.hk_type_carried |= WTYPE(HK_SNIPER); else if (CurrentGrenadeGunAmmoType == HK_BURST) lara.hk_type_carried |= WTYPE(HK_BURST); else lara.hk_type_carried |= WTYPE(HK_RAPID); } if (lara.crossbow_type_carried & WTYPE_PRESENT) { lara.crossbow_type_carried &= ~WTYPE_MASK_AMMO; if (CurrentCrossBowAmmoType != GRAPPLING_TYPE_1) lara.crossbow_type_carried |= WTYPE(GRAPPLING_TYPE_2); else lara.crossbow_type_carried |= WTYPE(GRAPPLING_TYPE_1); } } void spinback(unsigned short* cock)//3F094, 3F4E8 (F) { unsigned short val = *cock; unsigned short val2; if (val) { if (val <= ANGLE(180)) { if (val < ANGLE(5)) val = ANGLE(5); if (val > ANGLE(90)) val = ANGLE(90); val2 = val - (val >> 3); if (val2 > ANGLE(180)) val2 = ANGLE(0); } else { if (-(short)val < ANGLE(5)) val = ANGLE(5); if (-(short)val > ANGLE(90)) val = ANGLE(90); val2 = ((unsigned short)-(short)val >> 3) + val; if (val2 < ANGLE(180)) val2 = ANGLE(0); } *cock = val2; } } void draw_ammo_selector()//3EDDC(<), 3F230(<) (F) { int n; int xpos; short yrot; struct INVOBJ* objme; char cunter[256]; if (ammo_selector_flag) { #if PC_VERSION xpos = (2 * phd_centerx - OBJLIST_SPACING) >> 1; #else xpos = (SCREEN_WIDTH - OBJLIST_SPACING) >> 1; #endif if (num_ammo_slots == 2) { xpos -= OBJLIST_SPACING / 2; } else if (num_ammo_slots == 3) { //loc_3EE40 xpos -= OBJLIST_SPACING; } //loc_3EE4C if (num_ammo_slots != 0) { //loc_3EE74 for(n = 0; n < num_ammo_slots; n++) { objme = &inventry_objects_list[ammo_object_list[n].invitem]; if (n == current_ammo_type[0]) { if ((objme->flags & 2)) { ammo_object_list[n].yrot += 0x3FE; }//loc_3EECC } else { //loc_3EEC0 spinback(&ammo_object_list[n].yrot); } //loc_3EECC yrot = ammo_object_list[n].yrot; if (n == current_ammo_type[0]) { if (ammo_object_list[n].amount == -1) { sprintf(&cunter[0], &gfStringWad[gfStringOffset[STR_UNLIMITED]], &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[n].invitem].objname]]); } else { //loc_3EF48 sprintf(&cunter[0], "%d x %s", ammo_object_list[n].amount, &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[n].invitem].objname]]); } //loc_3EF90 if (ammo_selector_fade_val != 0) { PrintString( #if PC_VERSION phd_centerx, font_height + phd_centery + 2 * font_height - 9, #else SCREEN_WIDTH / 2, 165, #endif 8, &cunter[0], FF_CENTER); }//loc_3EFB8 if (n == current_ammo_type[0]) { DrawThreeDeeObject2D(inventry_xpos + 64 + xpos, inventry_ypos + 190, ammo_object_list[n].invitem, ammo_selector_fade_val, 0, yrot, 0, 0, 0); } else { //loc_3F00C DrawThreeDeeObject2D(inventry_xpos + 64 + xpos, inventry_ypos + 190, ammo_object_list[n].invitem, ammo_selector_fade_val, 0, yrot, 0, 1, 0); } } else { //loc_3F00C DrawThreeDeeObject2D(inventry_xpos + 64 + xpos, inventry_ypos + 190, ammo_object_list[n].invitem, ammo_selector_fade_val, 0, yrot, 0, 1, 0); } //loc_3F048 xpos += OBJLIST_SPACING; } }//loc_3F068 }//loc_3F068 } void fade_ammo_selector()//3ED08, 3F15C (F) { if (rings[RING_INVENTORY]->ringactive && (right_repeat >= 8 || left_repeat >= 8)) { ammo_selector_fade_val = 0; } else if (ammo_selector_fade_dir == 1) { if (ammo_selector_fade_val < 128) { ammo_selector_fade_val += 32; } if (ammo_selector_fade_val > 128) { ammo_selector_fade_val = 128; ammo_selector_fade_dir = 0; } } else if (ammo_selector_fade_dir == 2) { if (ammo_selector_fade_val > 0) { ammo_selector_fade_val -= 32; } if (ammo_selector_fade_val < 0) { ammo_selector_fade_val = 0; ammo_selector_fade_dir = 0; } } } void setup_ammo_selector()//3E9F8, 3EE4C (F) { #if 0//PSX_VERSION || PSXPC_VERSION #else int num = 0; int opts = options_table[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem]; ammo_selector_flag = 0; num_ammo_slots = 0; if (!rings[RING_AMMO]->ringactive) { ammo_object_list[2].yrot = 0; ammo_object_list[1].yrot = 0; ammo_object_list[0].yrot = 0; if (opts & 0x4FC0) { ammo_selector_flag = 1; ammo_selector_fade_dir = 1; if (opts & OPT_UZI) { ammo_object_list[0].invitem = INV_UZI_AMMO_ITEM; ammo_object_list[0].amount = AmountUziAmmo; num = 1; num_ammo_slots = 1; current_ammo_type = &CurrentUziAmmoType; } if (opts & OPT_PISTOLS) { num = 1; ammo_object_list[0].invitem = INV_PISTOLS_AMMO_ITEM; ammo_object_list[0].amount = -1; num_ammo_slots = 1; current_ammo_type = &CurrentPistolsAmmoType; } if (opts & OPT_REVOLVER) { num = 1; ammo_object_list[0].invitem = INV_REVOLVER_AMMO_ITEM; ammo_object_list[0].amount = AmountRevolverAmmo; num_ammo_slots = 1; current_ammo_type = &CurrentRevolverAmmoType; } if (opts & OPT_CROSSBOW_TYPE2) { current_ammo_type = &CurrentCrossBowAmmoType; ammo_object_list[num].invitem = INV_CROSSBOW_AMMO2_ITEM3; ammo_object_list[num].amount = AmountCrossBowAmmo1; num++; ammo_object_list[num].invitem = INV_CROSSBOW_AMMO2_ITEM4; ammo_object_list[num].amount = AmountCrossBowAmmo2; num++; num_ammo_slots = num; } if (opts & OPT_HK) { current_ammo_type = &CurrentGrenadeGunAmmoType; ammo_object_list[num].invitem = INV_HK_AMMO_ITEM1; ammo_object_list[num].amount = AmountHKAmmo1; num++; ammo_object_list[num].invitem = INV_HK_AMMO_ITEM2; ammo_object_list[num].amount = AmountHKAmmo1; num++; ammo_object_list[num].invitem = INV_HK_AMMO_ITEM3; ammo_object_list[num].amount = AmountHKAmmo1; num++; num_ammo_slots = num; } if (opts & OPT_SHOTGUN) { current_ammo_type = &CurrentShotGunAmmoType; ammo_object_list[num].invitem = INV_SHOTGUN_AMMO1_ITEM; ammo_object_list[num].amount = AmountShotGunAmmo1; num++; ammo_object_list[num].invitem = INV_SHOTGUN_AMMO2_ITEM; ammo_object_list[num].amount = AmountShotGunAmmo2; num++; num_ammo_slots = num; } if (opts & OPT_CROSSBOW_TYPE1) { ammo_object_list[0].invitem = INV_CROSSBOW_AMMO1_ITEM; ammo_object_list[0].amount = AmountCrossBowAmmo1; num_ammo_slots = 1; current_ammo_type = &CurrentCrossBowAmmoType; } } } #endif } void handle_inventry_menu()//3DF44(<), 3E398 (F) { int n; int opts; int i; int ypos; int num; if (rings[RING_AMMO]->ringactive) { PrintString( #if PC_VERSION phd_centerx, phd_centery #else SCREEN_WIDTH / 2, 120 #endif , 1, &gfStringWad[gfStringOffset[optmessages[5]]], FF_CENTER); if (rings[RING_INVENTORY]->objlistmovement) { return; } if (rings[RING_AMMO]->objlistmovement) { return; } if (go_select) { if (do_these_objects_combine(rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem, rings[RING_AMMO]->current_object_list[rings[RING_AMMO]->curobjinlist].invitem)) { combine_ring_fade_dir = 2; combine_type_flag = 1; combine_obj1 = rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem; combine_obj2 = rings[RING_AMMO]->current_object_list[rings[RING_AMMO]->curobjinlist].invitem; SoundEffect(SFX_MENU_COMBINE, NULL, SFX_ALWAYS); } else { //loc_3E068 SayNo(); combine_ring_fade_dir = 2; } } //loc_3E078 if (go_deselect) { SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); go_deselect = 0; combine_ring_fade_dir = 2; } return; } else { //loc_3E0A8 num = rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem; //loc_3E0DC for (n = 0; n < 3; n++) { current_options[n].type = 0; current_options[n].text = NULL; } n = 0; if (!ammo_active) { opts = options_table[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem]; if ((opts & 0x1000)) { current_options[0].type = 9; n = 1; current_options[0].text = &gfStringWad[gfStringOffset[optmessages[6]]]; } if ((opts & 0x2000)) { //loc_3E158 current_options[n].type = 10; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[7]]]; }//loc_3E1A4 if ((opts & 0x20)) { current_options[n].type = 11; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[8]]]; }//loc_3E1F0 if ((opts & 0x8000)) { current_options[n].type = 12; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[9]]]; }//loc_3E23C if ((opts & 0x4)) { current_options[n].type = 1; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[0]]]; }//loc_3E288 if ((opts & 0x2)) { current_options[n].type = 5; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[4]]]; }//loc_3E2D4 if ((opts & 0xC0)) { current_options[n].type = 2; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[1]]]; }//loc_3E320 if ((opts & 0x100)) { current_options[n].type = 2; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[10]]]; }//loc_3E36C if ((opts & 8) && is_item_currently_combinable(num)) { current_options[n].type = 3; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[2]]]; }//loc_3E3CC if ((opts & 0x1)) { current_options[n].type = 3; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[2]]]; }//loc_3E414 if ((opts & 0x10)) { current_options[n].type = 4; current_options[n++].text = &gfStringWad[gfStringOffset[optmessages[3]]]; }//j loc_3E550 } else { current_options[0].type = 6; current_options[1].type = 7; current_options[0].text = &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[0].invitem].objname]]; current_options[1].text = &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[1].invitem].objname]]; n = 2; if ((options_table[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem] & 0x100)) { n = 3; current_options[2].text = &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[2].invitem].objname]]; }//loc_3E53C current_selected_option = current_ammo_type[0]; } //loc_3E550 if (n == 1) { ypos = 120; } else { ypos = 102; } //loc_3E564 if (n == 2) { ypos = 111; } //loc_3E574 if (n > 0) { //loc_3E584 for (i = 0; i < n; i++) { if (i == current_selected_option) { PrintString(256, ypos, 1, current_options[i].text, FF_CENTER); ypos += 18; } else { //loc_3E5B0 PrintString(256, ypos, 5, current_options[i].text, FF_CENTER); ypos += 18; } //loc_3E5C8 } } //loc_3E5D8 if (menu_active && !rings[RING_INVENTORY]->objlistmovement && !rings[RING_AMMO]->objlistmovement) { if (go_up && current_selected_option) { current_selected_option--; SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); } else if (go_down && current_selected_option < n - 1) { //loc_3E64C current_selected_option++; SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); }//loc_3E684 if (ammo_active) { if (go_left && current_selected_option) { current_selected_option--; SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); }//loc_3E6C8 //v0 = n - 1 if (go_right && current_selected_option < n - 1) { current_selected_option++; SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); }//loc_3E700 current_ammo_type[0] = current_selected_option; }//loc_3E710 if (go_select) { if (current_options[current_selected_option].type != 5 && current_options[current_selected_option].type != 1) { SoundEffect(SFX_MENU_CHOOSE, NULL, SFX_ALWAYS); }//loc_3E754 if (current_options[current_selected_option].type == 2) { rings[RING_INVENTORY]->ringactive = 0; ammo_active = 1; Stashedcurrent_selected_option = current_selected_option; StashedCurrentPistolsAmmoType = CurrentPistolsAmmoType; StashedCurrentUziAmmoType = CurrentUziAmmoType; StashedCurrentRevolverAmmoType = CurrentRevolverAmmoType; StashedCurrentShotGunAmmoType = CurrentShotGunAmmoType; StashedCurrentGrenadeGunAmmoType = CurrentGrenadeGunAmmoType; } else if (current_options[current_selected_option].type == 9) { //loc_3E7C8 loading_or_saving = 1; } else if (current_options[current_selected_option].type == 10) { loading_or_saving = 2; } else if (current_options[current_selected_option].type == 11) { examine_mode = 1; } else if (current_options[current_selected_option].type == 12) { stats_mode = 1; } else if ((unsigned)(current_options[current_selected_option].type - 6) < 3) { //loc_3E848 ammo_active = 0; rings[RING_INVENTORY]->ringactive = 1; current_selected_option = 0; } else if (current_options[current_selected_option].type == 3) { construct_combine_object_list(); rings[RING_INVENTORY]->ringactive = 0; rings[RING_AMMO]->ringactive = 1; ammo_selector_flag = 0; menu_active = 0; combine_ring_fade_dir = 1; }//loc_3E888 else if (current_options[current_selected_option].type == 4) { seperate_type_flag = 1; normal_ring_fade_dir = 2; }//loc_3E8A4 else if (current_options[current_selected_option].type == 5 || current_options[current_selected_option].type == 1) //v0 = 1 { //loc_3E8B4 menu_active = 0; use_the_bitch = 1; } } //loc_3E8C0 if ((input & IN_SELECT) && current_options[current_selected_option].type == 1 && rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem - 22 < 2 && !bullshitbollox && _bullshitbollox) { menu_active = 0; use_the_bitch = current_options[current_selected_option].type; }//loc_3E958 if (go_deselect && ammo_active) { SoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS); go_deselect = 0; ammo_active = 0; rings[RING_INVENTORY]->ringactive = 1; CurrentPistolsAmmoType = StashedCurrentPistolsAmmoType; CurrentUziAmmoType = StashedCurrentUziAmmoType; CurrentRevolverAmmoType = StashedCurrentRevolverAmmoType; CurrentShotGunAmmoType = StashedCurrentShotGunAmmoType; CurrentGrenadeGunAmmoType = StashedCurrentGrenadeGunAmmoType; CurrentCrossBowAmmoType = StashedCurrentCrossBowAmmoType; current_selected_option = Stashedcurrent_selected_option; } } }//loc_3E9D0 } void handle_object_changeover(int ringnum)//3DF18, 3E36C (F) { current_selected_option = 0; menu_active = 1; setup_ammo_selector(); } void draw_current_object_list(int ringnum)//3D350, 3D7A4 { int n; // $s5 int maxobj; // $s7 int xoff; // stack offset -48 int i; // $s3 int shade; // $s1 int minobj; // stack offset -44 char textbufme[128]; // stack offset -176 int objmeup; // $a0 int nummeup; // $t0 short ymeup; // $t2 short yrot; // $t1 struct INVOBJ* objme; // $v1 int activenum; // $v1 if (rings[ringnum]->numobjectsinlist > 0) { if (ringnum == RING_AMMO) { ammo_selector_fade_val = 0; ammo_selector_fade_dir = 0; if (combine_ring_fade_dir == 1) { if (combine_ring_fade_val < 128) { combine_ring_fade_val += 32; } //loc_3D3DC maxobj = 0; if (combine_ring_fade_val > 128) { combine_ring_fade_val = 128; combine_ring_fade_dir = 0; n = 0; }//loc_3D574 n = 0; } else if (combine_ring_fade_dir == 2) { //loc_3D404 maxobj = 0; if (combine_ring_fade_val > 0) { combine_ring_fade_val -= 32; n = 0; ///DUPLICATION if(combine_ring_fade_val << 16 < 0) { if (combine_type_flag) { normal_ring_fade_dir = combine_ring_fade_dir; } else { //loc_3D44C rings[RING_INVENTORY]->ringactive = 1; menu_active = 1; rings[RING_AMMO]->ringactive = 0; handle_object_changeover(0); } combine_ring_fade_val = 0; combine_ring_fade_dir = 0; } } else {//loc_3D42C if (combine_type_flag) { normal_ring_fade_dir = combine_ring_fade_dir; } else { //loc_3D44C rings[RING_INVENTORY]->ringactive = 1; menu_active = 1; rings[RING_AMMO]->ringactive = 0; handle_object_changeover(0); } combine_ring_fade_val = 0; combine_ring_fade_dir = 0; } //loc_3D46C rings[RING_AMMO]->ringactive = 0; maxobj = 0; //j loc_3D578 } }//loc_3D478 else { if (normal_ring_fade_dir == 1) { if (normal_ring_fade_val < 128) { normal_ring_fade_val += 32; } //loc_3D4A0 maxobj = 0; if (normal_ring_fade_val > 128) { normal_ring_fade_val = 128; normal_ring_fade_dir = 0; rings[RING_INVENTORY]->ringactive = 1; menu_active = 1; //j loc_3D578 }//loc_3D574 n = 0; } else if (normal_ring_fade_dir == 2) { //loc_3D4D4 maxobj = 0; if (normal_ring_fade_val > 0) { normal_ring_fade_val -= 32; //v0 <<= 16 n = 0; //if (v0 > 0) { //j loc_3D578 } }//loc_3D4FC normal_ring_fade_val = 0; normal_ring_fade_dir = 1; if (combine_type_flag == 1) { combine_type_flag = 0; combine_these_two_objects(combine_obj1, combine_obj2); } else if (seperate_type_flag != 0) { //loc_3D52C seperate_object(rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem); } //loc_3D568 handle_object_changeover(0); } } //loc_3D578 minobj = 0; xoff = 0; if (rings[ringnum]->numobjectsinlist != 1) { xoff = (rings[ringnum]->objlistmovement * OBJLIST_SPACING) >> 16; }//loc_3D5C0 if (rings[ringnum]->numobjectsinlist == 2)//v0 = 3 { minobj = -1; n = rings[ringnum]->curobjinlist - 1; } //loc_3D5E0 if (rings[ringnum]->numobjectsinlist == 3)//v0 = 4 { minobj = -2; maxobj = 1; n = rings[ringnum]->curobjinlist - 2; }//loc_3D600 if (rings[ringnum]->numobjectsinlist == 4)//v0 = a2 < 5 ? 1 : 0 { minobj = -2; maxobj = 1; n = rings[ringnum]->curobjinlist - 2; }//loc_3D620 if (rings[ringnum]->numobjectsinlist > 4) { minobj = -3; maxobj = 2; n = rings[ringnum]->curobjinlist - 3; }//loc_3D638 if (n < 0) { n += rings[ringnum]->numobjectsinlist; }//loc_3D644 if (rings[ringnum]->objlistmovement < 0) { maxobj++; } //loc_3D658 i = minobj; if (maxobj > minobj) { //loc_3D680 while (maxobj >= i) { if (minobj == i) { if (rings[ringnum]->objlistmovement < 0) { shade = 0; } else { //loc_3D73C shade = rings[ringnum]->objlistmovement >> 9; } } else { //loc_3D6B0 if (i == minobj + 1 && maxobj != i) { shade = 128; if (rings[ringnum]->objlistmovement < 0) { if (rings[ringnum]->objlistmovement < 0) { //v0 = -rings[ringnum]->objlistmovement } //loc_3D6F0 //v0 <<= 7 //j loc_3D71C ///@TODO why incomplete }//loc_3D740 } else { //loc_3D6F8 shade = 128; if (minobj == maxobj) { if (rings[ringnum]->objlistmovement >= 0) { //loc_3D71C shade = 128 - (rings[ringnum]->objlistmovement << 7) >> 16; //j loc_3D740 }//loc_3D72C else if (rings[ringnum]->objlistmovement < 0) { shade = ((-rings[ringnum]->objlistmovement) << 7) >> 16; } } }//loc_3D740 }//loc_3D740 //loc_3D740 if (minobj == 0 && maxobj == 1) { shade = 128; }//loc_3D75C if (ringnum == RING_AMMO && combine_ring_fade_val < 128 && shade != 0) { shade = combine_ring_fade_val; }//loc_3D784 if (ringnum == RING_INVENTORY && normal_ring_fade_val < 128 && shade != 0) { shade = normal_ring_fade_val; } //loc_3D7AC if (i == 0) { nummeup = 0; if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == BIGMEDI_ITEM) { nummeup = lara.num_large_medipack; //j loc_3D930 }//loc_3D7FC//v0 = 0x163 else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == SMALLMEDI_ITEM) { nummeup = lara.num_small_medipack; //j loc_3D930 } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == FLARE_INV_ITEM) { nummeup = lara.num_flares; } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number - PUZZLE_ITEM1 < 8) { //loc_3D828 nummeup = lara.puzzleitems[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number - PUZZLE_ITEM1]; if (nummeup < 2) { nummeup = 0; } //j loc_3D930 }//loc_3D858 else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == SHOTGUN_AMMO1_ITEM) { nummeup = lara.num_shotgun_ammo1; if (nummeup != -1) { nummeup = (nummeup * 0x2AAAAAAB) - (nummeup >> 15); } //j loc_3D930 }//v0 = 0x15A else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == SHOTGUN_AMMO2_ITEM) { nummeup = lara.num_shotgun_ammo2; if (nummeup != -1) { nummeup = (nummeup * 0x2AAAAAAB) - (nummeup >> 15); } //j loc_3D930 } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == HK_AMMO_ITEM) { nummeup = lara.num_hk_ammo1; // j loc_3D930 } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == CROSSBOW_AMMO1_ITEM) { nummeup = lara.num_crossbow_ammo1; } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == CROSSBOW_AMMO2_ITEM) { nummeup = lara.num_crossbow_ammo2; } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == REVOLVER_AMMO_ITEM) { nummeup = lara.num_revolver_ammo; } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == UZI_AMMO_ITEM) { nummeup = lara.num_uzi_ammo; } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == BOTTLE) { nummeup = lara.bottle; } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == PICKUP_ITEM4) { nummeup = savegame.Level.Secrets; } //v0 = 0xDF if (nummeup == 0) { sprintf(&textbufme[0], &gfStringWad[gfStringOffset[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].objname]]); // j loc_3DA9C } else if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == PICKUP_ITEM4) { //loc_3D994 sprintf(&textbufme[0], &gfStringWad[gfStringOffset[STR_SECRETS_NUM]], nummeup, wanky_secrets_table[gfCurrentLevel]); //j loc_3DA9C } else if (nummeup == -1) { //loc_3D9E0 sprintf(&textbufme[0], &gfStringWad[gfStringOffset[STR_UNLIMITED]], &gfStringWad[gfStringOffset[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].objname]]); } else { //loc_3DA44 sprintf(&textbufme[0], "%d x %s", nummeup, &gfStringWad[gfStringOffset[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].objname]]); } //loc_3DA9C if (ringnum == RING_INVENTORY) { #if PSXENGINE PrintString(SCREEN_WIDTH / 2, 75, 8, &textbufme[0], FF_CENTER); #endif //j loc_3DADC } else { //loc_3DAC4 #if PSXENGINE PrintString(SCREEN_WIDTH / 2, 165, 8, &textbufme[0], FF_CENTER); #endif } } //loc_3DADC if (i == 0 && rings[ringnum]->objlistmovement == 0) { if ((inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].flags & 2)) { rings[ringnum]->current_object_list[n].yrot += 1022; //j loc_3DB58 }//loc_3DB58 } else { //loc_3DB44 spinback(&rings[ringnum]->current_object_list[n].yrot); } yrot = rings[ringnum]->current_object_list[n].yrot; if (ringnum == RING_INVENTORY) { ymeup = 42; } else { ymeup = 190; } //loc_3DB74 activenum = 0; if (rings[ringnum]->objlistmovement != 0) { if (rings[ringnum]->objlistmovement > 0) { activenum = -1; } else { activenum = 1; } }//loc_3DB90 if (i == activenum) { if (rings[ringnum]->current_object_list[n].bright < 160) { rings[ringnum]->current_object_list[n].bright += 16; }//loc_3DBC8 if (rings[ringnum]->current_object_list[n].bright > 160) { rings[ringnum]->current_object_list[n].bright = 160; } } else { //loc_3DBF4 if (rings[ringnum]->current_object_list[n].bright > 32) { rings[ringnum]->current_object_list[n].bright -= 16; } //loc_3DC24 if (rings[ringnum]->current_object_list[n].bright < 32) { rings[ringnum]->current_object_list[n].bright = 32; } //loc_3DC4C } //loc_3DC50 DrawThreeDeeObject2D(inventry_xpos + (i * OBJLIST_SPACING) + 256 + xoff, inventry_ypos + ymeup, rings[ringnum]->current_object_list[n].invitem, shade, 0, yrot, 0, rings[ringnum]->current_object_list[n].bright, 0); n++; if (n >= rings[ringnum]->numobjectsinlist) { n = 0; }//loc_3DCC8 i++; } }//loc_3DCD8 if (rings[ringnum]->ringactive && rings[ringnum]->numobjectsinlist != 1) { if (ringnum != RING_AMMO || combine_ring_fade_val == 128) { //loc_3DD20 if (rings[ringnum]->objlistmovement > 0) { rings[ringnum]->objlistmovement += 0x2000; } //loc_3DD34 if (rings[ringnum]->objlistmovement < 0) { rings[ringnum]->objlistmovement -= 0x2000; }//loc_3DD50 if (go_left && rings[ringnum]->objlistmovement == 0) { SoundEffect(SFX_MENU_ROTATE, NULL, SFX_ALWAYS); rings[ringnum]->objlistmovement += 0x2000; if (ammo_selector_flag) { ammo_selector_fade_dir = 2; } }//loc_3DDB0 if (go_right) { if (rings[ringnum]->objlistmovement == 0) { SoundEffect(SFX_MENU_ROTATE, NULL, SFX_DEFAULT); rings[ringnum]->objlistmovement -= 0x2000; if (ammo_selector_flag) { ammo_selector_fade_dir = 2; }//loc_3DE18 } } //loc_3DE18 if (0xFFFF < rings[ringnum]->objlistmovement) { rings[ringnum]->curobjinlist--; if (rings[ringnum]->curobjinlist < 0) { rings[ringnum]->curobjinlist = rings[ringnum]->numobjectsinlist-1; }//loc_3DE74 rings[ringnum]->objlistmovement = 0; if (ringnum == RING_INVENTORY) { handle_object_changeover(0); }//loc_3DEE8 } else { //loc_3DE90 if (rings[ringnum]->objlistmovement < -0xFFFF) { rings[ringnum]->curobjinlist++; if (rings[ringnum]->curobjinlist >= rings[ringnum]->numobjectsinlist) { rings[ringnum]->curobjinlist = 0; } //loc_3DED4 rings[ringnum]->objlistmovement = 0; if (ringnum == RING_INVENTORY) { handle_object_changeover(0); } }//loc_3DEE8 } } }//loc_3DEE8 }//loc_3DEE8 } void insert_object_into_list(int num)//3D2C4(<), 3D718(<) (F) { rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->numobjectsinlist].invitem = num; rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->numobjectsinlist].yrot = 0; rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->numobjectsinlist].bright = 32; rings[RING_INVENTORY]->numobjectsinlist++; } void construct_object_list()//3CC80, 3D0D4 (F) { int i; rings[RING_INVENTORY]->numobjectsinlist = 0; for(i = 0; i < 100; i++) { rings[RING_INVENTORY]->current_object_list[i].invitem = -1; } CurrentPistolsAmmoType = PISTOLS_NORMAL; CurrentUziAmmoType = UZI_NORMAL; CurrentRevolverAmmoType = REVOLVER_NORMAL; CurrentShotGunAmmoType = SHELL_NORMAL; CurrentGrenadeGunAmmoType = HK_SNIPER; CurrentCrossBowAmmoType = GRAPPLING_TYPE_1; if (!(gfLevelFlags & GF_LVOP_YOUNG_LARA)) { if (lara.pistols_type_carried & WTYPE_PRESENT) insert_object_into_list(INV_PISTOLS_ITEM); if (lara.uzis_type_carried & WTYPE_PRESENT) { insert_object_into_list(INV_UZI_ITEM); } else if (AmountUziAmmo) { insert_object_into_list(INV_UZI_AMMO_ITEM); } if (lara.sixshooter_type_carried & WTYPE_PRESENT) { if (lara.sixshooter_type_carried & WTYPE_LASERSIGHT) insert_object_into_list(INV_REVOLVER_ITEM2); else insert_object_into_list(INV_REVOLVER_ITEM1); } else if (AmountRevolverAmmo) { insert_object_into_list(INV_REVOLVER_AMMO_ITEM); } if (lara.shotgun_type_carried & WTYPE_PRESENT) { insert_object_into_list(INV_SHOTGUN_ITEM); if (lara.shotgun_type_carried & WTYPE(SHELL_WIDESHOT)) CurrentShotGunAmmoType = SHELL_WIDESHOT; } else { if (AmountShotGunAmmo1) insert_object_into_list(INV_SHOTGUN_AMMO1_ITEM); if (AmountShotGunAmmo2) insert_object_into_list(INV_SHOTGUN_AMMO2_ITEM); } if (lara.hk_type_carried & WTYPE_PRESENT) { if (lara.hk_type_carried & WTYPE_SILENCER) insert_object_into_list(INV_HK_ITEM2); else insert_object_into_list(INV_HK_ITEM1); if (lara.hk_type_carried & WTYPE(HK_BURST)) { CurrentGrenadeGunAmmoType = HK_BURST; } else if (lara.hk_type_carried & WTYPE(HK_RAPID)) { CurrentGrenadeGunAmmoType = HK_RAPID; } } else if (AmountHKAmmo1) { insert_object_into_list(INV_HK_AMMO_ITEM4); } if (lara.crossbow_type_carried & WTYPE_PRESENT) { if (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT) { insert_object_into_list(INV_CROSSBOW_ITEM); CurrentCrossBowAmmoType = GRAPPLING_TYPE_1; } else { if (lara.crossbow_type_carried & WTYPE_LASERSIGHT) insert_object_into_list(INV_CROSSBOW_AMMO2_ITEM2); else insert_object_into_list(INV_CROSSBOW_AMMO2_ITEM1); if (lara.crossbow_type_carried & WTYPE(GRAPPLING_TYPE_2)) CurrentCrossBowAmmoType = GRAPPLING_TYPE_2; } } else if (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT) { if (AmountCrossBowAmmo1) { insert_object_into_list(INV_CROSSBOW_AMMO1_ITEM); } } else { if (AmountCrossBowAmmo1) insert_object_into_list(INV_CROSSBOW_AMMO2_ITEM3); if (AmountCrossBowAmmo2) insert_object_into_list(INV_CROSSBOW_AMMO2_ITEM4); } if (lara.lasersight) insert_object_into_list(INV_LASERSIGHT_ITEM); if (lara.silencer) insert_object_into_list(INV_SILENCER_ITEM); if (lara.binoculars) insert_object_into_list(INV_BINOCULARS_ITEM); if (lara.num_flares) insert_object_into_list(INV_FLARE_INV_ITEM); } insert_object_into_list(INV_COMPASS_ITEM); if (lara.num_small_medipack) insert_object_into_list(INV_SMALLMEDI_ITEM); if (lara.num_large_medipack) insert_object_into_list(INV_BIGMEDI_ITEM); if (lara.crowbar) insert_object_into_list(INV_CROWBAR_ITEM); for (i = 0; i < 8; i++) { if (lara.puzzleitems[i]) insert_object_into_list(INV_PUZZLE_ITEM1 + i); } for (i = 0; i < 16; i++) { if (lara.puzzleitemscombo & (1 << i)) insert_object_into_list(INV_PUZZLE_ITEM1_COMBO1 + i); } for (i = 0; i < 8; i++) { if (lara.keyitems & (1 << i)) insert_object_into_list(INV_KEY_ITEM1 + i); } for (i = 0; i < 16; i++) { if (lara.keyitemscombo & (1 << i)) insert_object_into_list(INV_KEY_ITEM1_COMBO1 + i); } for (i = 0; i < 4; i++) { if (lara.pickupitems & (1 << i)) insert_object_into_list(INV_PICKUP_ITEM1 + i); } for (i = 0; i < 8; i++) { if (lara.pickupitemscombo & (1 << i)) insert_object_into_list(INV_PICKUP_ITEM1_COMBO1 + i); } if (lara.examine1) insert_object_into_list(INV_EXAMINE1); if (lara.examine2) insert_object_into_list(INV_EXAMINE2); if (lara.examine3) insert_object_into_list(INV_EXAMINE3); if (lara.wetcloth == CLOTH_WET) insert_object_into_list(INV_WET_CLOTH); if (lara.wetcloth == CLOTH_DRY) insert_object_into_list(INV_CLOTH); if (lara.bottle) insert_object_into_list(INV_BOTTLE); if (Gameflow->LoadSaveEnabled) { insert_object_into_list(INV_MEMCARD_LOAD_INV_ITEM); insert_object_into_list(INV_MEMCARD_SAVE_INV_ITEM); } rings[RING_INVENTORY]->objlistmovement = 0; rings[RING_INVENTORY]->curobjinlist = 0; rings[RING_INVENTORY]->ringactive = TRUE; rings[RING_AMMO]->objlistmovement = 0; rings[RING_AMMO]->curobjinlist = 0; rings[RING_AMMO]->ringactive = FALSE; handle_object_changeover(RING_INVENTORY); ammo_active = 0; } void insert_object_into_list_v2(int num)//3CB90, 3CFE4 (F) { if (options_table[num] & 9) { if (rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem != num) { rings[RING_AMMO]->current_object_list[rings[RING_AMMO]->numobjectsinlist].invitem = num; rings[RING_AMMO]->current_object_list[rings[RING_AMMO]->numobjectsinlist].yrot = 0; rings[RING_AMMO]->current_object_list[rings[RING_AMMO]->numobjectsinlist++].bright = 32; } } } void construct_combine_object_list()//3C940, 3CD94 (F) { int i; rings[RING_AMMO]->numobjectsinlist = 0; for (i = 0; i < 100; i++) { rings[RING_AMMO]->current_object_list[i].invitem = -1; } if (!(gfLevelFlags & GF_LVOP_YOUNG_LARA)) { if (lara.sixshooter_type_carried & WTYPE_PRESENT) { if (lara.sixshooter_type_carried & WTYPE_LASERSIGHT) insert_object_into_list_v2(INV_REVOLVER_ITEM2); else insert_object_into_list_v2(INV_REVOLVER_ITEM1); } if (lara.hk_type_carried & WTYPE_PRESENT) insert_object_into_list_v2(INV_HK_ITEM1); if (lara.crossbow_type_carried & WTYPE_PRESENT && !(gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT)) { if (lara.crossbow_type_carried & WTYPE_LASERSIGHT) insert_object_into_list_v2(INV_CROSSBOW_AMMO2_ITEM2); else insert_object_into_list_v2(INV_CROSSBOW_AMMO2_ITEM1); } if (lara.lasersight) insert_object_into_list_v2(INV_LASERSIGHT_ITEM); if (lara.silencer) insert_object_into_list_v2(INV_SILENCER_ITEM); } for (i = 0; i < 16; i++) { if (lara.puzzleitemscombo & (1 << i)) insert_object_into_list_v2(INV_PUZZLE_ITEM1_COMBO1 + i); } for (i = 0; i < 16; i++) { if (lara.keyitemscombo & (1 << i)) insert_object_into_list_v2(INV_KEY_ITEM1_COMBO1 + i); } for (i = 0; i < 8; i++) { if (lara.pickupitemscombo & (1 << i)) insert_object_into_list_v2(INV_PICKUP_ITEM1_COMBO1 + i); } if (lara.wetcloth == CLOTH_DRY) insert_object_into_list_v2(INV_CLOTH); if (lara.bottle) insert_object_into_list_v2(INV_BOTTLE); rings[RING_AMMO]->objlistmovement = 0; rings[RING_AMMO]->curobjinlist = 0; rings[RING_AMMO]->ringactive = FALSE; } int go_and_save_game()//3C920(<), 3CD74(<) (F) { #if PC_VERSION Unimpl(); return 0; #else return SaveGame(); #endif } int go_and_load_game()//3C900(<), 3CD54(<) (F) { #if PC_VERSION Unimpl(); return 0; #else return LoadGame(); #endif } void DrawInventoryItemMe(struct ITEM_INFO* item, long shade, int overlay, int shagflag)//3C6A0(<), 3CAF4(<) (F) { #if !PC_VERSION struct ANIM_STRUCT* anim; struct object_info* object; long* bone; short* rotation1; short** meshpp; short* frmptr; long i; long poppush; unsigned long bit; anim = &anims[item->anim_number]; frmptr = anim->frame_ptr; object = &objects[item->object_number]; mPushMatrix(); mTranslateXYZ(item->pos.x_pos, item->pos.y_pos, item->pos.z_pos); mRotYXZ(item->pos.y_rot, item->pos.x_rot, item->pos.z_rot); if (item->object_number == PUZZLE_HOLE8 && GLOBAL_invkeypadmode) { #if PC_VERSION ScaleCurrentMatrix({ 24576, 16384, 4096 }); #else ScaleCurrentMatrix(1, 6144, 4096, 4096); #endif }//loc_3C770 bit = 1; meshpp = &meshes[object->mesh_index]; bone = &bones[object->bone_index]; if (!shagflag) { mTranslateXYZ(frmptr[6], frmptr[7], frmptr[8]); } //loc_3C7B0 rotation1 = &frmptr[9]; mRotSuperPackedYXZ(&rotation1, 0); if ((item->mesh_bits & 1)) { if (overlay) { phd_PutPolygons_pickup(meshpp[0], 0); } else { //loc_3C7F8 phd_PutPolygons_seethrough(meshpp[0], shade); } } //loc_3C804 meshpp += 2; //loc_3C81C for (i = 0; i < object->nmeshes - 1; i++, bone += 4, meshpp += 2) { poppush = *bone; if ((poppush & 1)) { mPopMatrix(); }//loc_3C83C if ((poppush & 2)) { mPushMatrix(); }//loc_3C84C mTranslateXYZ(bone[1], bone[2], bone[3]); bit <<= 1; mRotSuperPackedYXZ(&rotation1, 0); if ((bit & item->mesh_bits)) { if (overlay) { phd_PutPolygons_pickup(meshpp[0], 1); } else { //loc_3C89C phd_PutPolygons_seethrough(meshpp[0], shade); } } //loc_3C8A8 } //loc_3C8C8 mPopMatrix(); #endif } void DrawThreeDeeObject2D(int x, int y, int num, int shade, int xrot, int yrot, int zrot, int bright, int overlay)//3C43C(<), 3C890(<) (F) { struct ITEM_INFO item; struct INVOBJ* objme; objme = &inventry_objects_list[num]; item.pos.x_rot = objme->xrot + xrot; item.pos.y_rot = objme->yrot + yrot; item.pos.z_rot = objme->zrot + zrot; item.object_number = objme->object_number; phd_LookAt(0, 1024, 0, 0, 0, 0, 0); #if PC_VERSION phd_QuickW2VMatrix({ 0, 1024, 0 }, { 100, 0, 200 }, 0); #else mQuickW2VMatrix(); #endif #if PSXENGINE if (bright == 0) { SetInventoryLighting(0x505050, 0x202020, 0x404040, 0x808080); } else if (bright == 1) { SetInventoryLighting(0x323232, 0x101010, 0x303030, 0x303030); } else { //loc_3C550 SetInventoryLighting(0x323232, 0x101010, 0x303030, (bright << 16) | (bright << 8) | bright); } #endif #if PC_VERSION SetD3DViewMatrix(); phd_PushUnitMatrix(); phd_TranslateRel(0, 0, objme->scale1); #else //loc_3C578 mPushUnitMatrix(); Matrix->m10 -= (Matrix->m10 >> 2); Matrix->m11 -= (Matrix->m11 >> 2); Matrix->m12 -= (Matrix->m12 >> 2); mLoadMatrix(Matrix); mSetTrans(0, 0, objme->scale1); item.shade = -1; item.pos.x_pos = 0; item.pos.y_pos = 0; item.pos.z_pos = 0; item.room_number = 0; item.il.Light[3].pad = 0; #endif item.mesh_bits = objme->meshbits; item.anim_number = objects[item.object_number].anim_index; #if PSXENGINE SetGeomOffset(x, y + objme->yoff); #endif if (!(objme->flags & 8)) { DrawInventoryItemMe(&item, shade, overlay, 0); } else { //loc_3C658 DrawInventoryItemMe(&item, shade, overlay, 1); } mPopMatrix(); #if PC_VERSION UNIMPLEMENTED(); //dword_E598A0 = phd_centerx; //dword_E5990C = phd_centery; #else SetGeomOffset(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); #endif } void do_debounced_joystick_poo()//3C224(<), 3C678(<) (F) { go_left = 0; go_right = 0; go_up = 0; go_down = 0; go_select = 0; go_deselect = 0; if ((input & IN_LEFT)) { if (left_repeat < 8) { left_repeat++; } else { go_left = 1; } //loc_3C278 if (left_debounce == 0) { go_left = 1; } //loc_3C290 left_debounce = 1; } else { //loc_3C29C left_debounce = 0; left_repeat = 0; } //loc_3C2A4 if ((input & IN_RIGHT)) { if (right_repeat < 8) { right_repeat++; } else { //loc_3C2DC go_right = 1; } //loc_3C2E4 if (right_debounce == 0) { go_right = 1; } //loc_3C2FC right_debounce = 1; } else { //loc_3C308 right_debounce = 0; right_repeat = 0; } //loc_3C310 if ((input & IN_FORWARD)) { if (up_debounce == 0) { go_up = 1; } //loc_3C340 up_debounce = 1; } else { //loc_3C34C up_debounce = 0; } if ((input & IN_BACK)) { if (down_debounce == 0) { go_down = 1; } //loc_3C380 down_debounce = 1; } else { //loc_3C38C down_debounce = 0; } //loc_3C390 #if PC_VERSION if (input & IN_ACTION || input & IN_SELECT) #else if (input & IN_SELECT) #endif { select_debounce = 1; } else { //loc_3C3B4 if (select_debounce == 1 && friggrimmer == 0) { go_select = 1; } //loc_3C3D8 select_debounce = 0; friggrimmer = 0; } //loc_3C3E0 if ((input & IN_DESELECT)) { deselect_debounce = 1; } else { //loc_3C408 if (deselect_debounce == 1 && friggrimmer2 == 0) { go_deselect = 1; } //loc_3C42C deselect_debounce = 0; friggrimmer2 = 0; } } void init_new_inventry()//3C024, 3C478 (F) { examine_mode = 0; stats_mode = 0; #if PSX_VERSION AlterFOV(0x3FFC); #else AlterFOV(ANGLE(80)); #endif lara.Busy = 0; GLOBAL_inventoryitemchosen = -1; left_debounce = 0; right_debounce = 0; up_debounce = 0; down_debounce = 0; go_left = 0; go_right = 0; go_up = 0; go_down = 0; select_debounce = 0; deselect_debounce = 0; go_select = 0; go_deselect = 0; left_repeat = 0; right_repeat = 0; loading_or_saving = 0; use_the_bitch = 0; if (lara.num_shotgun_ammo1 == -1) AmountShotGunAmmo1 = -1; else AmountShotGunAmmo1 = lara.num_shotgun_ammo1 / 6; if (lara.num_shotgun_ammo2 == -1) AmountShotGunAmmo2 = -1; else AmountShotGunAmmo2 = lara.num_shotgun_ammo2 / 6; AmountHKAmmo1 = lara.num_hk_ammo1; AmountCrossBowAmmo1 = lara.num_crossbow_ammo1; AmountCrossBowAmmo2 = lara.num_crossbow_ammo2; AmountUziAmmo = lara.num_uzi_ammo; AmountRevolverAmmo = lara.num_revolver_ammo; AmountPistolsAmmo = lara.num_pistols_ammo; construct_object_list(); if (GLOBAL_enterinventory == -1) { if (GLOBAL_lastinvitem != -1) { if (have_i_got_item(GLOBAL_lastinvitem)) setup_objectlist_startposition(GLOBAL_lastinvitem); GLOBAL_lastinvitem = -1; } } else if (GLOBAL_enterinventory == 0xDEADBEEF) { GLOBAL_invkeypadmode = 1; init_keypad_mode(); GLOBAL_enterinventory = -1; } else { if (have_i_got_object(GLOBAL_enterinventory)) setup_objectlist_startposition2(GLOBAL_enterinventory); GLOBAL_enterinventory = -1; } ammo_selector_fade_val = 0; ammo_selector_fade_dir = 0; combine_ring_fade_val = 0;
{'commit': 'diff --git a/GAME/NEWINV2.C b/GAME/NEWINV2.C\nindex 176480c0..16694c63 100644\n--- a/GAME/NEWINV2.C\n+++ b/GAME/NEWINV2.C\n@@ -184,30 +184,30 @@ short optmessages[11] = // offset 0x93480\n \n struct COMBINELIST dels_handy_combine_table[24] = // offset 0x93498\n {\n-\t{ combine_revolver_lasersight, 3, 0x14, 4 },\n-\t{ combine_crossbow_lasersight, 5, 0x14, 6 },\n-\t{ combine_HK_SILENCER, 7, 0x15, 8 },\n-\t{ combine_PuzzleItem1, 0x25, 0x26, 0x1D },\n-\t{ combine_PuzzleItem2, 0x27, 0x28, 0x1E },\n-\t{ combine_PuzzleItem3, 0x29, 0x2A, 0x1F },\n-\t{ combine_PuzzleItem4, 0x2B, 0x2C, 0x20 },\n-\t{ combine_PuzzleItem5, 0x2D, 0x2E, 0x21 },\n-\t{ combine_PuzzleItem6, 0x2F, 0x30, 0x22 },\n-\t{ combine_PuzzleItem7, 0x31, 0x32, 0x23 },\n-\t{ combine_PuzzleItem8, 0x33, 0x34, 0x24 },\n-\t{ combine_KeyItem1, 0x3D, 0x3E, 0x35 },\n-\t{ combine_KeyItem2, 0x3F, 0x40, 0x36 },\n-\t{ combine_KeyItem3, 0x41, 0x42, 0x37 },\n-\t{ combine_KeyItem4, 0x43, 0x44, 0x38 },\n-\t{ combine_KeyItem5, 0x45, 0x46, 0x39 },\n-\t{ combine_KeyItem6, 0x47, 0x48, 0x3A },\n-\t{ combine_KeyItem7, 0x49, 0x4A, 0x3B },\n-\t{ combine_KeyItem8, 0x4B, 0x4C, 0x3C },\n-\t{ combine_PickupItem1, 0x51, 0x52, 0x4D },\n-\t{ combine_PickupItem2, 0x53, 0x54, 0x4E },\n-\t{ combine_PickupItem3, 0x55, 0x56, 0x4F },\n-\t{ combine_PickupItem4, 0x57, 0x58, 0x50 },\n-\t{ combine_clothbottle, 0x61, 0x62, 0x5E }\n+\t{ combine_revolver_lasersight, INV_REVOLVER_ITEM1, INV_LASERSIGHT_ITEM, INV_REVOLVER_ITEM2 },\n+\t{ combine_crossbow_lasersight, INV_CROSSBOW_AMMO2_ITEM1, INV_LASERSIGHT_ITEM, INV_CROSSBOW_AMMO2_ITEM2 },\n+\t{ combine_HK_SILENCER, INV_HK_ITEM1, INV_SILENCER_ITEM, INV_HK_ITEM2 },\n+\t{ combine_PuzzleItem1, INV_PUZZLE_ITEM1_COMBO1, INV_PUZZLE_ITEM1_COMBO2, INV_PUZZLE_ITEM1 },\n+\t{ combine_PuzzleItem2, INV_PUZZLE_ITEM2_COMBO1, INV_PUZZLE_ITEM2_COMBO2, INV_PUZZLE_ITEM2 },\n+\t{ combine_PuzzleItem3, INV_PUZZLE_ITEM3_COMBO1, INV_PUZZLE_ITEM3_COMBO2, INV_PUZZLE_ITEM3 },\n+\t{ combine_PuzzleItem4, INV_PUZZLE_ITEM4_COMBO1, INV_PUZZLE_ITEM4_COMBO2, INV_PUZZLE_ITEM4 },\n+\t{ combine_PuzzleItem5, INV_PUZZLE_ITEM5_COMBO1, INV_PUZZLE_ITEM5_COMBO2, INV_PUZZLE_ITEM5 },\n+\t{ combine_PuzzleItem6, INV_PUZZLE_ITEM6_COMBO1, INV_PUZZLE_ITEM6_COMBO2, INV_PUZZLE_ITEM6 },\n+\t{ combine_PuzzleItem7, INV_PUZZLE_ITEM7_COMBO1, INV_PUZZLE_ITEM7_COMBO2, INV_PUZZLE_ITEM7 },\n+\t{ combine_PuzzleItem8, INV_PUZZLE_ITEM8_COMBO1, INV_PUZZLE_ITEM8_COMBO2, INV_PUZZLE_ITEM8 },\n+\t{ combine_KeyItem1, INV_KEY_ITEM1_COMBO1, INV_KEY_ITEM1_COMBO2, INV_KEY_ITEM1 },\n+\t{ combine_KeyItem2, INV_KEY_ITEM2_COMBO1, INV_KEY_ITEM2_COMBO2, INV_KEY_ITEM2 },\n+\t{ combine_KeyItem3, INV_KEY_ITEM3_COMBO1, INV_KEY_ITEM3_COMBO2, INV_KEY_ITEM3 },\n+\t{ combine_KeyItem4, INV_KEY_ITEM4_COMBO1, INV_KEY_ITEM4_COMBO2, INV_KEY_ITEM4 },\n+\t{ combine_KeyItem5, INV_KEY_ITEM5_COMBO1, INV_KEY_ITEM5_COMBO2, INV_KEY_ITEM5 },\n+\t{ combine_KeyItem6, INV_KEY_ITEM6_COMBO1, INV_KEY_ITEM6_COMBO2, INV_KEY_ITEM6 },\n+\t{ combine_KeyItem7, INV_KEY_ITEM7_COMBO1, INV_KEY_ITEM7_COMBO2, INV_KEY_ITEM7 },\n+\t{ combine_KeyItem8, INV_KEY_ITEM8_COMBO1, INV_KEY_ITEM8_COMBO2, INV_KEY_ITEM8 },\n+\t{ combine_PickupItem1, INV_PICKUP_ITEM1_COMBO1, INV_PICKUP_ITEM1_COMBO2, INV_PICKUP_ITEM1 },\n+\t{ combine_PickupItem2, INV_PICKUP_ITEM2_COMBO1, INV_PICKUP_ITEM2_COMBO2, INV_PICKUP_ITEM2 },\n+\t{ combine_PickupItem3, INV_PICKUP_ITEM3_COMBO1, INV_PICKUP_ITEM3_COMBO2, INV_PICKUP_ITEM3 },\n+\t{ combine_PickupItem4, INV_PICKUP_ITEM4_COMBO1, INV_PICKUP_ITEM4_COMBO2, INV_PICKUP_ITEM4 },\n+\t{ combine_clothbottle, INV_CLOTH, INV_BOTTLE, INV_WET_CLOTH }\n };\n \n int GLOBAL_enterinventory = -1; // offset 0xA0B30\n', 'commit_subject': '[Game] use enum constants', 'repo_name': 'TOMB5/TOMB5', 'committer': {'name': 'Tom', 'email': '7f133c9dd458bcf09a5cce3b4ee818e8fbace9c6@free.fr', 'time_sec': '1587521998', 'tz_offset': '120', 'date': {'seconds': '1587521998'}}, 'commit_tree': '03f5c98f837be7049cbe1e8653f3989d8c42c641', 'commit_message': '[Game] use enum constants\n', 'language_name': 'C++', 'license': 'mit', 'hunks': '@@ -184,30 +184,30 @@ short optmessages[11] = // offset 0x93480\n \n struct COMBINELIST dels_handy_combine_table[24] = // offset 0x93498\n {\n-\t{ combine_revolver_lasersight, 3, 0x14, 4 },\n-\t{ combine_crossbow_lasersight, 5, 0x14, 6 },\n-\t{ combine_HK_SILENCER, 7, 0x15, 8 },\n-\t{ combine_PuzzleItem1, 0x25, 0x26, 0x1D },\n-\t{ combine_PuzzleItem2, 0x27, 0x28, 0x1E },\n-\t{ combine_PuzzleItem3, 0x29, 0x2A, 0x1F },\n-\t{ combine_PuzzleItem4, 0x2B, 0x2C, 0x20 },\n-\t{ combine_PuzzleItem5, 0x2D, 0x2E, 0x21 },\n-\t{ combine_PuzzleItem6, 0x2F, 0x30, 0x22 },\n-\t{ combine_PuzzleItem7, 0x31, 0x32, 0x23 },\n-\t{ combine_PuzzleItem8, 0x33, 0x34, 0x24 },\n-\t{ combine_KeyItem1, 0x3D, 0x3E, 0x35 },\n-\t{ combine_KeyItem2, 0x3F, 0x40, 0x36 },\n-\t{ combine_KeyItem3, 0x41, 0x42, 0x37 },\n-\t{ combine_KeyItem4, 0x43, 0x44, 0x38 },\n-\t{ combine_KeyItem5, 0x45, 0x46, 0x39 },\n-\t{ combine_KeyItem6, 0x47, 0x48, 0x3A },\n-\t{ combine_KeyItem7, 0x49, 0x4A, 0x3B },\n-\t{ combine_KeyItem8, 0x4B, 0x4C, 0x3C },\n-\t{ combine_PickupItem1, 0x51, 0x52, 0x4D },\n-\t{ combine_PickupItem2, 0x53, 0x54, 0x4E },\n-\t{ combine_PickupItem3, 0x55, 0x56, 0x4F },\n-\t{ combine_PickupItem4, 0x57, 0x58, 0x50 },\n-\t{ combine_clothbottle, 0x61, 0x62, 0x5E }\n+\t{ combine_revolver_lasersight, INV_REVOLVER_ITEM1, INV_LASERSIGHT_ITEM, INV_REVOLVER_ITEM2 },\n+\t{ combine_crossbow_lasersight, INV_CROSSBOW_AMMO2_ITEM1, INV_LASERSIGHT_ITEM, INV_CROSSBOW_AMMO2_ITEM2 },\n+\t{ combine_HK_SILENCER, INV_HK_ITEM1, INV_SILENCER_ITEM, INV_HK_ITEM2 },\n+\t{ combine_PuzzleItem1, INV_PUZZLE_ITEM1_COMBO1, INV_PUZZLE_ITEM1_COMBO2, INV_PUZZLE_ITEM1 },\n+\t{ combine_PuzzleItem2, INV_PUZZLE_ITEM2_COMBO1, INV_PUZZLE_ITEM2_COMBO2, INV_PUZZLE_ITEM2 },\n+\t{ combine_PuzzleItem3, INV_PUZZLE_ITEM3_COMBO1, INV_PUZZLE_ITEM3_COMBO2, INV_PUZZLE_ITEM3 },\n+\t{ combine_PuzzleItem4, INV_PUZZLE_ITEM4_COMBO1, INV_PUZZLE_ITEM4_COMBO2, INV_PUZZLE_ITEM4 },\n+\t{ combine_PuzzleItem5, INV_PUZZLE_ITEM5_COMBO1, INV_PUZZLE_ITEM5_COMBO2, INV_PUZZLE_ITEM5 },\n+\t{ combine_PuzzleItem6, INV_PUZZLE_ITEM6_COMBO1, INV_PUZZLE_ITEM6_COMBO2, INV_PUZZLE_ITEM6 },\n+\t{ combine_PuzzleItem7, INV_PUZZLE_ITEM7_COMBO1, INV_PUZZLE_ITEM7_COMBO2, INV_PUZZLE_ITEM7 },\n+\t{ combine_PuzzleItem8, INV_PUZZLE_ITEM8_COMBO1, INV_PUZZLE_ITEM8_COMBO2, INV_PUZZLE_ITEM8 },\n+\t{ combine_KeyItem1, INV_KEY_ITEM1_COMBO1, INV_KEY_ITEM1_COMBO2, INV_KEY_ITEM1 },\n+\t{ combine_KeyItem2, INV_KEY_ITEM2_COMBO1, INV_KEY_ITEM2_COMBO2, INV_KEY_ITEM2 },\n+\t{ combine_KeyItem3, INV_KEY_ITEM3_COMBO1, INV_KEY_ITEM3_COMBO2, INV_KEY_ITEM3 },\n+\t{ combine_KeyItem4, INV_KEY_ITEM4_COMBO1, INV_KEY_ITEM4_COMBO2, INV_KEY_ITEM4 },\n+\t{ combine_KeyItem5, INV_KEY_ITEM5_COMBO1, INV_KEY_ITEM5_COMBO2, INV_KEY_ITEM5 },\n+\t{ combine_KeyItem6, INV_KEY_ITEM6_COMBO1, INV_KEY_ITEM6_COMBO2, INV_KEY_ITEM6 },\n+\t{ combine_KeyItem7, INV_KEY_ITEM7_COMBO1, INV_KEY_ITEM7_COMBO2, INV_KEY_ITEM7 },\n+\t{ combine_KeyItem8, INV_KEY_ITEM8_COMBO1, INV_KEY_ITEM8_COMBO2, INV_KEY_ITEM8 },\n+\t{ combine_PickupItem1, INV_PICKUP_ITEM1_COMBO1, INV_PICKUP_ITEM1_COMBO2, INV_PICKUP_ITEM1 },\n+\t{ combine_PickupItem2, INV_PICKUP_ITEM2_COMBO1, INV_PICKUP_ITEM2_COMBO2, INV_PICKUP_ITEM2 },\n+\t{ combine_PickupItem3, INV_PICKUP_ITEM3_COMBO1, INV_PICKUP_ITEM3_COMBO2, INV_PICKUP_ITEM3 },\n+\t{ combine_PickupItem4, INV_PICKUP_ITEM4_COMBO1, INV_PICKUP_ITEM4_COMBO2, INV_PICKUP_ITEM4 },\n+\t{ combine_clothbottle, INV_CLOTH, INV_BOTTLE, INV_WET_CLOTH }\n };\n \n int GLOBAL_enterinventory = -1; // offset 0xA0B30\n', 'addition_count': 24, 'deletion_count': 24, 'src_file': 'a/GAME/NEWINV2.C', 'tgt_file': 'b/GAME/NEWINV2.C', 'file_extension': '.C', 'before_file': '#include "NEWINV2.H"\n\n#include "CAMERA.H"\n#include "CDTRACKS.H"\n#include "DELTAPAK.H"\n#include "SPECIFIC.H"\n#include "LARA.H"\n#include "DOOR.H"\n#include "OBJECTS.H"\n#include "GAMEFLOW.H"\n#include "CONTROL.H"\n#include "SAVEGAME.H"\n#include "HEALTH.H"\n\n#include "LARA2GUN.H"\n#include "LARA1GUN.H"\n#include INPUT_H\n#include "EFFECTS.H"\n#include "CAMERA.H"\n#include "SOUND.H"\n#if PC_VERSION\n#include "GLOBAL.H"\n#include "DRAWPRIMITIVE.H"\n#include "GAME.H"\n#include "WINMAIN.H"\n#include "DISPLAY.H"\n#include "DRAW.H"\n#include "TEXT.H"\n#elif PSX_VERSION || PSXPC_VERSION || SAT_VERSION\n#include "SETUP.H"\n#include "LOADSAVE.H"\n#include "CD.H"\n#include "GPU.H"\n#include "SFX.H"\n#include "MEMCARD.H"\n#include "PROFILE.H"\n#include "MISC.H"\n#include "TEXT_S.H"\n#include "DRAWOBJ.H"\n#include "MATHS.H"\n#include "DRAW.H"\n#include "LOAD_LEV.H"\n#include "BUBBLES.H"\n#include "GETSTUFF.H"\n#endif\n\n#if PSX_VERSION\n#include <LIBGPU.H>\n#endif\n\n#if PSXPC_TEST\n#include <stdint.h>\n#elif PSX_VERSION || SAT_VERSION\ntypedef unsigned int uintptr_t;\n#endif\n\n#include <assert.h>\n\nstruct INVOBJ inventry_objects_list[NUM_INV_OBJECTS] = // offset 0x92BE8\n{\n\t{ UZI_ITEM, -4, 1000, ANGLE(90), ANGLE(135), ANGLE(90), 2, STR_UZI, ~0u },\n\t{ PISTOLS_ITEM, 6, 1000, ANGLE(90), -21172, -17088, 2, STR_PISTOLS, ~0u },\n\t{ SHOTGUN_ITEM, -6, 640, ANGLE(-180), ANGLE(-90), ANGLE(45), 2, STR_SHOTGUN, 1 },\n\t{ REVOLVER_ITEM, 0, 800, ANGLE(90), ANGLE(60), 15298, 2, STR_REVOLVER, 1 },\n\t{ REVOLVER_ITEM, 0, 800, ANGLE(90), ANGLE(60), 15298, 2, STR_REVOLVER_LASERSIGHT, 7 },\n\t{ CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u },\n\t{ CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u },\n\t{ HK_ITEM, 0, 800, ANGLE(0), ANGLE(-90), ANGLE(0), 2, STR_HK, 1 },\n\t{ HK_ITEM, 0, 800, ANGLE(0), ANGLE(-90), ANGLE(0), 2, STR_HK_SILENCED, ~0u },\n\t{ SHOTGUN_AMMO1_ITEM, 0, 500, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_SHOTGUN_NORMAL_AMMO, ~0u },\n\t{ SHOTGUN_AMMO2_ITEM, 0, 500, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_SHOTGUN_WIDESHOT_AMMO, ~0u },\n\t{ HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_SNIPER_MODE, 2 },\n\t{ HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_BURST_MODE, 4 },\n\t{ HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_RAPID_MODE, 8 },\n\t{ HK_AMMO_ITEM, 3, 800, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_HK_AMMO, 1 },\n\t{ CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u },\n\t{ CROSSBOW_AMMO2_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u },\n\t{ REVOLVER_AMMO_ITEM, 0, 700, ANGLE(90), -3000, ANGLE(0), 2, STR_REVOLVER_AMMO, ~0u },\n\t{ UZI_AMMO_ITEM, 5, 700, ANGLE(0), 5384, ANGLE(0), 2, STR_UZI_AMMO, ~0u },\n\t{ PISTOLS_AMMO_ITEM, 4, 700, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_PISTOL_AMMO, ~0u },\n\t{ LASERSIGHT_ITEM, 2, 700, ANGLE(90), 2000, ANGLE(0), 2, STR_LASERSIGHT, ~0u },\n\t{ SILENCER_ITEM, 1, 900, ANGLE(0), 2000, ANGLE(0), 2, STR_SILENCER, ~0u },\n\t{ BIGMEDI_ITEM, 2, 800, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LARGE_MEDIPACK, ~0u },\n\t{ SMALLMEDI_ITEM, 0, 512, ANGLE(0), ANGLE(112.5), ANGLE(0), 2, STR_SMALL_MEDIPACK, ~0u },\n\t{ BINOCULARS_ITEM, -1, 700, ANGLE(22.5), 2000, ANGLE(0), 2, STR_BINOCULARS, ~0u },\n\t{ FLARE_INV_ITEM, 2, 1100, ANGLE(90), ANGLE(0), ANGLE(0), 2, STR_FLARES, ~0u },\n\t{ COMPASS_ITEM, 2, 1100, ANGLE(-180), ANGLE(0), ANGLE(0), 2, STR_TIMEX_TMX, ~0u },\n\t{ MEMCARD_LOAD_INV_ITEM, 2, 4000, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ MEMCARD_SAVE_INV_ITEM, 2, 4000, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_SAVE, ~0u },\n\t{ PUZZLE_ITEM1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM2, 14, 600, ANGLE(0), ANGLE(-90), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM3, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM4, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM5, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM6, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM7, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM8, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM1_COMBO1, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM1_COMBO2, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM2_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM2_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM3_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM3_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM4_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM4_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM5_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM5_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM6_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM6_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM7_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM7_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM8_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PUZZLE_ITEM8_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM3, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM4, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM5, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM6, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM7, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM8, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM1_COMBO1, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM1_COMBO2, 18, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM2_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM2_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM3_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM3_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM4_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM4_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM5_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM5_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM6_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM6_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM7_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM7_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM8_COMBO1, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ KEY_ITEM8_COMBO2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM2, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM3, 8, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM4, 2, 800, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM1_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM1_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM2_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM2_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM3_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM3_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM4_COMBO1, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ PICKUP_ITEM4_COMBO2, 14, 1200, ANGLE(0), ANGLE(0), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ BURNING_TORCH_ITEM, 14, 1200, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ CROWBAR_ITEM, 4, 1900, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_CROWBAR, ~0u },\n\t{ EXAMINE1, 4, 1300, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ EXAMINE2, 14, 1200, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ EXAMINE3, 14, 1200, ANGLE(0), ANGLE(90), ANGLE(0), 2, STR_LOAD, ~0u },\n\t{ WET_CLOTH, -12, 512, ANGLE(90), ANGLE(67.5), ANGLE(112.5), 2, STR_CHLOROFORM_SOAKED_CLOTH, ~0u },\n\t{ CROSSBOW_ITEM, 0, 900, ANGLE(45), 6144, ANGLE(0), 2, STR_GRAPPLING_GUN, 1 },\n\t{ CROSSBOW_AMMO1_ITEM, 0, 1100, ANGLE(90), ANGLE(-22.5), ANGLE(0), 2, STR_GRAPPLING_GUN_AMMO, ~0u },\n\t{ CLOTH, -12, 512, ANGLE(90), ANGLE(67.5), ANGLE(112.5), 2, STR_CLOTH, ~0u },\n\t{ BOTTLE, 18, 800, ANGLE(-90), ANGLE(0), ANGLE(0), 2, STR_BOTTLE_OF_CHLOROFORM, ~0u },\n\t{ PUZZLE_HOLE8, -10, 384, ANGLE(-90), 26624, ANGLE(-90), 10, STR_BOTTLE_OF_CHLOROFORM, ~0u },\n};\nunsigned char wanky_secrets_table[NUM_TR5_LEVELS] = // offset 0x92BD4\n{\n\t0, 3, 3, 3, 3, 3, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3\n};\nunsigned short options_table[99] = // offset 0x933B8\n{\n\t0x020A, 0x040A, 0x004A, 0x080A, 0x0812, 0x008A, 0x0092, 0x010A, 0x0112, 0x0004, \n\t0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, \n\t0x000C, 0x000C, 0x0004, 0x0004, 0x0004, 0x0004, 0x8000, 0x1000, 0x2000, 0x0004, \n\t0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x000C, 0x000C, 0x000C, \n\t0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, \n\t0x000C, 0x000C, 0x000C, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, \n\t0x0004, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, \n\t0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0004, 0x0004, 0x0004, \n\t0x0004, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0004,\n\t0x0004, 0x0020, 0x0020, 0x0020, 0x0004, 0x4002, 0x0004, 0x000C, 0x000C\n};\n\nshort optmessages[11] = // offset 0x93480\n{\n\tSTR_USE, STR_CHOOSE_AMMO, STR_COMBINE, STR_SEPARATE, STR_EQUIP, STR_COMBINE_WITH, STR_LOAD_GAME, STR_SAVE_GAME, STR_EXAMINE, STR_STATISTICS, STR_CHOOSE_WEAPON_MODE\n};\n\nstruct COMBINELIST dels_handy_combine_table[24] = // offset 0x93498\n{\n\t{ combine_revolver_lasersight, 3, 0x14, 4 },\n\t{ combine_crossbow_lasersight, 5, 0x14, 6 },\n\t{ combine_HK_SILENCER, 7, 0x15, 8 },\n\t{ combine_PuzzleItem1, 0x25, 0x26, 0x1D },\n\t{ combine_PuzzleItem2, 0x27, 0x28, 0x1E },\n\t{ combine_PuzzleItem3, 0x29, 0x2A, 0x1F },\n\t{ combine_PuzzleItem4, 0x2B, 0x2C, 0x20 },\n\t{ combine_PuzzleItem5, 0x2D, 0x2E, 0x21 },\n\t{ combine_PuzzleItem6, 0x2F, 0x30, 0x22 },\n\t{ combine_PuzzleItem7, 0x31, 0x32, 0x23 },\n\t{ combine_PuzzleItem8, 0x33, 0x34, 0x24 },\n\t{ combine_KeyItem1, 0x3D, 0x3E, 0x35 },\n\t{ combine_KeyItem2, 0x3F, 0x40, 0x36 },\n\t{ combine_KeyItem3, 0x41, 0x42, 0x37 },\n\t{ combine_KeyItem4, 0x43, 0x44, 0x38 },\n\t{ combine_KeyItem5, 0x45, 0x46, 0x39 },\n\t{ combine_KeyItem6, 0x47, 0x48, 0x3A },\n\t{ combine_KeyItem7, 0x49, 0x4A, 0x3B },\n\t{ combine_KeyItem8, 0x4B, 0x4C, 0x3C },\n\t{ combine_PickupItem1, 0x51, 0x52, 0x4D },\n\t{ combine_PickupItem2, 0x53, 0x54, 0x4E },\n\t{ combine_PickupItem3, 0x55, 0x56, 0x4F },\n\t{ combine_PickupItem4, 0x57, 0x58, 0x50 },\n\t{ combine_clothbottle, 0x61, 0x62, 0x5E }\n};\n\nint GLOBAL_enterinventory = -1; // offset 0xA0B30\nint GLOBAL_inventoryitemchosen = -1; // offset 0xA0B34\nint GLOBAL_lastinvitem = -1; // offset 0xA0B2C\nshort examine_mode = 0; // offset 0xA0B28\nshort stats_mode = 0; // offset 0xA0B2A\nint GLOBAL_invkeypadmode = 0; // offset 0xA0B38\nint GLOBAL_invkeypadcombination = 0; // offset 0xA0B3C\nunsigned char keypadx = 0; // offset 0xA0B40\nunsigned char keypady = 0; // offset 0xA0B41\nunsigned char keypadnuminputs = 0; // offset 0xA0B42\nunsigned char keypadpause = 0; // offset 0xA0B43\nshort inventry_xpos = 0; // offset 0xA0B44\nshort inventry_ypos = 0; // offset 0xA0B46\nunsigned char keypadinputs[4]; // offset 0xA3780\nshort ammo_selector_fade_val; // offset 0xA3710\nshort ammo_selector_fade_dir; // offset 0xA371C\nshort combine_ring_fade_val; // offset 0xA370C\nshort combine_ring_fade_dir; // offset 0xA3718\nshort normal_ring_fade_val; // offset 0xA3708\nshort normal_ring_fade_dir; // offset 0xA3714\nchar seperate_type_flag; // offset 0xA3738\nchar combine_type_flag; // offset 0xA373C\nshort combine_obj1; // offset 0xA3720\nshort combine_obj2; // offset 0xA3724\nchar menu_active; // offset 0xA36F0\nstruct RINGME* rings[2]; // offset 0xA372C\nchar loading_or_saving; // offset 0xA3778\nchar use_the_bitch; // offset 0xA36FC\nunsigned char left_debounce; // offset 0xA3760\nunsigned char right_debounce; // offset 0xA376C\nunsigned char up_debounce; // offset 0xA3768\nunsigned char down_debounce; // offset 0xA3764\nunsigned char select_debounce; // offset 0xA375C\nunsigned char deselect_debounce; // offset 0xA3770\nunsigned char go_left; // offset 0xA36F8\nunsigned char go_right; // offset 0xA36D8\nunsigned char go_up; // offset 0xA3704\nunsigned char go_down; // offset 0xA36F4\nunsigned char left_repeat; // offset 0xA36E8\nunsigned char right_repeat; // offset 0xA36EC\nunsigned char go_select; // offset 0xA3734\nunsigned char go_deselect; // offset 0xA379C\nunsigned char ammo_active; // offset 0xA377C\nchar bullshitbollox; // offset 0xA37A4\nchar _bullshitbollox; // offset 0xA37A0\nstatic unsigned short AmountShotGunAmmo1; // offset 0xA36B8\nstatic unsigned short AmountShotGunAmmo2; // offset 0xA36BA\nstatic unsigned short AmountHKAmmo1; // offset 0xA36BC\nstatic unsigned short AmountCrossBowAmmo1; // offset 0xA36BE\nstatic unsigned short AmountCrossBowAmmo2; // offset 0xA36C0\nstatic unsigned short AmountUziAmmo; // offset 0xA36C2\nstatic unsigned short AmountRevolverAmmo; // offset 0xA36C4\nstatic unsigned short AmountPistolsAmmo; // offset 0xA36C6\nstatic char CurrentPistolsAmmoType; // offset 0xA36C8\nstatic char CurrentUziAmmoType; // offset 0xA36C9\nstatic char CurrentRevolverAmmoType; // offset 0xA36CA\nstatic char CurrentShotGunAmmoType; // offset 0xA36CB\nstatic char CurrentGrenadeGunAmmoType; // offset 0xA36CC\nstatic char CurrentCrossBowAmmoType; // offset 0xA36CD\nstatic char StashedCurrentPistolsAmmoType; // offset 0xA36CE\nstatic char StashedCurrentUziAmmoType; // offset 0xA36CF\nstatic char StashedCurrentRevolverAmmoType; // offset 0xA36D0\nstatic char StashedCurrentShotGunAmmoType; // offset 0xA36D1\nstatic char StashedCurrentGrenadeGunAmmoType; // offset 0xA36D2\nstatic char StashedCurrentCrossBowAmmoType; // offset 0xA36D3\nchar current_selected_option; // offset 0xA36E0\nchar Stashedcurrent_selected_option; // offset 0xA36DC\nstruct AMMOLIST ammo_object_list[3]; // offset 0xA3784\nchar ammo_selector_flag; // offset 0xA3728\nchar num_ammo_slots; // offset 0xA3758\nchar* current_ammo_type; // offset 0xA3700\nint OBJLIST_SPACING; // offset 0xA3798\nchar friggrimmer; // offset 0xA36D4\nchar friggrimmer2; // offset 0xA36E4\nchar oldLaraBusy; // offset 0xA3774\nstruct MENUTHANG current_options[3]; // offset 0xA3740\n\n#if PSXENGINE\nvoid do_playstation_button_prompts_v1()//416E0(<), 41B34(<) (F)\n{\n\tif (examine_mode)\n\t{\n\t\tif (rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem == 0x5C)\n\t\t{\n\t\t\tPrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_MORE]], FF_NONE);\n\t\t\tPrintString(496, 232, 5, &gfStringWad[gfStringOffset[STR_HAMMER]], FF_UNK10);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//loc_41784\n\t\t\tPrintString(SCREEN_WIDTH / 2, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL]], FF_CENTER);\n\t\t}\n\n\t\treturn;\n\t}\n\telse if(stats_mode)\n\t{\n\t\t//loc_41774\n\t\tPrintString(SCREEN_WIDTH / 2, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL]], FF_CENTER);\n\t\treturn;\n\t}\n\telse if (ammo_active)\n\t{\n\t\t//loc_417B8\n\t\tPrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_SELECT_AMMO]], FF_NONE);\n\t}\n\telse if (GLOBAL_invkeypadmode)\n\t{\n\t\t//loc_417E4\n\t\tPrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL]], FF_NONE);\n\t\tPrintString(200, 232, 5, &gfStringWad[gfStringOffset[STR_PUSH_KEYPAD]], FF_NONE);\n\t}\n\telse if (rings[RING_AMMO]->ringactive)\n\t{\n\t\t//loc_41838\n\t\tPrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_COMBINE_BIS]], FF_NONE);\n\t}\n\telse\n\t{\n\t\t//loc_41880\n\t\tPrintString(16, 232, 5, &gfStringWad[gfStringOffset[STR_SELECT_OPTION]], FF_NONE);\n\t}\n\t//loc_418AC\n\tPrintString(496, 232, 5, &gfStringWad[gfStringOffset[STR_CANCEL_BIS]], FF_R_JUSTIFY);\n}\n#endif\n\nvoid S_DrawPickup(short object_number)//41608(<), 41A5C(<) (F)\n{\n#if PC_VERSION\n\tphd_LookAt(0, SECTOR(1), 0, 0, 0, 0, 0);\n\tSetD3DViewMatrix();\n\tSetViewMatrix();\n\tDrawThreeDeeObject2D(\n\t\t(int)(phd_winxmax / 512.0 * 448.0),\n\t\t(int)(phd_winymax / 256.0 * 216.0),\n\t\tconvert_obj_to_invobj(object_number),\n\t\t128,\n\t\t0,\n\t\t(GnFrameCounter & 0x7F) << 9,\n\t\t0,\n\t\t0,\n\t\t1);\n#elif PSX_VERSION || PSXPC_VERSION\n\tClearOTagR(db.pickup_ot, 256);\n\tDrawThreeDeeObject2D(PickupX + 448, 200, convert_obj_to_invobj(object_number), 128, 0, (GnFrameCounter & 0x7F) << 9, 0, 0, 1);\n\t\n#if defined(USE_32_BIT_ADDR)\n\tdb.pickup_ot[0] = db.ot[0];\n\tdb.ot[0] = (uintptr_t)&db.pickup_ot[255 * 2];\n#else\n\tdb.pickup_ot[0] = (db.pickup_ot[0] & 0xFF000000) | (db.ot[0] & 0xFFFFFF);\n\tdb.ot[0] = (db.ot[0] & 0xFF000000) | (uintptr_t)&db.pickup_ot[255] & 0xFFFFFF;\n#endif\n#endif\n}\n\nvoid dels_give_lara_guns_cheat()//41470, 418C4 (F)\n{\n#if PC_VERSION\n\t; // null sub\n#else\n\tif(objects[FLARE_INV_ITEM].loaded)\n\t{\n\t\tlara.num_flares = -1;\n\t}\n\n\tlara.num_small_medipack = -1;\n\tlara.num_large_medipack = -1;\n\n\tif (!(gfLevelFlags & GF_LVOP_YOUNG_LARA))\n\t{\n\t\tif (objects[PISTOLS_ITEM].loaded)\n\t\t{\n\t\t\tlara.num_shotgun_ammo1 = -1;\n\t\t\tlara.num_shotgun_ammo2 = -1;\n\t\t\tlara.shotgun_type_carried |= 1;\n\t\t}\n\n\t\tif (objects[REVOLVER_ITEM].loaded)\n\t\t{\n\t\t\tlara.num_revolver_ammo = -1;\n\t\t\tlara.sixshooter_type_carried |= 1;\n\t\t}\n\n\t\tif (objects[CROSSBOW_ITEM].loaded)\n\t\t{\n\t\t\tlara.num_crossbow_ammo1 = -1;\n\t\t\tlara.num_crossbow_ammo2 = -1;\n\t\t\tlara.crossbow_type_carried |= 1;\n\t\t}\n\n\t\tif (gfCurrentLevel < LVL5_GIBBY_LEVEL)\n\t\t{\n\t\t\tlara.crossbow_type_carried = 0xD;\n\t\t\tlara.num_crossbow_ammo2 = 0;\n\t\t}\n\n\t\tif (objects[HK_ITEM].loaded)\n\t\t{\n\t\t\tlara.num_hk_ammo1 = -1;\n\t\t\tlara.hk_type_carried |= 1;\n\t\t}\n\n\t\tif(objects[UZI_ITEM].loaded)\n\t\t{\n\t\t\tlara.num_uzi_ammo = -1;\n\t\t\tlara.uzis_type_carried |= 1;\n\t\t}\n\n\t\tif(objects[LASERSIGHT_ITEM].loaded)\n\t\t{\n\t\t\tlara.lasersight = 1;\n\t\t}\n\n\t\tif(objects[SILENCER_ITEM].loaded)\n\t\t{\n\t\t\tlara.silencer = 1;\n\t\t}\n\t}\n#endif\n}\n\nvoid dels_give_lara_items_cheat()//41324, 41778 (F)\n{\n\tint i;\n\n#if PC_VERSION\n\t; // null sub\n#else\n\tif(objects[CROWBAR_ITEM].loaded)\n\t{\n\t\tlara.crowbar = 1;\n\t}\n\n\tfor(i = 0; i < 8; i++)\n\t{\n\t\tif(objects[PUZZLE_ITEM1 + i].loaded)\n\t\t{\n\t\t\tlara.puzzleitems[i] = 1;\n\t\t}\n\t}\n\n\tfor(i = 0; i < 8; i++)\n\t{\n\t\tif(objects[KEY_ITEM1 + i].loaded)\n\t\t{\n\t\t\tlara.keyitems |= 1 << i;\n\t\t}\n\t}\n\n\tfor(i = 0; i < 4; i++)\n\t{\n\t\tif(objects[PICKUP_ITEM1 + i].loaded)\n\t\t{\n\t\t\tlara.pickupitems |= 1 << i;\n\t\t}\n\t}\n\n\tlara.puzzleitemscombo = 0;\n\tlara.keyitemscombo = 0;\n\tlara.pickupitemscombo = 0;\n\n\tif(gfCurrentLevel == LVL5_SUBMARINE)\n\t{\n\t\tlara.puzzleitems[0] = 0;\n\t}\n\n\tif(gfCurrentLevel == LVL5_OLD_MILL)\n\t{\n\t\tlara.puzzleitems[2] = 0;\n\t}\n#endif\n}\n\nvoid do_stats_mode()//412BC, 41710 (F)\n{\n\tstats_mode += 8;\n\tif (stats_mode > 128)\n\t\tstats_mode = 128;\n\n#if PC_VERSION\n\tS_Warn("todo status cunt"); // todo\n#else\n\tDisplayStatsUCunt();\n#endif\n\t\n\n\tif (go_deselect)\n\t{\n\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\tgo_deselect = 0;\n\t\tstats_mode = 0;\n\t}\n}\n\nvoid do_examine_mode()//411C4, 41618 (F)\n{\n\tstruct INVOBJ* objme = &inventry_objects_list[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem];\n\tint saved_scale = objme->scale1;\n\n\texamine_mode += 8;\n\tif (examine_mode > 128)\n\t\texamine_mode = 128;\n\n\tobjme->scale1 = 300;\n\n\tDrawThreeDeeObject2D(\n#if PC_VERSION\n\t\t(phd_centerx + inventry_xpos),\n\t\t(phd_centery / 120.0 * 256.0 + inventry_xpos) / 2,\n#else\n\t\tinventry_xpos + 256,\n\t\t(inventry_ypos + 240) / 2,\n#endif\n\t\trings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem,\n\t\texamine_mode,\n\t\tANGLE(180),\n\t\tANGLE(90),\n\t\tANGLE(90),\n\t\t96,\n\t\t0);\n\n\tobjme->scale1 = saved_scale;\n\n\tif (go_deselect)\n\t{\n\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\tgo_deselect = 0;\n\t\texamine_mode = 0;\n\t}\n}\n\nvoid do_keypad_mode()//40B54, 40FA8\n{\n\tUNIMPLEMENTED();\n}\n\nvoid init_keypad_mode()//40B2C(<), 40F80(<) (F)\n{\n\tkeypadx = 0;\n\tkeypady = 0;\n\tkeypadnuminputs = 0;\n\tkeypadinputs[0] = 0;\n\tkeypadinputs[1] = 0;\n\tkeypadinputs[2] = 0;\n\tkeypadinputs[3] = 0;\n\tkeypadpause = 0;\n}\n\nint convert_invobj_to_obj(int obj)//40B08(<), 40F5C(<) (F)\n{\n\treturn inventry_objects_list[obj].object_number;\n}\n\nint convert_obj_to_invobj(short obj)//40AC4(<), 40F18() (F)\n{\n\tint i;\n\n\tfor(i = 0; i < 100; i++)\n\t{\n\t\tif (inventry_objects_list[i].object_number == obj)\n\t\t\treturn i;\n\t}\n\n\treturn 27;\n}\n\nvoid remove_inventory_item(short object_number)//4097C, 40DD0 (F)\n{\n\tif (object_number >= PICKUP_ITEM1 && object_number <= PICKUP_ITEM4)\n\t{\n\t\tlara.pickupitems &= ~(1 << (object_number - PICKUP_ITEM1));\n\t}\n\telse if (object_number >= PICKUP_ITEM1_COMBO1 && object_number <= PICKUP_ITEM4_COMBO2)\n\t{\n\t\tlara.pickupitemscombo &= ~(1 << (object_number - PICKUP_ITEM1_COMBO1));\n\t}\n\telse if (object_number >= KEY_ITEM1 && object_number <= KEY_ITEM8)\n\t{\n\t\tlara.keyitems &= ~(1 << (object_number - KEY_ITEM1));\n\t}\n\telse if (object_number >= KEY_ITEM1_COMBO1 && object_number <= KEY_ITEM8_COMBO2)\n\t{\n\t\tlara.keyitemscombo &= ~(1 << (object_number - KEY_ITEM1_COMBO1));\n\t}\n\telse if (object_number >= PUZZLE_ITEM1 && object_number <= PUZZLE_ITEM8)\n\t{\n\t\tlara.puzzleitems[object_number - PUZZLE_ITEM1]--;\n\t}\n\telse if (object_number >= PUZZLE_ITEM1_COMBO1 && object_number <= PUZZLE_ITEM8_COMBO2)\n\t{\n\t\tlara.puzzleitemscombo &= ~(1 << (object_number - PUZZLE_ITEM1_COMBO1));\n\t}\n}\n\nint have_i_got_object(short object_number)//4086C, 40CC0 (F)\n{\n\tif (object_number >= PICKUP_ITEM1 && object_number <= PICKUP_ITEM4)\n\t{\n\t\treturn lara.pickupitems & 1 << (object_number - PICKUP_ITEM1);\n\t}\n\tif (object_number >= PICKUP_ITEM1_COMBO1 && object_number <= PICKUP_ITEM4_COMBO2)\n\t{\n\t\treturn lara.pickupitemscombo & 1 << (object_number - PICKUP_ITEM1_COMBO1);\n\t}\n\tif (object_number >= KEY_ITEM1 && object_number <= KEY_ITEM8)\n\t{\n\t\treturn lara.keyitems & 1 << (object_number - KEY_ITEM1);\n\t}\n\tif (object_number >= KEY_ITEM1_COMBO1 && object_number <= KEY_ITEM8_COMBO2)\n\t{\n\t\treturn lara.keyitemscombo & 1 << (object_number - KEY_ITEM1_COMBO1);\n\t}\n\tif (object_number >= PUZZLE_ITEM1 && object_number <= PUZZLE_ITEM8)\n\t{\n\t\treturn lara.puzzleitems[object_number - PUZZLE_ITEM1];\n\t}\n\tif (object_number >= PUZZLE_ITEM1_COMBO1 && object_number <= PUZZLE_ITEM8_COMBO2)\n\t{\n\t\treturn lara.puzzleitemscombo & 1 << (object_number - PUZZLE_ITEM1_COMBO1);\n\t}\n\tif (object_number == CROWBAR_ITEM)\n\t{\n\t\treturn lara.crowbar;\n\t}\n\tif (object_number == WET_CLOTH)\n\t{\n\t\treturn lara.wetcloth & CLOTH_WET;\n\t}\n\n\treturn 0;\n}\n\nvoid NailInvItem(short objnum)//40584, 409D8 (F)\n{\n\tswitch (objnum)\n\t{\n\tcase UZI_ITEM:\n\t\tlara.uzis_type_carried = WTYPE_MISSING;\n\t\tlara.num_uzi_ammo = 0;\n\t\tbreak;\n\tcase PISTOLS_ITEM:\n\t\tlara.holster = LARA_HOLSTERS;\n\t\tlara.pistols_type_carried = WTYPE_MISSING;\n\t\tlara.gun_status = LG_NO_ARMS;\n\t\tlara.last_gun_type = WEAPON_NONE;\n\t\tlara.gun_type = WEAPON_NONE;\n\t\tlara.request_gun_type = WEAPON_NONE;\n\t\tbreak;\n\tcase SHOTGUN_ITEM:\n\t\tlara.shotgun_type_carried = WTYPE_MISSING;\n\t\tlara.num_shotgun_ammo1 = 0;\n\t\tbreak;\n\tcase REVOLVER_ITEM:\n\t\tlara.sixshooter_type_carried = WTYPE_MISSING;\n\t\tlara.num_revolver_ammo = 0;\n\t\tbreak;\n\tcase CROSSBOW_ITEM:\n\t\tlara.crossbow_type_carried = WTYPE_MISSING;\n\t\tlara.num_crossbow_ammo1 = 0;\n\t\tbreak;\n\tcase HK_ITEM:\n\t\tlara.hk_type_carried = WTYPE_MISSING;\n\t\tlara.num_hk_ammo1 = 0;\n\t\tbreak;\n\tcase FLARE_INV_ITEM:\n\t\tlara.num_flares = 0;\n\t\tbreak;\n\tcase SILENCER_ITEM:\n\t\tlara.silencer = WTYPE_MISSING;\n\t\tbreak;\n\tcase LASERSIGHT_ITEM:\n\t\tlara.lasersight = WTYPE_MISSING;\n\t\tbreak;\n\tcase BIGMEDI_ITEM:\n\t\tlara.num_large_medipack = 0;\n\t\tbreak;\n\tcase SMALLMEDI_ITEM:\n\t\tlara.num_small_medipack = 0;\n\t\tbreak;\n\tcase BINOCULARS_ITEM:\n\t\tlara.binoculars = WTYPE_MISSING;\n\t\tbreak;\n\tcase CROWBAR_ITEM:\n\t\tlara.crowbar = 0;\n\t\tbreak;\n\tcase EXAMINE1:\n\t\tlara.examine1 = 0;\n\t\tbreak;\n\tcase EXAMINE2:\n\t\tlara.examine2 = 0;\n\t\tbreak;\n\tcase EXAMINE3:\n\t\tlara.examine3 = 0;\n\t\tbreak;\n\tcase WET_CLOTH:\n\t\tlara.wetcloth = CLOTH_MISSING;\n\t\tbreak;\n\tcase CLOTH:\n\t\tlara.wetcloth = CLOTH_MISSING;\n\t\tbreak;\n\tcase BOTTLE:\n\t\tlara.bottle = 0;\n\t\tbreak;\n\tdefault:\n\t\tif (objnum >= PICKUP_ITEM1 && objnum <= PICKUP_ITEM4)\n\t\t{\n\t\t\tlara.pickupitems &= ~(1 << (objnum - PICKUP_ITEM1));\n\t\t}\n\t\telse if (objnum >= PICKUP_ITEM1_COMBO1 && objnum <= PICKUP_ITEM4_COMBO2)\n\t\t{\n\t\t\tlara.pickupitemscombo &= ~(1 << (objnum - PICKUP_ITEM1_COMBO1));\n\t\t}\n\t\telse if (objnum >= KEY_ITEM1 && objnum <= KEY_ITEM8)\n\t\t{\n\t\t\tlara.keyitems &= ~(1 << (objnum - KEY_ITEM1));\n\t\t}\n\t\telse if (objnum >= KEY_ITEM1_COMBO1 && objnum <= KEY_ITEM8_COMBO2)\n\t\t{\n\t\t\tlara.keyitemscombo &= ~(1 << (objnum - KEY_ITEM1_COMBO1));\n\t\t}\n\t\telse if (objnum >= PUZZLE_ITEM1 && objnum <= PUZZLE_ITEM8)\n\t\t{\n\t\t\tlara.puzzleitems[objnum - PUZZLE_ITEM1] = 0;\n\t\t}\n\t\telse if (objnum >= PUZZLE_ITEM1_COMBO1 && objnum <= PUZZLE_ITEM8_COMBO2)\n\t\t{\n\t\t\tlara.puzzleitemscombo &= ~(1 << (objnum - PUZZLE_ITEM1_COMBO1));\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid DEL_picked_up_object(short objnum)//3FEB0, 40304 (F)\n{\n\tswitch (objnum)\n\t{\n\tcase UZI_ITEM:\n\t\tif (!(lara.uzis_type_carried & WTYPE_PRESENT))\n\t\t\tlara.uzis_type_carried = WTYPE_PRESENT | WTYPE(UZI_NORMAL);\n\n\t\tif (lara.num_uzi_ammo != -1)\n\t\t\tlara.num_uzi_ammo += UZI_AMMO_COUNT;\n\n\t\treturn;\n\n\tcase PISTOLS_ITEM:\n\t\tif (!(lara.pistols_type_carried & WTYPE_PRESENT))\n\t\t\tlara.pistols_type_carried = WTYPE_PRESENT | WTYPE(PISTOLS_NORMAL);\n\n\t\tlara.num_pistols_ammo = -1;\n\n\t\treturn;\n\n\tcase SHOTGUN_ITEM:\n\t\tif (!(lara.shotgun_type_carried & WTYPE_PRESENT))\n\t\t\tlara.shotgun_type_carried = WTYPE_PRESENT | WTYPE(SHELL_NORMAL);\n\n\t\tif (lara.num_shotgun_ammo1 != -1)\n\t\t\tlara.num_shotgun_ammo1 += SHOTGUN_SHELL_COUNT;\n\n\t\treturn;\n\n\tcase REVOLVER_ITEM:\n\t\tif (!(lara.sixshooter_type_carried & WTYPE_PRESENT))\n\t\t\tlara.sixshooter_type_carried = WTYPE_PRESENT | WTYPE(REVOLVER_NORMAL);\n\n\t\tif (lara.num_revolver_ammo != -1)\n\t\t\tlara.num_revolver_ammo += REVOLVER_AMMO_COUNT;\n\n\t\treturn;\n\n\tcase CROSSBOW_ITEM:\n\t\tif (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT)\n\t\t{\n\t\t\tlara.crossbow_type_carried = WTYPE_PRESENT | WTYPE_LASERSIGHT | WTYPE(GRAPPLING_TYPE_1);\n\t\t\tlara.num_crossbow_ammo2 = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!(lara.crossbow_type_carried & WTYPE_PRESENT))\n\t\t\t\tlara.crossbow_type_carried = WTYPE_PRESENT | WTYPE(GRAPPLING_TYPE_1);\n\n\t\t\tif (lara.num_crossbow_ammo1 != -1)\n\t\t\t\tlara.num_crossbow_ammo1 += GRAPPLING_AMMO_COUNT;\n\t\t}\n\n\t\treturn;\n\n\tcase HK_ITEM:\n\t\tSetCutNotPlayed(CUT_RICH_CUT_3);\n\n\t\tif (!(lara.hk_type_carried & WTYPE_PRESENT))\n\t\t\tlara.hk_type_carried = WTYPE_PRESENT | WTYPE(HK_SNIPER);\n\n\t\tif (gfCurrentLevel != LVL5_ESCAPE_WITH_THE_IRIS)\n\t\t\tif (lara.num_hk_ammo1 != -1)\n\t\t\t\tlara.num_hk_ammo1 += HK_AMMO_COUNT;\n\n\t\treturn;\n\n\tcase SHOTGUN_AMMO1_ITEM:\n\t\tif (lara.num_shotgun_ammo1 != -1)\n\t\t\tlara.num_shotgun_ammo1 += SHOTGUN_SHELL_COUNT;\n\n\t\treturn;\n\n\tcase SHOTGUN_AMMO2_ITEM:\n\t\tif (lara.num_shotgun_ammo2 != -1)\n\t\t\tlara.num_shotgun_ammo2 += SHOTGUN_SHELL_COUNT;\n\n\t\treturn;\n\n\tcase HK_AMMO_ITEM:\n\t\tif (lara.num_hk_ammo1 != -1)\n\t\t\tlara.num_hk_ammo1 += HK_AMMO_COUNT;\n\n\t\treturn;\n\n\tcase CROSSBOW_AMMO1_ITEM:\n\t\tif (lara.num_crossbow_ammo1 != -1)\n\t\t\t++lara.num_crossbow_ammo1;\n\n\t\treturn;\n\n\tcase CROSSBOW_AMMO2_ITEM:\n\t\tif (lara.num_crossbow_ammo2 != -1)\n\t\t\tlara.num_crossbow_ammo2 += GRAPPLING_AMMO_COUNT;\n\n\t\treturn;\n\n\tcase REVOLVER_AMMO_ITEM:\n\t\tif (lara.num_revolver_ammo != -1)\n\t\t\tlara.num_revolver_ammo += REVOLVER_AMMO_COUNT;\n\n\t\treturn;\n\n\tcase UZI_AMMO_ITEM:\n\t\tif (lara.num_uzi_ammo != -1)\n\t\t\tlara.num_uzi_ammo += UZI_AMMO_COUNT;\n\n\t\treturn;\n\n\tcase FLARE_INV_ITEM:\n\t\tif (lara.num_flares != -1)\n\t\t\tlara.num_flares += 12;\n\n\t\treturn;\n\n\tcase SILENCER_ITEM:\n\t\tif (!((lara.uzis_type_carried |\n\t\t\t(lara.pistols_type_carried |\n\t\t\t\tlara.shotgun_type_carried |\n\t\t\t\tlara.sixshooter_type_carried |\n\t\t\t\tlara.crossbow_type_carried |\n\t\t\t\tlara.hk_type_carried)) & WTYPE_SILENCER))\n\t\t\tlara.silencer = 1;\n\n\t\treturn;\n\n\tcase LASERSIGHT_ITEM:\n\t\tif (!((lara.uzis_type_carried |\n\t\t\t(lara.pistols_type_carried |\n\t\t\t\tlara.shotgun_type_carried |\n\t\t\t\tlara.sixshooter_type_carried |\n\t\t\t\tlara.crossbow_type_carried |\n\t\t\t\tlara.hk_type_carried)) & WTYPE_LASERSIGHT))\n\t\t\tlara.lasersight = 1;\n\n\t\treturn;\n\n\tcase BIGMEDI_ITEM:\n\t\tif (lara.num_large_medipack != -1)\n\t\t\t++lara.num_large_medipack;\n\n\t\treturn;\n\n\tcase SMALLMEDI_ITEM:\n\t\tif (lara.num_small_medipack != -1)\n\t\t\t++lara.num_small_medipack;\n\n\t\treturn;\n\n\tcase BINOCULARS_ITEM:\n\t\tlara.binoculars = WTYPE_PRESENT;\n\t\treturn;\n\n\tcase PICKUP_ITEM4:\n\t\tIsAtmospherePlaying = 0;\n\n\t\tS_CDPlay(CDA_XA1_SECRET, 0);\n\n\t\tlara.pickupitems |= 8u;\n\n\t\t++savegame.Level.Secrets;\n\t\t++savegame.Game.Secrets;\n\n\t\tif (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT)\n\t\t{\n\t\t\t++savegame.CampaignSecrets[3];\n\t\t}\n\t\telse if (gfCurrentLevel >= LVL5_BASE && gfCurrentLevel <= LVL5_SINKING_SUBMARINE)\n\t\t{\n\t\t\t++savegame.CampaignSecrets[2];\n\t\t}\n\t\telse if (gfCurrentLevel >= LVL5_STREETS_OF_ROME && gfCurrentLevel <= LVL5_COLOSSEUM)\n\t\t{\n\t\t\t++savegame.CampaignSecrets[0];\n\t\t}\n\t\telse if (gfCurrentLevel >= LVL5_GALLOWS_TREE && gfCurrentLevel <= LVL5_OLD_MILL)\n\t\t{\n\t\t\t++savegame.CampaignSecrets[1];\n\t\t}\n\n\t\treturn;\n\n\tcase CROWBAR_ITEM:\n\t\tlara.crowbar = 1;\n\t\treturn;\n\n\tcase EXAMINE1:\n\t\tlara.examine1 = 1;\n\t\treturn;\n\n\tcase EXAMINE2:\n\t\tlara.examine2 = 1;\n\t\treturn;\n\n\tcase EXAMINE3:\n\t\tlara.examine3 = 1;\n\t\treturn;\n\n\tcase WET_CLOTH:\n\t\tlara.wetcloth = CLOTH_WET;\n\t\treturn;\n\n\tcase CLOTH:\n\t\tlara.wetcloth = CLOTH_DRY;\n\t\treturn;\n\n\tcase BOTTLE:\n\t\tlara.bottle++;\n\n\t\treturn;\n\n\tdefault:\n\t\tif (objnum >= PICKUP_ITEM1 && objnum <= PICKUP_ITEM4)\n\t\t{\n\t\t\tlara.pickupitems |= 1 << (objnum - PICKUP_ITEM1);\n\t\t}\n\t\telse if (objnum >= PICKUP_ITEM1_COMBO1 && objnum <= PICKUP_ITEM4_COMBO2)\n\t\t{\n\t\t\tlara.pickupitemscombo |= 1 << (objnum - PICKUP_ITEM1_COMBO1);\n\t\t}\n\t\telse if (objnum >= KEY_ITEM1 && objnum <= KEY_ITEM8)\n\t\t{\n\t\t\tlara.keyitems |= 1 << (objnum - KEY_ITEM1);\n\t\t}\n\t\telse if (objnum >= KEY_ITEM1_COMBO1 && objnum <= KEY_ITEM8_COMBO2)\n\t\t{\n\t\t\tlara.keyitemscombo |= 1 << (objnum - KEY_ITEM1_COMBO1);\n\t\t}\n\t\telse if (objnum >= PUZZLE_ITEM1 && objnum <= PUZZLE_ITEM8)\n\t\t{\n\t\t\tlara.puzzleitems[objnum - PUZZLE_ITEM1]++;\n\t\t}\n\t\telse if (objnum >= PUZZLE_ITEM1_COMBO1 && objnum <= PUZZLE_ITEM8_COMBO2)\n\t\t{\n\t\t\tlara.puzzleitemscombo |= 1 << (objnum - PUZZLE_ITEM1_COMBO1);\n\t\t}\n\t}\n}\n\nvoid use_current_item()//3F9A0, 3FDF4\n{\n\tSayNo();\n\tUNIMPLEMENTED();\n}\n\nvoid setup_objectlist_startposition2(short newobj)//3F938, 3FD8C (F)\n{\n\tint i;\n\n\tfor (i = 0; i < 100; i++)\n\t{\n\t\tif (inventry_objects_list[rings[RING_INVENTORY]->current_object_list[i].invitem].object_number == newobj)\n\t\t{\n\t\t\trings[RING_INVENTORY]->curobjinlist = i;\n\t\t}\n\t}\n}\n\nvoid setup_objectlist_startposition(short newobj)//3F8F0, 3FD44 (F)\n{\n\tint i;\n\n\tfor(i = 0; i < 100; i++)\n\t{\n\t\tif (rings[RING_INVENTORY]->current_object_list[i].invitem == newobj)\n\t\t{\n\t\t\trings[RING_INVENTORY]->curobjinlist = i;\n\t\t}\n\t}\n}\n\nvoid combine_clothbottle(int flag)//3F8D0(<), 3FD24(<) (F)\n{\n\tlara.wetcloth = 2;\n\tlara.bottle--;\n}\n\nvoid combine_PickupItem4(int flag)//3F8AC(<), 3FD00(<) (F)\n{\n\tlara.pickupitems |= (1 << 3);\n\tlara.pickupitemscombo &= ~(3 << 6);\n}\n\nvoid combine_PickupItem3(int flag)//3F888(<), 3FCDC(<) (F)\n{\n\tlara.pickupitems |= (1 << 2);\n\tlara.pickupitemscombo &= ~(3 << 4);\n}\n\nvoid combine_PickupItem2(int flag)//3F864(<), 3FCB8(<) (F)\n{\n\tlara.pickupitems |= (1 << 1);\n\tlara.pickupitemscombo &= ~(3 << 2);\n}\n\nvoid combine_PickupItem1(int flag)//3F840(<), 3FC94(<) (F)\n{\n\tlara.pickupitems |= (1 << 0);\n\tlara.pickupitemscombo &= ~(3 << 0);\n}\n\nvoid combine_KeyItem8(int flag)//3F81C(<), 3FC70(<) (F)\n{\n\tlara.keyitems |= (1 << 7);\n\tlara.keyitemscombo &= ~(3 << 14);\n}\n\nvoid combine_KeyItem7(int flag)//3F7F8(<), 3FC4C(<) (F)\n{\n\tlara.keyitems |= (1 << 6);\n\tlara.keyitemscombo &= ~(3 << 12);\n}\n\nvoid combine_KeyItem6(int flag)//3F7D4(<), 3FC28(<) (F)\n{\n\tlara.keyitems |= (1 << 5);\n\tlara.keyitemscombo &= ~(3 << 10);\n}\n\nvoid combine_KeyItem5(int flag)//3F7B0(<), 3FC04(<) (F)\n{\n\tlara.keyitems |= (1 << 4);\n\tlara.keyitemscombo &= ~(3 << 8);\n}\n\nvoid combine_KeyItem4(int flag)//3F78C(<), 3FBE0(<) (F)\n{\n\tlara.keyitems |= (1 << 3);\n\tlara.keyitemscombo &= ~(3 << 6);\n}\n\nvoid combine_KeyItem3(int flag)//3F768(<), 3FBBC(<) (F)\n{\n\tlara.keyitems |= (1 << 2);\n\tlara.keyitemscombo &= ~(3 << 4);\n}\n\nvoid combine_KeyItem2(int flag)//3F744(<), 3FB98(<) (F)\n{\n\tlara.keyitems |= (1 << 1);\n\tlara.keyitemscombo &= ~(3 << 2);\n}\n\nvoid combine_KeyItem1(int flag)//3F720(<), 3FB74(<) (F)\n{\n\tlara.keyitems |= (1 << 0);\n\tlara.keyitemscombo &= ~(3 << 0);\n}\n\nvoid combine_PuzzleItem8(int flag)//3F700(<), 3FB54(<) (F)\n{\n\tlara.puzzleitems[7] = 1;\n\tlara.puzzleitemscombo &= 0x3FFF;\n}\n\nvoid combine_PuzzleItem7(int flag)//3F6E0(<), 3FB34(<) (F)\n{\n\tlara.puzzleitems[6] = 1;\n\tlara.puzzleitemscombo &= 0xCFFF;\n}\n\nvoid combine_PuzzleItem6(int flag)//3F6C0(<), 3FB14(<) (F)\n{\n\tlara.puzzleitems[5] = 1;\n\tlara.puzzleitemscombo &= 0xF3FF;\n}\n\nvoid combine_PuzzleItem5(int flag)//3F6A0(<), 3FAF4(<) (F)\n{\n\tlara.puzzleitems[4] = 1;\n\tlara.puzzleitemscombo &= 0xFCFF;\n}\n\nvoid combine_PuzzleItem4(int flag)//3F680(<), 3FAD4(<) (F)\n{\n\tlara.puzzleitems[3] = 1;\n\tlara.puzzleitemscombo &= 0xFF3F;\n}\n\nvoid combine_PuzzleItem3(int flag)//3F660(<), 3FAB4(<) (F)\n{\n\tlara.puzzleitems[2] = 1;\n\tlara.puzzleitemscombo &= 0xFFCF;\n}\n\nvoid combine_PuzzleItem2(int flag)//3F640(<), 3FA94(<) (F)\n{\n\tlara.puzzleitems[1] = 1;\n\tlara.puzzleitemscombo &= 0xFFF3;\n}\n\nvoid combine_PuzzleItem1(int flag)//3F620(<), 3FA74(<) (F)\n{\n\tlara.puzzleitems[0] = 1;\n\tlara.puzzleitemscombo &= 0xFFFC;\n}\n\nvoid combine_crossbow_lasersight(int flag)//3F590, 3F9E4 (F)\n{\n\tif (flag)\n\t{\n\t\tlara.lasersight = 1;\n\t\tlara.crossbow_type_carried &= ~4;\n\t}\n\telse\n\t{\n\t\tlara.lasersight = 0;\n\t\tlara.crossbow_type_carried |= 4;\n\t}\n\n\tif (lara.gun_status && lara.gun_type == WEAPON_CROSSBOW)\n\t{\n\t\tundraw_shotgun_meshes(WEAPON_CROSSBOW);\n\t\tdraw_shotgun_meshes(WEAPON_CROSSBOW);\n\t}\n}\n\nvoid combine_revolver_lasersight(int flag)//3F500, 3F954 (F)\n{\n\tif (flag)\n\t{\n\t\tlara.lasersight = 1;\n\t\tlara.sixshooter_type_carried &= ~WTYPE_LASERSIGHT;\n\t}\n\telse\n\t{\n\t\tlara.lasersight = 0;\n\t\tlara.sixshooter_type_carried |= WTYPE_LASERSIGHT;\n\t}\n\n\tif (lara.gun_status && lara.gun_type == WEAPON_REVOLVER)\n\t{\n\t\tundraw_pistol_mesh_right(WEAPON_REVOLVER);\n\t\tdraw_pistol_meshes(WEAPON_REVOLVER);\n\t}\n}\n\nvoid combine_HK_SILENCER(int flag)//3F4C0(<), 3F914(<) (F)\n{\n\tif(flag == 0)\n\t{\n\t\tlara.silencer = 0;\n\t\tlara.hk_type_carried |= WTYPE_SILENCER;\n\t}\n\telse\n\t{\n\t\tlara.silencer = 1;\n\t\tlara.hk_type_carried &= ~WTYPE_SILENCER;\n\t}\n}\n\nvoid seperate_object(short obj)//3F424, 3F878 (F)\n{\n\tint n;\n\n\tfor (n = 0; n < 24; n++)\n\t{\n\t\tif (dels_handy_combine_table[n].combined_item == obj)\n\t\t\tbreak;\n\t}\n\n\tdels_handy_combine_table[n].combine_routine(1);\n\tconstruct_object_list();\n\tsetup_objectlist_startposition(dels_handy_combine_table[n].item1);\n}\n\nvoid combine_these_two_objects(short obj1, short obj2)//3F348, 3F79C (F)\n{\n\tint n;\n\n\tfor(n = 0; n < 24; n++)\n\t{\n\t\tif (dels_handy_combine_table[n].item1 == obj1 &&\n\t\t\tdels_handy_combine_table[n].item2 == obj2)\n\t\t\tbreak;\n\t}\n\n\tdels_handy_combine_table[n].combine_routine(0);\n\tconstruct_object_list();\n\tsetup_objectlist_startposition(dels_handy_combine_table[n].combined_item);\n\thandle_object_changeover(RING_INVENTORY);\n}\n\nint do_these_objects_combine(int obj1, int obj2)//3F2DC, 3F730 (F)\n{\n\tint n;\n\n\tfor (n = 0; n < 24; n++)\n\t{\n\t\tif (dels_handy_combine_table[n].item1 == obj1 &&\n\t\t\tdels_handy_combine_table[n].item2 == obj2)\n\t\t\treturn TRUE;\n\t}\n\n\treturn FALSE;\n}\n\nint have_i_got_item(short obj)//3F29C, 3F6F0 (F)\n{\n\tint i;\n\n\tfor(i = 0; i < 100; i++)\n\t{\n\t\tif (rings[RING_INVENTORY]->current_object_list[i].invitem == obj)\n\t\t\treturn TRUE;\n\t}\n\n\treturn FALSE;\n}\n\nint is_item_currently_combinable(short obj)//3F200(<), 3F654(<) (F)\n{\n\tint n;\n\n\t//loc_3F228\n\tfor(n = 0; n < 24; n++)\n\t{\n\t\tif (dels_handy_combine_table[n].item1 == obj)\n\t\t{\n\t\t\tif (have_i_got_item(dels_handy_combine_table[n].item2))\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\n\t\t\t//loc_3F24C\n\t\t\tif (dels_handy_combine_table[n].item2 == obj)\n\t\t\t{\n\t\t\t\tif (have_i_got_item(dels_handy_combine_table[n].item1))\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}//loc_3F270\n\t\t}//loc_3F24C\n\t}\n\n\treturn FALSE;\n}\n\nvoid update_laras_weapons_status()//3F13C, 3F590 (F)\n{\n\tif(lara.shotgun_type_carried & WTYPE_PRESENT)\n\t{\n\t\tlara.shotgun_type_carried &= ~WTYPE_MASK_AMMO;\n\t\tif (CurrentShotGunAmmoType != 0)\n\t\t\tlara.shotgun_type_carried |= WTYPE(SHELL_WIDESHOT);\n\t\telse\n\t\t\tlara.shotgun_type_carried |= WTYPE(SHELL_NORMAL);\n\t}\n\n\tif (lara.hk_type_carried & WTYPE_PRESENT)\n\t{\n\t\tlara.hk_type_carried &= ~WTYPE_MASK_AMMO;\n\t\tif (CurrentGrenadeGunAmmoType == HK_SNIPER)\n\t\t\tlara.hk_type_carried |= WTYPE(HK_SNIPER);\n\t\telse if (CurrentGrenadeGunAmmoType == HK_BURST)\n\t\t\tlara.hk_type_carried |= WTYPE(HK_BURST);\n\t\telse\n\t\t\tlara.hk_type_carried |= WTYPE(HK_RAPID);\n\t}\n\n\tif (lara.crossbow_type_carried & WTYPE_PRESENT)\n\t{\n\t\tlara.crossbow_type_carried &= ~WTYPE_MASK_AMMO;\n\t\tif (CurrentCrossBowAmmoType != GRAPPLING_TYPE_1)\n\t\t\tlara.crossbow_type_carried |= WTYPE(GRAPPLING_TYPE_2);\n\t\telse\n\t\t\tlara.crossbow_type_carried |= WTYPE(GRAPPLING_TYPE_1);\n\t}\n}\n\nvoid spinback(unsigned short* cock)//3F094, 3F4E8 (F)\n{\n\tunsigned short val = *cock;\n\tunsigned short val2;\n\tif (val)\n\t{\n\t\tif (val <= ANGLE(180))\n\t\t{\n\t\t\tif (val < ANGLE(5))\n\t\t\t\tval = ANGLE(5);\n\n\t\t\tif (val > ANGLE(90))\n\t\t\t\tval = ANGLE(90);\n\n\t\t\tval2 = val - (val >> 3);\n\n\t\t\tif (val2 > ANGLE(180))\n\t\t\t\tval2 = ANGLE(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (-(short)val < ANGLE(5))\n\t\t\t\tval = ANGLE(5);\n\n\t\t\tif (-(short)val > ANGLE(90))\n\t\t\t\tval = ANGLE(90);\n\n\t\t\tval2 = ((unsigned short)-(short)val >> 3) + val;\n\n\t\t\tif (val2 < ANGLE(180))\n\t\t\t\tval2 = ANGLE(0);\n\t\t}\n\n\t\t*cock = val2;\n\t}\n}\n\nvoid draw_ammo_selector()//3EDDC(<), 3F230(<) (F)\n{\n\tint n;\n\tint xpos;\n\tshort yrot;\n\tstruct INVOBJ* objme;\n\tchar cunter[256];\n\n\tif (ammo_selector_flag)\n\t{\n#if PC_VERSION\n\t\txpos = (2 * phd_centerx - OBJLIST_SPACING) >> 1;\n#else\n\t\txpos = (SCREEN_WIDTH - OBJLIST_SPACING) >> 1;\n#endif\n\n\t\tif (num_ammo_slots == 2)\n\t\t{\n\t\t\txpos -= OBJLIST_SPACING / 2;\n\t\t}\n\t\telse if (num_ammo_slots == 3)\n\t\t{\n\t\t\t//loc_3EE40\n\t\t\txpos -= OBJLIST_SPACING;\n\t\t}\n\t\t//loc_3EE4C\n\n\t\tif (num_ammo_slots != 0)\n\t\t{\n\t\t\t//loc_3EE74\n\t\t\tfor(n = 0; n < num_ammo_slots; n++)\n\t\t\t{\n\t\t\t\tobjme = &inventry_objects_list[ammo_object_list[n].invitem];\n\n\t\t\t\tif (n == current_ammo_type[0])\n\t\t\t\t{\n\t\t\t\t\tif ((objme->flags & 2))\n\t\t\t\t\t{\n\t\t\t\t\t\tammo_object_list[n].yrot += 0x3FE;\n\t\t\t\t\t}//loc_3EECC\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//loc_3EEC0\n\t\t\t\t\tspinback(&ammo_object_list[n].yrot);\n\t\t\t\t}\n\t\t\t\t//loc_3EECC\n\t\t\t\tyrot = ammo_object_list[n].yrot;\n\n\t\t\t\tif (n == current_ammo_type[0])\n\t\t\t\t{\n\t\t\t\t\tif (ammo_object_list[n].amount == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsprintf(&cunter[0], &gfStringWad[gfStringOffset[STR_UNLIMITED]], &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[n].invitem].objname]]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3EF48\n\t\t\t\t\t\tsprintf(&cunter[0], "%d x %s", ammo_object_list[n].amount, &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[n].invitem].objname]]);\n\t\t\t\t\t}\n\n\t\t\t\t\t//loc_3EF90\n\t\t\t\t\tif (ammo_selector_fade_val != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tPrintString(\n#if PC_VERSION\n\t\t\t\t\t\t\tphd_centerx, font_height + phd_centery + 2 * font_height - 9,\n#else\n\t\t\t\t\t\t\tSCREEN_WIDTH / 2, 165,\n#endif\n\t\t\t\t\t\t\t8, &cunter[0], FF_CENTER);\n\t\t\t\t\t}//loc_3EFB8\n\n\t\t\t\t\tif (n == current_ammo_type[0])\n\t\t\t\t\t{\n\t\t\t\t\t\tDrawThreeDeeObject2D(inventry_xpos + 64 + xpos, inventry_ypos + 190, ammo_object_list[n].invitem, ammo_selector_fade_val, 0, yrot, 0, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3F00C\n\t\t\t\t\t\tDrawThreeDeeObject2D(inventry_xpos + 64 + xpos, inventry_ypos + 190, ammo_object_list[n].invitem, ammo_selector_fade_val, 0, yrot, 0, 1, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//loc_3F00C\n\t\t\t\t\tDrawThreeDeeObject2D(inventry_xpos + 64 + xpos, inventry_ypos + 190, ammo_object_list[n].invitem, ammo_selector_fade_val, 0, yrot, 0, 1, 0);\n\t\t\t\t}\n\n\t\t\t\t//loc_3F048\n\t\t\t\txpos += OBJLIST_SPACING;\n\t\t\t}\n\t\t}//loc_3F068\n\t}//loc_3F068\n}\n\nvoid fade_ammo_selector()//3ED08, 3F15C (F)\n{\n\tif (rings[RING_INVENTORY]->ringactive && (right_repeat >= 8 || left_repeat >= 8))\n\t{\n\t\tammo_selector_fade_val = 0;\n\t}\n\telse if (ammo_selector_fade_dir == 1)\n\t{\n\t\tif (ammo_selector_fade_val < 128)\n\t\t{\n\t\t\tammo_selector_fade_val += 32;\n\t\t}\n\t\tif (ammo_selector_fade_val > 128)\n\t\t{\n\t\t\tammo_selector_fade_val = 128;\n\t\t\tammo_selector_fade_dir = 0;\n\t\t}\n\t}\n\telse if (ammo_selector_fade_dir == 2)\n\t{\n\t\tif (ammo_selector_fade_val > 0)\n\t\t{\n\t\t\tammo_selector_fade_val -= 32;\n\t\t}\n\t\tif (ammo_selector_fade_val < 0)\n\t\t{\n\t\t\tammo_selector_fade_val = 0;\n\t\t\tammo_selector_fade_dir = 0;\n\t\t}\n\t}\n}\n\nvoid setup_ammo_selector()//3E9F8, 3EE4C (F)\n{\n#if 0//PSX_VERSION || PSXPC_VERSION\n\n#else\n\tint num = 0;\n\tint opts = options_table[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem];\n\tammo_selector_flag = 0;\n\tnum_ammo_slots = 0;\n\tif (!rings[RING_AMMO]->ringactive)\n\t{\n\t\tammo_object_list[2].yrot = 0;\n\t\tammo_object_list[1].yrot = 0;\n\t\tammo_object_list[0].yrot = 0;\n\t\tif (opts & 0x4FC0)\n\t\t{\n\t\t\tammo_selector_flag = 1;\n\t\t\tammo_selector_fade_dir = 1;\n\t\t\tif (opts & OPT_UZI)\n\t\t\t{\n\t\t\t\tammo_object_list[0].invitem = INV_UZI_AMMO_ITEM;\n\t\t\t\tammo_object_list[0].amount = AmountUziAmmo;\n\t\t\t\tnum = 1;\n\t\t\t\tnum_ammo_slots = 1;\n\t\t\t\tcurrent_ammo_type = &CurrentUziAmmoType;\n\t\t\t}\n\t\t\tif (opts & OPT_PISTOLS)\n\t\t\t{\n\t\t\t\tnum = 1;\n\t\t\t\tammo_object_list[0].invitem = INV_PISTOLS_AMMO_ITEM;\n\t\t\t\tammo_object_list[0].amount = -1;\n\t\t\t\tnum_ammo_slots = 1;\n\t\t\t\tcurrent_ammo_type = &CurrentPistolsAmmoType;\n\t\t\t}\n\t\t\tif (opts & OPT_REVOLVER)\n\t\t\t{\n\t\t\t\tnum = 1;\n\t\t\t\tammo_object_list[0].invitem = INV_REVOLVER_AMMO_ITEM;\n\t\t\t\tammo_object_list[0].amount = AmountRevolverAmmo;\n\t\t\t\tnum_ammo_slots = 1;\n\t\t\t\tcurrent_ammo_type = &CurrentRevolverAmmoType;\n\t\t\t}\n\t\t\tif (opts & OPT_CROSSBOW_TYPE2)\n\t\t\t{\n\t\t\t\tcurrent_ammo_type = &CurrentCrossBowAmmoType;\n\t\t\t\tammo_object_list[num].invitem = INV_CROSSBOW_AMMO2_ITEM3;\n\t\t\t\tammo_object_list[num].amount = AmountCrossBowAmmo1;\n\t\t\t\tnum++;\n\t\t\t\tammo_object_list[num].invitem = INV_CROSSBOW_AMMO2_ITEM4;\n\t\t\t\tammo_object_list[num].amount = AmountCrossBowAmmo2;\n\t\t\t\tnum++;\n\t\t\t\tnum_ammo_slots = num;\n\t\t\t}\n\t\t\tif (opts & OPT_HK)\n\t\t\t{\n\t\t\t\tcurrent_ammo_type = &CurrentGrenadeGunAmmoType;\n\t\t\t\tammo_object_list[num].invitem = INV_HK_AMMO_ITEM1;\n\t\t\t\tammo_object_list[num].amount = AmountHKAmmo1;\n\t\t\t\tnum++;\n\t\t\t\tammo_object_list[num].invitem = INV_HK_AMMO_ITEM2;\n\t\t\t\tammo_object_list[num].amount = AmountHKAmmo1;\n\t\t\t\tnum++;\n\t\t\t\tammo_object_list[num].invitem = INV_HK_AMMO_ITEM3;\n\t\t\t\tammo_object_list[num].amount = AmountHKAmmo1;\n\t\t\t\tnum++;\n\t\t\t\tnum_ammo_slots = num;\n\t\t\t}\n\t\t\tif (opts & OPT_SHOTGUN)\n\t\t\t{\n\t\t\t\tcurrent_ammo_type = &CurrentShotGunAmmoType;\n\t\t\t\tammo_object_list[num].invitem = INV_SHOTGUN_AMMO1_ITEM;\n\t\t\t\tammo_object_list[num].amount = AmountShotGunAmmo1;\n\t\t\t\tnum++;\n\t\t\t\tammo_object_list[num].invitem = INV_SHOTGUN_AMMO2_ITEM;\n\t\t\t\tammo_object_list[num].amount = AmountShotGunAmmo2;\n\t\t\t\tnum++;\n\t\t\t\tnum_ammo_slots = num;\n\t\t\t}\n\t\t\tif (opts & OPT_CROSSBOW_TYPE1)\n\t\t\t{\n\t\t\t\tammo_object_list[0].invitem = INV_CROSSBOW_AMMO1_ITEM;\n\t\t\t\tammo_object_list[0].amount = AmountCrossBowAmmo1;\n\t\t\t\tnum_ammo_slots = 1;\n\t\t\t\tcurrent_ammo_type = &CurrentCrossBowAmmoType;\n\t\t\t}\n\t\t}\n\t}\n#endif\n}\n\nvoid handle_inventry_menu()//3DF44(<), 3E398 (F)\n{\n\tint n;\n\tint opts;\n\tint i;\n\tint ypos;\n\tint num;\n\n\tif (rings[RING_AMMO]->ringactive)\n\t{\n\t\tPrintString(\n#if PC_VERSION\n\t\t\tphd_centerx, phd_centery\n#else\n\t\t\tSCREEN_WIDTH / 2, 120\n#endif\n\t\t\t, 1, &gfStringWad[gfStringOffset[optmessages[5]]], FF_CENTER);\n\n\t\tif (rings[RING_INVENTORY]->objlistmovement)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (rings[RING_AMMO]->objlistmovement)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (go_select)\n\t\t{\n\t\t\tif (do_these_objects_combine(rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem, rings[RING_AMMO]->current_object_list[rings[RING_AMMO]->curobjinlist].invitem))\n\t\t\t{\n\t\t\t\tcombine_ring_fade_dir = 2;\n\t\t\t\tcombine_type_flag = 1;\n\t\t\t\tcombine_obj1 = rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem;\n\t\t\t\tcombine_obj2 = rings[RING_AMMO]->current_object_list[rings[RING_AMMO]->curobjinlist].invitem;\n\t\t\t\tSoundEffect(SFX_MENU_COMBINE, NULL, SFX_ALWAYS);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//loc_3E068\n\t\t\t\tSayNo();\n\t\t\t\tcombine_ring_fade_dir = 2;\n\t\t\t}\n\t\t}\n\t\t//loc_3E078\n\t\tif (go_deselect)\n\t\t{\n\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\tgo_deselect = 0;\n\t\t\tcombine_ring_fade_dir = 2;\n\t\t}\n\n\t\treturn;\n\t}\n\telse\n\t{\n\t\t//loc_3E0A8\n\t\tnum = rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem;\n\n\t\t//loc_3E0DC\n\t\tfor (n = 0; n < 3; n++)\n\t\t{\n\t\t\tcurrent_options[n].type = 0;\n\t\t\tcurrent_options[n].text = NULL;\n\t\t}\n\n\t\tn = 0;\n\t\tif (!ammo_active)\n\t\t{\n\t\t\topts = options_table[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem];\n\n\t\t\tif ((opts & 0x1000))\n\t\t\t{\n\t\t\t\tcurrent_options[0].type = 9;\n\t\t\t\tn = 1;\n\t\t\t\tcurrent_options[0].text = &gfStringWad[gfStringOffset[optmessages[6]]];\n\t\t\t}\n\t\t\tif ((opts & 0x2000))\n\t\t\t{\n\t\t\t\t//loc_3E158\n\t\t\t\tcurrent_options[n].type = 10;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[7]]];\n\t\t\t}//loc_3E1A4\n\t\t\tif ((opts & 0x20))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 11;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[8]]];\n\t\t\t}//loc_3E1F0\n\t\t\tif ((opts & 0x8000))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 12;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[9]]];\n\t\t\t}//loc_3E23C\n\t\t\tif ((opts & 0x4))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 1;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[0]]];\n\t\t\t}//loc_3E288\n\t\t\tif ((opts & 0x2))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 5;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[4]]];\n\t\t\t}//loc_3E2D4\n\t\t\tif ((opts & 0xC0))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 2;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[1]]];\n\t\t\t}//loc_3E320\n\t\t\tif ((opts & 0x100))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 2;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[10]]];\n\t\t\t}//loc_3E36C\n\t\t\tif ((opts & 8) && is_item_currently_combinable(num))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 3;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[2]]];\n\t\t\t}//loc_3E3CC\n\n\t\t\tif ((opts & 0x1))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 3;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[2]]];\n\t\t\t}//loc_3E414\n\n\t\t\tif ((opts & 0x10))\n\t\t\t{\n\t\t\t\tcurrent_options[n].type = 4;\n\t\t\t\tcurrent_options[n++].text = &gfStringWad[gfStringOffset[optmessages[3]]];\n\t\t\t}//j loc_3E550\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurrent_options[0].type = 6;\n\t\t\tcurrent_options[1].type = 7;\n\t\t\tcurrent_options[0].text = &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[0].invitem].objname]];\n\t\t\tcurrent_options[1].text = &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[1].invitem].objname]];\n\t\t\tn = 2;\n\n\t\t\tif ((options_table[rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem] & 0x100))\n\t\t\t{\n\t\t\t\tn = 3;\n\t\t\t\tcurrent_options[2].text = &gfStringWad[gfStringOffset[inventry_objects_list[ammo_object_list[2].invitem].objname]];\n\n\t\t\t}//loc_3E53C\n\n\t\t\tcurrent_selected_option = current_ammo_type[0];\n\t\t}\n\n\t\t//loc_3E550\n\t\tif (n == 1)\n\t\t{\n\t\t\typos = 120;\n\t\t}\n\t\telse\n\t\t{\n\t\t\typos = 102;\n\t\t}\n\t\t//loc_3E564\n\t\tif (n == 2)\n\t\t{\n\t\t\typos = 111;\n\t\t}\n\t\t//loc_3E574\n\t\tif (n > 0)\n\t\t{\n\t\t\t//loc_3E584\n\t\t\tfor (i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tif (i == current_selected_option)\n\t\t\t\t{\n\t\t\t\t\tPrintString(256, ypos, 1, current_options[i].text, FF_CENTER);\n\t\t\t\t\typos += 18;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//loc_3E5B0\n\t\t\t\t\tPrintString(256, ypos, 5, current_options[i].text, FF_CENTER);\n\t\t\t\t\typos += 18;\n\t\t\t\t}\n\t\t\t\t//loc_3E5C8\n\t\t\t}\n\t\t}\n\t\t//loc_3E5D8\n\t\tif (menu_active && !rings[RING_INVENTORY]->objlistmovement && !rings[RING_AMMO]->objlistmovement)\n\t\t{\n\t\t\tif (go_up && current_selected_option)\n\t\t\t{\n\t\t\t\tcurrent_selected_option--;\n\t\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\t}\n\t\t\telse if (go_down && current_selected_option < n - 1)\n\t\t\t{\n\t\t\t\t//loc_3E64C\n\t\t\t\tcurrent_selected_option++;\n\t\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\t}//loc_3E684\n\n\t\t\tif (ammo_active)\n\t\t\t{\n\t\t\t\tif (go_left && current_selected_option)\n\t\t\t\t{\n\t\t\t\t\tcurrent_selected_option--;\n\t\t\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\t\t}//loc_3E6C8\n\n\t\t\t\t //v0 = n - 1\n\t\t\t\tif (go_right && current_selected_option < n - 1)\n\t\t\t\t{\n\t\t\t\t\tcurrent_selected_option++;\n\t\t\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\t\t}//loc_3E700\n\n\t\t\t\tcurrent_ammo_type[0] = current_selected_option;\n\t\t\t}//loc_3E710\n\n\t\t\tif (go_select)\n\t\t\t{\n\t\t\t\tif (current_options[current_selected_option].type != 5 && current_options[current_selected_option].type != 1)\n\t\t\t\t{\n\t\t\t\t\tSoundEffect(SFX_MENU_CHOOSE, NULL, SFX_ALWAYS);\n\t\t\t\t}//loc_3E754\n\t\t\t\tif (current_options[current_selected_option].type == 2)\n\t\t\t\t{\n\t\t\t\t\trings[RING_INVENTORY]->ringactive = 0;\n\t\t\t\t\tammo_active = 1;\n\t\t\t\t\tStashedcurrent_selected_option = current_selected_option;\n\t\t\t\t\tStashedCurrentPistolsAmmoType = CurrentPistolsAmmoType;\n\t\t\t\t\tStashedCurrentUziAmmoType = CurrentUziAmmoType;\n\t\t\t\t\tStashedCurrentRevolverAmmoType = CurrentRevolverAmmoType;\n\t\t\t\t\tStashedCurrentShotGunAmmoType = CurrentShotGunAmmoType;\n\t\t\t\t\tStashedCurrentGrenadeGunAmmoType = CurrentGrenadeGunAmmoType;\n\t\t\t\t}\n\t\t\t\telse if (current_options[current_selected_option].type == 9)\n\t\t\t\t{\n\t\t\t\t\t//loc_3E7C8\n\t\t\t\t\tloading_or_saving = 1;\n\t\t\t\t}\n\t\t\t\telse if (current_options[current_selected_option].type == 10)\n\t\t\t\t{\n\t\t\t\t\tloading_or_saving = 2;\n\t\t\t\t}\n\t\t\t\telse if (current_options[current_selected_option].type == 11)\n\t\t\t\t{\n\t\t\t\t\texamine_mode = 1;\n\t\t\t\t}\n\t\t\t\telse if (current_options[current_selected_option].type == 12)\n\t\t\t\t{\n\t\t\t\t\tstats_mode = 1;\n\t\t\t\t}\n\t\t\t\telse if ((unsigned)(current_options[current_selected_option].type - 6) < 3)\n\t\t\t\t{\n\t\t\t\t\t//loc_3E848\n\t\t\t\t\tammo_active = 0;\n\t\t\t\t\trings[RING_INVENTORY]->ringactive = 1;\n\t\t\t\t\tcurrent_selected_option = 0;\n\t\t\t\t}\n\t\t\t\telse if (current_options[current_selected_option].type == 3)\n\t\t\t\t{\n\t\t\t\t\tconstruct_combine_object_list();\n\t\t\t\t\trings[RING_INVENTORY]->ringactive = 0;\n\t\t\t\t\trings[RING_AMMO]->ringactive = 1;\n\t\t\t\t\tammo_selector_flag = 0;\n\t\t\t\t\tmenu_active = 0;\n\t\t\t\t\tcombine_ring_fade_dir = 1;\n\t\t\t\t}//loc_3E888\n\t\t\t\telse if (current_options[current_selected_option].type == 4)\n\t\t\t\t{\n\t\t\t\t\tseperate_type_flag = 1;\n\t\t\t\t\tnormal_ring_fade_dir = 2;\n\t\t\t\t}//loc_3E8A4\n\t\t\t\telse if (current_options[current_selected_option].type == 5 || current_options[current_selected_option].type == 1) //v0 = 1\n\t\t\t\t{\n\t\t\t\t\t//loc_3E8B4\n\t\t\t\t\tmenu_active = 0;\n\t\t\t\t\tuse_the_bitch = 1;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//loc_3E8C0\n\t\t\tif ((input & IN_SELECT) && current_options[current_selected_option].type == 1 &&\n\t\t\t\trings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem - 22 < 2 &&\n\t\t\t\t!bullshitbollox && _bullshitbollox)\n\t\t\t{\n\t\t\t\tmenu_active = 0;\n\t\t\t\tuse_the_bitch = current_options[current_selected_option].type;\n\t\t\t}//loc_3E958\n\n\t\t\tif (go_deselect && ammo_active)\n\t\t\t{\n\t\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\t\tgo_deselect = 0;\n\t\t\t\tammo_active = 0;\n\t\t\t\trings[RING_INVENTORY]->ringactive = 1;\n\t\t\t\tCurrentPistolsAmmoType = StashedCurrentPistolsAmmoType;\n\t\t\t\tCurrentUziAmmoType = StashedCurrentUziAmmoType;\n\t\t\t\tCurrentRevolverAmmoType = StashedCurrentRevolverAmmoType;\n\t\t\t\tCurrentShotGunAmmoType = StashedCurrentShotGunAmmoType;\n\t\t\t\tCurrentGrenadeGunAmmoType = StashedCurrentGrenadeGunAmmoType;\n\t\t\t\tCurrentCrossBowAmmoType = StashedCurrentCrossBowAmmoType;\n\t\t\t\tcurrent_selected_option = Stashedcurrent_selected_option;\n\n\t\t\t}\n\t\t}\n\n\t}//loc_3E9D0\n}\n\n\nvoid handle_object_changeover(int ringnum)//3DF18, 3E36C (F)\n{\n\tcurrent_selected_option = 0;\n\tmenu_active = 1;\n\tsetup_ammo_selector();\n}\n\nvoid draw_current_object_list(int ringnum)//3D350, 3D7A4\n{\n\tint n; // $s5\n\tint maxobj; // $s7\n\tint xoff; // stack offset -48\n\tint i; // $s3\n\tint shade; // $s1\n\tint minobj; // stack offset -44\n\tchar textbufme[128]; // stack offset -176\n\tint objmeup; // $a0\n\tint nummeup; // $t0\n\tshort ymeup; // $t2\n\tshort yrot; // $t1\n\tstruct INVOBJ* objme; // $v1\n\tint activenum; // $v1\n\n\tif (rings[ringnum]->numobjectsinlist > 0)\n\t{\n\t\tif (ringnum == RING_AMMO)\n\t\t{\n\t\t\tammo_selector_fade_val = 0;\n\t\t\tammo_selector_fade_dir = 0;\n\n\t\t\tif (combine_ring_fade_dir == 1)\n\t\t\t{\n\t\t\t\tif (combine_ring_fade_val < 128)\n\t\t\t\t{\n\t\t\t\t\tcombine_ring_fade_val += 32;\n\t\t\t\t}\n\t\t\t\t//loc_3D3DC\n\t\t\t\tmaxobj = 0;\n\n\t\t\t\tif (combine_ring_fade_val > 128)\n\t\t\t\t{\n\t\t\t\t\tcombine_ring_fade_val = 128;\n\t\t\t\t\tcombine_ring_fade_dir = 0;\n\t\t\t\t\tn = 0;\n\t\t\t\t}//loc_3D574\n\n\t\t\t\tn = 0;\n\t\t\t}\n\t\t\telse if (combine_ring_fade_dir == 2)\n\t\t\t{\n\t\t\t\t//loc_3D404\n\t\t\t\tmaxobj = 0;\n\n\t\t\t\tif (combine_ring_fade_val > 0)\n\t\t\t\t{\n\t\t\t\t\tcombine_ring_fade_val -= 32;\n\t\t\t\t\tn = 0;\n\n\t\t\t\t\t///DUPLICATION \n\t\t\t\t\tif(combine_ring_fade_val << 16 < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (combine_type_flag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnormal_ring_fade_dir = combine_ring_fade_dir;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//loc_3D44C\n\t\t\t\t\t\t\trings[RING_INVENTORY]->ringactive = 1;\n\t\t\t\t\t\t\tmenu_active = 1;\n\t\t\t\t\t\t\trings[RING_AMMO]->ringactive = 0;\n\t\t\t\t\t\t\thandle_object_changeover(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcombine_ring_fade_val = 0;\n\t\t\t\t\t\tcombine_ring_fade_dir = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{//loc_3D42C\n\t\t\t\t\tif (combine_type_flag)\n\t\t\t\t\t{\n\t\t\t\t\t\tnormal_ring_fade_dir = combine_ring_fade_dir;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3D44C\n\t\t\t\t\t\trings[RING_INVENTORY]->ringactive = 1;\n\t\t\t\t\t\tmenu_active = 1;\n\t\t\t\t\t\trings[RING_AMMO]->ringactive = 0;\n\n\t\t\t\t\t\thandle_object_changeover(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tcombine_ring_fade_val = 0;\n\t\t\t\t\tcombine_ring_fade_dir = 0;\n\t\t\t\t}\n\t\t\t\t//loc_3D46C\n\t\t\t\trings[RING_AMMO]->ringactive = 0;\n\t\t\t\tmaxobj = 0;\n\t\t\t\t//j       loc_3D578\n\t\t\t}\n\t\t}//loc_3D478\n\t\telse\n\t\t{\n\t\t\tif (normal_ring_fade_dir == 1)\n\t\t\t{\n\t\t\t\tif (normal_ring_fade_val < 128)\n\t\t\t\t{\n\t\t\t\t\tnormal_ring_fade_val += 32;\n\t\t\t\t}\n\t\t\t\t//loc_3D4A0\n\t\t\t\tmaxobj = 0;\n\t\t\t\tif (normal_ring_fade_val > 128)\n\t\t\t\t{\n\t\t\t\t\tnormal_ring_fade_val = 128;\n\t\t\t\t\tnormal_ring_fade_dir = 0;\n\t\t\t\t\trings[RING_INVENTORY]->ringactive = 1;\n\t\t\t\t\tmenu_active = 1;\n\t\t\t\t\t//j loc_3D578\n\t\t\t\t}//loc_3D574\n\t\t\t\tn = 0;\n\t\t\t}\n\t\t\telse if (normal_ring_fade_dir == 2)\n\t\t\t{\n\t\t\t\t//loc_3D4D4\n\t\t\t\tmaxobj = 0;\n\n\t\t\t\tif (normal_ring_fade_val > 0)\n\t\t\t\t{\n\t\t\t\t\tnormal_ring_fade_val -= 32;\n\n\t\t\t\t\t//v0 <<= 16\n\t\t\t\t\tn = 0;\n\t\t\t\t\t//if (v0 > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//j loc_3D578\n\t\t\t\t\t}\n\n\t\t\t\t}//loc_3D4FC\n\n\t\t\t\tnormal_ring_fade_val = 0;\n\t\t\t\tnormal_ring_fade_dir = 1;\n\n\t\t\t\tif (combine_type_flag == 1)\n\t\t\t\t{\n\t\t\t\t\tcombine_type_flag = 0;\n\t\t\t\t\tcombine_these_two_objects(combine_obj1, combine_obj2);\n\t\t\t\t}\n\t\t\t\telse if (seperate_type_flag != 0)\n\t\t\t\t{\n\t\t\t\t\t//loc_3D52C\n\t\t\t\t\tseperate_object(rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem);\n\t\t\t\t}\n\t\t\t\t//loc_3D568\n\t\t\t\thandle_object_changeover(0);\n\n\t\t\t}\n\t\t}\n\t\t//loc_3D578\n\t\tminobj = 0;\n\t\txoff = 0;\n\n\t\tif (rings[ringnum]->numobjectsinlist != 1)\n\t\t{\n\t\t\txoff = (rings[ringnum]->objlistmovement * OBJLIST_SPACING) >> 16;\n\t\t}//loc_3D5C0\n\t\tif (rings[ringnum]->numobjectsinlist == 2)//v0 = 3\n\t\t{\n\t\t\tminobj = -1;\n\t\t\tn = rings[ringnum]->curobjinlist - 1;\n\t\t}\n\t\t//loc_3D5E0\n\t\tif (rings[ringnum]->numobjectsinlist == 3)//v0 = 4\n\t\t{\n\t\t\tminobj = -2;\n\t\t\tmaxobj = 1;\n\t\t\tn = rings[ringnum]->curobjinlist - 2;\n\t\t}//loc_3D600\n\t\tif (rings[ringnum]->numobjectsinlist == 4)//v0 = a2 < 5 ? 1 : 0\n\t\t{\n\t\t\tminobj = -2;\n\t\t\tmaxobj = 1;\n\t\t\tn = rings[ringnum]->curobjinlist - 2;\n\t\t}//loc_3D620\n\t\tif (rings[ringnum]->numobjectsinlist > 4)\n\t\t{\n\t\t\tminobj = -3;\n\t\t\tmaxobj = 2;\n\t\t\tn = rings[ringnum]->curobjinlist - 3;\n\t\t}//loc_3D638\n\n\t\tif (n < 0)\n\t\t{\n\t\t\tn += rings[ringnum]->numobjectsinlist;\n\t\t}//loc_3D644\n\n\t\tif (rings[ringnum]->objlistmovement < 0)\n\t\t{\n\t\t\tmaxobj++;\n\t\t}\n\n\t\t//loc_3D658\n\t\ti = minobj;\n\n\t\tif (maxobj > minobj)\n\t\t{\n\t\t\t//loc_3D680\n\t\t\twhile (maxobj >= i)\n\t\t\t{\n\t\t\t\tif (minobj == i)\n\t\t\t\t{\n\t\t\t\t\tif (rings[ringnum]->objlistmovement < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tshade = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3D73C\n\t\t\t\t\t\tshade = rings[ringnum]->objlistmovement >> 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//loc_3D6B0\n\t\t\t\t\tif (i == minobj + 1 && maxobj != i)\n\t\t\t\t\t{\n\t\t\t\t\t\tshade = 128;\n\t\t\t\t\t\tif (rings[ringnum]->objlistmovement < 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (rings[ringnum]->objlistmovement < 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//v0 = -rings[ringnum]->objlistmovement\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//loc_3D6F0\n\t\t\t\t\t\t\t//v0 <<= 7\n\t\t\t\t\t\t\t//j       loc_3D71C\n\t\t\t\t\t\t\t///@TODO why incomplete\n\t\t\t\t\t\t}//loc_3D740\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3D6F8\n\t\t\t\t\t\tshade = 128;\n\t\t\t\t\t\tif (minobj == maxobj)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (rings[ringnum]->objlistmovement >= 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//loc_3D71C\n\t\t\t\t\t\t\t\tshade = 128 - (rings[ringnum]->objlistmovement << 7) >> 16;\n\t\t\t\t\t\t\t\t//j       loc_3D740\n\t\t\t\t\t\t\t}//loc_3D72C\n\t\t\t\t\t\t\telse if (rings[ringnum]->objlistmovement < 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tshade = ((-rings[ringnum]->objlistmovement) << 7) >> 16;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}//loc_3D740\n\t\t\t\t}//loc_3D740\n\n\t\t\t\t //loc_3D740\n\t\t\t\tif (minobj == 0 && maxobj == 1)\n\t\t\t\t{\n\t\t\t\t\tshade = 128;\n\t\t\t\t}//loc_3D75C\n\n\t\t\t\tif (ringnum == RING_AMMO && combine_ring_fade_val < 128 && shade != 0)\n\t\t\t\t{\n\t\t\t\t\tshade = combine_ring_fade_val;\n\t\t\t\t}//loc_3D784\n\t\t\t\tif (ringnum == RING_INVENTORY && normal_ring_fade_val < 128 && shade != 0)\n\t\t\t\t{\n\t\t\t\t\tshade = normal_ring_fade_val;\n\t\t\t\t}\n\t\t\t\t//loc_3D7AC\n\t\t\t\tif (i == 0)\n\t\t\t\t{\n\t\t\t\t\tnummeup = 0;\n\t\t\t\t\tif (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == BIGMEDI_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_large_medipack;\n\t\t\t\t\t\t//j       loc_3D930\n\t\t\t\t\t}//loc_3D7FC//v0 = 0x163\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == SMALLMEDI_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_small_medipack;\n\t\t\t\t\t\t//j       loc_3D930\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == FLARE_INV_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_flares;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number - PUZZLE_ITEM1 < 8)\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3D828\n\t\t\t\t\t\tnummeup = lara.puzzleitems[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number - PUZZLE_ITEM1];\n\n\t\t\t\t\t\tif (nummeup < 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnummeup = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//j loc_3D930\n\t\t\t\t\t}//loc_3D858\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == SHOTGUN_AMMO1_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_shotgun_ammo1;\n\t\t\t\t\t\tif (nummeup != -1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnummeup = (nummeup * 0x2AAAAAAB) - (nummeup >> 15);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//j loc_3D930\n\t\t\t\t\t}//v0 = 0x15A\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == SHOTGUN_AMMO2_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_shotgun_ammo2;\n\t\t\t\t\t\tif (nummeup != -1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnummeup = (nummeup * 0x2AAAAAAB) - (nummeup >> 15);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//j loc_3D930\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == HK_AMMO_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_hk_ammo1;\n\t\t\t\t\t\t// j       loc_3D930\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == CROSSBOW_AMMO1_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_crossbow_ammo1;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == CROSSBOW_AMMO2_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_crossbow_ammo2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == REVOLVER_AMMO_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_revolver_ammo;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == UZI_AMMO_ITEM)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.num_uzi_ammo;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == BOTTLE)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = lara.bottle;\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == PICKUP_ITEM4)\n\t\t\t\t\t{\n\t\t\t\t\t\tnummeup = savegame.Level.Secrets;\n\t\t\t\t\t}\n\n\t\t\t\t\t//v0 = 0xDF\n\t\t\t\t\tif (nummeup == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tsprintf(&textbufme[0], &gfStringWad[gfStringOffset[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].objname]]);\n\t\t\t\t\t\t// j       loc_3DA9C\n\t\t\t\t\t}\n\t\t\t\t\telse if (inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].object_number == PICKUP_ITEM4)\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3D994\n\t\t\t\t\t\tsprintf(&textbufme[0], &gfStringWad[gfStringOffset[STR_SECRETS_NUM]], nummeup, wanky_secrets_table[gfCurrentLevel]);\n\t\t\t\t\t\t//j       loc_3DA9C\n\t\t\t\t\t}\n\t\t\t\t\telse if (nummeup == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3D9E0\n\t\t\t\t\t\tsprintf(&textbufme[0], &gfStringWad[gfStringOffset[STR_UNLIMITED]], &gfStringWad[gfStringOffset[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].objname]]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3DA44\n\t\t\t\t\t\tsprintf(&textbufme[0], "%d x %s", nummeup, &gfStringWad[gfStringOffset[inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].objname]]);\n\t\t\t\t\t}\n\n\t\t\t\t\t//loc_3DA9C\n\t\t\t\t\tif (ringnum == RING_INVENTORY)\n\t\t\t\t\t{\n#if PSXENGINE\n\t\t\t\t\t\tPrintString(SCREEN_WIDTH / 2, 75, 8, &textbufme[0], FF_CENTER);\n#endif\n\t\t\t\t\t\t//j       loc_3DADC\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3DAC4\n#if PSXENGINE\n\t\t\t\t\t\tPrintString(SCREEN_WIDTH / 2, 165, 8, &textbufme[0], FF_CENTER);\n#endif\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//loc_3DADC\n\t\t\t\tif (i == 0 && rings[ringnum]->objlistmovement == 0)\n\t\t\t\t{\n\t\t\t\t\tif ((inventry_objects_list[rings[ringnum]->current_object_list[n].invitem].flags & 2))\n\t\t\t\t\t{\n\t\t\t\t\t\trings[ringnum]->current_object_list[n].yrot += 1022;\n\t\t\t\t\t\t//j       loc_3DB58\n\t\t\t\t\t}//loc_3DB58\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//loc_3DB44\n\t\t\t\t\tspinback(&rings[ringnum]->current_object_list[n].yrot);\n\t\t\t\t}\n\n\t\t\t\tyrot = rings[ringnum]->current_object_list[n].yrot;\n\n\t\t\t\tif (ringnum == RING_INVENTORY)\n\t\t\t\t{\n\t\t\t\t\tymeup = 42;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tymeup = 190;\n\t\t\t\t}\n\n\t\t\t\t//loc_3DB74\n\t\t\t\tactivenum = 0;\n\t\t\t\tif (rings[ringnum]->objlistmovement != 0)\n\t\t\t\t{\n\t\t\t\t\tif (rings[ringnum]->objlistmovement > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tactivenum = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tactivenum = 1;\n\t\t\t\t\t}\n\t\t\t\t}//loc_3DB90\n\n\t\t\t\tif (i == activenum)\n\t\t\t\t{\n\t\t\t\t\tif (rings[ringnum]->current_object_list[n].bright < 160)\n\t\t\t\t\t{\n\t\t\t\t\t\trings[ringnum]->current_object_list[n].bright += 16;\n\t\t\t\t\t}//loc_3DBC8\n\n\t\t\t\t\tif (rings[ringnum]->current_object_list[n].bright > 160)\n\t\t\t\t\t{\n\t\t\t\t\t\trings[ringnum]->current_object_list[n].bright = 160;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//loc_3DBF4\n\t\t\t\t\tif (rings[ringnum]->current_object_list[n].bright > 32)\n\t\t\t\t\t{\n\t\t\t\t\t\trings[ringnum]->current_object_list[n].bright -= 16;\n\t\t\t\t\t}\n\t\t\t\t\t//loc_3DC24\n\t\t\t\t\tif (rings[ringnum]->current_object_list[n].bright < 32)\n\t\t\t\t\t{\n\t\t\t\t\t\trings[ringnum]->current_object_list[n].bright = 32;\n\t\t\t\t\t}\n\t\t\t\t\t//loc_3DC4C\n\t\t\t\t}\n\n\t\t\t\t//loc_3DC50\n\t\t\t\tDrawThreeDeeObject2D(inventry_xpos + (i * OBJLIST_SPACING) + 256 + xoff, inventry_ypos + ymeup, rings[ringnum]->current_object_list[n].invitem, shade, 0, yrot, 0, rings[ringnum]->current_object_list[n].bright, 0);\n\t\t\t\tn++;\n\t\t\t\tif (n >= rings[ringnum]->numobjectsinlist)\n\t\t\t\t{\n\t\t\t\t\tn = 0;\n\t\t\t\t}//loc_3DCC8\n\n\t\t\t\ti++;\n\t\t\t}\n\t\t}//loc_3DCD8\n\t\tif (rings[ringnum]->ringactive && rings[ringnum]->numobjectsinlist != 1)\n\t\t{\n\t\t\tif (ringnum != RING_AMMO || combine_ring_fade_val == 128)\n\t\t\t{\n\t\t\t\t//loc_3DD20\n\t\t\t\tif (rings[ringnum]->objlistmovement > 0)\n\t\t\t\t{\n\t\t\t\t\trings[ringnum]->objlistmovement += 0x2000;\n\t\t\t\t}\n\n\t\t\t\t//loc_3DD34\n\t\t\t\tif (rings[ringnum]->objlistmovement < 0)\n\t\t\t\t{\n\t\t\t\t\trings[ringnum]->objlistmovement -= 0x2000;\n\t\t\t\t}//loc_3DD50\n\n\t\t\t\tif (go_left && rings[ringnum]->objlistmovement == 0)\n\t\t\t\t{\n\t\t\t\t\tSoundEffect(SFX_MENU_ROTATE, NULL, SFX_ALWAYS);\n\t\t\t\t\trings[ringnum]->objlistmovement += 0x2000;\n\n\t\t\t\t\tif (ammo_selector_flag)\n\t\t\t\t\t{\n\t\t\t\t\t\tammo_selector_fade_dir = 2;\n\t\t\t\t\t}\n\t\t\t\t}//loc_3DDB0\n\n\t\t\t\tif (go_right)\n\t\t\t\t{\n\t\t\t\t\tif (rings[ringnum]->objlistmovement == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tSoundEffect(SFX_MENU_ROTATE, NULL, SFX_DEFAULT);\n\n\t\t\t\t\t\trings[ringnum]->objlistmovement -= 0x2000;\n\n\t\t\t\t\t\tif (ammo_selector_flag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tammo_selector_fade_dir = 2;\n\t\t\t\t\t\t}//loc_3DE18\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t//loc_3DE18\n\t\t\t\tif (0xFFFF < rings[ringnum]->objlistmovement)\n\t\t\t\t{\n\t\t\t\t\trings[ringnum]->curobjinlist--;\n\n\t\t\t\t\tif (rings[ringnum]->curobjinlist < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\trings[ringnum]->curobjinlist = rings[ringnum]->numobjectsinlist-1;\n\t\t\t\t\t}//loc_3DE74\n\n\t\t\t\t\trings[ringnum]->objlistmovement = 0;\n\t\t\t\t\tif (ringnum == RING_INVENTORY)\n\t\t\t\t\t{\n\t\t\t\t\t\thandle_object_changeover(0);\n\t\t\t\t\t}//loc_3DEE8\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//loc_3DE90\n\t\t\t\t\tif (rings[ringnum]->objlistmovement < -0xFFFF)\n\t\t\t\t\t{\n\t\t\t\t\t\trings[ringnum]->curobjinlist++;\n\n\t\t\t\t\t\tif (rings[ringnum]->curobjinlist >= rings[ringnum]->numobjectsinlist)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trings[ringnum]->curobjinlist = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//loc_3DED4\n\t\t\t\t\t\trings[ringnum]->objlistmovement = 0;\n\t\t\t\t\t\tif (ringnum == RING_INVENTORY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\thandle_object_changeover(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}//loc_3DEE8\n\t\t\t\t}\n\t\t\t}\n\t\t}//loc_3DEE8\n\t}//loc_3DEE8\n}\n\nvoid insert_object_into_list(int num)//3D2C4(<), 3D718(<) (F)\n{\n\trings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->numobjectsinlist].invitem = num;\n\trings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->numobjectsinlist].yrot = 0;\n\trings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->numobjectsinlist].bright = 32;\n\trings[RING_INVENTORY]->numobjectsinlist++;\n}\n\nvoid construct_object_list()//3CC80, 3D0D4 (F)\n{\n\tint i;\n\n\trings[RING_INVENTORY]->numobjectsinlist = 0;\n\tfor(i = 0; i < 100; i++)\n\t{\n\t\trings[RING_INVENTORY]->current_object_list[i].invitem = -1;\n\t}\n\n\tCurrentPistolsAmmoType = PISTOLS_NORMAL;\n\tCurrentUziAmmoType = UZI_NORMAL;\n\tCurrentRevolverAmmoType = REVOLVER_NORMAL;\n\tCurrentShotGunAmmoType = SHELL_NORMAL;\n\tCurrentGrenadeGunAmmoType = HK_SNIPER;\n\tCurrentCrossBowAmmoType = GRAPPLING_TYPE_1;\n\n\tif (!(gfLevelFlags & GF_LVOP_YOUNG_LARA))\n\t{\n\t\tif (lara.pistols_type_carried & WTYPE_PRESENT)\n\t\t\tinsert_object_into_list(INV_PISTOLS_ITEM);\n\n\t\tif (lara.uzis_type_carried & WTYPE_PRESENT)\n\t\t{\n\t\t\tinsert_object_into_list(INV_UZI_ITEM);\n\t\t}\n\t\telse if (AmountUziAmmo)\n\t\t{\n\t\t\tinsert_object_into_list(INV_UZI_AMMO_ITEM);\n\t\t}\n\n\t\tif (lara.sixshooter_type_carried & WTYPE_PRESENT)\n\t\t{\n\t\t\tif (lara.sixshooter_type_carried & WTYPE_LASERSIGHT)\n\t\t\t\tinsert_object_into_list(INV_REVOLVER_ITEM2);\n\t\t\telse\n\t\t\t\tinsert_object_into_list(INV_REVOLVER_ITEM1);\n\t\t}\n\t\telse if (AmountRevolverAmmo)\n\t\t{\n\t\t\tinsert_object_into_list(INV_REVOLVER_AMMO_ITEM);\n\t\t}\n\n\t\tif (lara.shotgun_type_carried & WTYPE_PRESENT)\n\t\t{\n\t\t\tinsert_object_into_list(INV_SHOTGUN_ITEM);\n\t\t\tif (lara.shotgun_type_carried & WTYPE(SHELL_WIDESHOT))\n\t\t\t\tCurrentShotGunAmmoType = SHELL_WIDESHOT;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (AmountShotGunAmmo1)\n\t\t\t\tinsert_object_into_list(INV_SHOTGUN_AMMO1_ITEM);\n\t\t\tif (AmountShotGunAmmo2)\n\t\t\t\tinsert_object_into_list(INV_SHOTGUN_AMMO2_ITEM);\n\t\t}\n\n\t\tif (lara.hk_type_carried & WTYPE_PRESENT)\n\t\t{\n\t\t\tif (lara.hk_type_carried & WTYPE_SILENCER)\n\t\t\t\tinsert_object_into_list(INV_HK_ITEM2);\n\t\t\telse\n\t\t\t\tinsert_object_into_list(INV_HK_ITEM1);\n\n\t\t\tif (lara.hk_type_carried & WTYPE(HK_BURST))\n\t\t\t{\n\t\t\t\tCurrentGrenadeGunAmmoType = HK_BURST;\n\t\t\t}\n\t\t\telse if (lara.hk_type_carried & WTYPE(HK_RAPID))\n\t\t\t{\n\t\t\t\tCurrentGrenadeGunAmmoType = HK_RAPID;\n\t\t\t}\n\t\t}\n\t\telse if (AmountHKAmmo1)\n\t\t{\n\t\t\tinsert_object_into_list(INV_HK_AMMO_ITEM4);\n\t\t}\n\n\t\tif (lara.crossbow_type_carried & WTYPE_PRESENT)\n\t\t{\n\t\t\tif (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT)\n\t\t\t{\n\t\t\t\tinsert_object_into_list(INV_CROSSBOW_ITEM);\n\t\t\t\tCurrentCrossBowAmmoType = GRAPPLING_TYPE_1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (lara.crossbow_type_carried & WTYPE_LASERSIGHT)\n\t\t\t\t\tinsert_object_into_list(INV_CROSSBOW_AMMO2_ITEM2);\n\t\t\t\telse\n\t\t\t\t\tinsert_object_into_list(INV_CROSSBOW_AMMO2_ITEM1);\n\n\t\t\t\tif (lara.crossbow_type_carried & WTYPE(GRAPPLING_TYPE_2))\n\t\t\t\t\tCurrentCrossBowAmmoType = GRAPPLING_TYPE_2;\n\t\t\t}\n\t\t}\n\t\telse if (gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT)\n\t\t{\n\t\t\tif (AmountCrossBowAmmo1)\n\t\t\t{\n\t\t\t\tinsert_object_into_list(INV_CROSSBOW_AMMO1_ITEM);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (AmountCrossBowAmmo1)\n\t\t\t\tinsert_object_into_list(INV_CROSSBOW_AMMO2_ITEM3);\n\n\t\t\tif (AmountCrossBowAmmo2)\n\t\t\t\tinsert_object_into_list(INV_CROSSBOW_AMMO2_ITEM4);\n\t\t}\n\n\t\tif (lara.lasersight)\n\t\t\tinsert_object_into_list(INV_LASERSIGHT_ITEM);\n\n\t\tif (lara.silencer)\n\t\t\tinsert_object_into_list(INV_SILENCER_ITEM);\n\n\t\tif (lara.binoculars)\n\t\t\tinsert_object_into_list(INV_BINOCULARS_ITEM);\n\n\t\tif (lara.num_flares)\n\t\t\tinsert_object_into_list(INV_FLARE_INV_ITEM);\n\t}\n\tinsert_object_into_list(INV_COMPASS_ITEM);\n\tif (lara.num_small_medipack)\n\t\tinsert_object_into_list(INV_SMALLMEDI_ITEM);\n\tif (lara.num_large_medipack)\n\t\tinsert_object_into_list(INV_BIGMEDI_ITEM);\n\tif (lara.crowbar)\n\t\tinsert_object_into_list(INV_CROWBAR_ITEM);\n\n\tfor (i = 0; i < 8; i++)\n\t{\n\t\tif (lara.puzzleitems[i])\n\t\t\tinsert_object_into_list(INV_PUZZLE_ITEM1 + i);\n\t}\n\n\tfor (i = 0; i < 16; i++)\n\t{\n\t\tif (lara.puzzleitemscombo & (1 << i))\n\t\t\tinsert_object_into_list(INV_PUZZLE_ITEM1_COMBO1 + i);\n\t}\n\n\tfor (i = 0; i < 8; i++)\n\t{\n\t\tif (lara.keyitems & (1 << i))\n\t\t\tinsert_object_into_list(INV_KEY_ITEM1 + i);\n\t}\n\n\tfor (i = 0; i < 16; i++)\n\t{\n\t\tif (lara.keyitemscombo & (1 << i))\n\t\t\tinsert_object_into_list(INV_KEY_ITEM1_COMBO1 + i);\n\t}\n\n\tfor (i = 0; i < 4; i++)\n\t{\n\t\tif (lara.pickupitems & (1 << i))\n\t\t\tinsert_object_into_list(INV_PICKUP_ITEM1 + i);\n\t}\n\n\tfor (i = 0; i < 8; i++)\n\t{\n\t\tif (lara.pickupitemscombo & (1 << i))\n\t\t\tinsert_object_into_list(INV_PICKUP_ITEM1_COMBO1 + i);\n\t}\n\n\tif (lara.examine1)\n\t\tinsert_object_into_list(INV_EXAMINE1);\n\tif (lara.examine2)\n\t\tinsert_object_into_list(INV_EXAMINE2);\n\tif (lara.examine3)\n\t\tinsert_object_into_list(INV_EXAMINE3);\n\tif (lara.wetcloth == CLOTH_WET)\n\t\tinsert_object_into_list(INV_WET_CLOTH);\n\tif (lara.wetcloth == CLOTH_DRY)\n\t\tinsert_object_into_list(INV_CLOTH);\n\tif (lara.bottle)\n\t\tinsert_object_into_list(INV_BOTTLE);\n\n\tif (Gameflow->LoadSaveEnabled)\n\t{\n\t\tinsert_object_into_list(INV_MEMCARD_LOAD_INV_ITEM);\n\t\tinsert_object_into_list(INV_MEMCARD_SAVE_INV_ITEM);\n\t}\n\n\trings[RING_INVENTORY]->objlistmovement = 0;\n\trings[RING_INVENTORY]->curobjinlist = 0;\n\trings[RING_INVENTORY]->ringactive = TRUE;\n\n\trings[RING_AMMO]->objlistmovement = 0;\n\trings[RING_AMMO]->curobjinlist = 0;\n\trings[RING_AMMO]->ringactive = FALSE;\n\n\thandle_object_changeover(RING_INVENTORY);\n\n\tammo_active = 0;\n}\n\nvoid insert_object_into_list_v2(int num)//3CB90, 3CFE4 (F)\n{\n\tif (options_table[num] & 9)\n\t{\n\t\tif (rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem != num)\n\t\t{\n\t\t\trings[RING_AMMO]->current_object_list[rings[RING_AMMO]->numobjectsinlist].invitem = num;\n\t\t\trings[RING_AMMO]->current_object_list[rings[RING_AMMO]->numobjectsinlist].yrot = 0;\n\t\t\trings[RING_AMMO]->current_object_list[rings[RING_AMMO]->numobjectsinlist++].bright = 32;\n\t\t}\n\t}\n}\n\nvoid construct_combine_object_list()//3C940, 3CD94 (F)\n{\n\tint i;\n\n\trings[RING_AMMO]->numobjectsinlist = 0;\n\tfor (i = 0; i < 100; i++)\n\t{\n\t\trings[RING_AMMO]->current_object_list[i].invitem = -1;\n\t}\n\n\tif (!(gfLevelFlags & GF_LVOP_YOUNG_LARA))\n\t{\n\t\tif (lara.sixshooter_type_carried & WTYPE_PRESENT)\n\t\t{\n\t\t\tif (lara.sixshooter_type_carried & WTYPE_LASERSIGHT)\n\t\t\t\tinsert_object_into_list_v2(INV_REVOLVER_ITEM2);\n\t\t\telse\n\t\t\t\tinsert_object_into_list_v2(INV_REVOLVER_ITEM1);\n\t\t}\n\n\t\tif (lara.hk_type_carried & WTYPE_PRESENT)\n\t\t\tinsert_object_into_list_v2(INV_HK_ITEM1);\n\n\t\tif (lara.crossbow_type_carried & WTYPE_PRESENT && !(gfCurrentLevel >= LVL5_THIRTEENTH_FLOOR && gfCurrentLevel <= LVL5_RED_ALERT))\n\t\t{\n\t\t\tif (lara.crossbow_type_carried & WTYPE_LASERSIGHT)\n\t\t\t\tinsert_object_into_list_v2(INV_CROSSBOW_AMMO2_ITEM2);\n\t\t\telse\n\t\t\t\tinsert_object_into_list_v2(INV_CROSSBOW_AMMO2_ITEM1);\n\t\t}\n\n\t\tif (lara.lasersight)\n\t\t\tinsert_object_into_list_v2(INV_LASERSIGHT_ITEM);\n\n\t\tif (lara.silencer)\n\t\t\tinsert_object_into_list_v2(INV_SILENCER_ITEM);\n\t}\n\n\tfor (i = 0; i < 16; i++)\n\t{\n\t\tif (lara.puzzleitemscombo & (1 << i))\n\t\t\tinsert_object_into_list_v2(INV_PUZZLE_ITEM1_COMBO1 + i);\n\t}\n\n\tfor (i = 0; i < 16; i++)\n\t{\n\t\tif (lara.keyitemscombo & (1 << i))\n\t\t\tinsert_object_into_list_v2(INV_KEY_ITEM1_COMBO1 + i);\n\t}\n\n\tfor (i = 0; i < 8; i++)\n\t{\n\t\tif (lara.pickupitemscombo & (1 << i))\n\t\t\tinsert_object_into_list_v2(INV_PICKUP_ITEM1_COMBO1 + i);\n\t}\n\n\tif (lara.wetcloth == CLOTH_DRY)\n\t\tinsert_object_into_list_v2(INV_CLOTH);\n\tif (lara.bottle)\n\t\tinsert_object_into_list_v2(INV_BOTTLE);\n\n\trings[RING_AMMO]->objlistmovement = 0;\n\trings[RING_AMMO]->curobjinlist = 0;\n\trings[RING_AMMO]->ringactive = FALSE;\n}\n\nint go_and_save_game()//3C920(<), 3CD74(<) (F)\n{\n#if PC_VERSION\n\tUnimpl();\n\treturn 0;\n#else\n\treturn SaveGame();\n#endif\n}\n\nint go_and_load_game()//3C900(<), 3CD54(<) (F)\n{\n#if PC_VERSION\n\tUnimpl();\n\treturn 0;\n#else\n\treturn LoadGame();\n#endif\n}\n\nvoid DrawInventoryItemMe(struct ITEM_INFO* item, long shade, int overlay, int shagflag)//3C6A0(<), 3CAF4(<) (F)\n{\n#if !PC_VERSION\n\tstruct ANIM_STRUCT* anim;\n\tstruct object_info* object;\n\tlong* bone;\n\tshort* rotation1;\n\tshort** meshpp;\n\tshort* frmptr;\n\tlong i;\n\tlong poppush;\n\tunsigned long bit;\n\n\tanim = &anims[item->anim_number];\n\tfrmptr = anim->frame_ptr;\n\tobject = &objects[item->object_number];\n\n\tmPushMatrix();\n\tmTranslateXYZ(item->pos.x_pos, item->pos.y_pos, item->pos.z_pos);\n\tmRotYXZ(item->pos.y_rot, item->pos.x_rot, item->pos.z_rot);\n\t\n\tif (item->object_number == PUZZLE_HOLE8 && GLOBAL_invkeypadmode)\n\t{\n#if PC_VERSION\n\t\tScaleCurrentMatrix({ 24576, 16384, 4096 });\n#else\n\t\tScaleCurrentMatrix(1, 6144, 4096, 4096);\n#endif\n\t}//loc_3C770\n\n\tbit = 1;\n\n\tmeshpp = &meshes[object->mesh_index];\n\tbone = &bones[object->bone_index];\n\n\tif (!shagflag)\n\t{\n\t\tmTranslateXYZ(frmptr[6], frmptr[7], frmptr[8]);\n\t}\n\n\t//loc_3C7B0\n\trotation1 = &frmptr[9];\n\tmRotSuperPackedYXZ(&rotation1, 0);\n\n\tif ((item->mesh_bits & 1))\n\t{\n\t\tif (overlay)\n\t\t{\n\t\t\tphd_PutPolygons_pickup(meshpp[0], 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//loc_3C7F8\n\t\t\tphd_PutPolygons_seethrough(meshpp[0], shade);\n\t\t}\n\t}\n\n\t//loc_3C804\n\tmeshpp += 2;\n\n\t//loc_3C81C\n\tfor (i = 0; i < object->nmeshes - 1; i++, bone += 4, meshpp += 2)\n\t{\n\t\tpoppush = *bone;\n\n\t\tif ((poppush & 1))\n\t\t{\n\t\t\tmPopMatrix();\n\t\t}//loc_3C83C\n\n\t\tif ((poppush & 2))\n\t\t{\n\t\t\tmPushMatrix();\n\t\t}//loc_3C84C\n\n\t\tmTranslateXYZ(bone[1], bone[2], bone[3]);\n\t\tbit <<= 1;\n\n\t\tmRotSuperPackedYXZ(&rotation1, 0);\n\t\tif ((bit & item->mesh_bits))\n\t\t{\n\t\t\tif (overlay)\n\t\t\t{\n\t\t\t\tphd_PutPolygons_pickup(meshpp[0], 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//loc_3C89C\n\t\t\t\tphd_PutPolygons_seethrough(meshpp[0], shade);\n\t\t\t}\n\t\t}\n\t\t//loc_3C8A8\n\t}\n\n\t//loc_3C8C8\n\tmPopMatrix();\n#endif\n}\n\nvoid DrawThreeDeeObject2D(int x, int y, int num, int shade, int xrot, int yrot, int zrot, int bright, int overlay)//3C43C(<), 3C890(<) (F)\n{\n\n\tstruct ITEM_INFO item;\n\tstruct INVOBJ* objme;\n\n\tobjme = &inventry_objects_list[num];\n\n\titem.pos.x_rot = objme->xrot + xrot;\n\titem.pos.y_rot = objme->yrot + yrot;\n\titem.pos.z_rot = objme->zrot + zrot;\n\titem.object_number = objme->object_number;\n\n\tphd_LookAt(0, 1024, 0, 0, 0, 0, 0);\n#if PC_VERSION\n\tphd_QuickW2VMatrix({ 0, 1024, 0 }, { 100, 0, 200 }, 0);\n#else\n\tmQuickW2VMatrix();\n#endif\n\n#if PSXENGINE\n\tif (bright == 0)\n\t{\n\t\tSetInventoryLighting(0x505050, 0x202020, 0x404040, 0x808080);\n\t}\n\telse if (bright == 1)\n\t{\n\t\tSetInventoryLighting(0x323232, 0x101010, 0x303030, 0x303030);\n\t}\n\telse\n\t{\n\t\t//loc_3C550\n\t\tSetInventoryLighting(0x323232, 0x101010, 0x303030, (bright << 16) | (bright << 8) | bright);\n\t}\n#endif\n\n#if PC_VERSION\n\tSetD3DViewMatrix();\n\tphd_PushUnitMatrix();\n\tphd_TranslateRel(0, 0, objme->scale1);\n#else\n\t//loc_3C578\n\tmPushUnitMatrix();\n\tMatrix->m10 -= (Matrix->m10 >> 2);\n\tMatrix->m11 -= (Matrix->m11 >> 2);\n\tMatrix->m12 -= (Matrix->m12 >> 2);\n\tmLoadMatrix(Matrix);\n\tmSetTrans(0, 0, objme->scale1);\n\n\titem.shade = -1;\n\titem.pos.x_pos = 0;\n\titem.pos.y_pos = 0;\n\titem.pos.z_pos = 0;\n\titem.room_number = 0;\n\titem.il.Light[3].pad = 0;\n#endif\n\titem.mesh_bits = objme->meshbits;\n\titem.anim_number = objects[item.object_number].anim_index;\n\n#if PSXENGINE\n\tSetGeomOffset(x, y + objme->yoff);\n#endif\n\n\tif (!(objme->flags & 8))\n\t{\n\t\tDrawInventoryItemMe(&item, shade, overlay, 0);\n\t}\n\telse\n\t{\n\t\t//loc_3C658\n\t\tDrawInventoryItemMe(&item, shade, overlay, 1);\n\t}\n\n\tmPopMatrix();\n#if PC_VERSION\n\tUNIMPLEMENTED();\n\t//dword_E598A0 = phd_centerx;\n\t//dword_E5990C = phd_centery;\n#else\n\tSetGeomOffset(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);\n#endif\n}\n\nvoid do_debounced_joystick_poo()//3C224(<), 3C678(<) (F)\n{\n\tgo_left = 0;\n\tgo_right = 0;\n\tgo_up = 0;\n\tgo_down = 0;\n\tgo_select = 0;\n\tgo_deselect = 0;\n\n\tif ((input & IN_LEFT))\n\t{\n\t\tif (left_repeat < 8)\n\t\t{\n\t\t\tleft_repeat++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgo_left = 1;\n\t\t}\n\n\t\t//loc_3C278\n\t\tif (left_debounce == 0)\n\t\t{\n\t\t\tgo_left = 1;\n\t\t}\n\n\t\t//loc_3C290\n\t\tleft_debounce = 1;\n\t}\n\telse\n\t{\n\t\t//loc_3C29C\n\t\tleft_debounce = 0;\n\t\tleft_repeat = 0;\n\t}\n\t//loc_3C2A4\n\tif ((input & IN_RIGHT))\n\t{\n\t\tif (right_repeat < 8)\n\t\t{\n\t\t\tright_repeat++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//loc_3C2DC\n\t\t\tgo_right = 1;\n\t\t}\n\n\t\t//loc_3C2E4\n\t\tif (right_debounce == 0)\n\t\t{\n\t\t\tgo_right = 1;\n\t\t}\n\t\t//loc_3C2FC\n\t\tright_debounce = 1;\n\t}\n\telse\n\t{\n\t\t//loc_3C308\n\t\tright_debounce = 0;\n\t\tright_repeat = 0;\n\t}\n\n\t//loc_3C310\n\tif ((input & IN_FORWARD))\n\t{\n\t\tif (up_debounce == 0)\n\t\t{\n\t\t\tgo_up = 1;\n\t\t}\n\t\t//loc_3C340\n\t\tup_debounce = 1;\n\t}\n\telse\n\t{\n\t\t//loc_3C34C\n\t\tup_debounce = 0;\n\t}\n\n\tif ((input & IN_BACK))\n\t{\n\t\tif (down_debounce == 0)\n\t\t{\n\t\t\tgo_down = 1;\n\t\t}\n\n\t\t//loc_3C380\n\t\tdown_debounce = 1;\n\t}\n\telse\n\t{\n\t\t//loc_3C38C\n\t\tdown_debounce = 0;\n\t}\n\n\t//loc_3C390\n#if PC_VERSION\n\tif (input & IN_ACTION || input & IN_SELECT)\n#else\n\tif (input & IN_SELECT)\n#endif\n\t{\n\t\tselect_debounce = 1;\n\t}\n\telse\n\t{\n\t\t//loc_3C3B4\n\t\tif (select_debounce == 1 && friggrimmer == 0)\n\t\t{\n\t\t\tgo_select = 1;\n\t\t}\n\t\t//loc_3C3D8\n\t\tselect_debounce = 0;\n\t\tfriggrimmer = 0;\n\t}\n\t//loc_3C3E0\n\tif ((input & IN_DESELECT))\n\t{\n\t\tdeselect_debounce = 1;\n\t}\n\telse\n\t{\n\t\t//loc_3C408\n\t\tif (deselect_debounce == 1 && friggrimmer2 == 0)\n\t\t{\n\t\t\tgo_deselect = 1;\n\t\t}\n\t\t//loc_3C42C\n\t\tdeselect_debounce = 0;\n\t\tfriggrimmer2 = 0;\n\t}\n}\n\nvoid init_new_inventry()//3C024, 3C478 (F)\n{\n\texamine_mode = 0;\n\tstats_mode = 0;\n\n#if PSX_VERSION\n\tAlterFOV(0x3FFC);\n#else\n\tAlterFOV(ANGLE(80));\n#endif\n\tlara.Busy = 0;\n\n\tGLOBAL_inventoryitemchosen = -1;\n\n\tleft_debounce = 0;\n\tright_debounce = 0;\n\tup_debounce = 0;\n\tdown_debounce = 0;\n\n\tgo_left = 0;\n\tgo_right = 0;\n\tgo_up = 0;\n\tgo_down = 0;\n\n\tselect_debounce = 0;\n\tdeselect_debounce = 0;\n\n\tgo_select = 0;\n\tgo_deselect = 0;\n\n\tleft_repeat = 0;\n\tright_repeat = 0;\n\n\tloading_or_saving = 0;\n\tuse_the_bitch = 0;\n\n\tif (lara.num_shotgun_ammo1 == -1)\n\t\tAmountShotGunAmmo1 = -1;\n\telse\n\t\tAmountShotGunAmmo1 = lara.num_shotgun_ammo1 / 6;\n\n\tif (lara.num_shotgun_ammo2 == -1)\n\t\tAmountShotGunAmmo2 = -1;\n\telse\n\t\tAmountShotGunAmmo2 = lara.num_shotgun_ammo2 / 6;\n\n\tAmountHKAmmo1 = lara.num_hk_ammo1;\n\tAmountCrossBowAmmo1 = lara.num_crossbow_ammo1;\n\tAmountCrossBowAmmo2 = lara.num_crossbow_ammo2;\n\tAmountUziAmmo = lara.num_uzi_ammo;\n\tAmountRevolverAmmo = lara.num_revolver_ammo;\n\tAmountPistolsAmmo = lara.num_pistols_ammo;\n\n\tconstruct_object_list();\n\n\tif (GLOBAL_enterinventory == -1)\n\t{\n\t\tif (GLOBAL_lastinvitem != -1)\n\t\t{\n\t\t\tif (have_i_got_item(GLOBAL_lastinvitem))\n\t\t\t\tsetup_objectlist_startposition(GLOBAL_lastinvitem);\n\n\t\t\tGLOBAL_lastinvitem = -1;\n\t\t}\n\t}\n\telse if (GLOBAL_enterinventory == 0xDEADBEEF)\n\t{\n\t\tGLOBAL_invkeypadmode = 1;\n\t\tinit_keypad_mode();\n\t\tGLOBAL_enterinventory = -1;\n\t}\n\telse\n\t{\n\t\tif (have_i_got_object(GLOBAL_enterinventory))\n\t\t\tsetup_objectlist_startposition2(GLOBAL_enterinventory);\n\n\t\tGLOBAL_enterinventory = -1;\n\t}\n\n\tammo_selector_fade_val = 0;\n\tammo_selector_fade_dir = 0;\n\n\tcombine_ring_fade_val = 0;\n\tcombine_ring_fade_dir = 0;\n\n\tcombine_type_flag = 0;\n\tseperate_type_flag = 0;\n\n\tcombine_obj1 = 0;\n\tcombine_obj2 = 0;\n\n\tnormal_ring_fade_val = 128;\n\tnormal_ring_fade_dir = 0;\n\n\thandle_object_changeover(RING_INVENTORY);\n}\n\nint S_CallInventory2()//3B7A8, 3BC04\n{\n#if PSX_VERSION || PSXPC_VERSION\n\tshort flag;\n\tint return_value;\n\tint val;\n\tshort room_number;\n\tstruct ITEM_INFO* item;\n\n\tflag = 0;\n\n\tif (gfCurrentLevel - 4 < 4)\n\t{\n\t\tinventry_objects_list[3].objname = STR_DESERTEAGLE;\n\t\tinventry_objects_list[4].objname = STR_DESERTEAGLE_LASERSIGHT;\n\t\tinventry_objects_list[17].objname = STR_DESERTEAGLE_AMMO;\n\t}\n\telse\n\t{\n\t\t//loc_3B7FC\n\t\tinventry_objects_list[3].objname = STR_REVOLVER;\n\t\tinventry_objects_list[4].objname = STR_REVOLVER_LASERSIGHT;\n\t\tinventry_objects_list[17].objname = STR_REVOLVER_AMMO;\n\t}\n\n\tif ((unsigned)gfCurrentLevel - 0xB < 4)\n\t{\n\t\tinventry_objects_list[24].objname = STR_HEADSET;\n\t}\n\telse\n\t{\n\t\tinventry_objects_list[24].objname = STR_BINOCULARS;\n\t}\n\n\t//loc_3B848\n\t_bullshitbollox = 0;\n\n\tif (lara.gun_status == 1)\n\t{\n\t\t_bullshitbollox = 1;\n\t}\n\n\t//loc_3B870\n\tbullshitbollox = 1;\n\n\tSOUND_Stop();\n\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\tS_SetReverbType(1);\n\tfriggrimmer = 0;\n\toldLaraBusy = lara.Busy;\n\n\tif ((input & IN_SELECT))\n\t{\n\t\tfriggrimmer = 1;\n\t}\n\n\t//loc_3B8C4\n\tMotors[1] = 0;\n\tMotors[0] = 0;\n\n\tif (Gameflow->LoadSaveEnabled)\n\t{\n\t\tmcOpen(0);\n\t}\n\t//loc_3B900\n\tXAFadeRate = 32;\n\tXAReqVolume = 0;\n\n#if DEBUG_VERSION\n\tProfileDraw = 0;\n#endif\n\n#if !PSXPC_TEST //Infinite loop on PSXPC_N\n\twhile (XAVolume != 0)\n\t{\n\t\t//loc_3B928\n\t\tXAReqVolume = 0;\n\t}//loc_3B944\n#endif\n\n\tS_CDPause();\n\tDrawSync(0);\n\n\tClearOTagR(db.order_table[0], db.nOTSize);\n\treturn_value = 0;\n\tClearOTagR(db.order_table[1], db.nOTSize);\n\trings[RING_INVENTORY] = (struct RINGME*)&GadwPolygonBuffers[51748];\n\trings[RING_AMMO] = (struct RINGME*)&GadwPolygonBuffers[51236];\n\tMGSaveGamePtr = (char*)&GadwPolygonBuffers[49188];\n\n\tinit_new_inventry();\n\tcamera.number_frames = 2;\n\n\t//v0 = 0x80\n\tif (!reset_flag)\n\t{\n\t\t//loc_3B9BC\n\t\twhile (!reset_flag)\n\t\t{\n\t\t\tOBJLIST_SPACING = 128;\n\n\t\t\tXAReqVolume = 0;\n\t\t\tGPU_BeginScene();\n\t\t\tSetDebounce = 1;\n\t\t\tS_UpdateInput();\n\t\t\tprintf("Input Normal: %x\\n", input);\n\t\t\tinput = inputBusy;\n\t\t\tUpdatePulseColour();\n\t\t\tprintf("Input Busy: %x\\n", input);\n\t\t\tGameTimer++;\n\n\t\t\tif (!ammo_active && !rings[1]->ringactive && go_deselect)\n\t\t\t{\n\t\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\t}//loc_3BA54\n\n\t\t\tif ((dbinput & IN_OPTION))\n\t\t\t{\n\t\t\t\tSoundEffect(SFX_MENU_SELECT, NULL, SFX_ALWAYS);\n\t\t\t\tflag = 1;\n\t\t\t}//loc_3BA7C\n\n\t\t\tif (!PadConnected)\n\t\t\t{\n\t\t\t\tPrintString(SCREEN_WIDTH / 2, 232, 3, &gfStringWad[gfStringOffset[STR_CONTROLLER_REMOVED]], (FF_CENTER | FF_BLINK));\n\t\t\t\tinput = 0;\n\t\t\t\tleft_debounce = 0;\n\t\t\t\tright_debounce = 0;\n\t\t\t\tup_debounce = 0;\n\t\t\t\tdown_debounce = 0;\n\t\t\t\tgo_left = 0;\n\t\t\t\tgo_right = 0;\n\t\t\t\tgo_up = 0;\n\t\t\t\tgo_down = 0;\n\t\t\t\tselect_debounce = 0;\n\t\t\t\tdeselect_debounce = 0;\n\t\t\t\tgo_select = 0;\n\t\t\t\tgo_deselect = 0;\n\t\t\t\tleft_repeat = 0;\n\t\t\t\tright_repeat = 0;\n\t\t\t}\n\t\t\t//loc_3BAFC\n\t\t\tInitObjGTE();\n\t\t\tdo_debounced_joystick_poo();\n\t\t\tdraw_outlines();\n\n\t\t\tif (rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem == INV_SMALLMEDI_ITEM &&\n\t\t\t\t(RawPad & (IN_DPAD_UP | IN_R1 | IN_L2 | IN_R2 | IN_L1)))\n\t\t\t{\n\t\t\t\tdels_give_lara_guns_cheat();\n\t\t\t}\n\t\t\t//loc_3BB64\n\t\t\tif (rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem == INV_BIGMEDI_ITEM &&\n\t\t\t\tRawPad & (IN_DPAD_DOWN | IN_L2 | IN_R2 | IN_L1 | IN_R1))\n\t\t\t{\n\t\t\t\tdels_give_lara_items_cheat();\n\t\t\t}//loc_3BBB4\n\n\t\t\tif (GLOBAL_invkeypadmode)\n\t\t\t{\n\t\t\t\tdo_keypad_mode();\n\t\t\t}\n\t\t\telse if (examine_mode)\n\t\t\t{\n\t\t\t\t//loc_3BC3C\n\t\t\t\tdo_examine_mode();\n\n\t\t\t\tif (stats_mode)\n\t\t\t\t{\n\t\t\t\t\tdo_stats_mode();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (stats_mode)\n\t\t\t{\n\t\t\t\t//loc_3BC54\n\t\t\t\tdo_stats_mode();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdraw_current_object_list(0);\n\t\t\t\thandle_inventry_menu();\n\t\t\t\tif (rings[RING_AMMO]->ringactive)\n\t\t\t\t{\n\t\t\t\t\tdraw_current_object_list(1);\n\t\t\t\t}\n\t\t\t\t//loc_3BC24\n\t\t\t\tdraw_ammo_selector();\n\t\t\t\tfade_ammo_selector();\n\t\t\t}\n\n#if PSXENGINE\n\t\t\t//loc_3BC5C\n\t\t\tif (PadConnected)\n\t\t\t{\n\t\t\t\tdo_playstation_button_prompts_v1();\n\t\t\t}\n\t\t\t//loc_3BC78\n#endif\n\n\t\t\tif (use_the_bitch && !input)\n\t\t\t{\n\t\t\t\tflag = 1;\n\t\t\t}//loc_3BC9C\n\n\t\t\tif (!(input & IN_SELECT))\n\t\t\t{\n\t\t\t\tbullshitbollox = 0;\n\t\t\t}\n\n\t\t\t//loc_3BCAC\n\t\t\tif (use_the_bitch && rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem - 0x16 < 2\n\t\t\t\t&& !bullshitbollox && _bullshitbollox)\n\t\t\t{\n\t\t\t\tflag = 1;\n\t\t\t}\n\t\t\t//loc_3BD18\n\t\t\tGPU_EndScene();\n\t\t\tcamera.number_frames = S_DumpScreen();\n\n\t\t\tif (loading_or_saving)\n\t\t\t{\n\t\t\t\t//loc_3BD3C\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tGPU_BeginScene();\n\t\t\t\t\tval = 0;\n\t\t\t\t\tSetDebounce = 1;\n\t\t\t\t\tS_UpdateInput();\n\t\t\t\t\tinput = inputBusy;\n\t\t\t\t\tUpdatePulseColour();\n\t\t\t\t\tdraw_outlines();\n\n\t\t\t\t\tif (!PadConnected)\n\t\t\t\t\t{\n\t\t\t\t\t\tPrintString(SCREEN_WIDTH / 2, 64, 3, &gfStringWad[gfStringOffset[STR_CONTROLLER_REMOVED]], (FF_CENTER | FF_BLINK));\n\t\t\t\t\t}//loc_3BDB4\n\n\t\t\t\t\tif (loading_or_saving == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tval = go_and_load_game();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//loc_3BDD4\n\t\t\t\t\t\tif (go_and_save_game())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tval = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//loc_3BDE8\n\t\t\t\t\tGPU_EndScene();\n\t\t\t\t\tS_DumpScreen();\n\n\t\t\t\t} while (val == 0);\n\n\t\t\t\t//v0 = 1\n\t\t\t\tif (val == 1 && loading_or_saving == val)\n\t\t\t\t{\n\t\t\t\t\treturn_value = 1;\n\t\t\t\t\tflag = 1;\n\t\t\t\t}\n\t\t\t\t//loc_3BE20\n\t\t\t\tfriggrimmer2 = 1;\n\t\t\t\tfriggrimmer = 1;\n\t\t\t\tdeselect_debounce = 0;\n\t\t\t\tgo_deselect = 0;\n\t\t\t\tloading_or_saving = 0;\n\t\t\t}\n\t\t\t//loc_3BE34\n\t\t\tif (flag)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t//loc_3BE50\n\tInitialisePickUpDisplay();\n\tGLOBAL_lastinvitem = rings[RING_INVENTORY]->current_object_list[rings[RING_INVENTORY]->curobjinlist].invitem;\n\tupdate_laras_weapons_status();\n\n\tif (use_the_bitch && GLOBAL_invkeypadmode == 0)\n\t{\n\t\tuse_current_item();\n\t}\n\t//loc_3BEB4\n\n\tXAFadeRate = 8;\n\tXAReqVolume = XAMasterVolume;\n\tS_CDRestart();\n\n\tif (Gameflow->LoadSaveEnabled)\n\t{\n\t\tmcClose();\n\t}\n\n#if DEBUG_VERSION\n\tProfileDraw = 1;\n#endif\n\tlara.Busy - oldLaraBusy;\n\n\tif (GLOBAL_invkeypadmode)\n\t{\n\t\tGLOBAL_invkeypadmode = 0;\n\n\t\tif (keypadnuminputs == 4)\n\t\t{\n\t\t\tval = ((((keypadinputs[0] << 5) - keypadinputs[0]) << 2) + keypadinputs[0]) << 3;\n\t\t\tval += ((((keypadinputs[1] << 1) + keypadinputs[1]) << 3) + keypadinputs[1]) << 2;\n\t\t\tval += ((keypadinputs[2] << 2) + keypadinputs[2]) << 1;\n\t\t\tval += keypadinputs[3];\n\t\t}//loc_3BFA0\n\n\t\tif (GLOBAL_invkeypadcombination == 0)\n\t\t{\n\t\t\titem = lara_item;\n\t\t\troom_number = item->room_number;\n\t\t\tGetHeight(GetFloor(item->pos.x_pos, item->pos.y_pos, item->pos.z_pos, &room_number), item->pos.x_pos, item->pos.y_pos, item->pos.z_pos);\n\t\t\tTestTriggers(trigger_index, 1, 0);\n\t\t}//loc_3C004\n\t}//loc_3C000\n\n\treturn return_value;\n#else\n\treturn -1;\n#endif\n}', 'message': '[Game] use enum constants\n', 'author_name': 'Tom', 'lang': 'C'}