Jump to content

ElRenardo

Member
  • Posts

    42
  • Joined

  • Last visited

  • Feedback

    0%

About ElRenardo

Core X

  • BAN_NOTICE
    No
  • HIDE_PILLORY
    No
  • IS_LEAKER
    No
  • IS_RESELLER
    No
  • IS_SCAMMER
    No

Informations

  • Country
    France
  • Nationality
    French

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ElRenardo's Achievements

Enthusiast

Enthusiast (6/16)

  • Reacting Well
  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done

Recent Badges

24

Reputation

  1. The blurring texture thing is happening to everyone. It's more noticeable on far distance texture when you have a far perspective angle. It occurs when the DirectX device is reseted. It occurs when opening/closing an ingame web browser. You can search for ".Reset(" case sensitive in EterLib and UserInterface to find out where it's used. Commenting it in EnableWebBrowserMode and DisableWebBrowserMode will totally freeze the game while you have a webpage opened, it will unfreeze when you close the webpage and you won't have those blurred textures and this aliasing problem on terrains.
  2. Hi, To check if a channel is running, you could eventually look at the set of the connected p2p peers ("m_set_pkPeers" defined in "p2p.h"). Every channel are sending some data to each others this way. If the channel is not connected, it won't be listed. I found out that there is a function in desc_manager.cpp that is looking for an existing connection regarding the P2P port of it. "bool DESC_MANAGER::IsP2PDescExist(const char * szHost, WORD wPort)" You can create a new one and use the "GetP2PChannel()" function instead of the "GetP2PPort()". Then you just have to create a simple lua function. That could be a way to do that. But for your usage, I would definitly stick to a global quest_flag. Good luck !
  3. Hey, You are right TMP4, there is a problem at the load of guild land npc. The DB core send all the coordinates of the npc to the channels and there's no check if the map index of the npc is in the core receiving the datas. In building.cpp, you can modify the LoadObject function: bool CManager::LoadObject(TObject * pTable, bool isBoot) { if (!map_allow_find(pTable->lMapIndex)) return false; [...] Good luck in your testing !
  4. Hey Tatsumaru, Thanks for the great work you do correcting graphical aspects of the game. I don't know if you already saw the female warrior holding a fishing rod. You certainly have a lot of work to do, but there's always more ! Thanks again !
  5. You misunderstood me, I didn't wanted to criticize your work in any way. I just wanted to achieve this without losing the functionality that search the file in the file directory if not found in the packs. But as you said, it should only be used in test env. Why couldn't we talk about other options or improving options ? As you said before: I don't understand your reaction. Maybe you had a hard day.
  6. So, for better comprehension I changed that: bool CEterPackManager::Get(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData) { //TimeChecker timeChecker(c_szFileName); //Logf(1, "Load %s\n", c_szFileName); if (m_iSearchMode == SEARCH_PACK_FIRST || c_szFileName[1] == ':') { if (GetFromPack(rMappedFile, c_szFileName, pData)) return true; return GetFromFile(rMappedFile, c_szFileName, pData); } if (GetFromFile(rMappedFile, c_szFileName, pData)) return true; return GetFromPack(rMappedFile, c_szFileName, pData); } [...] bool CEterPackManager::isExist(const char * c_szFileName) { if (m_iSearchMode == SEARCH_PACK_FIRST || c_szFileName[1] == ':') { if (isExistInPack(c_szFileName)) return true; return _access(c_szFileName, 0) == 0 ? true : false; } if (_access(c_szFileName, 0) == 0) return true; return isExistInPack(c_szFileName); } So now it's working exactly as your fix even if SEARCH_FILE_FIRST is false but instead of doing nothing if the file is not found in the pack, it will try to find it in the file directory. Let me explain it a bit better: if the filename we're looking for contains ":" as second letter (for exemple "D:\Ymir Work\monster\barbarian_boss\00.gr2") then it will try to find it in packs first. If it's not found then it will try to load the file from the file directory and that will eventually cause some lags if you have as you say a dvd player as D drive, but this shouldn't occur except if you have some paths errors in your client. If this cause some lasg to your client, you maybe have some paths error and your client with your fix is certainly not loading everything.
  7. Haha, you're not a noob, that was not what I was saying. Here's what I may suggest you to not takeof some functionalities of the eterpack: In the function: bool CEterPackManager::Get(CMappedFile & rMappedFile, const char * c_szFileName, LPCVOID * pData) Adding a condition to check if the filename redirect in a drive in the condition that check if we search from client file first instead of pack file as following: if (m_iSearchMode == SEARCH_FILE_FIRST && c_szFileName[1] != ':') { if (GetFromFile(rMappedFile, c_szFileName, pData)) return true; return GetFromPack(rMappedFile, c_szFileName, pData); } if (GetFromPack(rMappedFile, c_szFileName, pData)) return true; return GetFromFile(rMappedFile, c_szFileName, pData); and using this same structure we can then write the isExist function as following: bool CEterPackManager::isExist(const char * c_szFileName) { if (m_iSearchMode == SEARCH_FILE_FIRST && c_szFileName[1] != ':') { if (_access(c_szFileName, 0) == 0) return true; return isExistInPack(c_szFileName); } if (isExistInPack(c_szFileName)) return true; return _access(c_szFileName, 0) == 0 ? true : false; } What do you think ?
  8. Hey, Nice to see that this problem is being treated ! I'm asking myself why you're searching for "ymir" in the file name and not just compare the second letter with ":" Then, your function: bool CEterPackManager::isExist(const char * c_szFileName) { if (m_iSearchMode == SEARCH_PACK_FIRST) { if (isExistInPack(c_szFileName)) return true; } return isExistInPack(c_szFileName); } Can be shorten as: bool CEterPackManager::isExist(const char * c_szFileName) { return isExistInPack(c_szFileName); } Have you done some testings yet ?
  9. I've been looking for this too some time ago and haven't found anything yet. First of all, I don't think those kind of textures are handmade but generated by 3ds max. Then maybe you don't even have to link the texture to the model, maybe it's already done when you tell 3ds max to create this texture for the model.
  10. Oh yeah, ok, I though as the right side of the gif is cut that the image was still rendered outside the right border. Of course, the edge of a board, even if it's transparent will be inside the rect of the board. As Masodikbela said, you should create an empty window at the pos and size you need and use it as a layer to render in !
  11. Hey ! Nice, you did well. You seems to have forgotten to store the width of the parent window in the rect you want to render in. Remember, you have to know the coordinate of the parent window so that the rect is well placed on the screen. Is it only the image that is still rendered outside the right or font too ? Is it working on the left side ?
  12. Thanks, can be really usefull for buildings ! :)
  13. Nice progress. You should take a look at how the rect rendering works in ExpandedImageBox.
  14. You need to create a delimiter to only render inside of it. I think there's many ways to do it, but here's how I did: I created a new flag that I apply to a window. Once this flag is applied, I'm processing all the children windows with the delimiter coordinates to render only what's inside of it ant cut what's outside. You don't really need this compatibility on every windows types as you won't use them all. What's most important is ExpendedImageBox or ImageBox and TextLine. The easiest windows types to make compatible are Line, Bar and Box you should train on them. I had to work a few days on that so take your time, it's a bit tricky especialy for the font rendering.
  15. There you go: Replace the whole function "void CGraphicTextInstance::Render(RECT * pClipRect)" in "EterLib/GrpTextInstance.cpp" with: void CGraphicTextInstance::Render(RECT * pClipRect) { if (!m_isUpdate) return; CGraphicText* pkText=m_roText.GetPointer(); if (!pkText) return; CGraphicFontTexture* pFontTexture = pkText->GetFontTexturePointer(); if (!pFontTexture) return; float fStanX = m_v3Position.x; float fStanY = m_v3Position.y + 1.0f; UINT defCodePage = GetDefaultCodePage(); if (defCodePage == CP_ARABIC) { switch (m_hAlign) { case HORIZONTAL_ALIGN_LEFT: fStanX -= m_textWidth; break; case HORIZONTAL_ALIGN_CENTER: fStanX -= float(m_textWidth / 2); break; } } else { switch (m_hAlign) { case HORIZONTAL_ALIGN_RIGHT: fStanX -= m_textWidth; break; case HORIZONTAL_ALIGN_CENTER: fStanX -= float(m_textWidth / 2); break; } } switch (m_vAlign) { case VERTICAL_ALIGN_BOTTOM: fStanY -= m_textHeight; break; case VERTICAL_ALIGN_CENTER: fStanY -= float(m_textHeight) / 2.0f; break; } //WORD FillRectIndices[6] = { 0, 2, 1, 2, 3, 1 }; STATEMANAGER.SaveRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); STATEMANAGER.SaveRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); DWORD dwFogEnable = STATEMANAGER.GetRenderState(D3DRS_FOGENABLE); DWORD dwLighting = STATEMANAGER.GetRenderState(D3DRS_LIGHTING); STATEMANAGER.SetRenderState(D3DRS_FOGENABLE, FALSE); STATEMANAGER.SetRenderState(D3DRS_LIGHTING, FALSE); STATEMANAGER.SetVertexShader(D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1); STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); STATEMANAGER.SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE); STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE); STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE); { const float fFontHalfWeight=1.0f; float fCurX; float fCurY; float fFontSx; float fFontSy; float fFontEx; float fFontEy; float fFontWidth; float fFontHeight; float fFontMaxHeight; float fFontAdvance; SVertex akVertex[4]; akVertex[0].z=m_v3Position.z; akVertex[1].z=m_v3Position.z; akVertex[2].z=m_v3Position.z; akVertex[3].z=m_v3Position.z; CGraphicFontTexture::TCharacterInfomation* pCurCharInfo; // Å׵θ® if (m_isOutline) { fCurX=fStanX; fCurY=fStanY; fFontMaxHeight=0.0f; CGraphicFontTexture::TPCharacterInfomationVector::iterator i; for (i=m_pCharInfoVector.begin(); i!=m_pCharInfoVector.end(); ++i) { pCurCharInfo = *i; fFontWidth=float(pCurCharInfo->width); fFontHeight=float(pCurCharInfo->height); fFontAdvance=float(pCurCharInfo->advance); // NOTE : ÆùÆ® Ãâ·Â¿¡ Width Á¦ÇÑÀ» µÓ´Ï´Ù. - [levites] if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth) { if (m_isMultiLine) { fCurX=fStanX; fCurY+=fFontMaxHeight; } else { break; } } if (pClipRect) { if (fCurY <= pClipRect->top) { fCurX += fFontAdvance; continue; } } fFontSx = fCurX - 0.5f; fFontSy = fCurY - 0.5f; fFontEx = fFontSx + fFontWidth; fFontEy = fFontSy + fFontHeight; pFontTexture->SelectTexture(pCurCharInfo->index); STATEMANAGER.SetTexture(0, pFontTexture->GetD3DTexture()); akVertex[0].u=pCurCharInfo->left; akVertex[0].v=pCurCharInfo->top; akVertex[1].u=pCurCharInfo->left; akVertex[1].v=pCurCharInfo->bottom; akVertex[2].u=pCurCharInfo->right; akVertex[2].v=pCurCharInfo->top; akVertex[3].u=pCurCharInfo->right; akVertex[3].v=pCurCharInfo->bottom; akVertex[3].color = akVertex[2].color = akVertex[1].color = akVertex[0].color = m_dwOutLineColor; float feather = 0.0f; // m_fFontFeather akVertex[0].y=fFontSy-feather; akVertex[1].y=fFontEy+feather; akVertex[2].y=fFontSy-feather; akVertex[3].y=fFontEy+feather-0.5f; // ¿Þ akVertex[0].x=fFontSx-fFontHalfWeight-feather; akVertex[1].x=fFontSx-fFontHalfWeight-feather; akVertex[2].x=fFontEx-fFontHalfWeight+feather-0.5f; akVertex[3].x=fFontEx-fFontHalfWeight+feather-0.5f; if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4)) STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); // ¿À¸¥ akVertex[0].x=fFontSx+fFontHalfWeight-feather; akVertex[1].x=fFontSx+fFontHalfWeight-feather; akVertex[2].x=fFontEx+fFontHalfWeight+feather-0.5f; akVertex[3].x=fFontEx+fFontHalfWeight+feather-0.5f; if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4)) STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); akVertex[0].x=fFontSx-feather; akVertex[1].x=fFontSx-feather; akVertex[2].x=fFontEx+feather-0.5f; akVertex[3].x=fFontEx+feather-0.5f; // À§ akVertex[0].y=fFontSy-fFontHalfWeight-feather; akVertex[1].y=fFontEy-fFontHalfWeight+feather; akVertex[2].y=fFontSy-fFontHalfWeight-feather; akVertex[3].y=fFontEy-fFontHalfWeight+feather-0.5f; // 20041216.myevan.DrawPrimitiveUP if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4)) STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); // ¾Æ·¡ akVertex[0].y=fFontSy+fFontHalfWeight-feather; akVertex[1].y=fFontEy+fFontHalfWeight+feather; akVertex[2].y=fFontSy+fFontHalfWeight-feather; akVertex[3].y=fFontEy+fFontHalfWeight+feather-0.5f; // 20041216.myevan.DrawPrimitiveUP if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4)) STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); fCurX += fFontAdvance; } } // ¸ÞÀÎ ÆùÆ® fCurX=fStanX; fCurY=fStanY; fFontMaxHeight=0.0f; for (int i = 0; i < m_pCharInfoVector.size(); ++i) { pCurCharInfo = m_pCharInfoVector[i]; fFontWidth=float(pCurCharInfo->width); fFontHeight=float(pCurCharInfo->height); fFontMaxHeight=max(fFontHeight, pCurCharInfo->height); fFontAdvance=float(pCurCharInfo->advance); // NOTE : ÆùÆ® Ãâ·Â¿¡ Width Á¦ÇÑÀ» µÓ´Ï´Ù. - [levites] if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth) { if (m_isMultiLine) { fCurX=fStanX; fCurY+=fFontMaxHeight; } else { break; } } if (pClipRect) { if (fCurY <= pClipRect->top) { fCurX += fFontAdvance; continue; } } fFontSx = fCurX-0.5f; fFontSy = fCurY-0.5f; fFontEx = fFontSx + fFontWidth; fFontEy = fFontSy + fFontHeight; pFontTexture->SelectTexture(pCurCharInfo->index); STATEMANAGER.SetTexture(0, pFontTexture->GetD3DTexture()); akVertex[0].x=fFontSx; akVertex[0].y=fFontSy; akVertex[0].u=pCurCharInfo->left; akVertex[0].v=pCurCharInfo->top; akVertex[1].x=fFontSx; akVertex[1].y=fFontEy; akVertex[1].u=pCurCharInfo->left; akVertex[1].v=pCurCharInfo->bottom; akVertex[2].x=fFontEx-0.5f; akVertex[2].y=fFontSy-0.5f; akVertex[2].u=pCurCharInfo->right; akVertex[2].v=pCurCharInfo->top; akVertex[3].x=fFontEx-0.5f; akVertex[3].y=fFontEy-0.5f; akVertex[3].u=pCurCharInfo->right; akVertex[3].v=pCurCharInfo->bottom; //m_dwColorInfoVector[i]; //m_dwTextColor; akVertex[0].color = akVertex[1].color = akVertex[2].color = akVertex[3].color = m_dwColorInfoVector[i]; // 20041216.myevan.DrawPrimitiveUP if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4)) STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); //STATEMANAGER.DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, akVertex, sizeof(SVertex)); fCurX += fFontAdvance; } } if (m_isCursor) { // Draw Cursor float sx, sy, ex, ey; TDiffuse diffuse; int curpos = CIME::GetCurPos(); int compend = curpos + CIME::GetCompLen(); __GetTextPos(curpos, &sx, &sy); // If Composition if(curpos<compend) { diffuse = 0x7fffffff; __GetTextPos(compend, &ex, &sy); } else { diffuse = 0xffffffff; ex = sx + 2; } // FOR_ARABIC_ALIGN if (defCodePage == CP_ARABIC) { sx += m_v3Position.x - m_textWidth; ex += m_v3Position.x - m_textWidth; sy += m_v3Position.y; ey = sy + m_textHeight; } else { sx += m_v3Position.x; sy += m_v3Position.y; ex += m_v3Position.x; ey = sy + m_textHeight; } switch (m_vAlign) { case VERTICAL_ALIGN_BOTTOM: sy -= m_textHeight; break; case VERTICAL_ALIGN_CENTER: sy -= float(m_textHeight) / 2.0f; break; } // ÃÖÀûÈ­ »çÇ× // °°ÀºÅؽºÃĸ¦ »ç¿ëÇÑ´Ù¸é... STRIPÀ» ±¸¼ºÇÏ°í, ÅؽºÃÄ°¡ º¯°æµÇ°Å³ª ³¡³ª¸é DrawPrimitive¸¦ È£ÃâÇØ // ÃÖ´ëÇÑ ¼ýÀÚ¸¦ ÁÙÀ̵µ·ÏÇÏÀÚ! TPDTVertex vertices[4]; vertices[0].diffuse = diffuse; vertices[1].diffuse = diffuse; vertices[2].diffuse = diffuse; vertices[3].diffuse = diffuse; vertices[0].position = TPosition(sx, sy, 0.0f); vertices[1].position = TPosition(ex, sy, 0.0f); vertices[2].position = TPosition(sx, ey, 0.0f); vertices[3].position = TPosition(ex, ey, 0.0f); STATEMANAGER.SetTexture(0, NULL); // 2004.11.18.myevan.DrawIndexPrimitiveUP -> DynamicVertexBuffer CGraphicBase::SetDefaultIndexBuffer(CGraphicBase::DEFAULT_IB_FILL_RECT); if (CGraphicBase::SetPDTStream(vertices, 4)) STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 4, 0, 2); int ulbegin = CIME::GetULBegin(); int ulend = CIME::GetULEnd(); if(ulbegin < ulend) { __GetTextPos(curpos+ulbegin, &sx, &sy); __GetTextPos(curpos+ulend, &ex, &sy); sx += m_v3Position.x; sy += m_v3Position.y + m_textHeight; ex += m_v3Position.x; ey = sy + 2; vertices[0].diffuse = 0xFFFF0000; vertices[1].diffuse = 0xFFFF0000; vertices[2].diffuse = 0xFFFF0000; vertices[3].diffuse = 0xFFFF0000; vertices[0].position = TPosition(sx, sy, 0.0f); vertices[1].position = TPosition(ex, sy, 0.0f); vertices[2].position = TPosition(sx, ey, 0.0f); vertices[3].position = TPosition(ex, ey, 0.0f); STATEMANAGER.DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, 4, 2, c_FillRectIndices, D3DFMT_INDEX16, vertices, sizeof(TPDTVertex)); } } STATEMANAGER.RestoreRenderState(D3DRS_SRCBLEND); STATEMANAGER.RestoreRenderState(D3DRS_DESTBLEND); STATEMANAGER.SetRenderState(D3DRS_FOGENABLE, dwFogEnable); STATEMANAGER.SetRenderState(D3DRS_LIGHTING, dwLighting); if (m_emojiVector.size() != 0) { for (std::vector<SEmoji>::iterator itor = m_emojiVector.begin(); itor != m_emojiVector.end(); ++itor) { SEmoji & rEmo = *itor; if (rEmo.pInstance) { rEmo.pInstance->SetPosition(fStanX + rEmo.x, (fStanY + 7.0) - (rEmo.pInstance->GetHeight() / 2)); rEmo.pInstance->Render(); } } } //±Ý°­°æ ¸µÅ© ¶ç¿öÁÖ´Â ºÎºÐ. if (m_hyperlinkVector.size() != 0) { int lx = gs_mx - m_v3Position.x; int ly = gs_my - m_v3Position.y; //¾Æ¶øÀº ÁÂÇ¥ ºÎÈ£¸¦ ¹Ù²ãÁØ´Ù. if (GetDefaultCodePage() == CP_ARABIC) { lx = -lx; ly = -ly + m_textHeight; } if (lx >= 0 && ly >= 0 && lx < m_textWidth && ly < m_textHeight) { std::vector<SHyperlink>::iterator it = m_hyperlinkVector.begin(); while (it != m_hyperlinkVector.end()) { SHyperlink & link = *it++; if (lx >= link.sx && lx < link.ex) { gs_hyperlinkText = link.text; /* OutputDebugStringW(link.text.c_str()); OutputDebugStringW(L"\n"); */ break; } } } } } I haven't tried it, but it should work as it works for me. Please let me know if you still have problems with certain characters.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.