⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmapctrl.cpp

📁 国外网络游戏 《The Kingdom of the Winds》 的服务端源码C+编写 有兴趣的可以
💻 CPP
字号:
// cMapCtrl.cpp: implementation of the cMapCtrl class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Wox2head.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

cMapCtrl::cMapCtrl()
{
	PreLoadMaps();
}

cMapCtrl::~cMapCtrl()
{

}

void cMapCtrl::PreLoadMaps()
{
	int guestnum=0;
	mapcount=0;
	Fi->openscript("Wox2.map");
	do
	{
		Fi->read2();
		if (!(strcmp(Fi->script1, "亲格")))
		{
			LoadMaps();
			mapcount++;
		}
	}
	while (strcmp(Fi->script1, "EOF"));
	printf("Wox2: %i俺狼 甘阑 佬菌嚼聪促\n",mapcount);
	Fi->closescript();
}

void cMapCtrl::LoadMaps()
{
	int i = 0;
	int curLock = 0;

	char map_name[256];
	unsigned short int map_x;
	unsigned short int map_y;
	unsigned short int map_numb = 0xFFFF;

	do
	{
		Fi->read2();

		if (!(strcmp(Fi->script1, "甘锅龋")))
		{
			map_numb = atoi(Fi->script2);
		}
		if (!(strcmp(Fi->script1, "甘捞抚")))
		{
			strcpy(map_name,Fi->script2);
		}		
		else if (!(strcmp(Fi->script1, "x")))
		{
			map_x = atoi(Fi->script2);
		}

		else if (!(strcmp(Fi->script1, "y")))
		{
			map_y = atoi(Fi->script2);
		}				
	}
	while (strcmp(Fi->script1, "}") && strcmp(Fi->script1, "EOF"));
//	mapnumber = NULL;
	mapnumber[map_numb] = mapcount;
	memset((void *)&map[mapnumber[map_numb]],0,sizeof(map[mapnumber[map_numb]]));
	strcpy(map[mapnumber[map_numb]].map_name,map_name);
	map[mapnumber[map_numb]].map_x = map_x;
	map[mapnumber[map_numb]].map_y = map_y;
	
/*	int c = 0;
	int maptemp = 0;
	FILE *ttt;
	char baramname[256];
	memset((void *)&baramname,0,256);
	sprintf(baramname,"Baram%d.map",map_numb);
	if((ttt =fopen(baramname,"rb")) == NULL)
		exit(0);

	int k = 0;
	int l = 0;
	do
	{
		c = fgetc(ttt);
		c = fgetc(ttt);
		c = fgetc(ttt);
		maptemp = fgetc(ttt);
		map[mapnumber[map_numb]].m[l][k] = maptemp;

		if(k>=map[mapnumber[map_numb]].map_x)
		{
			l++;
			k = 0;
		}else k++;
	}
	while(!feof(ttt));
*/
	

//	CheckLocks(acctcount);
}

/*void cMapCtrl::SaveAccount()
{
	unsigned int i;
	
	//	EviLDeD	-	End
	Fi->o=fopen("Wox2.Acc","w");
	if (Fi->o)
	{
		//fprintf(scpfile, "//AV%s-UV%s-BD%s-DS%li-ED%s\n",SVER,VER,BUILD,time(NULL),BUILD);
		//fprintf(scpfile, "//------------------------------------------------------------------------------\n");
		//fprintf(scpfile, "//Accounts.adm[TEXT] : UOX3 uses this file for accounts storage for shard access\n");
		//fprintf(scpfile, "//------------------------------------------------------------------------------\n");
		for (i=0;i<acctcount;i++)
		{
				fprintf(Fi->o, "亲格 拌沥\n");
				fprintf(Fi->o,"{\n");
				fprintf(Fi->o, "捞抚 %s\n",acctx[i].name);
				fprintf(Fi->o, "鞠龋 %s\n",acctx[i].pass);
				fprintf(Fi->o, "己喊 %d\n",acctx[i].sex);
				fprintf(Fi->o, "惫利 %d\n",acctx[i].country);
				fprintf(Fi->o, "个 %d\n",acctx[i].body);
				fprintf(Fi->o, "脚荐 %d\n",acctx[i].sprit);
				fprintf(Fi->o, "困摹 %d\n",acctx[i].lastmap);
				fprintf(Fi->o, "困摹x %d\n",acctx[i].mapx);
				fprintf(Fi->o, "困摹y %d\n",acctx[i].mapy);

				if (acctx[i].ban==1)
				{
					fprintf(Fi->o, "龟 抗\n");
				} else
				{
					fprintf(Fi->o, "龟 酒储\n");
				}
				
				fprintf(Fi->o, "付瘤阜IP %s\n",acctx[i].tempIP);
				
				fprintf(Fi->o, "}\n");

		}
		fprintf(Fi->o,"\n\nEOF\n\n");
		fclose(Fi->o);
	}
	else
	{
		printf("俊矾, Wox2.Acc 甫 凯荐绝嚼聪促.. 泅犁 静绊 乐唱, 酒聪搁 欺固记阑 犬牢窍技夸.\n");
	}
}
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -