Change audio generation files accordingly (#3717)
* Change audio generation files accordingly New way of working : units files are ALWAYS named in english based on the names in audio_arm.cpp names. multiple form (singular, plural(s) are ammended with 0 to 4 suffix, according to languages rules. example : meter1.wav for first form of plural of meter unit,. This filename needs to be the same for all languages (in their respective directories of course) * Care for gruin9x * Better form * Other languages * Cosmetics
This commit is contained in:
@@ -69,12 +69,22 @@ enum SlovakPrompts {
|
||||
|
||||
I18N_PLAY_FUNCTION(sk, pushUnitPrompt, int16_t number, uint8_t unitprompt)
|
||||
{
|
||||
#if defined(CPUARM)
|
||||
if (number == 1)
|
||||
PUSH_UNIT_PROMPT(unitprompt, 0);
|
||||
else if (number > 1 && number < 5)
|
||||
PUSH_UNIT_PROMPT(unitprompt, 1);
|
||||
else
|
||||
PUSH_UNIT_PROMPT(unitprompt, 2);
|
||||
#else
|
||||
unitprompt = SK_PROMPT_UNITS_BASE + unitprompt*4;
|
||||
if (number == 1)
|
||||
PUSH_NUMBER_PROMPT(unitprompt);
|
||||
else if (number > 1 && number < 5)
|
||||
PUSH_NUMBER_PROMPT(unitprompt+1);
|
||||
else
|
||||
PUSH_NUMBER_PROMPT(unitprompt+2);
|
||||
#endif
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
@@ -214,7 +224,7 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
|
||||
if (unit) {
|
||||
SK_PUSH_UNIT_PROMPT(tmp, (SK_PROMPT_UNITS_BASE+((unit-1)*4)));
|
||||
SK_PUSH_UNIT_PROMPT(tmp, unit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,17 +238,17 @@ I18N_PLAY_FUNCTION(sk, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS+1, ZENSKY);
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS, ZENSKY);
|
||||
}
|
||||
|
||||
tmp = seconds / 60;
|
||||
seconds %= 60;
|
||||
if (tmp > 0) {
|
||||
PLAY_NUMBER(tmp, UNIT_MINUTES+1, ZENSKY);
|
||||
PLAY_NUMBER(tmp, UNIT_MINUTES, ZENSKY);
|
||||
}
|
||||
|
||||
if (seconds > 0) {
|
||||
PLAY_NUMBER(seconds, UNIT_SECONDS+1, ZENSKY);
|
||||
PLAY_NUMBER(seconds, UNIT_SECONDS, ZENSKY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user