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

📄 char.cpp

📁 网络游戏龙族 完整的登陆器 C++ 源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
		}
	case 1:
		{
			break;
		}
	default:
		{
			PutCompressedImageCharRGB(x, y, &(cas + ac1)->sp[dir ][sprc], dwColor);
			break;
		}
	}
}	//> CSD-031029

void PutMantle(CHARACTER* pTarget, int nX, int nY, Spr* pSprite)
{	//< CSD-040331
	switch (pTarget->mantle)
	{
	case 8305:
		{
			PutCompressedImage(nX, nY, pSprite);
			break;
		}
	default:
		{
			PutCompressedImageCharRGB(nX, nY, pSprite, pTarget->mantlecolor);
			break;
		}
	}
}	//> CSD-040331

void PutMantle(CHARACTER* pTarget, int nX, int nY, Spr* pSprite, DWORD dwColor)
{	//< CSD-040331
	PutCompressedImageCharRGB(nX, nY, pSprite, dwColor);
}	//> CSD-040331

int g_bToolViewPlusEquip = 1;	// NEW_CHAR YGI
extern void DrawChair(LPCHARACTER ch);		// LTS SITDOWN

void BeforeDrawChair(LPCHARACTER ch)		// 011214 LTS
{
	switch (ch->direction)
	{
	case 0 :
	case 1 :
	case 2 :
	case 6 :
	case 7 : DrawChair(ch);	break;
	}
}

void AfterDrawChair(LPCHARACTER ch)
{
	switch (ch->direction)
	{
	case 3 :
	case 4 :
	case 5 : DrawChair(ch);	break;
	}
}

void PutCharacter(int spriteorder, LPCHARACTER ch, CharacterSprite *cas, int x, int y, int dir, int sprc, int ac0, int ac1, int ac2, int ac3, int ac4)
{	//< CSD-034331
	int dflag;
	if( ch->peacests && ( ch->nCurrentAction == ACTION_BATTLE_NONE_TWOHAND	|| ch->nCurrentAction == ACTION_BATTLE_NONE ) )
	{
		dflag= (( ch->direction >= 1 && ch->direction <= 5 ) ?true:false);  // KHS ; 噶肚狼 版快 困规亲( dir == 5 )阑 焊绊 乐阑锭俊绰 盖付瘤阜俊 嘛囚具 茄促. 
	}
	else
	{
		dflag= (( ch->direction >= 2 && ch->direction <= 6 ) ?true:false);  // KHS ; 噶肚狼 版快 困规亲( dir == 5 )阑 焊绊 乐阑锭俊绰 盖付瘤阜俊 嘛囚具 茄促. 
	}
	
	if (ch->nCurrentAction == ACTION_SITDOWN)
	{	// 011214 LTS
		BeforeDrawChair(ch);		
	}

	switch (spriteorder)
	{			
	case 0:
		{	//	个.公扁.规菩
			if (ac4 && !dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
			}

			PutBody(ch, x, y, ch->sp, ch->bodycolor);
			
			if (ac0)  // 癌渴..
			{	
				PutCompressedImage( x,y, ch->sp0);
				PutCompressedImageCharRGB( x,y, &(cas + ac0 + 1)->sp[dir][sprc], ch->clothcolor);
				// 011030 KHS JJING
				if (0 < ac0 && ac0 <= 40)		// LTS LOCALWAR
				{
					if (ch->jjing >= 5)
					{
						PutCompressedImage(x,y, &(cas + ac0 + 200)->sp[dir][sprc]);
					}

					if (ch->jjing >= 9)
					{
						PutCompressedImage( x,y, &(cas + ac0 + 201)->sp[dir][sprc]);
					}
				}
			}

			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备.
			}

			PutWeapon(ch, x, y); // CSD-031014

			if (ch->peacests && ac3)
			{
				PutCompressedImage(x, y, ch->sp3);  // 规菩.
			}

			if (ch->nCurrentAction == ACTION_SITDOWN)
			{
				AfterDrawChair(ch);		// 011214 LTS
			}

			if (ac4 && dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备.
			}

			break;
		}
	case 1: 
		{	//	个. 规菩, 漠
			if (ac4 && !dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
			}

			PutBody(ch, x, y, ch->sp, ch->bodycolor);	// 漠..
			
			if (ac0)  // 癌渴.					
			{	
				PutCompressedImage( x,y, ch->sp0 );
				PutCompressedImageCharRGB( x,y, &(cas+ac0+1)->sp[ dir ][ sprc], ch->clothcolor );
				// 011030 KHS JJING
				if (0 < ac0 && ac0 <= 40)		// LTS LOCALWAR
				{
					if (ch->jjing >= 5)
					{
						PutCompressedImage(x, y, &(cas + ac0+200)->sp[dir ][sprc]);
					}

					if (ch->jjing >= 9)
					{
						PutCompressedImage( x,y, &(cas+ac0+201)->sp[dir][sprc]);
					}
				}
			}

			if (!ac4 || !dflag)
			{
				PutHead( ac1, cas, dir, sprc, x, y); // 捧备..
			}
			
			if (ch->peacests && ac3)
			{
				PutCompressedImage(x, y, ch->sp3);  // 规菩..
			}

			PutWeapon(ch, x, y); // CSD-031014
			
			if (ch->nCurrentAction == ACTION_SITDOWN)
			{
				AfterDrawChair(ch);		// 011214 LTS
			}

			if (ac4 && dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
				PutHead( ac1, cas, dir, sprc, x, y); // 捧备..
			}

			break;
		}
	case 2: 
		{	//	漠. 个. 规菩
			if (ac4 && !dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
			}

			PutWeapon(ch, x, y); // CSD-031014
			PutBody(ch, x, y, ch->sp, ch->bodycolor);

			if (ac0)  // 癌渴..				
			{	
				PutCompressedImage(x, y, ch->sp0);
				PutCompressedImageCharRGB(x, y, &(cas+ac0 + 1)->sp[dir][sprc], ch->clothcolor);
				// 011030 KHS JJING
				if (0 < ac0 && ac0 <= 40)		// LTS LOCALWAR
				{
					if (ch->jjing >= 5)
					{
						PutCompressedImage( x,y, &(cas + ac0 + 200)->sp[dir][sprc]);
					}

					if (ch->jjing >= 9)
					{
						PutCompressedImage( x,y, &(cas+ac0+201)->sp[dir][sprc]);
					}
				}
			}	
			
			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..
			}

			if (ch->peacests ) if( ac3 ) PutCompressedImage( x,y, ch->sp3 );  // 规菩..
			if (ch->nCurrentAction==ACTION_SITDOWN) AfterDrawChair(ch);		// 011214 LTS
			
			if (ac4 && dflag )
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..
			}

			break;
		}
	case 3: 
		{	//	漠 规菩, 个
			if (ac4 && !dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
			}

			PutWeapon(ch, x, y); // CSD-031014

			if (ch->peacests && ac3)
			{
				PutCompressedImage(x, y, ch->sp3);  // 规菩..
			}

			PutBody(ch, x, y, ch->sp, ch->bodycolor);

			if (ac0)  // 癌渴..							
			{	
				PutCompressedImage(x, y, ch->sp0);
				PutCompressedImageCharRGB(x, y, &(cas+ac0+1)->sp[dir][sprc], ch->clothcolor);
				// 011030 KHS JJING
				if (0 < ac0 && ac0 <= 40)		// LTS LOCALWAR
				{
					if (ch->jjing >= 5)
					{
						PutCompressedImage(x, y, &(cas + ac0 + 200)->sp[dir][sprc]);
					}

					if (ch->jjing >= 9)
					{
						PutCompressedImage( x,y, &(cas + ac0 + 201)->sp[dir][sprc]);
					}
				}
			}		
			
			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..
			}

			if (ch->nCurrentAction == ACTION_SITDOWN)
			{
				AfterDrawChair(ch);		// 011214 LTS
			}

			if (ac4 && dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..
			}

			break;	
		}
	case 4: 
		{	//	规菩, 漠, 个
			if (ac4 && !dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
			}

			if (ch->peacests && ac3)
			{
				PutCompressedImage(x, y, ch->sp3);  // 规菩..
			}

			PutWeapon(ch, x, y); // CSD-031014
			PutBody(ch, x, y, ch->sp, ch->bodycolor);

			if (ac0)  // 癌渴..
			{	
				PutCompressedImage(x, y, ch->sp0);
				PutCompressedImageCharRGB(x, y, &(cas + ac0 + 1)->sp[dir][sprc], ch->clothcolor);
				// 011030 KHS JJING
				if (0 < ac0 && ac0 <= 40)		// LTS LOCALWAR
				{
					if (ch->jjing >= 5)
					{
						PutCompressedImage( x,y, &(cas + ac0 + 200)->sp[dir][sprc]);
					}

					if (ch->jjing >= 9)
					{
						PutCompressedImage( x,y, &(cas + ac0 + 201)->sp[dir][sprc]);
					}
				}
			}

			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..
			}
			
			if (ch->nCurrentAction == ACTION_SITDOWN)
			{
				AfterDrawChair(ch);		// 011214 LTS
			}
			
			if (ac4 && dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..
			}

			break;	
		}
	case 5: 
		{	// 规菩, 个, 漠
			if (ac4 && !dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
			}

			if (ch->peacests && ac3)
			{
				PutCompressedImage(x, y, ch->sp3);  // 规菩..

			}

			PutBody(ch, x, y, ch->sp, ch->bodycolor);
			
			if (ac0)  // 癌渴..
			{	
				PutCompressedImage(x, y, ch->sp0);
				PutCompressedImageCharRGB(x, y, &(cas + ac0 + 1)->sp[dir][sprc], ch->clothcolor);
				// 011030 KHS JJING
				if (0 < ac0 && ac0 <= 40)		// LTS LOCALWAR
				{
					if (ch->jjing >= 5)	
					{
						PutCompressedImage(x, y, &(cas+ac0+200)->sp[dir][sprc]);
					}

					if (ch->jjing >= 9)
					{
						PutCompressedImage(x, y, &(cas+ac0+201)->sp[dir][sprc]);
					}
				}
			}
			
			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..
			}

			PutWeapon(ch, x, y); // CSD-031014

			if (ch->nCurrentAction == ACTION_SITDOWN)
			{
				AfterDrawChair(ch);		// 011214 LTS
			}

			if (ac4 && dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc]);
				PutHead(ac1, cas, dir, sprc, x, y); // 捧备..6
			}

			break;
		}
	}		
}	//> CSD-040331

void PutCharacter(int spriteorder, LPCHARACTER ch, CharacterSprite *cas, int x, int y, int dir, int sprc, int ac0, int ac1, int ac2, int ac3, int ac4, DWORD dwColor1, DWORD dwColor2)
{	//< CSD-030331
	int dflag;
	
	if( ch->peacests && ( ch->nCurrentAction == ACTION_BATTLE_NONE_TWOHAND	|| ch->nCurrentAction == ACTION_BATTLE_NONE ) )
	{
		dflag= (( ch->direction >= 1 && ch->direction <= 5 ) ?true:false);  // KHS ; 噶肚狼 版快 困规亲( dir == 5 )阑 焊绊 乐阑锭俊绰 盖付瘤阜俊 嘛囚具 茄促. 
	}
	else
	{
		dflag= (( ch->direction >= 2 && ch->direction <= 6 ) ?true:false);  // KHS ; 噶肚狼 版快 困规亲( dir == 5 )阑 焊绊 乐阑锭俊绰 盖付瘤阜俊 嘛囚具 茄促. 
	}
	//> CSD-031104	
	if (ch->nCurrentAction == ACTION_SITDOWN)
	{	// 011214 LTS
		BeforeDrawChair(ch);		
	}

	switch (spriteorder)
	{			
	case 0:
		{	//	个.公扁.规菩
			if (ac4 && !dflag)
			{
				PutMantle(ch, x, y, &(cas + ac4)->sp[dir][sprc], dwColor2);
			}

			PutBody(ch, x, y, ch->sp, dwColor1);
			
			if (ac0)  // 癌渴..
			{	
				PutCompressedImageCharRGB(x ,y, ch->sp0, dwColor2);
				PutCompressedImageCharRGB(x, y, &(cas + ac0 + 1)->sp[dir][sprc], dwColor2);
				// 011030 KHS JJING
				if (0 < ac0 && ac0 <= 40)		// LTS LOCALWAR
				{
					if (ch->jjing >= 5)
					{
						PutCompressedImageCharRGB(x, y, &(cas + ac0 + 200)->sp[dir][sprc], dwColor2);
					}

					if (ch->jjing >= 9)
					{
						PutCompressedImageCharRGB(x, y, &(cas + ac0 + 201)->sp[dir][sprc], dwColor2);
					}
				}

⌨️ 快捷键说明

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