ONEWSFRE.cpp 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658
  1. /*
  2. * Seven Kingdoms: Ancient Adversaries
  3. *
  4. * Copyright 1997,1998 Enlight Software Ltd.
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. //Filename : ONEWSFRE.CPP
  21. //Description : Object news msg generating routines, french version
  22. #if(defined(FRENCH))
  23. #include <OSTR.h>
  24. #include <OTOWN.h>
  25. #include <OFIRMRES.h>
  26. #include <ONATION.h>
  27. #include <OUNIT.h>
  28. #include <OSPY.h>
  29. #include <OFONT.h>
  30. #include <OTECHRES.h>
  31. #include <OMONSRES.h>
  32. #include <OREMOTE.h>
  33. #include <OGODRES.h>
  34. #include <ORACERES.h>
  35. #include <OTALKRES.h>
  36. #include <ONEWS.h>
  37. //--------- Define variable type ----------//
  38. typedef void (News::*NewsFP)();
  39. //-------- Define struct NewsInfo -------//
  40. struct NewsInfo
  41. {
  42. NewsFP news_function_ptr;
  43. char is_major; // whether this is a major news or not
  44. };
  45. //------ Define function pointers array ------//
  46. static NewsInfo news_info_array[] =
  47. {
  48. { &News::diplomacy, 1 },
  49. { &News::town_rebel, 1 },
  50. { &News::migrate, 0 },
  51. { &News::new_nation, 1 },
  52. { &News::nation_destroyed, 1 },
  53. { &News::nation_surrender, 1 },
  54. { &News::king_die, 1 },
  55. { &News::new_king, 1 },
  56. { &News::firm_destroyed, 0 },
  57. { &News::firm_captured, 0 },
  58. { &News::town_destroyed, 0 },
  59. { &News::town_abandoned, 0 },
  60. { &News::town_surrendered, 0 },
  61. { &News::monster_king_killed, 0 },
  62. { &News::monster_firm_destroyed, 0 },
  63. { &News::scroll_acquired, 1 },
  64. { &News::monster_gold_acquired, 0 },
  65. { &News::your_spy_killed, 1 },
  66. { &News::enemy_spy_killed, 1 },
  67. { &News::unit_betray, 1 },
  68. { &News::unit_assassinated, 1 },
  69. { &News::assassinator_caught, 1 },
  70. { &News::general_die, 1 },
  71. { &News::raw_exhaust, 1 },
  72. { &News::tech_researched, 1 },
  73. { &News::lightning_damage, 1 },
  74. { &News::earthquake_damage, 1 },
  75. { &News::goal_deadline, 1 },
  76. { &News::weapon_ship_worn_out, 0 },
  77. { &News::firm_worn_out, 0 },
  78. { &News::chat_msg, 1 },
  79. { &News::multi_retire, 1 },
  80. { &News::multi_quit_game, 1 },
  81. { &News::multi_save_game, 1 },
  82. { &News::multi_connection_lost, 1 },
  83. };
  84. //------- Define static variables --------//
  85. static String str;
  86. //------ Begin of function News::msg -----//
  87. //
  88. // Return the msg string of current news.
  89. //
  90. char* News::msg()
  91. {
  92. NewsFP newsFP = news_info_array[id-1].news_function_ptr;
  93. (this->*newsFP)(); // call the corrsponding function to return the news msg
  94. return str;
  95. }
  96. //------- End of function News::msg -----//
  97. //------ Begin of function News::is_major -----//
  98. //
  99. // Whether this is a major news or not.
  100. //
  101. int News::is_major()
  102. {
  103. if( id==NEWS_TOWN_REBEL )
  104. {
  105. //-- only rebellions happening in the player's village are considered as major news --//
  106. return nation_array.player_recno &&
  107. nation_name_id1 == (~nation_array)->nation_name_id;
  108. }
  109. else
  110. {
  111. return news_info_array[id-1].is_major;
  112. }
  113. }
  114. //------- End of function News::is_major -----//
  115. //------ Begin of function News::diplomacy -----//
  116. //
  117. // Diplomatic messages from other nations.
  118. //
  119. // short_para1 = the recno of TalkMsg in talk_res.talk_msg_array.
  120. //
  121. void News::diplomacy()
  122. {
  123. err_when( talk_res.is_talk_msg_deleted(short_para1) );
  124. TalkMsg* talkMsgPtr = talk_res.get_talk_msg(short_para1);
  125. str = talkMsgPtr->msg_str(nation_array.player_recno);
  126. }
  127. //------- End of function News::diplomacy -----//
  128. //------ Begin of function News::town_rebel -----//
  129. //
  130. // Generate a news that a firm is built
  131. //
  132. // nation_name1() - the name of the nation the rebel took place.
  133. //
  134. // short_para1 = the town name id.
  135. // short_para2 = no. of rebels
  136. //
  137. void News::town_rebel()
  138. {
  139. //---------------- Text Format -----------------//
  140. //
  141. // <no. of rebel> Peasants in <town name> in
  142. // <nation name> is/are rebelling.
  143. //
  144. //----------------------------------------------//
  145. //
  146. // <no. of rebel> paysans sont entrés en rébellion à <town name> dans
  147. // <nation name>.
  148. //
  149. //----------------------------------------------//
  150. err_when( short_para2 < 1 );
  151. str = short_para2;
  152. if( short_para2 == 1 )
  153. str += " paysan est entré en rébellion à ";
  154. else
  155. str += " paysans sont entrés en rébellion à ";
  156. str += town_res.get_name(short_para1);
  157. str += " dans ";
  158. str += nation_name1();
  159. }
  160. //------- End of function News::town_rebel -----//
  161. //------ Begin of function News::migrate -------//
  162. //
  163. // nation_name1() - from nation
  164. // nation_name2() - to nation
  165. //
  166. // short_para1 = the town name id. that the worker migrates from
  167. // short_para2 = the town name id. that the worker migrates to
  168. // short_para3 = race id. of the migrated worker/peasant
  169. // short_para4 = no. of people migrated
  170. // short_para5 = the firm id. that the worker works for
  171. //
  172. void News::migrate()
  173. {
  174. //---------------- Text Format -----------------//
  175. //
  176. // A <racial> <worker name>/Peasant has emigrated from your
  177. // village of <town name> to <town name> in <nation name>.
  178. //
  179. // A <racial> <worker name>/Peasant has immigrated from
  180. // <town name> in <nation name> to your village of <town name>.
  181. //
  182. //----------------------------------------------//
  183. //
  184. // Un <worker name>/paysan <racial> a quitté votre village de <town name>
  185. // pour le village de <town name> dans <nation name>.
  186. //
  187. // Un <worker name>/paysan <racial> a quitté le village de <town name>
  188. // dans <nation name> pour votre village de <town name>.
  189. //
  190. //----------------------------------------------//
  191. if( short_para4 == 1 )
  192. str = "Un ";
  193. else
  194. str = m.format(short_para4);
  195. str += " ";
  196. if( short_para5 )
  197. str += firm_res[short_para5]->worker_title;
  198. else
  199. str += "paysan";
  200. if( short_para4 > 1 )
  201. str += "s";
  202. str += " ";
  203. str += race_res[short_para3]->name;
  204. //------------------------------------//
  205. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id ) // from player nation to another nation
  206. {
  207. str += " a quitté votre village de ";
  208. str += town_res.get_name(short_para1);
  209. str += " pour le village de ";
  210. str += town_res.get_name(short_para2);
  211. if( nation_name_id2 ) // only if it is not an independent town
  212. {
  213. str += " dans ";
  214. str += nation_name2();
  215. }
  216. str += ".";
  217. }
  218. else
  219. {
  220. str += " a quitté le village de ";
  221. str += town_res.get_name(short_para1);
  222. if( nation_name_id1 )
  223. {
  224. str += " dans ";
  225. str += nation_name1();
  226. }
  227. str += " pour votre village de ";
  228. str += town_res.get_name(short_para2);
  229. str += ".";
  230. }
  231. }
  232. //------- End of function News::migrate --------//
  233. //------ Begin of function News::new_nation -----//
  234. //
  235. // king_name1() - name of the king of the new kingdom.
  236. //
  237. void News::new_nation()
  238. {
  239. //---------------- Text Format -----------------//
  240. //
  241. // A new Kingdom has emerged under the leadership of <king Name>.
  242. //
  243. //----------------------------------------------//
  244. //
  245. // Un nouveau Royaume est né sous la souveraineté de <king Name>.
  246. //
  247. //----------------------------------------------//
  248. str = "Un nouveau Royaume est né sous la souveraineté de ";
  249. str += king_name1(1);
  250. str += ".";
  251. }
  252. //------- End of function News::new_nation -----//
  253. //------ Begin of function News::nation_destroyed -----//
  254. //
  255. // nation_name1() - name of the destroyed nation.
  256. //
  257. void News::nation_destroyed()
  258. {
  259. //---------------- Text Format -----------------//
  260. //
  261. // <King>'s Kingdom has been destroyed.
  262. //
  263. //----------------------------------------------//
  264. //
  265. // Le Royaume de <King> a été anéanti.
  266. //
  267. //----------------------------------------------//
  268. str = "Le ";
  269. str += nation_name1();
  270. str += " a été anéanti.";
  271. }
  272. //------- End of function News::nation_destroyed -----//
  273. //------ Begin of function News::nation_surrender -----//
  274. //
  275. // nation_name1() - name of the surrendering nation.
  276. // nation_name2() - name of the nation to surrender.
  277. //
  278. void News::nation_surrender()
  279. {
  280. //---------------- Text Format -----------------//
  281. //
  282. // <King>'s Kingdom has surrendered to <King B>'s Kingdom.
  283. //
  284. // <King>'s Kingdom has surrendered to you.
  285. //
  286. //----------------------------------------------//
  287. //
  288. // Le Royaume de <King> s'est rendu au Royaume de <King B>.
  289. //
  290. // Le Royaume de <King> s'est rendu à vous.
  291. //
  292. //----------------------------------------------//
  293. str = "Le ";
  294. str += nation_name1();
  295. str += " s'est rendu ";
  296. if( nation_array.player_recno && nation_name_id2 == (~nation_array)->nation_name_id )
  297. {
  298. str += "à vous.";
  299. }
  300. else
  301. {
  302. str += "au ";
  303. str += nation_name2();
  304. str += ".";
  305. }
  306. }
  307. //------- End of function News::nation_surrender -----//
  308. //------ Begin of function News::king_die -----//
  309. //
  310. // king_name1() - the nation whose king has died.
  311. //
  312. void News::king_die()
  313. {
  314. //---------------- Text Format -----------------//
  315. //
  316. // Your King, <king name>, has been slain.
  317. //
  318. // OR
  319. //
  320. // King <king name> of <nation name> has been slain.
  321. //
  322. //----------------------------------------------//
  323. //
  324. // Votre Roi <king name> est mort.
  325. //
  326. // OU
  327. //
  328. // Le Roi <king name> de <nation name> est mort.
  329. //
  330. //----------------------------------------------//
  331. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  332. {
  333. str = "Votre Roi ";
  334. str += king_name1();
  335. str += " est mort.";
  336. }
  337. else
  338. {
  339. str = "Le Roi ";
  340. str += king_name1();
  341. str += " de ";
  342. str += nation_name1();
  343. str += " est mort.";
  344. }
  345. }
  346. //------- End of function News::king_die -----//
  347. //------ Begin of function News::new_king -----//
  348. //
  349. // nation_name1() - name of the nation where there is a new king.
  350. //
  351. // short_para1 - race id. of the new king.
  352. // short_para2 - name id. of the new king.
  353. //
  354. void News::new_king()
  355. {
  356. //---------------- Text Format -----------------//
  357. //
  358. // <unit name> has ascended the throne as your new King.
  359. //
  360. // OR
  361. //
  362. // <unit name> has ascended the throne as the new King of
  363. // <nation name>.
  364. //
  365. //----------------------------------------------//
  366. //
  367. // Vive votre nouveau Roi <unit name>.
  368. //
  369. // OU
  370. //
  371. // <unit name> a été couronné Roi de <nation name>.
  372. //
  373. //----------------------------------------------//
  374. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  375. {
  376. str = "Vive votre nouveau Roi ";
  377. str += race_res[short_para1]->get_name(short_para2);
  378. str += ".";
  379. }
  380. else
  381. {
  382. str = race_res[short_para1]->get_name(short_para2);
  383. str += " a été couronné Roi de ";
  384. str += nation_name1();
  385. str += ".";
  386. }
  387. }
  388. //------- End of function News::new_king -----//
  389. //------ Begin of function News::firm_destroyed -----//
  390. //
  391. // short_para1 - name id. of the firm destroyed.
  392. // short_para2 - id of the town where the firm is located.
  393. // short_para3 - destroyer type: 1 - a nation, 2 - rebels, 3 - Fryhtans.
  394. //
  395. void News::firm_destroyed()
  396. {
  397. //---------------- Text Format -----------------//
  398. //
  399. // Your <firm type> near <town name> has been destroyed by <kingdom name>.
  400. // Your <firm type> near <town name> has been destroyed by Rebels.
  401. // Your <firm type> near <town name> has been destroyed by Fryhtans.
  402. //
  403. //----------------------------------------------//
  404. //
  405. // Votre <firm type> près de <town name> a été détruit(e) par
  406. // <kingdom name>.
  407. //
  408. // Votre <firm type> près de <town name> a été détruit(e) par des
  409. // rebelles.
  410. //
  411. // Votre <firm type> près de <town name> a été détuit(e) par des Fryhtans.
  412. //
  413. //----------------------------------------------//
  414. str = "Votre ";
  415. str += firm_res[short_para1]->name;
  416. str += " près de ";
  417. str += town_res.get_name(short_para2);
  418. str += " a été détruit";
  419. switch( short_para2 )
  420. {
  421. case DESTROYER_NATION:
  422. str += " par ";
  423. str += nation_name2();
  424. str += ".";
  425. break;
  426. case DESTROYER_REBEL:
  427. str += " par des rebelles.";
  428. break;
  429. case DESTROYER_MONSTER:
  430. str += " par des Fryhtans.";
  431. break;
  432. case DESTROYER_UNKNOWN:
  433. str += ".";
  434. break;
  435. }
  436. }
  437. //------- End of function News::firm_destroyed -----//
  438. //------ Begin of function News::firm_captured -----//
  439. //
  440. // nation_name2() - name of the nation that took over your firm.
  441. //
  442. // short_para1 - id. of the firm took over
  443. // short_para2 - id of the town where the firm is located.
  444. // short_para3 - whether the capturer of the firm is a spy.
  445. //
  446. void News::firm_captured()
  447. {
  448. //---------------- Text Format -----------------//
  449. //
  450. // Your <firm type> near <town name> has been
  451. // captured by <kingdom name>.
  452. //
  453. // If the capturer is a spy:
  454. //
  455. // Your <firm type> near <town name> has been
  456. // captured by a spy from <kingdom name>.
  457. //
  458. //----------------------------------------------//
  459. //
  460. // Votre <firm type> près de <town name> a été
  461. // capturé(e) par <kingdom name>.
  462. //
  463. // Si l'auteur de la capture est un espion:
  464. //
  465. // Votre <firm type> près de <town name> a été
  466. // capturé(e) par un espion de <kingdom name>.
  467. //
  468. //----------------------------------------------//
  469. str = "Votre ";
  470. str += firm_res[short_para1]->name;
  471. str += " près de ";
  472. str += town_res.get_name(short_para2);
  473. str += " a été capturé par ";
  474. if( short_para3 )
  475. str += "un espion de ";
  476. str += nation_name2();
  477. str += ".";
  478. }
  479. //------- End of function News::firm_captured -----//
  480. //------ Begin of function News::town_destroyed -----//
  481. //
  482. // short_para1 - name id. of the town
  483. // short_para2 - destroyer type
  484. //
  485. void News::town_destroyed()
  486. {
  487. //---------------- Text Format -----------------//
  488. //
  489. // Your village of <name name> has been destroyed by <kingdom name>.
  490. // Your village of <name name> has been destroyed by Rebels.
  491. // Your village of <name name> has been destroyed by Fryhtans.
  492. //
  493. //----------------------------------------------//
  494. //
  495. // Votre village de <name name> a été détruit par <kingdom name>.
  496. // Votre village de <name name> a été détruit par des rebelles.
  497. // Votre village de <name name> a été détruit par des Fryhtans.
  498. //
  499. //----------------------------------------------//
  500. str = "Votre village de ";
  501. str += town_res.get_name(short_para1);
  502. str += " a été détruit";
  503. switch( short_para2 )
  504. {
  505. case DESTROYER_NATION:
  506. str += " par ";
  507. str += nation_name2();
  508. str += ".";
  509. break;
  510. case DESTROYER_REBEL:
  511. str += " par des rebelles.";
  512. break;
  513. case DESTROYER_MONSTER:
  514. str += " par des Fryhtans.";
  515. break;
  516. case DESTROYER_UNKNOWN:
  517. str += ".";
  518. break;
  519. }
  520. }
  521. //------- End of function News::town_destroyed -----//
  522. //------ Begin of function News::town_abandoned -----//
  523. //
  524. // short_para1 - name id of the town
  525. //
  526. void News::town_abandoned()
  527. {
  528. //---------------- Text Format -----------------//
  529. //
  530. // Your village of <village name> has been abandoned by
  531. // its people.
  532. //
  533. //----------------------------------------------//
  534. //
  535. // Votre village de <village name> a été déserté par
  536. // tous ses habitants.
  537. //
  538. //----------------------------------------------//
  539. str = "Votre village de ";
  540. str += town_res.get_name(short_para1);
  541. str += " a été déserté par tous ses habitants.";
  542. }
  543. //------- End of function News::town_abandoned -----//
  544. //------ Begin of function News::town_surrendered -----//
  545. //
  546. // short_para1 - name id. of the surrendering town.
  547. //
  548. // nation_name1() - name of the nation the town surrenders to.
  549. // nation_name2() - name of the nation of the surrendering town.
  550. //
  551. void News::town_surrendered()
  552. {
  553. //---------------- Text Format -----------------//
  554. //
  555. // The village of <village name> in <King's Kingdom> has
  556. // surrendered to you.
  557. //
  558. // The independent village of <village name> has
  559. // surrendered to you.
  560. //
  561. // Your village of <village name> has surrendered
  562. // to <King's Kingdom>.
  563. //
  564. //----------------------------------------------//
  565. //
  566. // Le village de <village name> dans <King's Kingdom> s'est soumis
  567. // à vous.
  568. //
  569. // Le village indépendant de <village name> s'est soumis
  570. // à vous.
  571. //
  572. // Votre village de <village name> s'est soumis
  573. // à <King's Kingdom>.
  574. //
  575. //----------------------------------------------//
  576. if( nation_array.player_recno && nation_name_id2 == (~nation_array)->nation_name_id )
  577. {
  578. str = "Votre village de ";
  579. str += town_res.get_name(short_para1);
  580. str += " s'est soumis à ";
  581. str += nation_name1();
  582. str += ".";
  583. }
  584. else if( nation_name_id2 )
  585. {
  586. str = "Le village de ";
  587. str += town_res.get_name(short_para1);
  588. str += " dans ";
  589. str += nation_name2();
  590. str += " s'est soumis à vous.";
  591. }
  592. else // nation_name_id2 == 0, it's an independent town
  593. {
  594. str = "Le village indépendant de ";
  595. str += town_res.get_name(short_para1);
  596. str += " s'est soumis à vous.";
  597. }
  598. }
  599. //------- End of function News::town_surrendered -----//
  600. //------ Begin of function News::monster_king_killed -----//
  601. //
  602. // short_para1 - monster id.
  603. //
  604. void News::monster_king_killed()
  605. {
  606. //---------------- Text Format -----------------//
  607. //
  608. // An All High <monster type name> has been slain.
  609. //
  610. //----------------------------------------------//
  611. //
  612. // Le Roi des <monster type name> est mort.
  613. //
  614. //----------------------------------------------//
  615. str = "Le Roi des ";
  616. str += monster_res[short_para1]->name;
  617. str += " est mort.";
  618. }
  619. //------- End of function News::monster_king_killed -----//
  620. //------ Begin of function News::monster_firm_destroyed -----//
  621. //
  622. // short_para1 - monster id.
  623. //
  624. void News::monster_firm_destroyed()
  625. {
  626. //---------------- Text Format -----------------//
  627. //
  628. // A <monster type name> Lair has been destroyed.
  629. //
  630. //----------------------------------------------//
  631. //
  632. // Un antre <monster type name> a été détruit.
  633. //
  634. //----------------------------------------------//
  635. char* nameStr = monster_res[short_para1]->name;
  636. str = "Un antre ";
  637. str += nameStr;
  638. str += " a été détruit.";
  639. }
  640. //------- End of function News::monster_firm_destroyed -----//
  641. //------ Begin of function News::scroll_acquired -----//
  642. //
  643. // nation_name1() - the nation that has acquired the scroll.
  644. //
  645. // short_para1 = the race id. of the scroll.
  646. //
  647. void News::scroll_acquired()
  648. {
  649. //---------------- Text Format -----------------//
  650. //
  651. // You have acquired the <race name> Scroll of Power.
  652. // <nation name> has acquired the <race name> Scroll of Power.
  653. //
  654. //----------------------------------------------//
  655. //
  656. // Vous avez pris possession du Parchemin du Pouvoir <race name>.
  657. // <nation name> a pris possession du Parchemin du Pouvoir <race name>.
  658. //
  659. //----------------------------------------------//
  660. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  661. {
  662. str = "Vous avez pris possession du Parchemin du Pouvoir ";
  663. }
  664. else
  665. {
  666. str = nation_name1();
  667. str += " a pris possession du Parchemin du Pouvoir ";
  668. }
  669. str += race_res[short_para1]->adjective;
  670. str += ".";
  671. }
  672. //------- End of function News::scroll_acquired -----//
  673. //------ Begin of function News::monster_gold_acquired -----//
  674. //
  675. // nation_name1() - the nation that has acquired the monster treasure.
  676. //
  677. // short_para1 = amount of gold.
  678. //
  679. void News::monster_gold_acquired()
  680. {
  681. //---------------- Text Format -----------------//
  682. //
  683. // Your have recovered <treasure amount> worth of treasure from the Fryhtans.
  684. //
  685. //----------------------------------------------//
  686. //
  687. // Vous vous êtes emparé d'un trésor Fryhtan d'une valeur de
  688. // <treasure amount>.
  689. //
  690. //----------------------------------------------//
  691. str = "Vous vous êtes emparé d'un trésor Fryhtan d'une valeur de";
  692. str += m.format(short_para1,2);
  693. str += ".";
  694. }
  695. //------- End of function News::monster_gold_acquired -----//
  696. //------ Begin of function News::your_spy_killed -----//
  697. //
  698. // nation_name1() - your nation.
  699. // nation_name2() - the nation that killed your spy.
  700. //
  701. // short_para1 - firm id. if it's a firm
  702. // 0 if it's a town
  703. // race id if spy place == SPY_MOBILE
  704. // short_para2 - the town id.
  705. // name id if spy place == SPY_MOBILE
  706. // short_para3 - spy place
  707. //
  708. void News::your_spy_killed()
  709. {
  710. //---------------- Text Format -----------------//
  711. //
  712. // Your spy has been exposed and executed on his mission to
  713. // <village name> [ in <nation name> ]. (no nation name for independent town.)
  714. //
  715. // Your spy has been exposed and executed on his mission to
  716. // a <firm type name> near <village name> in <nation name>.
  717. //
  718. // Your spy <spy name> has been exposed and executed on his mission to
  719. // <nation name>.
  720. //
  721. //----------------------------------------------//
  722. //
  723. // Votre espion a été découvert et exécuté en mission à
  724. // <village name> [ dans le <nation name> ]. (pas de nation name pour des
  725. // villages indépendants)
  726. //
  727. // Votre espion a été découvert et exécuté en mission dans une
  728. // <firm type name> près de <village name> dans le <nation name>.
  729. //
  730. // Votre espion <spy name> a été découvert et exécuté en mission dans le
  731. // <nation name>.
  732. //
  733. //----------------------------------------------//
  734. if( short_para3 == SPY_FIRM )
  735. {
  736. str = "Votre espion a été découvert et exécuté en mission dans une ";
  737. str += firm_res[short_para1]->name;
  738. str += " près de ";
  739. str += town_res.get_name(short_para2);
  740. if( nation_name_id2 ) // not for independent town.
  741. {
  742. str += " dans le ";
  743. str += nation_name2();
  744. }
  745. }
  746. else if( short_para3 == SPY_TOWN )
  747. {
  748. str = "Votre espion a été découvert et exécuté en mission à ";
  749. str += town_res.get_name(short_para2);
  750. if( nation_name_id2 ) // not for independent town.
  751. {
  752. str += " dans le ";
  753. str += nation_name2();
  754. }
  755. }
  756. else if( short_para3 == SPY_MOBILE )
  757. {
  758. str = "Votre espion ";
  759. str += race_res[short_para1]->get_name(short_para2);
  760. str += " a été découvert et exécuté en mission";
  761. if( nation_name_id2 ) // not for independent town.
  762. {
  763. str += " dans le ";
  764. str += nation_name2();
  765. }
  766. }
  767. str += ".";
  768. }
  769. //------- End of function News::your_spy_killed -----//
  770. //------ Begin of function News::enemy_spy_killed -----//
  771. //
  772. // nation_name1() - your nation.
  773. // nation_name2() - the nation that the spy belongs to.
  774. //
  775. // short_para1 - firm id. if it's a firm
  776. // 0 if it's a town
  777. // short_para2 - town name id. if it's a town
  778. // 0 if it's a firm
  779. // short_para3 - id of the town where the firm is located.
  780. //
  781. void News::enemy_spy_killed()
  782. {
  783. //---------------- Text Format -----------------//
  784. //
  785. // A spy from <kingdom> has been uncovered and executed in your
  786. // <firm type> near <town name>.
  787. //
  788. // A spy from <kingdom> has been uncovered and executed in your
  789. // village of <town name>.
  790. //
  791. // Spy <spy name> from <kingdom> has been uncovered and executed.
  792. //
  793. //----------------------------------------------//
  794. //
  795. // Un espion de <kingdom> a été découvert et exécuté dans votre
  796. // <firm type> près de <town name>.
  797. //
  798. // Un espion de <kingdom> a été découvert et exécuté dans votre village de
  799. // <town name>.
  800. //
  801. // L'espion <spy name> de <kingdom> a été découvert et exécuté.
  802. //
  803. //----------------------------------------------//
  804. if( short_para3==SPY_FIRM || short_para3==SPY_TOWN )
  805. {
  806. str = "Un espion de ";
  807. str += nation_name2();
  808. str += " a été découvert et exécuté dans votre ";
  809. if( short_para3==SPY_FIRM )
  810. {
  811. str += firm_res[short_para1]->name;
  812. str += " près de ";
  813. str += town_res.get_name(short_para2);
  814. str += ".";
  815. }
  816. else
  817. {
  818. str += "village de ";
  819. str += town_res.get_name(short_para2);
  820. str += ".";
  821. }
  822. }
  823. else
  824. {
  825. err_when( short_para3 != SPY_MOBILE );
  826. str = "L'espion ";
  827. str += race_res[short_para1]->get_name(short_para2);
  828. str += " de ";
  829. str += nation_name2();
  830. str += " a été découvert et exécuté.";
  831. }
  832. }
  833. //------- End of function News::enemy_spy_killed -----//
  834. //------ Begin of function News::unit_betray -----//
  835. //
  836. // Only for mobile units or generals in command base.
  837. //
  838. // nation_name1() - the nation that the unit originally belongs to.
  839. // nation_name2() - the nation that the unit has turned towards.
  840. //
  841. // short_para1 - race id. of the unit
  842. // short_para2 - name id. of the unit
  843. // short_para3 - rank id. of the unit
  844. //
  845. void News::unit_betray()
  846. {
  847. //---------------- Text Format -----------------//
  848. //
  849. // [General] <unit name> has betrayed you and turned towards
  850. // <nation name>.
  851. //
  852. // [General] <unit name> has renounced you and become independent.
  853. //
  854. // [General] <unit name> of <nation name> has defected to your
  855. // forces.
  856. //
  857. // Independent unit <unit name> has joined your forces.
  858. //
  859. //----------------------------------------------//
  860. //
  861. // [Général] <unit name> vous a trahi et a prêté allégeance à
  862. // <nation name>.
  863. //
  864. // [Général] <unit name> vous a quitté pour devenir indépendant.
  865. //
  866. // [Général] <unit name> de <nation name> a fait défection en votre
  867. // faveur.
  868. //
  869. // L'unité indépendante <unit name> vous a prêté allégeance.
  870. //
  871. //----------------------------------------------//
  872. if( nation_name_id1 == 0 ) // independent unit joining your force
  873. {
  874. str = "L'unité indépendante ";
  875. str += race_res[short_para1]->get_name(short_para2);
  876. str += " vous a prêté allégeance.";
  877. return;
  878. }
  879. //------------------------------------//
  880. if( short_para3==RANK_GENERAL )
  881. str = "Général ";
  882. else
  883. str = "";
  884. str += race_res[short_para1]->get_name(short_para2);
  885. //---------------------------------//
  886. if( nation_name_id2 == 0 ) // became an independent unit
  887. {
  888. str += " vous a quitté pour devenir indépendant.";
  889. }
  890. else
  891. {
  892. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  893. {
  894. str += " vous a trahi et a prêté allégeance à ";
  895. str += nation_name2();
  896. str += ".";
  897. }
  898. else
  899. {
  900. str += " de ";
  901. str += nation_name1();
  902. str += " a fait défection en votre faveur.";
  903. }
  904. }
  905. }
  906. //------- End of function News::unit_betray -----//
  907. //------ Begin of function News::general_die -----//
  908. //
  909. // short_para1 - race id. of your general
  910. // short_para2 - name id. of your general
  911. //
  912. void News::general_die()
  913. {
  914. //---------------- Text Format -----------------//
  915. //
  916. // Your general, <general name>, has been slain.
  917. //
  918. //----------------------------------------------//
  919. //
  920. // Votre général <general name> est mort.
  921. //
  922. //----------------------------------------------//
  923. str = "Votre général ";
  924. str += race_res[short_para1]->get_single_name( (WORD)short_para2 );
  925. str += " est mort.";
  926. }
  927. //------- End of function News::general_die -----//
  928. //------ Begin of function News::unit_assassinated -----//
  929. //
  930. // short_para1 - race id. of assassinated unit
  931. // short_para2 - name id. of assassinated unit
  932. // short_para3 - rank id. of assassinated unit
  933. // short_para4 - whether the enemy spy has been killed or not.
  934. //
  935. void News::unit_assassinated()
  936. {
  937. //---------------- Text Format -----------------//
  938. //
  939. // Your King, <king name>, has been assassinated by an enemy spy.
  940. // Your general, <general name>, has been assassinated by an enemy spy.
  941. //
  942. // [The enemy spy has been killed.]
  943. //
  944. //----------------------------------------------//
  945. //
  946. // Votre Roi <king name> a été assassiné par un espion ennemi.
  947. // Votre général <general name> a été assassiné par un espion ennemi.
  948. //
  949. // [L'espion ennemi a été tué.]
  950. //
  951. //----------------------------------------------//
  952. if( short_para3 == RANK_KING )
  953. {
  954. str = "Votre Roi ";
  955. str += race_res[short_para1]->get_single_name( (WORD)short_para2 );
  956. }
  957. else
  958. {
  959. str = "Votre général ";
  960. str += race_res[short_para1]->get_single_name( (WORD)short_para2 );
  961. }
  962. str += " a été assassiné par un espion ennemi.";
  963. if( short_para4 )
  964. str += " L'espion ennemi a été tué.";
  965. }
  966. //------- End of function News::unit_assassinated -----//
  967. //------ Begin of function News::assassinator_caught -----//
  968. //
  969. // short_para1 - rank id. of the assassinating target.
  970. //
  971. void News::assassinator_caught()
  972. {
  973. //---------------- Text Format -----------------//
  974. //
  975. // An enemy spy has been killed while attempting
  976. // to assassinate your King/General.
  977. //
  978. //----------------------------------------------//
  979. //
  980. // Un espion ennemi a été tué alors qu'il tentait
  981. // d'assassiner votre Roi/Général.
  982. //
  983. //----------------------------------------------//
  984. str = "Un espion ennemi a été tué alors qu'il tentait d'assassiner votre ";
  985. if( short_para1 == RANK_KING )
  986. str += "Roi.";
  987. else
  988. str += "Général.";
  989. }
  990. //------- End of function News::assassinator_caught -----//
  991. //------ Begin of function News::raw_exhaust -----//
  992. //
  993. // short_para1 - raw id.
  994. //
  995. void News::raw_exhaust()
  996. {
  997. //---------------- Text Format -----------------//
  998. //
  999. // Your <raw type> Mine has exhausted its <raw type> deposit.
  1000. //
  1001. //----------------------------------------------//
  1002. //
  1003. // Votre mine de <raw type> est épuisée.
  1004. //
  1005. //----------------------------------------------//
  1006. str = "Votre mine de ";
  1007. str += raw_res[short_para1]->name;
  1008. str += " est épuisée.";
  1009. }
  1010. //------- End of function News::raw_exhaust -----//
  1011. //------ Begin of function News::tech_researched -----//
  1012. //
  1013. // short_para1 - tech id.
  1014. // short_para2 - tech version.
  1015. //
  1016. void News::tech_researched()
  1017. {
  1018. //---------------- Text Format -----------------//
  1019. //
  1020. // Your scientists have finished their <technology>
  1021. // [Mark <version>] research.
  1022. //
  1023. //----------------------------------------------//
  1024. //
  1025. // Vos chercheurs ont fait une découverte : <technology>
  1026. // [Version <version>].
  1027. //
  1028. //----------------------------------------------//
  1029. str = "Vos chercheurs ont fait une découverte : ";
  1030. str += tech_res[short_para1]->tech_des();
  1031. if( tech_res[short_para1]->max_tech_level > 1 ) // if the tech has more than one level
  1032. {
  1033. str += " Version ";
  1034. str += m.roman_number(short_para2);
  1035. }
  1036. str += ".";
  1037. }
  1038. //------- End of function News::tech_researched -----//
  1039. //------ Begin of function News::lightning_damage -----//
  1040. //
  1041. void News::lightning_damage()
  1042. {
  1043. //---------------- Text Format -----------------//
  1044. //
  1045. // Your <unit name> has been struck and injured/killed by lightning.
  1046. //
  1047. // Your <firm name> near <village name> has been struck/destroyed by lightning.
  1048. //
  1049. // Your village <village name> has been struck/destroyed by lightning.
  1050. //
  1051. //----------------------------------------------//
  1052. //
  1053. // Votre <unit name> a été frappé(e) et blessé(e)/tué(e) par la foudre.
  1054. //
  1055. // Votre <firm name> près de <village name> a été frappé(e)/détruit(e) par
  1056. // la foudre.
  1057. //
  1058. // Votre village de <village name> a été frappé/détruit par la foudre.
  1059. //
  1060. //----------------------------------------------//
  1061. str = "Votre ";
  1062. switch( short_para1 )
  1063. {
  1064. case NEWS_LOC_UNIT:
  1065. if( short_para4 == RANK_GENERAL )
  1066. str += "Général ";
  1067. else if( short_para4 == RANK_KING )
  1068. str += "Roi ";
  1069. else
  1070. str += "unités ";
  1071. if( short_para2 > 0 )
  1072. str += race_res[short_para2]->get_name((WORD) short_para3);
  1073. else
  1074. str += unit_res[short_para3]->name;
  1075. break;
  1076. case NEWS_LOC_FIRM:
  1077. str += firm_res[short_para2]->name;
  1078. if( short_para3 )
  1079. {
  1080. str += " près de ";
  1081. str += town_res.get_name(short_para3);
  1082. }
  1083. break;
  1084. case NEWS_LOC_TOWN:
  1085. str += "village de ";
  1086. str += town_res.get_name(short_para3);
  1087. break;
  1088. default:
  1089. err_here();
  1090. }
  1091. //----------------------------------//
  1092. if( short_para1==NEWS_LOC_UNIT )
  1093. {
  1094. if( short_para5 )
  1095. str += "a été frappé et tué par la foudre.";
  1096. else
  1097. str += "a été frappé et blessé par la foudre.";
  1098. }
  1099. else
  1100. {
  1101. if( short_para5 )
  1102. str += "a été détruit par la foudre.";
  1103. else
  1104. str += "a été détruit par la foudre.";
  1105. }
  1106. }
  1107. //------- End of function News::lightning_damage -----//
  1108. //------ Begin of function News::earthquake_damage -----//
  1109. //
  1110. void News::earthquake_damage()
  1111. {
  1112. //---------------- Text Format -----------------//
  1113. //
  1114. // <number> of your units has/have been injured and <number> killed
  1115. // in an earthquake.
  1116. //
  1117. // <number> of your villagers has/have been killed in an earthquake.
  1118. //
  1119. // <number> of your buildings has/have been damaged and <number> destroyed
  1120. // in an earthquake.
  1121. //
  1122. //----------------------------------------------//
  1123. //
  1124. // <number> de vos unités ont été blessées et <number> tuées
  1125. // dans un tremblement de terre.
  1126. //
  1127. // <number> de vos villageois ont été tués dans un tremblement de terre.
  1128. //
  1129. // <number> de vos bâtiments ont été endommagés et <number> détruits
  1130. // dans un tremblement de terre.
  1131. //
  1132. //----------------------------------------------//
  1133. int conjunction = 0;
  1134. str = "";
  1135. if( short_para1 == 1)
  1136. {
  1137. str += short_para2;
  1138. str += " de vos unités ont été blessées";
  1139. if( short_para3 > 0)
  1140. {
  1141. str += " et ";
  1142. str += short_para3;
  1143. str += " tuées";
  1144. }
  1145. str += " dans un tremblement de terre.";
  1146. }
  1147. else if( short_para1 == 2 )
  1148. {
  1149. if( short_para2 > 0)
  1150. {
  1151. str += short_para2;
  1152. str += " de vos villageois ont été tués dans un tremblement de terre.";
  1153. }
  1154. }
  1155. else if( short_para1 == 3)
  1156. {
  1157. str += short_para2;
  1158. str += " de vos bâtiments ont été endommagés";
  1159. if( short_para3 > 0)
  1160. {
  1161. str += " et ";
  1162. str += short_para3;
  1163. str += " détruits";
  1164. }
  1165. str += " dans un tremblement de terre.";
  1166. }
  1167. else
  1168. err_here();
  1169. }
  1170. //------- End of function News::earthquake_damage -----//
  1171. //------ Begin of function News::goal_deadline -----//
  1172. //
  1173. // Display a warning message as the deadline of the goals approaches.
  1174. //
  1175. // short_para1 - years left before the deadline.
  1176. // short_para2 - months left before the deadline.
  1177. //
  1178. void News::goal_deadline()
  1179. {
  1180. //---------------- Text Format -----------------//
  1181. //
  1182. // Make haste! You have only <year> year[s] and <month> month[s]
  1183. // left to achieve your goal.
  1184. //
  1185. //----------------------------------------------//
  1186. //
  1187. // Hâtez-vous! Il ne vous reste que <year> an[s] et <month> mois
  1188. // pour atteindre votre objectif.
  1189. //
  1190. //----------------------------------------------//
  1191. str = "Hâtez-vous! Il ne vous reste que ";
  1192. if( short_para1 )
  1193. {
  1194. str += short_para1;
  1195. if( short_para1 > 1 )
  1196. str += " ans ";
  1197. else
  1198. str += " an ";
  1199. }
  1200. if( short_para1 && short_para2 )
  1201. str += "et ";
  1202. if( short_para2 )
  1203. {
  1204. str += short_para2;
  1205. str += " mois ";
  1206. }
  1207. str += "pour atteindre votre objectif.";
  1208. }
  1209. //------- End of function News::goal_deadline -----//
  1210. //------ Begin of function News::weapon_ship_worn_out -----//
  1211. //
  1212. // Your weapon or ship worn out and destroyed due to lack of money for
  1213. // maintenance.
  1214. //
  1215. // short_para1 - unit id. of the weapon
  1216. // short_para2 - level of the weapon
  1217. //
  1218. void News::weapon_ship_worn_out()
  1219. {
  1220. //---------------- Text Format -----------------//
  1221. //
  1222. // A <weapon name> <weapon level> of yours has broken
  1223. // down due to the lack of maintenance funds.
  1224. //
  1225. //----------------------------------------------//
  1226. //
  1227. // Un(e) de vos <weapon name> <weapon level> est inutilisable en raison du
  1228. // manque de fonds pour la maintenance.
  1229. //
  1230. //----------------------------------------------//
  1231. str = "Un de vos ";
  1232. str += unit_res[short_para1]->name;
  1233. if( short_para2 )
  1234. {
  1235. str += " ";
  1236. str += m.roman_number(short_para2);
  1237. }
  1238. str += " est inutilisable en raison du manque de fonds pour la maintenance.";
  1239. }
  1240. //------- End of function News::weapon_ship_worn_out -----//
  1241. //------ Begin of function News::firm_worn_out -----//
  1242. //
  1243. // short_para1 - id. of the firm destroyed.
  1244. // short_para2 - id of the town where the firm is located.
  1245. //
  1246. void News::firm_worn_out()
  1247. {
  1248. //---------------- Text Format -----------------//
  1249. //
  1250. // Your <firm type> near <town name> has fallen into
  1251. // disrepair due to the lack of maintenance funds.
  1252. //
  1253. //----------------------------------------------//
  1254. //
  1255. // Votre <firm type> près de <town name> n'est plus en état de marche en
  1256. // raison du manque de fonds pour la maintenance.
  1257. //
  1258. //----------------------------------------------//
  1259. str = "Votre ";
  1260. str += firm_res[short_para1]->name;
  1261. str += " près de ";
  1262. str += town_res.get_name(short_para2);
  1263. str += " n'est plus en état de marche en raison du manque de fonds pour la maintenance.";
  1264. }
  1265. //------- End of function News::firm_worn_out -----//
  1266. //------ Begin of function News::chat_msg -----//
  1267. //
  1268. // short_para1 - id. of the chat msg in Info::remote_chat_str_array[]
  1269. //
  1270. // nation_name1() - the nation from which this chat message is sent.
  1271. //
  1272. void News::chat_msg()
  1273. {
  1274. str = info.remote_chat_array[short_para1-1].chat_str;
  1275. }
  1276. //------- End of function News::chat_msg -----//
  1277. //------ Begin of function News::multi_retire -----//
  1278. //
  1279. // This function is called when a human player retires.
  1280. //
  1281. // nation_name1() - the nation that has retired.
  1282. //
  1283. void News::multi_retire()
  1284. {
  1285. //---------------- Text Format -----------------//
  1286. //
  1287. // <Kingdom name> has retired and quited the game.
  1288. //
  1289. //----------------------------------------------//
  1290. //
  1291. // <Kingdom name> s'est retiré et a abandonné la partie.
  1292. //
  1293. //----------------------------------------------//
  1294. str = nation_name1();
  1295. str += " s'est retiré et a abandonné la partie.";
  1296. }
  1297. //------- End of function News::multi_retire -----//
  1298. //------ Begin of function News::multi_quit_game -----//
  1299. //
  1300. // This function is called when a human player quits the game.
  1301. //
  1302. void News::multi_quit_game()
  1303. {
  1304. //---------------- Text Format -----------------//
  1305. //
  1306. // <Kingdom name> has quited the game.
  1307. //
  1308. //----------------------------------------------//
  1309. //
  1310. // <Kingdom name> a abandonné la partie.
  1311. //
  1312. //----------------------------------------------//
  1313. str = nation_name1();
  1314. str += " a abandonné la partie.";
  1315. }
  1316. //------- End of function News::multi_quit_game -----//
  1317. //------ Begin of function News::multi_save_game -----//
  1318. //
  1319. // This function is called when a human player calls for saving the game.
  1320. //
  1321. void News::multi_save_game()
  1322. {
  1323. //---------------- Text Format -----------------//
  1324. //
  1325. // The current game has been saved to <file name>.
  1326. //
  1327. //----------------------------------------------//
  1328. //
  1329. // La partie en cours a été enregistrée sous le nom <file name>.
  1330. //
  1331. //----------------------------------------------//
  1332. str = "La partie en cours a été enregistrée sous le nom ";
  1333. str += remote.save_file_name;
  1334. str += ".";
  1335. }
  1336. //------- End of function News::multi_save_game -----//
  1337. //------ Begin of function News::multi_connection_lost -----//
  1338. //
  1339. // This function is called when a human player's connection has been lost.
  1340. //
  1341. void News::multi_connection_lost()
  1342. {
  1343. //---------------- Text Format -----------------//
  1344. //
  1345. // The connectino with <kingdom name> has been lost.
  1346. //
  1347. //----------------------------------------------//
  1348. //
  1349. // La connexion avec <kingdom name> s'est interrompue.
  1350. //
  1351. //----------------------------------------------//
  1352. str = "La connexion avec ";
  1353. str += nation_name1();
  1354. str += " s'est interrompue.";
  1355. }
  1356. //------- End of function News::multi_connection_lost -----//
  1357. //------ Begin of function News::nation_name1 -----//
  1358. //
  1359. char* News::nation_name1()
  1360. {
  1361. static String str;
  1362. str = "Royaume de ";
  1363. if( nation_name_id1 < 0 ) // human player - custom name
  1364. str += nation_array.get_human_name(nation_name_id1, 1); // 1-first word of the name only
  1365. else
  1366. str += race_res[nation_race_id1]->get_single_name( (WORD)nation_name_id1 );
  1367. //------ add color bar -------//
  1368. char colorCodeStr[] = " 0";
  1369. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color1;
  1370. str += colorCodeStr;
  1371. return str;
  1372. }
  1373. //------- End of function News::nation_name1 -----//
  1374. //------ Begin of function News::nation_name2 -----//
  1375. //
  1376. char* News::nation_name2()
  1377. {
  1378. static String str;
  1379. str = "Royaume de ";
  1380. if( nation_name_id2 < 0 ) // human player - custom name
  1381. str += nation_array.get_human_name(nation_name_id2, 1); // 1-first word of the name only
  1382. else
  1383. str += race_res[nation_race_id2]->get_single_name( (WORD)nation_name_id2 );
  1384. //------ add color bar -------//
  1385. char colorCodeStr[] = " 0";
  1386. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color2;
  1387. str += colorCodeStr;
  1388. return str;
  1389. }
  1390. //------- End of function News::nation_name2 -----//
  1391. //------ Begin of function News::king_name1 -----//
  1392. //
  1393. // [int] addColor - add color bar at the end of the king name
  1394. // (default: 0)
  1395. //
  1396. char* News::king_name1(int addColor)
  1397. {
  1398. static String str;
  1399. if( nation_name_id1 < 0 ) // human player - custom name
  1400. str = nation_array.get_human_name(nation_name_id1);
  1401. else
  1402. str = race_res[nation_race_id1]->get_name( (WORD)nation_name_id1 );
  1403. //------ add color bar -------//
  1404. if( addColor )
  1405. {
  1406. char colorCodeStr[] = " 0";
  1407. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color1;
  1408. str += colorCodeStr;
  1409. }
  1410. return str;
  1411. }
  1412. //------- End of function News::king_name1 -----//
  1413. //------ Begin of function News::king_name2 -----//
  1414. //
  1415. // [int] addColor - add color bar at the end of the king name
  1416. // (default: 0)
  1417. //
  1418. char* News::king_name2(int addColor)
  1419. {
  1420. static String str;
  1421. if( nation_name_id2 < 0 ) // human player - custom name
  1422. str = nation_array.get_human_name(nation_name_id2);
  1423. else
  1424. str = race_res[nation_race_id2]->get_name( (WORD)nation_name_id2 );
  1425. //------ add color bar -------//
  1426. if( addColor )
  1427. {
  1428. char colorCodeStr[] = " 0";
  1429. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color2;
  1430. str += colorCodeStr;
  1431. }
  1432. return str;
  1433. }
  1434. //------- End of function News::king_name2 -----//
  1435. #endif