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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? loadsave.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 "loadSave.h"/*Reads in each save game that it finds and gives it an appropriatedescription using the area variable contained in the game binarydata. It returns the slot number (1 - 10) of the most recentlyused file. On the title screen, this is used to determine whethera player can "Continue Current Game" and "Load Saved Game".*/int initSaveSlots(){	char fileName[PATH_MAX];	int imagePos = 350;	Game tempGame;	struct stat fileInfo;	int modTime = 0;	int continueSaveIndex = 0;	FILE *fp;	//READ SAVE GAME DATA	for (int i = 0 ; i < 5 ; i++)	{		sprintf(fileName, "%ssave%.2d.dat", engine.userHomeDirectory, (i + 1));		fp = fopen(fileName, "rb");		if (fp == NULL)		{			sprintf(saveSlot[i], "%.2d - Empty", (i + 1));			if (engine.gameSection == SECTION_TITLE)				graphics.textSurface(13 + i, saveSlot[i], -1, imagePos, FONT_WHITE);		}		else		{			if (fread(&tempGame, sizeof(Game), 1, fp) != 1)			{				sprintf(saveSlot[i], "%.2d - Corrupt Game Data", (i + 1));			}			else			{				sprintf(saveSlot[i], "%.2d - %s, %s", (i + 1), systemNames[tempGame.system], tempGame.stationedName);				if (engine.gameSection == SECTION_TITLE)					graphics.textSurface(13 + i, saveSlot[i], -1, imagePos, FONT_WHITE);			}			if (stat(fileName, &fileInfo) != -1)			{				if (fileInfo.st_mtime > modTime)					{modTime = fileInfo.st_mtime; continueSaveIndex = (i + 1);}			}			fclose(fp);		}		imagePos += 20;	}	return continueSaveIndex;}/*Fill in later...*/signed char loadGame(int slot){	char filename[PATH_MAX];	FILE *fp;	sprintf(filename, "%ssave%.2d.dat", engine.userHomeDirectory, slot);	fp = fopen(filename, "rb");	if (fp == NULL)		return 0;	if (fread(&currentGame, sizeof(Game), 1, fp) != 1)	{		printf("Save game error. The file was not of the expected format.\n");		fclose(fp);		return 0;	}	fclose(fp);	weapon[0] = currentGame.playerWeapon;	weapon[1] = currentGame.playerWeapon2;	player = currentGame.thePlayer;	// Re-init all the planets in this system...	initPlanetMissions(currentGame.system);	// ... and then override with completition status	for (int i = 0 ; i < 10 ; i++)		systemPlanet[i].missionCompleted = currentGame.missionCompleted[i];	return 1;}void saveGame(int slot){	if ((slot < 1) || (slot > 5))	{		printf("Error - Saves may only be 1 to 5\n");		return;	}	FILE *fp;	char fileName[PATH_MAX];	sprintf(fileName, "%ssave%.2d.dat", engine.userHomeDirectory, slot);	fp = fopen(fileName, "wb");	currentGame.playerWeapon = weapon[0];	currentGame.playerWeapon2 = weapon[1];	currentGame.thePlayer = player;	for (int i = 0 ; i < 10 ; i++)		currentGame.missionCompleted[i] = systemPlanet[i].missionCompleted;	if (fp != NULL)	{		if (fwrite(&currentGame, sizeof(Game), 1, fp) != 1)		{			printf("Error Saving Game to Slot %d\n", slot);		}		fclose(fp);	}	else	{		printf("Error Saving Game to Slot %d\n", slot);	}	// Recall to update the save slots... (lazy, yes)	initSaveSlots();	engine.keyState[SDLK_LCTRL] = engine.keyState[SDLK_RCTRL] = 0;}void createSavesSurface(SDL_Surface *savesSurface, signed char clickedSlot){	graphics.blevelRect(savesSurface, 0, 0, 348, 298, 0x00, 0x00, 0x00); 	int y = 10;	for (int i = 0 ; i < 5 ; i++)	{		if (clickedSlot == i)			graphics.blevelRect(savesSurface, 5, y, 338, 25, 0x99, 0x00, 0x00);		else			graphics.blevelRect(savesSurface, 5, y, 338, 25, 0x00, 0x00, 0x99);		graphics.drawString(saveSlot[i], 70, y + 5, FONT_WHITE, savesSurface);		y += 30;	}	graphics.drawString("*** HELP ***", 120, 170, FONT_WHITE, savesSurface);	switch(clickedSlot)	{		case 0:		case 1:		case 2:		case 3:		case 4:			graphics.blevelRect(savesSurface, 5, 265, 100, 25, 0x00, 0x99, 0x00);			graphics.blevelRect(savesSurface, 125, 265, 100, 25, 0x99, 0x99, 0x00);			graphics.blevelRect(savesSurface, 243, 265, 100, 25, 0x99, 0x00, 0x00);			graphics.drawString("SAVE", 40, 270, FONT_WHITE, savesSurface);			graphics.drawString("CANCEL", 150, 270, FONT_WHITE, savesSurface);			graphics.drawString("DELETE", 270, 270, FONT_WHITE, savesSurface);			graphics.drawString("SAVE will save the game", 17, 200, FONT_WHITE, savesSurface);			graphics.drawString("CANCEL will unselect that slot", 17, 220, FONT_WHITE, savesSurface);			graphics.drawString("DELETE will remove the save", 17, 240, FONT_WHITE, savesSurface);			break;		case -1:			graphics.drawString("First click a Save game slot to use", 17, 200, FONT_WHITE, savesSurface);			break;		case -10:			graphics.drawString("Game Saved", 130, 200, FONT_WHITE, savesSurface);			break;		case -11:			graphics.drawString("Save Deleted", 130, 200, FONT_WHITE, savesSurface);			break;	}	engine.keyState[SDLK_LCTRL] = engine.keyState[SDLK_RCTRL] = 0;}/*Displays the save slot available. For use with an interface thathas the cursor enabled. It returns the index number of the slot clickedso that the function invoking it can perform a load or save on that slot.*/int showSaveSlots(SDL_Surface *savesSurface, signed char saveSlot){	SDL_Rect r;	r.x = 201;	r.y = 115;	r.w = 348;	r.h = 25;	int clickedSlot = -1;	if ((engine.keyState[SDLK_LCTRL]) || (engine.keyState[SDLK_RCTRL]))	{		for (int i = 0 ; i < 5 ; i++)		{			if (Collision::collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, r.x, r.y, r.w, r.h))			{				clickedSlot = i;				createSavesSurface(savesSurface, i);			}			r.y += 30;		}		if (Collision::collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 215, 365, 100, 25))		{			saveGame(saveSlot + 1);			createSavesSurface(savesSurface, -10);		}		if (Collision::collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 335, 365, 100, 25))			createSavesSurface(savesSurface, -1);		if (Collision::collision(engine.cursor_x + 13, engine.cursor_y + 13, 6, 6, 453, 365, 100, 25))		{			char filename[PATH_MAX];			sprintf(filename, "%ssave%.2d.dat", engine.userHomeDirectory, (saveSlot + 1));			remove(filename);			initSaveSlots();			createSavesSurface(savesSurface, -11);		}	}	if (clickedSlot > -1)		saveSlot = clickedSlot;	return saveSlot;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲特黄一级片| 中文字幕av一区二区三区| 亚洲成av人在线观看| 色偷偷一区二区三区| 午夜精品在线看| 欧美精品一区二区久久婷婷| 日本成人在线网站| 久久亚洲捆绑美女| 一本大道久久a久久精品综合| 亚洲精品大片www| 日韩欧美久久一区| 91久久精品日日躁夜夜躁欧美| 蜜桃av一区二区三区电影| 亚洲欧美一区二区久久| 亚洲欧美综合另类在线卡通| 免费观看30秒视频久久| 久热成人在线视频| 99精品国产热久久91蜜凸| 欧美中文字幕久久| 久久综合色婷婷| 亚洲香肠在线观看| 精品综合久久久久久8888| 三级一区在线视频先锋 | 成人免费毛片高清视频| 免费欧美高清视频| 日本三级亚洲精品| 亚洲成人激情综合网| 亚洲与欧洲av电影| 亚洲一区二区三区不卡国产欧美 | 天天爽夜夜爽夜夜爽精品视频| 国产精品丝袜久久久久久app| 日韩一区二区三区在线| 欧美成人一区二区| 国产福利一区在线| 亚洲bt欧美bt精品777| 亚洲综合无码一区二区| 亚洲图片你懂的| 中文字幕乱码一区二区免费| 国产亚洲欧美一级| 国产精品久久久久aaaa| 国产亚洲欧美日韩日本| 亚洲欧美在线高清| 日韩av网站免费在线| 国产99久久久国产精品潘金 | 欧美一区二区三区在线视频| 成人高清视频在线| 国产69精品久久久久毛片| 久久久久88色偷偷免费| 国产成人精品免费视频网站| 国产精品初高中害羞小美女文| 国产精品1024久久| 亚洲最色的网站| 在线成人av网站| 国产精品系列在线播放| 国产精品乱人伦中文| 色综合久久久久网| 久久精品国产亚洲a| 国产欧美日韩三区| 91香蕉视频黄| 免费视频最近日韩| 成人免费视频在线观看| 日韩一区二区三区av| 99热在这里有精品免费| 蜜桃av一区二区在线观看| 一区二区三区在线视频观看 | 韩国午夜理伦三级不卡影院| 国产日产欧美一区二区视频| 色婷婷综合在线| 国产乱人伦偷精品视频不卡| 亚洲午夜久久久久中文字幕久| 欧美成人精品二区三区99精品| 色先锋资源久久综合| 久久99精品视频| 久久精品国产秦先生| 午夜日韩在线电影| 三级欧美在线一区| 日本不卡高清视频| 久久国产婷婷国产香蕉| 国产专区欧美精品| 91丨porny丨中文| 欧美日韩国产一二三| 日韩精品一区二区三区视频播放| 久久精品一区四区| 亚洲视频在线一区| 日本美女视频一区二区| 极品美女销魂一区二区三区| 国产精品亚洲视频| 色综合天天天天做夜夜夜夜做| 欧美色男人天堂| 亚洲精品一区二区三区精华液| 欧美在线一区二区| 日韩一区二区影院| 欧美激情综合在线| www国产亚洲精品久久麻豆| 欧美精品日韩一本| 日韩欧美国产一区二区在线播放| 欧美群妇大交群中文字幕| 欧美一区二区私人影院日本| 精品理论电影在线观看| √…a在线天堂一区| 香蕉久久一区二区不卡无毒影院 | 欧美性高清videossexo| 国产精品国产a| 日韩va亚洲va欧美va久久| 国产综合色产在线精品| 欧美日韩精品欧美日韩精品| 久久九九久精品国产免费直播| 亚洲影视在线播放| 成人午夜视频在线观看| 欧美一区二区久久久| 亚洲天堂av老司机| 成人午夜精品一区二区三区| 日韩一区二区三区视频| 综合欧美亚洲日本| 成人免费视频一区| 国产日韩欧美不卡在线| 久久99这里只有精品| 国产精品天干天干在线综合| 老色鬼精品视频在线观看播放| 在线免费观看一区| 亚洲美女电影在线| 不卡视频在线观看| 久久久久久久久免费| 樱桃视频在线观看一区| 日本精品一级二级| 亚洲精品免费视频| 在线观看免费一区| 综合分类小说区另类春色亚洲小说欧美| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美日韩一级片网站| 一区二区三区av电影| 欧美在线一区二区| 天堂蜜桃91精品| 久久综合久久鬼色中文字| 欧美一级免费大片| 精品写真视频在线观看| 国产欧美日韩精品一区| 成人成人成人在线视频| 午夜欧美2019年伦理| 欧美私模裸体表演在线观看| 亚洲成人三级小说| 国产日本亚洲高清| 欧美午夜精品免费| 91免费视频大全| 奇米精品一区二区三区四区| 国产日本一区二区| 在线不卡免费av| 成人性色生活片免费看爆迷你毛片| 亚洲女同ⅹxx女同tv| 91精品国产入口在线| av午夜精品一区二区三区| 视频一区视频二区在线观看| 国产精品久久久一本精品| 日韩欧美在线网站| 在线精品亚洲一区二区不卡| 精彩视频一区二区| 日韩国产欧美视频| 一区二区三区在线视频观看58| 久久久亚洲精华液精华液精华液| 欧美日韩国产高清一区二区| 成人动漫av在线| 风间由美性色一区二区三区| 久久成人av少妇免费| 日本不卡在线视频| 天天综合天天做天天综合| 亚洲影院免费观看| 亚洲午夜私人影院| 亚洲午夜羞羞片| 视频一区二区不卡| 婷婷六月综合亚洲| 美女任你摸久久| 国产精品羞羞答答xxdd| 成人精品视频一区| 91在线免费视频观看| 99在线精品免费| 欧美日韩中字一区| 日韩视频一区二区三区在线播放| 日韩欧美亚洲另类制服综合在线| 精品久久久影院| 中文字幕精品一区| 亚洲国产视频一区| 国产一区亚洲一区| 91丨porny丨在线| 欧美一区永久视频免费观看| 精品美女在线播放| 亚洲品质自拍视频| 日韩**一区毛片| 久久国产精品99久久久久久老狼| 69av一区二区三区| 麻豆精品国产传媒mv男同| 国产成人综合自拍| 色综合久久久久网| 91精品蜜臀在线一区尤物| 欧美国产精品v| 日韩电影免费在线观看网站| 国产91精品一区二区麻豆网站| 欧美亚洲日本一区| 国产精品视频yy9299一区| 男人操女人的视频在线观看欧美| 国产精品1区二区.|