Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1203,224 +1203,6 @@ void checkpoint_reattempt_loop_tutorial(



void move_from_montenevera_to_glaseado_gym(SingleSwitchProgramEnvironment& env, ProControllerContext& context){
DirectionDetector direction;
direction.change_direction(env.program_info(), env.console, context, 1.255489);
pbf_move_left_joystick(context, 128, 0, 400, 50);

direction.change_direction(env.program_info(), env.console, context, 2.463760);
pbf_move_left_joystick(context, 128, 0, 1100, 50);


// marker 1 {0.585938, 0.236111}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 128, 255, 20},
FlyPoint::POKECENTER,
{0.585938, 0.236111}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 30, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);


// marker 2 cross bridge {0.719271, 0.585185}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 128, 255, 30},
FlyPoint::POKECENTER,
{0.719271, 0.585185}
);

get_on_ride(env.program_info(), env.console, context);

handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 128, 0, 500ms, 0ms);
pbf_controller_state(context, BUTTON_B, DPAD_NONE, 128, 0, 128, 128, 1000ms);
pbf_move_left_joystick(context, 128, 0, 500ms, 0ms);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);

get_off_ride(env.program_info(), env.console, context);

// marker 3 {0.73125, 0.481481}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 128, 255, 30},
FlyPoint::POKECENTER,
{0.73125, 0.481481}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){ // todo: get on ride?
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);


// marker 4 {0.691146, 0.347222}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 0, 0, 0},
FlyPoint::POKECENTER,
{0.691146, 0.347222}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);

// marker 5 {0.632292, 0.376852}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 0, 0, 0},
FlyPoint::POKECENTER,
{0.632292, 0.376852}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);


// marker 6 {0.61875, 0.432407} {0.610417, 0.42037}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 0, 0, 0},
FlyPoint::POKECENTER,
{0.610417, 0.42037}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);

// marker 7 {0.613542, 0.540741}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 0, 0, 0},
FlyPoint::POKECENTER,
{0.613542, 0.540741}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);

// marker 8 {0.588021, 0.578704}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::KEEP_ZOOM, 0, 0, 0},
FlyPoint::POKECENTER,
{0.588021, 0.578704}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);

// marker 9 {0.579167, 0.610185}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::ZOOM_IN, 0, 0, 0},
FlyPoint::POKECENTER,
{0.579167, 0.610185}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 16, 8, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);

// marker 10. end up next to Pokecenter {0.520833, 0.443519} {0.490625, 0.4}
place_marker_offset_from_flypoint(env.program_info(), env.console, context,
{ZoomChange::ZOOM_IN, 0, 0, 0},
FlyPoint::POKECENTER,
{0.490625, 0.4}
);
handle_when_stationary_in_overworld(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_MARKER, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 0, 20, 10, false);
},
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
pbf_move_left_joystick(context, 255, 255, 40, 50);
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_OLD_MARKER);
}
);


// marker 11. set marker past pokecenter
handle_unexpected_battles(env.program_info(), env.console, context,
[&](const ProgramInfo& info, VideoStream& stream, ProControllerContext& context){
realign_player(env.program_info(), env.console, context, PlayerRealignMode::REALIGN_NEW_MARKER, 210, 0, 50);
});
overworld_navigation(env.program_info(), env.console, context,
NavigationStopCondition::STOP_TIME, NavigationMovementMode::DIRECTIONAL_ONLY,
128, 15, 12, 12, false); // can't wrap in handle_when_stationary_in_overworld(), since we expect to be stationary when walking into the pokecenter


fly_to_overlapping_flypoint(env.program_info(), env.console, context);



}



void move_from_glaseado_gym_to_north_province_area_one(SingleSwitchProgramEnvironment& env, ProControllerContext& context){
context.wait_for_all_requests();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ void checkpoint_reattempt_loop_tutorial(



// moves player from Montenevera Pokecenter to Glaseado Gym Pokecenter
void move_from_montenevera_to_glaseado_gym(SingleSwitchProgramEnvironment& env, ProControllerContext& context);



Expand Down
Loading