Zero-based coordinates for textmode.js