src/strgen/strgen.cpp
branchNewGRF_ports
changeset 6719 4cc327ad39d5
parent 6574 e1d1a12faaf7
child 6720 35756db7e577
equal deleted inserted replaced
6718:5a8b295aa345 6719:4cc327ad39d5
   504 	{"CURRENCY64", EmitSingleChar, SCC_CURRENCY_64, 2, 0},
   504 	{"CURRENCY64", EmitSingleChar, SCC_CURRENCY_64, 2, 0},
   505 
   505 
   506 	{"WAYPOINT", EmitSingleChar, SCC_WAYPOINT_NAME, 1, 0}, // waypoint name
   506 	{"WAYPOINT", EmitSingleChar, SCC_WAYPOINT_NAME, 1, 0}, // waypoint name
   507 	{"STATION",  EmitSingleChar, SCC_STATION_NAME,  1, 0},
   507 	{"STATION",  EmitSingleChar, SCC_STATION_NAME,  1, 0},
   508 	{"TOWN",     EmitSingleChar, SCC_TOWN_NAME,     1, 0},
   508 	{"TOWN",     EmitSingleChar, SCC_TOWN_NAME,     1, 0},
       
   509 	{"GROUP",    EmitSingleChar, SCC_GROUP_NAME,    1, 0},
   509 
   510 
   510 	// 0x9D is used for the pseudo command SETCASE
   511 	// 0x9D is used for the pseudo command SETCASE
   511 	// 0x9E is used for case switching
   512 	// 0x9E is used for case switching
   512 
   513 
   513 	{"",               EmitSingleChar, '\n',               0, C_DONTCOUNT},
   514 	{"",               EmitSingleChar, '\n',               0, C_DONTCOUNT},
   728 
   729 
   729 static bool CheckCommandsMatch(char *a, char *b, const char *name)
   730 static bool CheckCommandsMatch(char *a, char *b, const char *name)
   730 {
   731 {
   731 	ParsedCommandStruct templ;
   732 	ParsedCommandStruct templ;
   732 	ParsedCommandStruct lang;
   733 	ParsedCommandStruct lang;
   733 	int i,j;
   734 	int i, j;
   734 	bool result = true;
   735 	bool result = true;
   735 
   736 
   736 	ExtractCommandString(&templ, b, true);
   737 	ExtractCommandString(&templ, b, true);
   737 	ExtractCommandString(&lang, a, true);
   738 	ExtractCommandString(&lang, a, true);
   738 
   739 
   912 	// derive some strings from english....
   913 	// derive some strings from english....
   913 
   914 
   914 	in = fopen(file, "r");
   915 	in = fopen(file, "r");
   915 	if (in == NULL) fatal("Cannot open file");
   916 	if (in == NULL) fatal("Cannot open file");
   916 	_cur_line = 1;
   917 	_cur_line = 1;
   917 	while (fgets(buf, sizeof(buf),in) != NULL) {
   918 	while (fgets(buf, sizeof(buf), in) != NULL) {
   918 		rstrip(buf);
   919 		rstrip(buf);
   919 		HandleString(buf, english);
   920 		HandleString(buf, english);
   920 		_cur_line++;
   921 		_cur_line++;
   921 	}
   922 	}
   922 	fclose(in);
   923 	fclose(in);