Advertisement
illwieckz

redefinition error

Nov 5th, 2022 (edited)
1,688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.26 KB | None | 0 0
  1. diff --git a/src/engine/renderer/tr_local.h b/src/engine/renderer/tr_local.h
  2. index 67991bdb8..6702044e5 100644
  3. --- a/src/engine/renderer/tr_local.h
  4. +++ b/src/engine/renderer/tr_local.h
  5. @@ -137,6 +137,11 @@ static inline float halfToFloat( int16_t in ) {
  6.     fi.ui = (((unsigned int)in & 0x8000) << 16) | (((unsigned int)in & 0x7fff) << 13);
  7.     return fi.f * scale;
  8.  }
  9. +static inline void halfToFloat( const f16vec2_t in, vec2_t out )
  10. +{
  11. +   out[ 0 ] = halfToFloat( in[ 0 ] );
  12. +   out[ 1 ] = halfToFloat( in[ 1 ] );
  13. +}
  14.  static inline void halfToFloat( const f16vec4_t in, vec4_t out )
  15.  {
  16.     out[ 0 ] = halfToFloat( in[ 0 ] );
  17. diff --git a/src/engine/renderer/tr_main.cpp b/src/engine/renderer/tr_main.cpp
  18. index 6ab0c901a..0f4411d12 100644
  19. --- a/src/engine/renderer/tr_main.cpp
  20. +++ b/src/engine/renderer/tr_main.cpp
  21. @@ -106,12 +106,9 @@ void R_CalcTangents( vec3_t tangent, vec3_t binormal,
  22.  {
  23.     vec2_t t0f, t1f, t2f;
  24.  
  25. -   t0f[ 0 ] = halfToFloat( t0[ 0 ] );
  26. -   t0f[ 1 ] = halfToFloat( t0[ 1 ] );
  27. -   t1f[ 0 ] = halfToFloat( t1[ 0 ] );
  28. -   t1f[ 1 ] = halfToFloat( t1[ 1 ] );
  29. -   t2f[ 0 ] = halfToFloat( t2[ 0 ] );
  30. -   t2f[ 1 ] = halfToFloat( t2[ 1 ] );
  31. +   t0f = halfToFloat( t0 );
  32. +   t1f = halfToFloat( t1 );
  33. +   t2f = halfToFloat( t2 );
  34.  
  35.     vec3_t dpx, dpy;
  36.     vec2_t dtx, dty;
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement