Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420

    * Free * : Dynamic Masking Tool v2

    Overview
    This is a Version2 tool for dynamic mixing of background masks in AMS to give the illusion of an extending 'Draw or Draws' on the side of the main program window. file size 24kb .It can be set up for multiple draws extending to many levels.
    Info on the orig version/concept can be found here: http://www.indigorose.com/forums/sho...&highlight=dmt

    This version is using Direct Memory Access to perform the pixel operations and is at least 13x faster than V1
    Using the DMT
    This is a Command Line Tool so its an .EXE file that has to have 3 bits of data passed to it to mix the masks. Note : all filenames have to be passed as 'short filenames' to avoid extra spaces in the command line.
    Syntax
    Code:
    [MainPic] [Action] [Draw]
    [MainPic] :A mask image of the program window with all the draws open
    [Action] : Either 'Add' or 'Sub' to add or remove a draw from the main Mask image
    [Draw] : A Mask image of a draw in the open position

    Example:
    Code:
    CommandLine = MainPic.." ".."Sub".." "..ADrawPicLocation;
    File.Run("AutoPlay\\Prg\\DMT.exe", CommandLine, "", SW_SHOWNORMAL, true);
    Global Functions example:
    Code:
    function OpenDraw(ADrawPicLocation)
    RunDMT (MainPic.." ".."Add".." "..ADrawPicLocation);
    Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Keys.ogg", true, false);
    return true
    end
    ----------------------------------------------------------------------------------------------------------------
    function ShutDraw(ADrawPicLocation)
    RunDMT (MainPic.." ".."Sub".." "..ADrawPicLocation);
    Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Knocker.ogg", true, false);
    return false
    end
    Download
    This prog is free for you to use in your own projects. A small note of credit would be appeciated in anything you use it for.
    Heres a quick example of how to use the DMT, its a demo prog with a few random functions in it.
    Download DMT_AMS6_Clueless.rar
    Next ill be converting this and whole bunch of other image/picture functions into a DLL file which i that I may charge a small fee for.

  2. #2
    Join Date
    Dec 2004
    Location
    Texas
    Posts
    239
    Thank you!

  3. #3
    Join Date
    Jul 2007
    Posts
    9
    nice one clueless

    big help for a newbee like me...is it possible the drawer opens a bit slower???

    Thanks!!!

  4. #4
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420
    The draw on that example has only 2 states Open or Closed its not animated. It may be possible to get some kind of animation between the two states, it would depend on the size of the mask image (may be better to use a small one and stretch it) the speed of the pixel operations and the processing time for the redrawing of the window by AMS.
    By having an instant open and close you dont have to worry about moving any objects in that draw as it opens.

    dynamic mixing of background masks in AMS to give the illusion of an extending 'Draw or Draws'

  5. #5
    Join Date
    Dec 2007
    Location
    Missouri, United States
    Posts
    476
    awesome clueless ,

    i've been needing something like this.

    great work m8

  6. #6
    Join Date
    Oct 2006
    Posts
    345
    handy looking tool, cheers

  7. #7
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420

    DMTv3 * Final *

    Thanks for the support guys

    Heres the final version of the DMT with some optional optimization.
    Filesize : 112kb

    Standard Drawing Mode-(v2 method) The DMT scans every pixel of the 'draw' image and add's or subbtracts the picture to the main mask.

    Optimized Drawing mode -You can 'pre-calculate' the area of the draw image so that only the horizontal lines of pixels that contain white get scanned to the main mask image. This can be up to 3 times faster to process than the old method.

    PreCalc Tool-Because of the way bitmaps are stored for fast direct memory access it takes a certain amount of calculation based on the width of the pic x (the bytes per pixel and the spacers in between each pixel) etc..to get the two numbers needed (startPixel,EndPixel) to make the optimization work. So to make this less stressful ive added a function to the DMT to do the maths for you . You dont have to run this every time you want to open the draws you just run it one time for each draw you have to find the magic numbers and then use them in your code -

    StartPixel,EndPixel-Doubble click the DMT in windows(no commandline) to open up the 'Pre-Calc' tool then select a 'draw' (you will have to do this once for each draw, but not the main mask) image and the program will give you the start and end pixel numbers needed to speed the drawing process up.

    CommandLine Syntax
    So the DMT is multi-functional now it can be used 3 ways ;-

    Standard Drawing Mode:- [ImgMain] [Method] [imgDraw]

    Optimized Drawing mode:- [ImgMain] [Method] [imgDraw] [startpixel] [EndPixel]

    DMT PreCalc Tool:
    - Just doubble click DMT.exe in windows.
    - Select Draw
    - add the numbers to the end of the commandline.

    Note: all filanames have to be 'short filenames' to avoid extra spaces in the commandline

    Example changes to the existing open and close functions to get the optimisation to work;
    Code:
    function OpenDraw(ADrawPicLocation,StartP,EndP)
    local cLine = "";
    cLine = MainPic.." ".."Add".." "..ADrawPicLocation;
    if StartP and EndP then
       cLine = cLine.." "..StartP.." "..EndP 
       end
    RunDMT (cLine);
    Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Keys.ogg", true, false);
    return true
    end
    ----------------------------------------------------------------------------------------------------------------
    function ShutDraw(ADrawPicLocation,StartP,EndP)
    local cLine = "";
    cLine = MainPic.." ".."Sub".." "..ADrawPicLocation;
    if StartP and EndP then
       cLine = cLine.." "..StartP.." "..EndP 
       end
    RunDMT (cLine);
    Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Knocker.ogg", true, false);
    return false
    end
    ----------------------------------------------------------------------------------------------------------------
    function ShutAll()
    if bDraw1Open == true then
       bDraw1Open = ShutDraw(Draw1,282633,844985);
       end
    
    if bDraw2Open == true then
       bDraw2Open = ShutDraw(Draw2,1084549,1459129);
       end
    
    if bDraw3Open == true then
       bDraw3Open = ShutDraw(Draw3,285513,847869);
       end
    end
    Attached Files
    Last edited by clueless; 02-23-2008 at 09:41 PM.

  8. #8
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Mirroed on amsuser.com:

    http://www.amsuser.com/ams/examples/...7-clueless.rar

    Thanks clueless.
    Intrigued

  9. #9
    Join Date
    Jul 2007
    Posts
    1,512
    Also i have added you to my new mirror service


    Link:
    http://jonny6.pap3rback.net/AMS/?page=clueless

    Hope you like.

  10. #10
    Join Date
    Jun 2006
    Location
    UK SouthWest
    Posts
    420
    Looking good

  11. #11
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by clueless View Post
    Looking good
    thanks

    i know people have done alot more then i have set in the mirror portfolios
    but i test everything make sure it works and then i screen shot it and then
    upload it its slower then lets say razershare but its aimed to only AMS members
    projects so this way it keeps things cleaner.

Similar Threads

  1. Best way to share custom buttons with the group?
    By mwreyf1 in forum AutoPlay Media Studio 6.0
    Replies: 10
    Last Post: 04-28-2010, 01:29 PM
  2. Example: Free tool : Dynamic Masking Tool
    By clueless in forum AutoPlay Media Studio 7.5 Examples
    Replies: 2
    Last Post: 04-25-2010, 07:37 AM
  3. * Free * : Dynamic Masking Tool (DMT V2)
    By clueless in forum AutoPlay Media Studio 7.5
    Replies: 8
    Last Post: 02-24-2008, 10:30 PM
  4. ANSI To UNICODE Is Finished!
    By coderanger in forum AutoPlay Media Studio 6.0
    Replies: 7
    Last Post: 08-13-2007, 09:27 AM

Posting Permissions

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