Package: kraptor Severity: minor Usertags: clang-ftbfs User: pkg-llvm-t...@lists.alioth.debian.org Tag: patch
Hello, Using the rebuild infrastructure, your package fails to build with clang (instead of gcc). Thanks, Arthur
diff -Naur kraptor.orig/kraptor-0.0.20040403/debian/changelog kraptor/kraptor-0.0.20040403/debian/changelog --- kraptor.orig/kraptor-0.0.20040403/debian/changelog 2014-06-02 17:14:16.249095706 -0500 +++ kraptor/kraptor-0.0.20040403/debian/changelog 2014-06-02 17:50:59.065134067 -0500 @@ -1,3 +1,13 @@ +kraptor (0.0.20040403-9) unstable; urgency=low + + * Fix FTBFS with clang + - Fixed "function declaration not allowed" error in + src/game.c + src/joymnu.c + src/menu.c + + -- Arthur Marble <art...@info9.net> Mon, 02 Jun 2014 17:50:59 -0500 + kraptor (0.0.20040403-8) unstable; urgency=low * Team upload. diff -Naur kraptor.orig/kraptor-0.0.20040403/debian/patches/clang-ftbfs.diff kraptor/kraptor-0.0.20040403/debian/patches/clang-ftbfs.diff --- kraptor.orig/kraptor-0.0.20040403/debian/patches/clang-ftbfs.diff 1969-12-31 18:00:00.000000000 -0600 +++ kraptor/kraptor-0.0.20040403/debian/patches/clang-ftbfs.diff 2014-06-02 17:48:13.741131188 -0500 @@ -0,0 +1,608 @@ +--- a/src/menu.c ++++ b/src/menu.c +@@ -138,6 +138,115 @@ static int keybutton_proc(int msg, DIALO + + + ++// comenzar un nuevo juego ++int nuevo_juego_mnu() ++{ ++ DIALOG skill_select_dlg[] = ++ { ++ /* (proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3) */ ++ { xbox_proc, 0, 0, 160, 128, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, ++ { xbutton_proc, 8, 32, 144, 24, 0, 0, 0, D_EXIT, 0, 0, "Easy", NULL, NULL }, ++ { xbutton_proc, 8, 64, 144, 24, 0, 0, 0, D_EXIT, 0, 0, "Medium", NULL, NULL }, ++ { xbutton_proc, 8, 96, 144, 24, 0, 0, 0, D_EXIT, 0, 0, "Hard", NULL, NULL }, ++ { xtext_proc, 8, 8, 144, 16, 0, 0, 0, 0, 0, 0, "Skill", NULL, NULL }, ++ { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } ++ }; ++ ++ /* nivel de dificultad, */ ++ menu_seleccionado = MNU_S_NEW_GAME; ++ ++ traducir_DIALOG_dp(skill_select_dlg); ++ centre_dialog(skill_select_dlg); ++ set_dialog_color(skill_select_dlg, makecol(0,0,0), makecol(255,255,255)); ++ ++ nivel_de_dificultad = do_dialog(skill_select_dlg, 2) - 1; ++ if (nivel_de_dificultad < 0 || nivel_de_dificultad > 2) nivel_de_dificultad = 1; ++ ++ return D_CLOSE; ++} ++ ++// Carga un juego ++int cargar_mnu() ++{ ++ menu_seleccionado = MNU_S_LOAD_GAME; ++ ++ return D_CLOSE; ++} ++ ++int salir_mnu() ++{ ++ menu_seleccionado = MNU_S_QUIT_GAME; ++ ++ return D_CLOSE; ++} ++ ++/* Permite seleccionar un nuevo modo de video */ ++int choose_video_mnu() ++{ ++ int card = 0, w = SCREEN_W, h = SCREEN_H; ++ ++ /* permitir elegir el modo de video */ ++ if (!gfx_mode_select(&card, &w, &h)) return D_REDRAW; ++ ++set_color_depth(8); /* setear a 8bpp, en otros modos, no ANDA! */ ++// DEBUG: FALTA INFORMAR SI FALLA EL MODO DE VIDEO ++if (set_gfx_mode(card, w, h, 0, 0)) ++ if (set_gfx_mode(GFX_SAFE, 640, 480, 0, 0)) ++ if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0)) ++ levantar_error("ERROR: imposible utilizar algun modo grafico de 8bpp!"); ++ ++ return D_CLOSE; ++} ++ ++/* Acerca de... */ ++int acercade_proggy_mnu() ++{ ++ DIALOG acerca_de_dlg[] = ++ { ++ /* (proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3) */ ++ { xbox_proc, 0, 0, 320, 200, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, ++ { xtextbox_proc, 4, 20, 152, 160, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, ++ { xbutton_proc, 300, 4, 16, 12, 0, 0, 0, D_EXIT, 0, 0, "X", NULL, NULL }, ++ { xbox_proc, 164, 20, 152, 176, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, ++ { xtext_proc, 4, 4, 100, 12, 0, 0, 0, 0, 0, 0, "About", NULL, NULL }, ++ { xbitmap_proc, 168, 24, 144, 168, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, ++ { xtext_proc, 4, 184, 100, 12, 0, 0, 0, 0, 0, 0, "Version x.x.x", NULL, NULL }, ++ { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } ++ }; ++ ++ if (texto_acerca_de_juego == NULL || acerca_de_bmp == NULL) ++ { ++ alert("ERROR:", "No hay informacion disponible!", NULL, "Aceptar", NULL, 0, 0); ++ return D_REDRAW; ++ } ++ ++ /* DEBUG: alterar los indices [x] si cambia el dialogo! */ ++ acerca_de_dlg[1].dp = texto_acerca_de_juego; /* setear el texto de ayuda de disco */ ++ acerca_de_dlg[4].dp = (void *)get_config_text("About"); /* traducir el caption */ ++ acerca_de_dlg[5].dp = acerca_de_bmp; ++ acerca_de_dlg[6].dp = KRAPTOR_VERSION_STR; ++ ++ centre_dialog(acerca_de_dlg); ++ set_dialog_color(acerca_de_dlg, makecol(0,0,0), makecol(255,255,255)); ++ popup_dialog(acerca_de_dlg, 0); ++ ++ return D_REDRAW; ++} ++ ++/* idioma -> espa�ol */ ++int cambia_espanol(void) ++{ ++ menu_seleccionado = MNU_S_CFG_SPANISH; ++ return D_CLOSE; ++} ++ ++/* idioma -> ingles */ ++int cambia_ingles(void) ++{ ++ menu_seleccionado = MNU_S_CFG_ENGLISH; ++ return D_CLOSE; ++} ++ + /* + Esta funcion fabrica el menu principal + tiene un monton de mierdas propias +@@ -145,114 +254,6 @@ static int keybutton_proc(int msg, DIALO + */ + static void hacer_el_menu_principal_helper() + { +- // comenzar un nuevo juego +- int nuevo_juego_mnu() +- { +- DIALOG skill_select_dlg[] = +- { +- /* (proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3) */ +- { xbox_proc, 0, 0, 160, 128, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, +- { xbutton_proc, 8, 32, 144, 24, 0, 0, 0, D_EXIT, 0, 0, "Easy", NULL, NULL }, +- { xbutton_proc, 8, 64, 144, 24, 0, 0, 0, D_EXIT, 0, 0, "Medium", NULL, NULL }, +- { xbutton_proc, 8, 96, 144, 24, 0, 0, 0, D_EXIT, 0, 0, "Hard", NULL, NULL }, +- { xtext_proc, 8, 8, 144, 16, 0, 0, 0, 0, 0, 0, "Skill", NULL, NULL }, +- { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } +- }; +- +- /* nivel de dificultad, */ +- menu_seleccionado = MNU_S_NEW_GAME; +- +- traducir_DIALOG_dp(skill_select_dlg); +- centre_dialog(skill_select_dlg); +- set_dialog_color(skill_select_dlg, makecol(0,0,0), makecol(255,255,255)); +- +- nivel_de_dificultad = do_dialog(skill_select_dlg, 2) - 1; +- if (nivel_de_dificultad < 0 || nivel_de_dificultad > 2) nivel_de_dificultad = 1; +- +- return D_CLOSE; +- } +- +- // Carga un juego +- int cargar_mnu() +- { +- menu_seleccionado = MNU_S_LOAD_GAME; +- +- return D_CLOSE; +- } +- +- int salir_mnu() +- { +- menu_seleccionado = MNU_S_QUIT_GAME; +- +- return D_CLOSE; +- } +- +- /* Permite seleccionar un nuevo modo de video */ +- int choose_video_mnu() +- { +- int card = 0, w = SCREEN_W, h = SCREEN_H; +- +- /* permitir elegir el modo de video */ +- if (!gfx_mode_select(&card, &w, &h)) return D_REDRAW; +- +- set_color_depth(8); /* setear a 8bpp, en otros modos, no ANDA! */ +- // DEBUG: FALTA INFORMAR SI FALLA EL MODO DE VIDEO +- if (set_gfx_mode(card, w, h, 0, 0)) +- if (set_gfx_mode(GFX_SAFE, 640, 480, 0, 0)) +- if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0)) +- levantar_error("ERROR: imposible utilizar algun modo grafico de 8bpp!"); +- +- return D_CLOSE; +- } +- +- /* Acerca de... */ +- int acercade_proggy_mnu() +- { +- DIALOG acerca_de_dlg[] = +- { +- /* (proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3) */ +- { xbox_proc, 0, 0, 320, 200, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, +- { xtextbox_proc, 4, 20, 152, 160, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, +- { xbutton_proc, 300, 4, 16, 12, 0, 0, 0, D_EXIT, 0, 0, "X", NULL, NULL }, +- { xbox_proc, 164, 20, 152, 176, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, +- { xtext_proc, 4, 4, 100, 12, 0, 0, 0, 0, 0, 0, "About", NULL, NULL }, +- { xbitmap_proc, 168, 24, 144, 168, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, +- { xtext_proc, 4, 184, 100, 12, 0, 0, 0, 0, 0, 0, "Version x.x.x", NULL, NULL }, +- { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } +- }; +- +- if (texto_acerca_de_juego == NULL || acerca_de_bmp == NULL) +- { +- alert("ERROR:", "No hay informacion disponible!", NULL, "Aceptar", NULL, 0, 0); +- return D_REDRAW; +- } +- +- /* DEBUG: alterar los indices [x] si cambia el dialogo! */ +- acerca_de_dlg[1].dp = texto_acerca_de_juego; /* setear el texto de ayuda de disco */ +- acerca_de_dlg[4].dp = (void *)get_config_text("About"); /* traducir el caption */ +- acerca_de_dlg[5].dp = acerca_de_bmp; +- acerca_de_dlg[6].dp = KRAPTOR_VERSION_STR; +- +- centre_dialog(acerca_de_dlg); +- set_dialog_color(acerca_de_dlg, makecol(0,0,0), makecol(255,255,255)); +- popup_dialog(acerca_de_dlg, 0); +- +- return D_REDRAW; +- } +- +- /* idioma -> espa�ol */ +- int cambia_espanol(void) +- { +- menu_seleccionado = MNU_S_CFG_SPANISH; +- return D_CLOSE; +- } +- +- /* idioma -> ingles */ +- int cambia_ingles(void) +- { +- menu_seleccionado = MNU_S_CFG_ENGLISH; +- return D_CLOSE; +- } + + /* Menu Juego */ + MENU menu_juego[] = +--- a/src/game.c ++++ b/src/game.c +@@ -402,6 +402,58 @@ else + enviar_kfbuffer2screen(); + } + ++/* funcion interna que libera listas enlazadas */ ++void liberar_listas_interno() ++{ ++ /* LIBERAR LISTAS... */ ++ liberar_lista_enemigos(); ++ liberar_lista_disparos_ene(); ++ liberar_lista_disparos_jug(); ++ liberar_lista_particulas(); ++ liberar_lista_explosion(&ptr_explo_fondo); ++ liberar_lista_explosion(&ptr_explo_arriba); ++ liberar_emisores_humo(); ++ liberar_humo(); ++ liberar_premio(); ++} ++ ++/* funcion interna que limpia los colores y bufferes ++ y coloca la paleta de juego, etc */ ++void hacer_cleanup_mapeos() ++{ ++ set_palette(pal_game); ++ color_map = &tabla_transparencia; /* la rutina de sombras la precisa! */ ++ rgb_map = &tabla_RGB; /* acelera la fabricacion de colores de 8 bits */ ++ set_trans_blender(128, 128, 128, 128); /* Transparencia 50% para > 8 bits */ ++ clear(kfbufferbmp); clear(screen); /* limpiar bufferes */ ++ clear_keybuf(); ++ xset_gui_colors(); /* setea el GUI */ ++ set_mouse_sprite(NULL); /* acomoda puntero del mouse para que se ajuste a los colores */ ++ llenar_pal_game_oscura(0.25); // prepara la paleta oscura para efectos en los menues ++} ++ ++/* Funcion interna para instalar los timers */ ++void pone_timers_juego() ++{ ++ /* Timers */ ++ if (install_int_ex(increment_speed_counter, BPS_TO_TIMER(30))) ++ levantar_error("ERROR: no hay espacio para instalar el timer a 30 fps\n"); /* a 30 fps el juego */ ++ ++ if (install_int(fps_proc, 1000)) ++ levantar_error("ERROR: no hay espacio para instalar el timer a 1000 milisegundos!\n"); /* a 1000 milisegundos (1 segundo) el contador de fps */ ++ ++ /* Reiniciar contadores de velocidad... */ ++ frame_count = fps = speed_counter = 0; /* evita salto en los fps */ ++} ++ ++/* Funcion interna para SACAR los timers */ ++void saca_timers_juego() ++{ ++ /* remover timers... */ ++ remove_int(fps_proc); ++ remove_int(increment_speed_counter); ++} ++ + /* + Esta es la secuencia y loop principal del juego + Llamar para comenzar un juego nuevo +@@ -411,58 +463,6 @@ else + */ + void comenzar_juego(int load_savegame) + { +- /* funcion interna que libera listas enlazadas */ +- void liberar_listas_interno() +- { +- /* LIBERAR LISTAS... */ +- liberar_lista_enemigos(); +- liberar_lista_disparos_ene(); +- liberar_lista_disparos_jug(); +- liberar_lista_particulas(); +- liberar_lista_explosion(&ptr_explo_fondo); +- liberar_lista_explosion(&ptr_explo_arriba); +- liberar_emisores_humo(); +- liberar_humo(); +- liberar_premio(); +- } +- +- /* funcion interna que limpia los colores y bufferes +- y coloca la paleta de juego, etc */ +- void hacer_cleanup_mapeos() +- { +- set_palette(pal_game); +- color_map = &tabla_transparencia; /* la rutina de sombras la precisa! */ +- rgb_map = &tabla_RGB; /* acelera la fabricacion de colores de 8 bits */ +- set_trans_blender(128, 128, 128, 128); /* Transparencia 50% para > 8 bits */ +- clear(kfbufferbmp); clear(screen); /* limpiar bufferes */ +- clear_keybuf(); +- xset_gui_colors(); /* setea el GUI */ +- set_mouse_sprite(NULL); /* acomoda puntero del mouse para que se ajuste a los colores */ +- llenar_pal_game_oscura(0.25); // prepara la paleta oscura para efectos en los menues +- } +- +- /* Funcion interna para instalar los timers */ +- void pone_timers_juego() +- { +- /* Timers */ +- if (install_int_ex(increment_speed_counter, BPS_TO_TIMER(30))) +- levantar_error("ERROR: no hay espacio para instalar el timer a 30 fps\n"); /* a 30 fps el juego */ +- +- if (install_int(fps_proc, 1000)) +- levantar_error("ERROR: no hay espacio para instalar el timer a 1000 milisegundos!\n"); /* a 1000 milisegundos (1 segundo) el contador de fps */ +- +- /* Reiniciar contadores de velocidad... */ +- frame_count = fps = speed_counter = 0; /* evita salto en los fps */ +- } +- +- /* Funcion interna para SACAR los timers */ +- void saca_timers_juego() +- { +- /* remover timers... */ +- remove_int(fps_proc); +- remove_int(increment_speed_counter); +- } +- + + salir_del_juego = FALSE; + +--- a/src/joymnu.c ++++ b/src/joymnu.c +@@ -11,133 +11,134 @@ + #include "guitrans.h" + #include "guiprocs.h" + +-/* +- Probar el joystick +- Pasarle el numero de joystick a probar +-*/ +-void probar_el_joystick(int nj) ++/* este objeto para dialogo dibuja hacia donde esta apuntando el joystick ++ y cambia de color cuando presiona el boton 1,2 o 3 ++ usa d2 para propositos internos... ++ */ ++int xbox_joystick_test_proc(int msg, DIALOG *d, int c, int nj) + { +- /* este objeto para dialogo dibuja hacia donde esta apuntando el joystick +- y cambia de color cuando presiona el boton 1,2 o 3 +- usa d2 para propositos internos... +- */ +- int xbox_joystick_test_proc(int msg, DIALOG *d, int c) +- { +- int new_pos = 0; +- int pos_x = 0 , pos_y = 0; // posicion (-1 = abj,izq, 1 = arr,der ) +- if (msg == MSG_START) +- { +- d->d2 = -1; +- } +- +- if(msg == MSG_DRAW) ++int new_pos = 0; ++int pos_x = 0 , pos_y = 0; // posicion (-1 = abj,izq, 1 = arr,der ) ++ if (msg == MSG_START) ++ { ++ d->d2 = -1; ++ } ++ ++ if(msg == MSG_DRAW) ++ { ++ rectfill(screen, d->x, d->y, d->x+d->w-2, d->y+d->h-2,gui_white_color); ++ gui_rect(screen, d->x, d->y, d->w - 1, d->h - 1, F_IN); ++ ++ // dibujar pos del joystick - chetoooo! ++ switch (d->d2) ++ { ++ case 1: ++ rectfill(screen, d->x, d->y+d->h/3*2-1, d->x+d->w/3-2, d->y+d->h-2, gui_light_color); ++ gui_rect(screen, d->x, d->y+d->h/3*2-1, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 2: ++ rectfill(screen, d->x+d->w/3, d->y+d->h/3*2-1, d->x+d->w/3*2-2, d->y+d->h-2, gui_light_color); ++ gui_rect(screen, d->x+d->w/3, d->y+d->h/3*2-1, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 3: ++ rectfill(screen, d->x+d->w/3*2, d->y+d->h/3*2-1, d->x+d->w-2, d->y+d->h-2, gui_light_color); ++ gui_rect(screen, d->x+d->w/3*2, d->y+d->h/3*2-1, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 4: ++ rectfill(screen, d->x, d->y+d->h/3-1, d->x+d->w/3-2, d->y+d->h/3*2-2, gui_light_color); ++ gui_rect(screen, d->x, d->y+d->h/3-1, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 5: ++ rectfill(screen, d->x+d->w/3, d->y+d->h/3-1, d->x+d->w/3*2-2, d->y+d->h/3*2-2, gui_light_color); ++ gui_rect(screen, d->x+d->w/3, d->y+d->h/3-1, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 6: ++ rectfill(screen, d->x+d->w/3*2, d->y+d->h/3-1, d->x+d->w-2, d->y+d->h/3*2-2, gui_light_color); ++ gui_rect(screen, d->x+d->w/3*2, d->y+d->h/3-1, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 7: ++ rectfill(screen, d->x, d->y+d->h/3-2, d->x+d->w/3-2, d->y, gui_light_color); ++ gui_rect(screen, d->x, d->y, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 8: ++ rectfill(screen, d->x+d->w/3, d->y+d->h/3-2, d->x+d->w/3*2-2, d->y, gui_light_color); ++ gui_rect(screen, d->x+d->w/3,d->y, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ case 9: ++ rectfill(screen, d->x+d->w/3*2, d->y+d->h/3-2, d->x+d->w-2, d->y, gui_light_color); ++ gui_rect(screen, d->x+d->w/3*2,d->y, d->w/3, d->h/3, F_LIGHT); ++ break; ++ ++ default: ++ msg = MSG_IDLE; // chequear que paso... ++ break; ++ } ++ } ++ ++ /* cuando esta idle, dibujar la posicion del joystick */ ++ if (msg == MSG_IDLE) ++ { ++ poll_joystick(); // absolutamente NECESARIO ++ ++ if (joy[nj].stick[0].axis[0].d1) pos_x = -1; ++ if (joy[nj].stick[0].axis[0].d2) pos_x = 1; ++ ++ if (joy[nj].stick[0].axis[1].d2) pos_y = -1; ++ if (joy[nj].stick[0].axis[1].d1) pos_y = 1; ++ if (pos_x == -1) + { +- rectfill(screen, d->x, d->y, d->x+d->w-2, d->y+d->h-2,gui_white_color); +- gui_rect(screen, d->x, d->y, d->w - 1, d->h - 1, F_IN); +- +- // dibujar pos del joystick - chetoooo! +- switch (d->d2) +- { +- case 1: +- rectfill(screen, d->x, d->y+d->h/3*2-1, d->x+d->w/3-2, d->y+d->h-2, gui_light_color); +- gui_rect(screen, d->x, d->y+d->h/3*2-1, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 2: +- rectfill(screen, d->x+d->w/3, d->y+d->h/3*2-1, d->x+d->w/3*2-2, d->y+d->h-2, gui_light_color); +- gui_rect(screen, d->x+d->w/3, d->y+d->h/3*2-1, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 3: +- rectfill(screen, d->x+d->w/3*2, d->y+d->h/3*2-1, d->x+d->w-2, d->y+d->h-2, gui_light_color); +- gui_rect(screen, d->x+d->w/3*2, d->y+d->h/3*2-1, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 4: +- rectfill(screen, d->x, d->y+d->h/3-1, d->x+d->w/3-2, d->y+d->h/3*2-2, gui_light_color); +- gui_rect(screen, d->x, d->y+d->h/3-1, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 5: +- rectfill(screen, d->x+d->w/3, d->y+d->h/3-1, d->x+d->w/3*2-2, d->y+d->h/3*2-2, gui_light_color); +- gui_rect(screen, d->x+d->w/3, d->y+d->h/3-1, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 6: +- rectfill(screen, d->x+d->w/3*2, d->y+d->h/3-1, d->x+d->w-2, d->y+d->h/3*2-2, gui_light_color); +- gui_rect(screen, d->x+d->w/3*2, d->y+d->h/3-1, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 7: +- rectfill(screen, d->x, d->y+d->h/3-2, d->x+d->w/3-2, d->y, gui_light_color); +- gui_rect(screen, d->x, d->y, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 8: +- rectfill(screen, d->x+d->w/3, d->y+d->h/3-2, d->x+d->w/3*2-2, d->y, gui_light_color); +- gui_rect(screen, d->x+d->w/3,d->y, d->w/3, d->h/3, F_LIGHT); +- break; +- +- case 9: +- rectfill(screen, d->x+d->w/3*2, d->y+d->h/3-2, d->x+d->w-2, d->y, gui_light_color); +- gui_rect(screen, d->x+d->w/3*2,d->y, d->w/3, d->h/3, F_LIGHT); +- break; +- +- default: +- msg = MSG_IDLE; // chequear que paso... +- break; +- } ++ if (pos_y == -1) ++ new_pos = 1; ++ else ++ if (pos_y == 1) new_pos = 7; ++ else ++ new_pos = 4; + } +- +- /* cuando esta idle, dibujar la posicion del joystick */ +- if (msg == MSG_IDLE) +- { +- poll_joystick(); // absolutamente NECESARIO +- +- if (joy[nj].stick[0].axis[0].d1) pos_x = -1; +- if (joy[nj].stick[0].axis[0].d2) pos_x = 1; +- +- if (joy[nj].stick[0].axis[1].d2) pos_y = -1; +- if (joy[nj].stick[0].axis[1].d1) pos_y = 1; +- if (pos_x == -1) +- { +- if (pos_y == -1) +- new_pos = 1; +- else +- if (pos_y == 1) new_pos = 7; +- else +- new_pos = 4; +- } ++ else ++ if (pos_x == 1) ++ { ++ if (pos_y == -1) ++ new_pos = 3; + else +- if (pos_x == 1) +- { +- if (pos_y == -1) +- new_pos = 3; +- else +- if (pos_y == 1) new_pos = 9; +- else +- new_pos = 6; +- +- } ++ if (pos_y == 1) new_pos = 9; ++ else ++ new_pos = 6; ++ ++ } ++ else ++ { ++ if (pos_y == -1) ++ new_pos = 2; + else +- { +- if (pos_y == -1) +- new_pos = 2; +- else +- if (pos_y == 1) new_pos = 8; +- else +- new_pos = 5; +- } ++ if (pos_y == 1) new_pos = 8; ++ else ++ new_pos = 5; ++ } + +- if (new_pos != d->d2) +- { ++ if (new_pos != d->d2) ++ { + d->d2 = new_pos; + return D_REDRAWME; +- } +- } // fin IDLE ++ } ++ } // fin IDLE ++ ++ return D_O_K; ++} // fin del proc de test del joystick + +- return D_O_K; +- } // fin del proc de test del joystick ++/* ++ Probar el joystick ++ Pasarle el numero de joystick a probar ++*/ ++void probar_el_joystick(int nj) ++{ + + /* dialogo de prueba */ + DIALOG joy_test_dlg[] = diff -Naur kraptor.orig/kraptor-0.0.20040403/debian/patches/series kraptor/kraptor-0.0.20040403/debian/patches/series --- kraptor.orig/kraptor-0.0.20040403/debian/patches/series 2014-06-02 17:14:16.245095706 -0500 +++ kraptor/kraptor-0.0.20040403/debian/patches/series 2014-06-02 17:16:19.761097857 -0500 @@ -12,3 +12,4 @@ 12_save-games-in-home.patch 13_save-bitmaps-in-home.patch 14_create-hidden-kraptor-directory-in-home.patch +clang-ftbfs.diff