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;
}
AYUDA! CON GRAFICOS DE CONSOLA | HELP WITH CONSOLE GRAPHICS
Moderator: DosItHelp
Re: AYUDA! CON GRAFICOS DE CONSOLA | HELP WITH CONSOLE GRAPHICS
I'm not sure how that is connected to any batch, you could use code tags ([code][/code]),
also you should provide enough code for a standalone working sample that produces the issue you want to solve.
What exactly do you mean by "flashes the (...) screen" ? (Do you mean that the background turns black?)
However it is unusual to change the color and attributes of different cells ("x + WIDTH * y" versus "x + HEIGHT * y"), which might cause errors:
Also you should check if your indices are within the "consoleBuffer" array, else (potentially) you are overwriting other meaningfull data.
penpen
also you should provide enough code for a standalone working sample that produces the issue you want to solve.
What exactly do you mean by "flashes the (...) screen" ? (Do you mean that the background turns black?)
However it is unusual to change the color and attributes of different cells ("x + WIDTH * y" versus "x + HEIGHT * y"), which might cause errors:
Code: Select all
consoleBuffer[x + WIDTH * y].Char.AsciiChar = (unsigned char)219;
consoleBuffer[x + HEIGHT * y].Attributes = colores;
penpen
Re: AYUDA! CON GRAFICOS DE CONSOLA | HELP WITH CONSOLE GRAPHICS
Hello!.
Sorry, fix the error. the error was that it sent to show the images on screen in each character then it was blinking
Sorry, fix the error. the error was that it sent to show the images on screen in each character then it was blinking