Ported but broken

Was ported to SDL2, it compiles, but it doesn't work as expected