I have a problem: display flickering in my batch game.
I do not know how to correct this, so i'm putting my code here:
Code: Select all
@echo off
setlocal enabledelayedexpansion
:setup
set L=
set R=
set TL=Ú
set TR=¿
set BL=À
set BR=Ù
set T=Ä
set S=³
set char=X
:1
cls
for /l %%a in (1 1 1) do (<nul set /p "=%TL%")
for /l %%a in (1 1 33) do (<nul set /p "=%T%")
for /l %%a in (1 1 1) do (<nul set /p "=%TR%")
for /l %%a in (1 1 12) do (echo %S%%L% %R%%S%)
echo %S%%L%%char%%R%%S%
for /l %%a in (1 -1 12) do (echo %S%%L% %R%%S%)
for /l %%a in (1 1 1) do (<nul set /p "=%BL%")
for /l %%a in (1 1 33) do (<nul set /p "=%T%")
for /l %%a in (1 1 1) do (<nul set /p "=%BR%")
echo.
choice /c ADS /m "S resets"
if %errorlevel%==1 (call:Left) else if %errorlevel%==2 (call:Right) else (goto :setup)
goto :1
pause
exit /b
:Left
if defined L (
set "R=%L:~-1%%R%"
set "L=%L:~0,-1%"
)
goto:eof
:Right
if defined R (
set "L=%R:~0,1%%L%"
set "R=%R:~1%"
)
goto:eof