Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - sanxez1

#31
Programación C/C++ / Re: aiudaaa!!!
5 Septiembre 2016, 00:21 AM
Después de modificar el código funcionó.
#32
Programación C/C++ / Re: aiudaaa!!!
4 Septiembre 2016, 11:40 AM
Muchísimas gracias a todos, ya funciona!!
#33
Programación C/C++ / Re: aiudaaa!!!
3 Septiembre 2016, 14:14 PM
me sigue saliendo lo mismo
#34
Programación C/C++ / Re: aiudaaa!!!
2 Septiembre 2016, 16:25 PM
me sigue saliendo el mismo error...
#35
Programación C/C++ / aiudaaa!!!
2 Septiembre 2016, 16:17 PM
Llevo toda la mañana tratando soluconar el siguiente error: id returned 1 ext status
                                                                      undefined reference to `WinMain@16' (utilizo dev c++)

Utilizo el compilador TMD-GCC 4.9.2 32-BIT RELEASE

este es el codigo que trato de compilar:
#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>
#include <iostream>

int iniciar();
void realizar_juego();
void terminar();

int iniciar(){
allegro_init();
install_keyboard();
set_color_depth(16);
if (set_gfx_mode(GFX_AUTODETECT,640,480,0,0)<0){
printf("error al iniciar el modo grafico\n");
allegro_exit();
exit(-1);
}
}

void terminar(){
allegro_exit();
}
int main(){
iniciar();
realizar_juego();
terminar();
}
void realizar_juego(){

BITMAP *nave;
PALETTE paleta;
int x,y, x_anterior, y_anterior;
BITMAP * buffer;


nave=load_bitmap("C:/Users/DANIEL/Desktop/Programación/C++/Allegro/Naves/recursos/nave.pcx", paleta);
set_palette(paleta);
if (nave==NULL) terminar();
buffer=create_bitmap(nave->w,nave->h);
clear (buffer);
if (buffer==NULL) terminar();
x=SCREEN_W/2;
y=SCREEN_H/2;

while (!key[KEY_ESC]){

if (key[KEY_UP,KEY_W])
y--;
if (key[KEY_DOWN,KEY_S])
y++;
if (key[KEY_LEFT,KEY_A])
x--;
if (key[KEY_RIGHT,KEY_D])
x++;

if (x<0) x=x_anterior;
if (x>SCREEN_W-nave->w) x=x_anterior;
if (y<0) y=y_anterior;
if (y>SCREEN_H-nave->h) y=y_anterior;
if ((x_anterior!=x) || (y_anterior!=y)){
blit (buffer,screen, 0, 0, x_anterior, y_anterior,buffer->w,buffer->h);
blit (screen,buffer,x,y,0,0,buffer->w,buffer->h);
draw_sprite(screen,nave, x, y);
}
x_anterior=x;
y_anterior=y;


}
}
gracias!!
#36
Programación C/C++ / Re: c++
2 Septiembre 2016, 16:11 PM
perdon soy nuevo :P
#37
Programación C/C++ / c++
2 Septiembre 2016, 15:41 PM
el caso es que cuando intento compilar en c++ me dice: error id returned 1 exit status, llevo toda la mañana buscando en internet y no encuentro nada que me sirva, ayuda por favor!!