mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
update bullet so it actually works
Moved the addSourceDirectory for physics/Bullet into the Engine/Source/CMakeLists.txt file that way it can actually appear where we expect it to in the solution explorer.
This commit is contained in:
parent
c7be48130a
commit
13fa178cf6
5986 changed files with 1811270 additions and 453803 deletions
58
Engine/lib/bullet/examples/TinyAudio/b3SwapUtils.h
Normal file
58
Engine/lib/bullet/examples/TinyAudio/b3SwapUtils.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#ifndef B3_SWAP_UTILS_H
|
||||
#define B3_SWAP_UTILS_H
|
||||
|
||||
inline void b3Swap16(unsigned char *ptr)
|
||||
{
|
||||
unsigned char val;
|
||||
|
||||
// Swap 1st and 2nd bytes
|
||||
val = *(ptr);
|
||||
*(ptr) = *(ptr + 1);
|
||||
*(ptr + 1) = val;
|
||||
}
|
||||
|
||||
inline void b3Swap32(unsigned char *ptr)
|
||||
{
|
||||
unsigned char val;
|
||||
|
||||
// Swap 1st and 4th bytes
|
||||
val = *(ptr);
|
||||
*(ptr) = *(ptr + 3);
|
||||
*(ptr + 3) = val;
|
||||
|
||||
//Swap 2nd and 3rd bytes
|
||||
ptr += 1;
|
||||
val = *(ptr);
|
||||
*(ptr) = *(ptr + 1);
|
||||
*(ptr + 1) = val;
|
||||
}
|
||||
|
||||
inline void b3Swap64(unsigned char *ptr)
|
||||
{
|
||||
unsigned char val;
|
||||
|
||||
// Swap 1st and 8th bytes
|
||||
val = *(ptr);
|
||||
*(ptr) = *(ptr + 7);
|
||||
*(ptr + 7) = val;
|
||||
|
||||
// Swap 2nd and 7th bytes
|
||||
ptr += 1;
|
||||
val = *(ptr);
|
||||
*(ptr) = *(ptr + 5);
|
||||
*(ptr + 5) = val;
|
||||
|
||||
// Swap 3rd and 6th bytes
|
||||
ptr += 1;
|
||||
val = *(ptr);
|
||||
*(ptr) = *(ptr + 3);
|
||||
*(ptr + 3) = val;
|
||||
|
||||
// Swap 4th and 5th bytes
|
||||
ptr += 1;
|
||||
val = *(ptr);
|
||||
*(ptr) = *(ptr + 1);
|
||||
*(ptr + 1) = val;
|
||||
}
|
||||
|
||||
#endif //B3_SWAP_UTILS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue