Added whirlpools, altered JRB ship warp

This commit is contained in:
deanff 2022-03-10 12:49:46 +09:30
parent 43a0dea5b9
commit 31988e70e7
3 changed files with 45 additions and 6 deletions

View file

@ -495,7 +495,7 @@ static void remain_mod_objects(struct SpawnInfo *spawnInfo)
}
if ((gCurrLevelNum == LEVEL_JRB) && (spawnInfo->behaviorScript == spinWarpAreaOne))
{
remain_mod_place_objects(MODEL_NONE, 5300, 1650, 2500, 0, -90, 0, 0x000B0000, (void *)bhvFadingWarp);
remain_mod_place_objects(MODEL_NONE, 5250, 1650, 2500, 0, -90, 0, 0x000B0000, (void *)bhvFadingWarp);
}
if (gCurrLevelNum == LEVEL_CCM)
{
@ -586,6 +586,23 @@ static void remain_mod_objects(struct SpawnInfo *spawnInfo)
}
}
static void remain_mod_create_whirlpool(u8 index, u8 id, s16 pX, s16 pY, s16 pZ, s16 strength)
{
struct Whirlpool *whirlpool;
if (sCurrAreaIndex != -1 && index < 2)
{
if ((whirlpool = gAreas[sCurrAreaIndex].whirlpools[index]) == NULL)
{
whirlpool = alloc_only_pool_alloc(sLevelPool, sizeof(struct Whirlpool));
gAreas[sCurrAreaIndex].whirlpools[index] = whirlpool;
}
vec3s_set(whirlpool->pos, pX, pY, pZ);
whirlpool->strength = strength;
}
}
static void remain_mod_create_warp_nodes(u8 id, u8 destLevel, u8 destArea, u8 destNode)
{
struct ObjectWarpNode *warpNode = alloc_only_pool_alloc(sLevelPool, sizeof(struct ObjectWarpNode));
@ -615,6 +632,12 @@ static void remain_mod_warp_nodes(struct ObjectWarpNode *warpNode)
if (sCurrAreaIndex == 1)
{
remain_mod_create_warp_nodes(0x0B, LEVEL_JRB, 0x01, 0x0B);
if (gCurrActNum == 1)
{
// Create whirlpool with strength (-30) set to zero
remain_mod_create_whirlpool(0, 3, 4979, -5222, 2482, 0);
}
}
else if (sCurrAreaIndex == 2)
{
@ -650,13 +673,25 @@ static void remain_mod_warp_nodes(struct ObjectWarpNode *warpNode)
}
if ((gCurrLevelNum == LEVEL_DDD) && (warpNode->node.id == lastWarpNodeInArea))
{
remain_mod_create_warp_nodes(0x0B, LEVEL_DDD, 0x02, 0x0C);
remain_mod_create_warp_nodes(0x0C, LEVEL_DDD, 0x02, 0x0C);
if (sCurrAreaIndex == 2)
{
remain_mod_create_warp_nodes(0x0B, LEVEL_DDD, 0x02, 0x0C);
remain_mod_create_warp_nodes(0x0C, LEVEL_DDD, 0x02, 0x0C);
if ((gCurrActNum == 1) && (configBowsersSub))
{
// Create whirlpool with strength (50) set to zero
remain_mod_create_whirlpool(1, 2, 3917, -2040, -6041, 0);
}
}
}
if ((gCurrLevelNum == LEVEL_SL) && (warpNode->node.id == lastWarpNodeInArea))
{
remain_mod_create_warp_nodes(0x0F, LEVEL_SL, 0x01, 0x20);
remain_mod_create_warp_nodes(0x20, LEVEL_SL, 0x01, 0x20);
if (sCurrAreaIndex == 1)
{
remain_mod_create_warp_nodes(0x0F, LEVEL_SL, 0x01, 0x20);
remain_mod_create_warp_nodes(0x20, LEVEL_SL, 0x01, 0x20);
}
}
if ((gCurrLevelNum == LEVEL_THI) && (warpNode->node.id == lastWarpNodeInArea))
{

View file

@ -855,7 +855,7 @@ void remain_mod_spawn_objects(struct Object *o)
{
spawn_object_abs_with_rot_degrees(o, 0, MODEL_NONE, bhvFadingWarp, 0x00230000, 0, -1176, -3700, 0, 0, 0);
}
if ((gCurrCourseNum == COURSE_DDD) && (gLastCompletedStarNum == 1))
if ((gCurrCourseNum == COURSE_DDD) && (gLastCompletedStarNum == 1) && (configBowsersSub))
{
spawn_object_abs_with_rot_degrees(o, 0, MODEL_NONE, bhvFadingWarp, 0x000B0000, 3900, 571, -600, 0, 0, 0);
}

View file

@ -545,6 +545,8 @@ void remain_mod_load_area()
spawn_object_abs_with_rot_degrees(spawnNode->object, 0, MODEL_NONE, bhvJetStream, 0x00000000, 4988, -5221, 2473, 0, 0, 0);
spawn_object_abs_with_rot_degrees(spawnNode->object, 0, MODEL_BOBOMB_BUDDY, bhvBobombBuddyOpensCannon, 0x00000000, -1956, 1331, 6500, 0, 0, 0);
spawn_object_abs_with_rot_degrees(spawnNode->object, 0, MODEL_UNAGI, bhvUnagi, 0x01010000, 8270, -3130, 1846, 0, 285, 0);
gCurrentArea->whirlpools[0]->strength = -30;
}
if ((gCurrCourseNum == COURSE_DDD) && (spawnNode->object->oBehParams == 0x000C0000))
{
@ -571,6 +573,8 @@ void remain_mod_load_area()
spawn_object_abs_with_rot_degrees(spawnNode->object, 0, MODEL_DDD_POLE, bhvDDDPole, 0x00170000, 5760, 1005, 360, 0, 270, 0);
spawn_object_abs_with_rot_degrees(spawnNode->object, 0, MODEL_DDD_POLE, bhvDDDPole, 0x00170000, 3310, 1005, -1945, 0, 0, 0);
spawn_object_abs_with_rot_degrees(spawnNode->object, 0, MODEL_DDD_POLE, bhvDDDPole, 0x000D0000, 3550, 1005, -2250, 0, 0, 0);
gCurrentArea->whirlpools[1]->strength = 50;
}
if ((gCurrCourseNum == COURSE_TTC) && (spawnNode->object->oBehParams == 0x000C0000))
{