Beispiel #1
0
void StageSelect::Init()
{
	stage = 0;
	scroll = 0;
	scrollNLRdir = 0;
	alpha = 1.0f;
	curScroll = 0;
	LoadSaveData();
	selectedIdx = saveStageTdx;
}
int main(int argc, char **argv)
{
	int changed = 0;

	if(argIs("/D"))
	{
		GameDir = nextArg();
		goto readArgs;
	}

	// Check 'GameDir'
	{
		char *file;

		errorCase_m(!existDir(GameDir), "Wrong Game-Dir");

		file = combine(GameDir, "koumajou.exe");
		errorCase_m(!existFile(file), "Wrong Game-Dir, koumajou.exe does not exist!");
		memFree(file);

		file = combine(GameDir, "data");
		errorCase_m(!existDir(file), "Wrong Game-Dir, data does not exist!");
		memFree(file);
	}

	LoadSaveData();
	ShowSaveData();

readArgs:
	if(argIs("/S"))
	{
		StageNo = toValue(nextArg());
		changed = 1;
		goto readArgs;
	}
	if(argIs("/H"))
	{
		HiScore = toValue(nextArg());
		changed = 1;
		goto readArgs;
	}
	if(argIs("/E+"))
	{
		ExtraOpened = 1;
		changed = 1;
		goto readArgs;
	}
	if(argIs("/E-"))
	{
		ExtraOpened = 0;
		changed = 1;
		goto readArgs;
	}

	if(changed)
	{
		cout(">\n");

		ShowSaveData();
		OutputSaveData();
	}
}