123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- #define BUILDING_OPENDOORS
- #include <string.h>
- #include <ctype.h>
- #include <stddef.h>
- #include <time.h>
- #include <stdio.h>
- #include "OpenDoor.h"
- #include "ODGen.h"
- #include "ODScrn.h"
- #include "ODCore.h"
- #include "ODStat.h"
- #include "ODKrnl.h"
- ODAPIDEF void ODCALL pdef_wildcat(BYTE btOperation)
- {
- BYTE btInfoType = od_control.od_info_type;
- switch(btOperation)
- {
- case PEROP_DISPLAY1:
- ODScrnSetAttribute(0x70);
- ODScrnSetCursorPos(1,24);
- ODScrnDisplayString(" Baud: ");
- ODScrnSetCursorPos(1,25);
- ODScrnDisplayString("Phone: Sec: Time Left: ");
- ODScrnPutText(80, 25, 80, 25, abtGreyBlock);
- ODScrnSetAttribute(0x71);
- ODScrnSetCursorPos(1,24);
- sprintf(szStatusText, "(%s), ", od_control.user_name,
- od_control.user_location);
- ODScrnPrintf("%34.34s", szStatusText);
- ODScrnSetCursorPos(43, 24);
- ODScrnPrintf("%lu", od_control.od_connect_speed);
- ODScrnSetCursorPos(8,25);
- if(od_control.od_extended_info || btInfoType==SFDOORSDAT || btInfoType==DOORSYS_GAP || btInfoType==DOORSYS_WILDCAT)
- {
- ODScrnDisplayString(od_control.user_homephone);
- }
- if(btInfoType==RA1EXITINFO || btInfoType==RA2EXITINFO || btInfoType==DOORSYS_WILDCAT)
- {
- char szUserAge[7];
- ODScrnSetCursorPos(28,25);
- ODScrnSetAttribute(0x70);
- ODScrnDisplayString("Age: ");
- ODScrnSetAttribute(0x71);
- ODStatGetUserAge(szUserAge);
- ODScrnDisplayString(szUserAge);
- }
- ODScrnSetCursorPos(43,25);
- ODScrnPrintf("%u",od_control.user_security);
- if(btInfoType==RA1EXITINFO || btInfoType==RA2EXITINFO || btInfoType==DOORSYS_WILDCAT)
- {
- if(strlen(od_control.user_firstcall)==8)
- {
- ODScrnSetCursorPos(49,25);
- ODScrnSetAttribute(0x70);
- ODScrnDisplayString("Since: ");
- ODScrnSetAttribute(0x71);
- ODScrnDisplayChar(od_control.user_firstcall[0]);
- ODScrnDisplayChar(od_control.user_firstcall[1]);
- ODScrnDisplayChar('/');
- ODScrnDisplayChar(od_control.user_firstcall[6]);
- ODScrnDisplayChar(od_control.user_firstcall[7]);
- }
- }
- case PEROP_UPDATE1:
- ODScrnSetAttribute(0x71);
- ODScrnSetCursorPos(74,25);
- if(od_control.user_timelimit<=9)
- {
- ODScrnPrintf(" %d",od_control.user_timelimit);
- }
- else if(od_control.user_timelimit<=99)
- {
- ODScrnPrintf(" %d",od_control.user_timelimit);
- }
- else if(od_control.user_timelimit<=999)
- {
- ODScrnPrintf(" %d",od_control.user_timelimit);
- }
- else
- {
- ODScrnPrintf("%d",od_control.user_timelimit);
- }
- ODScrnSetAttribute(0x70);
- ODScrnSetCursorPos(56,24);
- if(od_control.od_okaytopage==TRUE)
- ODScrnDisplayString("Page Bell ");
- else
- ODScrnDisplayString(" ");
- if(od_control.od_user_keyboard_on)
- ODScrnDisplayString("Kybd ");
- else
- ODScrnDisplayString(" ");
- if(od_control.sysop_next)
- ODScrnDisplayString("Local-Next");
- else
- ODScrnDisplayString(" ");
- break;
- case PEROP_INITIALIZE:
- od_control.key_hangup=0x0000;
- od_control.key_drop2bbs=0x4400;
- od_control.key_dosshell=0x2000;
- od_control.key_chat=0x4100;
- od_control.key_sysopnext=0x3b00;
- od_control.key_lockout=0x8100;
- od_control.key_status[0]=0x0000;
- od_control.key_status[1]=0x0000;
- od_control.key_status[2]=0x0000;
- od_control.key_status[3]=0x0000;
- od_control.key_status[4]=0x0000;
- od_control.key_status[5]=0x0000;
- od_control.key_status[6]=0x0000;
- od_control.key_status[7]=0x0000;
- od_control.key_status[8]=0x0000;
- od_control.key_keyboardoff=0x2500;
- od_control.key_moretime=0x0000;
- od_control.key_lesstime=0x0000;
- od_control.od_page_statusline=-1;
- ODStatAddKey(0x4200);
- ODStatAddKey(0x4800);
- ODStatAddKey(0x5000);
- ODStatAddKey(0x7800);
- ODStatAddKey(0x7900);
- ODStatAddKey(0x7a00);
- ODStatAddKey(0x7b00);
- ODStatAddKey(0x7c00);
- ODStatAddKey(0x7d00);
- ODStatAddKey(0x7e00);
- ODStatAddKey(0x7f00);
- ODStatAddKey(0x8000);
- ODStatAddKey(0x3f00);
- ODStatAddKey(0x3e00);
- break;
- case PEROP_CUSTOMKEY:
- switch((WORD)od_control.od_last_hot)
- {
- case 0x4200:
- od_control.od_chat_active = FALSE;
- break;
- case 0x4800:
- if(od_control.user_timelimit <= 1435)
- {
- od_control.user_timelimit += 5;
- bForceStatusUpdate = TRUE;
- CALL_KERNEL_IF_NEEDED();
- }
- break;
- case 0x5000:
- od_control.user_timelimit -= 5;
- bForceStatusUpdate = TRUE;
- CALL_KERNEL_IF_NEEDED();
- break;
- case 0x7800:
- case 0x7900:
- case 0x7a00:
- case 0x7b00:
- case 0x7c00:
- case 0x7d00:
- case 0x7e00:
- case 0x7f00:
- case 0x8000:
- od_exit(2,TRUE);
- break;
- case 0x3f00:
- case 0x3e00:
- if(od_control.od_okaytopage!=TRUE)
- {
- od_control.od_okaytopage=TRUE;
- }
- else
- {
- od_control.od_okaytopage=FALSE;
- }
- bForceStatusUpdate = TRUE;
- CALL_KERNEL_IF_NEEDED();
- break;
- default:
- return;
- }
- od_control.od_last_hot=0;
- break;
- case PEROP_DEINITIALIZE:
- ODStatRemoveKey(0x4200);
- ODStatRemoveKey(0x4800);
- ODStatRemoveKey(0x5000);
- ODStatRemoveKey(0x7800);
- ODStatRemoveKey(0x7900);
- ODStatRemoveKey(0x7a00);
- ODStatRemoveKey(0x7b00);
- ODStatRemoveKey(0x7c00);
- ODStatRemoveKey(0x7d00);
- ODStatRemoveKey(0x7e00);
- ODStatRemoveKey(0x7f00);
- ODStatRemoveKey(0x8000);
- ODStatRemoveKey(0x3e00);
- ODStatRemoveKey(0x3f00);
- break;
- }
- }
|