Advertisement
fggkyle

Untitled

Aug 16th, 2020 (edited)
802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.70 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.     u8 phi_v1 = 0;
  3.  
  4.     //to get to block 5, we need 1 to be false
  5.  
  6.     //we need 2 to be true
  7.     //OR 2 and 3 to both be false
  8.     if (!(func_8002DB8C(globalCtx->actorCtx.actorList[ACTORTYPE_PLAYER].first, &this->actor) < (this->actor.params >> 8) * 100.0f)) {
  9.         goto block_15;
  10.     }
  11.     if (globalCtx->envCtx.unk_1E != 0 || D_8011FB3C == 0) {
  12.         goto block_5;
  13.     }
  14.     if (globalCtx->skyboxId == 1 || globalCtx->envCtx.unk_1F != globalCtx->envCtx.unk_20) {
  15.         goto block_13;
  16.     }
  17.     //to get to block 9 we need 1 to be false
  18.    
  19.     //we need 2 to be true
  20.     //OR 2 and 3 to be false
  21. block_5:
  22.     if (D_8011FB38 = 1, globalCtx->envCtx.gloomySkyEvent != 0) {
  23.         goto block_15;
  24.     }
  25.     if (globalCtx->envCtx.unk_1E != 0) {
  26.         goto block_9;
  27.     }
  28.     if (globalCtx->envCtx.unk_1F == 1 || globalCtx->envCtx.unk_21 != 0) {
  29.         goto block_15;
  30.     }
  31.  
  32. block_9:
  33.     if (D_8011FB38 = 0, D_8011FB30 != arg7 && (D_8011FB30 = arg7, globalCtx->envCtx.gloomySkyEvent == 0)) {
  34.         globalCtx->envCtx.unk_19 = 1;
  35.         globalCtx->envCtx.gloomySky = arg2;
  36.         globalCtx->envCtx.unk_18 = arg3;
  37.         globalCtx->envCtx.unk_1A = arg6;
  38.         globalCtx->envCtx.unk_21 = 1;
  39.         globalCtx->envCtx.unk_1F = arg4;
  40.         globalCtx->envCtx.unk_20 = arg5;
  41.         D_8011FB34 = arg5;
  42.         globalCtx->envCtx.unk_24 = arg6;
  43.         globalCtx->envCtx.unk_22 = globalCtx->envCtx.unk_24;
  44.     }
  45.     phi_v1 = 1;
  46.     goto block_15;
  47. block_13:
  48.     if (D_8011FB40 != 0) {
  49.         gSaveContext.dayTime += 0x14;
  50.     }
  51. block_15:
  52.     return phi_v1;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement