| |
Formulario de pegado de código/texto |
|
| Lenguaje: c |
| Nickname: Ceritium |
| Descripción: Sin descripción |
| Descargar Codigo |
########################################################## ## ## By Ceritium ## ceritium@gmail.com http://ceritium.blogsome.com ## ## Este codigo es de libre uso y distribución, si quieres hacer una reseña a ## a su autor se agradece. ## ########################################################## #include "allegro.h" #include "stdio.h" #include "math.h" main() { int x; int y; int color; x=130; y=50; allegro_init(); install_keyboard(); install_timer(); set_gfx_mode(GFX_AUTODETECT,320,200,0,0); do{ //color=rand()%255; putpixel(screen, x, y,color); if (key[KEY_LEFT]) { if (x<1) { x=1; } x = x- 1; printf( "%i,%i %i left\n", x,y,color ); } if (key[KEY_RIGHT]) { if (x>319) { x=319;} x = x+ 1; printf( "%i,%i %i right\n", x,y,color ); } if (key[KEY_DOWN]) { if (y>199) { y=199; } y = y+ 1; printf( "%i,%i %i down\n", x,y,color ); } if (key[KEY_UP]) { if (y<1) { y=1; } y = y- 1; printf( "%i,%i %i up\n", x,y,color ); } if (key [KEY_SPACE ]) { color=rand ()% 255; printf( "%i,%i %i \n", x,y,color ); } -
-
}while(!key[KEY_ESC]); }END_OF_MAIN();
|
|
|
|
|
|
|
| Nota: Script en constante desarrollo, por favor los bugs que encuentres y sugerencias te ruego los remitas clicando en este enlace Cuando pensemos que el script es seguro y estable será liberado para su libre uso. |
|
|
|
|