Made the Y/N response on the intro1 screen user settable. Also fixed a problem with descriptions.plist that was generating incorrect planet descriptions.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1315 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Nikos Barkas 2008-01-18 07:16:19 +00:00
parent 049a9ab4eb
commit e7f0b0e316
2 changed files with 16 additions and 6 deletions

View File

@ -93,10 +93,6 @@
<string>Deadly</string>
<string>---- E L I T E ----</string>
</array>
<key>is-word</key>
<array>
<string>is</string>
</array>
<key>system_description</key>
<array>
<array>
@ -1265,6 +1261,8 @@
<string>Human Colonial</string>
<key>human-colonial-description-plural</key>
<string>Human Colonials</string>
<key>is-word</key>
<string>is</string>
<!-- delivery reports -->

View File

@ -2625,9 +2625,21 @@ static BOOL toggling_music;
switch (gui_screen)
{
case GUI_SCREEN_INTRO1:
if(0); // Dummy statement so compiler does not complain.
// In order to support multiple languages, the Y/N response cannot be hardcoded. We get the keys
// corresponding to Yes/No from descriptions.plist and if they are not found there, we set them
// by default to [yY] and [nN] respectively.
id valueYes = [[UNIVERSE descriptions] stringForKey:@"load-previous-commander-yes" defaultValue:@"y"];
id valueNo = [[UNIVERSE descriptions] stringForKey:@"load-previous-commander-no" defaultValue:@"n"];
unsigned char loadPreviousCommanderYes, loadPreviousCommanderNo;
loadPreviousCommanderYes = [valueYes characterAtIndex: 0] & 0x00ff; // Use lower byte of unichar.
loadPreviousCommanderNo = [valueNo characterAtIndex: 0] & 0x00ff; // Use lower byte of unichar.
if (!disc_operation_in_progress)
{
if (([gameView isDown:121])||([gameView isDown:89])) // 'yY'
if (([gameView isDown:loadPreviousCommanderYes]) || ([gameView isDown:loadPreviousCommanderYes - 32]))
{
if (themeMusic)
{
@ -2643,7 +2655,7 @@ static BOOL toggling_music;
}
}
}
if (([gameView isDown:110])||([gameView isDown:78])) // 'nN'
if (([gameView isDown:loadPreviousCommanderNo]) || ([gameView isDown:loadPreviousCommanderNo - 32]))
{
[self setGuiToIntro2Screen];
}