mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-27 22:55:16 +01:00
MaSzyna-EU07/maszyna#94. The timetable reader and the W4 event (putvalues PassengerStopPoint:<station>) threw the polish letters of a name away as they read it. Now: - the reader keeps the name as the file spells it in TMTableEntry::StationLabel and timetable_data::RelationLabel1/2 (TTrainParameters::RelationLabel1/2), for showing; StationName and Relation1/2 hold the ascii form as before, byte for byte, so the announcement files, the destination boards, the memory cells written by WhoIs events, the python dictionary, the log and the black box get what they always got - the W4 event keeps its text as the scenery spells it (a scenery saved by the editor no longer loses the letters of its W4 events); the black box map still gets the ascii form - world/stationnames.h has the one place which tells whether a W4 is for a station: timetable::stop_point_is_for(), used by TController::TableUpdateStopPoint() and TTrainParameters::RewindTimeTable(). It compares keys (ascii form, lower case, spaces as underscores), so the timetable and the W4 may each spell the station with or without the letters - TTrainParameters::relation_caption() / station_caption() and TController::NextStop() give the names for the player: with the letters, in utf-8 The folding stays in the matching because the game data needs it: in 36 scenario x station pairs of the Steam install (6 of the SVN) the timetable and the W4 spell the station differently (BALTYK_GLOWNY in capitals against Baltyk_Glowny, Rzepedz with one of its two marks, Lupkow without them), and no announcement file has a letter outside of ascii in its name. Every W4 which matched a station still does. New matches, none of them in the game data: a memory cell text spelled with polish letters, a space where the timetable has an underscore, a name longer than the 32 characters (sizeof(std::string)) the old comparison took. A memory cell text with a # part is still compared whole. win1250_to_ascii() builds its map once: the comparison runs it for every stop point a driver scans.