Changeset 232

Show
Ignore:
Timestamp:
06/27/07 22:17:15 (1 year ago)
Author:
takkaria
Message:
  • Fix lots of warnings.
  • Change arg_graphics to int, because that's how everyone uses it (retchingly)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/.svnignore

    r228 r232  
    11*.d 
    22*.o 
    3 *.depend 
    4 *.depend-done 
     3*/.depend 
     4.depend-done 
    55src/autoconf.h* 
    66mk/rules.mk 
  • trunk/src/cmd4.c

    r217 r232  
    108108/* A default group-by */ 
    109109static join_t *default_join; 
     110#if 0 
    110111static int default_join_cmp(const void *a, const void *b) 
    111112{ 
     
    116117                return ja->oid - jb->oid; 
    117118} 
     119#endif 
    118120static int default_group(int oid) { return default_join[oid].gid; } 
    119121 
  • trunk/src/externs.h

    r229 r232  
    9797extern bool arg_wizard; 
    9898extern bool arg_sound; 
    99 extern bool arg_graphics; 
     99extern int arg_graphics; 
    100100extern bool character_generated; 
    101101extern bool character_dungeon; 
  • trunk/src/main-sdl.c

    r163 r232  
    1818 */ 
    1919#include "angband.h" 
     20#include "cmds.h" 
    2021 
    2122/* 
     
    32103211        Uint8 r, g, b; 
    32113212        Uint32 key; 
    3212         Uint32 Pixel
     3213        Uint32 Pixel = 0
    32133214        int x = GfxDesc[use_graphics].x, y = GfxDesc[use_graphics].y; 
    32143215         
     
    34483449        char path[1024]; 
    34493450        char buf[1024]; 
    3450         FILE *fff; 
    34513451        ang_dir *dir; 
    34523452         
  • trunk/src/main-x11.c

    r223 r232  
    26272627#ifdef USE_GRAPHICS 
    26282628 
    2629         cptr bitmap_file
     2629        cptr bitmap_file = NULL
    26302630        char filename[1024]; 
    26312631 
     
    28032803#ifdef USE_GRAPHICS 
    28042804 
     2805        /* Paranoia */ 
     2806        use_graphics = GRAPHICS_NONE; 
     2807 
    28052808        /* Try graphics */ 
    28062809        switch (arg_graphics) 
    28072810        { 
    2808         case GRAPHICS_ADAM_BOLT: 
    2809                 /* Use tile graphics of Adam Bolt */ 
    2810                 bitmap_file = "16x16.bmp"; 
    2811  
    2812                 /* Try the "16x16.bmp" file */ 
    2813                 path_build(filename, sizeof(filename), ANGBAND_DIR_XTRA, format("graf/%s", bitmap_file)); 
    2814  
    2815                 /* Use the "16x16.bmp" file if it exists */ 
    2816                 if (0 == fd_close(fd_open(filename, O_RDONLY))) 
    2817                 { 
    2818                         /* Use graphics */ 
     2811                case GRAPHICS_ADAM_BOLT: 
     2812                { 
     2813                        bitmap_file = "graf/16x16.bmp"; 
     2814 
    28192815                        use_graphics = GRAPHICS_ADAM_BOLT; 
    28202816                        use_transparency = TRUE; 
    2821  
    28222817                        pict_wid = pict_hgt = 16; 
    2823  
    28242818                        ANGBAND_GRAF = "new"; 
    28252819 
    28262820                        break; 
    28272821                } 
    2828                 /* Fall through */ 
    2829  
    2830         case GRAPHICS_ORIGINAL: 
    2831                 /* Use original tile graphics */ 
    2832                 bitmap_file = "8x8.bmp"; 
    2833  
    2834                 /* Try the "8x8.bmp" file */ 
    2835                 path_build(filename, sizeof(filename), ANGBAND_DIR_XTRA, format("graf/%s", bitmap_file)); 
    2836  
    2837                 /* Use the "8x8.bmp" file if it exists */ 
    2838                 if (0 == fd_close(fd_open(filename, O_RDONLY))) 
    2839                 { 
    2840                         /* Use graphics */ 
     2822 
     2823                case GRAPHICS_ORIGINAL: 
     2824                { 
     2825                        bitmap_file = "graf/8x8.bmp"; 
     2826 
    28412827                        use_graphics = GRAPHICS_ORIGINAL; 
    2842  
    28432828                        pict_wid = pict_hgt = 8; 
    2844  
    28452829                        ANGBAND_GRAF = "old"; 
     2830 
    28462831                        break; 
    28472832                } 
    2848                 break; 
    2849  
    2850         case GRAPHICS_DAVID_GERVAIS: 
    2851                 /* Use tile graphics of David Gervais */ 
    2852                 bitmap_file = "32x32.bmp"; 
    2853  
    2854                 /* Use graphics */ 
    2855                 use_graphics = GRAPHICS_DAVID_GERVAIS; 
    2856                 use_transparency = TRUE; 
    2857  
    2858                 pict_wid = pict_hgt = 32; 
    2859  
    2860                 ANGBAND_GRAF = "david"; 
    2861                 break; 
    2862         } 
     2833 
     2834                case GRAPHICS_DAVID_GERVAIS: 
     2835                { 
     2836                        bitmap_file = "32x32.bmp"; 
     2837 
     2838                        use_graphics = GRAPHICS_DAVID_GERVAIS; 
     2839                        use_transparency = TRUE; 
     2840                        pict_wid = pict_hgt = 32; 
     2841                        ANGBAND_GRAF = "david"; 
     2842 
     2843                        break; 
     2844                } 
     2845        } 
     2846 
     2847 
     2848        /* Try the file */ 
     2849        path_build(filename, sizeof(filename), ANGBAND_DIR_XTRA, bitmap_file); 
     2850        if (!my_fexists(filename)) 
     2851        { 
     2852                use_graphics = GRAPHICS_NONE; 
     2853                use_transparency = FALSE; 
     2854                ANGBAND_GRAF = 0; 
     2855        } 
     2856 
    28632857 
    28642858        /* Load graphics */ 
    2865         if (use_graphics
     2859        if (use_graphics != GRAPHICS_NONE
    28662860        { 
    28672861                Display *dpy = Metadpy->dpy; 
     
    28762870                } 
    28772871 
    2878                 path_build(filename, sizeof(filename), ANGBAND_DIR_XTRA, format("graf/%s", bitmap_file)); 
     2872                path_build(filename, sizeof(filename), ANGBAND_DIR_XTRA, bitmap_file); 
    28792873 
    28802874                /* Load the graphical tiles */ 
  • trunk/src/squelch.c

    r229 r232  
    639639        menu_iter menu_f = { 0, 0, 0, quality_display, quality_action }; 
    640640        region area = { 1, 5, -1, -1 }; 
    641         event_type evt
     641        event_type evt = EVENT_EMPTY
    642642        int cursor = 0; 
    643643 
  • trunk/src/variable.c

    r214 r232  
    5353bool arg_wizard;                        /* Command arg -- Request wizard mode */ 
    5454bool arg_sound;                         /* Command arg -- Request special sounds */ 
    55 bool arg_graphics;                    /* Command arg -- Request graphics mode */ 
     55int arg_graphics;                     /* Command arg -- Request graphics mode */ 
    5656 
    5757/* 
  • trunk/src/z-form.c

    r155 r232  
    562562                        } 
    563563 
     564#if 0 /* Later */ 
    564565                        /* Binary */ 
    565566                        case 'b': 
     
    573574                                arg = va_arg(vp, int); 
    574575 
    575 #if 0 /* Later */ 
    576576                                /* Check our aux string */ 
    577577                                switch (aux[0]) 
     
    584584                                        case '5': max = 32; break; 
    585585                                } 
    586 #endif 
    587586                                /* Format specially */ 
    588587                                for (i = 1; i <= max; i++, bitmask *= 2) 
     
    601600                                break; 
    602601                        } 
     602#endif 
    603603 
    604604                        /* Oops */