User Tag List

Results 1 to 6 of 6

Thread: LPRO Semi-Transparency (for HWA)

  1. #1
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    prester's Avatar
    Join Date
    Feb 2010
    Location
    japan
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LPRO Semi-Transparency (for HWA)

    About Active object's effect "Alpha-Blending coefficient", Probably basic, but not be able to how to implement on my test extension.
    Click image for larger version. 

Name:	LPRO_active_effect_set_alpha_blending_coefficient_menu.gif 
Views:	20 
Size:	142.6 KB 
ID:	31937

    I found an old forum post, unfortunately not for HWA.
    https://community.clickteam.com/threads/50441-LPRO-Semi-Transparency


    "Sprite display structure" at Cncf.h, "ros.rsFlash" "ros.rsFlags" "rsEffect" "rsEffectParam" etcs..
    At first thought it was simple, actually not so easy with try and errors what i realized.
    Any sample codes or Documents are there?

    P.S. If it is possible, from the extension, i wish to control the shader effect param.

    Click image for larger version. 

Name:	LPRO_active_effect_set_effect_param_fBlend_value.gif 
Views:	21 
Size:	111.3 KB 
ID:	31938

    Thanks.

  2. #2
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    562
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Still experimental.

    https://github.com/defisym/OpenFusio...ectUtilities.h

    https://github.com/defisym/OpenFusio...ffectUtilities

    Note that you need an unreleased SDK with shader class.

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    prester's Avatar
    Join Date
    Feb 2010
    Location
    japan
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your quick replay! >> defisym
    I'll check it soon now.

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,640
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    If you want to retrieve the blend coefficient:

    Code:
    		int nBlendCoef = 0;
    		switch(rdPtr->rs.rsEffect & BOP_MASK) {
    		case BOP_EFFECTEX:
    			{
    				CEffectEx* pEffectEx = (CEffectEx*)rdPtr->rs.rsEffectParam;
    				if ( pEffectEx != NULL )
    					nBlendCoef = 255 - (pEffectEx->GetRGBA() >> 24);
    			}
    			break;
    		case BOP_BLEND: // old semi-transparency coef
    			nBlendCoef = 255 - SEMITRANSPTOALPHA(rdPtr->rs.rsEffectParam);
    			break;
    		default:
    			if ( rdPtr->rs.rsEffect & BOP_RGBAFILTER )
    				nBlendCoef = 255 - (((DWORD)rdPtr->rs.rsEffectParam) >> 24);
    			break;
    		}

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    prester's Avatar
    Join Date
    Feb 2010
    Location
    japan
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    très bien merci! > Yves

    Thanks a lot!

  6. #6
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    prester's Avatar
    Join Date
    Feb 2010
    Location
    japan
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still Hard-Coding.. but the result is great.
    Fixed Yves code.


    Code:
    void TEST::SetSemiTrans(LPRO myobj, int coef)
    {
    	// LPRO myobj = (LPRO)CNC_GetParameter(rdPtr);
    	int nBlendCoef = 0;
    	
    	switch (myobj->ros.rsEffect & BOP_MASK) {
    	case BOP_EFFECTEX:
    	{
    		CEffectEx* pEffectEx = (CEffectEx*)myobj->ros.rsEffectParam;// Need #include    "EffectEx.h" from MMF Headers
    
    		if (pEffectEx != NULL)
    			nBlendCoef = 255 - (pEffectEx->GetRGBA() >> 24);// pEffectEx->GetRGBA() == default >> -1; >> result calc == 0;
    			int a = 939524095;// Hardcode
    			pEffectEx->SetRGBA(a);// find at "EffectEx.h"
    		
    	}
    	break;
    	case BOP_BLEND: // old semi-transparency coef
    		nBlendCoef = 255 - SEMITRANSPTOALPHA(myobj->ros.rsEffectParam);
    		break;
    	default:
    		if (myobj->ros.rsEffect & BOP_RGBAFILTER)
    			nBlendCoef = 255 - (((DWORD)myobj->ros.rsEffectParam) >> 24);
    		break;
    	}
    	;
    }
    ;

Similar Threads

  1. LPRO Semi-Transparency
    By Jaffob in forum Extension Development
    Replies: 5
    Last Post: 17th January 2009, 10:28 PM
  2. Semi Transparency?
    By artician in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th June 2008, 10:13 AM
  3. Sub-app Semi Transparency
    By dingdong in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 14th December 2007, 09:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •