Results 1 to 3 of 3

Thread: BankBox in Bank.scar

  1. #1
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default BankBox in Bank.scar

    Hi,

    I don't see a bankbox in bank.scar anymore so here is my function, it also has an option to fix the bank:

    SCAR Code:
    (*************************************************************
    (Author: Cut em2 it
    (Purpose: Make a TBox of a bank index
    *************************************************************)

    function BankBox(BankIndex: integer; FixTheBank: boolean): TBox;
    begin
      if FixTheBank then FixBank;
      if BankIndex div 8 > 5 then Exit;
      Result.x1 := 79 * (BankIndex div 5);
      Result.y1 := 62 * (BankIndex div 8);
      Result.x2 := 118 * (BankIndex div 5);
      Result.y2 := 96 * (BankIndex div 8);
    end;

    Thanks,
    Cut em2 it
    Formerly known as Cut em2 it

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Hello Cut em2 it,

    SCAR Code:
    {*******************************************************************************
    Function BankIndexToMSBox(Ind: Integer): TBox;
    by: Wizzup?
    Description: Converts a BankIndex to a MainScreen TBox of the slot.
    *******************************************************************************}


    Function BankIndexToMSBox(Ind: Integer): TBox;

    Var
       P: TPoint;

    Begin
      P := BankIndexToBankPoint(Ind);
      Result.X1 := 75 + P.X * 47;
      Result.Y1 := 60 + P.Y * 38;
      Result.X2 := Result.X1 + 42;
      Result.Y2 := Result.Y1 + 36;
    End;

    Is this the function that you are referring to? I rewrote all those BankBox functions a few revisions ago... I think somewhere in SRL #11.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Ah, yes, I think that is the one. Thanks for clearing that up

    Cut em2 it
    Formerly known as Cut em2 it

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. BankBox!
    By Raskolnikov in forum Research & Development Lounge
    Replies: 6
    Last Post: 03-05-2008, 02:35 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
  •