?? char.cpp
字號:
int ac2 = ch->accessory[2];
int ac3 = ch->accessory[3];
int ac4 = GetItemAttr2( ch->sprno, ch->mantle, ITEMSHOW );
ch->sp = &CharSpr[ sprno ].sp[ dir][ sprc];
x = ch->x;
y = ch->y;
#ifdef _DEBUG
//////////////////// 1206 test blood ///////////////////////
if(SysInfo.notconectserver)
{
if( ch->nCurrentAction == ACTION_DIE && ch->dieani != 0 )
PutDeadEffectBottom(ch);
HprintBold( x - Mapx, y - Mapy, RGB( 0xff, 0xff, 0xff ), 0, "xl:%d yl:%d", ch->sp->xl, ch->sp->yl );
}
else
#endif
{
if( (ch->blood_Set == true || ch->dieani!=0 ) && ch->nCurrentAction==ACTION_DIE )
PutDeadEffectBottom(ch);
}
if (shadow == 0)
{
switch (ch->viewtype)
{
case VIEWTYPE_NORMAL_:
case VIEWTYPE_CONFUSION_:
case VIEWTYPE_POISON_:
case VIEWTYPE_STONE_:
case VIEWTYPE_SLOW_:
case VIEWTYPE_FROZEN_:
case VIEWTYPE_CURSE_:
{
PutCompressedImageShadow(x - Mapx - 1,y - Mapy - 3, ch->sp);
return;
}
}
}
CharacterSprite *cas = CharAccessorySpr[sprno];
ch->sp0 = &(cas+ac0)->sp[ dir][ sprc];
ch->sp1 = &(cas+ac1)->sp[ dir][ sprc];
ch->sp2 = &(cas+ac2)->sp[ dir][ sprc];
ch->sp3 = &(cas+ac3)->sp[ dir][ sprc];
ch->sp4 = &(cas+ac4)->sp[ dir][ sprc];
//----------------
int sx, sy, ex, ey;
int tsx, tsy, tex, tey;
int h = ch->height;
sx = x - ch->sp->ox; sy = y - ch->sp->oy - h;
ex = sx + ch->sp->xl; ey = sy + ch->sp->yl;
tsx = x - ch->sp0->ox; tsy = y - ch->sp0->oy - h;
tex = sx + ch->sp0->xl; tey = sy + ch->sp0->yl;
if( tsx < sx ) sx = tsx; if( tsy < sy ) sy = tsy;
if( tex > ex ) ex = tex; if( tey > ey ) ey = tey;
tsx = x - ch->sp1->ox; tsy = y - ch->sp1->oy - h;
tex = sx + ch->sp1->xl; tey = sy + ch->sp1->yl;
if( tsx < sx ) sx = tsx; if( tsy < sy ) sy = tsy;
if( tex > ex ) ex = tex; if( tey > ey ) ey = tey;
tsx = x - ch->sp2->ox; tsy = y - ch->sp2->oy - h;
tex = sx + ch->sp2->xl; tey = sy + ch->sp2->yl;
if( tsx < sx ) sx = tsx; if( tsy < sy ) sy = tsy;
if( tex > ex ) ex = tex; if( tey > ey ) ey = tey;
tsx = x - ch->sp3->ox; tsy = y - ch->sp3->oy - h;
tex = sx + ch->sp3->xl; tey = sy + ch->sp3->yl;
if( tsx < sx ) sx = tsx; if( tsy < sy ) sy = tsy;
if( tex > ex ) ex = tex; if( tey > ey ) ey = tey;
//----------
x -= Mapx;
y -= Mapy;
y -= ch->height;
switch (sprno)
{ //< CSD-031024
case 0:
{
switch (ac2) // 咯磊..
{
case 78:
case 79:
case 162:
case 172: spriteorder = SpriteOrder[sprno + 2][dir][sprc]; break;
default: spriteorder = SpriteOrder[sprno][dir][sprc]; break;
}
break;
}
case 1:
{
switch (ac2) // 巢磊..
{
case 80:
case 81:
case 162:
case 172: spriteorder = SpriteOrder[sprno + 2][dir][sprc]; break;
default: spriteorder = SpriteOrder[sprno][dir][sprc]; break;
}
break;
}
} //> CSD-031024
static int sr= 120,sg = 255, sb= 205;
static int er= 220,eg = 255, eb= 145;
#define SPEED__ 10
static int COLO__ = 10;
if( ch == g_GameInfo.lpcharacter && (ch->viewtype != VIEWTYPE_GHOST_ && ch->viewtype != VIEWTYPE_TRANSPARENCY_) )
{
static int ro, rr = sr;
static int go, gg = sg;
static int bo, bb = sb;
static int ao, aa = 10;
if( ao ) { aa++; if( aa > 8 ) { ao = !ao; }}
else { aa--; if( aa < 7 ) { ao = !ao; }}
COLO__ = aa;
// if( ro ) { rr+=(( er-sr) * SPEED__ / 100); if( rr > er ) { ro = !ro; }}
// else { rr-=(( er-sr) * SPEED__ / 100); if( rr < sr ) { ro = !ro; }}
if( ro ) { rr+=(( er-sr) * SPEED__ / 100); if( rr > er ) { ro = !ro; }}
else { rr-=(( er-sr) * SPEED__ / 100); if( rr < sr ) { ro = !ro; }}
if( go ) { gg+=(( eg-sg) * SPEED__ / 100); if( gg > eg ) { go = !go; }}
else { gg-=(( eg-sg) * SPEED__ / 100); if( gg < sg ) { go = !go; }}
if( bo ) { bb+=(( eb-sb) * SPEED__ / 100); if( bb > eb ) { bo = !bo; }}
else { bb-=(( eb-sb) * SPEED__ / 100); if( bb < sb ) { bo = !bo; }}
}
switch (ch->viewtype)
{ //< CSD-040331
case VIEWTYPE_NORMAL_:
{
if( ch == g_GameInfo.lpcharacter )
{
if( ch == Hero )
{
PutCharacterGreen( spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
}
else
{
PutCharacterRed( spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
}
}
else
{
PutCharacter( spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
}
break;
}
case VIEWTYPE_CONFUSION_:
{
PutCharacterConfusion(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
break;
}
case VIEWTYPE_POISON_:
{
PutCharacterPoison(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
break;
}
case VIEWTYPE_STONE_:
{
PutCharacterStone(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
break;
}
case VIEWTYPE_SLOW_:
{
PutCharacterSlow(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
break;
}
case VIEWTYPE_FROZEN_:
{
PutCharacterFrozen(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
break;
}
case VIEWTYPE_CURSE_:
{
PutCharacterCurse(spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
break;
}
case VIEWTYPE_TRANSPARENCY_ :
{
PutCharacterTransparency ( spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
break;
}
case VIEWTYPE_CAMELEON_:
{
if( ch == Hero || ch->canview )
{
PutCharacter( spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
PutCompressedImageVoid( x+Random(6)-3,y+Random(6)-3, ch->sp );
PutCompressedImageVoid( x+Random(6)-3,y+Random(6)-3, ch->sp );
PutCompressedImageVoid( x+Random(6)-3,y+Random(6)-3, ch->sp );
PutCompressedImageVoid( x+Random(6)-3,y+Random(6)-3, ch->sp );
PutCompressedImageVoid( x+Random(6)-3,y+Random(6)-3, ch->sp );
}
else
{
PutCompressedImageVoid( x,y, ch->sp );
if( ac0 ) PutCompressedImageVoid( x,y, ch->sp0 );
if( ac2 ) PutCompressedImageVoid( x, y, ch->sp2 );
}
break;
}
case VIEWTYPE_TREE_:
{
if( ch == Hero || Hero->canview )
{
PutCharacterTree( spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
}
break;
}
case VIEWTYPE_GHOST_:
{
if( !IsHidenGhost( ch ) && ( CanViewGhost(Hero) || Hero->viewtype == VIEWTYPE_GHOST_ ) ) //020320 lsw
{
PutCharacterGhost( spriteorder, ch, cas, x, y, dir, sprc, ac0, ac1, ac2, ac3, ac4 );
}
break;
}
} //> CSD-040331
if( !tool_DrawFrontMap )
{
int i,j;
ex += (TILE_SIZE + 1 ); ey += (TILE_SIZE + 1 );
ex += ((ex-sx)/2);
sx /= TILE_SIZE; sy /= TILE_SIZE;
ex /= TILE_SIZE; ey /= TILE_SIZE;
if( sx < 0 ) sx = 0;
if( sy < 0 ) sy = 0;
if( ex >= g_Map.file.wWidth ) ex = g_Map.file.wWidth;
if( ey >= g_Map.file.wHeight ) ey = g_Map.file.wHeight;
y +=Mapy;
for( i = sx ; i < ex ; i ++ )
for( j = sy ; j < ey ; j ++ )
{
int front = TileMap[ i][ j].front;
if( front )
if( (int )TileMap[ i][ j].frontoffset * TILE_SIZE >= y )
{
if( Sou[ front].xl == -1 ) PutTile( i*TILE_SIZE - Mapx, j*TILE_SIZE - Mapy, Sou[front].img, g_DestBackBuf );
else PutCompressedImage( i*TILE_SIZE - Mapx, j*TILE_SIZE - Mapy, &Sou[ front] );
}
}
y -=Mapy;
}
if( ch->viewtype != VIEWTYPE_TRANSPARENCY_) // 捧疙牢埃付過籃 努腐籃 登瘤父 農(nóng)腐瞪錠 滴伯霸 焊撈綽巴籃 救茄促.
if( ch == g_GameInfo.lpcharacter )
{
if( ch->viewtype == VIEWTYPE_GHOST_ ) y -= ch->ghostani;
PutCompressedImageFX( x, y, ch->sp, COLO__/2, 2 );
if( ac0 ) // 癌渴..
{
PutCompressedImageFX( x, y, ch->sp0, COLO__/2, 2 );
}
if( ac1 != 1 )
if( ac1 )
{
PutCompressedImageFX( x, y, ch->sp1, COLO__/2, 2 );
}
if( ac2 && ch->peacests )
{
PutCompressedImageFX( x, y, ch->sp2, COLO__/2, 2 );
}
if( ac3 && ch->peacests )
{
PutCompressedImageFX( x, y, ch->sp3, COLO__/2, 2 );
}
}
/////////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
if( CheckEquipmentFlag == FALSE ) return;
{
PutCompressedImage( x+ 100,y, &CharSpr[sprno].sp[ dir ][ sprc]);
if( ac0 ) // 癌渴..
{
PutCompressedImage( x+150,y - 50, &CharAccessorySpr[sprno][ 100].sp[ dir ][ sprc]);
PutCompressedImage( x+150,y , &(cas+ ac0 )->sp[ dir ][ sprc]);//, (15<<11) | (0<<6) | ( 0 ));
PutCompressedImage( x+150,y + 50, &(cas+ ac0+1)->sp[ dir ][ sprc]);
}
if( ac1 != 1 )
if( ac1 )
{
PutCompressedImage( x+200,y, &(cas+ac1)->sp[ dir ][ sprc]); // 捧備..
}
PutWeapon(ch, x + 250, y); // CSD-031014
if( ac3 ) PutCompressedImage( x+300,y, &(cas+ac3)->sp[dir][sprc]); // 規(guī)菩..
if( ac4 ) PutCompressedImage( x+300,y, &(cas+ac4)->sp[dir][sprc]); // 噶肚..
}
#endif
}
void h_DisplayPC2( LPCHARACTER ch )
{
return; // 010220 KHS
int x = ch->x - Mapx;
int y = ch->y - Mapy - ch->height;
if( ch->sprno > 1 ) return;
if( ch->viewtype != VIEWTYPE_NORMAL_ ) return;
// 010103 KHS 唱俊霸輯 鋼府樂瀾 扒拱第俊 啊妨廉 捧康登綽 何盒闌 弊府瘤 臼綽促. ( 努扼撈攫飄彌利拳 )
if( ch != Hero )
{
if( ( ch->x - Hero->x ) * ( ch->x - Hero->x ) + ( ch->y - Hero->y ) * ( ch->y - Hero->y ) > 20000 ) return;
}
PutCompressedImageFX( x,y, ch->sp, 8, 6 );
if( ch->sp0 )PutCompressedImageFX( x,y, ch->sp0, 8, 6 );
if( ch->sp1 )PutCompressedImageFX( x,y, ch->sp1, 8, 6 );
if( ch->sp2 && ch->peacests )PutCompressedImageFX( x,y, ch->sp2, 8, 6 );
if( ch->sp3 && ch->peacests )PutCompressedImageFX( x,y, ch->sp3, 8, 6 );
#ifdef _DEBUG
if( GetSysInfo( SI_GAME_MAKE_MODE ) ){Line( x-5, y+ch->height, x+5, y+ch->height, 0xffff );Line( x, y-5+ch->height, x, y+5+ch->height, 0xffff );}
#endif
return;
}
// 010925 LTS _________________________________________________________________
void DrawNGuardStone(int AliveType,LPCHARACTER ch,int x,int y) // 010924 LTS // 011015 LTS
{
Spr *sp;
const char NGuardStoneAni[6][60]={
{ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 }, // 乞惑矯
{ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 }, // 氣頗矯 0 ~ 06 橇飯烙 (第)
{-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, 3, 4, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9,10,10,10,11,11,11,12,12,12,13,13,13,14,14,14,-1,-1,-1,-1 }, // 7 ~ 18 橇飯烙(吝埃)
{16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,24,24,25,25,26,26,27,27,28,28,29,29,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 }, // 0 ~ 13 橇飯烙 (菊)
{-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,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30 }, // 14 ~ 19 橇飯烙 (菊)
{15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 } };
if (AliveType)
{
if (ch->sealstoneani<0||ch->sealstoneani>59) ch->sealstoneani=0;
sp = &CharSpr[ ch->sprno ].sp[0][NGuardStoneAni[0][ch->sealstoneani]];
PutCompressedImageShadow( x,y-5, sp);
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<60)
{
if (NGuardStoneAni[1][ch->sealstoneani]>0)
{
sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[1][ch->sealstoneani]]; //第
PutCompressedImage( x,y, sp );
}
if (NGuardStoneAni[2][ch->sealstoneani]>0)
{
sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[2][ch->sealstoneani]]; //第
PutCompressedImage( x,y, sp );
}
if (NGuardStoneAni[3][ch->sealstoneani]>0)
{
sp = &CharSpr[ ch->sprno ].sp[ 0 ][NGuardStoneAni[3][ch->sealstoneani]]; //吝埃
PutCompressedImageFX( x,y, sp,5,2);
}
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 DrawBGuardStone(int AliveType,LPCHARACTER ch,int x,int y) // 010924 LTS // 011015 LTS
{
Spr *sp;
const char NGuardStoneAni[6][87]={
{ 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, 0, 0, 0, 0, 0 }, // 乞惑矯 (第)
{ 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2 }, // 乞惑矯 (菊)
{ 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9,10,10,10,11,11,11,12,12,12,13,13,13,14,14,14,15,15,15,16,16,16,17,17,17,18,19,20,21,21,22,22,23,23,24,24,25,25,25,26,26,26,27,27,27,28,28,28,29,29,29,30,30,30,31,31,31,32,32,32,33,33,33,34,34,34,35,35,35,-1 }, // 頗鮑矯 (第)
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,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 }, // 頗鮑矯(吝埃)
{-1,-1,-1,37,37,37,38,38,38,39,39,39,40,40,40,41,41,41,42,42,42,43,43,43,44,44,44,45,45,45,46,46,46,47,47,47,48,48,48,49,49,49,50,51,52,53,53,54,54,55,55,56,56,57,57,57,58,58,58,59,59,59,60,60,60,61,61,61,62,62,62,63,63,63,64,64,64,65,65,65,66,66,66,67,67,67,68 }, // 頗鮑矯 (菊)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -