176 char txt_buf[256]; txt_buf[0] = 0;
177 char msg_buf[128]; msg_buf[0] = 0;
178 char src_buf[64]; src_buf[0] = 0;
179 char dst_buf[64]; dst_buf[0] = 0;
180 char act_buf[64]; act_buf[0] = 0;
192 if (dst_elem && dst_elem->
NumShips() == 1 && dst_elem->
GetShip(1) == sender) {
194 sprintf_s(src_buf,
"%s", sender->
Name());
197 vox_channel = (sender->
Identity()%3) + 5;
204 vox_channel = (sender->
Identity()%3) + 5;
211 sprintf_s(src_buf,
"%s", sender->
Name());
214 sprintf_s(src_buf,
"This is %s", sender->
Name());
222 if (index > 1 && dst_elem) {
223 sprintf_s(dst_buf,
"%s Leader", (
const char*) dst_elem->
Name());
224 sprintf_s(src_buf,
"this is %s %d", (
const char*) dst_elem->
Name(), index);
227 sprintf_s(src_buf,
"this is %s leader", (
const char*) dst_elem->
Name());
232 strcpy_s(dst_buf, (
const char*) dst_ship->
Name());
233 src_buf[0] = tolower(src_buf[0]);
240 sprintf_s(dst_buf,
"%s Flight", (
const char*) dst_elem->
Name());
247 sprintf_s(dst_buf,
"%s Leader", (
const char*) dst_elem->
Name());
248 sprintf_s(src_buf,
"this is %s %d", (
const char*) dst_elem->
Name(), index);
251 sprintf_s(src_buf,
"this is %s leader", (
const char*) dst_elem->
Name());
258 strcpy_s(dst_buf, (
const char*) dst_elem->
Name());
259 src_buf[0] = tolower(src_buf[0]);
278 if (dst_ship == msg->
Sender()) {
285 sprintf_s(msg_buf,
"%s.",
TranslateVox(
"Unable").data());
291 sprintf_s(msg_buf,
"%s. %s",
293 (
const char*) msg->
Info());
296 sprintf_s(msg_buf,
"%s.",
TranslateVox(act_buf).data());
301 sprintf_s(msg_buf,
"%s. %s",
303 (
const char*) msg->
Info());
306 sprintf_s(msg_buf,
"%s.",
TranslateVox(act_buf).data());
312 sprintf_s(msg_buf,
TranslateVox(
"Move patrol.").data());
315 else if (target && dst_ship && msg->
Sender()) {
323 sprintf_s(msg_buf,
"%s %s.",
330 sprintf_s(msg_buf,
"%s %s.",
336 sprintf_s(msg_buf,
"%s %s",
338 (
const char*) msg->
Info());
345 char last_char = msg_buf[strlen(msg_buf)-1];
346 if (last_char !=
'!' && last_char !=
'.' && last_char !=
'?')
347 strcat_s(msg_buf,
".");
350 if (dst_buf[0] && src_buf[0]) {
352 txt_buf[0] = toupper(txt_buf[0]);
355 else if (src_buf[0]) {
356 sprintf_s(txt_buf,
"%s. %s",
TranslateVox(src_buf).data(), msg_buf);
357 txt_buf[0] = toupper(txt_buf[0]);
360 else if (dst_buf[0]) {
361 sprintf_s(txt_buf,
"%s %s",
TranslateVox(dst_buf).data(), msg_buf);
362 txt_buf[0] = toupper(txt_buf[0]);
366 strcpy_s(txt_buf, msg_buf);
370 const char* path[8] = {
"1",
"1",
"2",
"3",
"4",
"5",
"6",
"7" };
372 RadioVox* vox =
new(__FILE__,__LINE__)
RadioVox(vox_channel, path[vox_channel], txt_buf);