home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / r / robo10.zip / ROBOMAIN.EXE / ROBOTECH.DOC < prev    next >
Text File  |  1992-10-26  |  21KB  |  478 lines

  1. {  
  2. ──────────────────────────────────────────────────────────────────────────
  3.  ROBO-BOARD DATA FILE STRUCTURES - BY SETH HAMILTON       AUGUST 19, 1992
  4. ──────────────────────────────────────────────────────────────────────────
  5.  
  6.   Robo-Board 1.05 was  written in TURBO PASCAL 6.0,  therefor all of the
  7.   following header formats are in PASCAL format. A bit of information to
  8.   help 'C' or BASIC programmers is offered at the end of this text. 
  9.  
  10.   This code was written by  Seth Hamilton but is free for use by all who
  11.   wish to use  it for  the purpose  of creating  Robo-Board Utilities or
  12.   doors.
  13.  
  14.   Note: Hudson message base headers are not included in this text.  Most
  15.     Hudson information was aquired by myself through the  use of  my
  16.     HEX  editor and  the Front Door message editor.  Additional info
  17.     was  uploaded to me  by my users when  I displayed interest in a
  18.     new message  base format.  If I can  contact Mr. Hudson  and get
  19.     permission to use his file formats in this text, I will do so.
  20.  
  21. ──────────────────────────────────────────────────────────────────────────
  22.  
  23. }
  24.  
  25.  
  26. }
  27. ──────────────────────────────────────────────────────────────────────────
  28.  ROBOCFG RECORD
  29. ──────────────────────────────────────────────────────────────────────────
  30.  
  31.  This record type is used by ROBOCFG.EXE, the file ROBOBBS.CFG contains
  32.  one record made up the information below.
  33. }
  34. Type
  35.    RBOCFG = RECORD
  36.     CFG_BBSPATH      : string[45];  
  37.        {Path To the Robo-Board Bbs files}           
  38.     CFG_MSGPATH      : string[45];  
  39.        {Path to the Hudson message base files and LASTREAD.BBS}
  40.     CFG_PRTPATH      : string[45];
  41.        {Path to external protocols used by Robo-Board for terminal transfer}
  42.     CFG_GRFPATH      : string[45];
  43.        {Path to the grpahics and menu files used by Robo-Board}
  44.  
  45. {The following few records are in array format. Each record in an array
  46.  represents a node number}
  47.     CFG_BAUD         : array[1..9] of WORD;       {Modem MAX baud rate}
  48.     CFG_COM          : array[1..9] of BYTE;       {Modem Com port}
  49.     CFG_INIT         : array[1..9] of STRING[60]; {Modem configuration string}
  50.     CFG_ANSWER       : array[1..9] of STRING[10]; {Modem answer string}
  51.     Cfg_busy         : array[1..9] of String[10]; {String to make modem busy}
  52.     CFG_LOCKAT       : array[1..9] of WORD;       {Modem baud locked at}
  53.     CFG_allow1200    : array[1..9] of boolean;    {Allow 1200 toggle}
  54.     CFG_allow2400    : array[1..9] of boolean;    {Allow 2400 toggle}
  55.     CFG_ModemBreak   : array[1..9] of boolean;    {Send break to clear}
  56.     CFG_Busylocal    : boolean;                   {modem busy on local logon}
  57.     CFG_EVENT1       : shortint;                  {1 byte int for event hour}
  58.     CFG_EVENT2       : shortint;                  {1 byte int for event hour}
  59.     CFG_EVENT3       : shortint;                  {1 byte int for event hour}
  60.     CFG_EVENT4       : shortint;                  {1 byte int for event hour}
  61.     CFG_SYSOPNAME    : STRING[40];                {Sysops name}
  62.     CFG_BBSNAME      : STRING[40];                {Bbs's name}
  63.     CFG_NEWACCESS    : byte;                      {new user access/call back}
  64.     CFG_DEFAULTTIME  : WORD;                      {if access.def found}
  65.     CFG_NOTEMESSAGE  : STRING;                    {Displayed by SysOp}
  66.     CFG_RATIOUP      : BYTE;                      {if access.def found}
  67.     CFG_RATIODOWN    : BYTE;                      {if access.def found}
  68.     CFG_UPCREDIT     : STRING[5];                 {if access.def found}
  69.     CFG_TIMEOUT      : WORD;                      {Keyboard Timeout (seconds)}
  70.     CFG_PAGEFROM     : BYTE;                      {Page from hour (24hrs)}
  71.     CFG_PAGETO       : BYTE;                      {Page to hour (24hrs)}
  72.     CFG_DLSTARTTIME  : byte;                      {DL start hour (24hrs)}
  73.     CFG_DLENDTIME    : byte;                      {DL end hour (24hrs)}
  74.     CFG_ULSTARTTIME  : byte;                      {UL start hour (24hrs)}
  75.     CFG_ULENDTIME    : byte;                      {UL end hour (24hrs)}
  76.     CFG_MINSPEED     : word;                      {min baud for file transfers}
  77.     CFG_MINSPEEDEGA  : word;                      { RESERVED }
  78.     CFG_MINSPEEDMONO : word;                      { RESERVED }
  79.     CFG_MINSPEEDANSI : word;                      { RESERVED }
  80.     CFG_SCANBATCH    : string[12];                {Virus scan batch name}
  81.     CFG_SCANEGA      : boolean;                   {T=EGA F=ANSI on users end}
  82.     RESERVED1,
  83.     RESERVED2        : byte;                      { RESERVED }
  84.     CFG_Echomailfile : boolean;                   {make scan file}
  85.     CFG_Showoffline  : boolean;                   {Show offline files}
  86.     CFG_HDlimit      : longint;                   {Min HD space for uploads}
  87.     CFG_PHONEPLATE   : STRING[15];                {phone number template}
  88.     CFG_EGAVGAMINACC : BYTE;                      { RESERVED }
  89.     CFG_Pagecomment  : byte;                      {Comment message base}
  90.     CFG_Maxpages     : byte;                      {maxpages a user can make}
  91.     CFG_newmailcheck : boolean;                   {New mail check at logon}
  92.     CFG_REGISTERED   : STRING[50];                {Registration code}
  93.     CFG_AskBirthdate : boolean;                   {Ask of birthdate}
  94.     CFG_AskHandle    : boolean;                   {Ask for handle}
  95.     CFG_AskPhone1    : boolean;                   {Ask home phone}
  96.     CFG_TimeBANKmax  : word;                      {time bank max (9999)}
  97.     CFG_Termname     : string[12];                {current terminal name}
  98.  
  99. {CFG MULTI NODE}
  100.     CFG_numofnodes   : byte;                      {9 max}
  101.  
  102. {CALL BACK VERIFY}
  103. {+} CFG_usecallback  : boolean;                   {Is call back active}
  104. {+} CFG_CALLACCESS   : BYTE;                      {access after call back}
  105. {+} CFG_AREACODE     : array [1..3] of string[3]; {3 area codes for call back}
  106. {+} CFG_CALLEXPACC   : byte;                      {access when user expires}
  107. {+} CFG_CALLEXPIRY   : word;                      {user expiry in Days}
  108. {+} CFG_CALLBACKDIAL : STRING[10];                {dial codes for modem}
  109. {+} CFG_verifyflags  : ARRAY[1..8] of boolean;    {flags after verify}
  110.  
  111. {STATS}
  112.     CFG_EVENT1_DONE,                              {is event 1 done}
  113.     CFG_EVENT2_DONE,                              {is event 2 done}
  114.     CFG_EVENT3_DONE,                              {is event 3 done}
  115.     CFG_EVENT4_DONE  : Boolean;                   {is event 4 done}
  116.     CFG_CALLSTODAY   : WORD;                      {number of calls today}
  117.     CFG_CALLSTOTAL   : WORD;                      {number of calls total}
  118.     CFG_LASTCALLER   : STRING[25];                {name of last caller}
  119.     CFG_BOGUSDAY     : byte;                      {Day of month - for events}
  120.     RESERVED4        : STRING[14];                { RESERVED }
  121.     CFG_OriginLine   : String[60];                {default message origin}
  122.  
  123. {MAIL}
  124.     CFG_Addresses    : Array[1..10] of string[15];
  125.     CFG_EXPANSION    : ARRAY[1..1024] of byte;    { RESEVED FOR EXPANSION }
  126.    end;
  127.  
  128. {
  129. ──────────────────────────────────────────────────────────────────────────
  130.  FILE AND MESSAGE BASES
  131. ──────────────────────────────────────────────────────────────────────────
  132.  
  133.  The following two record types are used in the files MSGAREA.DEF and
  134.  FILEAREA.DEF. Robo-Board supports 200 message and file areas. But in
  135.  actuality 201 records exist in each file. This is because Robo-Board
  136.  reserves the first record in each file for future header information
  137.  or just incase I need it. So don't write in it.  I  will tell you if
  138.  I ever do use it.
  139. }
  140.  
  141. MBaserecord  = record
  142.      Name           : String[40];
  143.      Attribute      : Byte;
  144.  
  145.       {LOCAL PRI/PUB  = 0    I will likely change the
  146.        LOCAL PUBLIC   = 1    way this works.
  147.        ECHO MAIL      = 2
  148.        LOCAL HANDLES  = 3
  149.        ECHO HANDLES   = 4}
  150.  
  151.      MaxMessages    : Word; {Max messages, used by ROBOUTIL}
  152.      ReadSecurity   : Word;
  153.      WriteSecurity  : Word;
  154.      RACCESSTYPE    : byte; { 1 is >=   2 is <=   3 is = }
  155.      WACCESSTYPE    : byte; { 1 is >=   2 is <=   3 is = }
  156.      SysopAccess    : Word; {assumed 255, never used}
  157.      OriginLine     : String[60];
  158.      MenuOnly       : String[12];
  159.      NETADDRESS     : string[15];
  160.      msgflags       : array[1..8] of boolean;
  161.      Freespace      : array[1..110] of byte;
  162.    end;
  163.  
  164. FBaserecord  = record
  165.      Name           : String[40];
  166.      Reserved1      : Byte; { RESERVED}
  167.      CDROMFILENUM   : Byte;
  168.      KILLOLDERTHAN  : Byte; {Will be used by ROBOUTIL}
  169.      ACCESSTYPE     : byte; { 1 is >=   2 is <=   3 is = }
  170.      Security       : Word; {Max 255, future in mind}
  171.      SysopSecurity  : Word; {assumed 255, never used}
  172.      Path           : String[60];
  173.      MenuOnly       : String[12];
  174.      fileflags      : array[1..8] of boolean;
  175.      expansion      : array[1..120] of byte;
  176.    end;
  177. {
  178. ──────────────────────────────────────────────────────────────────────────
  179.  NODE INFO
  180. ──────────────────────────────────────────────────────────────────────────
  181.  
  182.  This file contains 9 records in the shareware/plus version, in the
  183.  professional version it contains 20 records. At the moment, ROBO-BOARDS
  184.  chat follows a see it as you type it style profile, but, this file could
  185.  be used easily (because of its 80 byte text buffer) for typical one line
  186.  at a time chat. If and when I ever support the line by line chat, ROBO-
  187.  BOARD could support from 50-100 or perhaps more lines of chat.
  188.  
  189.  This file is NOT locked, (don't lock it) I have not found any reason for
  190.  it to be locked, nothing is removed from it, nothing is inserted into it,
  191.  and it is not moved while robo-board is running. Simply, 9 or 20 records
  192.  are read and one is updated by each node.
  193.  
  194. }
  195.   NINFOrecord  = record
  196.              NODE_UserPtr   : word; {Offset in user files to userrec}
  197.              NODE_Activity  : byte; 
  198.    {
  199.     NODE_ACTIVITY
  200.       0 : chat_temp := 'Idle';
  201.       1 : chat_temp := 'Logging On';
  202.       2 : chat_temp := 'Uploading File';
  203.       3 : chat_temp := 'Downloading File(s)';
  204.       4 : chat_temp := 'Entering Messages';
  205.       5 : chat_temp := 'Reading Messages';
  206.       6 : chat_temp := 'Scanning New Files';
  207.       7 : chat_temp := 'Listing Files';
  208.       8 : chat_temp := 'Viewing Files';
  209.       9 : chat_temp := 'Reading Text File';
  210.      10 : chat_temp := 'Viewing Graphics File';
  211.      11 : chat_temp := 'Downloading File(s)!';
  212.      12 : chat_temp := 'Settings Menu';
  213.      13 : chat_temp := 'Call Back Verify';
  214.      14 : chat_temp := 'Hangin Up';
  215.      15 : chat_temp := 'Nodel Chat (DIFFERENT FORUM)';
  216.      16 : chat_temp := 'Paging SysOp';
  217.      17 : chat_temp := 'Dos Program (ANSI/ASCII)';
  218.      18 : chat_temp := 'Dos Program (EGA/VGA)';
  219.      19 : chat_temp := 'Node Chat';
  220.      20 : chat_temp := 'Scanning New Mail';
  221.      21 : chat_temp := 'At Menu';
  222.      22 : chat_temp := 'Using Time Bank';
  223.    }
  224.              NODE_UserText  : Array [1..80] of Char; {Chat text}
  225.              NODE_TxtPtr    : byte;                  {Offset in text}
  226.              NODE_Forum     : byte;                  { RESERVED }
  227.              NODE_Paged     : byte;                  {node num paged by}
  228.              Expansion      : Array [1..16] Of Byte;
  229.            end;
  230.  
  231. {
  232. ──────────────────────────────────────────────────────────────────────────
  233.  THE USER FILES
  234. ──────────────────────────────────────────────────────────────────────────
  235.  
  236.  The record UD1 contains just the users name for fast access while searching
  237.  the user base at logon. If you have 400 users this method is appreciated.
  238.  
  239.  UD2 contains the rest of the user information. The records in ROBOUSR1.DAT,
  240.  ROBUSER2.DAT and LASTREAD.BBS all share the same record number. So 
  241.  removeing a user from one file it is important to do so to the other files.
  242.  The same goes for inserting or re-ordering the user base. The Hudson
  243.  LASTREAD.BBS file also corresponds record wise with these files.
  244.  
  245.  NOTE: The first records in the files are left empty (or rather garbled),
  246.        these records cannot be seen with ROBOUSER. Mainly, all garbage
  247.        caused by users dropping carrier before logon and stuff like that
  248.        is placed in these records.
  249. }
  250.  
  251.   UD1            = RECORD
  252.              NAME      : STRING[36];
  253.              HANDLE    : STRING[36];
  254.            END;
  255.  
  256.   UD2            = RECORD
  257.              PASS      : STRING[36];
  258.              PHONE1    : STRING[15]; {home}
  259.              PHONE2    : STRING[15]; {data}
  260.              CITY      : STRING[15];
  261.              LYEAR     : word;       {Last year called}
  262.              LMONTH    : word;       {Last month called}
  263.              LDAY      : word;       {Last day called}
  264.              LHOUR     : byte;       {Last hour called}
  265.              CALLS     : word;
  266.              TIMEL     : longint;    {Time left in minutes}
  267.              access    : BYTE;
  268.              BANK      : word;       {minutes in bank}
  269.              BIRTHDATE : STRING[8];  {MM/DD/YY}
  270.              UPLOADS,
  271.              DOWNLOADS : word;
  272.              Lastscan  : word;       {last scanned: kept but not used}
  273.              basestat  : Array[1..200] of boolean; {toggle status of
  274.                                 message bases}
  275.              userflags : Array[1..8] of boolean;
  276.              expiry    : longint;    {expiry in YYMMDD}
  277.              exp_access: byte;       {access after expiry}
  278.     {attributes}
  279.              non_delete: boolean;    
  280.              over_ride : boolean;
  281.              read_all  : boolean;
  282.              read_kill : boolean;
  283.              no_expire : boolean;
  284.              no_ratio  : boolean;
  285.              no_page   : boolean;
  286.              no_tlimit : boolean;
  287.              speedtime : boolean;
  288.              usersound : boolean;
  289.              mailcheck : boolean;
  290.              expansion : array[1..231] of byte;
  291.        END;
  292.  
  293.  
  294.    LastReadRec = array[1..200] of Word; {Used by Hudson for the last read}
  295.                     {pointers of the 200 message bases} 
  296.  
  297. {
  298. ──────────────────────────────────────────────────────────────────────────
  299.  DRAWING RECORDS
  300. ──────────────────────────────────────────────────────────────────────────
  301.  
  302.  The following is the Drawing record format found in .RBO files. 
  303.  There may be as many of these records as are needed within a file.
  304.  _Command may be one of the following:
  305.  
  306.  (assuming with)
  307. CASE _COMMAND OF
  308.   1,2 : line;                   From X1,Y1 to X2,Y2
  309.   3 : rectangle;                From X1,Y1 to X2,Y2
  310.   4 : fill_rectangle;           From X1,Y1 to X2,Y2
  311.   5 : ellipse;                  Center=X1,Y1  radius= X2,Y2
  312.   6 : fill_ellipse;             Center=X1,Y1  radius= X2,Y2
  313.   7 : BEGIN
  314.     case X2 of              X2 = font number in this case 
  315.       1 : setfont_font09;
  316.       2 : setfont_FONT14;
  317.       3 : setfont_COUNTDWN;
  318.       4 : setfont_FUTURE;
  319.       5 : setfont_FONTPC9;
  320.       6 : setfont_BROADWAY;
  321.      end;
  322.     text_write;
  323.        END;
  324.    8 : BEGIN
  325.     fstr := _iconfile;      icon library file name 
  326.     loadsprite;             loadsprite will not load if already loaded
  327.     sprite := x2;           sprite or icon index = X2 variable
  328.     showsprite;
  329.        END;
  330.    9 : r_paint;              fill at X1,Y1 in FC (forground colour) 
  331.                  to BC (border colour) 
  332.   10 : ;                     * RESERVED *
  333.   11,12 : Button;            draw button, offset controls white, gray etc
  334.   13 : Plain_window;         Draw window to fit X1,Y1,X2,Y2 with
  335.                  FC (forground colour) interior and
  336.                  BC (border colour) border
  337.                  Corner sprites defaulted to ROBO1_02.LIB's
  338.                  "!" icon.
  339.   15 : r_arc;     90 degree arcs. X1,Y1 is center of ellipse section
  340.           X2 and Y2 are radius
  341.   20 : cleargrph  This clears the screen, used by ROBODRAW when asking if
  342.           you want to clear the screen. On load by ROBODRAW this
  343.           record is skipped and must be added (to record #0) at save.
  344.  
  345.   Here is a hint on calculating box arcs....
  346.  
  347. ──────────────────────────────────
  348.   tII := abs(x1-x2); tIII := abs(y1-y2);
  349.  
  350.   if (x1 - x2 < 0) and (y1 - y2 > 0) then
  351.     begin
  352.      angle1 := 0;
  353.      angle2 := 90;
  354.     end;
  355.   if (x1 - x2 > 0) and (y1 - y2 < 0) then
  356.     begin
  357.      angle1 := 180;
  358.      angle2 := 270;
  359.     end;
  360.   if (x1 - x2 < 0) and (y1 - y2 < 0) then
  361.     begin
  362.      angle1 := 270;
  363.      angle2 := 360;
  364.     end;
  365.   if (x1 - x2 > 0) and (y1 - y2 > 0) then
  366.     begin
  367.      angle1 := 90;
  368.      angle2 := 180;
  369.     end;
  370.   Ellipse(X1, Y1, Angle1, Angle2, tii , tiii );
  371. ──────────────────────────────────
  372.  
  373.  end;
  374.  
  375.  NOTE: ROBO-BOARD  technical information can be requested for a full RBO100
  376.        Graphical Telecommunications Protocol breakdown. Also Source code in
  377.        TURBO PASCAL 6.0  can  be requested for  a RBO100  toolkit. Refer to
  378.        the  section  in  the  Robo-Board manual  titled  SUPPORT  for  more
  379.        information about requesting information or toolkits. 
  380.  
  381. }
  382.  
  383.  dr = record
  384.  
  385.    _x1, _y1, _x2, _y2  : integer;
  386.    _fc, _bc, _stroff,
  387.    _command, _offset   : byte;
  388.    _iconfile           : string[12];
  389.    _Flags              : array[1..8] of boolean; { Not used, to dangerous }
  390.    _Access             : byte;
  391.    _SecType            : byte; { 1 is >=   2 is <=   3 is = }
  392.   end;
  393.  
  394. {
  395. ──────────────────────────────────────────────────────────────────────────
  396.  MENU COMMANDS
  397. ──────────────────────────────────────────────────────────────────────────
  398.  
  399.  There may be a maximum of 50 records like the one listed below in a
  400.  .MNU file. For a .MNU file to be used in ROBO-BOARD a .RBO file with
  401.  the same name prefix must exist in the directory. ROBO-BOARD expects
  402.  (rather it needs) this file to be 50 records big, Robo-Board BLOCKREADs
  403.  this file into a large array.
  404.  
  405.  The first record in this file is reserved for future header information.
  406.  Therefor start reading at record 1, not record 0.
  407. }
  408.  mr = record
  409.   {Convenient 128 byte record }
  410.    m_x1, m_y1, m_x2, m_y2  : integer;               {Hot Spot rectangle Coords}
  411.    m_command               : byte;                  {Command number}
  412.    m_key                   : char;                  {Hot key for hot spot}
  413.    m_textdata1             : string[35];            {Used for command data}
  414.    m_textdata2             : string[35];            {Used for command data}
  415.    m_commandtogs           : array[1..10] of word;  {NOT USED YET, MAYBE L8R}
  416.    m_Flags                 : array[1..8] of boolean;
  417.    m_Access                : byte;
  418.    m_SecType               : byte;                  { 1 is >=   2 is <=   3 is = }
  419.    m_freespace             : array[1..16] of byte;  {Expansion}
  420.   end;
  421.  
  422.  
  423. {
  424. ──────────────────────────────────────────────────────────────────────────
  425.  ICON RECORDS
  426. ──────────────────────────────────────────────────────────────────────────
  427.  
  428.  Icon records are split into 900byte segments. Each byte represents
  429.  a pixel on a 30x30 grid. Because the icon record approaches the 65k
  430.  mark, it is often required that this be a pointer type variable. An
  431.  icon can be displayed easily (BUT SLOWLY) with a simple routine like:
  432.  
  433.       for I := 1 to 30 do
  434.     for II := 1 to 30 do
  435.      if p^.pic1[sprite,((I-1)*30)+II ] <> 16 then
  436.         putpixel(X + I, 
  437.              Y + II, 
  438.              p^.spriterec[ sprite, ((I-1)*30)+II ] );
  439.  
  440.  NOTE: Colour 16 is transparent, so just skip by a colour 16 if one
  441.        is found. Colours range from 0-15 normaly. Also note that the 1st
  442.        record (index 0) is reserved for future header information.
  443.  
  444.  When reading in icon files, you can do so by reading them with a BLOCKREAD
  445.  this is LOTS faster than reading them in record by record or byte by byte.
  446.  Icon files start at record 1, record 0 is 900 bytes big, but has been
  447.  reserved for future header information.
  448. }
  449.  
  450. record_t = RECORD
  451.        spriterec : array [1..65, 1..900] of byte;
  452.       END;
  453.  
  454. {
  455.  NOTE: For those of you who wish  to write utilities in 'C' or BASIC and 
  456.        don't have a solid understanding of the pascal string format here 
  457.        it is simply.
  458.  
  459.        Where ever it  says  STRING[nn] the  actual size  of  that entity
  460.        is nn + 1. A Pascal  string is  not null terminated,  it contains
  461.        a length in its first byte. So a  STRING[5]  looks like this:
  462.  
  463.         #ccccc   WHERE: c=character #=length of text in string.
  464.  
  465.         eg: 04h+'TEST'+01h+50h+E1h...(more random chars)
  466.  
  467.        The characters after the length  of the  text  inside  the string 
  468.        entity are  unpredictable. Pascal  does not  clean  its memory at
  469.        load  time such as basic would  leaving its variables filled with
  470.        random garbage. With out any way to signify an end of string, you
  471.        will probably be forced to write a string handler so you may both 
  472.        read and write in the Pascal format.
  473. }
  474.       
  475.  
  476.  
  477. end.
  478.