Advertisement
fggkyle

Untitled

Aug 17th, 2020 (edited)
1,364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.64 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.     s32 pad;
  3.     u8 ret = 0;
  4.  
  5.     Player* player = PLAYER;
  6.  
  7.     if (func_8002DB8C(&player->actor, &this->actor) < (this->actor.params >> 8) * 100.0f) {
  8.         if ((globalCtx->envCtx.unk_1E != 0) ||
  9.             (!D_8011FB3C || !(globalCtx->skyboxId == 1 || globalCtx->envCtx.unk_1F != globalCtx->envCtx.unk_20))) {
  10.             D_8011FB38 = 1;
  11.             if (globalCtx->envCtx.gloomySkyEvent == 0 &&
  12.                 ((globalCtx->envCtx.unk_1E != 0) ||
  13.                  (!(globalCtx->envCtx.unk_1F == 1 || globalCtx->envCtx.unk_21 != 0)))) {
  14.                 D_8011FB38 = 0;
  15.                 if (D_8011FB30 != arg7) {
  16.                     D_8011FB30 = arg7;
  17.                     if (globalCtx->envCtx.gloomySkyEvent == 0) {
  18.                         globalCtx->envCtx.unk_19 = 1;
  19.                         globalCtx->envCtx.gloomySky = arg2;
  20.                         globalCtx->envCtx.unk_18 = arg3;
  21.                         globalCtx->envCtx.unk_1A = arg6;
  22.                         globalCtx->envCtx.unk_21 = 1;
  23.                         globalCtx->envCtx.unk_1F = arg4;
  24.                         globalCtx->envCtx.unk_20 = arg5;
  25.                         D_8011FB34 = arg5;
  26.                         globalCtx->envCtx.unk_24 = arg6;
  27.                         globalCtx->envCtx.unk_22 = globalCtx->envCtx.unk_24;
  28.                     }
  29.                 }
  30.  
  31.                 ret = 1;
  32.             }
  33.         } else {
  34.             if (D_8011FB40 != 0) {
  35.                 gSaveContext.dayTime += 0x14;
  36.             }
  37.         }
  38.     }
  39.  
  40.     return ret;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement