Results 1 to 23 of 23

Thread: Show debugatpa bound within smart

  1. #1
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default Show debugatpa bound within smart

    In MSI, they show debugatpa/tpa bounds within smart instead of making a popup. How could I do that ?
    Oh Hai Dar

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    drawdotsmulti(true,atpa);

    Look for that in https://github.com/SRL/MSI/blob/mast.../Objects.simba .


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    damn, looks like hax I'll try to learn it.
    Oh Hai Dar

  4. #4
    Join Date
    Apr 2007
    Location
    Lithuania
    Posts
    384
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Look through msi code, I guess that could help.

  5. #5
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    I think the file is something like smart paint or paintsmart
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  6. #6
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Srl/SRL/misc/paintsmart.scar
    Working on: Tithe Farmer

  7. #7
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    It's actually pretty simple. Here's a test script that will help.
    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.scar}
    {$i srl/srl/misc/paintsmart.scar}

    var
      tpa: TPointArray;
      i, t: integer;
    begin
      smart_Server := 152;
      smart_Members := False;
      smart_Signed := True;
      smart_SuperDetail := False;

      setupSRL;
      clearDebug;

      SMART_SetupDebug();
      clearRSCanvas(SMART_Canvas.canvas);

      setLength(tpa, 50000);
      for i := 0 to high(tpa) do
      begin
        tpa[i].x := randomRange(0, MIX2);
        tpa[i].y := randomRange(0, MIY2);
      end;

      t := (getSystemTime + 10000);
      while (getSystemTime < t) do
        smart_DrawDots(tpa);
    end.

  8. #8
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    blabla Will help!
    Simba Code:
    setLength(tpa, 50000);
      for i := 0 to high(tpa) do
      begin
        tpa[i].x := randomRange(0, MIX2);
        tpa[i].y := randomRange(0, MIY2);
      end;

      t := (getSystemTime + 10000);
      while (getSystemTime < t) do
        smart_DrawDots(tpa);
    end.
    What the hell. You create a tpa with 50000 points. Draws them on stage and then removes them. Repeat that last step for 10 seconds.

    Seems like a solid cpu toaster, but why?
    Working on: Tithe Farmer

  9. #9
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    The removal part is quick, 50K dots is excessive lol. you'd be better to draw shapes that you could see and have less dots.

    But a TPA can be a massive number too, remember that .
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  10. #10
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    all of yall thanks a ton!:P
    Last edited by Main; 10-11-2011 at 12:58 AM.
    Oh Hai Dar

  11. #11
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    That test script is just supposed to show it working, it doesn't actually accomplish anything.

  12. #12
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    I could see it drawing some small red bits on my screen with my cwer ^^. So its working atleast:P

    But could you post a sample script on how to make it should atpa bounds?
    Oh Hai Dar

  13. #13
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Main View Post
    I could see it drawing some small red bits on my screen with my cwer ^^. So its working atleast:P

    But could you post a sample script on how to make it should atpa bounds?
    If you call SMART_DrawDots it only draws the TPA, the bounds should be easily seen, unless I'm missing something?

    Instead of calling DebugATPA, call SMART_DrawDotsMulti.

  14. #14
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    What are the variables for SMART_DrawDotsMulti? I couldn't find it on paintsmart.scar

    I also see SMART_DrawDotsEx ,but its still tpa I'll try to look for more:P
    Oh Hai Dar

  15. #15
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Oh sorry, it's just DrawDotsMulti. There's no SMART prefix.

  16. #16
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    I see the colored regions now:P Is it suppose to show labeled bounds? Or I'd have to do that my self with tbox?
    Last edited by Main; 10-11-2011 at 02:08 AM.
    Oh Hai Dar

  17. #17
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Main View Post
    I see the colored regions now:P Is it suppose to show labeled bounds? Or I'd have to do that my self with tbox?
    I'm nto sure what you mean. Do you want boxes around the TPA bounds? If so, you can do:
    Simba Code:
    for i := 0 to high(ATPA) do
      SMART_DrawBoxEx(false, getTPABounds(ATPA[i]), clGreen);

  18. #18
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    I just want something like DebugATPABounds:


    I'll try that the code you posted:P
    Last edited by Main; 10-11-2011 at 02:35 AM.
    Oh Hai Dar

  19. #19
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Oh, yeah the actual labeled boxes like that is different. As far as I know there aren't any SMART methods for that; however, I'm sure DebugATPABounds could easily be converted to work on the SMART canvas.

  20. #20
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    That'd be great if we could have that for the future, for now.. thanks for showing me the box and draw dots!... and harry too
    Last edited by Main; 10-11-2011 at 02:43 AM.
    Oh Hai Dar

  21. #21
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    SMART_DrawBoxEx(true,GetTPABounds(YourTPA),clRed);

    or

    SMART_DrawBoxEx(true,GetATPABounds(YourATPA),clRed );

    or

    for(var i := 0; i < High(YourATPA); inc(i)) do
    SMART_DrawBoxEx(true,GetTPABounds(YourATPA[i]),clRed);
    Working on: Tithe Farmer

  22. #22
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    for(var i := 0; i < High(YourATPA); inc(i)) do
    SMART_DrawBoxEx(true,GetTPABounds(YourATPA[i]),clRed);
    Unless it's new, that's not valid syntax in PS.

  23. #23
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Unless it's new, that's not valid syntax in PS.
    Your right, its pseudo code. Should be:

    Simba Code:
    for i := 0 to high(YourATPA) do
      SMART_DrawBoxEx(false,GetTPABounds(YourATPA[i]),clRed);
    Working on: Tithe Farmer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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