Advertisement
dragonbane

TP getLayerNo Func

Nov 13th, 2019
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 27.67 KB | None | 0 0
  1. int dComIfG_play_c::getLayerNo_common_common(const char *stageName, int roomId, int layerOverride)
  2. {
  3.     int chosenLayer = -1;
  4.     bool condition;
  5.  
  6.     int stageComparison;
  7.     uint uVar2;
  8.  
  9.     if ((char)layerOverride >= 0) {
  10.         goto stateECheck;
  11.     }
  12.  
  13.     condition = dKy_darkworld_stage_check(stageName, roomId);
  14.  
  15.     if (condition == true) {
  16.         chosenLayer = 0xE;
  17.     }
  18.     if (chosenLayer < 0xD) {
  19.         stageComparison = strcmp(stageName, "D_MN11");
  20.         if ((stageComparison == 0) || (stageComparison = strcmp(stageName, "F_SP114"), stageComparison == 0)) {
  21.             condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a749c);
  22.             if (condition == false) {
  23.                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a73ce);
  24.                 if (condition == false) {
  25.                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a73cc);
  26.                     if (condition != false) {
  27.                         chosenLayer = 1;
  28.                     }
  29.                 }
  30.                 else {
  31.                     chosenLayer = 2;
  32.                 }
  33.             }
  34.             else {
  35.                 chosenLayer = 3;
  36.             }
  37.         }
  38.         else {
  39.             stageComparison = strcmp(stageName, "F_SP108");
  40.             if (stageComparison == 0) {
  41.                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2008);
  42.                 if (condition == false) {
  43.                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x1e08);
  44.                     if (condition == false) {
  45.                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x602);
  46.                         if (condition == false) {
  47.                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4510);
  48.                             if (condition == false) {
  49.                                 chosenLayer = 1;
  50.                             }
  51.                         }
  52.                         else {
  53.                             chosenLayer = 2;
  54.                         }
  55.                     }
  56.                     else {
  57.                         chosenLayer = 3;
  58.                     }
  59.                 }
  60.                 else {
  61.                     chosenLayer = 5;
  62.                 }
  63.             }
  64.             else {
  65.                 stageComparison = strcmp(stageName, "R_SP108");
  66.                 if (stageComparison == 0) {
  67.                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72f6);
  68.                     if (condition == false) {
  69.                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4510);
  70.                         if (condition == false) {
  71.                             chosenLayer = 1;
  72.                         }
  73.                     }
  74.                     else {
  75.                         chosenLayer = 2;
  76.                     }
  77.                 }
  78.                 else {
  79.                     stageComparison = strcmp(stageName, "F_SP109");
  80.                     if ((stageComparison == 0) || (stageComparison = strcmp(stageName, "F_SP111"), stageComparison == 0)) {
  81.                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x804);
  82.                         if (condition == false) {
  83.                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x810);
  84.                             if (condition == false) {
  85.                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x1320);
  86.                                 if (condition == false) {
  87.                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x701);
  88.                                     if (condition == false) {
  89.                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0xa08);
  90.                                         if (condition == false) {
  91.                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x608);
  92.                                             if (condition != false) {
  93.                                                 chosenLayer = 1;
  94.                                             }
  95.                                         }
  96.                                         else {
  97.                                             chosenLayer = 2;
  98.                                             dComIfG_get_timelayer(chosenLayer);
  99.                                         }
  100.                                     }
  101.                                     else {
  102.                                         chosenLayer = 0xc;
  103.                                     }
  104.                                 }
  105.                                 else {
  106.                                     chosenLayer = 2;
  107.                                     dComIfG_get_timelayer(chosenLayer);
  108.                                 }
  109.                             }
  110.                             else {
  111.                                 chosenLayer = 4;
  112.                             }
  113.                         }
  114.                         else {
  115.                             chosenLayer = 2;
  116.                             dComIfG_get_timelayer(chosenLayer);
  117.                         }
  118.                     }
  119.                     else {
  120.                         stageComparison = strcmp(stageName, "R_SP109");
  121.                         if ((stageComparison == 0) || (stageComparison = strcmp(stageName, "R_SP209"), stageComparison == 0)) {
  122.                             stageComparison = strcmp(stageName, "R_SP109");
  123.                             if ((stageComparison == 0) &&
  124.                                 ((roomId == 1 &&
  125.                                 (condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x904), condition != false)))) {
  126.                                 chosenLayer = 4;
  127.                                 dComIfG_get_timelayer(chosenLayer);
  128.                             }
  129.                             else {
  130.                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a7332);
  131.                                 if (condition == false) {
  132.                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72f2);
  133.                                     if (condition != false) {
  134.                                         chosenLayer = 1;
  135.                                     }
  136.                                 }
  137.                                 else {
  138.                                     chosenLayer = 2;
  139.                                     dComIfG_get_timelayer(chosenLayer);
  140.                                 }
  141.                             }
  142.                         }
  143.                         else {
  144.                             stageComparison = strcmp(stageName, "F_SP110");
  145.                             if (stageComparison == 0) {
  146.                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a7308);
  147.                                 if (condition != false) {
  148.                                     chosenLayer = 2;
  149.                                 }
  150.                             }
  151.                             else {
  152.                                 stageComparison = strcmp(stageName, "R_SP110");
  153.                                 if (stageComparison == 0) {
  154.                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2320);
  155.                                     if (condition == false) {
  156.                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2004);
  157.                                         if (condition == false) {
  158.                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2020);
  159.                                             if (condition == false) {
  160.                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x701);
  161.                                                 if (condition != false) {
  162.                                                     chosenLayer = 1;
  163.                                                 }
  164.                                             }
  165.                                             else {
  166.                                                 chosenLayer = 2;
  167.                                             }
  168.                                         }
  169.                                         else {
  170.                                             chosenLayer = 4;
  171.                                         }
  172.                                     }
  173.                                     else {
  174.                                         chosenLayer = 3;
  175.                                     }
  176.                                 }
  177.                                 else {
  178.                                     stageComparison = strcmp(stageName, "F_SP115");
  179.                                     if ((((stageComparison == 0) || (stageComparison = strcmp(stageName, "F_SP116"), stageComparison == 0)) ||
  180.                                         ((stageComparison = strcmp(stageName, "R_SP116"), stageComparison == 0 && (roomId == 5)))) ||
  181.                                         (stageComparison = strcmp(stageName, "R_SP115"), stageComparison == 0)) {
  182.                                         stageComparison = strcmp(stageName, "F_SP115");
  183.                                         if ((stageComparison == 0) && (roomId == 0)) {
  184.                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x3b08);
  185.                                             if (condition == false) {
  186.                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x3120);
  187.                                                 if (condition == false) {
  188.                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x904);
  189.                                                     if (condition != false) {
  190.                                                         chosenLayer = 2;
  191.                                                     }
  192.                                                 }
  193.                                                 else {
  194.                                                     chosenLayer = 1;
  195.                                                 }
  196.                                             }
  197.                                             else {
  198.                                                 chosenLayer = 3;
  199.                                             }
  200.                                         }
  201.                                         else {
  202.                                             stageComparison = strcmp(stageName, "R_SP116");
  203.                                             if ((stageComparison == 0) &&
  204.                                                 ((roomId == 5 &&
  205.                                                 (condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2020), condition != false
  206.                                                     )))) {
  207.                                                 chosenLayer = 4;
  208.                                             }
  209.                                             else {
  210.                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x1e08);
  211.                                                 if ((condition == false) || (stageComparison = strcmp(stageName, "F_SP116"), stageComparison != 0))
  212.                                                 {
  213.                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x904);
  214.                                                     if (condition == false) {
  215.                                                         stageComparison = strcmp(stageName, "F_SP116");
  216.                                                         if (((stageComparison == 0) && (roomId == 3)) &&
  217.                                                             (condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a7310),
  218.                                                                 condition != false)) {
  219.                                                             chosenLayer = 1;
  220.                                                         }
  221.                                                     }
  222.                                                     else {
  223.                                                         stageComparison = strcmp(stageName, "F_SP115");
  224.                                                         if (((stageComparison == 0) && (roomId == 1)) &&
  225.                                                             (condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0xc01),
  226.                                                                 condition == false)) {
  227.                                                             chosenLayer = 9;
  228.                                                         }
  229.                                                         else {
  230.                                                             chosenLayer = 2;
  231.                                                         }
  232.                                                     }
  233.                                                 }
  234.                                                 else {
  235.                                                     if (((roomId == 4) || (roomId == 3)) || (roomId == 1)) {
  236.                                                         chosenLayer = 1;
  237.                                                     }
  238.                                                     else {
  239.                                                         chosenLayer = 0;
  240.                                                     }
  241.                                                 }
  242.                                             }
  243.                                         }
  244.                                     }
  245.                                     else {
  246.                                         stageComparison = strcmp(stageName, "F_SP113");
  247.                                         if (stageComparison == 0) {
  248.                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2008);
  249.                                             if (condition != false) {
  250.                                                 chosenLayer = 2;
  251.                                             }
  252.                                         }
  253.                                         else {
  254.                                             stageComparison = strcmp(stageName, "F_SP126");
  255.                                             if (stageComparison == 0) {
  256.                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a7346);
  257.                                                 if (condition != false) {
  258.                                                     chosenLayer = 1;
  259.                                                 }
  260.                                             }
  261.                                             else {
  262.                                                 stageComparison = strcmp(stageName, "F_SP124");
  263.                                                 if ((stageComparison == 0) && (roomId == 0)) {
  264.                                                     chosenLayer = 8;
  265.                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4008);
  266.                                                     if (condition != false) {
  267.                                                         chosenLayer = 0;
  268.                                                     }
  269.                                                 }
  270.                                                 else {
  271.                                                     stageComparison = strcmp(stageName, "F_SP112");
  272.                                                     if (stageComparison == 0) {
  273.                                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0xb01);
  274.                                                         if (condition == false) {
  275.                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x902);
  276.                                                             if (condition != false) {
  277.                                                                 chosenLayer = 2;
  278.                                                             }
  279.                                                         }
  280.                                                         else {
  281.                                                             chosenLayer = 1;
  282.                                                         }
  283.                                                     }
  284.                                                     else {
  285.                                                         stageComparison = strcmp(stageName, "F_SP103");
  286.                                                         if (stageComparison == 0) {
  287.                                                             if (roomId == 0) {
  288.                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72f8);
  289.                                                                 if (condition == false) {
  290.                                                                     uVar2 = isDarkClearLV((dSv_player_status_b_c *)&DAT_804061e8, 0);
  291.                                                                     if (uVar2 == 0) {
  292.                                                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72e6);
  293.                                                                         if (condition == false) {
  294.                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4510);
  295.                                                                             if (condition == false) {
  296.                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4a40);
  297.                                                                                 if (condition == false) {
  298.                                                                                     chosenLayer = 6;
  299.                                                                                 }
  300.                                                                                 else {
  301.                                                                                     chosenLayer = 0;
  302.                                                                                 }
  303.                                                                             }
  304.                                                                             else {
  305.                                                                                 chosenLayer = 7;
  306.                                                                             }
  307.                                                                         }
  308.                                                                         else {
  309.                                                                             chosenLayer = 1;
  310.                                                                         }
  311.                                                                     }
  312.                                                                     else {
  313.                                                                         chosenLayer = 2;
  314.                                                                         dComIfG_get_timelayer(chosenLayer);
  315.                                                                     }
  316.                                                                 }
  317.                                                                 else {
  318.                                                                     chosenLayer = 4;
  319.                                                                     dComIfG_get_timelayer(chosenLayer);
  320.                                                                 }
  321.                                                             }
  322.                                                             else {
  323.                                                                 if (roomId == 1) {
  324.                                                                     uVar2 = isDarkClearLV((dSv_player_status_b_c *)&DAT_804061e8, 0);
  325.                                                                     if (uVar2 == 0) {
  326.                                                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72e6);
  327.                                                                         if (condition == false) {
  328.                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4510);
  329.                                                                             if (condition == false) {
  330.                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4a40);
  331.                                                                                 if (condition == false) {
  332.                                                                                     chosenLayer = 3;
  333.                                                                                 }
  334.                                                                                 else {
  335.                                                                                     chosenLayer = 4;
  336.                                                                                 }
  337.                                                                             }
  338.                                                                             else {
  339.                                                                                 chosenLayer = 0;
  340.                                                                             }
  341.                                                                         }
  342.                                                                         else {
  343.                                                                             chosenLayer = 1;
  344.                                                                         }
  345.                                                                     }
  346.                                                                     else {
  347.                                                                         chosenLayer = 2;
  348.                                                                     }
  349.                                                                 }
  350.                                                             }
  351.                                                         }
  352.                                                         else {
  353.                                                             stageComparison = strcmp(stageName, "R_SP01");
  354.                                                             if (stageComparison == 0) {
  355.                                                                 if (roomId == 1) {
  356.                                                                     uVar2 = isDarkClearLV((dSv_player_status_b_c *)&DAT_804061e8, 0);
  357.                                                                     if (uVar2 != 0) {
  358.                                                                         chosenLayer = 2;
  359.                                                                     }
  360.                                                                 }
  361.                                                                 else {
  362.                                                                     if (roomId == 2) {
  363.                                                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x780);
  364.                                                                         if (condition == false) {
  365.                                                                             uVar2 = isDarkClearLV((dSv_player_status_b_c *)&DAT_804061e8
  366.                                                                                 , 0);
  367.                                                                             if (uVar2 == 0) {
  368.                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  369.                                                                                     DAT_803a72e6);
  370.                                                                                 if (condition != false) {
  371.                                                                                     chosenLayer = 1;
  372.                                                                                 }
  373.                                                                             }
  374.                                                                             else {
  375.                                                                                 chosenLayer = 2;
  376.                                                                             }
  377.                                                                         }
  378.                                                                         else {
  379.                                                                             chosenLayer = 3;
  380.                                                                         }
  381.                                                                     }
  382.                                                                     else {
  383.                                                                         if (roomId == 5) {
  384.                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x601);
  385.                                                                             if (condition == false) {
  386.                                                                                 uVar2 = isDarkClearLV((dSv_player_status_b_c *)
  387.                                                                                     &DAT_804061e8, 0);
  388.                                                                                 if (uVar2 != 0) {
  389.                                                                                     chosenLayer = 2;
  390.                                                                                 }
  391.                                                                             }
  392.                                                                             else {
  393.                                                                                 chosenLayer = 4;
  394.                                                                             }
  395.                                                                         }
  396.                                                                     }
  397.                                                                 }
  398.                                                             }
  399.                                                             else {
  400.                                                                 stageComparison = strcmp(stageName, "F_SP104");
  401.                                                                 if (stageComparison == 0) {
  402.                                                                     if (roomId == 1) {
  403.                                                                         uVar2 = isDarkClearLV((dSv_player_status_b_c *)&DAT_804061e8, 0
  404.                                                                         );
  405.                                                                         if (uVar2 == 0) {
  406.                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72e6
  407.                                                                             );
  408.                                                                             if (condition == false) {
  409.                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4510);
  410.                                                                                 if (condition == false) {
  411.                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4a20);
  412.                                                                                     if (condition == false) {
  413.                                                                                         chosenLayer = 1;
  414.                                                                                     }
  415.                                                                                     else {
  416.                                                                                         chosenLayer = 3;
  417.                                                                                     }
  418.                                                                                 }
  419.                                                                                 else {
  420.                                                                                     chosenLayer = 0;
  421.                                                                                 }
  422.                                                                             }
  423.                                                                             else {
  424.                                                                                 chosenLayer = 4;
  425.                                                                             }
  426.                                                                         }
  427.                                                                         else {
  428.                                                                             chosenLayer = 2;
  429.                                                                         }
  430.                                                                     }
  431.                                                                     else {
  432.                                                                         uVar2 = isDarkClearLV((dSv_player_status_b_c *)&DAT_804061e8, 0
  433.                                                                         );
  434.                                                                         if (uVar2 == 0) {
  435.                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72e6
  436.                                                                             );
  437.                                                                             if (condition != false) {
  438.                                                                                 chosenLayer = 4;
  439.                                                                             }
  440.                                                                         }
  441.                                                                         else {
  442.                                                                             chosenLayer = 2;
  443.                                                                         }
  444.                                                                     }
  445.                                                                 }
  446.                                                                 else {
  447.                                                                     stageComparison = strcmp(stageName, "F_SP00");
  448.                                                                     if (stageComparison == 0) {
  449.                                                                         uVar2 = isDarkClearLV((dSv_player_status_b_c *)&DAT_804061e8, 0
  450.                                                                         );
  451.                                                                         if (uVar2 == 0) {
  452.                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a72e6
  453.                                                                             );
  454.                                                                             if (condition == false) {
  455.                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  456.                                                                                     DAT_803a73da);
  457.                                                                                 if (condition == false) {
  458.                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4510);
  459.                                                                                     if (condition == false) {
  460.                                                                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4a40
  461.                                                                                         );
  462.                                                                                         if (condition == false) {
  463.                                                                                             chosenLayer = 0xc;
  464.                                                                                         }
  465.                                                                                         else {
  466.                                                                                             chosenLayer = 0xb;
  467.                                                                                         }
  468.                                                                                     }
  469.                                                                                     else {
  470.                                                                                         chosenLayer = 9;
  471.                                                                                     }
  472.                                                                                 }
  473.                                                                                 else {
  474.                                                                                     chosenLayer = 10;
  475.                                                                                 }
  476.                                                                             }
  477.                                                                             else {
  478.                                                                                 chosenLayer = 1;
  479.                                                                             }
  480.                                                                         }
  481.                                                                         else {
  482.                                                                             chosenLayer = 2;
  483.                                                                             dComIfG_get_timelayer(chosenLayer);
  484.                                                                         }
  485.                                                                     }
  486.                                                                     else {
  487.                                                                         stageComparison = strcmp(stageName, "F_SP121");
  488.                                                                         if (stageComparison == 0) {
  489.                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x1e08);
  490.                                                                             if (condition == false) {
  491.                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0xc01);
  492.                                                                                 if (condition == false) {
  493.                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  494.                                                                                         DAT_803a7310);
  495.                                                                                     if (condition == false) {
  496.                                                                                         condition = isEventBit((dSv_event_c *)&DAT_80406f98, 0x601)
  497.                                                                                             ;
  498.                                                                                         if (condition != false) {
  499.                                                                                             condition = isEventBit((dSv_event_c *)&DAT_80406f98,
  500.                                                                                                 0x602);
  501.                                                                                             if (condition == false) {
  502.                                                                                                 chosenLayer = 3;
  503.                                                                                             }
  504.                                                                                             else {
  505.                                                                                                 chosenLayer = 2;
  506.                                                                                             }
  507.                                                                                         }
  508.                                                                                     }
  509.                                                                                     else {
  510.                                                                                         chosenLayer = 0;
  511.                                                                                     }
  512.                                                                                 }
  513.                                                                                 else {
  514.                                                                                     chosenLayer = 4;
  515.                                                                                 }
  516.                                                                             }
  517.                                                                             else {
  518.                                                                                 chosenLayer = 6;
  519.                                                                             }
  520.                                                                         }
  521.                                                                         else {
  522.                                                                             stageComparison = strcmp(stageName, "F_SP122");
  523.                                                                             if (stageComparison == 0) {
  524.                                                                                 if (roomId == 8) {
  525.                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x1e08);
  526.                                                                                     if (condition == false) {
  527.                                                                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0xc01)
  528.                                                                                             ;
  529.                                                                                         if (condition != false) {
  530.                                                                                             chosenLayer = 4;
  531.                                                                                         }
  532.                                                                                     }
  533.                                                                                     else {
  534.                                                                                         chosenLayer = 6;
  535.                                                                                     }
  536.                                                                                 }
  537.                                                                                 else {
  538.                                                                                     if (roomId == 0x10) {
  539.                                                                                         condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2204
  540.                                                                                         );
  541.                                                                                         if (condition == false) {
  542.                                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  543.                                                                                                 0x2102);
  544.                                                                                             if (condition == false) {
  545.                                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  546.                                                                                                     0x1e08);
  547.                                                                                                 if (condition == false) {
  548.                                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  549.                                                                                                         0xc01);
  550.                                                                                                     if (condition != false) {
  551.                                                                                                         chosenLayer = 4;
  552.                                                                                                     }
  553.                                                                                                 }
  554.                                                                                                 else {
  555.                                                                                                     chosenLayer = 6;
  556.                                                                                                 }
  557.                                                                                             }
  558.                                                                                             else {
  559.                                                                                                 chosenLayer = 1;
  560.                                                                                             }
  561.                                                                                         }
  562.                                                                                         else {
  563.                                                                                             chosenLayer = 6;
  564.                                                                                         }
  565.                                                                                     }
  566.                                                                                     else {
  567.                                                                                         if (roomId == 0x11) {
  568.                                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  569.                                                                                                 0x1e08);
  570.                                                                                             if (condition == false) {
  571.                                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  572.                                                                                                     0xc01);
  573.                                                                                                 if (condition != false) {
  574.                                                                                                     chosenLayer = 4;
  575.                                                                                                 }
  576.                                                                                             }
  577.                                                                                             else {
  578.                                                                                                 chosenLayer = 0;
  579.                                                                                             }
  580.                                                                                         }
  581.                                                                                     }
  582.                                                                                 }
  583.                                                                             }
  584.                                                                             else {
  585.                                                                                 stageComparison = strcmp(stageName, "F_SP128");
  586.                                                                                 if (stageComparison == 0) {
  587.                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x2320);
  588.                                                                                     if (condition != false) {
  589.                                                                                         chosenLayer = 1;
  590.                                                                                     }
  591.                                                                                 }
  592.                                                                                 else {
  593.                                                                                     stageComparison = strcmp(stageName, "R_SP160");
  594.                                                                                     if (stageComparison == 0) {
  595.                                                                                         if (roomId == 5) {
  596.                                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  597.                                                                                                 0x1e08);
  598.                                                                                             if (condition == false) {
  599.                                                                                                 chosenLayer = 1;
  600.                                                                                             }
  601.                                                                                             else {
  602.                                                                                                 chosenLayer = 0;
  603.                                                                                             }
  604.                                                                                         }
  605.                                                                                         else {
  606.                                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  607.                                                                                                 0x2210);
  608.                                                                                             if (condition != false) {
  609.                                                                                                 chosenLayer = 1;
  610.                                                                                             }
  611.                                                                                         }
  612.                                                                                     }
  613.                                                                                     else {
  614.                                                                                         stageComparison = strcmp(stageName, "F_SP117");
  615.                                                                                         if (stageComparison == 0) {
  616.                                                                                             condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  617.                                                                                                 0x2008);
  618.                                                                                             if (condition != false) {
  619.                                                                                                 chosenLayer = 2;
  620.                                                                                             }
  621.                                                                                         }
  622.                                                                                         else {
  623.                                                                                             stageComparison = strcmp(stageName, "F_SP118");
  624.                                                                                             if (stageComparison == 0) {
  625.                                                                                                 condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  626.                                                                                                     0x2b08);
  627.                                                                                                 if (condition == false) {
  628.                                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  629.                                                                                                         0x2010);
  630.                                                                                                     if (condition == false) {
  631.                                                                                                         condition = isEventBit((dSv_event_c *)
  632.                                                                                                             &DAT_804069b0, 0xb40);
  633.                                                                                                         if (condition != false) {
  634.                                                                                                             chosenLayer = 1;
  635.                                                                                                         }
  636.                                                                                                     }
  637.                                                                                                     else {
  638.                                                                                                         chosenLayer = 2;
  639.                                                                                                     }
  640.                                                                                                 }
  641.                                                                                                 else {
  642.                                                                                                     chosenLayer = 3;
  643.                                                                                                 }
  644.                                                                                             }
  645.                                                                                             else {
  646.                                                                                                 stageComparison = strcmp(stageName, "D_SB10");
  647.                                                                                                 if (stageComparison == 0) {
  648.                                                                                                     condition = isEventBit((dSv_event_c *)&DAT_804069b0,
  649.                                                                                                         0x4510);
  650.                                                                                                     if (condition != false) {
  651.                                                                                                         chosenLayer = 1;
  652.                                                                                                     }
  653.                                                                                                 }
  654.                                                                                                 else {
  655.                                                                                                     stageComparison = strcmp(stageName, "R_SP107");
  656.                                                                                                     if (stageComparison == 0) {
  657.                                                                                                         stageComparison = isTransformLV((dSv_player_status_b_c *
  658.                                                                                                             )&DAT_804061e8, 3);
  659.                                                                                                         if (stageComparison != 0) {
  660.                                                                                                             chosenLayer = 0xd;
  661.                                                                                                         }
  662.                                                                                                     }
  663.                                                                                                     else {
  664.                                                                                                         stageComparison = strcmp(stageName, "D_MN09");
  665.                                                                                                         if (stageComparison == 0) {
  666.                                                                                                             if (((roomId != 0xb) && (roomId != 0xd)) &&
  667.                                                                                                                 (roomId != 0xe)) {
  668.                                                                                                                 chosenLayer = 1;
  669.                                                                                                             }
  670.                                                                                                         }
  671.                                                                                                         else {
  672.                                                                                                             stageComparison = strcmp(stageName, "F_SP127");
  673.                                                                                                             if ((stageComparison == 0) ||
  674.                                                                                                                 (stageComparison = strcmp(stageName, "R_SP127"),
  675.                                                                                                                     stageComparison == 0)) {
  676.                                                                                                                 if (DAT_8042dd52 == 3) {
  677.                                                                                                                     chosenLayer = 2;
  678.                                                                                                                 }
  679.                                                                                                                 else {
  680.                                                                                                                     if (DAT_8042dd52 < 3) {
  681.                                                                                                                         if (DAT_8042dd52 == 1) {
  682.                                                                                                                             chosenLayer = 0;
  683.                                                                                                                         }
  684.                                                                                                                         else {
  685.                                                                                                                             if (DAT_8042dd52 != 0) {
  686.                                                                                                                                 chosenLayer = 1;
  687.                                                                                                                             }
  688.                                                                                                                         }
  689.                                                                                                                     }
  690.                                                                                                                     else {
  691.                                                                                                                         if (DAT_8042dd52 < 5) {
  692.                                                                                                                             chosenLayer = 3;
  693.                                                                                                                         }
  694.                                                                                                                     }
  695.                                                                                                                 }
  696.                                                                                                             }
  697.                                                                                                         }
  698.                                                                                                     }
  699.                                                                                                 }
  700.                                                                                             }
  701.                                                                                         }
  702.                                                                                     }
  703.                                                                                 }
  704.                                                                             }
  705.                                                                         }
  706.                                                                     }
  707.                                                                 }
  708.                                                             }
  709.                                                         }
  710.                                                     }
  711.                                                 }
  712.                                             }
  713.                                         }
  714.                                     }
  715.                                 }
  716.                             }
  717.                         }
  718.                     }
  719.                 }
  720.             }
  721.         }
  722.     }
  723. stateECheck:
  724.     if (chosenLayer == 0xE) {
  725.         condition = isEventBit((dSv_event_c *)&DAT_804069b0, DAT_803a730a);
  726.         if ((condition != false) &&
  727.             ((((stageComparison = strcmp(stageName, "F_SP112"), stageComparison == 0 ||
  728.             (stageComparison = strcmp(stageName, "F_SP113"), stageComparison == 0)) ||
  729.                 ((stageComparison = strcmp(stageName, "F_SP115"), stageComparison == 0 ||
  730.                 (stageComparison = strcmp(stageName, "F_SP116"), stageComparison == 0)))) ||
  731.                     (((stageComparison = strcmp(stageName, "R_SP116"), stageComparison == 0 && (roomId == 5)) ||
  732.                 ((stageComparison = strcmp(stageName, "R_SP115"), stageComparison == 0 ||
  733.                         (((stageComparison = strcmp(stageName, "F_SP121"), stageComparison == 0 ||
  734.                     (stageComparison = strcmp(stageName, "F_SP126"), stageComparison == 0)) ||
  735.                             (stageComparison = strcmp(stageName, "F_SP122"), stageComparison == 0)))))))))) {
  736.             stageComparison = strcmp(stageName, "F_SP121");
  737.             if (stageComparison == 0) {
  738.                 if ((8 < roomId) && (roomId < 0xf)) {
  739.                     chosenLayer = 0xD;
  740.                 }
  741.             }
  742.             else {
  743.                 chosenLayer = 0xD;
  744.             }
  745.         }
  746.         stageComparison = strcmp(stageName, "R_SP107");
  747.         if ((stageComparison == 0) && (roomId == 0)) {
  748.             condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x4d08);
  749.             if (condition == false) {
  750.                 chosenLayer = 0xb;
  751.             }
  752.         }
  753.         else {
  754.             stageComparison = strcmp(stageName, "D_MN08A");
  755.             if ((stageComparison == 0) && (roomId == 10)) {
  756.                 condition = isEventBit((dSv_event_c *)&DAT_804069b0, 0x5410);
  757.                 if (condition == false) {
  758.                     chosenLayer = 0;
  759.                 }
  760.                 else {
  761.                     chosenLayer = 1;
  762.                 }
  763.             }
  764.         }
  765.     }
  766.  
  767.     return chosenLayer;
  768. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement