Based on Crystan's idea to have voiceovers for the Geoscape messages and an observation I made that it might be better to have multiple options for each message so you don't get bombarded with the same phrase over and over again, I was wondering if something as simple as this would do the trick in cp_messages.cpp:
if (playSound) {
const char *sound = NULL;
int msgClipNum;
msgClipNum = rand()%4+1;
switch (type) {
case MSG_DEBUG:
break;
case MSG_STANDARD:
switch (msgClipNum) {
case 1:
sound = "geoscape/standard1";
break;
case 2:
sound = "geoscape/standard2";
break;
case 3:
sound = "geoscape/standard3";
break;
case 4:
sound = "geoscape/standard4";
break;
}
break;
case MSG_INFO:
case MSG_TRANSFERFINISHED:
case MSG_DEATH:
case MSG_CONSTRUCTION:
case MSG_PRODUCTION:
switch (msgClipNum) {
case 1:
sound = "geoscape/info1";
break;
case 2:
sound = "geoscape/info2";
break;
case 3:
sound = "geoscape/info3";
break;
case 4:
sound = "geoscape/info4";
break;
}
break;
case MSG_RESEARCH_PROPOSAL:
case MSG_RESEARCH_FINISHED:
assert(pedia);
case MSG_RESEARCH_HALTED:
case MSG_EVENT:
case MSG_NEWS:
/* reread the new mails in UP_GetUnreadMails */
ccs.numUnreadMails = -1;
switch (msgClipNum) {
case 1:
sound = "geoscape/mail1";
break;
case 2:
sound = "geoscape/mail2";
break;
case 3:
sound = "geoscape/mail3";
break;
case 4:
sound = "geoscape/mail4";
break;
}
break;
case MSG_UFOLOST:
switch (msgClipNum) {
case 1:
sound = "geoscape/ufolost1";
break;
case 2:
sound = "geoscape/ufolost2";
break;
case 3:
sound = "geoscape/ufolost3";
break;
case 4:
sound = "geoscape/ufolost4";
break;
}
break;
case MSG_UFOSPOTTED:
switch (msgClipNum) {
case 1:
sound = "geoscape/ufospotted1";
break;
case 2:
sound = "geoscape/ufospotted2";
break;
case 3:
sound = "geoscape/ufospotted3";
break;
case 4:
sound = "geoscape/ufospotted4";
break;
}
break;
case MSG_BASEATTACK:
switch (msgClipNum) {
case 1:
sound = "geoscape/basealert1";
break;
case 2:
sound = "geoscape/basealert2";
break;
case 3:
sound = "geoscape/basealert3";
break;
case 4:
sound = "geoscape/basealert4";
break;
}
break;
case MSG_TERRORSITE:
switch (msgClipNum) {
case 1:
sound = "geoscape/alien-activity1";
break;
case 2:
sound = "geoscape/alien-activity2";
break;
case 3:
sound = "geoscape/alien-activity3";
break;
case 4:
sound = "geoscape/alien-activity4";
break;
}
break;
case MSG_CRASHSITE:
switch (msgClipNum) {
case 1:
sound = "geoscape/newmission1";
break;
case 2:
sound = "geoscape/newmission2";
break;
case 3:
sound = "geoscape/newmission3";
break;
case 4:
sound = "geoscape/newmission4";
break;
}
break;
case MSG_PROMOTION:
switch (msgClipNum) {
case 1:
sound = "geoscape/promotion1";
break;
case 2:
sound = "geoscape/promotion2";
break;
case 3:
sound = "geoscape/promotion3";
break;
case 4:
sound = "geoscape/promotion4";
break;
}
break;
case MSG_MAX:
break;
}
cgi->S_StartLocalSample(sound, 1.0f);
}
The rand() function requires stdlib.h is defined in the includes but I'm assuming that's already in the code somewhere. My C++ coding is very rusty but I think that's all it would take to generate a number between 1-4 and then use that to select a sound file. To start with a quick copy/paste and rename of the original files would allow the code to work until the actual sound files were created.
Then again, this game is far more complex than anything I've ever fiddled with before code-wise so I don't know if this would do something horrible, and getting this stuff to compile on Windows looks like a pain in the arse just to test something as simple as this. Perhaps one of you experienced coders could look at it and see if it seems viable?