/*----------------------------------------------------------------------------* * 사탕 배달 *-----------------------------------------------------------------------------*/ int cHaQuest::haElementaryQuest_C(int npcNum) { switch(npcNum){ case 0: //렌에게 말을 걸다. switch(sHaQuestElementary[Quest_C].State){ case 0: //퀘스트 메세지 if(iJob_Index == 1)//템스크론 cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_C,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathC[1]); if(iJob_Index == 2)//모라이온 cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_C,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathC[0]); break; case 1: cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_C,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathC[2]); break; } break; case 1: //필리아& 알리아 if(KindClanIndex != iJob_Index) return FALSE; if(sHaQuestElementary[Quest_C].State < 1) return FALSE; if(cInvenTory.SearchItemCode(sinQT1|sin14)){ SetQuestBoard(); //아이템을 주고 sHaQuestElementary[Quest_C].State = 100; cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_C,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathC[3]); } break; } return TRUE; }
// // Render a line // void Line(const Vector &p1, const Vector &p2, const Color c) { VertexTL verts[2]; // Verts verts[0].vv = p1; verts[0].rhw = 1.0; verts[0].diffuse = c; verts[0].specular = RGBA_MAKE(0x00, 0x00, 0x00, 0xFF); verts[0].u = 0.0f; verts[0].v = 0.0f; verts[1].vv = p2; verts[1].rhw = 1.0; verts[1].diffuse = c; verts[1].specular = RGBA_MAKE(0x00, 0x00, 0x00, 0xFF); verts[1].u = 0.0f; verts[1].v = 0.0f; // Transform Vid::Math::viewMatrix.Transform(verts, verts, 2); Vid::ProjectFromCamera( verts[0]); Vid::ProjectFromCamera( verts[1]); Vid::DrawPrimitive ( PT_LINELIST, FVF_TLVERTEX, verts, 2, RS_BLEND_DEF | DP_DONOTUPDATEEXTENTS ); }
/*----------------------------------------------------------------------------* * 피곤한 창고 지기 *-----------------------------------------------------------------------------*/ int cHaQuest::haElementaryQuest_A(int npcNum) { switch(npcNum){ case 0: //렌에게 말을걸다. switch(sHaQuestElementary[Quest_A].State){ case 0: //퀘스트 메세지를 cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_A,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathA[0]); break; case 1: //퀘스트 진행중 렌에게 말을 걸을때 cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_A,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathA[1]); break; case 2: //완료 메세지 //아이템을 주고 SetQuestBoard(); chaQuest.sHaQuestElementary[Quest_A].State = 100; cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_A,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathA[3]); break; } break; case 1: //아렌트 & 라벤다 를 찾아 갓을때 if(KindClanIndex != iJob_Index) return FALSE; if(sHaQuestElementary[Quest_A].State < 1) return FALSE; if(cInvenTory.SearchItemCode(sinQT1|sin15)){ DeleteQuestItem(sinQT1|sin15); sHaQuestElementary[Quest_A].State = 2; cSinHelp.sinShowHelp(HAQUEST_CODE_ELEMENTARY_A,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),haQuestFilePathA[2]); } break; } return TRUE; }
void CCharSelect::UserConn_CharacterList_Ack( void* pMsg ) { // 090529 LUJ, 카메라 설정 정보를 갱신한다 mCameraConfiguration->UpdateCamera(); SEND_CHARSELECT_INFO* pmsg = (SEND_CHARSELECT_INFO*)pMsg; ZeroMemory( m_pPlayer, sizeof(m_pPlayer)); const DWORD basiccolor = RGBA_MAKE(255, 255, 255,255); const DWORD overcolor = RGBA_MAKE(255,255,0,255); const DWORD presscolor = RGBA_MAKE(255,255,0,255); for(int i = 0; i < pmsg->CharNum ; i++) { WORD standpoint = pmsg->StandingArrayNum[i]; // YH 일단 선택창에서 무기 빼놓음. pmsg->ChrTotalInfo[i].WearedItemIdx[eWearedItem_Weapon] = 0; pmsg->ChrTotalInfo[i].MunpaID = 0; pmsg->ChrTotalInfo[i].MarkName = 0; m_pPlayer[standpoint] = OBJECTMGR->AddPlayer(&pmsg->BaseObjectInfo[i], 0, &pmsg->ChrTotalInfo[i]); CPlayer* pPlayer = m_pPlayer[standpoint]; pPlayer->GetEngineObject()->ApplyHeightField(FALSE); pPlayer->SetOverInfoOption(0); char LevelName[255]; cPushupButton * btn = (cPushupButton *)WINDOWMGR->GetWindowForIDEx(MT_FIRSTCHOSEBTN+standpoint); wsprintf(LevelName,"[Lv%2d] %-16s",pmsg->ChrTotalInfo[i].Level,pmsg->BaseObjectInfo[i].ObjectName ); btn->SetText(LevelName, basiccolor, overcolor, presscolor); cImage ToolTipImg; SCRIPTMGR->GetImage( 0, &ToolTipImg, PFT_HARDPATH ); { btn->SetToolTip( GetMapName(pmsg->ChrTotalInfo[i].LoginMapNum), RGB_HALF(255,255,255), &ToolTipImg, TTCLR_ITEM_CANEQUIP ); } pPlayer->ChangeBaseMotion(Motion_SelBefore); pPlayer->ChangeMotion(Motion_SelBefore, 0); pPlayer->ShowObjectName( FALSE ); pPlayer->GetEngineObject()->EnableShadow(TRUE); VECTOR3 scale = { 0.4f, 0.4f, 0.4f }; pPlayer->GetEngineObject()->SetScale( &scale ); // 090529 LUJ, 순서에 따른 플레이어 위치 값을 가져온다. VECTOR3 position( mCameraConfiguration->GetPlayerPosition( standpoint ) ); pPlayer->SetPosition( &position ); pPlayer->SetAngle( 0 ); pPlayer->GetEyeTime()->Init(random(0, 8)*500); pPlayer->GetEyeTime()->Start() ; } }
D3DCOLOR TgaReadPixel (int bpp, unsigned char *&pauchData, D3DCOLOR *pclrPalette) { switch (bpp) { case 2: case 3: case 4: case 5: case 6: case 7: case 8: return pclrPalette [*pauchData++]; case 15: { UINT16 pixel = *((UINT16 *) pauchData++); pauchData += sizeof (UINT16); return RGBA_MAKE ((pixel >> 7) & 0x0F8, (pixel >> 2) & 0xF8, (pixel << 3) & 0xF8, 0xFF); } case 16: { UINT16 pixel = *((UINT16 *) pauchData++); pauchData += sizeof (UINT16); return RGBA_MAKE ((pixel >> 7) & 0x0F8, (pixel >> 2) & 0xF8, (pixel << 3) & 0xF8, 0xFF); } case 24: { D3DCOLOR clr = RGBA_MAKE (pauchData [0], pauchData [1], pauchData [2], 0xFF); pauchData += 3; return clr; } case 32: { D3DCOLOR clr = RGBA_MAKE (pauchData [0], pauchData [1], pauchData [2], pauchData [3]); pauchData += 4; return clr; } default: return RGBA_MAKE (0, 0, 0, 0xFF); } }
// // Render a fat line // void FatLine(const Vector &p1, const Vector &p2, Color c, F32 fatness) { Vector verts[4]; Vector front, up, right; fatness *= 0.5F; front = p2 - p1; if (front.Dot(Matrix::I.right) < 1e-4F) { // Vertical right = Matrix::I.right * fatness; up = Matrix::I.front * fatness; } else { right = front.Cross(Matrix::I.up); right.Normalize(); right *= fatness; up = right.Cross(front); up.Normalize(); up *= fatness; } Vid::SetBucketPrimitiveDesc ( PT_TRIANGLELIST, FVF_TLVERTEX, DP_DONOTUPDATEEXTENTS | DP_DONOTLIGHT | DP_DONOTCLIP | RS_2SIDED | RS_BLEND_DEF ); Vid::SetBucketMaterial(Vid::defMaterial); Vid::SetBucketTexture( NULL, TRUE); Vid::SetWorldTransform(Matrix::I); // Vertical strip verts[0] = p1 + up; verts[1] = p1 - up; verts[2] = p2 - up; verts[3] = p2 + up; Vid::ProjectClip( verts, NULL, c, RGBA_MAKE(0, 0, 0, 0xFF), 4, Vid::rectIndices, 6); // Horizontal strip verts[0] = p1 + right; verts[1] = p1 - right; verts[2] = p2 - right; verts[3] = p2 + right; Vid::ProjectClip( verts, NULL, c, RGBA_MAKE(0, 0, 0, 0xFF), 4, Vid::rectIndices, 6); }
void PaletteHandle::Load(UInt16 info, UInt16 PalBitsPerEntry, UInt16 index, UInt16 entries,UInt8 *PalBuffer) { ShiAssert(m_pIDDP && entries <= m_nNumEntries); if(!m_pIDDP || !m_pPalData) return; if((DWORD *) PalBuffer != m_pPalData) memcpy(m_pPalData, PalBuffer, sizeof(DWORD) * entries); // Convert palette DWORD dwTmp; for(int i=0;i<m_nNumEntries;i++) { dwTmp = m_pPalData[i]; m_pPalData[i] = RGBA_MAKE(RGBA_GETBLUE(dwTmp), RGBA_GETGREEN(dwTmp), RGBA_GETRED(dwTmp), RGBA_GETALPHA(dwTmp)); } HRESULT hr = m_pIDDP->SetEntries(NULL, index, entries, (LPPALETTEENTRY) PalBuffer); ShiAssert(SUCCEEDED(hr)); if(SUCCEEDED(hr)) { // Reload attached textures for(int i=0;i<m_arrAttachedTextures.size();i++) m_arrAttachedTextures[i]->Reload(); } }
cEditBox::cEditBox() { m_nonactiveTextColor=0xffffff; m_activeTextColor=0xffffff; m_bInitEdit=FALSE; // m_bCaret=TRUE; m_bSecret=FALSE; m_bTextChanged=0; m_dwCaretCurTick=m_dwCaretLastTick=0; m_type = WT_EDITBOX; m_bReadOnly = FALSE; // m_pIMEBox = new cIMEBox; //KES IME TEST m_pIMEex = new cIMEex; m_pIMEex->SetParentEdit( this ); m_bCaret = FALSE; m_pEditText = NULL; m_bShowCaretInReadOnly = FALSE; m_nAlign = TXT_LEFT; m_lTextLeftOffset = 5; m_lTextRightOffset = 5; m_lTextTopOffset = 6; m_cbEditFunc = NULL; // 061227 LYW --- Add color variable for caret. m_dwCaretColor = RGBA_MAKE(255,255,255,255) ; m_bUseCaret = TRUE; }
CMiniMapDlg::CMiniMapDlg() { m_pMapName = NULL; // 080121 LYW --- MiniMapDlg : 채널용 스태틱 추가. m_pPosXY = NULL; m_CurMode = eMINIMAPMODE_SMALL; m_dwImageRGB = RGBA_MAKE( 255, 255, 255, 190 ); m_IconTable.Initialize(64); m_IconPool.Init(100, 10, "MinimapIconPool"); // 미니맵 상수 { /// 표시할 크기 m_MiniMap.mViewport.x = 155; m_MiniMap.mViewport.y = 166; /// 윈도우 틀만큼 이동한 후 미니맵을 표시해야한다. m_MiniMap.mTranslation.x = 6; m_MiniMap.mTranslation.y = 28; } m_pVideoCaptureStartBtn = NULL; m_pVideoCaptureStopBtn = NULL; m_pLevelUpBTN = NULL; m_pChannelComboBox = NULL; }
void CMiniMapDlg::InitIconImage() { const SIZE_T size = sizeof( IconDescription ) / ( sizeof( DWORD ) * 3 ); for( SIZE_T i = 0; i < size; ++i ) { cImage* image = new cImage; const DWORD index = IconDescription[ 3 * i ]; const DWORD x = IconDescription[ 3 * i + 1 ]; const DWORD y = IconDescription[ 3 * i + 2 ]; SCRIPTMGR->GetImage( index, image, PFT_MINIMAPPATH ); m_pIconImage[ i ].InitIconImage( image, x, y ); } // 090909 ShinJS --- Move Point 초기화 m_MovePoint.Init( NULL, eMNMICON_MOVEPOINT1 ); m_MovePoint.SetRGBColor( RGBA_MAKE(255,255,255,255) ); m_MovePoint.SetMarkImage( &m_pIconImage[eMNMICON_MOVEPOINT1], 0, 6 ); m_MovePoint.ShowQuestMark( eQM_NONE ); m_MovePoint.SetImagePosRatio( 0.5f, 0.85f ); m_MovePoint.SetFrameTick( 200 ); m_MovePoint.SetUsePublicFrame( FALSE ); SCRIPTMGR->GetImage( 0, &m_TooltipImage, PFT_HARDPATH ); }
void CPKLootingDialog::InitPKLootDlg( DWORD dwID, LONG x, LONG y, DWORD dwDiePlayerIdx ) { SetID( dwID ); SetAbsXY( x, y ); m_dwDiePlayerIdx = dwDiePlayerIdx; m_bLootingEnd = FALSE; // m_dwStartTime = gCurTime; m_nTime = PKLOOTING_LIMIT_TIME / 1000; // if( m_pStcBadFame ) m_pStcBadFame->SetStaticValue( HERO->GetBadFame() ); //! m_pStcTime->SetStaticValue( m_nTime ); m_pStcTime->SetFGColor( RGBA_MAKE(255, 255, 0, 0) ); m_nChance = PKMGR->GetLootingChance( HERO->GetBadFame() ); m_pStcChance->SetStaticValue( m_nChance ); m_pStcChance->SetFGColor( RGBA_MAKE(0, 255, 60, 0) ); m_nLootItemNum = PKMGR->GetLootingItemNum( HERO->GetBadFame() ); if( m_pStcItem ) m_pStcItem->SetStaticValue( m_nLootItemNum ); CPlayer* pTargetPlayer = (CPlayer*)OBJECTMGR->GetObject( dwDiePlayerIdx ); if( pTargetPlayer ) m_pStcTarget->SetStaticText( pTargetPlayer->GetObjectName() ); ZeroMemory( m_bSelected, sizeof( m_bSelected ) ); //아이콘만들기 cImage Image; SCRIPTMGR->GetImage( 124, &Image ); for( WORD i = 0 ; i < PKLOOTING_ITEM_NUM ; ++i ) { cIcon* pIcon = new cIcon; pIcon->Init( 0, 0, 40, 40, &Image, PKMGR->AllocWindowId() ); pIcon->SetMovable( FALSE ); WINDOWMGR->AddWindow( pIcon ); m_pIGDItem->AddIcon( i, pIcon ); } m_dwCreateTime = gCurTime; m_bShow = FALSE; }
//100118 ONS 친구관리 다이얼로그에 PC방정보관련 기능추가 void CFriendDialog::SetPCRoomMemberList( int gotopage ) { PCROOM_MEMBER_LIST MemberInfo; memset(&MemberInfo, 0, sizeof(PCROOM_MEMBER_LIST)); PCROOMMGR->GetMemberInfoList( &MemberInfo, gotopage ); ShowPCRoomPageBtn(MemberInfo.totalnum); ZeroMemory( &m_pClassImg, sizeof(m_pClassImg) ) ; m_pPCRoomListCtrl->DeleteAllItems(); for(int i=0; i<MAX_PCROOM_MEMBER_LIST; ++i) { if( MemberInfo.Member[i].CharIndex != 0 ) { int nIconNum = RESRCMGR->GetClassIconNum( MemberInfo.Member[i].CharClass ) ; if( nIconNum >= 0 && RESRCMGR->GetClassIconCount() >= nIconNum ) { SCRIPTMGR->GetImage( nIconNum, &m_pClassImg[i], PFT_CLASS_ICON_PATH ) ; // 클래스 아이콘 이미지를 할당받는다. } cRITEMEx *ritem = new cRITEMEx(2); strcpy(ritem->pString[0], MemberInfo.Member[i].Name); strcpy(ritem->pString[1], RESRCMGR->GetMsg(RESRCMGR->GetClassNameNum( MemberInfo.Member[i].CharClass ))); // 100312 ONS 리스트에서 자신의 색상은 붉은색을 설정. if( HEROID == MemberInfo.Member[i].CharIndex ) { const DWORD loginColor( RGBA_MAKE( 255, 0, 0, 0 ) ); ritem->rgb[0] = loginColor; ritem->rgb[1] = loginColor; } ritem->dwID = MemberInfo.Member[i].CharIndex; m_pPCRoomListCtrl->InsertItem(i, ritem); } } // 080121 LYW --- FriendDialog : 선택 된 탭 버튼만 푸쉬 상태로 세팅. int nCurPage = gotopage-1 ; for( int count = 0 ; count < MAX_PCROOM_MEMBER_NUM/MAX_PCROOM_MEMBER_LIST ; ++count ) { if( !m_PCRoomPageBtn[count] ) continue ; if( nCurPage == count ) { m_PCRoomPageBtn[count]->SetPush(TRUE) ; } else { m_PCRoomPageBtn[count]->SetPush(FALSE) ; } } }
static HRESULT WINAPI IDirect3DRMLightImpl_SetColorRGB(IDirect3DRMLight* iface, D3DVALUE red, D3DVALUE green, D3DVALUE blue) { IDirect3DRMLightImpl *This = impl_from_IDirect3DRMLight(iface); TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue); This->color = RGBA_MAKE((BYTE)(red * 255.0f), (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff); return D3DRM_OK; }
void CEffectManager::LoadIllusionMaterial() { CMHFile fp; void* pMtlHandle = NULL; MATERIAL mtl; DWORD Color; BYTE r,g,b,a; DWORD num; char strFlag[256]; fp.Init("IllusionMaterial.bin","rb"); if(fp.IsInited() == FALSE) return; DIRECTORYMGR->SetLoadMode(eLM_Effect); while(1) { if(fp.IsEOF() != FALSE) break; num = fp.GetWord(); memset(&mtl, 0, sizeof(mtl)); fp.GetString(mtl.szDiffuseTexmapFileName); r = fp.GetByte(); g = fp.GetByte(); b = fp.GetByte(); a = fp.GetByte(); Color = RGBA_MAKE(r,g,b,a); mtl.dwDiffuse = Color; mtl.dwAmbient = Color; fp.GetString(strFlag); if(strcmp(strFlag,"FILTER") == 0) mtl.dwFlag = TRANSP_TYPE_FILTER; else if(strcmp(strFlag,"SUBTRACTIVE") == 0) mtl.dwFlag = TRANSP_TYPE_SUBTRACTIVE; else if(strcmp(strFlag,"ADDITIVE") == 0) mtl.dwFlag = TRANSP_TYPE_ADDITIVE; else { ASSERT(0); } pMtlHandle = g_pExecutive->GetRenderer()->CreateMaterial( &mtl,NULL,NULL, 0); m_IllisionEffectMaterialTable.Add(pMtlHandle,num); } DIRECTORYMGR->SetLoadMode(eLM_Root); }
void cCharacterTargetDlg::SetTargetGuildInfo( char* pGuildName ) { CPlayer* pTargetPlayer = (CPlayer*)m_pCurTargetObject; char guildHead[128] = { 0, }; if( pTargetPlayer ) { sprintf( guildHead, CHATMGR->GetChatMsg(2325), pGuildName ); m_pGuildImage = GUILDMARKMGR->GetGuildMark( pTargetPlayer->GetGuildMarkName() ); m_pGuildMark->SetToolTip( guildHead, RGBA_MAKE( 255, 255, 255, 255 ) ); m_pGuildMark->SetActive( true ); } }
void CDIDebugText::Render() { if (!m_pPolyString && m_Font) { uint32 i32Color = RGBA_MAKE(m_DPVert.rgba.r,m_DPVert.rgba.g,m_DPVert.rgba.b,m_DPVert.rgba.a); //m_Font->SetColor(i32Color); LT_MEM_TRACK_ALLOC(m_pPolyString = new CUIPolyString(m_Font, m_Text, m_DPVert.x, m_DPVert.y),LT_MEM_TYPE_MISC); } if (m_pPolyString) { m_pPolyString->Render(); } /*LTRect rc; rc.left = m_DPVert.x; rc.top = m_DPVert.y; rc.bottom = rc.top + 20; rc.right = min(rc.left + 100,g_ScreenWidth);; uint32 i32Color = RGBA_MAKE(m_DPVert.rgba.r,m_DPVert.rgba.g,m_DPVert.rgba.b,m_DPVert.rgba.a); r_GenericTextPrint(m_Text,&rc,i32Color);*/ }
void CBuyRegDialog::Linking() { m_pTypeList = (cListDialog*)GetWindowForID(BRS_TYPELIST); // 091127 ONS 구매상점 아이템리스트 추가/변경 m_pItemList[WEAPON] = (cListDialog*)GetWindowForID(BRS_ITEMLIST1); m_pItemList[CLOTHES] = (cListDialog*)GetWindowForID(BRS_ITEMLIST2); m_pItemList[ACCESSORY] = (cListDialog*)GetWindowForID(BRS_ITEMLIST3); m_pItemList[POTION] = (cListDialog*)GetWindowForID(BRS_ITEMLIST4); m_pItemList[MATERIAL] = (cListDialog*)GetWindowForID(BRS_ITEMLIST5); m_pItemList[PET] = (cListDialog*)GetWindowForID(BRS_ITEMLIST6); m_pItemList[COSTUME] = (cListDialog*)GetWindowForID(BRS_ITEMLIST7); m_pItemList[PRODUCTION] = (cListDialog*)GetWindowForID(BRS_ITEMLIST8); m_pItemList[HOUSING] = (cListDialog*)GetWindowForID(BRS_ITEMLIST9); m_pItemList[ETC] = (cListDialog*)GetWindowForID(BRS_ITEMLIST10); m_pClassList = (cListDialog*)GetWindowForID(BRS_CLASSLIST); m_pClassList->SetShowSelect(TRUE); m_pVolumeEdit = (cEditBox*)GetWindowForID(BRS_VOLUMEEDIT); m_pVolumeEdit->SetValidCheck( VCM_NUMBER ); m_pVolumeEdit->SetAlign( TXT_RIGHT ); m_pVolumeEdit->SetReadOnly( FALSE ); cImage ToolTipImage; SCRIPTMGR->GetImage( 0, &ToolTipImage, PFT_HARDPATH ); m_pVolumeEdit->SetToolTip( CHATMGR->GetChatMsg(1440), RGBA_MAKE(255, 255, 255, 255), &ToolTipImage, TTCLR_DEFAULT ); m_pMoneyEdit = (cEditBox*)GetWindowForID(BRS_MONEYEDIT); m_pMoneyEdit->SetValidCheck( VCM_NUMBER ); m_pMoneyEdit->SetAlign( TXT_RIGHT ); m_pMoneyEdit->SetReadOnly( FALSE ); m_pRegBtn = (cButton*)GetWindowForID(BRS_REGBTN); m_pDltBtn = (cButton*)GetWindowForID(BRS_DELETEBTN); m_pClassText = (cStatic*)GetWindowForID(BRS_CLASSTEXT); m_pClassRect1 = (cStatic*)GetWindowForID(BRS_CLASSRECT1); m_pClassRect2 = (cStatic*)GetWindowForID(BRS_CLASSRECT2); m_pItemBigRect = (cStatic*)GetWindowForID(BRS_ITEMBIGRECT); m_pItemSmallRect1 = (cStatic*)GetWindowForID(BRS_ITEMSMALLRECT1); m_pItemSmallRect2 = (cStatic*)GetWindowForID(BRS_ITEMSMALLRECT2); LoadItemList(); InitRegInfo(); }
/* Create a RGBA color from its components */ D3DCOLOR WINAPI D3DRMCreateColorRGBA(D3DVALUE red, D3DVALUE green, D3DVALUE blue, D3DVALUE alpha) { int Red, Green, Blue, Alpha; Red=floor(red*255); Green=floor(green*255); Blue=floor(blue*255); Alpha=floor(alpha*255); if (red < 0) Red=0; if (red > 1) Red=255; if (green < 0) Green=0; if (green > 1) Green=255; if (blue < 0) Blue=0; if (blue > 1) Blue=255; if (alpha < 0) Alpha=0; if (alpha > 1) Alpha=255; return (RGBA_MAKE(Red, Green, Blue, Alpha)); }
//----------------------------------------------------------------------------- void CIgnit::Create(EERIE_3D * posc, float perim, int speed) { this->pos = *posc; this->perimetre = perim; this->nblight = 0; this->duration = speed; this->currduration = 0; this->key = 0; int nb = 256; while (nb--) { this->tablight[nb].actif = 0; this->tablight[nb].idl = -1; } this->ChangeTexture(MakeTCFromFile("Graph\\Particles\\fire_hit.bmp")); this->ChangeRGBMask(1.f, 1.f, 1.f, RGBA_MAKE(255, 200, 0, 255)); }
// // Setup a vertex list for a box // static void SetupVerts(VertexTL *v, const BoundingBox &box, Color c) { // Verts v[0].vv.Set(box.min.x, box.min.y, box.min.z); v[1].vv.Set(box.max.x, box.min.y, box.min.z); v[2].vv.Set(box.max.x, box.max.y, box.min.z); v[3].vv.Set(box.min.x, box.max.y, box.min.z); v[4].vv.Set(box.min.x, box.min.y, box.max.z); v[5].vv.Set(box.max.x, box.min.y, box.max.z); v[6].vv.Set(box.max.x, box.max.y, box.max.z); v[7].vv.Set(box.min.x, box.max.y, box.max.z); for (U32 i = 0; i < 8; i++) { v[i].rhw = 1.0; v[i].diffuse = c; v[i].specular = RGBA_MAKE(0x00, 0x00, 0x00, 0xFF); v[i].u = 0.0f; v[i].v = 0.0f; } }
void set_d3d_fog_parameters ( int enabled, rgb_colour colour, float start, float end ) { d3d_fog_start = start; d3d_fog_end = end; d3d_fog_distance = end - start; d3d_fog_distance_reciprocal = 1.0 / d3d_fog_distance; d3d_fog_distance_scaled = 255.0 / d3d_fog_distance; d3d_fog_start_squared = start * start; d3d_fog_end_squared = end * end; d3d_fog_distance_squared = d3d_fog_distance * d3d_fog_distance; d3d_fog_distance_squared_reciprocal = 1.0 / d3d_fog_distance_squared; d3d_fog_constant = d3d_fog_distance - d3d_fog_start; d3d_fog_factor = 255.0 / d3d_fog_distance; d3d_fog_density = 5.545177444 / d3d_fog_end; d3d_fog_colour = colour; d3d_fog_enabled = enabled; // // Initialise the fog face intensity to no fog. // d3d_fog_intensity = RGBA_MAKE ( 0, 0, 0, 255 ); }
//================================================================================================= // NAME : UserConn_Character_Remove_Ack() // PURPOSE : Process error message. // DATE : February 5 2007 LYW // ATTENTION : //================================================================================================= void CCharSelect::UserConn_Character_Remove_Ack() { CPlayer* pPlayer = GetCurSelectedPlayer(); if(!pPlayer) { ASSERTMSG(0, CHATMGR->GetChatMsg(20)); return; } USERINFOMGR->DeleteUserQuestInfo(pPlayer->GetID()); cPushupButton * editboxName = (cPushupButton *)WINDOWMGR->GetWindowForIDEx(MT_FIRSTCHOSEBTN + m_CurSelectedPlayer); editboxName->SetText("",RGBA_MAKE(255,255,255,255),NULL,NULL); editboxName->SetPush(FALSE); m_pPlayer[m_CurSelectedPlayer] = NULL; m_CurSelectedPlayer = UINT_MAX; OBJECTMGR->AddGarbageObject(pPlayer); SelectPlayer(-1); SetDisablePick( FALSE ); // 080226 LYW --- Refresh profile dialog. CHARSELECT->GetProfileDlg()->RefreshProfile() ; }
void set_d3d_fog_face_intensity ( int value ) { d3d_fog_intensity = RGBA_MAKE ( 0, 0, 0, value ); }
void draw_terrain_line ( int index1, int index2 ) { int outcode, outcode2; vertex *line; polygon_3d_vertices[0].x = transformed_3d_3d_points[index1].x; polygon_3d_vertices[0].y = transformed_3d_3d_points[index1].y; polygon_3d_vertices[0].z = transformed_3d_2d_points[index1].z; polygon_3d_vertices[0].i = transformed_3d_2d_points[index1].i; polygon_3d_vertices[0].j = transformed_3d_2d_points[index1].j; polygon_3d_vertices[0].q = transformed_3d_2d_points[index1].q; polygon_3d_vertices[0].outcode = transformed_3d_point_outcodes[index1]; polygon_3d_vertices[0].next_vertex = &polygon_3d_vertices[1]; polygon_3d_vertices[1].x = transformed_3d_3d_points[index2].x; polygon_3d_vertices[1].y = transformed_3d_3d_points[index2].y; polygon_3d_vertices[1].z = transformed_3d_2d_points[index2].z; polygon_3d_vertices[1].i = transformed_3d_2d_points[index2].i; polygon_3d_vertices[1].j = transformed_3d_2d_points[index2].j; polygon_3d_vertices[1].q = transformed_3d_2d_points[index2].q; polygon_3d_vertices[1].outcode = transformed_3d_point_outcodes[index2]; polygon_3d_vertices[1].next_vertex = NULL; line = polygon_3d_vertices; outcode = line->outcode; outcode2 = line->outcode; outcode |= line->next_vertex->outcode; outcode2 &= line->next_vertex->outcode; if ( outcode2 == 0 ) { vertex *line; line = polygon_3d_vertices; clip_3d_coord = 0; if ( outcode & CLIP_HITHER ) { line = hither_clip_3d_polygon ( line, &outcode ); } if ( line ) { if ( outcode ) { line = clip_3d_polygon ( line, outcode ); } if ( line ) { real_colour colour; colour.red = 0; colour.green = 0; colour.blue = 0; colour.alpha = 0; d3d_fog_intensity = RGBA_MAKE ( 0, 0, 0, 255 ); draw_wbuffered_plain_line ( line, colour ); } } } }
//----------------------------------------------------------------------------- float CExplosion::Render(LPDIRECT3DDEVICE7 device) { if (this->key > 1) return 0; SETALPHABLEND(device, TRUE); SETZWRITE(device, FALSE); device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE); device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ONE); //calcul du disque D3DTLVERTEX d3dvs, *d3dv; EERIE_3D * vertex; int nb, col, col2; float rin; switch (key) { case 0: rin = 255.f * scale; vertex = disquevertex; d3dv = disqued3d; nb = disquenbvertex >> 1; while (nb) { d3dvs.sx = pos.x + (vertex + 1)->x + ((vertex->x - (vertex + 1)->x) * scale); d3dvs.sy = pos.y; d3dvs.sz = pos.z + (vertex + 1)->z + ((vertex->z - (vertex + 1)->z) * scale); EE_RTP(&d3dvs, d3dv); d3dv->color = RGBA_MAKE(255, 200, 0, 255); vertex++; d3dv++; d3dvs.sx = pos.x + vertex->x; d3dvs.sy = pos.y; d3dvs.sz = pos.z + vertex->z; EE_RTP(&d3dvs, d3dv); if (!ARXPausedTimer) d3dv->color = RGBA_MAKE((int)(rin * rnd()), 0, 0, 255); vertex++; d3dv++; nb--; } if (rnd() > .25f) { int j = ARX_PARTICLES_GetFree(); if ((j != -1) && (!ARXPausedTimer)) { ParticleCount++; particle[j].exist = 1; particle[j].zdec = 0; float a = DEG2RAD(360.f * scale); float b = rin; particle[j].ov.x = pos.x + b * EEcos(a); particle[j].ov.y = pos.y; particle[j].ov.z = pos.z + b * EEsin(a); particle[j].move.x = 0.f; particle[j].move.y = rnd(); particle[j].move.z = 0.f; particle[j].siz = 10.f + 10.f * rnd(); particle[j].tolive = 500 + (unsigned long)(float)(rnd() * 500.f); particle[j].scale.x = 1.f; particle[j].scale.y = 1.f; particle[j].scale.z = 1.f; particle[j].timcreation = lARXTime; particle[j].tc = tp; particle[j].special = FADE_IN_AND_OUT | ROTATING | MODULATE_ROTATION | DISSIPATING; particle[j].fparam = 0.0000001f; particle[j].r = 1.f; particle[j].g = 1.f; particle[j].b = 1.f; } j = ARX_PARTICLES_GetFree(); if ((j != -1) && (!ARXPausedTimer)) { ParticleCount++; particle[j].exist = 1; particle[j].zdec = 0; float a = DEG2RAD(-360.f * scale); float b = this->rin; particle[j].ov.x = pos.x + b * EEcos(a); particle[j].ov.y = pos.y; particle[j].ov.z = pos.z + b * EEsin(a); particle[j].move.x = 0.f; particle[j].move.y = rnd(); particle[j].move.z = 0.f; particle[j].siz = 10.f + 10.f * rnd(); particle[j].tolive = 500 + (unsigned long)(float)(rnd() * 500.f); particle[j].scale.x = 1.f; particle[j].scale.y = 1.f; particle[j].scale.z = 1.f; particle[j].timcreation = lARXTime; particle[j].tc = tp; particle[j].special = FADE_IN_AND_OUT | ROTATING | MODULATE_ROTATION | DISSIPATING; particle[j].fparam = 0.0000001f; particle[j].r = 1.f; particle[j].g = 1.f; particle[j].b = 1.f; } } if (rnd() > .1f) { int j = ARX_PARTICLES_GetFree(); if ((j != -1) && (!ARXPausedTimer)) { ParticleCount++; particle[j].exist = 1; particle[j].zdec = 0; float a = rnd() * 360.f; float b = rin * rnd(); particle[j].ov.x = pos.x + b * EEcos(a); particle[j].ov.y = pos.y + 70.f; particle[j].ov.z = pos.z + b * EEsin(a); particle[j].move.x = 0.f; particle[j].move.y = -(5.f + 10.f * rnd()); particle[j].move.z = 0.f; particle[j].siz = 10.f + 20.f * rnd(); particle[j].tolive = 1000 + (unsigned long)(float)(rnd() * 1000.f); particle[j].scale.x = 1.f; particle[j].scale.y = 1.f; particle[j].scale.z = 1.f; particle[j].timcreation = lARXTime; particle[j].tc = tp2; particle[j].special = FADE_IN_AND_OUT | ROTATING | MODULATE_ROTATION | DISSIPATING; particle[j].fparam = 0.0000001f; particle[j].r = 1.f; particle[j].g = 1.f; particle[j].b = 1.f; } } break; case 1: D3DTLVERTEX d3dvs2; rin = 1.f + (puissance * scale); vertex = disquevertex; d3dv = disqued3d; nb = disquenbvertex >> 1; float a = 1.f - scale; col = RGBA_MAKE((int)(255.f * a), (int)(200.f * a), 0, 255); col2 = RGBA_MAKE((int)(255.f * a * rnd()), 0, 0, 0); while (nb--) { d3dvs.sx = pos.x + vertex->x * rin; d3dvs.sy = pos.y; d3dvs.sz = pos.z + vertex->z * rin; vertex++; d3dvs2.sx = pos.x + vertex->x * rin; d3dvs2.sy = pos.y; d3dvs2.sz = pos.z + vertex->z * rin; vertex++; if (tactif[nb] >= 0) { EERIE_3D pos, dir; pos.x = d3dvs2.sx; pos.y = d3dvs2.sy; pos.z = d3dvs2.sz; dir.x = d3dvs.sx; dir.y = d3dvs.sy; dir.z = d3dvs.sz; DynLight[tactif[nb]].pos.x = dir.x; DynLight[tactif[nb]].pos.y = dir.y; DynLight[tactif[nb]].pos.z = dir.z; DynLight[tactif[nb]].intensity = .7f + 2.f * rnd(); Collision(nb, &pos, &dir); ExplosionAddParticule(nb, &d3dvs, tp); } EE_RTP(&d3dvs, d3dv); if (!ARXPausedTimer) d3dv->color = col; d3dv++; EE_RTP(&d3dvs2, d3dv); if (!ARXPausedTimer) d3dv->color = col2; d3dv++; } break; } //tracé du disque SETCULL(device, D3DCULL_NONE); device->SetTexture(0, NULL); device->DrawIndexedPrimitive(D3DPT_TRIANGLESTRIP, D3DFVF_TLVERTEX, disqued3d, disquenbvertex, (unsigned short *)disqueind, disquenbvertex + 2, 0); device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE); device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ZERO); SETALPHABLEND(device, FALSE); SETZWRITE(device, TRUE); return 0; }
void CNoteDialog::Refresh( DWORD noteID ) { m_pNoteListLCtrl->DeleteAllItems(); for(int i=0; i<NOTENUM_PER_PAGE; ++i) { cCheckBox* checkBox = m_pNoteChk[i]; FRIEND_NOTE& note = mNoteList.NoteList[ i ]; if( ! note.NoteID ) { checkBox->SetChecked(FALSE); checkBox->SetActive(FALSE); break; } else if( note.NoteID == noteID ) { note.bIsRead = TRUE; } checkBox->SetActive(TRUE); m_pPackage[i]->SetActive(FALSE); cRITEMEx *ritem = new cRITEMEx(3); // 제목 char Title[MAX_NOTE_TITLE+1] = {0,}; int Len = strlen( note.SendTitle ); if( Len > 24 ) { strncpy( Title, note.SendTitle, 24 ); strcat( Title, "...\n"); strcpy(ritem->pString[0],Title); } else if(Len < 2) { strcpy(ritem->pString[0], CHATMGR->GetChatMsg(2238)); strcpy(note.SendTitle, ritem->pString[0]); } else { char* pTitle = GetCovertedTitleFromFormNote(note.SendTitle); if(pTitle) strcpy(ritem->pString[0], pTitle); else strcpy(ritem->pString[0], note.SendTitle); } char Name[13] = {0,}; Len = strlen( note.FromName ); if(Len > 12) { strncpy( Name, note.FromName, 12 ); Name[12] = 0; strcpy(ritem->pString[2],Name); } else { char* pName = GetCovertedNameFromFormNote(note.FromName); if(pName) strcpy(ritem->pString[2], pName); else strcpy(ritem->pString[2], note.FromName); } char Date[12] = {0,}; strncpy(Date, note.SendDate, 10); Date[11] = 0; strcpy(ritem->pString[1], Date); { const DWORD color = note.bIsRead ? RGBA_MAKE( 255, 255 ,0 ,0 ) : RGBA_MAKE( 255, 255, 255, 0 ); ritem->rgb[ 0 ] = color; ritem->rgb[ 1 ] = color; ritem->rgb[ 2 ] = color; } ritem->dwID = note.NoteID; m_pNoteListLCtrl->InsertItem( i, ritem); if(note.PackageItemIdx || note.PackageMoney) m_pPackage[i]->SetActive(TRUE); } }
void CNoteDialog::SetNoteList(MSG_FRIEND_NOTE_LIST* pmsg) { // 쪽지를 읽을 때 새로고침하기 위해 저장한다 mNoteList = *pmsg; ShowNotePageBtn(pmsg->TotalPage); if(pmsg->TotalMsgNum > MAX_NOTENUM) m_pOverAlert->SetActive(TRUE); else m_pOverAlert->SetActive(FALSE); m_pNoteListLCtrl->DeleteAllItems(); for(int i=0; i<NOTENUM_PER_PAGE; ++i) { m_pNoteChk[i]->SetChecked(FALSE); m_pNoteChk[i]->SetActive(FALSE); m_pPackage[i]->SetActive(FALSE); if(pmsg->NoteList[i].NoteID != 0) { cRITEMEx *ritem = new cRITEMEx(3); // 제목 char Title[MAX_NOTE_TITLE+1] = {0,}; int Len = strlen( pmsg->NoteList[i].SendTitle ); if( Len > 24 ) { strncpy( Title, pmsg->NoteList[i].SendTitle, 24 ); strcat( Title, "...\n"); strcpy(ritem->pString[0],Title); } else if(Len < 2) { strcpy(ritem->pString[0], CHATMGR->GetChatMsg(2238)); strcpy(mNoteList.NoteList[i].SendTitle, ritem->pString[0]); } else { char* pTitle = GetCovertedTitleFromFormNote(pmsg->NoteList[i].SendTitle); if(pTitle) strcpy(ritem->pString[0], pTitle); else strcpy(ritem->pString[0], pmsg->NoteList[i].SendTitle); } //이름 6글자 까지 보여준다. char Name[13] = {0,}; Len = strlen( pmsg->NoteList[i].FromName ); if(Len > 12) { strncpy( Name, pmsg->NoteList[i].FromName, 12 ); Name[12] = 0; strcpy(ritem->pString[2],Name); } else { char* pName = GetCovertedNameFromFormNote(pmsg->NoteList[i].FromName); if(pName) strcpy(ritem->pString[2], pName); else strcpy(ritem->pString[2], pmsg->NoteList[i].FromName); } char Date[12] = {0,}; strncpy(Date, pmsg->NoteList[i].SendDate, 10); Date[11] = 0; strcpy(ritem->pString[1], Date); DWORD color = RGBA_MAKE( 255, 255, 255, 0 ); if( pmsg->NoteList[i].bIsRead ) color = RGBA_MAKE( 255, 255, 0, 0 ); for( int r=0; r<3; r++) ritem->rgb[r] = color; ritem->dwID = pmsg->NoteList[i].NoteID; m_pNoteListLCtrl->InsertItem(i, ritem); m_pNoteChk[i]->SetActive(TRUE); if(pmsg->NoteList[i].PackageItemIdx || pmsg->NoteList[i].PackageMoney) m_pPackage[i]->SetActive(TRUE); } } SetActive(TRUE); }
/*--------------------------------------------------------------------------*/ float CLevitate::Render(LPDIRECT3DDEVICE7 device) { if (this->key > 1) return 0; SETALPHABLEND(device, TRUE); SETZWRITE(device, FALSE); //calcul du cone D3DTLVERTEX d3dvs, *d3dv; EERIE_3D * vertex; int nb, nbc, col; float ddu = this->ang; float u = ddu, du = .99999999f / (float)this->def; switch (this->key) { case 0: nbc = 2; while (nbc--) { vertex = this->cone[nbc].conevertex; d3dv = this->cone[nbc].coned3d; nb = (this->cone[nbc].conenbvertex) >> 1; while (nb) { d3dvs.sx = this->pos.x + (vertex + 1)->x + ((vertex->x - (vertex + 1)->x) * this->scale); d3dvs.sy = this->pos.y + (vertex + 1)->y + ((vertex->y - (vertex + 1)->y) * this->scale); d3dvs.sz = this->pos.z + (vertex + 1)->z + ((vertex->z - (vertex + 1)->z) * this->scale); EE_RT2(&d3dvs, d3dv); float fRandom = rnd() * 80.f ; ARX_CHECK_INT(fRandom); col = ARX_CLEAN_WARN_CAST_INT(fRandom); if (!ARXPausedTimer) d3dv->color = RGBA_MAKE(col, col, col, col); d3dv->tu = u; d3dv->tv = 0.f; vertex++; d3dv++; d3dvs.sx = this->pos.x + vertex->x; d3dvs.sy = this->pos.y; d3dvs.sz = this->pos.z + vertex->z; EE_RT2(&d3dvs, d3dv); fRandom = rnd() * 80.f ; ARX_CHECK_INT(fRandom); col = ARX_CLEAN_WARN_CAST_INT(fRandom); if (!ARXPausedTimer) d3dv->color = RGBA_MAKE(0, 0, 0, col); d3dv->tu = u; d3dv->tv = 0.9999999f; vertex++; d3dv++; u += du; nb--; } u = ddu; du = -du; } nbc = 3; while (nbc--) { int j = ARX_PARTICLES_GetFree(); if ((j != -1) && (!ARXPausedTimer)) { ParticleCount++; particle[j].exist = 1; particle[j].zdec = 0; float a = DEG2RAD(360.f * rnd()); particle[j].ov.x = this->pos.x + this->rbase * EEcos(a); particle[j].ov.y = this->pos.y; particle[j].ov.z = this->pos.z + this->rbase * EEsin(a); float t = EEDistance3D(&particle[j].ov, &this->pos); particle[j].move.x = (5.f + 5.f * rnd()) * ((particle[j].ov.x - this->pos.x) / t); particle[j].move.y = 3.f * rnd(); particle[j].move.z = (5.f + 5.f * rnd()) * ((particle[j].ov.z - this->pos.z) / t); particle[j].siz = 30.f + 30.f * rnd(); particle[j].tolive = 3000; particle[j].scale.x = 1.f; particle[j].scale.y = 1.f; particle[j].scale.z = 1.f; particle[j].timcreation = -(long)(ARXTime + 3000); //spells[i].lastupdate; particle[j].tc = NULL; particle[j].special = FIRE_TO_SMOKE | FADE_IN_AND_OUT | ROTATING | MODULATE_ROTATION | DISSIPATING; particle[j].fparam = 0.0000001f; particle[j].r = 1.f; particle[j].g = 1.f; particle[j].b = 1.f; } } break; case 1: nbc = 2; while (nbc--) { vertex = this->cone[nbc].conevertex; d3dv = this->cone[nbc].coned3d; nb = (this->cone[nbc].conenbvertex) >> 1; while (nb) { d3dvs.sx = this->pos.x + vertex->x; d3dvs.sy = this->pos.y + vertex->y; d3dvs.sz = this->pos.z + vertex->z; EE_RT2(&d3dvs, d3dv); col = (int)(rnd() * 80.f); if (!ARXPausedTimer) d3dv->color = RGBA_MAKE(col, col, col, col); d3dv->tu = u; d3dv->tv = 0.f; vertex++; d3dv++; d3dvs.sx = this->pos.x + vertex->x; d3dvs.sy = this->pos.y; d3dvs.sz = this->pos.z + vertex->z; EE_RT2(&d3dvs, d3dv); col = (int)(rnd() * 80.f); if (!ARXPausedTimer) d3dv->color = RGBA_MAKE(0, 0, 0, col); d3dv->tu = u; d3dv->tv = 1; vertex++; d3dv++; u += du; nb--; } u = ddu; du = -du; } nbc = 10; while (nbc--) { int j = ARX_PARTICLES_GetFree(); if ((j != -1) && (!ARXPausedTimer)) { ParticleCount++; particle[j].exist = 1; particle[j].zdec = 0; float a = DEG2RAD(360.f * rnd()); particle[j].ov.x = this->pos.x + this->rbase * EEcos(a); particle[j].ov.y = this->pos.y; particle[j].ov.z = this->pos.z + this->rbase * EEsin(a); float t = EEDistance3D(&particle[j].ov, &this->pos); particle[j].move.x = (5.f + 5.f * rnd()) * ((particle[j].ov.x - this->pos.x) / t); particle[j].move.y = 3.f * rnd(); particle[j].move.z = (5.f + 5.f * rnd()) * ((particle[j].ov.z - this->pos.z) / t); particle[j].siz = 30.f + 30.f * rnd(); particle[j].tolive = 3000; particle[j].scale.x = 1.f; particle[j].scale.y = 1.f; particle[j].scale.z = 1.f; particle[j].timcreation = -(long)(ARXTime + 3000); particle[j].tc = NULL; particle[j].special = FIRE_TO_SMOKE | FADE_IN_AND_OUT | ROTATING | MODULATE_ROTATION | DISSIPATING; particle[j].fparam = 0.0000001f; particle[j].r = 1.f; particle[j].g = 1.f; particle[j].b = 1.f; } } break; } //tracé du cone back device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE); device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ONE); SETALPHABLEND(device, TRUE); SETTEXTUREWRAPMODE(device, D3DTADDRESS_MIRROR); if (this->tsouffle) device->SetTexture(0, this->tsouffle->m_pddsSurface); else device->SetTexture(0, NULL); SETCULL(device, D3DCULL_CW); int i = cone[1].conenbfaces - 2; int j = 0; while (i--) { ARX_DrawPrimitive_SoftClippZ(&cone[1].coned3d[j], &cone[1].coned3d[j+1], &cone[1].coned3d[j+2]); j++; } i = cone[0].conenbfaces - 2; j = 0; while (i--) { ARX_DrawPrimitive_SoftClippZ(&cone[0].coned3d[j], &cone[0].coned3d[j+1], &cone[0].coned3d[j+2]); j++; } //tracé du cone front SETCULL(device, D3DCULL_CCW); i = cone[1].conenbfaces - 2; j = 0; while (i--) { ARX_DrawPrimitive_SoftClippZ(&cone[1].coned3d[j], &cone[1].coned3d[j+1], &cone[1].coned3d[j+2]); j++; } i = cone[0].conenbfaces - 2; j = 0; while (i--) { ARX_DrawPrimitive_SoftClippZ(&cone[0].coned3d[j], &cone[0].coned3d[j+1], &cone[0].coned3d[j+2]); j++; } //tracé des pierres device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); this->DrawStone(device); device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE); device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ZERO); SETALPHABLEND(device, FALSE); SETZWRITE(device, TRUE); return 0; }
/*----------------------------------------------------------------------------* * *-----------------------------------------------------------------------------*/ int sinShowEventSmashingTV() { HelpBoxKindIndex = SIN_EVENT_SMASHTV; cSinHelp.sinShowHelp(SIN_HELP_KIND_SMASHTV,QuestMessageBoxPosi2.x,QuestMessageBoxPosi2.y,QuestMessageBoxSize2.x,QuestMessageBoxSize2.y, RGBA_MAKE(0,15,128,125),EvnetDocFilePath[0]); return TRUE; }
/*--------------------------------------------------------------------------*/ void CLevitate::DrawStone(LPDIRECT3DDEVICE7 device) { device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_INVDESTCOLOR); device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ONE); SETALPHABLEND(device, TRUE); int nb = 256; while (nb--) { if (this->tstone[nb].actif) { float a = (float)this->tstone[nb].currtime / (float)this->tstone[nb].time; if (a > 1.f) { a = 1.f; this->tstone[nb].actif = 0; } int col = RGBA_MAKE(255, 255, 255, (int)(255.f * (1.f - a))); if (this->stone[this->tstone[nb].numstone]) DrawEERIEObjExEx(device, this->stone[this->tstone[nb].numstone], &this->tstone[nb].ang, &this->tstone[nb].pos, &this->tstone[nb].scale, col); int j = ARX_PARTICLES_GetFree(); if ((j != -1) && (!ARXPausedTimer)) { ParticleCount++; particle[j].exist = 1; particle[j].zdec = 0; particle[j].ov = this->tstone[nb].pos; particle[j].move.x = 0.f; particle[j].move.y = 3.f * rnd(); particle[j].move.z = 0.f; particle[j].siz = 3.f + 3.f * rnd(); particle[j].tolive = 1000; particle[j].scale.x = 1.f; particle[j].scale.y = 1.f; particle[j].scale.z = 1.f; particle[j].timcreation = -(long)(ARXTime + 1000); particle[j].tc = NULL; particle[j].special = FIRE_TO_SMOKE | FADE_IN_AND_OUT | ROTATING | MODULATE_ROTATION | DISSIPATING; particle[j].fparam = 0.0000001f; particle[j].r = 1.f; particle[j].g = 1.f; particle[j].b = 1.f; } //update mvt if (!ARXPausedTimer) { a = (((float)this->currframetime) * 100.f) / (float)this->tstone[nb].time; this->tstone[nb].pos.y += this->tstone[nb].yvel * a; this->tstone[nb].ang.a += this->tstone[nb].angvel.a * a; this->tstone[nb].ang.b += this->tstone[nb].angvel.b * a; this->tstone[nb].ang.g += this->tstone[nb].angvel.g * a; this->tstone[nb].yvel *= 1.f - (1.f / 100.f); this->tstone[nb].currtime += this->currframetime; } } } SETALPHABLEND(device, FALSE); }