1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 20:46:03 +08:00

TF2 win64 + Ambuild tier1/mathlib + long=devil (#198)

* Fix compilation for windows, setup ambuild

* Add built tier1 and mathlib for win64

* Ensure compilation is working on windows and linux

* Add -fPIC

* Add compiled libs, with optimisation enabled

* Added windows lib

* Fix hl2sdk for windows

* Longs are the devil

* Fix up threadtools functions

* Add updated libs

* Rework lib naming, and package script

* Update lib directory according to new packaging

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
This commit is contained in:
Benoist
2024-03-09 04:57:12 +01:00
committed by GitHub
parent dcf515fea8
commit 8a6d1c6cd2
82 changed files with 830 additions and 1933 deletions

View File

@ -8,6 +8,7 @@
#ifndef _3D_UNITVEC_H
#define _3D_UNITVEC_H
#include <cstdint>
#define UNITVEC_DECLARE_STATICS \
float cUnitVector::mUVAdjustment[0x2000]; \
@ -75,8 +76,8 @@ public:
// a little slower... old pack was 4 multiplies and 2 adds.
// This is 2 multiplies, 2 adds, and a divide....
float w = 126.0f / ( tmp.x + tmp.y + tmp.z );
long xbits = (long)( tmp.x * w );
long ybits = (long)( tmp.y * w );
int32_t xbits = (int32_t)( tmp.x * w );
int32_t ybits = (int32_t)( tmp.y * w );
Assert( xbits < 127 );
Assert( xbits >= 0 );
@ -110,8 +111,8 @@ public:
// multiplication
// get the x and y bits
long xbits = (( mVec & TOP_MASK ) >> 7 );
long ybits = ( mVec & BOTTOM_MASK );
int32_t xbits = (( mVec & TOP_MASK ) >> 7 );
int32_t ybits = ( mVec & BOTTOM_MASK );
// map the numbers back to the triangle (0,0)-(0,126)-(126,0)
if (( xbits + ybits ) >= 127 )
@ -139,8 +140,8 @@ public:
{
for ( int idx = 0; idx < 0x2000; idx++ )
{
long xbits = idx >> 7;
long ybits = idx & BOTTOM_MASK;
int32_t xbits = idx >> 7;
int32_t ybits = idx & BOTTOM_MASK;
// map the numbers back to the triangle (0,0)-(0,127)-(127,0)
if (( xbits + ybits ) >= 127 )