The First Visit in the Port
Enter the port and grab the torch (it is next to the gate). Go back to the pier and use the torch and the cannon. Shoot at the gate in front of you. 
At the market look for two wheels and assemble them to the cart (one is near the well, the other near the wall).  Feed the horse with the fruit (you can find it next to the well) and use the animal's strength to move away the cart.  Move on to the right.
Sleeping Mr. Gibbs
Come towards sleeping Mr. Gibbs and destroy big bright chest. Build a shelf out of it and wait till the objects fall down. Lift the winch, connect it with the mechanism and use it. 
Lower the ladder grabbing the green bar,  climb. Take the wooden bowl and put it on the green floor panel next to the pool with water. Use the nearby switch (you need a character with the sword).
Take the bowl full with water and jump down. Spill it over the sleeping character.  Use Mr. Gibbs's hammer to repair the mechanism next to the gate leading to the previous map. 
Back to the courtyard
Use Mr. Gibbs to repair the stove on the market.  Take the torch and use the explosives on the road to the wharf. 
Go to the basement and at the end of the tunnel use Jack's compass to find the treasure (the pistol).  You can dig it up using the spade which lies nearby and give the pistol to the pirate on the left..
Use Marty to enter the vent in the wall.  On the other side shoot at the silver bricks. 
Go back to the main room and use the pistol once again - aim at the silver junk which falls down on the right.  Use the ladder to enter the room full of people having a good time. Use Mr. Gibbs to repair the machine which stands by the wall (red bricks).
You can climb up using the chandeliers - start with the one on the very right and jump to the others grabbing the green bars.  Take the passage in front of you. Anamaria will agree to join you if you give her the object which falls down from the big, brown sideboard. 
Anamaria can perform the double jump - therefore you can roll down two blinds (the places are indicated by the colorful elements on the floor).  Go outside and using the green bars jump over the roofs. Go to the end of the balcony and throw down the rectangular chest. 
Jump down at the market and take the music box to the given place (green floor panel).  Get inside the building. Move the chest on the left and climb up on the balcony.
Attack the character fighting the parrot.  Follow the bird and get on the other side (using the plank). Eventually you will have to jump on the chandelier.
When the parrot comes back to Cotton you need to come back to the first map and get into the boat.