User Tag List

Page 8 of 10 FirstFirst ... 6 7 8 9 10 LastLast
Results 71 to 80 of 97

Thread: Edif : Extension Development Is Fun

  1. #71
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Edif : Extension Development Is Fun

    Thanks, i was thinking it might be more complex but i tested and that works great.

    The behaviors crash no longer happens also so everything is fixed now, thanks again.

  2. #72
    Clicker Multimedia Fusion 2
    Algul's Avatar
    Join Date
    Feb 2008
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just out of curiosity, how does object selection works in Edif? If is declare condition in json with parameter "Object" how do I have to declare function in Edif? From experience in rSDK param object should be short and the number should be index of OI in OIL. But if I declare function in Edif to take param short or int, I don't get the same number as I get in rSDK(I tested).

  3. #73
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    For anyone wanting to use Custom Parameters with EDIF, see this:
    https://github.com/Andos/Edif/issues/1

    Essentially, until EDIF is updated with a fix similar to this, you can open Edif.cpp and after all the if-statements in ReadParameterType but before the return, add these lines of code:
    Code:
    	if(!_stricmp(Text, "Custom"))
    		return PARAM_EXTBASE;
    	if(std::string(Text).substr(0, 6) == "Custom")
    	{
    		std::string n = std::string(Text).substr(6);
    		int num;
    		std::istringstream(n) >> num;
    		return PARAM_EXTBASE+num;
    	}
    Then in the JSON you can use "Custom0" (same as just "Custom"), "Custom1", "Custom2", etc. for custom parameters. You may need to #include <sstream> in Common.h

    If you haven't, download the latest EDIF from the GitHub link above/in the first post; there are many fixes and support for making unicode extensions more easily via Unicode build configurations.

    Have fun!
    Working as fast as I can on Fusion 3

  4. #74
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    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)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,811
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Code v2:
    Code:
    	if(!_strincmp(Text, "Custom", 6))
    		return PARAM_EXTBASE+atoi(Text+6);
    Note that atoi() returns 0 if it reads a null.

  5. #75
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just wondering, has anyone tried to use EDIF to make MMF2 behaviors?

    There has been many 3rd party extensions but never any behaviors that i know of. Currently i have only made flash and java extensions with EDIF, i don't have any idea about behaviors even with the regular SDKs so i was just wondering if anyone else had tried making them.

  6. #76
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Not sure what you mean. You can't create behaviours via extension.

  7. #77
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, i meant to say movements rather than behaviors.

    In the official SDK i think there is a page about these but i don't think i have ever seen any 3rd party devs release movements, can the EDIF SDK make these also?

  8. #78
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The Movement SDK is already EDIF-style in the sense that your movement is in a class.
    Working as fast as I can on Fusion 3

  9. #79
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Upgrading your EDIF project

    In the latest version of EDIF the JSON parser was modified to use real JSON syntax. Here's how to upgrade:

    1. Download the latest version of EDIF from the GitHub link in the first post
    2. From the Template project, copy the .vcproj file to your own project folder - make sure you copy OVER your own .vcproj file
    3. Open your extension and edit the project settings as you like (ie changing the build directory for debug to your MMF2 extension folder)
    4. Open your Ext.json file in VC++, and wrap the entire JSON in curly braces {} and then select the whole middle and press the tab key to indent everything by one tab
    5. Still in your Ext.json file, press Ctrl+H; we're going to do some find & replace magic:
    ....1. Search for } and replace it with }, (regex off)
    ....2. Search for "\n and replace it with ",\n (regex on)
    ....3. Search for ] and replace it with ], (regex off)
    ....4. Go to the end of the file and remove the comma after the ending curly brace - your entire JSON should now be fully and correctly upgraded

    And that's about it. I hope this helps!
    Working as fast as I can on Fusion 3

  10. #80
    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProUnicode Add-on

    Join Date
    Jun 2011
    Posts
    628
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    How to send double value into my extension and how to return double value from extension? There are only 4 byte float and I need return double 8 byte.

    Code:
    short ReadParameterType(const char * Text)
    {
        if(!_stricmp(Text, "Text") || !_stricmp(Text, "String"))
            return PARAM_EXPSTRING;
    
        if(!_stricmp(Text, "Filename") || !_stricmp(Text, "File"))
            return PARAM_FILENAME;
    
        if(!_stricmp(Text, "Float"))
            return PARAM_EXPRESSION;
    
        if(!_stricmp(Text, "Integer"))
            return PARAM_EXPRESSION;
    
        if(!_stricmp(Text, "Object"))
            return PARAM_OBJECT;
    
        if((!_stricmp(Text, "Color")) || !_stricmp(Text, "Colour"))
            return PARAM_COLOUR;
    
        return 0;
    }
    
    short ReadExpressionParameterType(const char * Text)
    {
        if(!_stricmp(Text, "Text") || !_stricmp(Text, "String"))
            return EXPPARAM_STRING;
    
        if(!_stricmp(Text, "Float"))
            return EXPPARAM_LONG;
    
        if(!_stricmp(Text, "Integer"))
            return EXPPARAM_LONG;
    
        return 0;
    }
    EXPPARAM_LONG and PARAM_EXPRESSION have 8 bites right? so if I need return int I need use:
    Code:
     return int (EXPPARAM_LONG);
    and when double:
    Code:
     return double (EXPPARAM_LONG);
    ???

Page 8 of 10 FirstFirst ... 6 7 8 9 10 LastLast

Similar Threads

  1. Tutorial pour SDK EDIF - extension VideoCapture
    By conceptgame in forum Extension Developers Lobby
    Replies: 17
    Last Post: 19th July 2015, 08:46 PM
  2. iOS Extension Development
    By Danny in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 8th December 2012, 11:06 AM
  3. EDIF extension doesn't work when "compress runtime" is disabled.
    By Nifflas in forum Extension Development
    Replies: 3
    Last Post: 27th February 2012, 11:14 AM
  4. Extension SDK for other development kit than VC?
    By spyfrog in forum Extension Development
    Replies: 1
    Last Post: 14th September 2007, 08:00 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
  •