home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1998 February / PCOnline_02_1998.iso / filesbbs / dos / listz21s.exe / LSZ_MAIN.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-07  |  1.8 KB  |  87 lines

  1. /*
  2.  * This file is part of Listerz v2.0 (VE)
  3.  *
  4.  * Copyright (C) 1995-1997 by Branislav L. Slantchev
  5.  * A Product of Silicon Creations, Inc.
  6.  *
  7.  * This file is distributed under the terms and conditions of the GNU
  8.  * General Public License. For more information, refer to the file
  9.  * Copying.Doc which is included in the archive.
  10. */
  11. #include "lsz_appl.h"
  12. #include "utils.h"
  13.  
  14. #ifndef PB_SDK
  15.     #include "_pbinit.h"
  16.     #include <conio.h>
  17.     #include <dos.h>
  18. #else
  19.     #include "proboard.h"
  20.     #include "pblsdk.h"
  21. #endif
  22.  
  23. Application *application;
  24.  
  25. static void
  26. ClearScreen()
  27. {
  28.     textattr(7);
  29.     for( int i = CurUser->screenLength; i > 0; --i)
  30.     {
  31.         gotoxy(1, i);
  32.         clreol();
  33.         delay(80);
  34.     }
  35. }
  36.  
  37. int
  38. main(int, char *argv[])
  39. {
  40. #ifndef PB_SDK
  41.     proboard_emulator_init();
  42. #else
  43.     // check if user has graphics emulation ON (ANSi/AVT)
  44.     if( !pb_isgfx() )
  45.     {
  46.         Log(LOG_FRIEND, "%s: %s does not have graphics capability.",
  47.             Application::s_AppName, CurUser->name);
  48.         return 1;
  49.     }
  50. #endif
  51.  
  52.     setCursorType(CURSOR_HIDDEN);
  53.     if( 0 != (application = new Application(argv[0])) )
  54.     {
  55.         application->run();
  56.         delete application;
  57.     }
  58.     setCursorType(CURSOR_NORMAL);
  59.  
  60.     // brag screen local only or high bauds
  61.     if( 0L == BaudRate || BaudRate >= 9600L )
  62.     {
  63.         char  msg[255];
  64.         char *msg2 = "returning to the board...";
  65.         char *ch   = "■";
  66.  
  67.         ClearScreen();
  68.         sprintf(msg, "Listerz made by gargoyle for %s", Config->bbsname);
  69.  
  70.         effect_fade(ch, 1, 2);
  71.         textattr(3); gotoxy(1, 2); putch(ch[0]);
  72.         effect_fade(msg, 3, 2);
  73.         textattr(3); gotoxy(3, 2); cprintf(msg);
  74.         effect_fade(ch, 1, 3);
  75.         textattr(15); gotoxy(1, 3); putch(ch[0]);
  76.         effect_fade(msg2, 3, 3);
  77.         textattr(15); gotoxy(3, 3); cprintf(msg2);
  78.         delay(1000);
  79.     }
  80.  
  81. #ifndef PB_SDK
  82.     proboard_emulator_term();
  83. #endif
  84.  
  85.     return 0;
  86. }
  87.