#ifndef TOMB4DISCOVERY_H_INCLUDED
#define TOMB4DISCOVERY_H_INCLUDED

/* discovered by JMN */
typedef void(__cdecl *TYPE_DoFlareInHand) (int flare_age);
typedef void(__cdecl *TYPE_S_DisplayMonoScreen) ();
typedef void(__cdecl *TYPE_phd_LookAt) (int srcX, int srcY, int srcZ, int destX, int destY, int destZ, short roll);
typedef void(__cdecl *TYPE_phd_GetVectorAngles) (int distX, int distY, int distZ, short* dest);
typedef void(__cdecl *TYPE_phd_GenerateW2V) (PHD_3DPOS* viewpos);
typedef void(__cdecl *TYPE_phd_TranslateRel) (int x, int y, int z);
typedef void(__cdecl *TYPE_phd_pushUnitMatrix) ();
typedef void(__cdecl *TYPE_AddFootprint) (ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_phd_RotX) (WORD Orient);
typedef void(__cdecl *TYPE_phd_RotZ) (WORD Orient);
typedef void(__cdecl *TYPE_phd_RotYXZpack) (int rot);
typedef void(__cdecl *TYPE_gar_RotYXZsuperpack) (short **pprot, int skip);
typedef void(__cdecl *TYPE_DrawGameInfo) (int timed);
typedef void(__cdecl *TYPE_DrawPickups) (int timed);
typedef void(__cdecl *TYPE_InitialisePickUpDisplay) ();
typedef void(__cdecl *TYPE_S_DrawPickup) (int slot);
typedef void(__cdecl *TYPE_phd_PutPolygons) (StrMeshTr4 *mesh, int clip);
typedef void(__cdecl *TYPE_phd_PutPolygonsInv) (StrMeshTr4 *mesh, int clip);
typedef void(__cdecl *TYPE_S_PrintShadow) (short size, short *pFrame, ITEM_INFO *pItem, int unknown);
typedef void(__cdecl *TYPE_DrawRooms) (short currentRoom);
typedef void(__cdecl *TYPE_DrawAnimatingItem) (ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_CalculateObjectLighting) (ITEM_INFO *pItem, short *pFrame);
typedef void(__cdecl *TYPE_CalculateObjectLightingLara) ();
typedef int(__cdecl *TYPE_GetLaraJointPos) (PHD_VECTOR *pPos, int joint);
typedef void(__cdecl *TYPE_UpdateTextPulse) ();
typedef void(__cdecl *TYPE_use_current_item) ();
typedef int(__cdecl *TYPE_ShowSaveScreen) (int loading_or_saving, bool clear_screen);
typedef void(__cdecl *TYPE_DoStatScreen) ();
typedef void(__cdecl *TYPE_DoOptions) ();
typedef void(__cdecl *TYPE_S_PauseMenu) ();
typedef void(__cdecl *TYPE_InitWaterTable) ();
typedef void(__cdecl *TYPE_AnimateLara) (ITEM_INFO *pLara);
typedef void(__cdecl *TYPE_DrawLara) (ITEM_INFO *pLara, int unknown);
typedef void(__cdecl *TYPE_PlayLevel) (int level_index, int audio_index);
typedef void(__cdecl *TYPE_ShowInventory) ();

/* discovered by AODfan */
typedef int(__cdecl* TYPE_phd_atan) (int x, int y);
typedef void(__cdecl* TYPE_AlertAllGuards) (short ItemIndex);
typedef void(__cdecl* TYPE_CreatureTilt) (ITEM_INFO *item, short angle);
typedef void(__cdecl* TYPE_CreatureJoint) (ITEM_INFO *item, short joint, short required);
typedef int(__cdecl* TYPE_CreatureAnimation) (short ItemIndex, short angle, short tilt);
typedef short(__cdecl* TYPE_CreatureTurn) (ITEM_INFO *item, short maximum_turn);
typedef void(__cdecl* TYPE_CreatureUnderwater) (ITEM_INFO *item, int depth);
typedef void(__cdecl* TYPE_CreatureFloat) (short ItemIndex);
typedef int(__cdecl* TYPE_ValidBox) (ITEM_INFO *item, short zone_number, short box_number);
typedef int(__cdecl* TYPE_EscapeBox) (ITEM_INFO *item, ITEM_INFO *enemy, short box_number);
typedef void(__cdecl* TYPE_InitialiseCreature) (short ItemIndex);
typedef int(__cdecl* TYPE_CreatureVault) (short ItemIndex, short angle, int vault, int shift);
typedef void(__cdecl* TYPE_AlertNearbyGuards) (ITEM_INFO *item);
typedef short(__cdecl* TYPE_CreateEffect) (short room_num);
typedef short(__cdecl* TYPE_GunHit) (int x, int y, int z, short speed, short yrot, short room_number);
typedef short(__cdecl* TYPE_GunMiss) (int x, int y, int z, short speed, short yrot, short room_number);

/* discovered by ChocolateFan */
typedef void(__cdecl *TYPE_SeedRandomControl)(int seed);
typedef void(__cdecl *TYPE_S_DrawHealthBar)(int Percentuale);
typedef void(__cdecl *TYPE_SayNo)(void);
typedef void(__cdecl *TYPE_TriggerBlood)(int x, int y, int z, int direction, int speed);
typedef void(__cdecl *TYPE_SeedRandomDraw)(int seed);
typedef void(__cdecl *TYPE_RemoveDrawnItem)(short ItemIndex);
typedef int(__cdecl *TYPE_ExplodeFX)(StrEffettoTr4 *fx, int NoXZVel, int bits);
typedef void(__cdecl *TYPE_TriggerUnderwaterBlood)(int x, int y, int z, int sizeme);
typedef void(__cdecl *TYPE_S_DrawDashBar)(int Percentuale);
typedef void(__cdecl *TYPE_S_DrawAirBar)(int Percentuale);
typedef void(__cdecl *TYPE_S_DrawLoadBar)(void);
typedef int(__cdecl *TYPE_GetFreeBubble)(void);
typedef void(__cdecl *TYPE_CreateFlare)(short Slot, int thrown);
typedef int(__cdecl *TYPE_GetFreeBlood)(void);
typedef int(__cdecl *TYPE_GetFreeDrip)(void);
typedef void(__cdecl *TYPE_TriggerLaraDrips)(void);
typedef void(__cdecl *TYPE_LaraBubbles)(ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_ChaseCamera)(ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_CombatCamera)(ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_LookCamera)(ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_FixedCamera)(void);
typedef void(__cdecl *TYPE_CalculateCamera)(void);
typedef void(__cdecl *TYPE_BinocularCamera)(ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_ObjectCollision)(short ItemIndex, ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef void(__cdecl *TYPE_DrawHair)(void);
typedef void(__cdecl *TYPE_DrawGunflashes)(void);
typedef void(__cdecl *TYPE_EffectNewRoom)(short fx_num, short room_number);
typedef void(__cdecl *TYPE_DrawFlareInAir)(ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_draw_flare_meshes)(void);
typedef void(__cdecl *TYPE_undraw_flare_meshes)(void);
typedef void(__cdecl *TYPE_ready_flare)(void);
typedef void(__cdecl *TYPE_FlareControl)(short ItemIndex);
typedef void(__cdecl *TYPE_InitialiseItemArray)(int numitems);
typedef void(__cdecl *TYPE_InitialiseFXArray)(int allocmem);
typedef void(__cdecl *TYPE_InitialiseHair)(void);
typedef void(__cdecl *TYPE_DrawGunshells)(void);
typedef void(__cdecl *TYPE_InitialiseFunctionTable)(void);
typedef void(__cdecl *TYPE_DoGameflow)(void);
typedef void(__cdecl *TYPE_GameClose)(void);
typedef void(__cdecl *TYPE_do_boot_screen)(int language);
typedef void(__cdecl *TYPE_PrintObjects)(short current_room);
typedef void(__cdecl *TYPE_DrawLaserSightSprite)(void);
typedef void(__cdecl *TYPE_SetUpLensFlare)(int x, int y, int z, GAME_VECTOR *bulb);
typedef void(__cdecl *TYPE_DrawLensFlares)(ITEM_INFO *pItem);
typedef void(__cdecl *TYPE_DoWeather)(void);
typedef void(__cdecl *TYPE_DoUwEffect)(void);
typedef void(__cdecl *TYPE_DrawBubbles)(void);
typedef void(__cdecl *TYPE_S_DrawSplashes)(void);
typedef void(__cdecl *TYPE_DrawDebris)(void);
typedef void(__cdecl *TYPE_DrawBlood)(void);
typedef void(__cdecl *TYPE_DrawDrips)(void);
typedef void(__cdecl *TYPE_DrawShockwaves)(void);
typedef void(__cdecl *TYPE_DrawLightning)(void);
typedef int(__cdecl *TYPE_FlashIt)(void);
typedef void(__cdecl *TYPE_TriggerTorchFlame)(short ItemIndex, int Node);
typedef void(__cdecl *TYPE_DrawHealthBar)(int flash_state);
typedef void(__cdecl *TYPE_DrawAirBar)(int flash_state);
typedef void(__cdecl *TYPE_SetLaraUnderwaterNodes)(void);
typedef void(__cdecl *TYPE_S_AnimateTextures)(int nFrames);
typedef void(__cdecl *TYPE_CalcLaraMatrices)(int flag);
typedef int(__cdecl *TYPE_DrawPhaseGame)(void);
typedef void(__cdecl *TYPE_RegeneratePickups)(void);
typedef void(__cdecl *TYPE_UpdateBubbles)(void);
typedef void(__cdecl *TYPE_UpdateSplashes)(void);
typedef void(__cdecl *TYPE_UpdateDebris)(void);
typedef void(__cdecl *TYPE_UpdateBlood)(void);
typedef void(__cdecl *TYPE_UpdateDrips)(void);
typedef void(__cdecl *TYPE_UpdateGunShells)(void);
typedef void(__cdecl *TYPE_UpdateShockwaves)(void);
typedef void(__cdecl *TYPE_UpdateLightning)(void);
typedef void(__cdecl *TYPE_AnimateWaterfalls)(void);
typedef void(__cdecl *TYPE_UpdateBeetles)(void);
typedef void(__cdecl *TYPE_UpdateFish)(void);
typedef void(__cdecl *TYPE_DrawFish)(void);
typedef void(__cdecl *TYPE_DrawBeetles)(void);
typedef void(__cdecl *TYPE_UpdateSky)(void);
typedef void(__cdecl *TYPE_ControlTriggerTriggerer)(short ItemIndex);
typedef void(__cdecl *TYPE_TestTriggersAtXYZ)(int x, int y, int z, short room_number, int heavy, int flags);
typedef void(__cdecl *TYPE_remove_inventory_item)(short Slot);
typedef void(__cdecl *TYPE_DEL_picked_up_object)(short Slot);
typedef void(__cdecl *TYPE_LavaBurn)(ITEM_INFO *pItem);
typedef short(__cdecl *TYPE_GetDoor)(Tipo_CollGridTr4 *floor);
typedef void(__cdecl *TYPE_PickUpCollision)(short ItemIndex, ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef void(__cdecl *TYPE_InitialiseObjects)(void);
typedef void(__cdecl *TYPE_BaddyObjects)(void);
typedef void(__cdecl *TYPE_ObjectObjects)(void);
typedef void(__cdecl *TYPE_TrapObjects)(void);
typedef void(__cdecl *TYPE_InitialiseEffects)(void);
typedef int(__cdecl* TYPE_TargetVisible)(ITEM_INFO* item, AI_INFO* info);
typedef void(__cdecl* TYPE_FindAITargetObject)(CREATURE_INFO* creature, short obj_num);

/* discovered by TokyoSU */
typedef void(__cdecl* TYPE_LaraTargetInfo)(WEAPON_INFO* winfo);
typedef void(__cdecl* TYPE_LaraGetNewTarget)(WEAPON_INFO* winfo);
typedef void(__cdecl* TYPE_AimWeapon)(WEAPON_INFO* winfo, LARA_ARM* arm);
typedef int(__cdecl* TYPE_FireWeapon)(int weapon_type, ITEM_INFO* target, ITEM_INFO* lara, short angle[2]);
typedef void(__cdecl* TYPE_TriggerGunShell)(int left_or_right, short slot, int weapon_type);
typedef void(__cdecl* TYPE_TriggerDynamic_Mirror)(int OrgX, int OrgY, int OrgZ, int Intensity, BYTE Red, BYTE Green, BYTE Blue);
typedef void(__cdecl* TYPE_set_arm_info)(LARA_ARM* arm, short frame);
typedef void(__cdecl* TYPE_AnimatePistols)(int weapon_type);
typedef void(__cdecl* TYPE_AnimateShotgun)(int weapon_type);
typedef void(__cdecl* TYPE_CreatureAIInfo)(ITEM_INFO* item, AI_INFO* ai_info);
typedef int(__cdecl* TYPE_UpdateLOT)(LOT* LOT, int expansion);
typedef void(__cdecl* TYPE_GetCreatureMood)(ITEM_INFO* item, AI_INFO* AI, int violent);
typedef void(__cdecl* TYPE_CreatureMood)(ITEM_INFO* item, AI_INFO* AI, int violent);
typedef int(__cdecl* TYPE_CreatureCreature)(short ItemIndex);
typedef int(__cdecl* TYPE_BadFloor)(DWORD CordX, int CordY, DWORD CordZ, int BoxHeight, int NextHeight, short RoomIndex, LOT* LOT);
typedef short(__cdecl* TYPE_CreatureEffect)(ITEM_INFO* item, BITE_INFO* bite, short(__cdecl* process)(int, int, int, short, short, short));
typedef short(__cdecl* TYPE_CreatureEffectT)(ITEM_INFO* item, BITE_INFO* bite, short speed, short y_rot, short(__cdecl* process)(int, int, int, short, short, short));
typedef void(__cdecl* TYPE_CreatureKill)(ITEM_INFO* item, int kill_anim, int kill_state, int lara_kill_state);
typedef void(__cdecl* TYPE_CreatureCollision)(short ItemIndex, ITEM_INFO* pLara, COLL_INFO* pCollLara);
typedef short(__cdecl* TYPE_AIGuard)(CREATURE_INFO* creature);
typedef void(__cdecl* TYPE_GetAITarget)(CREATURE_INFO* creature);
typedef BOOL(__cdecl* TYPE_ExplodingDeath)(short ItemIndex, signed long MeshBits, short damage);
typedef void(__cdecl* TYPE_ClearLOT)(LOT* LOT);
typedef void(__cdecl* TYPE_CreateZone)(ITEM_INFO* item);
typedef int(__cdecl* TYPE_Targetable)(ITEM_INFO* item, AI_INFO* info);
typedef int(__cdecl* TYPE_ShotLara)(ITEM_INFO* item, AI_INFO* info, BITE_INFO* bite, short angle, int damage);
typedef int(__cdecl* TYPE_GetFrames)(ITEM_INFO* item, short *frames[], int* rate);
typedef void(__cdecl* TYPE_InitInterpolate)(int frac, int rate);
typedef void(__cdecl* TYPE_phd_TranslateRel_ID)(int x1, int y1, int z1, int x2, int y2, int z2);
typedef void(__cdecl* TYPE_gar_RotYXZsuperpack_I)(short **rotation1, short **rotation2, int skip);
typedef void(__cdecl* TYPE_phd_PutPolygons_I)(StrMeshTr4* meshes, int clip);
typedef void(__cdecl* TYPE_phd_PushMatrix_I)();
typedef void(__cdecl* TYPE_phd_TranslateRel_I)(int x, int y, int z);
typedef void(__cdecl* TYPE_ShotFire)(ITEM_INFO* item);
typedef int(__cdecl* TYPE_phd_sqrt)(int x);
typedef short(__cdecl* TYPE_CreateItem)(void);
typedef void(__cdecl* TYPE_InitialiseItem)(short ItemIndex);
typedef int(__cdecl* TYPE_GetRandomDraw)();
typedef LPVOID(__cdecl* TYPE_game_malloc)(int size);
typedef int(__cdecl* TYPE_CalculateTarget)(StrPosizione* target, ITEM_INFO* item, LOT* LOT);
typedef void(_cdecl* TYPE_TargetBox)(LOT* LOT, short box_number);
typedef BOOL(__cdecl* TYPE_StalkBox)(ITEM_INFO* item, ITEM_INFO* enemy, short box_number);
typedef void(__cdecl* TYPE_phd_RotY_I)(WORD angle);
typedef void(__cdecl* TYPE_phd_RotX_I)(WORD angle);
typedef void(__cdecl* TYPE_phd_RotZ_I)(WORD angle);
typedef void(__cdecl* TYPE_phd_RotYXZ_I)(short HOrient, short VOrient, short ROrient);
typedef void(__cdecl* TYPE_Richochet)(GAME_VECTOR* pos);
typedef void(__cdecl* TYPE_TriggerRichochetSparks)(GAME_VECTOR* pos, int angle, int spark_number, int unknown);
typedef void(__cdecl* TYPE_phd_PopMatrix_I)(void);
typedef void(__cdecl* TYPE_swap_meshes_with_meshswap1)(ITEM_INFO* item);
typedef void(__cdecl* TYPE_swap_meshes_with_meshswap2)(ITEM_INFO* item);
typedef void(__cdecl* TYPE_swap_meshes_with_meshswap3)(ITEM_INFO* item);
typedef int(__cdecl* TYPE_GetFreeSparks)(void);
typedef int(__cdecl* TYPE_GetFreeSmokeSparks)(void);
typedef int(__cdecl* TYPE_GetFreeFireSparks)(void);
typedef void(__cdecl* TYPE_find_target_point)(ITEM_INFO* item, GAME_VECTOR *target);
typedef void(__cdecl* TYPE_LookUpDown)(void);
typedef void(__cdecl* TYPE_ResetLook)(void);
typedef void(__cdecl* TYPE_LookLeftRight)(void);
typedef void(__cdecl* TYPE_LaraGun)(void);
typedef void(__cdecl* TYPE_LaraBaddieCollision)(ITEM_INFO* lara, COLL_INFO* coll);
typedef int(__cdecl* TYPE_GetSpheres)(ITEM_INFO *item, SPHERE *ptr, int WorldSpace);
typedef int(__cdecl* TYPE_xLOS)(GAME_VECTOR *start, GAME_VECTOR *target);
typedef int(__cdecl* TYPE_zLOS)(GAME_VECTOR *start, GAME_VECTOR *target);
typedef int(__cdecl* TYPE_ControlPhase)(int nframes, int demo_mode);
typedef void(__cdecl* TYPE_RemoveRoomFlipItems)(StrRoomTr4* room);
typedef void(__cdecl* TYPE_AddRoomFlipItems)(StrRoomTr4* room);
typedef int(__cdecl* TYPE_ClipTarget)(GAME_VECTOR* start, GAME_VECTOR* target);
typedef BOOL(__cdecl* TYPE_CheckHitTarget)(GAME_VECTOR* vsrc, GAME_VECTOR* vdest, int flags, int damage);
typedef void(__cdecl* TYPE_HitTarget)(ITEM_INFO* target, GAME_VECTOR* vdest, int damage, int flags);
typedef void(__cdecl* TYPE_InitialiseNewWeapons)(void);
typedef void(__cdecl* TYPE_draw_pistols)(int weapon_type);
typedef void(__cdecl* TYPE_undraw_pistols)(int weapon_type);
typedef void(__cdecl* TYPE_draw_shotgun)(int weapon_type);
typedef void(__cdecl* TYPE_undraw_shotgun)(int weapon_type);
typedef void(__cdecl* TYPE_set_flare_arm)(short frame);
typedef int(__cdecl* TYPE_CheckForHoldingState)(WORD current_anim_state);
typedef short*(__cdecl* TYPE_GetCurrentAmmo)(int weapon_type);

/* discovered by Krystian */
typedef int(__cdecl *TYPE_TestLaraSlide) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef void(__cdecl *TYPE_LaraSlideSlope) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef void(__cdecl *TYPE_GetLaraCollisionInfo) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef int(__cdecl *TYPE_LaraHitCeiling) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef int(__cdecl *TYPE_LaraDeflectEdge) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef int(__cdecl *TYPE_TestLaraVault) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef int(__cdecl *TYPE_TestWall) (ITEM_INFO *pItem, int Front, int Right, int Down);
typedef void(__cdecl *TYPE_LaraCollideStop) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef int(__cdecl *TYPE_LaraFallen) (ITEM_INFO *pLara, COLL_INFO *pCollision);
typedef void(__cdecl *TYPE_GetCollisionInfo) (COLL_INFO *pCollision, DWORD CordX, int CordY, DWORD CordZ, short room_number, int obj_height);
typedef void(__cdecl *TYPE_ShiftItem) (ITEM_INFO *pItem, COLL_INFO *pCollision);
typedef int(__cdecl *TYPE_GetChange) (ITEM_INFO *pItem, StrAnimationTr4 *pAnim);
typedef void(__cdecl *TYPE_TranslateItem) (ITEM_INFO *pItem, int OffsetX, int OffsetY, int OffsetZ);

///* ============================================================== */
///                     LARA CONTROL ROUTINES                       //
///* ============================================================== */
typedef void(__cdecl* TYPE_lara_as_walk)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_run)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_stop)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_forwardjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_fastback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_turn_r)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_turn_l)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_death)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_fastfall)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_hang)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_reach)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_splat)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_tread)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_compress)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_back)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_swim)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_glide)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_null)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_fastturn)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_stepright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_stepleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_slide)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_backjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_rightjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_leftjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_upjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_fallback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_hangleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_hangright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_slideback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_surftread)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_surfswim)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_dive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_pushblock)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_pullblock)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_ppready)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_pickup)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_switchon)(ITEM_INFO* lara, COLL_INFO* coll);
//typedef void(__cdecl* TYPE_lara_as_switchoff)(StrItemInfo* lara, StrCollInfo* coll); // not exist !
typedef void(__cdecl* TYPE_lara_as_usekey)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_usepuzzle)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_uwdeath)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_special)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_surfback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_surfleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_surfright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_swandive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_fastdive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_waterout)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbstnc)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbing)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbend)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbdown)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_wade)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_waterroll)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_pickupflare)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_deathslide)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_duck)(ITEM_INFO* lara, COLL_INFO* coll);
//typedef void(__cdecl* TYPE_lara_as_duckroll)(StrItemInfo* lara, StrCollInfo* coll); // not exist !
typedef void(__cdecl* TYPE_lara_as_dash)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_dashdive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_hang2)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_monkeyswing)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_monkeyl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_monkeyr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_monkey180)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_all4s)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_crawl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_hangturnl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_hangturnr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_all4turnl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_all4turnr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_crawlb)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_controlled)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_ropel)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_roper)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_controlledl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_poleleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_poleright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_pulley)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_duckl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_duckr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_extcornerl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_extcornerr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_intcornerl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_intcornerr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_rope)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbrope)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_as_climbroped)(ITEM_INFO* lara, COLL_INFO* coll);

///* ============================================================== */
///                      LARA COLLISION ROUTINES                    //
///* ============================================================== */
typedef void(__cdecl* TYPE_lara_col_walk)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_run)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_stop)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_forwardjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_fastturn)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_fastback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_turn_r)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_turn_l)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_death)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_fastfall)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_hang)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_reach)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_splat)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_tread)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_compress)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_back)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_swim)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_glide)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_null)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_roll2)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_stepright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_stepleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_slide)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_backjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_rightjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_leftjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_upjump)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_fallback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_hangleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_hangright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_slideback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_surftread)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_surfswim)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_dive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_pushblock)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_pullblock)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_ppready)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_pickup)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_switchon)(ITEM_INFO* lara, COLL_INFO* coll);
//typedef void(__cdecl* TYPE_lara_col_switchoff)(StrItemInfo* lara, StrCollInfo* coll); // not exist !
typedef void(__cdecl* TYPE_lara_col_usekey)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_usepuzzle)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_uwdeath)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_roll)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_surfback)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_surfleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_surfright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_swandive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_fastdive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_waterout)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_climbstnc)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_climbing)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_climbleft)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_climbend)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_climbright)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_climbdown)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_wade)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_waterroll)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_pickupflare)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_deathslide)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_duck)(ITEM_INFO* lara, COLL_INFO* coll);
//typedef void(__cdecl* TYPE_lara_col_duckroll)(StrItemInfo* lara, StrCollInfo* coll); // not exist !
typedef void(__cdecl* TYPE_lara_col_dash)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_dashdive)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_hang2)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_monkeyswing)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_monkeyl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_monkeyr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_monkey180)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_all4s)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_crawl)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_hangturnlr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_all4turnlr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_all4turnlrb)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_all4turnlr2hang)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_default_col)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_turnswitch)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_polestat)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_poleup)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_poledown)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_ducklr)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_rope)(ITEM_INFO* lara, COLL_INFO* coll);
typedef void(__cdecl* TYPE_lara_col_ropefwd)(ITEM_INFO* lara, COLL_INFO* coll);

/// modified function:
typedef bool(__cdecl* TYPE2_TriggerActive)(ITEM_INFO* item);
typedef void(__cdecl* TYPE2_AnimateItem)(ITEM_INFO* item);
typedef bool(__cdecl* TYPE2_TestBoundsCollide)(ITEM_INFO* item, ITEM_INFO* target, int distance);
typedef DWORD(__cdecl* TYPE2_TestCollision)(ITEM_INFO* item_detail, ITEM_INFO* item);
typedef void(__cdecl* TYPE2_ItemPushLara)(ITEM_INFO* item, ITEM_INFO* lara, COLL_INFO* coll, BOOL change_lara_anim, int param);
typedef short* (__cdecl* TYPE2_GetBoundsAccurate)(ITEM_INFO* item);
typedef int(__cdecl* TYPE2_S_GetObjectBounds)(short* frame);
typedef void(__cdecl* TYPE2_GetJointAbsPosition)(ITEM_INFO* item, StrMovePosition* pos, int joint_id);
typedef FLOOR_INFO* (__cdecl* TYPE2_GetFloor)(DWORD x, int y, DWORD z, short* room_number);
typedef int(__cdecl* TYPE2_GetCeiling)(FLOOR_INFO* floor, DWORD x, int y, DWORD z);
typedef void(__cdecl* TYPE2_UpdateLaraRoom)(ITEM_INFO* lara, int newY);
typedef void(__cdecl* TYPE2_TriggerUnderwaterExplosion)(ITEM_INFO *item, bool test);
typedef StrBoxCollisione* (__cdecl *TYPE2_GetBestFrame)(ITEM_INFO *item);
typedef short(__cdecl* TYPE2_DoBloodSplat)(int x, int y, int z, short speed, short y_rot, short room_num);
typedef int(__cdecl* TYPE2_LOS)(GAMEVECTOR* start, GAMEVECTOR* target);

#endif