~ubuntu-branches/ubuntu/quantal/gnurobbo/quantal

« back to all changes in this revision

Viewing changes to sound.c

  • Committer: Bazaar Package Importer
  • Author(s): Ansgar Burchardt, Ansgar Burchardt, Gonéri Le Bouder
  • Date: 2009-03-14 23:10:50 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090314231050-70zcgdcmp7177pql
Tags: 0.61-1
[ Ansgar Burchardt ]
* New Upstream Version (LP: #337089)
* Do not dump vm usage information
  + New patch: do-not-dump-vmusage.diff
* Update packaging for debhelper 7
* Update copyright information
* Update Vcs-* fields for the Git repository
* Bump Standards Version to 3.8.0
  + add debian/README.source
* Add watch file

[ Gonéri Le Bouder ]
* Do not install the LICENSE-font files 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  GNU Robbo
 
2
 *  Copyright (C) notes:
 
3
 *  An Idea and Atari version: LK Avalon, Janusz Pelc, 1989
 
4
 *                 Linux Code: Arkadiusz Lipiec, 2002-2009
 
5
 *                                 <arkadiusz.lipiec@gmail.com>
 
6
 *                             Thunor 2007-2009
 
7
 *                                 <thunorsif@hotmail.com>
 
8
 *
 
9
 *  GNU Robbo is free software - you can redistribute it and/or modify
 
10
 *  it under the terms of the GNU General Public License as published by
 
11
 *  the Free Software Foundation; either version 2, or (at your option)
 
12
 *  any later version.
 
13
 *
 
14
 *  GNU Robbo is distributed in the hope that it will be useful,
 
15
 *  but WITHOUT ANY WARRANTY; without even the impled warranty of
 
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
17
 *  GNU General Public License for more details.
 
18
 *
 
19
 *  You should have received a copy of the GNU General Public License
 
20
 *  along with GNU CC; see the file COPYING. If not, write to the
 
21
 *  Free Software Foundation, 59 Temple Place - Suite 330,
 
22
 *  Boston, MA 02111-1307, USA.
 
23
 *
 
24
 */
 
25
 
 
26
#include "game.h"
 
27
 
 
28
/* Defines */
 
29
#define MESSAGE_BOX_VOLUME_ID "volume"
 
30
#define DELAY_MESSAGE_BOX_VOLUME (1 * game_cycle_limit)                 /* ms */
 
31
 
 
32
/* Variables */
 
33
 
 
34
 
 
35
/* Function prototypes */
 
36
 
 
37
 
 
38
/***************************************************************************
 
39
 * Volume Up                                                               *
 
40
 ***************************************************************************/
 
41
 
 
42
void volume_up(void) {
 
43
        char tempstring[256];
 
44
 
 
45
        if (volume < 100) {
 
46
                volume++;
 
47
                sprintf(tempstring, "%s: %i%%", txt_Volume, volume);
 
48
                show_message_box(REDRAW_INITIALISE, MESSAGE_BOX_VOLUME_ID, DELAY_MESSAGE_BOX_VOLUME, tempstring, FALSE, 6 * video.field_size, 2 * video.field_size);
 
49
        }
 
50
}
 
51
 
 
52
/***************************************************************************
 
53
 * Volume Down                                                             *
 
54
 ***************************************************************************/
 
55
 
 
56
void volume_down(void) {
 
57
        char tempstring[256];
 
58
 
 
59
        if (volume > 0) {
 
60
                volume--;
 
61
                sprintf(tempstring, "%s: %i%%", txt_Volume, volume);
 
62
                show_message_box(REDRAW_INITIALISE, MESSAGE_BOX_VOLUME_ID, DELAY_MESSAGE_BOX_VOLUME, tempstring, FALSE, 6 * video.field_size, 2 * video.field_size);
 
63
        }
 
64
}
 
65