[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus data/ccl/sound.ccl src/include/sound....
From: |
Jimmy Salmon |
Subject: |
[Stratagus-CVS] stratagus data/ccl/sound.ccl src/include/sound.... |
Date: |
Thu, 25 Sep 2003 23:33:04 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Jimmy Salmon <address@hidden> 03/09/25 23:33:04
Modified files:
data/ccl : sound.ccl
src/include : sound.h
src/sound : ccl_sound.c sound.c
Log message:
Removed [Human|Peasant|Orc]WorkComplete
Patches:
Index: stratagus/data/ccl/sound.ccl
diff -u stratagus/data/ccl/sound.ccl:1.35 stratagus/data/ccl/sound.ccl:1.36
--- stratagus/data/ccl/sound.ccl:1.35 Fri Sep 5 14:10:54 2003
+++ stratagus/data/ccl/sound.ccl Thu Sep 25 23:33:04 2003
@@ -26,7 +26,7 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
;;
-;; $Id: sound.ccl,v 1.35 2003/09/05 18:10:54 n0body Exp $
+;; $Id: sound.ccl,v 1.36 2003/09/26 03:33:04 jsalmon3 Exp $
;; Uncomment this to enable threaded sound
;(sound-thread)
@@ -89,9 +89,6 @@
;;----------------------------------------------------------------------------
;; Define simple human sounds.
;;
-(make-sound "basic human voices work complete"
- "human/basic_voices/work_complete.wav")
-(make-sound "peasant work complete" "human/units/peasant/work_complete.wav")
(make-sound "basic human voices ready" "human/basic_voices/ready.wav")
(make-sound "basic human voices help 1" "human/basic_voices/help/1.wav")
(make-sound "basic human voices help 2" "human/basic_voices/help/2.wav")
@@ -104,8 +101,6 @@
;;----------------------------------------------------------------------------
;; Define simple orc sounds.
;;
-(make-sound "basic orc voices work complete"
- "orc/basic_voices/work_complete.wav")
(make-sound "basic orc voices ready" "orc/basic_voices/ready.wav")
(make-sound "basic orc voices help 1" "orc/basic_voices/help/1.wav")
(make-sound "basic orc voices help 2" "orc/basic_voices/help/2.wav")
@@ -827,9 +822,9 @@
; 'tree-chopping (make-sound "tree chopping" "tree_chopping.wav")
; 'transport-docking
; 'building-construction
-; 'basic-human-voices-work-complete
-; 'peasant-work-complete
-; 'basic-orc-voices-work-complete
+
+ 'work-complete (list 'human (make-sound "basic human voices work complete"
"human/basic_voices/work_complete.wav"))
+ 'work-complete (list 'orc (make-sound "basic orc voices work complete"
"orc/basic_voices/work_complete.wav"))
;; Repair sound is disabled as default
;;'repair #t
Index: stratagus/src/include/sound.h
diff -u stratagus/src/include/sound.h:1.44 stratagus/src/include/sound.h:1.45
--- stratagus/src/include/sound.h:1.44 Fri Jul 11 10:35:30 2003
+++ stratagus/src/include/sound.h Thu Sep 25 23:33:04 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: sound.h,v 1.44 2003/07/11 14:35:30 n0body Exp $
+// $Id: sound.h,v 1.45 2003/09/26 03:33:04 jsalmon3 Exp $
#ifndef __SOUND_H__
#define __SOUND_H__
@@ -62,9 +62,7 @@
SoundConfig BuildingConstruction; /// building under construction
//FIXME: (Fabrice) I don't think it's the correct place to put this
- SoundConfig HumanWorkComplete; /// building ready
- SoundConfig PeasantWorkComplete; /// building ready
- SoundConfig OrcWorkComplete; /// building ready
+ SoundConfig WorkComplete[MAX_RACES];/// building ready
SoundConfig Repair; /// repair sound
Index: stratagus/src/sound/ccl_sound.c
diff -u stratagus/src/sound/ccl_sound.c:1.50
stratagus/src/sound/ccl_sound.c:1.51
--- stratagus/src/sound/ccl_sound.c:1.50 Sat Aug 2 09:34:25 2003
+++ stratagus/src/sound/ccl_sound.c Thu Sep 25 23:33:04 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_sound.c,v 1.50 2003/08/02 13:34:25 grumbel Exp $
+// $Id: ccl_sound.c,v 1.51 2003/09/26 03:33:04 jsalmon3 Exp $
//@{
@@ -325,6 +325,27 @@
return list;
}
GameSounds.PlacementSuccess.Sound=CCL_SOUND_ID(data);
+ } else if( gh_eq_p(value,gh_symbol2scm("work-complete")) ) {
+ sublist=gh_car(list);
+ list=gh_cdr(list);
+ str=gh_scm2newstr(gh_car(sublist),NULL);
+ for( i=0; i<PlayerRaces.Count; ++i ) {
+ if( !strcmp(PlayerRaces.Name[i],str) ) {
+ break;
+ }
+ }
+ free(str);
+ if( i==PlayerRaces.Count ) {
+ fprintf(stderr,"Unknown race: %s\n",str);
+ ExitFatal(1);
+ }
+ sublist=gh_cdr(sublist);
+ data=gh_car(sublist);
+ if( !CCL_SOUNDP(data) ) {
+ fprintf(stderr,"Sound id expected\n");
+ ExitFatal(1);
+ }
+ GameSounds.WorkComplete[i].Sound=CCL_SOUND_ID(data);
} else if( gh_eq_p(value,gh_symbol2scm("repair")) ) {
data=gh_car(list);
list=gh_cdr(list);
Index: stratagus/src/sound/sound.c
diff -u stratagus/src/sound/sound.c:1.41 stratagus/src/sound/sound.c:1.42
--- stratagus/src/sound/sound.c:1.41 Fri Sep 5 14:10:56 2003
+++ stratagus/src/sound/sound.c Thu Sep 25 23:33:04 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: sound.c,v 1.41 2003/09/05 18:10:56 n0body Exp $
+// $Id: sound.c,v 1.42 2003/09/26 03:33:04 jsalmon3 Exp $
//@{
@@ -75,19 +75,19 @@
#ifndef laterUSE_CCL
// FIXME: Removing this crashes?
={
- { "placement error" , NULL },
- { "placement success" , NULL },
- { "click" , NULL },
+ { "placement error", NULL },
+ { "placement success", NULL },
+ { "click", NULL },
{ "tree chopping", NULL },
{ "transport docking", NULL },
{ "building construction", NULL },
- { "basic human voices work complete" , NULL },
- { "peasant work complete" , NULL },
- { "basic orc voices work complete" , NULL },
- { "repair" , NULL },
- { { "rescue (human) UNUSED" , NULL },
- { "rescue (orc) UNUSED" , NULL },
- }
+ { { "basic human voices work complete", NULL },
+ { "basic orc voices work complete", NULL },
+ },
+ { "repair", NULL },
+ { { "rescue (human) UNUSED", NULL },
+ { "rescue (orc) UNUSED", NULL },
+ },
}
#endif
;
@@ -180,12 +180,7 @@
case VoiceTreeChopping:
return GameSounds.TreeChopping.Sound;
case VoiceWorkCompleted:
- // FIXME: make this more configurable
- if( ThisPlayer->Race==PlayerRaceHuman ) {
- return GameSounds.HumanWorkComplete.Sound;
- } else {
- return GameSounds.OrcWorkComplete.Sound;
- }
+ return GameSounds.WorkComplete[ThisPlayer->Race].Sound;
case VoiceBuilding:
return GameSounds.BuildingConstruction.Sound;
case VoiceDocking:
@@ -339,17 +334,11 @@
GameSounds.BuildingConstruction.Sound=
SoundIdForName(GameSounds.BuildingConstruction.Name);
}
- if( !GameSounds.HumanWorkComplete.Sound ) {
- GameSounds.HumanWorkComplete.Sound=
- SoundIdForName(GameSounds.HumanWorkComplete.Name);
- }
- if( !GameSounds.PeasantWorkComplete.Sound ) {
- GameSounds.PeasantWorkComplete.Sound=
- SoundIdForName(GameSounds.PeasantWorkComplete.Name);
- }
- if( !GameSounds.OrcWorkComplete.Sound ) {
- GameSounds.OrcWorkComplete.Sound=
- SoundIdForName(GameSounds.OrcWorkComplete.Name);
+ for( i=0; i<PlayerRaces.Count; ++i ) {
+ if( !GameSounds.WorkComplete[i].Sound &&
GameSounds.WorkComplete[i].Name ) {
+ GameSounds.WorkComplete[i].Sound=
+ SoundIdForName(GameSounds.WorkComplete[i].Name);
+ }
}
if( !GameSounds.Repair.Sound ) {
GameSounds.Repair.Sound=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus data/ccl/sound.ccl src/include/sound....,
Jimmy Salmon <=