亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? init.cpp

?? After decades of war one company, who had gained powerful supplying both sides with weaponary, steps
?? CPP
字號:
/*Copyright (C) 2003 Parallel RealitiesThis program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/#include "init.h"/*Initalises a whole load of variables*/void initVars(){	srand(time(NULL));	for (int i = 0 ; i < 200 ; i++)	{		star[i].x = rand() % 800;		star[i].y = rand() % 600;		star[i].speed = 1 + (rand() % 3);	}	// These are good values for sound and music	if (engine.useAudio)	{		Mix_Volume(-1, 25);		Mix_VolumeMusic((int)engine.musicVolume);	}}/*Something went wrong. This stops the game, present the error message andprompts the user to press space or ctrl to exit the game. This is unlikely tobe seen by people unless something really stoopid happens!*/void showErrorAndExit(int errorId, char *name){	graphics.clearScreen(graphics.black);	if (errorId != 2)	{		graphics.drawString("A file error has occurred", -1, 200, FONT_RED);	}	else	{		printf("Couldn't create or write to directory '%s'\n", name);		exit(1);	}	char string[255];	switch(errorId)	{		case 0:			strcpy(string, "");			sprintf(string, "%s was not found in the Starfighter data package", name);			graphics.drawString(string, -1, 250, FONT_WHITE);			graphics.drawString("Please try again. If this error persists, contact Parallel Realities", -1, 275, FONT_WHITE);			graphics.drawString("or reinstall the game", -1, 300, FONT_WHITE);			break;		case 1:			graphics.drawString("Project: Starfighter encountered an error whilst", -1, 250, FONT_WHITE);			graphics.drawString("attempting to load game data. Please try running", -1, 275, FONT_WHITE);			graphics.drawString("the game again. If the errors persist, reinstall the game", -1, 300, FONT_WHITE);			break;		case 2:			graphics.drawString("Project: Starfighter encountered a critical error", -1, 250, FONT_WHITE);			graphics.drawString("while attempting to perform a required program function.", -1, 275, FONT_WHITE);			graphics.drawString("Please contact Parallel Realities with details", -1, 300, FONT_WHITE);			break;	}	graphics.drawString("Project: Starfighter will now exit", -1, 450, FONT_WHITE);	graphics.drawString("Press Space to continue", -1, 475, FONT_WHITE);	engine.keyState[SDLK_SPACE] = 0;	while (!engine.keyState[SDLK_SPACE])	{		getPlayerInput();		graphics.updateScreen();	}	exit(1);}/*This bit is just for Linux users. It attempts to get the user'shome directory, then creates the .parallelrealities and .parallelrealities/starfighterdirectories so that saves and temporary data files can be written there. Good, eh? :)*/#if LINUXvoid setupUserHomeDirectory(){	char *userHome;	char *name = getlogin();		passwd *pass;	if (name != NULL)		pass = getpwnam(name);	else		pass = getpwuid(geteuid());	if (pass == NULL)	{		printf("Couldn't determine the user home directory. Exitting.\n");		exit(1);	}	userHome = pass->pw_dir;	char dir[PATH_MAX];	strcpy(dir, "");	sprintf(dir, "%s/.parallelrealities", userHome);	if ((mkdir(dir, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) != 0) && (errno != EEXIST))		showErrorAndExit(2, dir);	sprintf(dir, "%s/.parallelrealities/starfighter", userHome);	if ((mkdir(dir, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) != 0) && (errno != EEXIST))		showErrorAndExit(2, dir);	sprintf(engine.userHomeDirectory, "%s/.parallelrealities/starfighter/", userHome);}#endif/*Chugg chugg chugg.... brrr... chugg chugg chugg...brrrrrr... chugg ch..BRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMM!! Well, hopefully anyway! ;)*/void initSystem(){	strcpy(engine.userHomeDirectory, "");	#if LINUX		setupUserHomeDirectory();	#endif	/* Initialize the SDL library */	if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO) < 0) {		printf("Couldn't initialize SDL: %s\n", SDL_GetError());		exit(1);	}	currentGame.useSound = 1;	currentGame.useMusic = 1;	currentGame.fullScreen = 0;	char filename[PATH_MAX];	int fullScreen = 0, useSound = 1, useMusic = 1;	FILE *fp;	sprintf(filename, "%sconf", engine.userHomeDirectory);	fp = fopen(filename, "rb");	if (fp != NULL)	{		fscanf(fp, "%d %d %d", &fullScreen, &useSound, &useMusic);		fclose(fp);	}	currentGame.fullScreen = fullScreen;	currentGame.useSound = useSound;	currentGame.useMusic = useMusic;	SDL_WM_SetCaption("Project: Starfighter", "starfighter");	SDL_WM_SetIcon(loadImage("gfx/alienDevice.png"), NULL);	if (currentGame.fullScreen)		graphics.screen = SDL_SetVideoMode(800, 600, 16, SDL_HWPALETTE|SDL_FULLSCREEN);	else		graphics.screen = SDL_SetVideoMode(800, 600, 0, SDL_HWPALETTE);	if (graphics.screen == NULL) {		printf("Couldn't set 800x600x16 video mode: %s\n", SDL_GetError());		exit(1);	}	if (engine.useAudio)	{		if (Mix_OpenAudio(22050, AUDIO_S16, engine.useAudio, 1024) < 0)		{			printf("Warning: Couldn't set 22050 Hz 16-bit audio - Reason: %s\n", Mix_GetError());			printf("Sound and Music will be disabled\n");			engine.useAudio = 0;		}	}	SDL_ShowCursor(SDL_DISABLE);	SDL_EventState(SDL_MOUSEMOTION, SDL_DISABLE);}/*Removes [hopefully] all the resources that has beenloaded and created during the game. This is called byatexit();*/void cleanUp(){	printf("Cleaning Up...\n");	printf("Freeing Graphics\n");	graphics.freeGraphics();	printf("Freeing Background\n");	SDL_FreeSurface(graphics.background);	printf("Freeing Sounds\n");	freeSound();	printf("Resetting Lists\n");	resetLists();	delete(engine.bulletHead);	delete(engine.explosionHead);	delete(engine.collectableHead);	delete(graphics.bufferHead);	printf("Freeing Font\n");	for (int i = 0 ; i < MAX_FONTSHAPES ; i++)	{		if (graphics.fontShape[i] != NULL)			SDL_FreeSurface(graphics.fontShape[i]);	}	printf("Removing Mod\n");	char filename[PATH_MAX];	strcpy(filename, "");		sprintf(filename, "%smusic.mod", engine.userHomeDirectory);	remove(filename);	sprintf(filename, "%smusic.s3m", engine.userHomeDirectory);	remove(filename);	if (engine.useAudio)	{		printf("Closing Audio\n");		Mix_CloseAudio();	}	// Save the config using current settings	FILE *fp;	sprintf(filename, "%sconf", engine.userHomeDirectory);	fp = fopen(filename, "wb");	if (fp != NULL)	{		fprintf(fp, "%d %d %d\n", currentGame.fullScreen, currentGame.useSound, currentGame.useMusic);		fclose(fp);	}	else	{		printf("Error saving config\n");	}	SDL_Quit();	printf("Done Cleaning Up...\nThank You for playing Starfighter\n");}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人免费高清| 九色综合狠狠综合久久| 2022国产精品视频| 色悠悠久久综合| 久久久蜜臀国产一区二区| 91黄视频在线观看| 波多野结衣亚洲| 国产精品一区二区三区99| 激情亚洲综合在线| 老司机午夜精品99久久| 青青草国产成人99久久| 五月天网站亚洲| 日日欢夜夜爽一区| 日韩精品视频网站| 国产ts人妖一区二区| 国产乱妇无码大片在线观看| 99久久婷婷国产综合精品电影| 成人av电影在线播放| av电影天堂一区二区在线| 欧美精品一级二级三级| 在线不卡一区二区| 欧美高清一级片在线观看| 欧美激情一区二区三区四区| 亚洲成人手机在线| 日韩国产在线一| 日韩av一区二区三区| 成人做爰69片免费看网站| 99免费精品在线| 日韩一区二区精品在线观看| 欧美mv和日韩mv的网站| 美女免费视频一区二区| 精品一区二区三区免费视频| 91小视频在线免费看| 欧美日韩综合在线免费观看| 欧美区在线观看| 欧美大片一区二区| 国产欧美日韩精品一区| 成人欧美一区二区三区视频网页| 亚洲日本va在线观看| 亚洲1区2区3区视频| 岛国一区二区三区| 日韩欧美中文字幕一区| 亚洲自拍另类综合| 青青草国产精品97视觉盛宴| 91免费在线视频观看| 久久网站最新地址| 午夜成人免费视频| 色婷婷精品久久二区二区蜜臂av | 欧美日韩免费观看一区二区三区| 久久丝袜美腿综合| 日本不卡高清视频| 在线这里只有精品| 国产精品欧美综合在线| 欧美在线影院一区二区| 欧美老年两性高潮| 亚洲免费三区一区二区| 亚洲成人在线网站| 一本大道久久a久久精二百| 欧美韩国日本不卡| 国产精品一区二区男女羞羞无遮挡| 制服丝袜av成人在线看| 国产欧美日韩亚州综合 | 色呦呦国产精品| 国产欧美一区二区三区鸳鸯浴| 美女视频黄 久久| 欧美精品免费视频| 同产精品九九九| 欧美日韩一区 二区 三区 久久精品| 亚洲女人****多毛耸耸8| 不卡av在线免费观看| 国产精品久久看| 日韩精品五月天| 666欧美在线视频| 婷婷成人综合网| 91精品国产免费| 亚洲人被黑人高潮完整版| 99久久er热在这里只有精品15| 日本一区二区三区在线不卡| 国产成人综合精品三级| 久久精品无码一区二区三区| 亚洲成人av一区| 欧美日本免费一区二区三区| 亚洲va欧美va国产va天堂影院| 欧美日韩一区二区电影| 日韩精品一二区| 欧美成人三级电影在线| 久久99精品久久久久久动态图 | 亚洲天堂福利av| 99久久er热在这里只有精品66| 亚洲欧洲国产日韩| 日本国产一区二区| 亚洲图片欧美视频| av影院午夜一区| 亚洲色图在线看| 欧美日本国产视频| 美女网站视频久久| 久久美女艺术照精彩视频福利播放| 国产麻豆成人精品| 日韩午夜电影在线观看| 黄色小说综合网站| 国产成人av一区二区三区在线观看| 久久九九影视网| 99九九99九九九视频精品| 玉足女爽爽91| 成人黄动漫网站免费app| 亚洲同性同志一二三专区| 在线亚洲一区二区| 免费久久99精品国产| 久久精品无码一区二区三区| 91麻豆.com| 免费久久精品视频| 国产精品美女视频| 欧美日韩亚洲国产综合| 韩国三级在线一区| 亚洲婷婷在线视频| 日韩视频不卡中文| 成人va在线观看| 视频一区国产视频| 中文字幕免费不卡在线| 在线观看av不卡| 精品亚洲aⅴ乱码一区二区三区| 国产精品电影一区二区| 678五月天丁香亚洲综合网| 国产精品一级在线| 亚洲国产一区在线观看| 久久你懂得1024| 欧美三级三级三级爽爽爽| 国内精品视频一区二区三区八戒| 国产精品久久免费看| 69堂成人精品免费视频| 成人午夜电影网站| 日韩成人午夜精品| 国产精品麻豆一区二区| 91精品国产麻豆国产自产在线| 成人午夜激情片| 麻豆精品新av中文字幕| 亚洲美女视频在线观看| 久久综合成人精品亚洲另类欧美| 91啦中文在线观看| 国产又黄又大久久| 亚洲成年人影院| 中文字幕日韩一区| 2023国产精品| 91精品国产综合久久久久久漫画 | 天天色图综合网| 国产精品少妇自拍| 日韩精品一区二区三区蜜臀| 一本一本大道香蕉久在线精品 | 久久久久久一二三区| 欧美色图在线观看| 日韩国产在线观看| 亚洲免费在线观看| 国产婷婷精品av在线| 欧美一区二区播放| 欧美性大战xxxxx久久久| 成人深夜在线观看| 国产一区二区三区电影在线观看| 午夜欧美一区二区三区在线播放| 一区免费观看视频| 精品成人一区二区三区四区| www.99精品| 激情成人综合网| 视频一区二区中文字幕| 一区二区三区在线高清| 欧美成人精品3d动漫h| 欧美日韩一级片在线观看| 91视频观看视频| 成人av片在线观看| 国产成人综合网站| 国产综合色精品一区二区三区| 免费成人av资源网| 日韩中文字幕一区二区三区| 亚洲一区二三区| 一区二区三区在线观看欧美| 亚洲天堂a在线| 自拍偷拍亚洲综合| 亚洲欧洲在线观看av| 亚洲国产高清不卡| 中文字幕va一区二区三区| 国产日韩精品一区| 国产嫩草影院久久久久| 久久久久久久综合日本| 久久久综合精品| 久久嫩草精品久久久精品| 久久综合色之久久综合| 26uuu国产一区二区三区| 欧美成人福利视频| 日韩久久久久久| 精品国产免费视频| 亚洲精品一区二区三区精华液| 精品奇米国产一区二区三区| 日韩欧美国产高清| 亚洲精品在线一区二区| 久久久亚洲精品一区二区三区| 久久女同精品一区二区| 久久久三级国产网站| 中文字幕乱码一区二区免费| 国产精品乱人伦中文| 亚洲欧美日本在线| 亚洲一区二区三区激情|