[LameGFX] Fixed boundary conditions and added proper sign arithmetic so that the edge of screen box command no longer crashes; also reduced code size of box command and eliminated more variables.