Panel użytkownika
Nazwa użytkownika:
Hasło:
Nie masz jeszcze konta?

[Allegro]Process returned 0x3

Ostatnio zmodyfikowano 2012-10-07 17:49
Autor Wiadomość
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:
C/C++
#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();
P-66286
CodeMeister
» 2012-10-07 15:00:00
Przeciez pisze ci co masz zrobic "Please contact the aplication's support team for more information."  xD
P-66292
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.
P-66295
Gabes
» 2012-10-07 15:04:33
Ale z jaką pomocą techniczną się ma skontaktować?
masz folder screen?
P-66296
Mrovqa
» 2012-10-07 15:36:29
C/C++
ludek = load_bmp( "tex/ludzik.bmp", default_palette );
mapa = load_bmp( "text/mapa.bmp", default_palette ); // obstawiam, iż pomyliłeś sobie jedną ze ścieżek
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
P-66307
CodeMeister
» 2012-10-07 17:49:37
Oj tam oj tam... taki mały troll

//please not ban me :)
P-66328
« 1 »
  Strona 1 z 1