Rewrote twrpgraphics.c based on the original graphics.c for CWM.

TWRP isn't working, at all, hopefully this will fix that.