tmoitoi 26 Posted January 28, 2015 Share Posted January 28, 2015 Hi, using this client: http://metin2dev.org/board/topic/958-sln-metin2client-with-updated-directx-granny-python-and-more/ I want to downgrad to DX8 because the 9 has so many problems that's HORRIBLE. Someone can please help me for it ? Link to comment Share on other sites More sharing options...
Premium Ocelot2606 141 Posted January 28, 2015 Premium Share Posted January 28, 2015 directx9 works fine o.O which problems did you have? Link to comment Share on other sites More sharing options...
Premium Galet 514 Posted January 28, 2015 Premium Share Posted January 28, 2015 Maybe minimap or texture spoil. You have to change some declaration and functions, includes and libs. Link to comment Share on other sites More sharing options...
tmoitoi 26 Posted January 28, 2015 Author Share Posted January 28, 2015 (edited) I've some of these problems like these one: -Minimap invisible for some players -Sky invisible for some players too Can you please guys give me some help ? Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Ocelot2606 141 Posted January 28, 2015 Premium Share Posted January 28, 2015 Directx Downgrade is so much work better you use a Clean Source from novaline without that Link to comment Share on other sites More sharing options...
tmoitoi 26 Posted January 28, 2015 Author Share Posted January 28, 2015 I've already tryed it but you will call me newb but I've some problems with the novaline source, maybe I do some things wrong I don't know. If anyone can help me to it or to fix the problems of my current source, I will do my best to pay if u want it, thanks in advance. Or if you have any link for the novaline src with the link of external libs and files already included ? I think my problem is with visual studio the new version has a strange working system Link to comment Share on other sites More sharing options...
tmoitoi 26 Posted February 1, 2015 Author Share Posted February 1, 2015 UP Link to comment Share on other sites More sharing options...
Reboot 772 Posted February 1, 2015 Share Posted February 1, 2015 The best source to client is mainline_released original, kraizy.tgz Do not use that source of Terenzo. The best option is mainline_released original Link to comment Share on other sites More sharing options...
Kaba 67 Posted April 20, 2018 Share Posted April 20, 2018 who the hell is Terenzo and why did we just threw away this problem? Link to comment Share on other sites More sharing options...
Werwolf94 3 Posted November 27, 2019 Share Posted November 27, 2019 Hi! I'm currently working on this sh*t and I suggest you to not give any attention on it! Because I'm not done with the whole binary but I can tell you need to change this: //Client\EffectLib //EffectInstance.cpp //Search STATEMANAGER.SaveSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_NONE); STATEMANAGER.SaveSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_NONE); //Replace STATEMANAGER.SaveTextureStageState(0, D3DTSS_MINFILTER, D3DTEXF_NONE); STATEMANAGER.SaveTextureStageState(0, D3DTSS_MAGFILTER, D3DTEXF_NONE); //Search STATEMANAGER.SetFVF(D3DFVF_XYZ|D3DFVF_TEX1); //Replace STATEMANAGER.SetVertexShader(D3DFVF_XYZ|D3DFVF_TEX1); //Search STATEMANAGER.RestoreSamplerState(0, D3DSAMP_MINFILTER); STATEMANAGER.RestoreSamplerState(0, D3DSAMP_MAGFILTER); //Replace STATEMANAGER.RestoreTextureStageState(0, D3DTSS_MINFILTER); STATEMANAGER.RestoreTextureStageState(0, D3DTSS_MAGFILTER); //EffectMesh.h //Search #include <d3dx9.h> //Replace #include <d3dx8.h> //EffectMeshInstance.cpp //Search STATEMANAGER.SetFVF(D3DFVF_XYZ | D3DFVF_TEX1); //Replace STATEMANAGER.SetVertexShader(D3DFVF_XYZ | D3DFVF_TEX1); //SimpleLightData.cpp //Search void CLightData::InitializeLight(D3DLIGHT9& light) //Replace void CLightData::InitializeLight(D3DLIGHT8& light) //SimpleLightData.h //Search #include <d3dx9.h> //Replace #include <d3dx8.h> //Search void InitializeLight(D3DLIGHT9& light); //Replace void InitializeLight(D3DLIGHT8& light); //SimpleLightInstance.cpp //Search D3DLIGHT9 Light; //Replace D3DLIGHT8 Light; //Client\EterBase //lzo.cpp //lzo.h //Client\EterGrnLib //Material.cpp //Search LPDIRECT3DTEXTURE9 CGrannyMaterial::GetD3DTexture(int iStage) const //Replace LPDIRECT3DTEXTURE8 CGrannyMaterial::GetD3DTexture(int iStage) const //Search (Granny) granny_variant TwoSidedVariant; if (GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided", &TwoSidedVariant)) GrannyConvertSingleObject(TwoSidedVariant.Type, TwoSidedVariant.Object, TwoSidedFieldType, &twoSided, 0); //Replace granny_variant twoSideResult = GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided"); if (NULL != twoSideResult.Type) GrannyConvertSingleObject(twoSideResult.Type, twoSideResult.Object, TwoSidedFieldType, &twoSided); //Search STATEMANAGER.SaveSamplerState(1, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP); STATEMANAGER.SaveSamplerState(1, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP); //Replace STATEMANAGER.SaveTextureStageState(1, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP); STATEMANAGER.SaveTextureStageState(1, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP); //Search STATEMANAGER.RestoreSamplerState(1, D3DSAMP_ADDRESSU); STATEMANAGER.RestoreSamplerState(1, D3DSAMP_ADDRESSV); //Replace STATEMANAGER.RestoreTextureStageState(1, D3DTSS_ADDRESSU); STATEMANAGER.RestoreTextureStageState(1, D3DTSS_ADDRESSV); //Material.h //Search #include <d3d9.h> //Replace #include <d3d8.h> //Search LPDIRECT3DTEXTURE9 GetD3DTexture(int iStage) const; //Replace LPDIRECT3DTEXTURE8 GetD3DTexture(int iStage) const; //Mesh.cpp (Granny) //Mesh.h (Granny) //Model.cpp //Search LPDIRECT3DINDEXBUFFER9 CGrannyModel::GetD3DIndexBuffer() const //Replace LPDIRECT3DINDEXBUFFER8 CGrannyModel::GetD3DIndexBuffer() const //Search LPDIRECT3DVERTEXBUFFER9 CGrannyModel::GetPNTD3DVertexBuffer() const //Replace LPDIRECT3DVERTEXBUFFER8 CGrannyModel::GetPNTD3DVertexBuffer() const //Model.h //Search LPDIRECT3DVERTEXBUFFER9 GetPNTD3DVertexBuffer() const; LPDIRECT3DINDEXBUFFER9 GetD3DIndexBuffer() const; //Replace LPDIRECT3DVERTEXBUFFER8 GetPNTD3DVertexBuffer() const; LPDIRECT3DINDEXBUFFER8 GetD3DIndexBuffer() const; //ModelInstance.h //Search (Granny) const granny_int32x * __GetMeshBoneIndices(unsigned int iMeshBinding) const; //Replace int* __GetMeshBoneIndices(unsigned int iMeshBinding) const; //Search IDirect3DVertexBuffer9* __GetDeformableD3DVertexBufferPtr(); //Replace IDirect3DVertexBuffer8* __GetDeformableD3DVertexBufferPtr(); //ModelInstanceCollisionDetection.cpp (Granny) //ModelInstanceModel.cpp //Search (Granny) const granny_int32x * CGrannyModelInstance::__GetMeshBoneIndices(unsigned int iMeshBinding) const //Replace int* CGrannyModelInstance::__GetMeshBoneIndices(unsigned int iMeshBinding) const //Search IDirect3DVertexBuffer9* CGrannyModelInstance::__GetDeformableD3DVertexBufferPtr() //Replace IDirect3DVertexBuffer8* CGrannyModelInstance::__GetDeformableD3DVertexBufferPtr() //ModelInstanceRender.cpp [This will be a lot of work, have a break if you need it.] //Search STATEMANAGER.SetVertexDeclaration(ms_pntVS); // WORK LPDIRECT3DVERTEXBUFFER9 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr(); // END_OF_WORK LPDIRECT3DVERTEXBUFFER9 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer(); //Replace STATEMANAGER.SetVertexShader(ms_pntVS); // WORK LPDIRECT3DVERTEXBUFFER8 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr(); // END_OF_WORK LPDIRECT3DVERTEXBUFFER8 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer(); //Search // WORK LPDIRECT3DVERTEXBUFFER9 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr(); // END_OF_WORK LPDIRECT3DVERTEXBUFFER9 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer(); STATEMANAGER.SetVertexDeclaration(ms_pntVS); //Replace // WORK LPDIRECT3DVERTEXBUFFER8 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr(); // END_OF_WORK LPDIRECT3DVERTEXBUFFER8 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer(); STATEMANAGER.SetVertexShader(ms_pntVS); //Search STATEMANAGER.SetVertexDeclaration(ms_pntVS); //Replace STATEMANAGER.SetVertexShader(ms_pntVS); //Search // WORK LPDIRECT3DVERTEXBUFFER9 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr(); // END_OF_WORK LPDIRECT3DVERTEXBUFFER9 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer(); //Replace // WORK LPDIRECT3DVERTEXBUFFER8 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr(); // END_OF_WORK LPDIRECT3DVERTEXBUFFER8 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer(); //Search LPDIRECT3DINDEXBUFFER9 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer(); //Replace LPDIRECT3DINDEXBUFFER8 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer(); //Search STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount); //Replace STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount); //Search LPDIRECT3DINDEXBUFFER9 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer(); //Replace LPDIRECT3DINDEXBUFFER8 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer(); //Search STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount); //Replace STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount); //Search LPDIRECT3DINDEXBUFFER9 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer(); //Replace LPDIRECT3DINDEXBUFFER8 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer(); //Search STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount); //Replace STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount); //ModelInstanceUpdate.cpp (Granny) //Client\EterImgaeLib //DXTCImage.cpp //Search #include <ddraw.h> //Replace #include <d3d.h> //Client\EterLib //BlockTexture.cpp //Search STATEMANAGER.SetFVF(D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_DIFFUSE); //Replace STATEMANAGER.SetVertexShader(D3DFVF_XYZ|D3DFVF_TEX1|D3DFVF_DIFFUSE); //Search if (FAILED(ms_lpd3dDevice->CreateTexture(dwWidth, dwHeight, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &m_lpd3dTexture, NULL))) //Replace if (FAILED(ms_lpd3dDevice->CreateTexture(dwWidth, dwHeight, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &m_lpd3dTexture))) //BlockTexture.h //Search LPDIRECT3DTEXTURE9 m_lpd3dTexture; //Replace LPDIRECT3DTEXTURE8 m_lpd3dTexture; //Camera.cpp //Search float fDeterminantD3DMatView = D3DXMatrixDeterminant(&m_matView); //Replace float fDeterminantD3DMatView = D3DXMatrixfDeterminant(&m_matView); //Decal.cpp //Search STATEMANAGER.SetFVF(D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1); //Replace STATEMANAGER.SetVertexShader(D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1); //GrpBase.cpp //Search LPDIRECT3D9 CGraphicBase::ms_lpd3d = NULL; LPDIRECT3DDEVICE9 CGraphicBase::ms_lpd3dDevice = NULL; //Replace LPDIRECT3D8 CGraphicBase::ms_lpd3d = NULL; LPDIRECT3DDEVICE8 CGraphicBase::ms_lpd3dDevice = NULL; //Search D3DVIEWPORT9 CGraphicBase::ms_Viewport; //Replace D3DVIEWPORT8 CGraphicBase::ms_Viewport; //Search D3DCAPS9 CGraphicBase::ms_d3dCaps; //Replace D3DCAPS8 CGraphicBase::ms_d3dCaps; //Search LPDIRECT3DVERTEXDECLARATION9 CGraphicBase::ms_ptVS = 0; LPDIRECT3DVERTEXDECLARATION9 CGraphicBase::ms_pntVS = 0; LPDIRECT3DVERTEXDECLARATION9 CGraphicBase::ms_pnt2VS = 0; //Replace DWORD CGraphicBase::ms_ptVS = 0; DWORD CGraphicBase::ms_pntVS = 0; DWORD CGraphicBase::ms_pnt2VS = 0; //Search LPDIRECT3DVERTEXBUFFER9 CGraphicBase::ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM]; LPDIRECT3DINDEXBUFFER9 CGraphicBase::ms_alpd3dDefIB[DEFAULT_IB_NUM]; //Replace LPDIRECT3DVERTEXBUFFER8 CGraphicBase::ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM]; LPDIRECT3DINDEXBUFFER8 CGraphicBase::ms_alpd3dDefIB[DEFAULT_IB_NUM]; //Search IDirect3DVertexBuffer9* plpd3dFillRectVB=ms_alpd3dPDTVB[s_dwVBPos]; //Replace IDirect3DVertexBuffer8* plpd3dFillRectVB=ms_alpd3dPDTVB[s_dwVBPos]; //Search plpd3dFillRectVB->Lock(0, sizeof(TPDTVertex)*uVtxCount, (void**)&pDstVertices, D3DLOCK_DISCARD) //Replace plpd3dFillRectVB->Lock(0, sizeof(TPDTVertex)*uVtxCount, (BYTE**)&pDstVertices, D3DLOCK_DISCARD) //GrpBase.h //Search static LPDIRECT3D9 ms_lpd3d; static LPDIRECT3DDEVICE9 ms_lpd3dDevice; //Replace static LPDIRECT3D8 ms_lpd3d; static LPDIRECT3DDEVICE8 ms_lpd3dDevice; //Search static D3DVIEWPORT9 ms_Viewport; //Replace static D3DVIEWPORT8 ms_Viewport; //Search static D3DCAPS9 ms_d3dCaps; //Replace static D3DCAPS8 ms_d3dCaps; //Search static LPDIRECT3DVERTEXDECLARATION9 ms_ptVS; static LPDIRECT3DVERTEXDECLARATION9 ms_pntVS; static LPDIRECT3DVERTEXDECLARATION9 ms_pnt2VS; //Replace static DWORD ms_ptVS; static DWORD ms_pntVS; static DWORD ms_pnt2VS; //Search static LPDIRECT3DVERTEXBUFFER9 ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM]; static LPDIRECT3DINDEXBUFFER9 ms_alpd3dDefIB[DEFAULT_IB_NUM]; //Replace static LPDIRECT3DVERTEXBUFFER8 ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM]; static LPDIRECT3DINDEXBUFFER8 ms_alpd3dDefIB[DEFAULT_IB_NUM]; //GrpDetector.cpp //Search VOID D3D_CAdapterDisplayModeList::Build(IDirect3D9& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iD3DAdapterInfo) //Replace VOID D3D_CAdapterDisplayModeList::Build(IDirect3D8& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iD3DAdapterInfo) //Search (?) UINT uAdapterModeNum = rkD3D.GetAdapterModeCount(iD3DAdapterInfo, eD3DFmtDefault); //Replace UINT uAdapterModeNum=rkD3D.GetAdapterModeCount(iD3DAdapterInfo); //Search (?) rkD3D.EnumAdapterModes(iD3DAdapterInfo, eD3DFmtDefault, iD3DAdapterInfoMode, &kD3DDMCur); //Replace rkD3D.EnumAdapterModes(iD3DAdapterInfo, iD3DAdapterInfoMode, &kD3DDMCur); //Search BOOL D3D_CDeviceInfo::FindDepthStencilFormat(IDirect3D9& rkD3D, UINT iD3DAdapterInfo, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat ) //Replace BOOL D3D_CDeviceInfo::FindDepthStencilFormat(IDirect3D8& rkD3D, UINT iD3DAdapterInfo, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat ) //Search BOOL D3D_CDeviceInfo::Build(IDirect3D9& rkD3D, UINT iD3DAdapterInfo, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, BOOL (*pfnConfirmDevice)(D3DCAPS9& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt)) //Replace BOOL D3D_CDeviceInfo::Build(IDirect3D8& rkD3D, UINT iD3DAdapterInfo, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, BOOL (*pfnConfirmDevice)(D3DCAPS8& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt)) //Search isHALWindowedCompatible=TRUE; //Add this code up if (m_kD3DCaps.Caps2 & D3DCAPS2_CANRENDERWINDOWED) { //Search isHALDesktopCompatible=TRUE; //Add this code down } //Search if (aisFormatConfirmed[0]) //Replace if (aisFormatConfirmed[0] && (m_kD3DCaps.Caps2 & D3DCAPS2_CANRENDERWINDOWED) ) //Search BOOL D3D_CAdapterInfo::Build(IDirect3D9& rkD3D, UINT iD3DAdapterInfo, PFNCONFIRMDEVICE pfnConfirmDevice) //Replace BOOL D3D_CAdapterInfo::Build(IDirect3D8& rkD3D, UINT iD3DAdapterInfo, PFNCONFIRMDEVICE pfnConfirmDevice) //Search rkD3D.GetAdapterIdentifier(iD3DAdapterInfo, 0, &m_kD3DAdapterIdentifier); //Replace rkD3D.GetAdapterIdentifier(iD3DAdapterInfo, D3DENUM_NO_WHQL_LEVEL, &m_kD3DAdapterIdentifier); //Search BOOL D3D_CDisplayModeAutoDetector::Build(IDirect3D9& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice) //Replace BOOL D3D_CDisplayModeAutoDetector::Build(IDirect3D8& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice) //GrpDetector.h //Search #include <d3d9.h> typedef BOOL (*PFNCONFIRMDEVICE) (D3DCAPS9& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt); //Replace #include <d3d8.h> typedef BOOL (*PFNCONFIRMDEVICE) (D3DCAPS8& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt); //Search VOID Build(IDirect3D9& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iAdapter); //Replace VOID Build(IDirect3D8& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iAdapter); //Search BOOL Build(IDirect3D9& rkD3D, UINT iAdapter, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, PFNCONFIRMDEVICE pfnConfirmDevice); //Replace BOOL Build(IDirect3D8& rkD3D, UINT iAdapter, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, PFNCONFIRMDEVICE pfnConfirmDevice); //Search BOOL FindDepthStencilFormat(IDirect3D9& rkD3D, UINT iAdapter, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat); //Replace BOOL FindDepthStencilFormat(IDirect3D8& rkD3D, UINT iAdapter, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat); //Search D3DCAPS9 m_kD3DCaps; //Replace D3DCAPS8 m_kD3DCaps; //Search BOOL Build(IDirect3D9& rkD3D, UINT iAdapter, PFNCONFIRMDEVICE pfnConfirmDevice); //Replace BOOL Build(IDirect3D8& rkD3D, UINT iAdapter, PFNCONFIRMDEVICE pfnConfirmDevice); //Search D3DADAPTER_IDENTIFIER9& GetIdentifier() //Replace D3DADAPTER_IDENTIFIER8& GetIdentifier() //Search D3DADAPTER_IDENTIFIER9 m_kD3DAdapterIdentifier; //Replace D3DADAPTER_IDENTIFIER8 m_kD3DAdapterIdentifier; //Search BOOL Build(IDirect3D9& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice); //Replace BOOL Build(IDirect3D8& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice); Okay I'm done, I don't want to write down the changes, so you should modify these files also: //GrpDevice.cpp //GrpDevice.h //GrpExpandedImageInstance.cpp //GrpImageInstance.cpp //GrpImageTexture.cpp //GrpIndexBuffer.cpp //GrpIndexBuffer.h //GrpLightManager.cpp //GrpLightManager.h //GrpMarkInstance.cpp //GrpPixelShader.cpp //GrpScreen.cpp //GrpShadowTexture.cpp //GrpShadowTexture.h //GrpTextInstance.cpp //GrpTexture.cpp //GrpTexture.h //GrpVertexBuffer.cpp //GrpVertexBuffer.h //GrpVertexShader.cpp //JpegFile.cpp (JPG Loader) //LensFlare.cpp //Ray.h //SkyBox.cpp //StateManager.cpp //StateManager.h //StdAfx.h //Util.h //Client\EterPythonLib //PythonGraphic.cpp //PythonGraphic.h //Client\GameLib //ActorInstanceRender.cpp //AreaTerrain.cpp //AreaTerrain.h //DungeonBlock.cpp //FlyTrace.cpp //MapBase.h //MapOutdoor.cpp //MapOutdoor.h //MapOutdoorCharacterShadow.cpp //MapOutdoorRender.cpp //MapOutdoorRenderHTP.cpp //MapOutdoorRenderSTP.cpp //MapOutdoorWater.cpp //MapType.h //SnowEnvironment.cpp //SnowEnvironment.h //TerrainDecal.cpp //TerrainPatch.cpp //TerrainPatch.h //WeaponTrace.cpp //Client\PRTerrainLib //Terrain.h //TerrainType.h //TextureSet.h //Client\ScriptLib //PythonLauncher.cpp (Python upgrade) //PythonLauncher.h (Python upgrade) //PythonMarshal.cpp (Python upgrade) //StdAfx.h (Python upgrade) //Client\SpeedTreeLib //SpeedGrassWrapper.h (I think It may have an error.) //Search LPDIRECT3DTEXTURE9 m_lpD3DTexure8; //Replace LPDIRECT3DTEXTURE8 m_lpD3DTexure8; //SpeedTreeForestDirectX8.cpp (Error maybe...) //SpeedTreeForestDirectX8.h //SpeedTreeMaterial.h //SpeedTreeWrapper.cpp //SpeedTreeWrapper.h //VertexShaders.h //Client\SphereLib //StdAfx.h //Client\UserInterface //GuildMarkUploader.cpp (So that can be the Guild mark bug cause?) ilCopyPixels(0, 0, 0, SGuildMark::WIDTH, SGuildMark::HEIGHT, 1, IL_BGRA, IL_BYTE, m_kMark.m_apxBuf); ilCopyPixels(0, 0, 0, SGuildMark::WIDTH, SGuildMark::HEIGHT, 1, IL_BGRA, IL_BYTE, (ILvoid*)m_kMark.m_apxBuf); //PythonApplicationLogo.cpp //PythonMiniMap.cpp (Yeah the source of the minimap bug...) //PythonMiniMap.h //PythonSystem.cpp 1 1 Link to comment Share on other sites More sharing options...
Werwolf94 3 Posted April 5 Share Posted April 5 Finally, I stayed at Terenzo's source at the end, I fixed the "minecraft terrain texture bug" myself following this guide: This is the differentials I made in the EterLib/StateManager.cpp: Change this: CStateManager::CStateManager(LPDIRECT3DDEVICE9 lpDevice) : m_lpD3DDev(NULL) { m_bScene = false; m_dwBestMinFilter = D3DTEXF_LINEAR; m_dwBestMagFilter = D3DTEXF_LINEAR; SetDevice(lpDevice); } To this: CStateManager::CStateManager(LPDIRECT3DDEVICE9 lpDevice) : m_lpD3DDev(NULL) { m_bScene = false; m_dwBestMinFilter = D3DTEXF_ANISOTROPIC; m_dwBestMagFilter = D3DTEXF_ANISOTROPIC; SetDevice(lpDevice); } Change this: void CStateManager::SetDevice(LPDIRECT3DDEVICE9 lpDevice) { StateManager_Assert(lpDevice); lpDevice->AddRef(); if (m_lpD3DDev) { m_lpD3DDev->Release(); m_lpD3DDev = NULL; } m_lpD3DDev = lpDevice; D3DCAPS9 d3dCaps; m_lpD3DDev->GetDeviceCaps(&d3dCaps); if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFANISOTROPIC) m_dwBestMagFilter = D3DTEXF_ANISOTROPIC; else m_dwBestMagFilter = D3DTEXF_LINEAR; if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFANISOTROPIC) m_dwBestMinFilter = D3DTEXF_ANISOTROPIC; else m_dwBestMinFilter = D3DTEXF_LINEAR; DWORD dwMax = d3dCaps.MaxAnisotropy; dwMax = dwMax < 4 ? dwMax : 4; for (int i = 0; i < 8; ++i) m_lpD3DDev->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, dwMax); SetDefaultState(); } To this: void CStateManager::SetDevice(LPDIRECT3DDEVICE9 lpDevice) { StateManager_Assert(lpDevice); lpDevice->AddRef(); if (m_lpD3DDev) { m_lpD3DDev->Release(); m_lpD3DDev = NULL; } m_lpD3DDev = lpDevice; SetDefaultState(); } After this: #ifdef _DEBUG int i, j; for (i = 0; i < STATEMANAGER_MAX_RENDERSTATES; i++) m_bRenderStateSavingFlag[i] = FALSE; for (j = 0; j < STATEMANAGER_MAX_TRANSFORMSTATES; j++) m_bTransformSavingFlag[j] = FALSE; for (j = 0; j < STATEMANAGER_MAX_STAGES; ++j) for (i = 0; i < STATEMANAGER_MAX_TEXTURESTATES; ++i) { m_bTextureStageStateSavingFlag[j][i] = FALSE; m_bSamplerStateSavingFlag[j][i] = FALSE; } #endif _DEBUG Add this: D3DCAPS9 d3dCaps; m_lpD3DDev->GetDeviceCaps(&d3dCaps); DWORD dwMax = d3dCaps.MaxAnisotropy; dwMax = dwMax < 4 ? dwMax : 4; for (int i = 0; i < 8; ++i) m_lpD3DDev->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, dwMax); (Before void CStateManager::SetDefaultState() ending '}' bracelet) Hope it work's for you too. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now