lara: move Lara_TestBoundsCollide to trx

This commit is contained in:
Marcin Kurczewski 2025-04-08 17:42:00 +02:00
parent d2104e35c7
commit a0070a1183
No known key found for this signature in database
GPG key ID: CC65E6FD28CAE42A
9 changed files with 13 additions and 10 deletions

View file

@ -151,3 +151,8 @@ void Lara_TakeDamage(const int16_t damage, const bool hit_status)
{
Item_TakeDamage(Lara_GetItem(), damage, hit_status);
}
bool Lara_TestBoundsCollide(const ITEM *const item, const int32_t radius)
{
return Item_TestBoundsCollide(Lara_GetItem(), item, radius);
}

View file

@ -1,5 +1,6 @@
#include "game/lara/misc.h"
#include "game/items.h"
#include "game/lara/common.h"
#include "game/lara/const.h"
#include "game/rooms.h"

View file

@ -50,3 +50,6 @@ void Item_Translate(ITEM *item, int32_t x, int32_t y, int32_t z);
void Item_Animate(ITEM *item);
void Item_PlayAnimSFX(const ITEM *item, const ANIM_COMMAND_EFFECT_DATA *data);
extern bool Item_TestBoundsCollide(
const ITEM *src_item, const ITEM *dst_item, int32_t radius);

View file

@ -11,3 +11,5 @@ OBJECT_MESH *Lara_GetMesh(LARA_MESH mesh);
void Lara_SetMesh(LARA_MESH mesh, OBJECT_MESH *mesh_ptr);
const ANIM_FRAME *Lara_GetHitFrame(const ITEM *item);
void Lara_TakeDamage(int16_t damage, bool hit_status);
bool Lara_TestBoundsCollide(const ITEM *item, int32_t radius);

View file

@ -196,7 +196,8 @@ bool Item_Test3DRange(int32_t x, int32_t y, int32_t z, int32_t range)
&& (SQUARE(x) + SQUARE(y) + SQUARE(z) < SQUARE(range));
}
bool Item_TestBoundsCollide(ITEM *src_item, ITEM *dst_item, int32_t radius)
bool Item_TestBoundsCollide(
const ITEM *src_item, const ITEM *dst_item, int32_t radius)
{
const BOUNDS_16 *const src_bounds = &Item_GetBestFrame(src_item)->bounds;
const BOUNDS_16 *const dst_bounds = &Item_GetBestFrame(dst_item)->bounds;

View file

@ -11,7 +11,6 @@ int16_t Item_Spawn(const ITEM *item, GAME_OBJECT_ID obj_id);
bool Item_IsNearItem(const ITEM *item, const XYZ_32 *pos, int32_t distance);
bool Item_Test3DRange(int32_t x, int32_t y, int32_t z, int32_t range);
bool Item_TestBoundsCollide(ITEM *src_item, ITEM *dst_item, int32_t radius);
bool Item_TestPosition(
const ITEM *src_item, const ITEM *dst_item, const OBJECT_BOUNDS *bounds);
void Item_AlignPosition(ITEM *src_item, ITEM *dst_item, XYZ_32 *vec);

View file

@ -701,11 +701,6 @@ bool Lara_IsNearItem(const XYZ_32 *pos, int32_t distance)
return Item_IsNearItem(g_LaraItem, pos, distance);
}
bool Lara_TestBoundsCollide(ITEM *item, int32_t radius)
{
return Item_TestBoundsCollide(g_LaraItem, item, radius);
}
bool Lara_TestPosition(const ITEM *item, const OBJECT_BOUNDS *const bounds)
{
return Item_TestPosition(g_LaraItem, item, bounds);

View file

@ -26,7 +26,6 @@ void Lara_SwapMeshExtra(void);
bool Lara_IsNearItem(const XYZ_32 *pos, int32_t distance);
void Lara_UseItem(GAME_OBJECT_ID obj_id);
bool Lara_TestBoundsCollide(ITEM *item, int32_t radius);
bool Lara_TestPosition(const ITEM *item, const OBJECT_BOUNDS *bounds);
void Lara_AlignPosition(ITEM *item, XYZ_32 *vec);
bool Lara_MovePosition(ITEM *item, XYZ_32 *vec);

View file

@ -8,8 +8,6 @@ void Item_Control(void);
void Item_ClearKilled(void);
void Item_ShiftCol(ITEM *item, COLL_INFO *coll);
void Item_UpdateRoom(ITEM *item, int32_t height);
int32_t Item_TestBoundsCollide(
const ITEM *src_item, const ITEM *dst_item, int32_t radius);
int32_t Item_TestPosition(
const int16_t *bounds, const ITEM *src_item, const ITEM *dst_item);
void Item_AlignPosition(