Skip to content

Commit

Permalink
WIP: add swedish translation that compiles, but crash when game loads.
Browse files Browse the repository at this point in the history
SourceX/storm/storm.cpp:258: void* dvl::SMemAlloc(unsigned int, const char*, int, int): Assertion `amount != -1u' failed.
  • Loading branch information
john-tornblom committed Apr 18, 2021
1 parent 0b49c67 commit 37346a0
Show file tree
Hide file tree
Showing 26 changed files with 1,074 additions and 1,074 deletions.
78 changes: 39 additions & 39 deletions Source/control.cpp
Expand Up @@ -70,7 +70,7 @@ BOOL spselflag;
const char *const ClassStrTbl[] = {
"Warrior",
"Rogue",
"Sorcerer",
"TROLLKARL",
"Monk",
"Bard",
"Barbarian",
Expand Down Expand Up @@ -213,14 +213,14 @@ int PanBtnPos[8][5] = {
const char *const PanBtnHotKey[8] = { "'c'", "'q'", "Tab", "Esc", "'i'", "'b'", "Enter", NULL };
/** Maps from panel_button_id to panel button description. */
const char *const PanBtnStr[8] = {
"Character Information",
"Rollfigur Information",
"Quests log",
"Automap",
"Main Menu",
"Inventory",
"Huvudmeny",
"Inventarier",
"Spell book",
"Send Message",
"Player Attack"
"Spelare Attack"
};
/** Maps from attribute_id to the rectangle on screen used for attribute increment buttons. */
RECT32 ChrBtnsRect[4] = {
Expand Down Expand Up @@ -407,22 +407,22 @@ void DrawSpellList(CelOutputBuffer out)
DrawSpellCel(out, x, y, pSpellCels, c, SPLICONLENGTH);
switch (pSplType) {
case RSPLTYPE_SKILL:
sprintf(infostr, "%s Skill", spelldata[pSpell].sSkillText);
sprintf(infostr, "%s Färdighet", spelldata[pSpell].sSkillText);
break;
case RSPLTYPE_SPELL:
sprintf(infostr, "%s Spell", spelldata[pSpell].sNameText);
sprintf(infostr, "%s Trollformel", spelldata[pSpell].sNameText);
if (pSpell == SPL_HBOLT) {
sprintf(tempstr, "Damages undead only");
sprintf(tempstr, "Skadar endast ickedöda");
AddPanelString(tempstr, TRUE);
}
if (s == 0)
sprintf(tempstr, "Spell Level 0 - Unusable");
else
sprintf(tempstr, "Spell Level %i", s);
sprintf(tempstr, "Formelnivå %i", s);
AddPanelString(tempstr, TRUE);
break;
case RSPLTYPE_SCROLL:
sprintf(infostr, "Scroll of %s", spelldata[pSpell].sNameText);
sprintf(infostr, "Skriftrulle om %s", spelldata[pSpell].sNameText);
v = 0;
for (t = 0; t < plr[myplr]._pNumInv; t++) {
if (!plr[myplr].InvList[t].isEmpty()
Expand All @@ -439,17 +439,17 @@ void DrawSpellList(CelOutputBuffer out)
}
}
if (v == 1)
strcpy(tempstr, "1 Scroll");
strcpy(tempstr, "1 Skriftrulle");
else
sprintf(tempstr, "%i Scrolls", v);
sprintf(tempstr, "%i Skriftrullar", v);
AddPanelString(tempstr, TRUE);
break;
case RSPLTYPE_CHARGES:
sprintf(infostr, "Staff of %s", spelldata[pSpell].sNameText);
sprintf(infostr, "Stav med %s", spelldata[pSpell].sNameText);
if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges == 1)
strcpy(tempstr, "1 Charge");
strcpy(tempstr, "1 Laddning");
else
sprintf(tempstr, "%i Charges", plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges);
sprintf(tempstr, "%i Laddningar", plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges);
AddPanelString(tempstr, TRUE);
break;
case RSPLTYPE_INVALID:
Expand Down Expand Up @@ -1014,7 +1014,7 @@ void CheckPanelInfo()
strcpy(infostr, PanBtnStr[i]);
} else {
if (gbFriendlyMode)
strcpy(infostr, "Player friendly");
strcpy(infostr, "Spelare välvillig");
else
strcpy(infostr, "Player attack");
}
Expand All @@ -1028,7 +1028,7 @@ void CheckPanelInfo()
}
}
if (!spselflag && MouseX >= 565 + PANEL_LEFT && MouseX < 621 + PANEL_LEFT && MouseY >= 64 + PANEL_TOP && MouseY < 120 + PANEL_TOP) {
strcpy(infostr, "Select current spell button");
strcpy(infostr, "Välj nuvarande trollformelsknapp");
infoclr = COL_WHITE;
panelflag = TRUE;
pinfoflag = TRUE;
Expand All @@ -1038,23 +1038,23 @@ void CheckPanelInfo()
if (v != SPL_INVALID) {
switch (plr[myplr]._pRSplType) {
case RSPLTYPE_SKILL:
sprintf(tempstr, "%s Skill", spelldata[v].sSkillText);
sprintf(tempstr, "%s Färdighet", spelldata[v].sSkillText);
AddPanelString(tempstr, TRUE);
break;
case RSPLTYPE_SPELL:
sprintf(tempstr, "%s Spell", spelldata[v].sNameText);
sprintf(tempstr, "%s Trollformel", spelldata[v].sNameText);
AddPanelString(tempstr, TRUE);
c = plr[myplr]._pISplLvlAdd + plr[myplr]._pSplLvl[v];
if (c < 0)
c = 0;
if (c == 0)
sprintf(tempstr, "Spell Level 0 - Unusable");
else
sprintf(tempstr, "Spell Level %i", c);
sprintf(tempstr, "Formelnivå %i", c);
AddPanelString(tempstr, TRUE);
break;
case RSPLTYPE_SCROLL:
sprintf(tempstr, "Scroll of %s", spelldata[v].sNameText);
sprintf(tempstr, "Skriftrulle om %s", spelldata[v].sNameText);
AddPanelString(tempstr, TRUE);
s = 0;
for (i = 0; i < plr[myplr]._pNumInv; i++) {
Expand All @@ -1072,18 +1072,18 @@ void CheckPanelInfo()
}
}
if (s == 1)
strcpy(tempstr, "1 Scroll");
strcpy(tempstr, "1 Skriftrulle");
else
sprintf(tempstr, "%i Scrolls", s);
sprintf(tempstr, "%i Skriftrullar", s);
AddPanelString(tempstr, TRUE);
break;
case RSPLTYPE_CHARGES:
sprintf(tempstr, "Staff of %s", spelldata[v].sNameText);
sprintf(tempstr, "Stav med %s", spelldata[v].sNameText);
AddPanelString(tempstr, TRUE);
if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges == 1)
strcpy(tempstr, "1 Charge");
strcpy(tempstr, "1 Laddning");
else
sprintf(tempstr, "%i Charges", plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges);
sprintf(tempstr, "%i Laddningar", plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges);
AddPanelString(tempstr, TRUE);
break;
case RSPLTYPE_INVALID:
Expand Down Expand Up @@ -1278,10 +1278,10 @@ void DrawInfoBox(CelOutputBuffer out)
} else if (pcurs >= CURSOR_FIRSTITEM) {
if (plr[myplr].HoldItem._itype == ITYPE_GOLD) {
nGold = plr[myplr].HoldItem._ivalue;
sprintf(infostr, "%i gold %s", nGold, get_pieces_str(nGold));
sprintf(infostr, "%i guld%s", nGold, get_pieces_str(nGold));
} else if (!plr[myplr].HoldItem._iStatFlag) {
ClearPanel();
AddPanelString("Requirements not met", TRUE);
AddPanelString("Krav ej uppfyllda", TRUE);
pinfoflag = TRUE;
} else {
if (plr[myplr].HoldItem._iIdentified)
Expand Down Expand Up @@ -1319,7 +1319,7 @@ void DrawInfoBox(CelOutputBuffer out)
ClearPanel();
sprintf(tempstr, "%s, Level: %i", ClassStrTbl[plr[pcursplr]._pClass], plr[pcursplr]._pLevel);
AddPanelString(tempstr, TRUE);
sprintf(tempstr, "Hit Points %i of %i", plr[pcursplr]._pHitPoints >> 6, plr[pcursplr]._pMaxHP >> 6);
sprintf(tempstr, "Träffpoäng %i av %i", plr[pcursplr]._pHitPoints >> 6, plr[pcursplr]._pMaxHP >> 6);
AddPanelString(tempstr, TRUE);
}
}
Expand Down Expand Up @@ -1610,7 +1610,7 @@ void DrawLevelUpIcon(CelOutputBuffer out)

if (stextflag == STORE_NONE) {
nCel = lvlbtndown ? 3 : 2;
ADD_PlrStringXY(out, PANEL_LEFT + 0, PANEL_TOP - 49, PANEL_LEFT + 120, "Level Up", COL_WHITE);
ADD_PlrStringXY(out, PANEL_LEFT + 0, PANEL_TOP - 49, PANEL_LEFT + 120, "Nivå Upp", COL_WHITE);
CelDrawTo(out, 40 + PANEL_X, -17 + PANEL_Y, pChrButtons, nCel, 41);
}
}
Expand Down Expand Up @@ -1893,12 +1893,12 @@ void DrawSpellBook(CelOutputBuffer out)
mana = GetManaAmount(myplr, sn) >> 6;
GetDamageAmt(sn, &min, &max);
if (min != -1) {
sprintf(tempstr, "Mana: %i Dam: %i - %i", mana, min, max);
sprintf(tempstr, "Mana: %i Skada: %i - %i", mana, min, max);
} else {
sprintf(tempstr, "Mana: %i Dam: n/a", mana);
sprintf(tempstr, "Mana: %i Skada: ingen", mana);
}
if (sn == SPL_BONESPIRIT) {
sprintf(tempstr, "Mana: %i Dam: 1/3 tgt hp", mana);
sprintf(tempstr, "Mana: %i Skada: 1/3 mål tp", mana);
}
PrintSBookStr(out, 10, yp - 1, FALSE, tempstr, COL_WHITE);
lvl = plr[myplr]._pSplLvl[sn] + plr[myplr]._pISplLvlAdd;
Expand All @@ -1908,7 +1908,7 @@ void DrawSpellBook(CelOutputBuffer out)
if (lvl == 0) {
sprintf(tempstr, "Spell Level 0 - Unusable");
} else {
sprintf(tempstr, "Spell Level %i", lvl);
sprintf(tempstr, "Formelnivå %i", lvl);
}
break;
}
Expand Down Expand Up @@ -1945,9 +1945,9 @@ const char *get_pieces_str(int nGold)
{
const char *result;

result = "piece";
result = "MYNT";
if (nGold != 1)
result = "pieces";
result = "MYNT";
return result;
}

Expand All @@ -1957,11 +1957,11 @@ void DrawGoldSplit(CelOutputBuffer out, int amount)

screen_x = 0;
CelDrawTo(out, 351, 178, pGBoxBuff, 1, 261);
sprintf(tempstr, "You have %u gold", initialDropGoldValue);
sprintf(tempstr, "Du har %u guld", initialDropGoldValue);
ADD_PlrStringXY(out, 366, 87, 600, tempstr, COL_GOLD);
sprintf(tempstr, "%s. How many do", get_pieces_str(initialDropGoldValue));
sprintf(tempstr, "%s. Hur många vill", get_pieces_str(initialDropGoldValue));
ADD_PlrStringXY(out, 366, 103, 600, tempstr, COL_GOLD);
ADD_PlrStringXY(out, 366, 121, 600, "you want to remove?", COL_GOLD);
ADD_PlrStringXY(out, 366, 121, 600, "vill du ta bort?", COL_GOLD);
if (amount > 0) {
sprintf(tempstr, "%u", amount);
PrintGameStr(out, 388, 140, tempstr, COL_WHITE);
Expand Down
10 changes: 5 additions & 5 deletions Source/cursor.cpp
Expand Up @@ -173,8 +173,8 @@ void CheckTown()
|| (cursmx == missile[mx]._mix && cursmy == missile[mx]._miy)) {
trigflag = TRUE;
ClearPanel();
strcpy(infostr, "Town Portal");
sprintf(tempstr, "from %s", plr[missile[mx]._misource]._pName);
strcpy(infostr, "Stadsportal");
sprintf(tempstr, "från %s", plr[missile[mx]._misource]._pName);
AddPanelString(tempstr, TRUE);
cursmx = missile[mx]._mix;
cursmy = missile[mx]._miy;
Expand All @@ -199,11 +199,11 @@ void CheckRportal()
|| cursmx == missile[mx]._mix && cursmy == missile[mx]._miy) {
trigflag = TRUE;
ClearPanel();
strcpy(infostr, "Portal to");
strcpy(infostr, "Portal till");
if (!setlevel)
strcpy(tempstr, "The Unholy Altar");
strcpy(tempstr, "Det Skändade Altaret");
else
strcpy(tempstr, "level 15");
strcpy(tempstr, "nivå 15");
AddPanelString(tempstr, TRUE);
cursmx = missile[mx]._mix;
cursmy = missile[mx]._miy;
Expand Down
12 changes: 6 additions & 6 deletions Source/diablo.cpp
Expand Up @@ -407,7 +407,7 @@ static void SaveOptions()
setIniInt("Hellfire", "Intro", sgOptions.Hellfire.bIntro);
setIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem);

setIniInt("Audio", "Sound Volume", sgOptions.Audio.nSoundVolume);
setIniInt("Audio", "Ljudvolym", sgOptions.Audio.nSoundVolume);
setIniInt("Audio", "Music Volume", sgOptions.Audio.nMusicVolume);
setIniInt("Audio", "Walking Sound", sgOptions.Audio.bWalkingSound);
setIniInt("Audio", "Auto Equip Sound", sgOptions.Audio.bAutoEquipSound);
Expand Down Expand Up @@ -475,7 +475,7 @@ static void LoadOptions()
sgOptions.Hellfire.bIntro = getIniBool("Hellfire", "Intro", true);
getIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem, sizeof(sgOptions.Hellfire.szItem), "");

sgOptions.Audio.nSoundVolume = getIniInt("Audio", "Sound Volume", VOLUME_MAX);
sgOptions.Audio.nSoundVolume = getIniInt("Audio", "Ljudvolym", VOLUME_MAX);
sgOptions.Audio.nMusicVolume = getIniInt("Audio", "Music Volume", VOLUME_MAX);
sgOptions.Audio.bWalkingSound = getIniBool("Audio", "Walking Sound", true);
sgOptions.Audio.bAutoEquipSound = getIniBool("Audio", "Auto Equip Sound", false);
Expand Down Expand Up @@ -1051,8 +1051,8 @@ static void PressKey(int vkey)
helpflag = FALSE;
} else if (stextflag != STORE_NONE) {
ClearPanel();
AddPanelString("No help available", TRUE); /// BUGFIX: message isn't displayed
AddPanelString("while in stores", TRUE);
AddPanelString("Ingen hjälp tillgänglig", TRUE); /// BUGFIX: message isn't displayed
AddPanelString("när du är i en affär", TRUE);
track_repeat_walk(FALSE);
} else {
invflag = FALSE;
Expand Down Expand Up @@ -1329,8 +1329,8 @@ static void PressChar(WPARAM vkey)
char pszStr[120];
const char *difficulties[3] = {
"Normal",
"Nightmare",
"Hell",
"Mardröm",
"Helvetet",
};
sprintf(pszStr, "%s, mode = %s", gszProductName, difficulties[gnDifficulty]);
NetSendCmdString(1 << myplr, pszStr);
Expand Down
72 changes: 36 additions & 36 deletions Source/error.cpp
Expand Up @@ -15,49 +15,49 @@ char msgcnt;
/** Maps from error_id to error message. */
const char *const MsgStrings[] = {
"",
"No automap available in town",
"Autokarta ej tillgänglig i staden",
"No multiplayer functions in demo",
"Direct Sound Creation Failed",
"Not available in shareware version",
"Not enough space to save",
"No Pause in town",
"Paus ej tillgängligt i staden",
"Copying to a hard disk is recommended",
"Multiplayer sync problem",
"No pause in multiplayer",
"Loading...",
"Saving...",
"Some are weakened as one grows strong",
"New strength is forged through destruction",
"Those who defend seldom attack",
"The sword of justice is swift and sharp",
"While the spirit is vigilant the body thrives",
"The powers of mana refocused renews",
"Time cannot diminish the power of steel",
"Magic is not always what it seems to be",
"What once was opened now is closed",
"Intensity comes at the cost of wisdom",
"Arcane power brings destruction",
"That which cannot be held cannot be harmed",
"Crimson and Azure become as the sun",
"Knowledge and wisdom at the cost of self",
"Drink and be refreshed",
"Wherever you go, there you are",
"Energy comes at the cost of wisdom",
"Riches abound when least expected",
"Where avarice fails, patience gains reward",
"Blessed by a benevolent companion!",
"The hands of men may be guided by fate",
"Strength is bolstered by heavenly faith",
"The essence of life flows from within",
"The way is made clear when viewed from above",
"Salvation comes at the cost of wisdom",
"Mysteries are revealed in the light of reason",
"Those who are last may yet be first",
"Generosity brings its own rewards",
"You must be at least level 8 to use this.",
"You must be at least level 13 to use this.",
"You must be at least level 17 to use this.",
"Arcane knowledge gained!",
"Laddar...",
"Sparar...",
"Några veknar när andra växer sig starka",
"Ny styrka formas genom förstörelse",
"De som försvarar sig attackerar sällan",
"Rättvisans svärd är rappt och vasst",
"När själen är vaksam utvecklas kroppen",
"Kraften från mana fokuseras och förnyas",
"Tiden kan inte tära på stålets kraft",
"Magi är inte alltid vad det verkar vara",
"Det som en gång var öppet är nu stängt",
"Visdom är Intensitetens pris",
"Dold kraft bringar förstörelse",
"Det som icke kan hållas kan icke skadas",
"Crimson och Azure blir som solen",
"Kunskap och visdom till priset av ditt jag",
"Drick och återfå dina krafter",
"Varthän du än går, där är du",
"Visdom är Energins pris",
"Rikedomar finns där du minst anar dem",
"Där girigheten står sig slätt, prisas tålamodet",
"Välsignad av en välvillig frände!",
"Människans hand kan styras av ödet",
"Styrka stöds av himmelskt öde",
"Livets essens flödar inifrån",
"Vägen blir tydlig när den ses från ovan",
"Visdom är Frälsningens pris",
"Mysterierna avslöjas i förnuftets ljus",
"De som är sist kan än bli först",
"Givmildhet för med sig sin egen belöning",
"Du måste uppnå minst nivå 8 för att använda detta.",
"Du måste uppnå minst nivå 13 för att använda detta.",
"Du måste uppnå minst nivå 17 för att använda detta.",
"Uråldrig kunskap förvärvad!",
"That which does not kill you...",
"Knowledge is power.",
"Give and you shall receive.",
Expand Down

0 comments on commit 37346a0

Please sign in to comment.