mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 11:52:32 +01:00
- added QuickUnpackCellObject
This commit is contained in:
parent
973b2da24e
commit
f780cf3855
@ -176,4 +176,17 @@ CELL_OBJECT* UnpackCellObject(PACKED_CELL_OBJECT* ppco, XZPAIR* near)
|
||||
pco->type = (ppco->value >> 6) | ((ppco->pos.vy & 1) << 10);
|
||||
|
||||
return pco;
|
||||
}
|
||||
|
||||
// [D] [T]
|
||||
void QuickUnpackCellObject(PACKED_CELL_OBJECT* ppco, XZPAIR* near, CELL_OBJECT* pco)
|
||||
{
|
||||
cell_object_index = cell_object_index + 1U & 0x3ff;
|
||||
|
||||
pco->pos.vx = near->x + (((ppco->pos.vx - near->x) << 0x10) >> 0x10);
|
||||
pco->pos.vz = near->z + (((ppco->pos.vz - near->z) << 0x10) >> 0x10);
|
||||
|
||||
pco->pos.vy = (ppco->pos.vy << 0x10) >> 0x11;
|
||||
pco->yang = ppco->value & 0x3f;
|
||||
pco->type = (ppco->value >> 6) | ((ppco->pos.vy & 1) << 10);
|
||||
}
|
@ -9,4 +9,6 @@ extern PACKED_CELL_OBJECT * GetFirstPackedCop(int cellx, int cellz, CELL_ITERATO
|
||||
extern PACKED_CELL_OBJECT* GetNextPackedCop(CELL_ITERATOR* pci); // 0x0003F5F0
|
||||
extern CELL_OBJECT* UnpackCellObject(PACKED_CELL_OBJECT* ppco, XZPAIR* near); // 0x000418E8
|
||||
|
||||
extern void QuickUnpackCellObject(PACKED_CELL_OBJECT* ppco, XZPAIR* near, CELL_OBJECT* pco);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user