Annotation of previous/src/gui-sdl/dlgSound.c, revision 1.1.1.4

1.1       root        1: /*
1.1.1.3   root        2:   Previous - dlgSound.c
1.1       root        3: 
                      4:   This file is distributed under the GNU Public License, version 2 or at
                      5:   your option any later version. Read the file gpl.txt for details.
                      6: */
1.1.1.3   root        7: const char DlgSound_fileid[] = "Previous dlgSound.c : " __DATE__ " " __TIME__;
1.1       root        8: 
                      9: #include "main.h"
                     10: #include "configuration.h"
                     11: #include "dialog.h"
                     12: #include "sdlgui.h"
                     13: #include "file.h"
                     14: 
                     15: 
                     16: #define DLGSOUND_ENABLE     3
                     17: 
1.1.1.3   root       18: #define DLGSOUND_EXIT       4
1.1       root       19: 
                     20: 
1.1.1.3   root       21: 
                     22: /* The Sound options dialog: */
1.1       root       23: static SGOBJ sounddlg[] =
                     24: {
1.1.1.3   root       25:     { SGBOX, 0, 0, 0,0, 40,13, NULL },
                     26:     { SGTEXT, 0, 0, 13,1, 16,1, "Sound options" },
                     27:     
                     28:     { SGBOX, 0, 0, 1,3, 38,5, NULL },
1.1.1.4 ! root       29:     { SGCHECKBOX, 0, 0, 4,5, 15,1, "Sound enabled" },
1.1.1.3   root       30:     
                     31:     { SGBUTTON, SG_DEFAULT, 0, 10,10, 21,1, "Back to main menu" },
                     32:     { -1, 0, 0, 0,0, 0,0, NULL }
1.1       root       33: };
                     34: 
                     35: 
                     36: 
                     37: /*-----------------------------------------------------------------------*/
                     38: /**
1.1.1.3   root       39:  * Show and process the Boot options dialog.
1.1       root       40:  */
1.1.1.3   root       41: void DlgSound_Main(void)
1.1       root       42: {
1.1.1.3   root       43:     int but;
                     44:     
                     45:     SDLGui_CenterDlg(sounddlg);
                     46:     
                     47:     /* Set up the dialog from actual values */
                     48:     if (ConfigureParams.Sound.bEnableSound)
                     49:         sounddlg[DLGSOUND_ENABLE].state |= SG_SELECTED;
1.1.1.2   root       50:     else
1.1.1.3   root       51:         sounddlg[DLGSOUND_ENABLE].state &= ~SG_SELECTED;
                     52:     
                     53:     /* Draw and process the dialog */
                     54:     
                     55:     do
                     56:     {
                     57:         but = SDLGui_DoDialog(sounddlg, NULL);
                     58:     }
                     59:     while (but != DLGSOUND_EXIT && but != SDLGUI_QUIT
                     60:            && but != SDLGUI_ERROR && !bQuitProgram);
                     61:     
1.1.1.2   root       62:     
1.1.1.3   root       63:     /* Read values from dialog */
                     64:     ConfigureParams.Sound.bEnableSound = sounddlg[DLGSOUND_ENABLE].state & SG_SELECTED;
                     65: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.