AYUDA! CON GRAFICOS DE CONSOLA | HELP WITH CONSOLE GRAPHICS
Posted: 21 Oct 2019 14:54
Hola Me llamo DQ2000. soy nuevo en esto y queria que me ayuden con mi script para los apacionados al 'batch grafico'
Hello My name is DQ2000. I am new to this and I wanted you to help me with my script for those appearing in the 'graphic batch'
tengo un bufer de consola, y implemente el algoritmo de doble buffer. cuando se grafica un solo sprite no pardea sale bien, . pero ala hora de aser algoritmo para que tome una cadena de sprites este parpadea toda la pantalla, ....
I have a console buffer, and it implements the double buffer algorithm. when a single sprite is plotted, it does not flash out well, . but at the time of making algorithm so that it takes a string of sprites this flashes the whole screen, ....
######################################################################################################################
CODE
######################################################################################################################
while(A<argc){
X=atof(argv[A+1]);
Y=atof(argv[A+2]);
FILE *archivo = fopen(argv[A], "r");
char c[A];
while ((c[A] = fgetc(archivo))!= EOF)
{
// Primeros colores.
if (c[A]==48){colores=0;}
if (c[A]==49){colores=1;}
if (c[A]==50){colores=2;}
if (c[A]==51){colores=3;}
if (c[A]==52){colores=4;}
if (c[A]==53){colores=5;}
if (c[A]==54){colores=6;}
if (c[A]==55){colores=7;}
if (c[A]==56){colores=8;}
if (c[A]==57){colores=9;}
// Segundos colores.
if (c[A]==97){colores=10;}
if (c[A]==98){colores=11;}
if (c[A]==99){colores=12;}
if (c[A]==100){colores=13;}
if (c[A]==101){colores=14;}
if (c[A]==102){colores=15;}
if (c[A]==10){o++;i=-1;} else {
if (c[A]==32||c[A]==46){i=i;} else {
x=i+X,y=o+Y;
consoleBuffer[x + WIDTH * y].Char.AsciiChar = (unsigned char)219;
consoleBuffer[x + HEIGHT * y].Attributes = colores;
}
}
i++;
}
i=0, o=0;
fclose(archivo);
WriteConsoleOutputA(wHnd,consoleBuffer,characterBufferSize,characterPosition,&consoleWriteArea);
A+=3;
}
Hello My name is DQ2000. I am new to this and I wanted you to help me with my script for those appearing in the 'graphic batch'
tengo un bufer de consola, y implemente el algoritmo de doble buffer. cuando se grafica un solo sprite no pardea sale bien, . pero ala hora de aser algoritmo para que tome una cadena de sprites este parpadea toda la pantalla, ....
I have a console buffer, and it implements the double buffer algorithm. when a single sprite is plotted, it does not flash out well, . but at the time of making algorithm so that it takes a string of sprites this flashes the whole screen, ....
######################################################################################################################
CODE
######################################################################################################################
while(A<argc){
X=atof(argv[A+1]);
Y=atof(argv[A+2]);
FILE *archivo = fopen(argv[A], "r");
char c[A];
while ((c[A] = fgetc(archivo))!= EOF)
{
// Primeros colores.
if (c[A]==48){colores=0;}
if (c[A]==49){colores=1;}
if (c[A]==50){colores=2;}
if (c[A]==51){colores=3;}
if (c[A]==52){colores=4;}
if (c[A]==53){colores=5;}
if (c[A]==54){colores=6;}
if (c[A]==55){colores=7;}
if (c[A]==56){colores=8;}
if (c[A]==57){colores=9;}
// Segundos colores.
if (c[A]==97){colores=10;}
if (c[A]==98){colores=11;}
if (c[A]==99){colores=12;}
if (c[A]==100){colores=13;}
if (c[A]==101){colores=14;}
if (c[A]==102){colores=15;}
if (c[A]==10){o++;i=-1;} else {
if (c[A]==32||c[A]==46){i=i;} else {
x=i+X,y=o+Y;
consoleBuffer[x + WIDTH * y].Char.AsciiChar = (unsigned char)219;
consoleBuffer[x + HEIGHT * y].Attributes = colores;
}
}
i++;
}
i=0, o=0;
fclose(archivo);
WriteConsoleOutputA(wHnd,consoleBuffer,characterBufferSize,characterPosition,&consoleWriteArea);
A+=3;
}