Beispiel #1
0
CEStr::CEStr(const wchar_t* asStr1, const wchar_t* asStr2/*= NULL*/, const wchar_t* asStr3/*= NULL*/, const wchar_t* asStr4/*= NULL*/, const wchar_t* asStr5/*= NULL*/, const wchar_t* asStr6/*= NULL*/, const wchar_t* asStr7/*= NULL*/, const wchar_t* asStr8/*= NULL*/, const wchar_t* asStr9/*= NULL*/)
	: ms_Val(NULL), mn_MaxCount(0)
{
	CESTRLOG1("CEStr::CEStr(const wchar_t* x%p, x%p, x%p, ...)", asStr1, asStr2, asStr3);
	Empty();
	wchar_t* lpszMerged = lstrmerge(asStr1, asStr2, asStr3, asStr4, asStr5, asStr6, asStr7, asStr8, asStr9);
	AttachInt(lpszMerged);
}
Beispiel #2
0
int					OPTIONS_Dont				(int* argc, char*** argv, uint32_t aSelect)
{
	if(aSelect < FoundGames)
	{
		int havesavedir = !MakeSaveDir(Games[aSelect]->BaseName);
		int index = 0;

		AttachString("prboom");
		AttachString("-iwad");
		AttachString(Games[aSelect]->WAD);

		if(havesavedir)
		{
			char buffer[MAX_PATH];
			AttachString("-save");
			snprintf(buffer, MAX_PATH, SAVE_PATH"/%s", Games[aSelect]->BaseName);
			AttachString(buffer);
		}

		while(Options[index].Type)
		{
			if(Options[index].Active && Options[index].Type == 1)
			{
				AttachString(Options[index].ArgumentName);
				AttachInt(Options[index].IntValue);
			}
			else if(Options[index].Active && Options[index].Type == 2)
			{
				AttachString(Options[index].ArgumentName);
			}
			else if(Options[index].Active && Options[index].Type == 4)
			{
				AttachString(Options[index].ArgumentName);
				AttachString(Options[index].EnumValues[Options[index].IntValue].Value);
			}
			else if(Options[index].Active && Options[index].Type == 5)
			{
				char* token = strtok(Options[index].StringValue, " ");

				AttachString(Options[index].ArgumentName);

				while(token)
				{
					for(int i = 0; i != *(Options[index].FileCount); i ++)
					{
						if(strcmp(token, Options[index].Files[i].BaseName) == 0)
						{
							AttachString(Options[index].Files[i].WAD);
						}
					}

					token = strtok(0, " ");
				}
			}

			index ++;
		}

		*argc = ArgumentCount;
		*argv = Arguments;

		return 0;
	}

	return -1;
}