Resistive ballooning modes in high-beta tokamaks