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

📄 char.cpp

📁 网络游戏龙族 完整的登陆器 C++ 源代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
			}

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

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

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

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

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

			break;
		}
	case 1: 
		{	//	个. 规菩, 漠
			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);
					}
				}
			}

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

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

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

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

			PutWeapon(ch, x, y, dwColor2); // CSD-031014
			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);
					}
				}
			}	
			
			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y, dwColor2); // 捧备..
			}

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

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

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

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

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

			if (ch->peacests && ac3)
			{
				PutCompressedImageCharRGB(x, y, ch->sp3, 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);
					}
				}
			}		
			
			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y, dwColor2); // 捧备..
			}

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

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

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

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

			PutWeapon(ch, x, y, dwColor2); // CSD-031014
			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);
					}
				}
			}

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

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

			if (ch->peacests && ac3)
			{
				PutCompressedImageCharRGB(x, y, ch->sp3, 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);
					}
				}
			}
			
			if (!ac4 || !dflag)
			{
				PutHead(ac1, cas, dir, sprc, x, y, dwColor2); // 捧备..
			}

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

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

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

			break;
		}
	}		
}	//> CSD-030331

inline void PutCharacterConfusion(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-031029
	DWORD dwColor1 = ReturnBlendRGB(255, 0, 0);
	DWORD dwColor2 = ReturnBlendRGB(255, 100, 100);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor1, dwColor2);
}	//> CSD-031029

inline void PutCharacterPoison(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-031029
	DWORD dwColor1 = ReturnBlendRGB(0, 255, 0);
	DWORD dwColor2 = ReturnBlendRGB(100, 255, 100);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor1, dwColor2);
}	//> CSD-031029

inline void PutCharacterStone( 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-031029
	DWORD dwColor1 = ReturnBlendRGB( 100, 100, 100);
	DWORD dwColor2 = ReturnBlendRGB( 100, 100, 100);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor1, dwColor2);
}	//> CSD-031029

inline void PutCharacterSlow(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-031029
	DWORD dwColor1 = ReturnBlendRGB(255, 255, 0);
	DWORD dwColor2 = ReturnBlendRGB(255, 255, 100);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor1, dwColor2);
}	//> CSD-031029

inline void PutCharacterFrozen(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-031029
	DWORD dwColor1 = ReturnBlendRGB(0, 0, 255);
	DWORD dwColor2 = ReturnBlendRGB(100, 100, 255);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor1, dwColor2);
}	//> CSD-031029

inline void PutCharacterCurse( 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-031029
	DWORD dwColor1 = ReturnBlendRGB(150, 0, 150);
	DWORD dwColor2 = ReturnBlendRGB(150, 0, 150);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor1, dwColor2);
}	//> CSD-031029

inline void PutCharacterTransparency ( int spriteorder, LPCHARACTER ch, CharacterSprite *cas, int x, int y, int dir, int sprc, int ac0, int ac1, int ac2, int ac3, int ac4  )
{
	if(ch==Hero)
	{
		PutCompressedImageFX( x,y, ch->sp, 6, 1 );
		if( ac0 )
		{
			PutCompressedImageFX( x, y, ch->sp0, 6, 1);
		}
		
		if( ac4 ) PutCompressedImageFX( x,y, &(cas+ac4)->sp[ dir ][ sprc], 6,1 );	// 噶肚 
		
		if( ac1 != 1 )
			if( ac1 ) 		PutCompressedImageFX( x, y, &(cas+ac1)->sp[ dir ][ sprc], 6, 1);
			else			PutCompressedImageFX( x, y, &(cas+104)->sp[ dir ][ sprc], 6, 1);
			
			if(	ac2 ) 		PutCompressedImageFX( x, y, ch->sp2, 6, 1);
			if(	ac3 ) 		PutCompressedImageFX( x, y, ch->sp3, 6, 1);
	}
	else
	{
		PutCompressedImageVoid( x+(rand()%5-2), y+(rand()%5-2), ch->sp);
		
		if( ac0 )
		{
			PutCompressedImageVoid( x+(rand()%5-2), y+(rand()%5-2), ch->sp0);
		}
		if( ac4 ) PutCompressedImageVoid( x+(rand()%5-2),y+(rand()%5-2), &(cas+ac4)->sp[ dir ][ sprc] );	// 噶肚 
		
		if( ac1 != 1 )
			if( ac1 ) 		PutCompressedImageVoid( x+(rand()%5-2), y+(rand()%5-2), &(cas+ac1)->sp[ dir ][ sprc]);
			else			PutCompressedImageVoid( x+(rand()%5-2), y+(rand()%5-2), &(cas+104)->sp[ dir ][ sprc]);
			
			if(	ac2 ) 		PutCompressedImageVoid( x+(rand()%5-2), y+(rand()%5-2), ch->sp2);
			if(	ac3 ) 		PutCompressedImageVoid( x+(rand()%5-2), y+(rand()%5-2), ch->sp3);
	}
}

inline void PutCharacterTree( 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-031029
	DWORD dwColor = ReturnBlendRGB(0,255,0);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor, dwColor);
}	//> CSD-031029	

inline void PutCharacterGreen( 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-031029
	DWORD dwColor1 = ReturnBlendRGB(125, 251, 226);
	DWORD dwColor2 = ReturnBlendRGB(192, 251, 148);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor1, dwColor2);
}	//> CSD-031029	

inline void PutCharacterRed( 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-031029	
	DWORD dwColor = ReturnBlendRGB(255, 100, 100);
	PutCharacter(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4, dwColor, dwColor);
}	//> CSD-031029


// 011018 KHS 噶肚
inline void PutCharacterGhost( int spriteorder, LPCHARACTER ch, CharacterSprite *cas, int x, int y, int dir, int sprc, int ac0, int ac1, int ac2, int ac3, int ac4 )
{	
	int trans = 10;
	
	y -= ch->ghostani;
	
	PutCompressedImageFX( x,y, ch->sp, trans, 1 );
	if( ac0 )
	{
		PutCompressedImageFX( x,y, ch->sp0,  trans, 1 );
		//PutCompressedImageCharRGB( x,y, &(cas+ac0+1)->sp[ dir ][ sprc], color );
	}
	
	if( ac4 ) PutCompressedImageFX( x,y, &(cas+ac4)->sp[ dir ][ sprc], trans, 1 );	// 噶肚 
	
	if( ac1 != 1 )
		if( ac1 ) PutCompressedImageFX( x,y, &(cas+ac1)->sp[ dir ][ sprc], trans ,1 );	  // 捧备..
		else  PutCompressedImageFX( x,y, &(cas+104)->sp[ dir ][ sprc], trans ,1 );	// 捧备..
		
		//	if( ch->peacests ) if( ac2 ) PutCompressedImageFX( x,y, ch->sp2, trans ,1 );	// 漠..
		//	if( ch->peacests ) if( ac3 ) PutCompressedImageFX( x,y, ch->sp3, trans ,1 );	// 规菩..
}		




//--------------------------- 001213 KHS
// 011018 KHS 噶肚
void h_DisplayPC( LPCHARACTER ch, int shadow )
{				
	int spriteorder;
	int x,y;	
	
	if (ch->HorseNo && ch->viewtype!=VIEWTYPE_GHOST_)						// LTS HORSERIDER TEMP
	{
		g_HorseRider.DrawHorseRider(ch);	//	h_DisPlay_HorseRider(ch,shadow);
		return;
	}
	
	int dir		= ch->direction;
	int sprc	= ch->AnimationTable[ ch->nCurrentAction].cFrame[  ch->nCurrentFrame ];
	int sprno	= ch->sprno;
	int ac0		= ch->accessory[0];
	int ac1		= ch->accessory[1];

⌨️ 快捷键说明

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