fixes for sound transcripts, conversion of win1250cp to plain ascii, tga loader

This commit is contained in:
tmj-fstate
2017-02-15 00:37:12 +01:00
parent b0ed27ba91
commit cf48989f39
11 changed files with 148 additions and 24 deletions

View File

@@ -13,6 +13,7 @@ http://mozilla.org/MPL/2.0/.
#include "stdafx.h"
#include "mtable.h"
#include "mczapkie/mctools.h"
// using namespace Mtable;
std::shared_ptr<TMTableTime> Mtable::GlobalTime;
@@ -278,8 +279,10 @@ bool TTrainParameters::LoadTTfile(std::string scnpath, int iPlus, double vmax)
if (s != "|")
break;
} // while (!(() || fin.eof()));
if (s != "|")
if( s != "|" ) {
Relation1 = s;
win1250_to_ascii( Relation1 );
}
else
ConversionError = -5;
while (fin >> s || !fin.bad())
@@ -294,6 +297,7 @@ bool TTrainParameters::LoadTTfile(std::string scnpath, int iPlus, double vmax)
break;
} // while (!( || (fin.eof())));
fin >> Relation2;
win1250_to_ascii( Relation2 );
while (fin >> s || !fin.bad())
{
if (s == "Wymagany")
@@ -352,6 +356,8 @@ bool TTrainParameters::LoadTTfile(std::string scnpath, int iPlus, double vmax)
while (s.find("|") == std::string::npos)
fin >> s;
fin >> record->StationName;
// get rid of non-ascii chars. TODO: run correct version based on locale
win1250_to_ascii( record->StationName );
do
{
fin >> s;