Changeset 522

Show
Ignore:
Timestamp:
08/13/07 09:49:19 (1 year ago)
Author:
ajps
Message:

Set up an event system for UI display updates, where the game communicates with the UI by sending messages saying that something's changed that the UI might be interested in, rather than deciding that specific things should be redraw.

Started moving some parts of the game (e.g. subwindow updates) over to this system.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/Makefile.src

    r510 r522  
    6060        trap.o \ 
    6161        ui.o \ 
     62        ui-event.o \ 
    6263        util.o  \ 
    6364        variable.o \ 
     
    6667        x-spell.o \ 
    6768        xtra1.o \ 
    68         xtra2.o 
     69        xtra2.o \ 
     70        xtra3.o 
  • trunk/src/Makefile.std

    r469 r522  
    4141 
    4242# Support SDL frontend 
    43 #SYS_sdl = -DUSE_SDL $(shell sdl-config --cflags) $(shell sdl-config --libs) -lSDL_ttf -lSDL_image 
     43SYS_sdl = -DUSE_SDL $(shell sdl-config --cflags) $(shell sdl-config --libs) -lSDL_ttf -lSDL_image 
    4444 
    4545 
  • trunk/src/attack.c

    r433 r522  
    746746 
    747747                        Term_fresh(); 
    748                         if (p_ptr->window) window_stuff(); 
     748                        if (p_ptr->redraw) redraw_stuff(); 
    749749 
    750750                        Term_xtra(TERM_XTRA_DELAY, msec); 
     
    752752 
    753753                        Term_fresh(); 
    754                         if (p_ptr->window) window_stuff(); 
     754                        if (p_ptr->redraw) redraw_stuff(); 
    755755                } 
    756756 
     
    10371037 
    10381038                        Term_fresh(); 
    1039                         if (p_ptr->window) window_stuff(); 
     1039                        if (p_ptr->redraw) redraw_stuff(); 
    10401040 
    10411041                        Term_xtra(TERM_XTRA_DELAY, msec); 
     
    10431043 
    10441044                        Term_fresh(); 
    1045                         if (p_ptr->window) window_stuff(); 
     1045                        if (p_ptr->redraw) redraw_stuff(); 
    10461046                } 
    10471047 
  • trunk/src/cave.c

    r521 r522  
    11111111 
    11121112                /* Redraw map */ 
    1113                 p_ptr->window |= (PW_MAP); 
     1113                p_ptr->redraw |= (PR_MAP); 
    11141114        } 
    11151115} 
     
    12971297 
    12981298                /* Redraw map */ 
    1299                 p_ptr->window |= (PW_MAP); 
     1299                p_ptr->redraw |= (PR_MAP); 
    13001300        } 
    13011301} 
     
    14241424         
    14251425                /* Redraw map */ 
    1426                 p_ptr->window |= (PW_MAP); 
     1426                p_ptr->redraw |= (PR_MAP); 
    14271427        } 
    14281428} 
     
    33143314        /* Redraw map */ 
    33153315        p_ptr->redraw |= (PR_MAP); 
    3316  
    3317         /* Window stuff */ 
    3318         p_ptr->window |= (PW_OVERHEAD | PW_MAP); 
    33193316} 
    33203317 
     
    33963393        p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_MONSTERS); 
    33973394 
    3398         /* Redraw map */ 
    3399         p_ptr->redraw |= (PR_MAP); 
    3400  
    3401         /* Window stuff */ 
    3402         p_ptr->window |= (PW_OVERHEAD | PW_MONLIST | PW_MAP); 
     3395        /* Redraw map, monster list */ 
     3396        p_ptr->redraw |= (PR_MAP | PR_MONLIST); 
    34033397} 
    34043398 
     
    34413435        p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_MONSTERS); 
    34423436 
    3443         /* Redraw map */ 
    3444         p_ptr->redraw |= (PR_MAP); 
    3445  
    3446         /* Window stuff */ 
    3447         p_ptr->window |= (PW_OVERHEAD | PW_MONLIST | PW_MAP); 
     3437        /* Redraw map, monster list */ 
     3438        p_ptr->redraw |= (PR_MAP | PR_MONLIST); 
    34483439} 
    34493440 
     
    35333524        p_ptr->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_MONSTERS); 
    35343525 
    3535         /* Redraw map */ 
    3536         p_ptr->redraw |= (PR_MAP); 
    3537  
    3538         /* Window stuff */ 
    3539         p_ptr->window |= (PW_OVERHEAD | PW_MONLIST | PW_MAP); 
     3526        /* Redraw map, monster list */ 
     3527        p_ptr->redraw |= (PR_MAP | PR_MONLIST); 
    35403528} 
    35413529 
     
    39513939 
    39523940        /* Window stuff */ 
    3953         p_ptr->window |= (PW_MONSTER); 
     3941        p_ptr->redraw |= (PR_MONSTER); 
    39543942} 
    39553943 
     
    39653953 
    39663954        /* Window stuff */ 
    3967         p_ptr->window |= (PW_OBJECT); 
     3955        p_ptr->redraw |= (PR_OBJECT); 
    39683956} 
    39693957 
  • trunk/src/cmd1.c

    r509 r522  
    228228                /* Redraw gold */ 
    229229                p_ptr->redraw |= (PR_GOLD); 
    230  
    231                 /* Window stuff */ 
    232                 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    233230        } 
    234231 
  • trunk/src/cmd3.c

    r454 r522  
    301301        /* Recalculate bonuses, torch, mana */ 
    302302        p_ptr->update |= (PU_BONUS | PU_TORCH | PU_MANA); 
    303  
    304         /* Window stuff */ 
    305         p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); 
    306  
    307         p_ptr->redraw |= (PR_EQUIPPY); 
     303        p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    308304} 
    309305 
     
    511507                p_ptr->notice |= (PN_COMBINE); 
    512508 
    513                 /* Window stuff */ 
    514                 p_ptr->window |= (PW_INVEN | PW_EQUIP); 
    515  
    516                 p_ptr->redraw |= (PR_EQUIPPY); 
     509                /* Redraw stuff */ 
     510                p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    517511 
    518512                /* Done */ 
     
    649643        p_ptr->notice |= (PN_COMBINE | PN_SQUELCH); 
    650644 
    651         /* Window stuff */ 
    652         p_ptr->window |= (PW_INVEN | PW_EQUIP); 
     645        /* Redraw stuff */ 
     646        p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    653647} 
    654648 
     
    713707                p_ptr->notice |= (PN_COMBINE | PN_SQUELCH); 
    714708 
    715                 /* Window stuff */ 
    716                 p_ptr->window |= (PW_INVEN | PW_EQUIP); 
     709                /* Redraw stuff */ 
     710                p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    717711        } 
    718712} 
     
    842836                p_ptr->notice |= (PN_COMBINE | PN_REORDER); 
    843837 
    844                 /* Window stuff */ 
    845                 p_ptr->window |= (PW_INVEN); 
     838                /* Redraw stuff */ 
     839                p_ptr->redraw |= (PR_INVEN); 
    846840        } 
    847841 
     
    869863        p_ptr->update |= (PU_TORCH); 
    870864 
    871         /* Window stuff */ 
    872         p_ptr->window |= (PW_EQUIP); 
     865        /* Redraw stuff */ 
     866        p_ptr->redraw |= (PR_EQUIP); 
    873867} 
    874868 
     
    976970        p_ptr->update |= (PU_TORCH); 
    977971 
    978         /* Window stuff */ 
    979         p_ptr->window |= (PW_EQUIP); 
     972        /* Redraw stuff */ 
     973        p_ptr->redraw |= (PR_EQUIP); 
    980974} 
    981975 
  • trunk/src/cmd4.c

    r479 r522  
    17201720                        /* Notice stuff (later) */ 
    17211721                        p_ptr->notice |= (PN_AUTOINSCRIBE); 
    1722                         p_ptr->window |= (PW_INVEN | PW_EQUIP); 
     1722                        p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    17231723                } 
    17241724 
     
    18921892 
    18931893        /* Redraw everything */ 
    1894         p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY); 
    1895  
    1896         /* Window stuff */ 
    1897         p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1 | 
    1898                           PW_MESSAGE | PW_OVERHEAD | PW_MONSTER | PW_OBJECT | 
    1899                           PW_MAP | PW_MONLIST); 
     1894        p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_MAP | PR_INVEN | PR_EQUIP | 
     1895                          PR_MESSAGE | PR_MONSTER | PR_OBJECT | 
     1896                          PR_MONLIST); 
    19001897 
    19011898        /* Clear screen */ 
     
    23822379        event_type ke; 
    23832380 
    2384         u32b old_flag[ANGBAND_TERM_MAX]; 
    2385  
    2386  
    2387         /* Memorize old flags */ 
     2381        u32b new_flags[ANGBAND_TERM_MAX]; 
     2382 
     2383 
     2384        /* Set new flags to the old values */ 
    23882385        for (j = 0; j < ANGBAND_TERM_MAX; j++) 
    23892386        { 
    2390                 old_flag[j] = op_ptr->window_flag[j]; 
     2387                new_flags[j] = op_ptr->window_flag[j]; 
    23912388        } 
    23922389 
     
    24422439 
    24432440                                /* Active flag */ 
    2444                                 if (op_ptr->window_flag[j] & (1L << i)) c = 'X'; 
     2441                                if (new_flags[j] & (1L << i)) c = 'X'; 
    24452442 
    24462443                                /* Flag value */ 
     
    24862483 
    24872484                        /* Toggle flag (off) */ 
    2488                         else if (op_ptr->window_flag[x] & (1L << y)) 
     2485                        else if (new_flags[x] & (1L << y)) 
    24892486                        { 
    2490                                 op_ptr->window_flag[x] &= ~(1L << y); 
     2487                                new_flags[x] &= ~(1L << y); 
    24912488                        } 
    24922489 
     
    24942491                        else 
    24952492                        { 
    2496                                 op_ptr->window_flag[x] |= (1L << y); 
     2493                                new_flags[x] |= (1L << y); 
    24972494                        } 
    24982495 
     
    25192516 
    25202517        /* Notice changes */ 
    2521         for (j = 0; j < ANGBAND_TERM_MAX; j++) 
    2522         { 
    2523                 term *old = Term; 
    2524  
    2525                 /* Dead window */ 
    2526                 if (!angband_term[j]) continue; 
    2527  
    2528                 /* Ignore non-changes */ 
    2529                 if (op_ptr->window_flag[j] == old_flag[j]) continue; 
    2530  
    2531                 /* Activate */ 
    2532                 Term_activate(angband_term[j]); 
    2533  
    2534                 /* Erase */ 
    2535                 Term_clear(); 
    2536  
    2537                 /* Refresh */ 
    2538                 Term_fresh(); 
    2539  
    2540                 /* Restore */ 
    2541                 Term_activate(old); 
    2542         } 
     2518        subwindows_set_flags(new_flags, ANGBAND_TERM_MAX); 
    25432519} 
    25442520 
  • trunk/src/cmd5.c

    r507 r522  
    786786 
    787787        /* Redraw Study Status */ 
    788         p_ptr->redraw |= (PR_STUDY); 
    789  
    790         /* Redraw object recall */ 
    791         p_ptr->window |= (PW_OBJECT); 
     788        p_ptr->redraw |= (PR_STUDY | PR_OBJECT); 
     789 
    792790} 
    793791 
     
    916914 
    917915                        /* Redraw object recall */ 
    918                         p_ptr->window |= (PW_OBJECT); 
     916                        p_ptr->redraw |= (PR_OBJECT); 
    919917                } 
    920918        } 
     
    960958        /* Redraw mana */ 
    961959        p_ptr->redraw |= (PR_MANA); 
    962  
    963         /* Window stuff */ 
    964         p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    965960} 
    966961 
     
    10861081 
    10871082                        /* Redraw object recall */ 
    1088                         p_ptr->window |= (PW_OBJECT); 
     1083                        p_ptr->redraw |= (PR_OBJECT); 
    10891084                } 
    10901085        } 
     
    11301125        /* Redraw mana */ 
    11311126        p_ptr->redraw |= (PR_MANA); 
    1132  
    1133         /* Window stuff */ 
    1134         p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    11351127} 
  • trunk/src/cmd6.c

    r513 r522  
    261261        /* Mark as tried and redisplay */ 
    262262        p_ptr->notice |= (PN_COMBINE | PN_REORDER); 
    263         p_ptr->window |= (PW_INVEN | PW_EQUIP); 
     263        p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    264264 
    265265 
  • trunk/src/defines.h

    r519 r522  
    16011601#define PR_MANA                 0x00000080L     /* Display Mana */ 
    16021602#define PR_GOLD                 0x00000100L     /* Display Gold */ 
    1603 #define PR_EQUIPPY              0x00000400L     /* Display Equippy chars */ 
     1603 
    16041604#define PR_HEALTH               0x00000800L     /* Display Health Bar */ 
    16051605#define PR_SPEED                0x00001000L     /* Display Extra (Speed) */ 
    16061606#define PR_STUDY                0x00002000L     /* Display Extra (Study) */ 
    16071607#define PR_DEPTH                0x00004000L     /* Display Depth */ 
    1608 #define PR_STATUS       0x00008000L 
     1608#define PR_STATUS              0x00008000L 
    16091609#define PR_DTRAP                0x00010000L /* Trap detection indicator */ 
    16101610#define PR_STATE                0x00020000L     /* Display Extra (State) */ 
    16111611#define PR_MAP                  0x00040000L     /* Display Map */ 
    16121612 
     1613#define PR_INVEN                0x00080000L /* Display inven/equip */ 
     1614#define PR_EQUIP                0x00100000L /* Display equip/inven */ 
     1615#define PR_MESSAGE              0x00200000L /* Display messages */ 
     1616#define PR_MONSTER              0x00400000L /* Display monster recall */ 
     1617#define PR_OBJECT               0x00800000L /* Display object recall */ 
     1618#define PR_MONLIST              0x01000000L /* Display monster list */ 
    16131619 
    16141620/* Display Basic Info */ 
     
    16161622        (PR_MISC | PR_TITLE | PR_STATS | PR_LEV |\ 
    16171623         PR_EXP | PR_GOLD | PR_ARMOR | PR_HP |\ 
    1618          PR_MANA | PR_DEPTH | PR_HEALTH | PR_EQUIPPY | PR_SPEED) 
     1624         PR_MANA | PR_DEPTH | PR_HEALTH | PR_SPEED) 
    16191625 
    16201626/* Display Extra Info */ 
  • trunk/src/dungeon.c

    r507 r522  
    231231                p_ptr->notice |= (PN_COMBINE | PN_REORDER); 
    232232 
    233                 /* Window stuff */ 
    234                 p_ptr->window |= (PW_INVEN | PW_EQUIP); 
     233                /* Redraw stuff */ 
     234                p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    235235        } 
    236236} 
     
    278278                /* Redraw */ 
    279279                p_ptr->redraw |= (PR_HP); 
    280  
    281                 /* Window stuff */ 
    282                 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    283280        } 
    284281} 
     
    324321                /* Redraw */ 
    325322                p_ptr->redraw |= (PR_MANA); 
    326  
    327                 /* Window stuff */ 
    328                 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    329323        } 
    330324} 
     
    475469        { 
    476470                /* Window stuff */ 
    477                 p_ptr->window |= (PW_EQUIP); 
     471                p_ptr->redraw |= (PR_EQUIP); 
    478472        } 
    479473 
     
    522516                p_ptr->notice |= (PN_COMBINE); 
    523517 
    524                 /* Window stuff */ 
    525                 p_ptr->window |= (PW_INVEN); 
     518                /* Redraw stuff */ 
     519                p_ptr->redraw |= (PR_INVEN); 
    526520        } 
    527521 
     
    924918                        if ((o_ptr->timeout < 100) || (!(o_ptr->timeout % 100))) 
    925919                        { 
    926                                 /* Window stuff */ 
    927                                 p_ptr->window |= (PW_EQUIP); 
     920                                /* Redraw stuff */ 
     921                                p_ptr->redraw |= (PR_EQUIP); 
    928922                        } 
    929923 
     
    11001094                        old_cast_spell = l_ptr->cast_spell; 
    11011095 
    1102                         /* Window stuff */ 
    1103                         p_ptr->window |= (PW_MONSTER); 
    1104  
    1105                         /* Window stuff */ 
    1106                         window_stuff(); 
     1096                        /* Redraw stuff */ 
     1097                        p_ptr->redraw |= (PR_MONSTER); 
     1098                        redraw_stuff(); 
    11071099                } 
    11081100        } 
     
    12031195                if (p_ptr->redraw) redraw_stuff(); 
    12041196 
    1205                 /* Redraw stuff (if needed) */ 
    1206                 if (p_ptr->window) window_stuff(); 
    1207  
    12081197 
    12091198                /* Place the cursor on the player */ 
     
    12541243                        /* Redraw stuff (if needed) */ 
    12551244                        if (p_ptr->redraw) redraw_stuff(); 
    1256  
    1257                         /* Window stuff (if needed) */ 
    1258                         if (p_ptr->window) window_stuff(); 
    12591245                } 
    12601246 
     
    13571343                        { 
    13581344                                p_ptr->redraw |= (PR_MAP); 
    1359                                 p_ptr->window |= (PW_MAP); 
    13601345                        } 
    13611346 
     
    15811566 
    15821567        /* Redraw dungeon */ 
    1583         p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY); 
    1584  
    1585         /* Window stuff */ 
    1586         p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); 
    1587  
    1588         /* Window stuff */ 
    1589         p_ptr->window |= (PW_MONSTER | PW_MONLIST); 
    1590  
    1591         /* Window stuff */ 
    1592         p_ptr->window |= (PW_OVERHEAD | PW_MAP); 
     1568        p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_MAP); 
     1569 
     1570        /* Redraw "statusy" things */ 
     1571        p_ptr->redraw |= (PR_INVEN | PR_EQUIP | PR_MONSTER | PR_MONLIST); 
    15931572 
    15941573        /* Update stuff */ 
     
    15981577        redraw_stuff(); 
    15991578 
    1600         /* Redraw stuff */ 
    1601         window_stuff(); 
    1602  
    16031579 
    16041580        /* Hack -- Decrease "xtra" depth */ 
     
    16211597        redraw_stuff(); 
    16221598 
    1623         /* Window stuff */ 
    1624         window_stuff(); 
    1625  
    16261599        /* Refresh */ 
    16271600        Term_fresh(); 
     
    16781651                if (p_ptr->redraw) redraw_stuff(); 
    16791652 
    1680                 /* Redraw stuff */ 
    1681                 if (p_ptr->window) window_stuff(); 
    1682  
    16831653                /* Hack -- Hilite the player */ 
    16841654                move_cursor_relative(p_ptr->py, p_ptr->px); 
     
    17001670                if (p_ptr->redraw) redraw_stuff(); 
    17011671 
    1702                 /* Redraw stuff */ 
    1703                 if (p_ptr->window) window_stuff(); 
    1704  
    17051672                /* Hack -- Hilite the player */ 
    17061673                move_cursor_relative(p_ptr->py, p_ptr->px); 
     
    17211688                /* Redraw stuff */ 
    17221689                if (p_ptr->redraw) redraw_stuff(); 
    1723  
    1724                 /* Window stuff */ 
    1725                 if (p_ptr->window) window_stuff(); 
    17261690 
    17271691                /* Hack -- Hilite the player */ 
     
    19491913 
    19501914 
    1951         /* Window stuff */ 
    1952         p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER_0 | PW_PLAYER_1); 
    1953         p_ptr->window |= (PW_MONSTER | PW_MESSAGE); 
    1954         window_stuff(); 
     1915        /* Redraw stuff */ 
     1916        p_ptr->redraw |= (PR_INVEN | PR_EQUIP | PR_MONSTER | PR_MESSAGE); 
     1917        redraw_stuff(); 
    19551918 
    19561919 
     
    19991962                /* Redraw stuff */ 
    20001963                if (p_ptr->redraw) redraw_stuff(); 
    2001  
    2002                 /* Window stuff */ 
    2003                 if (p_ptr->window) window_stuff(); 
    20041964 
    20051965 
  • trunk/src/effects.c

    r449 r522  
    371371                                msg_print("Your feel your head clear."); 
    372372                                p_ptr->redraw |= (PR_MANA); 
    373                                 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    374373                                *ident = TRUE; 
    375374                        } 
     
    14461445                                msg_print("Your feel your head clear."); 
    14471446                                p_ptr->redraw |= (PR_MANA); 
    1448                                 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    14491447                        } 
    14501448                        return TRUE; 
  • trunk/src/externs.h

    r505 r522  
    695695extern s16b modify_stat_value(int value, int amount); 
    696696extern int calc_blows(const object_type *o_ptr); 
     697extern void display_player_compact(void); 
    697698extern void notice_stuff(void); 
    698699extern void update_stuff(void); 
     
    700701extern void window_stuff(void); 
    701702extern void handle_stuff(void); 
     703extern void init_display(void); 
    702704 
    703705/* xtra2.c */ 
  • trunk/src/init2.c

    r520 r522  
    14281428        char buf[1024]; 
    14291429 
     1430        /* Set up the display handlers and things. */ 
     1431        init_display(); 
    14301432 
    14311433        /*** Verify the "news" file ***/ 
  • trunk/src/load.c

    r507 r522  
    909909                        if (window_flag_desc[i]) 
    910910                        { 
    911                                 /* Process valid flags */ 
    912                                 if (window_mask[n] & (1L << i)) 
     911                                /* Blank invalid flags */ 
     912                                if (!(window_mask[n] & (1L << i))) 
    913913                                { 
    914                                         /* Set */ 
    915                                         if (window_flag[n] & (1L << i)) 
    916                                         { 
    917                                                 /* Set */ 
    918                                                 op_ptr->window_flag[n] |= (1L << i); 
    919                                         } 
     914                                        window_flag[n] &= ~(1L << i); 
    920915                                } 
    921916                        } 
    922917                } 
    923918        } 
     919 
     920        /* Set up the subwindows */ 
     921        subwindows_set_flags(window_flag, ANGBAND_TERM_MAX); 
    924922} 
    925923 
  • trunk/src/loadsave.c

    r516 r522  
    780780        char nb[KEYLEN]; 
    781781        smap_t *s; 
     782        u32b window_flags[ANGBAND_TERM_MAX]; 
    782783 
    783784        s = load_smap(opt_block); 
     
    795796        { 
    796797                strnfmt(nb, KEYLEN, "window_flag[%u]", (unsigned int)i); 
    797                 op_ptr->window_flag[i] = smap_get_u32b(s, nb); 
    798         } 
     798                window_flags[i] = smap_get_u32b(s, nb); 
     799        } 
     800 
     801        subwindows_set_flags(window_flags, ANGBAND_TERM_MAX); 
    799802 
    800803        smap_free(s); 
  • trunk/src/melee1.c

    r507 r522  
    570570                                                        p_ptr->notice |= (PN_COMBINE | PN_REORDER); 
    571571 
    572                                                         /* Window stuff */ 
    573                                                         p_ptr->window |= (PW_INVEN); 
     572                                                        /* Redraw stuff */ 
     573                                                        p_ptr->redraw |= (PR_INVEN); 
    574574 
    575575                                                        /* Affect only a single inventory slot */ 
     
    627627                                                p_ptr->redraw |= (PR_GOLD); 
    628628 
    629                                                 /* Window stuff */ 
    630                                                 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    631  
    632629                                                /* Blink away */ 
    633630                                                blinked = TRUE; 
     
    788785                                                } 
    789786 
    790                                                 /* Window stuff */ 
    791                                                 p_ptr->window |= (PW_EQUIP); 
     787                                                /* Redraw stuff */ 
     788                                                p_ptr->redraw |= (PR_EQUIP); 
    792789                                        } 
    793790 
  • trunk/src/melee2.c

    r520 r522  
    13161316                                p_ptr->redraw |= (PR_MANA); 
    13171317 
    1318                                 /* Window stuff */ 
    1319                                 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 
    1320  
    13211318                                /* Heal the monster */ 
    13221319                                if (m_ptr->hp < m_ptr->maxhp) 
  • trunk/src/monster2.c

    r520 r522  
    882882        { 
    883883                /* Window stuff */ 
    884                 p_ptr->window |= (PW_MONSTER); 
     884                p_ptr->redraw |= (PR_MONSTER); 
    885885        } 
    886886} 
     
    919919        { 
    920920                /* Window stuff */ 
    921                 p_ptr->window |= (PW_MONSTER); 
     921                p_ptr->redraw |= (PR_MONSTER); 
    922922        } 
    923923} 
     
    11621162 
    11631163                        /* Window stuff */ 
    1164                         p_ptr->window |= PW_MONLIST; 
     1164                        p_ptr->redraw |= PR_MONLIST; 
    11651165                } 
    11661166        } 
     
    11851185 
    11861186                        /* Window stuff */ 
    1187                         p_ptr->window |= PW_MONLIST; 
     1187                        p_ptr->redraw |= PR_MONLIST; 
    11881188                } 
    11891189        } 
     
    13681368 
    13691369                /* Window stuff */ 
    1370                 p_ptr->window |= (PW_OVERHEAD | PW_MAP); 
     1370                p_ptr->redraw |= (PR_MAP); 
    13711371        } 
    13721372 
     
    14041404 
    14051405                /* Window stuff */ 
    1406                 p_ptr->window |= (PW_OVERHEAD | PW_MAP); 
     1406                p_ptr->redraw |= (PR_MAP); 
    14071407        } 
    14081408 
  • trunk/src/object1.c

    r507 r522  
    25482548 
    25492549/* 
    2550  * Flip "inven" and "equip" in any sub-windows 
    2551  */ 
    2552 void toggle_inven_equip(void) 
    2553 { 
    2554         int j; 
    2555  
    2556         /* Scan windows */ 
    2557         for (j = 0; j < ANGBAND_TERM_MAX; j++) 
    2558         { 
    2559                 /* Unused */ 
    2560                 if (!angband_term[j]) continue; 
    2561  
    2562                 /* Flip inven to equip */ 
    2563                 if (op_ptr->window_flag[j] & (PW_INVEN)) 
    2564                 { 
    2565                         /* Flip flags */ 
    2566                         op_ptr->window_flag[j] &= ~(PW_INVEN); 
    2567                         op_ptr->window_flag[j] |= (PW_EQUIP); 
    2568  
    2569                         /* Window stuff */ 
    2570                         p_ptr->window |= (PW_EQUIP); 
    2571                 } 
    2572  
    2573                 /* Flip inven to equip */ 
    2574                 else if (op_ptr->window_flag[j] & (PW_EQUIP)) 
    2575                 { 
    2576                         /* Flip flags */ 
    2577                         op_ptr->window_flag[j] &= ~(PW_EQUIP); 
    2578                         op_ptr->window_flag[j] |= (PW_INVEN); 
    2579  
    2580                         /* Window stuff */ 
    2581                         p_ptr->window |= (PW_INVEN); 
    2582                 } 
    2583         } 
    2584 } 
    2585  
    2586  
    2587  
    2588  
    2589 /* 
    25902550 * Verify the choice of an item. 
    25912551 * 
     
    30142974                } 
    30152975 
    3016                 /* Update */ 
    3017                 p_ptr->window |= (PW_INVEN | PW_EQUIP); 
     2976                /* Redraw */ 
     2977                p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
    30182978 
    30192979                /* Redraw windows */ 
    3020                 window_stuff(); 
     2980                redraw_stuff(); 
    30212981 
    30222982                /* Viewing inventory */ 
     
    34883448 
    34893449        /* Update */ 
    3490         p_ptr->window |= (PW_INVEN | PW_EQUIP); 
    3491  
    3492         /* Window stuff */ 
    3493         window_stuff(); 
     3450        p_ptr->redraw |= (PR_INVEN | PR_EQUIP); 
     3451        redraw_stuff(); 
    34943452 
    34953453 
  • trunk/src/object2.c

    r512 r522  
    339339        p_ptr->redraw |= (PR_MAP); 
    340340 
    341         /* Window stuff */ 
    342         p_ptr->window |= (PW_OVERHEAD | PW_MAP); 
    343  
    344341 
    345342 
     
    743740                /* Redraw map */ 
    744741                p_ptr->redraw |= (PR_MAP); 
    745  
    746                 /* Window stuff */ 
    747                 p_ptr->window |= (PW_OVERHEAD | PW_MAP); 
    748742        } 
    749743} 
     
    35623556                p_ptr->notice |= (PN