Advertisement
em00se

Untitled

Oct 23rd, 2022 (edited)
1,551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.20 KB | None | 0 0
  1. void __cdecl GX_VIConfigure_Impl(unsigned __int16 internal_width, unsigned __int16 internal_height)
  2. {
  3.   double internal_width_; // st5
  4.   double internal_height_; // st7
  5.   float real_width; // [esp+0h] [ebp-8h]
  6.  
  7.   real_width = (float)(unsigned int)g_D3D_Width_2;
  8.   internal_width_ = (double)internal_width;
  9.   internal_height_ = (double)internal_height;
  10.   if ( dword_C2CF88 ) // never gets changed, always 1?
  11.   {
  12.     g_InternalWidthScale = real_width / internal_width_;
  13.     g_InternalHeightScale = 720.0 / (internal_height_ - (g_InternalLetterboxHeight * 2)) * (real_width / 1280.0);
  14.     g_InternalHeightScaleFull = (double)(unsigned int)g_D3D_Height_2 / internal_height_;
  15.     g_ViewportHeightScale = g_InternalHeightScale;
  16.   }
  17.   else
  18.   {
  19.     // below code is never ran, but the variables do get set elsewhere
  20.     g_InternalWidthScale_unused = real_width / internal_width_;
  21.     g_InternalHeightScale_unused = 720.0 / (internal_height_ - (g_InternalLetterboxHeight * 2)) * (real_width / 1280.0);
  22.     g_InternalHeightScaleFull_unused = (double)(unsigned int)g_D3D_Height_2 / internal_height_;
  23.     g_ViewportHeightScale_unused = g_InternalHeightScale_unused;
  24.   }
  25.   g_InternalHeight = (float)internal_height;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement