TNTeener Temat założony przez niniejszego użytkownika |
[Allegro]Process returned 0x3 » 2012-10-07 14:48:09 Witam. Z moim programem dzieje się tak że jak go włączę to wywala mi: This application has requested the runtime to terminate it in an unsual way. Please contact the aplication's support team for more information.
Process returned 3 <0x3> execution time : 1.313 s Press any key to countinue.
Kod programu: #include <allegro.h>
int main() { allegro_init(); set_window_title( "Zasypany Gornik (Wersja 0.1)" ); install_keyboard(); set_color_depth( 16 ); set_gfx_mode( GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0 ); BITMAP * mapa = NULL; BITMAP * ludek = NULL; BITMAP * bufor = NULL; bufor = create_bitmap( 640, 480 ); if( !bufor ) { set_gfx_mode( GFX_TEXT, 0, 0, 0, 0 ); allegro_message( "Error 001" ); allegro_exit(); return 0; } ludek = load_bmp( "tex/ludzik.bmp", default_palette ); mapa = load_bmp( "text/mapa.bmp", default_palette ); if( !ludek ) { set_gfx_mode( GFX_TEXT, 0, 0, 0, 0 ); allegro_message( "Error 002" ); allegro_exit(); return 0; } int kierunek = 0; int ludek_x = 100, ludek_y = 100; int mapa_x = 0, mapa_y = 0; while( !key[ KEY_ESC ] ) { if( key[ KEY_LEFT ] ) ludek_x--; if( key[ KEY_RIGHT ] ) ludek_x++; if( key[ KEY_UP ] ) ludek_y--; if( key[ KEY_DOWN ] ) ludek_y++; if( key[ KEY_F2 ] ) save_bitmap( "screen/ekran.bmp", screen, default_palette ); rest( 10 ); masked_blit( ludek, mapa, 0, 0, ludek_x, ludek_y, ludek->w, ludek->h ); masked_blit( mapa, screen, 0, 0, mapa_x, mapa_y, mapa->w, mapa->h ); } destroy_bitmap( ludek ); destroy_bitmap( bufor ); destroy_bitmap( mapa ); allegro_exit(); return 0; } END_OF_MAIN();
|
|
CodeMeister |
» 2012-10-07 15:00:00 Przeciez pisze ci co masz zrobic "Please contact the aplication's support team for more information." xD |
|
m4tx |
» 2012-10-07 15:03:39 Zapewne korzystasz gdzieś z niezainicjalizowanych zmiennych lub robisz inny głupi błąd :) Proponuję debuggerem przejechać - on prawdopodobnie wskaże Ci miejsce, gdzie masz błąd. |
|
Gabes |
» 2012-10-07 15:04:33 Ale z jaką pomocą techniczną się ma skontaktować? masz folder screen? |
|
Mrovqa |
» 2012-10-07 15:36:29 ludek = load_bmp( "tex/ludzik.bmp", default_palette ); mapa = load_bmp( "text/mapa.bmp", default_palette );
Ponadto nie sprawdzasz, czy mapa się dobrze wczytała. @CodeMeister - i po co ja Ci dawałem linka do tego tematu z moim komentarzem... :D |
|
CodeMeister |
» 2012-10-07 17:49:37 Oj tam oj tam... taki mały troll
//please not ban me :) |
|
« 1 » |