Clean/White Texutre via Options.

Results 1 to 9 of 9
  1. #1
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Clean/White Texutre via Options.

    ZOptionInterface.cpp (201)
    Code:
    		pWidget = (MComboBox*)pResource->FindWidget("MapTexLevel");
    		if(pWidget) {
    			if(ZGetConfiguration()->GetVideo()->nMapTexLevel > 7) {
    				pWidget->SetSelIndex(3);
    			} 
    			else if(ZGetConfiguration()->GetVideo()->nMapTexLevel > 3 ) {
    				pWidget->SetSelIndex(4);
    			} else {
    				pWidget->SetSelIndex(ZGetConfiguration()->GetVideo()->nMapTexLevel);
    			}
    		}
    ZOptionInterface.cpp (604)
    Code:
            pWidget = (MComboBox*)pResource->FindWidget("MapTexLevel");
    
            if(pWidget)    {
    
                TexLevel = pWidget->GetSelIndex();
    
                RBspObject::SetWhiteMap(false);
    
                if(pWidget->GetSelIndex() == 3) {
                    RBspObject::SetWhiteMap(false);
                    TexLevel = 8;
                } else if(pWidget->GetSelIndex() == 4) {
                    TexLevel = 4;
                    if(ZGetGame()) {
                        RBspObject::SetWhiteMap(true);
                        ZGetConfiguration()->GetVideo()->bLightMap = true;
                    }
                }
                if( ZGetConfiguration()->GetVideo()->bTerrible ){
                    ZGetConfiguration()->GetVideo()->nCharTexLevel = TexLevel;
                    if( TexLevel == 2 )
                        SetObjectTextureLevel(TexLevel+2);
                    else
                        SetObjectTextureLevel(TexLevel);
    
                    flag |= RTextureType_Object;
                }
                if( ZGetConfiguration()->GetVideo()->nMapTexLevel != TexLevel ) {
                    ZGetConfiguration()->GetVideo()->nMapTexLevel = TexLevel;
                    SetMapTextureLevel(TexLevel);
                    flag |= RTextureType_Map;
                }
            }
    RBspObject.h (282)
    Code:
    	bool GetWireframeMode() { return m_bWireframe; }
    	static void SetWhiteMap(bool bWhiteMap) { m_bWhiteMap=bWhiteMap;}
    RBspObject.h (405)
    Code:
    	static bool m_bWhiteMap;
    RBspObject.cpp (40)
    Code:
    LPDIRECT3DTEXTURE9 g_pShademap=NULL;
    
    bool RBspObject::m_bWhiteMap = false;
    RBspObject.cpp (491)
    Code:
    void RBspObject::SetDiffuseMap(int nMaterial)
    {
    	LPDIRECT3DDEVICE9 pd3dDevice=RGetDevice();
    
    	RBaseTexture *pTex=m_pMaterials[nMaterial].texture;
    	if(m_bWhiteMap)
    	{	
    		DWORD dwDiffuse= 0xFFE6E6E6; //RGB COLOR
    		pd3dDevice->SetRenderState(D3DRS_TEXTUREFACTOR , dwDiffuse);
    		pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TFACTOR );
    	} else {
    		if(pTex)
    		{
    			pd3dDevice->SetTexture(0,pTex->GetTexture());
    			pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
    		}
    	}
    }
    Interface/default/Option.xml
    Code:
    	<COMBOBOX item="MapTexLevel" parent="VideoOptionGroup">
    		<LISTBOXLOOK>CustomListBoxLook</LISTBOXLOOK>
    		<BUTTONLOOK>ListBoxButtonLook</BUTTONLOOK>
    		<FONT>FONTa9</FONT>
    		<TEXTCOLOR>
    			<R>205</R>
    			<G>205</G>
    			<B>205</B>
    		</TEXTCOLOR>
    		<TEXTALIGN>
    			<VALIGN>center</VALIGN>
    			<HALIGN>center</HALIGN>
    		</TEXTALIGN>
    		<BOUNDS>
    			<X>165</X>
    			<Y>210</Y>
    			<W>80</W>
    			<H>24</H>
    		</BOUNDS>
    		<ALIGN>
    			<HALIGN>right</HALIGN>
    		</ALIGN>
    		<LISTITEM selected="true">High</LISTITEM> 
    		<LISTITEM>Normal</LISTITEM>
    		<LISTITEM>Low</LISTITEM>
    		<LISTITEM>Clean</LISTITEM>
    		<LISTITEM>White</LISTITEM>	
    		<DROPSIZE>200</DROPSIZE>
    		<COMBOTYPE>1</COMBOTYPE>
    	</COMBOBOX>
    Fixed by Mark
    Last edited by qet123; 15-09-12 at 08:16 AM.


  2. #2
    Developer / Patch Finder Tankado is offline
    MemberRank
    Oct 2011 Join Date
    The NetherlandsLocation
    451Posts

    Re: Clean/White Texutre via Options.

    lol, this look like what i found on ragezone br , but nice post

    - tankado

  3. #3
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Clean/White Texutre via Options.

    Quote Originally Posted by Tankado View Post
    lol, this look like what i found on ragezone br , but nice post

    - tankado
    In case you think i took it from there you are wrong. I coded it and to prove it i posted in show off thread about colored map and white was one of them.

  4. #4
    Developer / Patch Finder Tankado is offline
    MemberRank
    Oct 2011 Join Date
    The NetherlandsLocation
    451Posts

    Re: Clean/White Texutre via Options.

    i belief u, but its only the same idea :P

    - Tankado

  5. #5
    Enthusiast xJuanxDx is offline
    MemberRank
    Feb 2012 Join Date
    26Posts

    Re: Clean/White Texutre via Options.

    Friend hears I have a problem with this code I add it ami source and compile all good but when I enter the server I select the opc they extract me of the game for which it was happening?

  6. #6
    Member iOverRun is offline
    MemberRank
    Apr 2011 Join Date
    Near by !!Location
    98Posts

    Re: Clean/White Texutre via Options.

    after adding this ......
    i got a crash when trying to save options in game room or lobby however it works fine in game !
    any ideas about that error ?

  7. #7
    Aristrum Mark is offline
    MemberRank
    Aug 2007 Join Date
    United KingdomLocation
    474Posts

    Re: Clean/White Texutre via Options.

    You're having this problem because qet didn't code this properly. Use these changes and it should work (everything in red):

    Quote Originally Posted by qet123 View Post
    ZOptionInterface.cpp (201)
    Code:
            pWidget = (MComboBox*)pResource->FindWidget("MapTexLevel");
            if(pWidget) {
                if(ZGetConfiguration()->GetVideo()->nMapTexLevel > 7) {
                    pWidget->SetSelIndex(3);
                } 
                else if(ZGetConfiguration()->GetVideo()->nMapTexLevel > 3 ) {
                    pWidget->SetSelIndex(4);
                } else {
                    pWidget->SetSelIndex(ZGetConfiguration()->GetVideo()->nMapTexLevel);
                }
            }
    ZOptionInterface.cpp (604)
    Code:
            pWidget = (MComboBox*)pResource->FindWidget("MapTexLevel");
    
            if(pWidget)    {
    
                TexLevel = pWidget->GetSelIndex();
    
                RBspObject::SetWhiteMap(false);
    
                if(pWidget->GetSelIndex() == 3) {
                    RBspObject::SetWhiteMap(false);
                    TexLevel = 8;
                } else if(pWidget->GetSelIndex() == 4) {
                    TexLevel = 4;
                    if(ZGetGame()) {
                        RBspObject::SetWhiteMap(true);
                        ZGetConfiguration()->GetVideo()->bLightMap = true;
                    }
                }
                if( ZGetConfiguration()->GetVideo()->bTerrible ){
                    ZGetConfiguration()->GetVideo()->nCharTexLevel = TexLevel;
                    if( TexLevel == 2 )
                        SetObjectTextureLevel(TexLevel+2);
                    else
                        SetObjectTextureLevel(TexLevel);
    
                    flag |= RTextureType_Object;
                }
                if( ZGetConfiguration()->GetVideo()->nMapTexLevel != TexLevel ) {
                    ZGetConfiguration()->GetVideo()->nMapTexLevel = TexLevel;
                    SetMapTextureLevel(TexLevel);
                    flag |= RTextureType_Map;
                }
            }
    RBspObject.h (282)
    Code:
        bool GetWireframeMode() { return m_bWireframe; }
        static void SetWhiteMap(bool bWhiteMap) { m_bWhiteMap=bWhiteMap;}
    RBspObject.h (405)
    Code:
        static bool m_bWhiteMap; 
    RBspObject.cpp (40)
    Code:
    // Å×½ºÆ®¿ë
    LPDIRECT3DTEXTURE9 g_pShademap=NULL;
    
    bool RBspObject::m_bWhiteMap = false;
    RBspObject.cpp (277)
    Code:
         REMOVE THIS! m_bWhiteMap=false; REMOVE THIS!
    RBspObject.cpp (491)
    Code:
    void RBspObject::SetDiffuseMap(int nMaterial)
    {
        LPDIRECT3DDEVICE9 pd3dDevice=RGetDevice();
    
        RBaseTexture *pTex=m_pMaterials[nMaterial].texture;
        if(m_bWhiteMap)
        {    
            DWORD dwDiffuse= 0xFFE6E6E6; //RGB COLOR
            pd3dDevice->SetRenderState(D3DRS_TEXTUREFACTOR , dwDiffuse);
            pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TFACTOR );
        } else {
            if(pTex)
            {
                pd3dDevice->SetTexture(0,pTex->GetTexture());
                pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
            }
        }
    }
    Interface/default/Option.xml
    Code:
        <COMBOBOX item="MapTexLevel" parent="VideoOptionGroup">
            <LISTBOXLOOK>CustomListBoxLook</LISTBOXLOOK>
            <BUTTONLOOK>ListBoxButtonLook</BUTTONLOOK>
            <FONT>FONTa9</FONT>
            <TEXTCOLOR>
                <R>205</R>
                <G>205</G>
                <B>205</B>
            </TEXTCOLOR>
            <TEXTALIGN>
                <VALIGN>center</VALIGN>
                <HALIGN>center</HALIGN>
            </TEXTALIGN>
            <BOUNDS>
                <X>165</X>
                <Y>210</Y>
                <W>80</W>
                <H>24</H>
            </BOUNDS>
            <ALIGN>
                <HALIGN>right</HALIGN>
            </ALIGN>
            <LISTITEM selected="true">High</LISTITEM> 
            <LISTITEM>Normal</LISTITEM>
            <LISTITEM>Low</LISTITEM>
            <LISTITEM>Clean</LISTITEM>
            <LISTITEM>White</LISTITEM>    
            <DROPSIZE>200</DROPSIZE>
            <COMBOTYPE>1</COMBOTYPE>
        </COMBOBOX>

  8. #8
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Clean/White Texutre via Options.

    Quote Originally Posted by Mark View Post
    You're having this problem because qet didn't code this properly. Use these changes and it should work (everything in red):
    Thanks, i updated my thread.

  9. #9
    Enthusiast xJuanxDx is offline
    MemberRank
    Feb 2012 Join Date
    26Posts

    Re: Clean/White Texutre via Options.

    Quote Originally Posted by Mark View Post
    You're having this problem because qet didn't code this properly. Use these changes and it should work (everything in red):
    Thank you for Mark accommodates it



Advertisement