Hogwarts corridors can be wandered between classes in Harry Potter and the Chamber of Secrets, EA's 2002 tie-in to the second book and film. That free roam is a step past the first game, so Harry learns spells in the castle and then uses them when the plot returns to the Chamber.
The basilisk, the diary, and the forbidden forest sit inside a school the player can cross on foot. Fred and George's shop energy is in the castle's side rooms, while classes gate the next spell.
The cube disc is that roaming Hogwarts. Players who only fought through levels in the earlier tie-in get a castle with a timetable.