From da8802ac4d06115296e0f8ba955ecf5570741d08 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 7 Oct 2013 19:29:57 +0200 Subject: [PATCH] Implement roaring of Lion When a Lion double-move is animated, the roaring sound is played. It can be selected through the new -soundRoar persistent option. A wav file with a suitable roar is added, and configured for use. --- Makefile.am | 2 +- args.h | 1 + backend.c | 6 ++++-- board.c | 2 ++ common.h | 2 ++ dialogs.c | 3 +++ frontend.h | 3 ++- sounds/roar.wav | Bin 0 -> 24664 bytes usounds.c | 13 ++++++++++--- xboard.conf.in | 1 + 10 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 sounds/roar.wav diff --git a/Makefile.am b/Makefile.am index bf941e3..e9d8ca8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -191,7 +191,7 @@ dist_png_DATA = png/hatch.png png/wood_d.png png/wood_l.png png/xqboard.png soundsdir = $(gamedatadir)/sounds dist_sounds_DATA = \ sounds/cymbal.wav sounds/pop2.wav sounds/slap.wav sounds/ding1.wav sounds/laser.wav \ - sounds/woodthunk.wav sounds/gong.wav sounds/penalty.wav sounds/honkhonk.wav sounds/phone.wav + sounds/woodthunk.wav sounds/gong.wav sounds/penalty.wav sounds/honkhonk.wav sounds/phone.wav sounds/roar.wav ### set correct dir in xboard.conf diff --git a/args.h b/args.h index 01dc439..03a7f43 100644 --- a/args.h +++ b/args.h @@ -468,6 +468,7 @@ ArgDescriptor argDescriptors[] = { { "soundSeek", ArgFilename, (void *) &appData.soundSeek, TRUE, (ArgIniType) "" }, { "soundMove", ArgFilename, (void *) &appData.soundMove, TRUE, (ArgIniType) "" }, { "soundBell", ArgFilename, (void *) &appData.soundBell, TRUE, (ArgIniType) SOUND_BELL }, + { "soundRoar", ArgFilename, (void *) &appData.soundRoar, TRUE, (ArgIniType) "" }, { "soundIcsWin", ArgFilename, (void *) &appData.soundIcsWin, TRUE, (ArgIniType) "" }, { "soundIcsLoss", ArgFilename, (void *) &appData.soundIcsLoss, TRUE, (ArgIniType) "" }, { "soundIcsDraw", ArgFilename, (void *) &appData.soundIcsDraw, TRUE, (ArgIniType) "" }, diff --git a/backend.c b/backend.c index 11ce0e6..fac9abd 100644 --- a/backend.c +++ b/backend.c @@ -8288,7 +8288,7 @@ HandleMachineMove (char *message, ChessProgramState *cps) char realname[MSG_SIZ]; int fromX, fromY, toX, toY; ChessMove moveType; - char promoChar; + char promoChar, roar; char *p, *pv=buf1; int machineWhite, oldError; char *bookHit; @@ -8604,10 +8604,12 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. cps->other->maybeThinking = TRUE; } + roar = (killX >= 0 && IS_LION(boards[forwardMostMove][toY][toX])); + ShowMove(fromX, fromY, toX, toY); /*updates currentMove*/ if (!pausing && appData.ringBellAfterMoves) { - RingBell(); + if(!roar) RingBell(); } /* diff --git a/board.c b/board.c index 8df780b..ab3985e 100644 --- a/board.c +++ b/board.c @@ -604,6 +604,8 @@ AnimateMove (Board board, int fromX, int fromY, int toX, int toY) Pnt frames[kFactor * 2 + 1]; int nFrames, startColor, endColor; + if(killX >= 0 && IS_LION(board[fromY][fromX])) Roar(); + /* Are we animating? */ if (!appData.animate || appData.blindfold) return; diff --git a/common.h b/common.h index d5adda1..2bd7653 100644 --- a/common.h +++ b/common.h @@ -274,6 +274,7 @@ typedef enum { #define SHOGI (int)EmptySquare + (int) #define CHUPROMOTED ((int)WhitePDragon - (int)WhiteDragon)*(gameInfo.variant == VariantChu) + PROMOTED #define IS_SHOGI(V) ((V) == VariantShogi || (V) == VariantChu) +#define IS_LION(V) ((V) == WhiteLion || (V) == BlackLion) typedef ChessSquare Board[BOARD_RANKS][BOARD_FILES]; @@ -538,6 +539,7 @@ typedef struct { char *soundSeek; char *soundMove; // [HGM] IMPORTANT: order must be as in SoundClass char *soundBell; + char *soundRoar; char *soundIcsAlarm; char *soundIcsWin; char *soundIcsLoss; diff --git a/dialogs.c b/dialogs.c index 0f95000..5bcbc0b 100644 --- a/dialogs.c +++ b/dialogs.c @@ -724,6 +724,7 @@ static char *soundNames[] = { N_("Penalty"), N_("Phone"), N_("Pop"), + N_("Roar"), N_("Slap"), N_("Wood Thunk"), NULL, @@ -742,6 +743,7 @@ static char *soundFiles[] = { // sound files corresponding to above names "penalty.wav", "phone.wav", "pop2.wav", + "roar.wav", "slap.wav", "woodthunk.wav", NULL, @@ -769,6 +771,7 @@ static Option soundOptions[] = { { 0, 0, 0, NULL, (void*) &appData.soundTell, (char*) soundFiles, soundNames, ComboBox, N_("Tell:") }, { 0, 0, 0, NULL, (void*) &appData.soundKibitz, (char*) soundFiles, soundNames, ComboBox, N_("Kibitz:") }, { 0, 0, 0, NULL, (void*) &appData.soundRequest, (char*) soundFiles, soundNames, ComboBox, N_("Request:") }, +{ 0, 0, 0, NULL, (void*) &appData.soundRoar, (char*) soundFiles, soundNames, ComboBox, N_("Lion roar:") }, { 0, 0, 0, NULL, (void*) &appData.soundSeek, (char*) soundFiles, soundNames, ComboBox, N_("Seek:") }, { 0, SAME_ROW, 0, NULL, NULL, "", NULL, EndMark , "" } }; diff --git a/frontend.h b/frontend.h index 5ac3cf8..e4b8684 100644 --- a/frontend.h +++ b/frontend.h @@ -93,13 +93,14 @@ void DrawSeekDot P((int x, int y, int color)); void PopUpMoveDialog P((char first)); void RingBell P((void)); +int Roar P((void)); void PlayIcsWinSound P((void)); void PlayIcsLossSound P((void)); void PlayIcsDrawSound P((void)); void PlayIcsUnfinishedSound P((void)); void PlayAlarmSound P((void)); void PlayTellSound P((void)); -void PlaySoundFile P((char *name)); +int PlaySoundFile P((char *name)); void PlaySoundByColor P((void)); void EchoOn P((void)); void EchoOff P((void)); diff --git a/sounds/roar.wav b/sounds/roar.wav new file mode 100644 index 0000000000000000000000000000000000000000..16b0af74295587c7a6d31ca866c5ac3428f0fd0f GIT binary patch literal 24664 zcmbun1$154wKke!+Wu*J)1;w>IkA)2j+rgl7T98DIMQL#VP9FvQ3IbR5KH6=wZUTd1R{-*P|)u-X{DkD4xL(8 z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8P9RNI2ZgmsT!7p=(PVADzA=^Lo7H1&Hdil@SXI(??O5yHts$+g z8JU~Jk!ZVmdou9V9hoo!YbuG1j|>ne;y@cL#n-EWukahrxOJ?K6Q2@YTYXKm{90bf zeOF~>b^dPkl)NTpb4^UhwO4Ps+8}X@)e)~YT-C9ww_nu>iS;I3SnW=tGl{OOekNj# zt&~tIq*J6PXtE|UiF0oCfAv1(Z({IYeLCB02DvTrcq<@hkbWdZ|QLZk>E< z10-&|diT{+Me zuSus8N8+5dKVN@=lfU^x;yw9wwI{bmzxMjoG$h(5{v>*_`jNE#YBwc1L7J^@o3HzH z>xQdyzV?Z9B5}%EUsg}Qb=O<3w=T7IQsU)SPsj)Ie(kr_3nc!owodG*)wkcg(Z8Oa zf4K^)mt4F4zk0zS)^2;N!)p@!^$ow#!^9Q-N!Zq!|IaUI^!3I5sSmftzS{ch%>xl8 zUwz~3TXS}6vetfDZTR2L{D%14y8Nv!+&X*h^&6MR+qFA<_2sQQ{Zk`!3{!t<`;{(kNeE&}}_b<-4 M_0|9PGf9j88}otwFaQ7m literal 0 HcmV?d00001 diff --git a/usounds.c b/usounds.c index 67afdb0..31a0cda 100644 --- a/usounds.c +++ b/usounds.c @@ -76,21 +76,22 @@ extern char *getenv(); #include "frontend.h" -void +int PlaySoundFile (char *name) { if (*name == NULLCHAR) { - return; + return 0; } else if (strcmp(name, "$") == 0) { putc(BELLCHAR, stderr); } else { char buf[2048]; char *prefix = "", *sep = ""; - if(appData.soundProgram[0] == NULLCHAR) return; + if(appData.soundProgram[0] == NULLCHAR) return 1; if(!strchr(name, '/')) { prefix = appData.soundDirectory; sep = "/"; } snprintf(buf, sizeof(buf), "%s '%s%s%s' &", appData.soundProgram, prefix, sep, name); system(buf); } + return 1; } void @@ -135,6 +136,12 @@ PlayTellSound () PlaySoundFile(appData.soundTell); } +int +Roar () +{ + return PlaySoundFile(appData.soundRoar); +} + void PlaySoundForColor (ColorClass cc) { diff --git a/xboard.conf.in b/xboard.conf.in index 38186c2..4d312f4 100644 --- a/xboard.conf.in +++ b/xboard.conf.in @@ -43,6 +43,7 @@ -soundTell phone.wav -soundChallenge gong.wav -soundMove woodthunk.wav +-soundRoar roar.wav -soundIcsAlarm penalty.wav -pasteSelection false -keepLineBreaksICS false -- 1.7.0.4