fggkyle

Untitled

Aug 15th, 2020 (edited)
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.34 KB | None | 0 0
  1. u8 func_80B312C8(EnWeatherTag* this, GlobalContext *globalCtx, u8 arg2, u8 arg3, u8 arg4, u8 arg5, u16 arg6, u8 arg7)
  2. {
  3.     u8 sp23;
  4.     u8 phi_v1;
  5.  
  6.     sp23 = (u8)0U;
  7.     phi_v1 = sp23;
  8.     if (func_8002DB8C(globalCtx->actorCtx.actorList[ACTORTYPE_PLAYER].first, &this->actor) < (this->actor.params >> 8) * 100.0f)
  9.     {
  10.         if (((globalCtx->envCtx.unk_1E == 0) && (D_8011FB3C != 0)) && (globalCtx->skyboxId != 1))
  11.         {
  12.             if ((globalCtx->envCtx.unk_20 == globalCtx->envCtx.unk_1F) && (D_8011FB38 = (u8)1U, phi_v1 = sp23, (globalCtx->envCtx.gloomySkyEvent == 0)))
  13.             {
  14. block_6:
  15.                 if ((globalCtx->envCtx.unk_1E == 0) || (phi_v1 = sp23, (globalCtx->envCtx.unk_1F != 1) && (globalCtx->envCtx.unk_21 == 0)))
  16.                 {
  17.                         D_8011FB38 = (u8)0U;
  18.                         if (arg7 != D_8011FB30)
  19.                         {
  20.                             D_8011FB30 = arg7;
  21.                             if (globalCtx->envCtx.gloomySkyEvent == 0)
  22.                             {
  23.                                 globalCtx->envCtx.unk_19 = (u8)1U;
  24.                                 globalCtx->envCtx.gloomySky = arg2;
  25.                                 globalCtx->envCtx.unk_18 = arg3;
  26.                                 globalCtx->envCtx.unk_1A = arg6;
  27.                                 globalCtx->envCtx.unk_21 = (u8)1U;
  28.                                 globalCtx->envCtx.unk_1F = arg4;
  29.                                 globalCtx->envCtx.unk_20 = arg5;
  30.                                 D_8011FB34 = arg5;
  31.                                 globalCtx->envCtx.unk_24 = arg6;
  32.                                 globalCtx->envCtx.unk_22 = (u16) globalCtx->envCtx.unk_24;
  33.                             }
  34.                         }
  35.                         phi_v1 = (u8)1U;
  36.                 }
  37.             }
  38.             else
  39.             {
  40.                 phi_v1 = sp23;
  41.                 if (D_8011FB40 != 0)
  42.                 {
  43.                     gSaveContext.dayTime = (u16) (gSaveContext.dayTime + 0x14);
  44.                     phi_v1 = sp23;
  45.                 }
  46.             }
  47.         }
  48.         else
  49.         {
  50.             D_8011FB38 = (u8)1U;
  51.             phi_v1 = sp23;
  52.             if (globalCtx->envCtx.gloomySkyEvent == 0)
  53.             {
  54.                 goto block_6;
  55.             }
  56.         }
  57.     }
  58.     return phi_v1;
  59. }
Add Comment
Please, Sign In to add comment