Was it in a building or outside? If they burn inside, they're toast, outside they don't usually get that hot. Pull the valve covers, if the gaskets are just charred and the springs are good, the engine didn't get that hot.
One factor is fuel injection. Some fires start with the engine running, and by the time enough stuff burns off to kill the engine and shut down the electric fuel pump, there's enough gas under the hood to screw everything completely. Saw a 302 Mustang do that, the interior wasn't even scorched, but the whole front end melted.