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

📄 char.cpp

📁 网络游戏龙族 完整的登陆器 C++ 源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
		{36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36 } };
		
		
		if (AliveType)
		{
			if (ch->sealstoneani>86) ch->sealstoneani=0;
			sp = &CharSpr[ ch->sprno ].sp[0][NGuardStoneAni[0][ch->sealstoneani]];  
			PutCompressedImageShadow( x,y-5, sp);	
			PutCompressedImage( x,y, sp );                //窜鉴洒 靛肺雷 器牢飘甫 备茄促...
			sp = &CharSpr[ ch->sprno ].sp[0][NGuardStoneAni[1][ch->sealstoneani]];  
			PutCompressedImage( x,y, sp );                //窜鉴洒 靛肺雷 器牢飘甫 备茄促...
			ch->sealstoneani++;
		}
		else
		{
			if (ch->GuardStoneAni==1)	// 磷菌促绊 菩哦阑 罐阑锭 技泼..
			{
				if (ch->SetAni2Zero==1) 
				{
					ch->sealstoneani=0;
					ch->SetAni2Zero=0;
					int distx=ch->x-Hero->x;		// LTS SOUND
					int disty=ch->y-Hero->y;
					
					PlayListAutoSounds(261,distx,disty,0);	// LTS SOUND
				}
				if (ch->sealstoneani<87)
				{
					if (NGuardStoneAni[2][ch->sealstoneani]>0)
					{
						sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[2][ch->sealstoneani]];	//第
						PutCompressedImageShadow( x,y-5, sp);	
						PutCompressedImage( x,y, sp );
					}
					if (NGuardStoneAni[3][ch->sealstoneani]>0)
					{
						sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[3][ch->sealstoneani]];	//吝埃
						PutCompressedImage( x,y, sp );
					}
					if (NGuardStoneAni[4][ch->sealstoneani]>0)
					{
						sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[4][ch->sealstoneani]];	//菊捞促..
						PutCompressedImageFX( x,y, sp,5,2);
					}
					ch->sealstoneani++; 
				}
				else					// 俊聪皋捞记 风橇甫 倒疽促搁
				{
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[5][0]];	//磷菌促..
					PutCompressedImage( x,y, sp );
				}
			}
			else						// 矫具俊 绝菌带 仇捞搁... 弊成 
			{
				sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[5][0]];
				PutCompressedImage( x,y, sp );
			}
		}
}

void DrawCastleGateWay65(int AliveType,LPCHARACTER ch,int x,int y)				// 011015 LTS
{
	Spr *sp;
	const char CastleGateWayAni65[4][62]={	
		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //巩 何辑瘤绰芭
		{ 5, 2, 5, 5, 2, 2, 4, 4, 4, 3, 3, 4, 4, 2, 2, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16}, //磐瘤绰芭(飘罚胶)
		{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} };
		
		if (AliveType)
		{
			if (ch->sealstoneani<0||ch->sealstoneani>61) ch->sealstoneani=0;
			
			sp = &CharSpr[ ch->sprno ].sp[0][CastleGateWayAni65[0][ch->sealstoneani]];  
			PutCompressedImage( x,y, sp );                //窜鉴洒 靛肺雷 器牢飘甫 备茄促...
			ch->sealstoneani++;
		}
		else
		{
			if (ch->GuardStoneAni==1)	// 磷菌促绊 菩哦阑 罐阑锭 技泼..
			{
				if (ch->SetAni2Zero==1) 
				{
					ch->sealstoneani=0;
					ch->SetAni2Zero=0;
					int distx=ch->x-Hero->x;		// LTS SOUND
					int disty=ch->y-Hero->y;
					
					PlayListAutoSounds(261,distx,disty,0);	// LTS SOUND
				}
				if (ch->sealstoneani<62)
				{
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni65[1][ch->sealstoneani]];	//菊捞促..
					PutCompressedImage( x,y, sp );
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni65[2][ch->sealstoneani]];	//飘罚胶
					PutCompressedImageFX( x,y, sp,5,2);
					ch->sealstoneani++; 
				}
				else					// 俊聪皋捞记 风橇甫 倒疽促搁
				{
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni65[3][0]];	//磷菌促..
					PutCompressedImage( x,y, sp );
				}
			}
			else						// 矫具俊 绝菌带 仇捞搁... 弊成 
			{
				sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni65[3][0]];
				PutCompressedImage( x,y, sp );
			}
		}
}

void DrawCastleGateWay66(int AliveType,LPCHARACTER ch,int x,int y)			// 011015 LTS
{
	Spr *sp;
	const char CastleGateWayAni66[4][69]={	
		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},	// 己巩何辑瘤绰芭
		{ 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16, 6, 6, 7, 7, 8, 8, 9, 9,10},	// 飘坊胶
		{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} };
		
		if (AliveType)
		{
			if (ch->sealstoneani<0||ch->sealstoneani>69) ch->sealstoneani=0;
			
			sp = &CharSpr[ ch->sprno ].sp[0][CastleGateWayAni66[0][ch->sealstoneani]];  
			PutCompressedImage( x,y, sp );                //窜鉴洒 靛肺雷 器牢飘甫 备茄促...
			ch->sealstoneani++;
		}
		else
		{
			if (ch->GuardStoneAni==1)	// 磷菌促绊 菩哦阑 罐阑锭 技泼..
			{
				if (ch->SetAni2Zero==1) 
				{
					ch->sealstoneani=0;
					ch->SetAni2Zero=0;
					int distx=ch->x-Hero->x;		// LTS SOUND
					int disty=ch->y-Hero->y;
					
					PlayListAutoSounds(260,distx,disty,0);	// LTS SOUND
				}
				if (ch->sealstoneani<69)
				{
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni66[1][ch->sealstoneani]];	//菊捞促..
					PutCompressedImage( x,y, sp );
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni66[2][ch->sealstoneani]];	//飘罚胶
					PutCompressedImageFX( x,y, sp,5,2);
					ch->sealstoneani++; 
				}
				else					// 俊聪皋捞记 风橇甫 倒疽促搁
				{
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni66[3][0]];	//磷菌促..
					PutCompressedImage( x,y, sp );
				}
			}
			else						// 矫具俊 绝菌带 仇捞搁... 弊成 
			{
				sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni66[3][0]];
				PutCompressedImage( x,y, sp );
			}
		}
}

void DrawCastleGateWay67(int AliveType,LPCHARACTER ch,int x,int y)			// 011015 LTS
{
	Spr *sp;
	const char CastleGateWayAni67[4][69]={	
		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},	// 己巩何辑瘤绰芭
		{ 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16, 6, 6, 7, 7, 8, 8, 9, 9,10},	// 飘坊胶
		{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} };
		
		if (AliveType)
		{
			if (ch->sealstoneani<0||ch->sealstoneani>69) ch->sealstoneani=0;
			
			sp = &CharSpr[ ch->sprno ].sp[0][CastleGateWayAni67[0][ch->sealstoneani]];  
			PutCompressedImage( x,y, sp );                //窜鉴洒 靛肺雷 器牢飘甫 备茄促...
			ch->sealstoneani++;
		}
		else
		{
			if (ch->GuardStoneAni==1)	// 磷菌促绊 菩哦阑 罐阑锭 技泼..
			{
				if (ch->SetAni2Zero==1) 
				{
					ch->sealstoneani=0;
					ch->SetAni2Zero=0;
					int distx=ch->x-Hero->x;		// LTS SOUND
					int disty=ch->y-Hero->y;
					
					PlayListAutoSounds(260,distx,disty,0);	// LTS SOUND
				}
				if (ch->sealstoneani<69)
				{
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni67[1][ch->sealstoneani]];	//菊捞促..
					PutCompressedImage( x,y, sp );
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni67[2][ch->sealstoneani]];	//飘罚胶
					PutCompressedImageFX( x,y, sp,5,2);
					ch->sealstoneani++; 
				}
				else					// 俊聪皋捞记 风橇甫 倒疽促搁
				{
					sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni67[3][0]];	//磷菌促..
					PutCompressedImage( x,y, sp );
				}
			}
			else						// 矫具俊 绝菌带 仇捞搁... 弊成 
			{
				sp = &CharSpr[ ch->sprno ].sp[ 0 ][CastleGateWayAni67[3][0]];
				PutCompressedImage( x,y, sp );
			}
		}
}
// 010925 LTS _________________________________________________________________

void DrawDragon(LPCHARACTER ch,int nX,int nY)			// LTS DRAGON MODIFY
{
	nY -= ch->height;									//臭捞蔼阑 啊瘤绊 乐绰 某腐磐狼 臭捞蔼 哗具瘤!
	switch (ch->viewtype)
	{
	case VIEWTYPE_STONE_:
		{ 
			//			PutCompressedImageShadow(nX,nY-5, ch->sp);	
			PutCompressedImageCharRGB(nX, nY, ch->sp, COLOR_STONE);
			break;
		}
	case VIEWTYPE_POISON_:
		{
			//			PutCompressedImageShadow(nX,nY-5, ch->sp);	
			PutCompressedImageCharRGB(nX, nY, ch->sp, COLOR_POISON);
			break;
		}
	case VIEWTYPE_CONFUSION_:
		{
			//			PutCompressedImageShadow(nX,nY-5, ch->sp);	
			PutCompressedImageCharRGB(nX, nY, ch->sp, COLOR_DAZE);
			break;
		}
	case VIEWTYPE_FROZEN_:
		{
			//			PutCompressedImageShadow(nX,nY-5, ch->sp);	
			PutCompressedImageCharRGB(nX, nY, ch->sp, COLOR_FROZEN);
			break;
		}
	case VIEWTYPE_SLOW_:
		{
			//			PutCompressedImageShadow(nX,nY-5, ch->sp);	
			PutCompressedImageCharRGB(nX, nY, ch->sp, COLOR_SLOW);
			break;
		}
	case VIEWTYPE_CURSE_:
		{
			//			PutCompressedImageShadow(nX,nY-5, ch->sp);	
			PutCompressedImageCharRGB(nX, nY, ch->sp, ReturnBlendRGB( 180, 255, 255));
			break;
		} 
		
	default :
		{
			if (ch->nCurrentAction==2) 
			{
				PutCompressedImageCharRGB(nX, nY, ch->sp, ReturnBlendRGB( 255, 0, 0));
				PutCompressedImageFX(nX, nY, ch->sp,rand()%8,2);
			}
			else PutCompressedImage(nX, nY, ch->sp);
			break;	
		}
	}
}

void DragonDeath(LPCHARACTER ch,int nX,int nY)			// LTS DRAGON MODIFY
{
	static char Mix=32;
	nY -= ch->height;									//臭捞蔼阑 啊瘤绊 乐绰 某腐磐狼 臭捞蔼 哗具瘤!
	if (ch->dieani==0) 
	{
		Mix=32;
	}
	PutCompressedImageFX(nX,nY,ch->sp,Mix,2);
	Mix--;
	if (Mix<0) Mix=0;
}


void DrawStateNPC(int nState, Spr* pData, int nX, int nY)
{
	switch (nState)
	{
	case VIEWTYPE_STONE_:
		{ 
			PutCompressedImageCharRGB(nX, nY, pData, COLOR_STONE);
			break;
		}
	case VIEWTYPE_POISON_:
		{
			PutCompressedImageCharRGB(nX, nY, pData, COLOR_POISON);
			break;
		}
	case VIEWTYPE_CONFUSION_:
		{
			PutCompressedImageCharRGB(nX, nY, pData, COLOR_DAZE);
			break;
		}
	case VIEWTYPE_FROZEN_:
		{
			PutCompressedImageCharRGB(nX, nY, pData, COLOR_FROZEN);
			break;
		}
	case VIEWTYPE_SLOW_:
		{
			PutCompressedImageCharRGB(nX, nY, pData, COLOR_SLOW);
			break;
		}
	case VIEWTYPE_CURSE_:
		{
			PutCompressedImageCharRGB(nX, nY, pData, ReturnBlendRGB( 180, 255, 255));
			break;
		} 
    case VIEWTYPE_SELECT_:
		{
			static int ao, aa = 10;
			if (ao)	{ aa++; if( aa >  8 )	{ ao = !ao; }}
			else		{ aa--; if( aa <  7  )	{ ao = !ao; }}
			
			PutCompressedImageCharRGB(nX, nY, pData, ReturnBlendRGB(255, 0, 0));
			PutCompressedImageFX(nX, nY, pData, aa/2, 2);
			
			break;	
		}
	default:
		{
			PutCompressedImage(nX, nY, pData);
			break;	
		}
	}
}

void h_DisplayNPC( LPCHARACTER ch, int shadow )
{
	const int nFrame = ch->AnimationTable[ch->nCurrentAction].cFrame[ch->nCurrentFrame];
	const int nSprNo = ch->sprno;
		
	switch (nSprNo)	// LTS DRAGON MODIFY
	{	//< CSD-030515
	case 50:
	case 51:
	case 52:
		{
			ch->direction = DIRECTION_DOWN;
			ch->todir = DIRECTION_LEFTDOWN;
			ch->sp = &CharSpr[nSprNo].sp[DIRECTION_DOWN][nFrame];
			break;
		}
	case 118:
	case 119:
		{
			ch->direction = DIRECTION_DOWN;
			ch->todir = DIRECTION_DOWN;
			ch->sp = &CharSpr[nSprNo].sp[DIRECTION_DOWN][nFrame];
			break;
		}
	}	//> CSD-030515

	const int nDir = ch->direction;
	const int nMutant = ch->mutant;
	ch->sp0	= &CharLayerSpr[nSprNo][0][nMutant].sp[nDir][nFrame];
	ch->sp1	= &CharLayerSpr[nSprNo][1][nMutant].sp[nDir][nFrame];
	ch->sp2	= &CharLayerSpr[nSprNo][2][nMutant].sp[nDir][nFrame];
	ch->sp3	= &CharLayerSpr[nSprNo][3][nMutant].sp[nDir][nFrame];
	ch->sp4	= &CharLayerSpr[nSprNo][4][nMutant].sp[nDir][nFrame];
	// 老馆 荐龋籍狼 俊聪皋捞记
	static int ttt, ttto;
	int x = ch->x;
	int y = ch->y;
	int dieani = 0;
	Spr *sp;
	
	int i,j;
	int ex, ey, sx, sy;
	sx = x - ch->sp->ox;		 sy = y - ch->sp->oy; 
	ex = sx +  ch->sp->xl;		 ey = sy + ch->sp->yl;
	
	x -= Mapx;
	y -= Mapy;
	
	
#ifdef _DEBUG
	if(SysInfo.notconectserver)
	{					
		HprintBold( x, y - ch->sp->yl, RGB( 0xff, 0xff, 0xff ), 0, "xl:%d  yl:%d", ch->sp->xl, ch->sp->yl );
	}					
#endif
	
	
	if((ch->nCurrentAction==MON1_DIE && ch->dieani!=0) || ch->blood_Set == true )
	{					
		PutDeadEffectBottom(ch);
		
		switch (ch->sprno)
		{
		case 63 : DrawNGuardStone(0,ch,x,y); return;		// 010924 LTS
		case 64 : DrawBGuardStone(0,ch,x,y); return;
		case 65 : DrawCastleGateWay67(0,ch,x,y);  return;
		case 66 : DrawCastleGateWay67(0,ch,x,y);  return;
		case 67 : DrawCastleGateWay67(0,ch,x,y);  return;
		case 50 :
		case 51 : DragonDeath(ch, x,y); return;		// LTS DRAGON MODIFY
		}
		
	}					
	
	if( 0 < ch->dieani && ch->dieani < 32 )
	{					
		PutCompressedImageFX( x,y, ch->sp, ch->dieani, 1 );
		return; // 0810 KHS
	}	
	
	switch (ch->sprno)			// 010924 LTS
	{
	case 63 : DrawNGuardStone(1,ch,x,y); return;
	case 64 : DrawBGuardStone(1,ch,x,y); return;
	case 65 : DrawCastleGateWay65(1,ch,x,y); return;
	case 66 : DrawCastleGateWay66(1,ch,x,y); return;
	case 67 : DrawCastleGateWay67(1,ch,x,y); return;
	case 50 :
	case 51 :
	case 52 : DrawDragon(ch,x,y); return;					// LTS DRAGON MODIFY
	}
	
	if( ch->sealstone ) // 搬拌籍.
	{	
		sp = &CharSpr[ ch->sprno ].sp[ 0 ][ 0];
		PutCompressedImageShadow( x,y-5, sp);	
		PutCompressedImage( x,y, sp );
		PutCompressedIma

⌨️ 快捷键说明

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