├── LICENSE ├── README.md ├── mbmgecvt ├── MBMGECVT.C ├── MBMGECVT.H ├── MBMGECVT.HP └── MBMGECVT.LNK ├── mbmgemap ├── GECLEAN.BAT ├── MBMGEMAP.C ├── MBMGEMAP.DOC ├── MBMGEMAP.H ├── MBMGEMAP.HP ├── MBMGEMAP.LNK └── README.NOW ├── mbmgemp ├── GE │ ├── DOCS │ │ ├── GE30.AD │ │ ├── GEINST.DOC │ │ ├── GEREADME.DOC │ │ ├── GESYSOP.DOC │ │ ├── GETERM.DOC │ │ ├── MBMGEMP.DOC │ │ └── ORDER.FRM │ ├── GETITLE.DOC │ ├── INSTALL │ │ ├── INSTALL.BAT │ │ ├── MAKEDISK.BAT │ │ └── UPDATE.BAT │ ├── MSG │ │ ├── MBMGEHLP.MSG │ │ ├── MBMGEMSG.MSG │ │ └── MBMGESHP.MSG │ ├── REL │ │ ├── GEINST.DOC │ │ ├── GEREADME.DOC │ │ ├── MAKEREL.BAT │ │ ├── MBMGEHLP.MSG │ │ ├── MBMGEMAL.DAT │ │ ├── MBMGEMAL.NEW │ │ ├── MBMGEMNU.TXT │ │ ├── MBMGEMP.DOC │ │ ├── MBMGEMP.MDF │ │ ├── MBMGEMSG.MSG │ │ ├── MBMGEPLT.DAT │ │ ├── MBMGEPLT.NEW │ │ ├── MBMGESHP.DAT │ │ ├── MBMGESHP.MSG │ │ ├── MBMGESHP.NEW │ │ ├── MBMGETEA.DAT │ │ ├── MBMGETEA.NEW │ │ ├── MBMGEUSR.DAT │ │ └── MBMGEUSR.NEW │ ├── REL2 │ │ ├── MAKEREL.BAT │ │ ├── MBMG2.MDF │ │ ├── MBMG2HLP.MSG │ │ ├── MBMG2MAL.DAT │ │ ├── MBMG2MAL.NEW │ │ ├── MBMG2MSG.MSG │ │ ├── MBMG2PLT.DAT │ │ ├── MBMG2PLT.NEW │ │ ├── MBMG2SHP.DAT │ │ ├── MBMG2SHP.NEW │ │ ├── MBMG2USR.DAT │ │ └── MBMG2USR.NEW │ └── VIR60 │ │ ├── GALCAPS.ALT │ │ ├── MBMGEMAL.BCR │ │ ├── MBMGEMAL.DAT │ │ ├── MBMGEMAL.NEW │ │ ├── MBMGENEW.BAT │ │ ├── MBMGEPLT.BCR │ │ ├── MBMGEPLT.DAT │ │ ├── MBMGEPLT.NEW │ │ ├── MBMGESHP.BCR │ │ ├── MBMGESHP.DAT │ │ ├── MBMGESHP.NEW │ │ ├── MBMGETEA.DAT │ │ ├── MBMGETEA.NEW │ │ ├── MBMGEUSR.BCR │ │ ├── MBMGEUSR.DAT │ │ ├── MBMGEUSR.NEW │ │ ├── MBMGEXRF.BCR │ │ ├── SAVGEMAL.BCR │ │ ├── SAVGEMAL.DAT │ │ └── SAVGEMAL.NEW ├── GECMDS.C ├── GECYBS.C ├── GEDROIDS.C ├── GEFUNCS.C ├── GEGLOBAL.H ├── GEINST.DOC ├── GELIB.C ├── GEMAIN.C ├── GEMAIN.H ├── GEPLANET.C ├── GEPROTO.H ├── GEREADME.DOC ├── GESAMPLE.C ├── MBMGEGRF.C ├── MBMGEHLP.MSG ├── MBMGEMAL.DAT ├── MBMGEMAL.NEW ├── MBMGEMNU.TXT ├── MBMGEMP.DOC ├── MBMGEMP.LNK ├── MBMGEMP.MAK ├── MBMGEMP.MDF ├── MBMGEMSG.MSG ├── MBMGEPLT.DAT ├── MBMGEPLT.NEW ├── MBMGESHP.DAT ├── MBMGESHP.MSG ├── MBMGESHP.NEW ├── MBMGETEA.DAT ├── MBMGETEA.NEW ├── MBMGEUSR.DAT ├── MBMGEUSR.NEW ├── README.TXT ├── SECURE.C └── SECURE.H └── register ├── README.NOW ├── REG2.CPP ├── REG3.CPP └── REGISTER.CPP /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Bil Simser 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Galactic Empire 2 | 3 | It is 3250 in the standard year, 975 years since man has developed inter-planetary space navigation. Galactic Empire (GE) is a space exploration and conquest module for Worldgroup BBS systems written in C. 4 | 5 | ## History 6 | 7 | Galactic Empire was written by [Mike Murdock](https://github.com/mmurdock58) and originally released under the [GNU General Public License (GPLv2)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) in 2002. 8 | 9 | A [SourceForge](https://sourceforge.net/) [project](https://sourceforge.net/projects/gnu-ge/) was setup in 2002 to house the GPLv2 version then moved to [GitHub](https://github.com/) in 2016. 10 | 11 | The code was ported by [Bil Simser](https://github.com/bsimser) to Borland 5.01, Visual C++ 6, and the free Borland compiler after the Major BBS version was released by Mike. A port was underway to get GE running on World Group 3.2 but never completed. 12 | 13 | ## License 14 | 15 | Galactic Empire is free software licensed under the [MIT License](https://opensource.org/licenses/MIT). 16 | -------------------------------------------------------------------------------- /mbmgecvt/MBMGECVT.H: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | /* Header file for use with Btrieve utilities in BTVSTF.C and ECBTVSTF.C */ 18 | /* Copyright (C) 1987-1991 GALACTICOMM, Inc. All Rights Reserved. */ 19 | 20 | #define SEGMAX 24 /* max number of key segs per file */ 21 | 22 | struct btvblk { /* btrieve file data block definition */ 23 | long posblk[128/4]; /* position block */ 24 | char *filnam; /* file name */ 25 | int reclen; /* maximum record length */ 26 | char *key; /* key for searching, etc. */ 27 | char *data; /* actual record contents */ 28 | int lastkn; /* last key number used */ 29 | int keylns[SEGMAX]; /* lengths of all possible keys */ 30 | #ifdef ECLIPSE 31 | int realseg; /* real segment of this data block */ 32 | int keyseg; /* real segment of the key area */ 33 | int dataseg; /* real segment of the data area */ 34 | #endif 35 | }; 36 | 37 | #define BTVFILE struct btvblk /* shorthand for btrieve file structure */ 38 | 39 | BTVFILE *opnbtv(); /* non-int btvstf routine returns */ 40 | long absbtv(), 41 | cntrbtv(); 42 | 43 | #define PRIMBV 0 /* normal pre-image btvopn() mode */ 44 | #define ACCLBV -1 /* "accelerated" btvopn() mode */ 45 | #define RONLBV -2 /* read-only btvopn() mode */ 46 | #define VERFBV -3 /* verify (read-after-write) btvopn mode*/ 47 | #define EXCLBV -4 /* "exclusive" btvopn() mode */ 48 | 49 | #define qeqbtv(key,keynum) qrybtv(key, keynum,55) 50 | #define qnxbtv() qnpbtv(56) 51 | #define qprbtv() qnpbtv(57) 52 | #define qgtbtv(key,keynum) qrybtv(key, keynum,58) 53 | #define qgebtv(key,keynum) qrybtv(key, keynum,59) 54 | #define qltbtv(key,keynum) qrybtv(key, keynum,60) 55 | #define qlebtv(key,keynum) qrybtv(key, keynum,61) 56 | #define qlobtv(keynum) qrybtv(NULL,keynum,62) 57 | #define qhibtv(keynum) qrybtv(NULL,keynum,63) 58 | 59 | #define geqbtv(recp,key,keynum) getbtv(recp,key, keynum,5) 60 | #define gnxbtv(recp) getbtv(recp,NULL, -1,6) 61 | #define gprbtv(recp) getbtv(recp,NULL, -1,7) 62 | #define ggtbtv(recp,key,keynum) getbtv(recp,key, keynum,8) 63 | #define ggebtv(recp,key,keynum) getbtv(recp,key, keynum,9) 64 | #define gltbtv(recp,key,keynum) getbtv(recp,key, keynum,10) 65 | #define glebtv(recp,key,keynum) getbtv(recp,key, keynum,11) 66 | #define globtv(recp,keynum) getbtv(recp,NULL,keynum,12) 67 | #define ghibtv(recp,keynum) getbtv(recp,NULL,keynum,13) 68 | 69 | #define acqbtv(recp,key,keynum) obtbtv(recp,key, keynum,5) 70 | #define aqnbtv(recp) anpbtv(recp, 6) 71 | #define aqpbtv(recp) anpbtv(recp, 7) 72 | #define agtbtv(recp,key,keynum) obtbtv(recp,key, keynum,8) 73 | #define agebtv(recp,key,keynum) obtbtv(recp,key, keynum,9) 74 | #define altbtv(recp,key,keynum) obtbtv(recp,key, keynum,10) 75 | #define alebtv(recp,key,keynum) obtbtv(recp,key, keynum,11) 76 | #define alobtv(recp,keynum) obtbtv(recp,NULL,keynum,12) 77 | #define ahibtv(recp,keynum) obtbtv(recp,NULL,keynum,13) 78 | 79 | #define gcrbtv(recp,keynum) gabbtv(recp,absbtv(),keynum) 80 | 81 | #ifdef MSC_C 82 | #define XREG WORDREGS 83 | #endif 84 | 85 | /*************************************************************************** 86 | * * 87 | * PORTABLE.H * 88 | * * 89 | * Copyright (C) 1988,1990 GALACTICOMM, Inc. All Rights Reserved. * 90 | * * 91 | * This header file supports compatibility of the source code of The * 92 | * Major BBS with multiple C language compilers, specifically, those * 93 | * of Microsoft and Borland (Turbo). * 94 | * * 95 | * This declaration: include "portable.h" should appear in each * 96 | * source file, immediately following the other include directives. * 97 | * * 98 | * WARNING! * 99 | * * 100 | * Your compiler command line must define one of the symbols: * 101 | * MSC_C or TSC_C. This identifies the C compiler * 102 | * (Microsoft or Turbo). If Microsoft C 5.0 is in use, * 103 | * you must also define the symbol MS5. If you plan to use the * 104 | * protected-mode facilities associated with the Eclipse package, * 105 | * you must also define the symbol ECLIPSE. To use the Turbo C * 106 | * "huge" model without going to protected mode, no special * 107 | * symbol need be defined (other than TSC_C, indicating Turbo C, * 108 | * of course!). * 109 | * * 110 | * - R. Stein 1/24/88 * 111 | * Lattice eliminated, "huge" and Eclipse added - T. Stryker 2/28/90 * 112 | * * 113 | ***************************************************************************/ 114 | 115 | #ifdef MSC_C 116 | #define allmem() ; 117 | #ifdef ECLIPSE 118 | #define sizmem() eclcoreleft() 119 | #define getml(ln) eclmalloc(ln) 120 | #define free(p) eclfree(p) 121 | #define malloc(in) eclmalloc((long)(in)) 122 | char far *eclmalloc(unsigned long size); 123 | long eclcoreleft(); 124 | #else 125 | #define getml(ln) halloc(ln,1) 126 | char huge *halloc(); 127 | void *malloc(); 128 | #endif 129 | #define ADDR_OFdisaster disaster 130 | #define ADDR_OFeximod eximod 131 | #define FOPRB "rb" /* fopen() 2nd parameter for read binary mode */ 132 | #define FOPRA "ra" /* fopen() 2nd parameter for read ASCII mode */ 133 | #define FOPWB "wb" /* fopen() 2nd parameter for write binary mode */ 134 | #define FOPWA "wa" /* fopen() 2nd parameter for write ASCII mode */ 135 | #define FOPRWB "r+b" /* fopen() 2nd parameter for read/write binary mode */ 136 | #define FOPRWA "r+a" /* fopen() 2nd parameter for read/write ASCII mode */ 137 | #define FOPAB "ab" /* fopen() 2nd parameter for append binary mode */ 138 | #define FOPAA "aa" /* fopen() 2nd parameter for append ASCII mode */ 139 | #define CNTLIT 0 /* does sscanf() count literal matches? */ 140 | #define CFREGS 1 /* REGS has a cflag field (see TurboC dos.h) */ 141 | #define CKNOWN 142 | #define setmem(p,n,c) memset(p,c,n) 143 | #ifdef MS5 144 | #define movmem(s,d,n) memmove(d,s,n) /* microsoft 5.0 memcpy does */ 145 | #else /* not deal with overlaps */ 146 | #define movmem(s,d,n) memcpy(d,s,n) 147 | #endif 148 | #endif 149 | 150 | #ifdef TSC_C 151 | #define allmem() ; 152 | #ifdef ECLIPSE 153 | #define sizmem() eclcoreleft() 154 | #define getml(ln) eclmalloc(ln) 155 | #define free(p) eclfree(p) 156 | #define malloc(in) eclmalloc((long)(in)) 157 | char far *eclmalloc(unsigned long size); 158 | long eclcoreleft(); 159 | #else 160 | #define getml(ln) farmalloc(ln) 161 | #define sizmem() farcoreleft() 162 | char far *farmalloc(unsigned long size); 163 | void *malloc(unsigned size); 164 | long farcoreleft(); 165 | #endif 166 | #define ADDR_OFdisaster disaster 167 | #define ADDR_OFeximod eximod 168 | #define FOPRB "rb" /* fopen() 2nd parameter for read binary mode */ 169 | #define FOPRA "rt" /* fopen() 2nd parameter for read ASCII mode */ 170 | #define FOPWB "wb" /* fopen() 2nd parameter for write binary mode */ 171 | #define FOPWA "wt" /* fopen() 2nd parameter for write ASCII mode */ 172 | #define FOPRWB "r+b" /* fopen() 2nd parameter for read/write binary mode */ 173 | #define FOPRWA "r+t" /* fopen() 2nd parameter for read/write ASCII mode */ 174 | #define FOPAB "ab" /* fopen() 2nd parameter for append binary mode */ 175 | #define FOPAA "at" /* fopen() 2nd parameter for append ASCII mode */ 176 | #define CNTLIT 0 /* does sscanf() count literal matches? */ 177 | #define CFREGS 1 /* REGS has a cflag field (see TurboC dos.h) */ 178 | #define CKNOWN 179 | #endif 180 | 181 | #ifndef min 182 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 183 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 184 | #define abs(a) (((a) < 0) ? -(a) : (a)) 185 | #endif 186 | 187 | #ifdef CKNOWN 188 | #undef CKNOWN 189 | #else 190 | #error YOU SHOULD IDENTIFY THE COMPILER! (See the warning in PORTABLE.H) 191 | #endif 192 | 193 | -------------------------------------------------------------------------------- /mbmgecvt/MBMGECVT.HP: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #ifdef __STDC__ 18 | # define P(s) s 19 | #else 20 | # define P(s) () 21 | #endif 22 | 23 | 24 | /* mbmgecvt.c */ 25 | /* 277 */ void main P((void )); 26 | /* 485 */ void validate P((void )); 27 | /* 518 */ void move_old_to_new P((void )); 28 | /* 557 */ void clrscrx P((void )); 29 | /* 567 */ void clrscr1 P((void )); 30 | /* 579 */ void clrscr2 P((void )); 31 | /* 601 */ struct btvblk *opnbtv P((char *filnam , int maxlen )); 32 | /* 619 */ int clckln P((void )); 33 | /* 644 */ int omdbtv P((int mode )); 34 | /* 650 */ int setbtv P((struct btvblk *bbptr )); 35 | /* 656 */ int qrybtv P((char *key , int keynum , int qryopt )); 36 | /* 679 */ int qnpbtv P((int getopt )); 37 | /* 691 */ int getbtv P((char *recptr , char *key , int keynum , int getopt )); 38 | /* 714 */ int obtbtv P((char *recptr , char *key , int keynum , int obtopt )); 39 | /* 741 */ int anpbtv P((char *recptr , int anpopt )); 40 | /* 753 */ long absbtv P((void )); 41 | /* 763 */ int gabbtv P((char *recptr , long abspos , int keynum )); 42 | /* 778 */ int aabbtv P((char *recptr , long abspos , int keynum )); 43 | /* 791 */ int sabbtv P((char *recptr )); 44 | /* 802 */ int updbtv P((char *recptr )); 45 | /* 808 */ int upvbtv P((char *recptr , int length )); 46 | /* 820 */ int insbtv P((char *recptr )); 47 | /* 826 */ int invbtv P((char *recptr , int length )); 48 | /* 838 */ int delbtv P((void )); 49 | /* 845 */ int clsbtv P((struct btvblk *bbp )); 50 | /* 860 */ int btverr P((char *who )); 51 | /* 882 */ int btvu P((int funcno , char *datbuf , char *key , int keyno , int rlen )); 52 | /* 930 */ char *alcmem P((unsigned size )); 53 | /* 941 */ char *secure P((void )); 54 | /* 946 */ int honk P((void )); 55 | 56 | #undef P 57 | -------------------------------------------------------------------------------- /mbmgecvt/MBMGECVT.LNK: -------------------------------------------------------------------------------- 1 | e:\borlandc\lib\c0l + 2 | \bbsv6\lobj\mbmgecvt 3 | mbmgecvt.exe 4 | mbmgecvt.map /m/l/v 5 | e:\borlandc\lib\cl + 6 | e:\borlandc\lib\mathl 7 | 8 |  -------------------------------------------------------------------------------- /mbmgemap/GECLEAN.BAT: -------------------------------------------------------------------------------- 1 | echo off 2 | btrieve /p:2048 /e >nul 3 | 4 | rem ------------------------------------------------------------------------- 5 | rem YOU MUST CHANGE THE NEXT 8 ZEROS FOR YOUR GALACTIC EMPIRE ACTIVATION CODE 6 | rem ------------------------------------------------------------------------- 7 | 8 | mbmgemap -n00000000 9 | del mbmgeplt.zip 10 | pkzip mbmgeplt mbmgeplt.map 11 | 12 | rem ------------------------------------------------------------------------- 13 | rem CHANGE THE NAME GEMAPS TO WHATEVER FILE LIBRARY DIRECTORY YOU WISH TO 14 | rem LOAD THE ZIP'ED STARMAP FILE INTO FOR YOUR USERS TO DOWNLOAD 15 | rem ------------------------------------------------------------------------- 16 | 17 | copy mbmgeplt.zip GEMAPS 18 | 19 | -------------------------------------------------------------------------------- /mbmgemap/MBMGEMAP.DOC: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Galactic Empire 13 | Planet Database 14 | Estract Utility 15 | MBMGEMAP 16 | Version 1.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | Installation 24 | and 25 | Operations 26 | Guide 27 | 28 | 29 | 30 | 31 | 32 | 33 | 1.0 Introduction 34 | 35 | 2.0 Disclaimer 36 | 37 | 3.0 Installation 38 | 39 | 4.0 Operations 40 | 41 | 5.0 Support 42 | 43 | 44 | 45 | 1.0 Introduction 46 | 47 | 48 | The MBMGEMAP Galactic Empire Planet Database Extract Utility is designed 49 | to work in conjunction with MBMGEGRF to provide your users with a tool 50 | to generate custom, personal starmaps of your current Galactic Empire 51 | Game. 52 | 53 | Each night in the nightly cleanup MBMGEMAP will process the whole 54 | MBMGEPLT.DAT file (it only takes a minute or two). It extracts out a 55 | couple key pieces of information on each sector, planet, and wormhole 56 | and writes it to the encrypted MBMGEPLT.MAP file. This file can then 57 | be downloaded by your users to enable them to render graphic starmaps 58 | of your current GE game. 59 | 60 | This greatly enhances the enjoyment of the game by allowing users to 61 | visualize the game map they are playing on. Additionally, with the 62 | registered version of MBMGEGRF your users can generate GIF or PCX 63 | images that they can print and edit to suit themselves. 64 | 65 | This document describes the procedures to install and operate this 66 | software. Please read it carefully prior to installation. 67 | 68 | 69 | 70 | 71 | 72 | 73 | 2.0 Disclaimer 74 | 75 | 76 | This information is very important - Read Carefully 77 | 78 | 79 | THIS IS A LEGAL AGREEMENT BETWEEN YOU, THE END USER, AND M. B. 80 | MURDOCK & ASSOCIATES ("COMPANY"). BY USING THIS SOFTWARE, YOU 81 | ARE AGREEING TO BE BOUND BY THE TERMS OF THIS AGREEMENT. 82 | 83 | 2.1 SOFTWARE LICENSE 84 | 85 | 2.1.1 GRANT OF LICENSE. 86 | 87 | COMPANY grants you the right to use one copy of the enclosed 88 | software program (the "SOFTWARE") on a single computer (i.e with 89 | a single CPU). You may merge this software into an executable 90 | load module (specifically, an MS-DOS COM or EXE file, or 91 | functional equivalent). 92 | 93 | 2.1.2 COPYRIGHT. 94 | 95 | The SOFTWARE is owned by COMPANY and is protected by United 96 | States copyright laws and international treaty provisions. 97 | Therefore, you must treat the SOFTWARE like any other copyrighted 98 | material (e.g. a book or musical recording) except that you may 99 | either (a) make one copy of the SOFTWARE solely for backup or 100 | archival purposes, or (b) transfer the SOFTWARE to a single hard 101 | disk provided you keep the original solely for backup or 102 | archival purposes. 103 | 104 | 2.1.3 OTHER RESTRICTIONS. 105 | 106 | You may not use, copy, modify, or transfer the SOFTWARE, or any 107 | copy, modification, or merged portion, in whole or in part, 108 | except as expressly provided for in this license. You may not 109 | rent or lease the SOFTWARE, but you may transfer the SOFTWARE on 110 | a permanent basis provided you retain no copies and the recipient 111 | agrees to the terms of this Agreement. You may not reverse 112 | engineer, decompile, or disassemble the portions of SOFTWARE for 113 | which no source code is provided. 114 | 115 | 116 | 117 | 2.2 LIMITED WARRANTY 118 | 119 | The SOFTWARE is provides "AS IS" without warranty of any kind, 120 | either expressed or implied, including, but not limited to, the 121 | implied warranties of merchantability and fitness for a 122 | particular purpose. The entire risk as to the quality and 123 | performance of the software is with you. Should the software 124 | prove defective, you shall assume the entire cost of all 125 | necessary remedies. 126 | 127 | Some states do not allow the exclusion of implied warranties, so 128 | the above exclusion may not apply to you. This warranty gives 129 | you specific legal rights and you may also have other rights 130 | which vary from state to state. 131 | 132 | 2.3 LIMITATIONS OF REMEDIES 133 | 134 | The COMPANY's entire liability and your exclusive remedy shall be 135 | at COMPANY's option (a) the repair or replacement of the SOFTWARE 136 | that does not meet COMPANY's Limited Warranty and which is 137 | returned to COMPANY, or (b) return of the purchase price upon 138 | return of all copies of the SOFTWARE. 139 | 140 | IN NO EVENT SHALL COMPANY be liable for any damages whatsoever 141 | (including, without limitation, damages for loss of business 142 | profits, business interruption, loss of business information, or 143 | other pecuniary loss) arising out of the use of the SOFTWARE 144 | even if COMPANY has been advised of the possibility of such 145 | damages. Because some states do not allow the exclusion or 146 | limitation of liability for consequential or incidental damages, 147 | the above limitation may not apply to you. 148 | 149 | This Agreement will be governed by the laws of the State of 150 | Florida. 151 | 152 | BY USING THIS SOFTWARE, YOU ACKNOWLEDGE THAT YOU HAVE READ THIS 153 | AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND 154 | CONDITIONS. YOU FURTHER AGREE THAT IT IS THE COMPLETE AND 155 | EXCLUSIVE STATEMENT OF THE AGREEMENT BETWEEN US, WHICH SUPERCEDES 156 | ANY PROPOSAL OR PRIOR AGREEMENT, ORAL OR WRITTEN, AND ANY OTHER 157 | COMMUNICATIONS BETWEEN US RELATING TO THE SUBJECT MATTER OF THIS 158 | AGREEMENT. 159 | 160 | 161 | 162 | 163 | 3.0 Installation from a release diskette 164 | 165 | Use this procedure if you received your software on a release 166 | diskette. If you downloaded a .ZIP file from our support system refer 167 | to section 3.2 and 3.3. 168 | 169 | Copying files from install diskette to your system. 170 | --------------------------------------------------- 171 | 172 | In order to install the software place the release diskette in your 173 | floppy diskette drive and type the following command; 174 | 175 | A: 176 | INSTALL A: C:\BBSV6 177 | 178 | Note: If your floppy diskette is B: then substitute "B:" for "A:" 179 | above. Also, if you would like it installed on another drive or in 180 | another directory, please substitute your drive and directory for the 181 | "C:\BBSV6" above. 182 | 183 | The install procedure will copy the appropriate files to BBSV6 184 | directory with sample databases ready to generate starmaps on. 185 | 186 | 187 | 188 | 189 | 3.1 Upgrade from a release diskette 190 | 191 | Use this procedure if you received a software update on a 192 | release diskette. If you downloaded a .ZIP file from our support 193 | system refer to section 3.2 and 3.3. 194 | 195 | NOTE: ALWAYS BACKUP YOUR SYSTEM PRIOR TO MAKING ANY 196 | MAJOR CHANGES! 197 | 198 | STEP 1: 199 | Copying files from install diskette to your system. 200 | 201 | In order to update the software place the release diskette in your 202 | floppy diskette drive and type the following command; 203 | 204 | A: 205 | UPDATE A: C:\BBSV6 206 | 207 | Note: If your floppy diskette is B: then substitute "B:" for "A:" 208 | above. Also, if you would like it installed on another drive or in 209 | another directory, please substitute your drive and directory for the 210 | "C:\BBSV6" above. 211 | 212 | The update procedure will copy the appropriate files to your BBS 213 | directory but will not effect your existing databases. 214 | 215 | 216 | 217 | 218 | 3.2 Installation from a downloaded ZIP file. 219 | 220 | Use this procedure if you received your first copy of the software 221 | by downloading it from our support BBS. If you are updating a 222 | previous release please refer to section 3.3 below. 223 | 224 | STEP 1: 225 | 226 | Copy the downloaded file to your BBSV6 directory 227 | 228 | COPY MBMGEMAP.ZIP C:\BBSV6 229 | 230 | Note: If you would like it installed on another drive or in 231 | another directory, please substitute your drive and directory for the 232 | "C:" and "\BBSV6" above. 233 | 234 | STEP 2: 235 | 236 | Switch to the BBSV6 Directory 237 | 238 | C: 239 | CD \BBSV6 240 | 241 | Note: If you would like it installed on another drive or in 242 | another directory, please substitute your drive and directory for the 243 | "C:" and "\BBSV6" above. 244 | 245 | STEP 4: 246 | Unzipping the downloaded file. 247 | 248 | PKUNZIP MBMGEMAP.ZIP 249 | 250 | 251 | 252 | 253 | 3.3 Upgrade from a downloaded ZIP file. 254 | 255 | Use this procedure if you downloaded an update from our support BBS. 256 | The main difference is that an update will not contain empty 257 | databases unless absolutely required. 258 | 259 | NOTE: ALWAYS BACKUP YOUR SYSTEM PRIOR TO MAKING ANY 260 | MAJOR CHANGES! 261 | 262 | STEP 1: 263 | Copy the downloaded file to your BBSV6 directory 264 | 265 | COPY MBMGEMAP.ZIP C:\BBSV6 266 | 267 | Note: If you would like it installed on another drive or in 268 | another directory, please substitute your drive and directory for the 269 | "C:" and "\BBSV6" above. 270 | 271 | STEP 2: 272 | 273 | Switch to the BBSV6 Directory 274 | 275 | C: 276 | CD \BBSV6 277 | 278 | Note: If you would like it installed on another drive or in 279 | another directory, please substitute your drive and directory for the 280 | "C:" and "\BBSV6" above. 281 | 282 | STEP 3: 283 | Unzipping the downloaded file. 284 | 285 | PKUNZIP MBMGEMAP.ZIP 286 | 287 | 288 | 289 | 290 | 4.0 Operations 291 | 292 | 293 | MBMGEMAP is a simple program to operate. If you forget the command line 294 | options simply run the program with the "-?" switch as follows; 295 | 296 | MBMGEMAP -? 297 | 298 | This will display a complete list of the command line options available 299 | as follows; 300 | 301 | USAGE: 302 | 303 | MBMGEMAP [-options] 304 | 305 | 306 | -nxxxxxxxx 8 Digit GE Registration # 307 | 308 | This is your 8 digit Galactic Empire Activation code. 309 | If you have forgotten this code simply look in the 310 | MBMGEMSG.MSG file. 311 | 312 | 313 | 314 | Examples: 315 | 316 | mbmgemap -n12345678 317 | 318 | 319 | 320 | 321 | 4.0 Operations (cont.) 322 | 323 | A batch file GECLEAN.BAT has been provided as an example how to automate 324 | the nightly generation of the map file. This batch should be appended 325 | to the end of your existing BBSCLEAN.BAT (if you have one). If you don't 326 | already have a BBSCLEAN.BAT use this batch as a sample one. 327 | 328 | Note: You will also need to create a Library directory to hold the 329 | nightly map file so your users can download it. You will need to use 330 | the library options to manually log in the file the first time and then 331 | can simply copy the new version into the library each night. In the 332 | example GECLEAN.BAT file I chose GEMAPS as the library name. You may 333 | choose any name you like by simply changing the copy command in the 334 | BBSCLEAN.BAT you create (or update). 335 | 336 | Some sysops may choose to use the GALUTIL utility to update the library 337 | so that it accurately reflects the file date and file size. Please 338 | refer to your MajorBBS operations manual for information on GALUTIL. 339 | 340 | 341 | 342 | 343 | 344 | 5.0 Support 345 | 346 | For Technical Support email us at; 347 | 348 | mmurdock@cloudnet.com 349 | 350 | Our mailing address is; 351 | 352 | Mail to: 353 | M.B. Murdock & Associates 354 | 800 Hwy 10 S. #5 355 | St. Cloud, MN. 56304 356 | 357 | Office: (320) 654-8522 358 | 359 | 360 | 361 |  -------------------------------------------------------------------------------- /mbmgemap/MBMGEMAP.H: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #define TSC_C 1 18 | 19 | #define SEGMAX 24 /* max number of key segs per file */ 20 | 21 | struct btvblk { /* btrieve file data block definition */ 22 | long posblk[128/4]; /* position block */ 23 | char *filnam; /* file name */ 24 | int reclen; /* maximum record length */ 25 | char *key; /* key for searching, etc. */ 26 | char *data; /* actual record contents */ 27 | int lastkn; /* last key number used */ 28 | int keylns[SEGMAX]; /* lengths of all possible keys */ 29 | #ifdef ECLIPSE 30 | int realseg; /* real segment of this data block */ 31 | int keyseg; /* real segment of the key area */ 32 | int dataseg; /* real segment of the data area */ 33 | #endif 34 | }; 35 | 36 | #define BTVFILE struct btvblk /* shorthand for btrieve file structure */ 37 | 38 | BTVFILE *opnbtv(); /* non-int btvstf routine returns */ 39 | long absbtv(), 40 | cntrbtv(); 41 | 42 | #define PRIMBV 0 /* normal pre-image btvopn() mode */ 43 | #define ACCLBV -1 /* "accelerated" btvopn() mode */ 44 | #define RONLBV -2 /* read-only btvopn() mode */ 45 | #define VERFBV -3 /* verify (read-after-write) btvopn mode*/ 46 | #define EXCLBV -4 /* "exclusive" btvopn() mode */ 47 | 48 | #define qeqbtv(key,keynum) qrybtv(key, keynum,55) 49 | #define qnxbtv() qnpbtv(56) 50 | #define qprbtv() qnpbtv(57) 51 | #define qgtbtv(key,keynum) qrybtv(key, keynum,58) 52 | #define qgebtv(key,keynum) qrybtv(key, keynum,59) 53 | #define qltbtv(key,keynum) qrybtv(key, keynum,60) 54 | #define qlebtv(key,keynum) qrybtv(key, keynum,61) 55 | #define qlobtv(keynum) qrybtv(NULL,keynum,62) 56 | #define qhibtv(keynum) qrybtv(NULL,keynum,63) 57 | 58 | #define geqbtv(recp,key,keynum) getbtv(recp,key, keynum,5) 59 | #define gnxbtv(recp) getbtv(recp,NULL, -1,6) 60 | #define gprbtv(recp) getbtv(recp,NULL, -1,7) 61 | #define ggtbtv(recp,key,keynum) getbtv(recp,key, keynum,8) 62 | #define ggebtv(recp,key,keynum) getbtv(recp,key, keynum,9) 63 | #define gltbtv(recp,key,keynum) getbtv(recp,key, keynum,10) 64 | #define glebtv(recp,key,keynum) getbtv(recp,key, keynum,11) 65 | #define globtv(recp,keynum) getbtv(recp,NULL,keynum,12) 66 | #define ghibtv(recp,keynum) getbtv(recp,NULL,keynum,13) 67 | 68 | #define acqbtv(recp,key,keynum) obtbtv(recp,key, keynum,5) 69 | #define aqnbtv(recp) anpbtv(recp, 6) 70 | #define aqpbtv(recp) anpbtv(recp, 7) 71 | #define agtbtv(recp,key,keynum) obtbtv(recp,key, keynum,8) 72 | #define agebtv(recp,key,keynum) obtbtv(recp,key, keynum,9) 73 | #define altbtv(recp,key,keynum) obtbtv(recp,key, keynum,10) 74 | #define alebtv(recp,key,keynum) obtbtv(recp,key, keynum,11) 75 | #define alobtv(recp,keynum) obtbtv(recp,NULL,keynum,12) 76 | #define ahibtv(recp,keynum) obtbtv(recp,NULL,keynum,13) 77 | 78 | #define gcrbtv(recp,keynum) gabbtv(recp,absbtv(),keynum) 79 | 80 | #ifdef MSC_C 81 | #define XREG WORDREGS 82 | #endif 83 | 84 | /*************************************************************************** 85 | * * 86 | * PORTABLE.H * 87 | * * 88 | * Copyright (C) 1988,1990 GALACTICOMM, Inc. All Rights Reserved. * 89 | * * 90 | * This header file supports compatibility of the source code of The * 91 | * Major BBS with multiple C language compilers, specifically, those * 92 | * of Microsoft and Borland (Turbo). * 93 | * * 94 | * This declaration: include "portable.h" should appear in each * 95 | * source file, immediately following the other include directives. * 96 | * * 97 | * WARNING! * 98 | * * 99 | * Your compiler command line must define one of the symbols: * 100 | * MSC_C or TSC_C. This identifies the C compiler * 101 | * (Microsoft or Turbo). If Microsoft C 5.0 is in use, * 102 | * you must also define the symbol MS5. If you plan to use the * 103 | * protected-mode facilities associated with the Eclipse package, * 104 | * you must also define the symbol ECLIPSE. To use the Turbo C * 105 | * "huge" model without going to protected mode, no special * 106 | * symbol need be defined (other than TSC_C, indicating Turbo C, * 107 | * of course!). * 108 | * * 109 | * - R. Stein 1/24/88 * 110 | * Lattice eliminated, "huge" and Eclipse added - T. Stryker 2/28/90 * 111 | * * 112 | ***************************************************************************/ 113 | 114 | #ifdef MSC_C 115 | #define allmem() ; 116 | #ifdef ECLIPSE 117 | #define sizmem() eclcoreleft() 118 | #define getml(ln) eclmalloc(ln) 119 | #define free(p) eclfree(p) 120 | #define malloc(in) eclmalloc((long)(in)) 121 | char far *eclmalloc(unsigned long size); 122 | long eclcoreleft(); 123 | #else 124 | #define getml(ln) halloc(ln,1) 125 | char huge *halloc(); 126 | void *malloc(); 127 | #endif 128 | #define ADDR_OFdisaster disaster 129 | #define ADDR_OFeximod eximod 130 | #define FOPRB "rb" /* fopen() 2nd parameter for read binary mode */ 131 | #define FOPRA "ra" /* fopen() 2nd parameter for read ASCII mode */ 132 | #define FOPWB "wb" /* fopen() 2nd parameter for write binary mode */ 133 | #define FOPWA "wa" /* fopen() 2nd parameter for write ASCII mode */ 134 | #define FOPRWB "r+b" /* fopen() 2nd parameter for read/write binary mode */ 135 | #define FOPRWA "r+a" /* fopen() 2nd parameter for read/write ASCII mode */ 136 | #define FOPAB "ab" /* fopen() 2nd parameter for append binary mode */ 137 | #define FOPAA "aa" /* fopen() 2nd parameter for append ASCII mode */ 138 | #define CNTLIT 0 /* does sscanf() count literal matches? */ 139 | #define CFREGS 1 /* REGS has a cflag field (see TurboC dos.h) */ 140 | #define CKNOWN 141 | #define setmem(p,n,c) memset(p,c,n) 142 | #ifdef MS5 143 | #define movmem(s,d,n) memmove(d,s,n) /* microsoft 5.0 memcpy does */ 144 | #else /* not deal with overlaps */ 145 | #define movmem(s,d,n) memcpy(d,s,n) 146 | #endif 147 | #endif 148 | 149 | #ifdef TSC_C 150 | #define allmem() ; 151 | #ifdef ECLIPSE 152 | #define sizmem() eclcoreleft() 153 | #define getml(ln) eclmalloc(ln) 154 | #define free(p) eclfree(p) 155 | #define malloc(in) eclmalloc((long)(in)) 156 | char far *eclmalloc(unsigned long size); 157 | long eclcoreleft(); 158 | #else 159 | #define getml(ln) farmalloc(ln) 160 | #define sizmem() farcoreleft() 161 | char far *farmalloc(unsigned long size); 162 | void *malloc(unsigned size); 163 | long farcoreleft(); 164 | #endif 165 | #define ADDR_OFdisaster disaster 166 | #define ADDR_OFeximod eximod 167 | #define FOPRB "rb" /* fopen() 2nd parameter for read binary mode */ 168 | #define FOPRA "rt" /* fopen() 2nd parameter for read ASCII mode */ 169 | #define FOPWB "wb" /* fopen() 2nd parameter for write binary mode */ 170 | #define FOPWA "wt" /* fopen() 2nd parameter for write ASCII mode */ 171 | #define FOPRWB "r+b" /* fopen() 2nd parameter for read/write binary mode */ 172 | #define FOPRWA "r+t" /* fopen() 2nd parameter for read/write ASCII mode */ 173 | #define FOPAB "ab" /* fopen() 2nd parameter for append binary mode */ 174 | #define FOPAA "at" /* fopen() 2nd parameter for append ASCII mode */ 175 | #define CNTLIT 0 /* does sscanf() count literal matches? */ 176 | #define CFREGS 1 /* REGS has a cflag field (see TurboC dos.h) */ 177 | #define CKNOWN 178 | #endif 179 | 180 | #ifndef min 181 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 182 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 183 | #define abs(a) (((a) < 0) ? -(a) : (a)) 184 | #endif 185 | 186 | #ifdef CKNOWN 187 | #undef CKNOWN 188 | #else 189 | #error YOU SHOULD IDENTIFY THE COMPILER! (See the warning in PORTABLE.H) 190 | #endif 191 | 192 | -------------------------------------------------------------------------------- /mbmgemap/MBMGEMAP.HP: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #ifdef __STDC__ 18 | # define P(s) s 19 | #else 20 | # define P(s) () 21 | #endif 22 | 23 | 24 | /* mbmgecvt.c */ 25 | /* 277 */ void main P((int argc, char **argv)); 26 | /* 557 */ void clrscrx P((void )); 27 | /* 567 */ void clrscr1 P((void )); 28 | /* 579 */ void clrscr2 P((void )); 29 | /* 601 */ struct btvblk *opnbtv P((char *filnam , int maxlen )); 30 | /* 619 */ int clckln P((void )); 31 | /* 644 */ int omdbtv P((int mode )); 32 | /* 650 */ int setbtv P((struct btvblk *bbptr )); 33 | /* 656 */ int qrybtv P((char *key , int keynum , int qryopt )); 34 | /* 679 */ int qnpbtv P((int getopt )); 35 | /* 691 */ int getbtv P((char *recptr , char *key , int keynum , int getopt )); 36 | /* 714 */ int obtbtv P((char *recptr , char *key , int keynum , int obtopt )); 37 | /* 741 */ int anpbtv P((char *recptr , int anpopt )); 38 | /* 753 */ long absbtv P((void )); 39 | /* 763 */ int gabbtv P((char *recptr , long abspos , int keynum )); 40 | /* 778 */ int aabbtv P((char *recptr , long abspos , int keynum )); 41 | /* 791 */ int sabbtv P((char *recptr )); 42 | /* 802 */ int updbtv P((char *recptr )); 43 | /* 808 */ int upvbtv P((char *recptr , int length )); 44 | /* 820 */ int insbtv P((char *recptr )); 45 | /* 826 */ int invbtv P((char *recptr , int length )); 46 | /* 838 */ int delbtv P((void )); 47 | /* 845 */ int clsbtv P((struct btvblk *bbp )); 48 | /* 860 */ int btverr P((char *who )); 49 | /* 882 */ int btvu P((int funcno , char *datbuf , char *key , int keyno , int rlen )); 50 | /* 930 */ char *alcmem P((unsigned size )); 51 | /* 941 */ char *secure P((void )); 52 | /* 946 */ int honk P((void )); 53 | 54 | #undef P 55 | -------------------------------------------------------------------------------- /mbmgemap/MBMGEMAP.LNK: -------------------------------------------------------------------------------- 1 | e:\borlandc\lib\c0l + 2 | \bbsv6\lobj\mbmgemap 3 | mbmgemap.exe 4 | mbmgemap.map /m/l/v 5 | e:\borlandc\lib\cl + 6 | e:\borlandc\lib\mathl 7 | 8 |  -------------------------------------------------------------------------------- /mbmgemap/README.NOW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemap/README.NOW -------------------------------------------------------------------------------- /mbmgemp/GE/DOCS/GE30.AD: -------------------------------------------------------------------------------- 1 | ************************************************* 2 | * * 3 | * GALACTIC EMPIRE 3.1 for MBBS 6.11 * 4 | * * 5 | ************************************************* 6 | * * 7 | * Add GE to your system today!! FREE TRIAL * 8 | * * 9 | * Why spend money just to find out if your * 10 | * users will play a game. With GE you can * 11 | * download it today, and have it on your * 12 | * system in minutes. * 13 | * * 14 | * NO COST - NO RISK - NO KIDDING * 15 | * * 16 | * If you decide to order this module after the * 17 | * trial, simply send in payment with the order * 18 | * form. * 19 | * * 20 | * If not, then you are out nothing, and under * 21 | * absolutely no obligation to purchase anything.* 22 | * * 23 | * Why are we doing this? Because we are sure * 24 | * after you play GE you will agree that it is * 25 | * the finest add-on game for the MajorBBS and * 26 | * want to order it. * 27 | * * 28 | * To get your FREE TRIAL call our online system * 29 | * at (813) 541-5876 and download it from the * 30 | * Library. Simply unzip the file in your BBSV6 * 31 | * directory and add GE to the menu. Then you * 32 | * decide! * 33 | * * 34 | * M.B. Murdock & Associates * 35 | * P.O. Box 2194 * 36 | * Pinellas Park, Fl. 34665-2194 * 37 | * (813) 545-8050 (voice) * 38 | * (813) 541-5876 (BBS) * 39 | * * 40 | ************************************************* 41 | 42 | -------------------------------------------------------------------------------- /mbmgemp/GE/DOCS/GESYSOP.DOC: -------------------------------------------------------------------------------- 1 | 2 | 3 | Galactic Empire 3.1 4 | System Operator Commands 5 | 6 | Please be aware that there are some system operator commands in Galactic 7 | Empire provided for your use. These also provide some assistance in 8 | debugging problems. They can however give a player a distinct advantage 9 | if discovered, and it is not recommended that they be used in the 10 | production system all the time. 11 | 12 | The commands can be enabled by turning on the GESYSOP option in the 13 | configuration options (MBMGEMSG.MSG) 14 | 15 | The sysop commands are as follows; 16 | 17 | 18 | SYS GET xxxxx 19 | This will grant to the ship xxxxx of the items requested. 20 | Example: SYS GET 100 TOR gets you 100 torpedoes. 21 | 22 | SYS KILL 23 | Causes a player in the game to have his ship destroyed for unknown 24 | reasons; 25 | Example SYS KILL GREMLIN will kill gremlins ship 26 | 27 | SYS CASH xxxxx 28 | This will grant to the ship xxxxx C's of cash. 29 | Example: SYS CASH 999999 will give the ship 999999 in C's 30 | 31 | SYS GOTO x y 32 | This will move the ship to the sector in the universe with the specific 33 | x and y coordinates. 34 | Example: SYS GOTO 10 10 will move the ship to the x=10, y=10 sector. 35 | 36 | SYS SHIELDTYPE n 37 | This will give the current ship a shield of type n. Valid types are 38 | 1 to 5. 39 | 40 | SYS PHASERTYPE n 41 | This will give the current ship a phaser type on n. Valid types are 42 | 1 to 4. 43 | 44 | SYS CLASS n 45 | This will change the current ship to a ship class of n. Valid classes 46 | are 0 to 7. NOTE: IF you set the class to 8 or 9 (Cybertrons) I 47 | cannot guarentee the outcome. GP's may result. 48 | 49 | SYS CLASSLIST 50 | This lists the current classes enabled in the game. 51 | 52 | SYS LIST 53 | Lists all the ships currently active in the game, including cybertrons 54 | and droids. 55 | 56 | SYS HELP will list any new commands that I fail to get put in here. 57 | 58 | 59 | Please be aware that GE does not restrict the use of these commands to 60 | the sysop only, as they may be used by him when on another acount to 61 | change that players ship. It is your responsibility to determine if running 62 | the game with these commands activated is appropriate. 63 | 64 | 65 | Enjoy! 66 | Mike Murdock 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |  -------------------------------------------------------------------------------- /mbmgemp/GE/DOCS/GETERM.DOC: -------------------------------------------------------------------------------- 1 | 2 | This documents the special terminal program commands in Galactic Empire 3.0. 3 | These commands are designed to assist in the rendering of information 4 | on a terminal program display by cutting out the textual portion of the 5 | information and conveying only the data in an easy to parse format. 6 | 7 | The commands available are... 8 | 9 | 10 | 11 | 12 | DATA pppppp SCAN 13 | ---------------- 14 | 15 | 16 | Reports information on all the other ships that this ship can "see". It 17 | is the same information as in the SCAN RANGE 9 command with SCANFULL and 18 | SCANNAMES set on. 19 | 20 | The pppppp is the password for the terminal program. This insures that only 21 | terminal programs use these commands, and not the everyday user. It is 22 | set to "qazwsx" and will probably stay that way. 23 | 24 | 25 | The format for the information is... 26 | 27 | " %c %d %d %d %d %s %d %d %u.%u %d/%s\r" (for those "C" programmers) 28 | 29 | or 30 | 31 | Shp Xsect Ysect Xcoord Ycoord Distance Bearing Heading Speed Class 32 | 33 | * = this ship 34 | 35 | 36 | 37 | 38 | The next command available is... 39 | 40 | data pppppp report 41 | 42 | This command tells you everything you need to know about this ship. 43 | The first three characters are a data class indicator, followed by a colon. 44 | UD = User Data, SD = Ship Data. 45 | 46 | The entire response is formatted as follows; 47 | 48 | 49 | UD1:userid,noships,kills,rospos,planets* 50 | UD2:Score,cash,population* 51 | SD1:shipname,class* 52 | SD2:heading,speed,xsect,ysect,xcord,ycord,damage,energy* 53 | SD3:phasr,phasrtype,kills,lastfired,shieldtype,shieldstat,shield,cloak,tactical 54 | helm,train,where* 55 | SD4:T0:channel,distance,T1:channel,distance,T2:channel,distance,* 56 | SD5:M0:channel,distance,M1:channel,distance,M2:channel,distance,* 57 | SD6:I0:amount,I1,amount...In,amount,* 58 | SD7:decout,jammer,kills,freq[0],freq[1],freq[2],hostile,cantexit,repair 59 | hypha,firecntl,destruct,status* 60 | 61 | 62 | Some additional notes.... 63 | 64 | damage is the amount of damage in % that this ship has >99 = dead 65 | 66 | Phasr is the strength of the phaser. 67 | 68 | Lastfired is a pointer to the ship who last fired on this ship... not much use 69 | to you as you havn't got access to the table. 70 | 71 | shieldstat is the current shield status as follows; 72 | 1 = up 73 | 2 = down 74 | 3 = damaged 75 | 76 | shield is the current shield charge. It is figured as follows; 77 | % charged = (shield/100)/(40 + (shieldtype * 10)) 78 | 79 | if the shields are damaged the shield # will be negative. The more negative 80 | the number the worse the damage. 81 | 82 | cloak is used as follows; 83 | cloak = 0 indicates not-cloaked 84 | cloak > 0 indicates cloaked 85 | cloak < 0 indicates damaged cloak 86 | 87 | tactical is used as follows; 88 | 89 | tactical = 0 indicates the tactical display is fine 90 | tactical < 0 indicates the tactical display is damaged (no scans permitted) 91 | 92 | helm is used as follows; 93 | 94 | helm = 0 indicates the helm is fine 95 | helm < 0 indicates the helm is damaged (no IMP or WAR or ROT permitted) 96 | 97 | train is not used currently 98 | 99 | where is used as follows; 100 | 101 | where = 0 ship is in impulse drive 102 | where = 1 ship is in warp drive 103 | where > 10 ship is in orbit around planet # (where - 10) 104 | where = -1 ship gone (do not use to determine if this ship is killed) 105 | 106 | T0 - T2 indicate if torpedoes are locked on to this ship. 107 | If distance > 0 an incomming torpedo is locked on. 108 | 109 | M0 - M1 indicates if missiles are locked on to this ship. 110 | If distance > 0 an incomming missile is locked on. 111 | 112 | I0 - I12 indicate the quantity of items on this ship where 113 | 114 | MEN =0 115 | MISSILE =1 116 | TORPEDO =2 117 | IONCANNON =3 118 | FLUXPOD =4 119 | FOOD =5 120 | FIGHTER =6 121 | DECOYS =7 122 | TROOPS =8 123 | ZIPPERS =9 124 | JAMMERS =10 125 | MINE =11 126 | GOLD =12 127 | 128 | decout indicates the number of decoys deployed 129 | 130 | jammer indicates the condition of any jamming where 131 | 0 = no jamming 132 | > 0 = jammed 133 | 134 | freq[0] - freq[2] indicates the frequency the com channels are set to 135 | 136 | hostile indicates that this player has been hostile toward a planet 137 | and any ION CANNONS may fire on it. 138 | 139 | cantexit indicates the player has been fighting and cannot exit until 140 | this value is 0. 141 | 142 | repair indicates the ship is under repair if > 0. The higher the number 143 | the longer till done. 144 | 145 | hypha indicates the current hyper phaser status 146 | if > 0 they are cooling down. 147 | if 0 they can fire 148 | 149 | firecntl indicates the fire control status as follows; 150 | if = 0 the ship can fire 151 | if > 0 the fire control is being repaired 152 | 153 | destruct indicates if a self destruct is underway. 154 | If = 0 no 155 | if > 0 countdown in progress 156 | 157 | status should be always a 1 (if not let me know) 158 | 159 | 160 | 161 | 162 | 163 | Additionally for those of you who care... 164 | 165 | the command WHO will display the userid, username, and BBS registration # 166 | in case you wish to register a program to a specific user or system. 167 | 168 | 169 | 170 | 171 | 172 | I know this is not everything you might like but its a start. As you get 173 | going please let me know what else you need to make your program the best 174 | it can be. 175 | 176 | 177 | If you need any help please call me at (813) 545-8050 178 | 179 | 180 | Mike Murdock 181 | 182 | 183 | 184 | 185 |  -------------------------------------------------------------------------------- /mbmgemp/GE/DOCS/ORDER.FRM: -------------------------------------------------------------------------------- 1 | 2 | GALACTIC EMPIRE 3.0 3 | ORDER FORM 4 | 5 | If you wish to order Galactic Empire, please fill out the following 6 | information. Include a check or money order in the full amount below 7 | and mail it to... 8 | 9 | M.B. Murdock & Associates 10 | P.O. Box 2194 11 | Pinellas Park, FL. 34665-2194 12 | 13 | =========================================================================== 14 | 15 | 16 | First & Last Name:_____________________________________ 17 | 18 | 19 | Business Name :_____________________________________ 20 | 21 | 22 | Address :_____________________________________ 23 | 24 | 25 | City, St, Zip :_____________________________________ 26 | 27 | 28 | BBS Name :_____________________________________ 29 | 30 | 31 | Voice Phone # :_____________________________________ 32 | 33 | 34 | BBS Phone # :_____________________________________ 35 | 36 | 37 | MBBS Reg Number :_____________________________________ (Must Have) 38 | 39 | # copies 40 | 41 | Galactic Empire 3.0 ..................... $295.00 X [ ] = ________ 42 | 43 | -or- 44 | 45 | Galactic Empire 3.0 Update .............. $95.00 X [ ] = ________ 46 | (only available to registered GE licensees) 47 | 48 | 49 | TOTAL = ________ 50 | 51 | =========================================================================== 52 | 53 | NOTE: To register a previous copy of Galactic Empire and get the Upgrade 54 | price please include a photocopy of your original Invoice with this 55 | order. 56 | 57 | THANK YOU FOR YOUR ORDER 58 | 59 | =========================================================================== 60 | 61 | -------------------------------------------------------------------------------- /mbmgemp/GE/GETITLE.DOC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/GETITLE.DOC -------------------------------------------------------------------------------- /mbmgemp/GE/INSTALL/INSTALL.BAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/INSTALL/INSTALL.BAT -------------------------------------------------------------------------------- /mbmgemp/GE/INSTALL/MAKEDISK.BAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/INSTALL/MAKEDISK.BAT -------------------------------------------------------------------------------- /mbmgemp/GE/INSTALL/UPDATE.BAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/INSTALL/UPDATE.BAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MAKEREL.BAT: -------------------------------------------------------------------------------- 1 | del mbm*.* 2 | del ge*.* 3 | del upd*.* 4 | del *.bak 5 | del *.zip 6 | 7 | copy \bbsv6\mbmgemp.dll 8 | copy \bbsv6\mbmgemsg.msg 9 | copy \bbsv6\mbmgehlp.msg 10 | copy \bbsv6\mbmgeshp.msg 11 | copy \bbsv6\mbmgemp.mdf 12 | copy \bbsv6\mbmgeshp.msg 13 | 14 | copy \bbsv6\mbmgegrf.gif 15 | copy \bbsv6\mbmgegr1.gif 16 | 17 | copy \bbsv6\mbmgemnu.txt 18 | rem copy \bbsv6\mbmgecv.exe 19 | rem copy \bbsv6\mbmgecvt.bat 20 | 21 | copy ..\vir60\mbm*.dat *.new 22 | copy ..\vir60\mbm*.dat 23 | 24 | copy ..\docs\mbmgemp.doc 25 | copy ..\docs\geinst.doc 26 | copy ..\docs\gereadme.doc 27 | copy ..\docs\order.frm 28 | 29 | 30 | touch *.* 31 | 32 | Pkzip mbmgedll.zip *.* 33 | pkzip -d mbmgedll.zip makerel.bat 34 | 35 | copy mbmgedll.zip updgedll.zip 36 | pkzip -d updgedll.zip *.dat 37 | 38 | pkzip patgedll.zip mbmgemp.dll gereadme.doc mbmgemnu.txt mbmgemsg.msg 39 | 40 | ren mbmgedll.zip mbmge%1.zip 41 | ren updgedll.zip updge%1.zip 42 | ren patgedll.zip patge%1.zip 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEMAL.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGEMAL.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEMAL.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGEMAL.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEMNU.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGEMNU.TXT -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEMP.MDF: -------------------------------------------------------------------------------- 1 | ; MBMGEMP.MDF 2 | 3 | Module Name: Galactic Empire 4 | 5 | Developer: M.B. Murdock & Associates 6 | 7 | 8 | Requires: 9 | Replaces: 10 | 11 | Install: 12 | 13 | Online user manual:MBMGEMP.DOC 14 | 15 | DLLs:MBMGEMP 16 | MSGs:MBMGEHLP MBMGEMSG MBMGESHP 17 | 18 | 19 | Btrieve page size: 2048 20 | Btrieve files: 6 21 | 22 | Cleanup: 23 | 24 | Event-1: 25 | Event-2: 26 | Event-3: 27 | Event-4: 28 | 29 | Add-On Utility: 30 | 31 | 32 | -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEPLT.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGEPLT.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEPLT.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGEPLT.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGESHP.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGESHP.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGESHP.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGESHP.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGETEA.DAT: -------------------------------------------------------------------------------- 1 | TEAM| 0| | 0| 0| | | 2 | TEAM| 0| | 0| 0| | | 3 | TEAM| 0| | 0| 0| | | 4 | TEAM| 0| | 0| 0| | | 5 | TEAM| 0| | 0| 0| | | 6 | TEAM| 0| | 0| 0| | | 7 | TEAM| 0| | 0| 0| | | 8 | TEAM| 0| | 0| 0| | | 9 | TEAM| 0| | 0| 0| | | 10 | TEAM| 0| | 0| 0| | | 11 | TEAM| 0| | 0| 0| | | 12 | TEAM| 0| | 0| 0| | | 13 | TEAM| 0| | 0| 0| | | 14 | TEAM| 0| | 0| 0| | | 15 | TEAM| 0| | 0| 0| | | 16 | TEAM| 0| | 0| 0| | | 17 | TEAM| 0| | 0| 0| | | 18 | TEAM| 0| | 0| 0| | | 19 | TEAM| 0| | 0| 0| | | 20 | TEAM| 0| | 0| 0| | | 21 | TEAM| 0| | 0| 0| | | 22 | TEAM| 0| | 0| 0| | | 23 | TEAM| 0| | 0| 0| | | 24 | TEAM| 0| | 0| 0| | | 25 | TEAM| 0| | 0| 0| | | 26 | TEAM| 0| | 0| 0| | | 27 | TEAM| 0| | 0| 0| | | 28 | TEAM| 0| | 0| 0| | | 29 | TEAM| 0| | 0| 0| | | 30 | TEAM| 0| | 0| 0| | | 31 | TEAM| 0| | 0| 0| | | 32 | TEAM| 0| | 0| 0| | | 33 | TEAM| 0| | 0| 0| | | 34 | TEAM| 0| | 0| 0| | | 35 | TEAM| 0| | 0| 0| | | 36 | TEAM| 0| | 0| 0| | | 37 | TEAM| 0| | 0| 0| | | 38 | TEAM| 0| | 0| 0| | | 39 | TEAM| 0| | 0| 0| | | 40 | TEAM| 0| | 0| 0| | | 41 | TEAM| 0| | 0| 0| | | 42 | TEAM| 0| | 0| 0| | | 43 | TEAM| 0| | 0| 0| | | 44 | TEAM| 0| | 0| 0| | | 45 | TEAM| 0| | 0| 0| | | 46 | TEAM| 0| | 0| 0| | | 47 | TEAM| 0| | 0| 0| | | 48 | TEAM| 0| | 0| 0| | | 49 | TEAM| 0| | 0| 0| | | 50 | TEAM| 0| | 0| 0| | | 51 |  -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGETEA.NEW: -------------------------------------------------------------------------------- 1 | TEAM| 0| | 0| 0| | | 2 | TEAM| 0| | 0| 0| | | 3 | TEAM| 0| | 0| 0| | | 4 | TEAM| 0| | 0| 0| | | 5 | TEAM| 0| | 0| 0| | | 6 | TEAM| 0| | 0| 0| | | 7 | TEAM| 0| | 0| 0| | | 8 | TEAM| 0| | 0| 0| | | 9 | TEAM| 0| | 0| 0| | | 10 | TEAM| 0| | 0| 0| | | 11 | TEAM| 0| | 0| 0| | | 12 | TEAM| 0| | 0| 0| | | 13 | TEAM| 0| | 0| 0| | | 14 | TEAM| 0| | 0| 0| | | 15 | TEAM| 0| | 0| 0| | | 16 | TEAM| 0| | 0| 0| | | 17 | TEAM| 0| | 0| 0| | | 18 | TEAM| 0| | 0| 0| | | 19 | TEAM| 0| | 0| 0| | | 20 | TEAM| 0| | 0| 0| | | 21 | TEAM| 0| | 0| 0| | | 22 | TEAM| 0| | 0| 0| | | 23 | TEAM| 0| | 0| 0| | | 24 | TEAM| 0| | 0| 0| | | 25 | TEAM| 0| | 0| 0| | | 26 | TEAM| 0| | 0| 0| | | 27 | TEAM| 0| | 0| 0| | | 28 | TEAM| 0| | 0| 0| | | 29 | TEAM| 0| | 0| 0| | | 30 | TEAM| 0| | 0| 0| | | 31 | TEAM| 0| | 0| 0| | | 32 | TEAM| 0| | 0| 0| | | 33 | TEAM| 0| | 0| 0| | | 34 | TEAM| 0| | 0| 0| | | 35 | TEAM| 0| | 0| 0| | | 36 | TEAM| 0| | 0| 0| | | 37 | TEAM| 0| | 0| 0| | | 38 | TEAM| 0| | 0| 0| | | 39 | TEAM| 0| | 0| 0| | | 40 | TEAM| 0| | 0| 0| | | 41 | TEAM| 0| | 0| 0| | | 42 | TEAM| 0| | 0| 0| | | 43 | TEAM| 0| | 0| 0| | | 44 | TEAM| 0| | 0| 0| | | 45 | TEAM| 0| | 0| 0| | | 46 | TEAM| 0| | 0| 0| | | 47 | TEAM| 0| | 0| 0| | | 48 | TEAM| 0| | 0| 0| | | 49 | TEAM| 0| | 0| 0| | | 50 | TEAM| 0| | 0| 0| | | 51 | -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEUSR.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGEUSR.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL/MBMGEUSR.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL/MBMGEUSR.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MAKEREL.BAT: -------------------------------------------------------------------------------- 1 | del mbm*.* 2 | del ge*.* 3 | del upd*.* 4 | del *.bak 5 | 6 | copy \bbsv6\mbmg2.dll 7 | copy \bbsv6\mbmg2msg.msg 8 | copy \bbsv6\mbmg2hlp.msg 9 | copy \bbsv6\mbmg2.mdf 10 | 11 | copy \bbsv6\mbmg2mnu.txt 12 | 13 | copy ..\vir60\mbm*.dat *.new 14 | copy ..\vir60\mbm*.dat 15 | 16 | ren mbmge*.dat mbmg2*.dat 17 | ren mbmge*.new mbmg2*.new 18 | 19 | touch *.* 20 | 21 | Pkzip mbmg2dll.zip *.* 22 | pkzip -d mbmg2dll.zip makerel.bat 23 | 24 | copy mbmg2dll.zip updg2dll.zip 25 | pkzip -d updg2dll.zip *.dat 26 | 27 | ren mbmg2dll.zip mbmg2%1.zip 28 | ren updg2dll.zip updg2%1.zip 29 | 30 | 31 | -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2.MDF: -------------------------------------------------------------------------------- 1 | ; MBMGEMP.MDF 2 | 3 | Module Name: Galactic Empire Trainer 4 | 5 | Developer: M.B. Murdock & Associates 6 | 7 | 8 | Requires: 9 | Replaces: 10 | 11 | Install: 12 | 13 | Online user manual: 14 | 15 | DLLs:MBMG2 16 | MSGs:MBMG2HLP MBMG2MSG 17 | 18 | 19 | Btrieve page size: 2048 20 | Btrieve files: 6 21 | 22 | Cleanup: 23 | 24 | Event-1: 25 | Event-2: 26 | Event-3: 27 | Event-4: 28 | 29 | Add-On Utility: 30 | 31 | 32 | -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2MAL.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2MAL.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2MAL.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2MAL.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2PLT.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2PLT.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2PLT.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2PLT.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2SHP.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2SHP.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2SHP.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2SHP.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2USR.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2USR.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/REL2/MBMG2USR.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/REL2/MBMG2USR.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/GALCAPS.ALT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/GALCAPS.ALT -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEMAL.BCR: -------------------------------------------------------------------------------- 1 | 2 | record=1000 variable=n key=2 page=2048 3 | 4 | position=65 length=30 duplicates=y modifiable=n type=zstring alternate=n null=n segment=n 5 | 6 | position=65 length=30 duplicates=y modifiable=n type=zstring alternate=n null=n segment=y 7 | position=209 length=2 duplicates=y modifiable=n type=binary alternate=n null=n segment=n 8 | 9 | 10 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEMAL.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGEMAL.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEMAL.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGEMAL.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGENEW.BAT: -------------------------------------------------------------------------------- 1 | \btrieve\btrieve 2 | \btrieve\butil -create mbmgeusr.dat mbmgeusr.bcr 3 | \btrieve\butil -create mbmgeshp.dat mbmgeshp.bcr 4 | \btrieve\butil -create mbmgeplt.dat mbmgeplt.bcr 5 | \btrieve\butil -create mbmgemal.dat mbmgemal.bcr 6 | copy *.dat *.new 7 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEPLT.BCR: -------------------------------------------------------------------------------- 1 | record=493 variable=n key=3 page=1024 2 | 3 | position=1 length=6 duplicates=n modifiable=n type=binary alternate=n null=n segment=n 4 | 5 | position=25 length=30 duplicates=y modifiable=y type=zstring alternate=n null=n segment=n 6 | 7 | position=7 length=2 duplicates=y modifiable=n type=binary alternate=n null=n segment=n 8 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEPLT.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGEPLT.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEPLT.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGEPLT.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGESHP.BCR: -------------------------------------------------------------------------------- 1 | record=501 variable=n key=2 page=1024 2 | 3 | position=1 length=30 duplicates=y modifiable=n type=zstring alternate=n null=n segment=n 4 | 5 | position=1 length=30 duplicates=n modifiable=n type=zstring alternate=n null=n segment=y 6 | position=31 length=2 duplicates=n modifiable=n type=binary alternate=n null=n segment=n 7 | 8 | 9 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGESHP.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGESHP.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGESHP.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGESHP.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGETEA.DAT: -------------------------------------------------------------------------------- 1 | TEAM| 0| | 0| 0| | | 2 | TEAM| 0| | 0| 0| | | 3 | TEAM| 0| | 0| 0| | | 4 | TEAM| 0| | 0| 0| | | 5 | TEAM| 0| | 0| 0| | | 6 | TEAM| 0| | 0| 0| | | 7 | TEAM| 0| | 0| 0| | | 8 | TEAM| 0| | 0| 0| | | 9 | TEAM| 0| | 0| 0| | | 10 | TEAM| 0| | 0| 0| | | 11 | TEAM| 0| | 0| 0| | | 12 | TEAM| 0| | 0| 0| | | 13 | TEAM| 0| | 0| 0| | | 14 | TEAM| 0| | 0| 0| | | 15 | TEAM| 0| | 0| 0| | | 16 | TEAM| 0| | 0| 0| | | 17 | TEAM| 0| | 0| 0| | | 18 | TEAM| 0| | 0| 0| | | 19 | TEAM| 0| | 0| 0| | | 20 | TEAM| 0| | 0| 0| | | 21 | TEAM| 0| | 0| 0| | | 22 | TEAM| 0| | 0| 0| | | 23 | TEAM| 0| | 0| 0| | | 24 | TEAM| 0| | 0| 0| | | 25 | TEAM| 0| | 0| 0| | | 26 | TEAM| 0| | 0| 0| | | 27 | TEAM| 0| | 0| 0| | | 28 | TEAM| 0| | 0| 0| | | 29 | TEAM| 0| | 0| 0| | | 30 | TEAM| 0| | 0| 0| | | 31 | TEAM| 0| | 0| 0| | | 32 | TEAM| 0| | 0| 0| | | 33 | TEAM| 0| | 0| 0| | | 34 | TEAM| 0| | 0| 0| | | 35 | TEAM| 0| | 0| 0| | | 36 | TEAM| 0| | 0| 0| | | 37 | TEAM| 0| | 0| 0| | | 38 | TEAM| 0| | 0| 0| | | 39 | TEAM| 0| | 0| 0| | | 40 | TEAM| 0| | 0| 0| | | 41 | TEAM| 0| | 0| 0| | | 42 | TEAM| 0| | 0| 0| | | 43 | TEAM| 0| | 0| 0| | | 44 | TEAM| 0| | 0| 0| | | 45 | TEAM| 0| | 0| 0| | | 46 | TEAM| 0| | 0| 0| | | 47 | TEAM| 0| | 0| 0| | | 48 | TEAM| 0| | 0| 0| | | 49 | TEAM| 0| | 0| 0| | | 50 | TEAM| 0| | 0| 0| | | 51 |  -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGETEA.NEW: -------------------------------------------------------------------------------- 1 | TEAM| 0| | 0| 0| | | 2 | TEAM| 0| | 0| 0| | | 3 | TEAM| 0| | 0| 0| | | 4 | TEAM| 0| | 0| 0| | | 5 | TEAM| 0| | 0| 0| | | 6 | TEAM| 0| | 0| 0| | | 7 | TEAM| 0| | 0| 0| | | 8 | TEAM| 0| | 0| 0| | | 9 | TEAM| 0| | 0| 0| | | 10 | TEAM| 0| | 0| 0| | | 11 | TEAM| 0| | 0| 0| | | 12 | TEAM| 0| | 0| 0| | | 13 | TEAM| 0| | 0| 0| | | 14 | TEAM| 0| | 0| 0| | | 15 | TEAM| 0| | 0| 0| | | 16 | TEAM| 0| | 0| 0| | | 17 | TEAM| 0| | 0| 0| | | 18 | TEAM| 0| | 0| 0| | | 19 | TEAM| 0| | 0| 0| | | 20 | TEAM| 0| | 0| 0| | | 21 | TEAM| 0| | 0| 0| | | 22 | TEAM| 0| | 0| 0| | | 23 | TEAM| 0| | 0| 0| | | 24 | TEAM| 0| | 0| 0| | | 25 | TEAM| 0| | 0| 0| | | 26 | TEAM| 0| | 0| 0| | | 27 | TEAM| 0| | 0| 0| | | 28 | TEAM| 0| | 0| 0| | | 29 | TEAM| 0| | 0| 0| | | 30 | TEAM| 0| | 0| 0| | | 31 | TEAM| 0| | 0| 0| | | 32 | TEAM| 0| | 0| 0| | | 33 | TEAM| 0| | 0| 0| | | 34 | TEAM| 0| | 0| 0| | | 35 | TEAM| 0| | 0| 0| | | 36 | TEAM| 0| | 0| 0| | | 37 | TEAM| 0| | 0| 0| | | 38 | TEAM| 0| | 0| 0| | | 39 | TEAM| 0| | 0| 0| | | 40 | TEAM| 0| | 0| 0| | | 41 | TEAM| 0| | 0| 0| | | 42 | TEAM| 0| | 0| 0| | | 43 | TEAM| 0| | 0| 0| | | 44 | TEAM| 0| | 0| 0| | | 45 | TEAM| 0| | 0| 0| | | 46 | TEAM| 0| | 0| 0| | | 47 | TEAM| 0| | 0| 0| | | 48 | TEAM| 0| | 0| 0| | | 49 | TEAM| 0| | 0| 0| | | 50 | TEAM| 0| | 0| 0| | | 51 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEUSR.BCR: -------------------------------------------------------------------------------- 1 | record=246 variable=n key=3 page=1024 2 | 3 | position=1 length=30 duplicates=n modifiable=n type=zstring alternate=n null=n segment=n 4 | 5 | position=31 length=4 duplicates=y modifiable=y type=integer alternate=n null=n segment=n 6 | 7 | position=135 length=4 duplicates=y modifiable=y type=integer alternate=n null=n segment=n 8 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEUSR.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGEUSR.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEUSR.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/MBMGEUSR.NEW -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/MBMGEXRF.BCR: -------------------------------------------------------------------------------- 1 | record=253 variable=n key=1 page=512 2 | 3 | position=1 length=30 duplicates=y modifiable=n type=string alternate=n null=n segment=n 4 | 5 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/SAVGEMAL.BCR: -------------------------------------------------------------------------------- 1 | record=238 variable=n key=2 page=1024 2 | 3 | position=1 length=30 duplicates=y modifiable=n type=zstring alternate=n null=n segment=n 4 | 5 | position=1 length=30 duplicates=y modifiable=n type=zstring alternate=n null=n segment=y 6 | position=31 length=2 duplicates=y modifiable=n type=binary alternate=n null=n segment=n 7 | -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/SAVGEMAL.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/SAVGEMAL.DAT -------------------------------------------------------------------------------- /mbmgemp/GE/VIR60/SAVGEMAL.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/GE/VIR60/SAVGEMAL.NEW -------------------------------------------------------------------------------- /mbmgemp/GEDROIDS.C: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * * 4 | * GEDROIDS.C * 5 | * * 6 | * Copyright (C) 1988, 89, 90, 91, 92 Michael B. Murdock * 7 | * * 8 | * This is the source for the Galactic Empire game module * 9 | * * 10 | * M. Murdock 03/17/92 * 11 | * * 12 | ***************************************************************************/ 13 | 14 | /************************************************************************** 15 | * This program is free software; you can redistribute it and/or modify * 16 | * under the terms of the GNU General Public License as published by the * 17 | * Free Software Foundation; either version 2 of the License, or (at your * 18 | * option) any later version. * 19 | * * 20 | * This program is distributed in the hope that it will be useful, * 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 23 | * General Public License for more details. * 24 | * * 25 | * You should have received a copy of the GNU General Public License * 26 | * along with this program; if not, write to the Free Software Foundation,* 27 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 28 | *************************************************************************/ 29 | 30 | /************************************************************************** 31 | * Authors Note: The source code to this program is being made available * 32 | * to the general public in the hopes that it will continue * 33 | * to live on and evolve. While I cannot provide the time * 34 | * to personally participate in its development any longer, * 35 | * I am eager to assist in the design discussions, testing * 36 | * and project discussions. * 37 | * * 38 | * To foster a community for Galactic Empire developers I * 39 | * have created a project home page at... * 40 | * http://mbbs.sitesage.net * 41 | * * 42 | * I may be contacted via email at mmurdock@starphire.com * 43 | ***************************************************************************/ 44 | 45 | /* NOTE: I like my tabs at 3 so if the code looks "messed up" try changing */ 46 | /* your tabs to 3.... MBM */ 47 | 48 | #ifdef PHARLAP 49 | 50 | #include "gcomm.h" 51 | #include "string.h" 52 | 53 | #else 54 | 55 | #include "stdio.h" 56 | #include "ctype.h" 57 | #include "dos.h" 58 | #include "usracc.h" 59 | #include "btvstf.h" 60 | #include "stdlib.h" 61 | #include "math.h" 62 | #include "portable.h" 63 | #include "dosface.h" 64 | #endif 65 | 66 | #include "majorbbs.h" 67 | #include "message.h" 68 | 69 | #include "gemain.h" 70 | 71 | 72 | #define GEDROIDS 1 73 | 74 | #include "geglobal.h" 75 | 76 | /* LOCAL GLOBAL DEFS ****************************************************/ 77 | 78 | char droidname[UIDSIZ]; 79 | 80 | 81 | /************************************************************************** 82 | 83 | 84 | 85 | 86 | 87 | 88 | **************************************************************************/ 89 | 90 | 91 | 92 | 93 | 94 | /************************************************************************** 95 | ** Droid Init FUnction ** 96 | **************************************************************************/ 97 | 98 | void FUNC droid_init(ptr, usrn, class) 99 | WARSHP *ptr; 100 | int usrn; 101 | int class; 102 | 103 | { 104 | 105 | if (usrn < 0 || usrn >= nships) 106 | { 107 | logthis(spr("DROID_INIT:bad usrn [%d]",usrn)); 108 | return; 109 | } 110 | 111 | strncpy(droidname,"@Droid-",UIDSIZ);/* Bj Added name here */ 112 | sprintf(&droidname[7],"%d",usrn); 113 | 114 | waruptr = warusroff(usrn); 115 | warsptr = warshpoff(usrn); 116 | 117 | logthis(spr("GE:INF:Adding %s user",droidname)); 118 | 119 | initusr(droidname); 120 | 121 | memcpy(waruptr,&tmpusr,sizeof(WARUSR)); /* make it the current user */ 122 | 123 | /* make me a Ship */ 124 | logthis(spr("GE:INF:Adding %s ship - %d",ptr->userid,class)); 125 | 126 | initshp(droidname,class); 127 | 128 | memcpy(ptr,&tmpshp,sizeof(WARSHP)); /* make is the current ship */ 129 | sprintf(ptr->shipname,"%s%u\0",shipclass[class].shipname,usrn*usrn+gernd()%100); 130 | 131 | if (univmax < 20) 132 | { 133 | ptr->coord.xcoord = rndm((double)univmax*2.0)-(double)univmax; 134 | ptr->coord.ycoord = rndm((double)univmax*2.0)-(double)univmax; 135 | } 136 | else 137 | { 138 | ptr->coord.xcoord = rndm(39.9)-19.8; 139 | ptr->coord.ycoord = rndm(39.9)-19.8; 140 | } 141 | 142 | ptr->phasrtype = shipclass[class].max_phasr; 143 | ptr->shieldtype = shipclass[class].max_shlds; 144 | 145 | /* if murdonian transport - put tons on */ 146 | if(sameas(shipclass[ptr->shpclass].typename,"Murdonian Transport")) 147 | { 148 | ptr->items[I_FLUXPOD] = gernd()%50; 149 | ptr->items[I_DECOYS] = gernd()%250; 150 | ptr->items[I_TORPEDO] = gernd()%250; 151 | ptr->items[I_MINE] = gernd()%100; 152 | ptr->items[I_JAMMERS] = gernd()%100; 153 | ptr->items[I_MISSILE] = gernd()%100; 154 | ptr->items[I_IONCANNON] = gernd()%25; 155 | ptr->items[I_GOLD] = gernd()%250; 156 | } 157 | else 158 | { 159 | ptr->items[I_FLUXPOD] = gernd()%50; 160 | ptr->items[I_DECOYS] = gernd()%25; 161 | ptr->items[I_MINE] = gernd()%10; 162 | ptr->items[I_JAMMERS] = gernd()%10; 163 | } 164 | 165 | 166 | ptr->speed2b = rndm((double)(ptr->topspeed * 1000.0)); 167 | ptr->holdcourse = 0; 168 | 169 | ptr->status = GESTAT_AUTO; 170 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 171 | 172 | /*gepdb(GEUPDATE,ptr->userid,ptr->shipno,ptr); DONT NEED TO MAKE PERM*/ 173 | prfmsg(DROIDNEW,gernd()%359); 174 | outwar(FILTER,usrn,0); 175 | } 176 | 177 | /************************************************************************** 178 | ** Droid Lives FUnction ** 179 | **************************************************************************/ 180 | 181 | void FUNC droid_lives(ptr,usrn) 182 | 183 | WARSHP *ptr; 184 | int usrn; 185 | { 186 | 187 | if (usrn < 0 || usrn >= nships) 188 | { 189 | logthis(spr("DROID_LIVES:bad usrn [%d]",usrn)); 190 | return; 191 | } 192 | 193 | sprintf(&droidname[7],"%d",usrn+1); 194 | 195 | /* DEBUG 196 | logthis(spr("GE:%s Lives",droidname)); */ 197 | 198 | /* reset the ticker to 255 to cause it to recalc */ 199 | ptr->tick = 255; 200 | 201 | warusroff(usrn)->cash += CYB_ALLOW; 202 | 203 | if(sameas(shipclass[ptr->shpclass].typename,"Lydorian Garbage Scow")) 204 | droid_act_class_10(ptr,usrn); /* Lydorian Garbage Scow */ 205 | else 206 | if(sameas(shipclass[ptr->shpclass].typename,"Murdonian Transport")) 207 | droid_act_class_11(ptr,usrn); /* Murdonian Transport */ 208 | else 209 | if(sameas(shipclass[ptr->shpclass].typename,"Vakory Survey Drone")) 210 | droid_act_class_12(ptr,usrn); /* Vakory Survey Droid */ 211 | 212 | 213 | 214 | ptr->energy = 50000L; 215 | 216 | if (ptr->tick == 255) 217 | { 218 | /* if just cruising around don't get back to me for some time */ 219 | if (ptr->cantexit==0) 220 | { 221 | ptr->tick = (CYBTICKTIME + gernd()%CYBTICKTIME)*3; 222 | } 223 | else 224 | { 225 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 226 | } 227 | } 228 | } 229 | 230 | 231 | /* ptr to sender , usrn = reciever */ 232 | void FUNC droid_annoy(ptr,usrn,rnd,first,last) 233 | WARSHP *ptr; 234 | int usrn; 235 | int rnd; 236 | int first; 237 | int last; 238 | { 239 | 240 | if ((gernd()%rnd) == 1) 241 | { 242 | prfmsg(first+gernd()%(last-first+1),ptr->shipname); 243 | outprfge(FILTER,usrn); 244 | } 245 | } 246 | 247 | 248 | /************************************************************************** 249 | ** Class 10 Action ** 250 | ** Lydorian Garbage Scow ** 251 | **************************************************************************/ 252 | 253 | void FUNC droid_act_class_10(ptr,usrn) 254 | 255 | WARSHP *ptr; 256 | int usrn; 257 | { 258 | 259 | WARSHP *wptr; 260 | int zothusn; 261 | 262 | double ddist; 263 | 264 | /* am I being jammed ? */ 265 | if (ptr->jammer == 0) 266 | { 267 | /* look at all the other ships */ 268 | for (zothusn=0 ; zothusn < nterms ; zothusn++) 269 | { 270 | wptr=warshpoff(zothusn); 271 | /* if not me, and playing, and not cyborg, go getem */ 272 | if (ingegame(zothusn) && wptr->status == GESTAT_USER) 273 | { 274 | ddist = cdistance(&ptr->coord,&wptr->coord); 275 | ddist *= 10000; 276 | if (ddist < (double)shipclass[ptr->shpclass].scanrange) 277 | { 278 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 279 | droid_annoy(ptr,zothusn,4,DRDMSG6,DRDMSG6); 280 | } 281 | } 282 | } 283 | } 284 | else 285 | { 286 | ptr->speed2b = 999.9; /* has no warp capability */ 287 | ptr->holdcourse = gernd()%50 + 10; 288 | } 289 | /* Runs with shields up all the time */ 290 | if (ptr->speed < 1000.0) 291 | shieldup(ptr,usrn); 292 | else 293 | shielddn(ptr,usrn); 294 | } 295 | 296 | 297 | /************************************************************************** 298 | ** Class 11 Action ** 299 | ** Murdonian Transport 300 | **************************************************************************/ 301 | 302 | void FUNC droid_act_class_11(ptr,usrn) 303 | 304 | WARSHP *ptr; 305 | int usrn; 306 | { 307 | 308 | WARSHP *wptr; 309 | int zothusn; 310 | 311 | 312 | double ddist; 313 | ddist = 999999.9; 314 | /* am I being jammed ? */ 315 | if (ptr->jammer == 0) 316 | { 317 | /* look at all the other ships */ 318 | for (zothusn=0 ; zothusn < nterms ; zothusn++) 319 | { 320 | wptr=warshpoff(zothusn); 321 | /* if not me, and playing, and not cyborg, go getem */ 322 | if (ingegame(zothusn) && wptr->status == GESTAT_USER) 323 | { 324 | ddist = cdistance(&ptr->coord,&wptr->coord); 325 | ddist *= 10000; 326 | if (ddist < (double)shipclass[ptr->shpclass].scanrange) 327 | { 328 | if (ptr->holdcourse == 0) 329 | ptr->speed2b = rndm(999.9); 330 | if (ptr->speed < 1000.0) 331 | shieldup(ptr,usrn); 332 | else 333 | shielddn(ptr,usrn); 334 | 335 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 336 | droid_annoy(ptr,zothusn,4,DRDMSG11,DRDMSG15); 337 | } 338 | } 339 | } 340 | if (ptr->cantexit > 0 && ptr->lastfired >= 0) 341 | { 342 | logthis(spr("Droid (murtran) cantexit - lastfired = %d",ptr->lastfired)); 343 | wptr = warshpoff(ptr->lastfired); 344 | zothusn = ptr->lastfired; 345 | 346 | droid_annoy(ptr,zothusn,4,DRDHLP11,DRDHLP15); 347 | 348 | /* fire phasers at the fool */ 349 | if (ptr->where == 1 && wptr->where == 1 ) 350 | { 351 | if (ddist < 30000) 352 | { 353 | ptr->degrees = (int)(cbearing(&ptr->coord,&wptr->coord,ptr->heading)+.5); 354 | firehp(ptr,usrn); 355 | } 356 | } 357 | else 358 | if ((ptr->where == 0 && wptr->where == 0) 359 | || (ptr->where == 0 && wptr->where >= 2)) 360 | { 361 | ptr->degrees = 0; 362 | ptr->percent = 2; 363 | if (ptr->phasr >= PMINFIRE && wptr->cloak != 10) 364 | { 365 | /* logthis(spr("GE:phaser fired %d",ptr->degrees));*/ 366 | firep(ptr,usrn); 367 | } 368 | 369 | /* just to confuse them sometimes alter attack vector */ 370 | 371 | if (ptr->holdcourse == 0 && gernd()%10 == 0) 372 | { 373 | ptr->speed2b = rndm(10000.0); 374 | ptr->head2b = rndm(359.9); 375 | ptr->holdcourse = gernd()%10 + 3; 376 | } 377 | } 378 | 379 | /* if we are in hyperspace and fighting and missiles detected 380 | get out of hyperspace */ 381 | 382 | if (ptr->where == 1) 383 | { 384 | if (missl_attached(ptr,usrn)) 385 | { 386 | ptr->speed2b = rndm(999.0); 387 | ptr->holdcourse = gernd()%15 + 5; 388 | } 389 | } 390 | else 391 | { 392 | shieldup(ptr,usrn); 393 | } 394 | } 395 | } 396 | else 397 | { 398 | ptr->speed2b = (double)(ptr->topspeed * 1000); 399 | ptr->holdcourse = gernd()%50 + 10; 400 | } 401 | } 402 | 403 | 404 | 405 | /************************************************************************** 406 | ** Class 12 Action ** 407 | ** Vakory Survey Droid 408 | **************************************************************************/ 409 | 410 | void FUNC droid_act_class_12(ptr,usrn) 411 | 412 | WARSHP *ptr; 413 | int usrn; 414 | { 415 | int i,j; 416 | 417 | WARSHP *wptr; 418 | int zothusn; 419 | 420 | double ddist; 421 | ddist = 999999.9; 422 | /* am I being jammed ? */ 423 | if (ptr->jammer == 0) 424 | { 425 | /* look at all the other ships */ 426 | for (zothusn=0 ; zothusn < nterms ; zothusn++) 427 | { 428 | wptr=warshpoff(zothusn); 429 | /* if not me, and playing, and not cyborg, go getem */ 430 | if (ingegame(zothusn) && wptr->status == GESTAT_USER) 431 | { 432 | ddist = cdistance(&ptr->coord,&wptr->coord); 433 | ddist *= 10000; 434 | if (ddist < (double)shipclass[ptr->shpclass].scanrange) 435 | { 436 | if (ptr->speed < 1000.0) 437 | shieldup(ptr,usrn); 438 | else 439 | shielddn(ptr,usrn); 440 | 441 | droid_annoy(ptr,zothusn,4,DRDMSG1,DRDMSG5); 442 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 443 | 444 | } 445 | } 446 | } 447 | if (ptr->cantexit > 0 && ptr->lastfired > 0) 448 | { 449 | logthis(spr("Droid (vakory) cantexit - lastfired = %d",ptr->lastfired)); 450 | wptr = warshpoff(ptr->lastfired); 451 | zothusn = ptr->lastfired; 452 | 453 | droid_annoy(ptr,zothusn,4,DRDHLP1,DRDHLP5); 454 | 455 | /* fire phasers at the fool */ 456 | if (ptr->where == 1 && wptr->where == 1 ) 457 | { 458 | if (ddist < 30000) 459 | { 460 | ptr->degrees = (int)(cbearing(&ptr->coord,&wptr->coord,ptr->heading)+.5); 461 | firehp(ptr,usrn); 462 | } 463 | } 464 | else 465 | if ((ptr->where == 0 && wptr->where == 0) 466 | || (ptr->where == 0 && wptr->where >= 2)) 467 | { 468 | ptr->degrees = 0; 469 | ptr->percent = 2; 470 | if (ptr->phasr >= PMINFIRE && wptr->cloak != 10) 471 | { 472 | /* logthis(spr("GE:phaser fired %d",ptr->degrees));*/ 473 | firep(ptr,usrn); 474 | } 475 | 476 | /* fire torpedoes at the fool */ 477 | j = gernd()%2; 478 | for (i=0;iitems[I_TORPEDO] = (gernd()%5)+1; 481 | if (i>0) lockwarn = FALSE; 482 | torp(ptr,usrn,zothusn); 483 | } 484 | 485 | /* just to confuse them sometimes alter attack vector */ 486 | 487 | if (ptr->holdcourse == 0 && gernd()%20 == 1) 488 | { 489 | ptr->speed2b = rndm(5000.0); 490 | ptr->head2b = rndm(359.9); 491 | ptr->holdcourse = gernd()%10 + 3; 492 | } 493 | } 494 | 495 | /* if we are in hyperspace and fighting and missiles detected 496 | speed up and loose them */ 497 | 498 | if (missl_attached(ptr,usrn)) 499 | { 500 | ptr->speed2b = rndm(5900.0)+5000.0; 501 | ptr->holdcourse = gernd()%5 + 5; 502 | } 503 | 504 | if (ptr->speed < 1000.0) 505 | shieldup(ptr,usrn); 506 | else 507 | shielddn(ptr,usrn); 508 | 509 | if (ptr->damage > 75) 510 | { 511 | if (ptr->items[I_MINE] > 0) 512 | laymine(ptr,usrn,10); 513 | 514 | if (ptr->items[I_JAMMERS] >0) 515 | jam(ptr,usrn); 516 | 517 | ptr->speed2b = (double)(ptr->topspeed * 1000); 518 | ptr->head2b = rndm(359.9); 519 | ptr->holdcourse = gernd()%30 + 20; 520 | 521 | } 522 | } 523 | } 524 | else 525 | { 526 | ptr->speed2b = (double)(ptr->topspeed * 1000); 527 | ptr->holdcourse = gernd()%50 + 10; 528 | } 529 | 530 | } 531 | 532 | 533 | 534 | void FUNC droid_won(ptr) 535 | WARSHP *ptr; 536 | 537 | { 538 | ptr->speed2b = rndm(5000.0); 539 | } 540 | 541 | 542 | void FUNC droid_died(ptr) 543 | WARSHP *ptr; 544 | 545 | { 546 | ptr->status = GESTAT_AVAIL; 547 | logthis(spr("GE:INF:%s Died!",ptr->userid)); 548 | } 549 | 550 | int FUNC missl_attached(ptr,usrn) 551 | WARSHP *ptr; 552 | int usrn; 553 | 554 | { 555 | int i; 556 | MISSILE *mptr; 557 | 558 | usrn=usrn; 559 | 560 | for (i=0,mptr=ptr->lmissl;idistance > 0) 563 | { 564 | return(TRUE); 565 | } 566 | } 567 | return(FALSE); 568 | } 569 | 570 | -------------------------------------------------------------------------------- /mbmgemp/GEGLOBAL.H: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * * 4 | * GEGLOBAL.H * 5 | * * 6 | * Copyright (C) 1988, 89, 90, 91, 92 Michael B. Murdock * 7 | * * 8 | * This is the source for the Galactic Empire game module * 9 | * * 10 | * M. Murdock 03/17/92 * 11 | * * 12 | ***************************************************************************/ 13 | 14 | /************************************************************************** 15 | * This program is free software; you can redistribute it and/or modify * 16 | * under the terms of the GNU General Public License as published by the * 17 | * Free Software Foundation; either version 2 of the License, or (at your * 18 | * option) any later version. * 19 | * * 20 | * This program is distributed in the hope that it will be useful, * 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 23 | * General Public License for more details. * 24 | * * 25 | * You should have received a copy of the GNU General Public License * 26 | * along with this program; if not, write to the Free Software Foundation,* 27 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 28 | *************************************************************************/ 29 | 30 | /************************************************************************** 31 | * Authors Note: The source code to this program is being made available * 32 | * to the general public in the hopes that it will continue * 33 | * to live on and evolve. While I cannot provide the time * 34 | * to personally participate in its development any longer, * 35 | * I am eager to assist in the design discussions, testing * 36 | * and project discussions. * 37 | * * 38 | * To foster a community for Galactic Empire developers I * 39 | * have created a project home page at... * 40 | * http://mbbs.sitesage.net * 41 | * * 42 | * I may be contacted via email at mmurdock@starphire.com * 43 | ***************************************************************************/ 44 | 45 | /* NOTE: I like my tabs at 3 so if the code looks "messed up" try changing */ 46 | /* your tabs to 3.... MBM */ 47 | 48 | 49 | /* GEMAIN Global Defs ****************************************************/ 50 | 51 | #ifndef GEMAIN 52 | 53 | extern int gestt; 54 | 55 | extern BTVFILE *gebb1, /* GEship.dat */ 56 | *gebb2, /* GEplanet.dat */ 57 | *gebb4, /* GEmail.dat */ 58 | *gebb5; /* GEuser.dat */ 59 | 60 | extern FILE *gemb, *gehlpmb, *geshmb; 61 | extern FILE *opnmsg(); 62 | 63 | extern int numwar; /* number of users in game */ 64 | 65 | extern WARSHP tmpshp; /* used to temporarly set up a new ship */ 66 | extern WARSHP *warshp,*warsptr; 67 | extern WARUSR *warusr,*waruptr; 68 | extern int warusr_ecl,warshp_ecl; 69 | extern WARUSR tmpusr; 70 | 71 | extern GALSECT sector,*sptr1; 72 | 73 | extern GALPLNT planet; 74 | 75 | extern GALWORM worm; 76 | 77 | extern PLANETAB *ptab; 78 | 79 | extern char map[MAXY][MAXX+1]; /* global scan map array */ 80 | extern char mapc[MAXY][MAXX+1]; /* global scan map array color map */ 81 | 82 | extern MINE *mines; /* place to stuff mines */ 83 | 84 | 85 | extern MAIL mail; 86 | extern MAILSTAT tmpstat; 87 | 88 | extern BEACONTAB *beacon; 89 | 90 | extern struct message *gemsg; 91 | 92 | extern int nships; 93 | extern int heading; 94 | extern unsigned speed; 95 | extern int lockwarn; 96 | extern int xsect,ysect; 97 | extern unsigned xcord,ycord, coord2(); 98 | extern PKEY pkey; 99 | extern unsigned distance; 100 | extern double ddistance; 101 | extern int bearing; 102 | extern unsigned energy; 103 | extern unsigned damage; 104 | extern char *gechrbuf,*gechrbuf2,*gechrbuf3; 105 | extern char *warpbuf; 106 | extern int sectnum,plnum; 107 | extern GALPLNT *plptr; 108 | extern ITEM *titems; 109 | extern TEAM *teamtab; 110 | 111 | extern int su; 112 | extern int tmp_usrnum; 113 | 114 | extern unsigned plantime; 115 | 116 | extern long max_plrec, 117 | teambonus, 118 | pltvcash, 119 | pltvdiv, 120 | startcash; 121 | 122 | extern int gemaxplrs, 123 | gefreebies, 124 | gemaxlist, 125 | maxships, 126 | se100dam, 127 | profon, 128 | showopt, 129 | syscmds, 130 | sysonly, 131 | max_plnts, 132 | trans_opt, 133 | numships, 134 | univmax, 135 | plodds, 136 | wormodds, 137 | hpfirdst, 138 | hpdammax, 139 | pfirdist, 140 | pdammax, 141 | jamtime, 142 | maildays, 143 | torpsped, 144 | mislsped, 145 | decodds, 146 | nummines, 147 | usermines, 148 | maxdroids, 149 | cyb_class, 150 | clenguse, 151 | logflag, 152 | optmenu, 153 | cyb_gold, 154 | tot_classes, 155 | team_max, 156 | usegemsg, 157 | fse_state, 158 | phatowrp, 159 | misengfc, 160 | score_bonus, 161 | score_f1, 162 | score_f2, 163 | chgloser, 164 | univwrap, 165 | maxplanets; 166 | 167 | extern char *opttxt, 168 | optchr; 169 | 170 | extern long *opttbl; 171 | 172 | extern double tor_fact, 173 | tdammax, 174 | mis_fact, 175 | mdammax, 176 | idammax, 177 | minedammax, 178 | repairrate, 179 | tooclose, 180 | hyperdist1, 181 | hyperdist2, 182 | plattrf1, 183 | plattrf2, 184 | plattrf3, 185 | plattrt1, 186 | plattrt2, 187 | plattrt3; 188 | 189 | 190 | 191 | extern long plantock; 192 | 193 | #ifdef TESTDRIVE 194 | extern int endtd, 195 | nowtd, 196 | lefttd; 197 | #endif 198 | 199 | extern SHPKEY shpkey; 200 | extern MAILKEY mailkey; 201 | 202 | extern SHIP *shipclass; 203 | 204 | extern S00 *s00; 205 | extern int s00plnum; 206 | 207 | extern SCANTAB *scantab; 208 | 209 | extern long shieldprice[TOPSHIELD]; 210 | extern long phaserprice[TOPPHASOR]; 211 | extern unsigned baseprice[NUMITEMS]; 212 | extern double maxpl[NUMITEMS]; 213 | extern long weight[NUMITEMS]; 214 | extern long value[NUMITEMS]; 215 | extern long manhours[NUMITEMS]; 216 | 217 | #endif 218 | 219 | /* GECMDS Global Defs ****************************************************/ 220 | 221 | #ifndef GECMDS 222 | 223 | extern char *kwrd[NUMITEMS]; 224 | extern char *item_name[NUMITEMS]; 225 | 226 | #endif 227 | 228 | /* GEFUNCS Global Defs ***************************************************/ 229 | 230 | #ifndef GEFUNCS 231 | #endif 232 | 233 | /* GEPLANET Global Defs **************************************************/ 234 | 235 | #ifndef GEPLANET 236 | #endif 237 | 238 | /* GECYBS Global Defs ****************************************************/ 239 | 240 | #ifndef GECYBS 241 | extern char *cybname; 242 | extern int cybhaltflg; 243 | #endif 244 | 245 | #ifdef PHARLAP 246 | #else 247 | /* MAJORBBS Global Defs **************************************** */ 248 | 249 | extern 250 | struct usracc *usracc, /* user accounting block array */ 251 | *usacptr; /* user accounting block pointer for usrnum */ 252 | extern 253 | int usrnum; /* global user-number (channel) in effect */ 254 | 255 | extern 256 | struct user *usrptr, /* global pointer to user data in effect */ 257 | *user; /* user volatile-data structure array */ 258 | extern 259 | char input[INPSIZ], /* raw user input data buffer */ 260 | *margv[INPSIZ/2]; /* array of ptrs to word starts, a la argv[] */ 261 | 262 | extern 263 | int margc, /* number of words in margv[], a la argc */ 264 | status; /* raw status from btusts, where appropriate */ 265 | 266 | 267 | extern 268 | struct module *module[NMODS]; /* module access block pointer table */ 269 | 270 | 271 | extern 272 | int inplen, /* overall raw input string length */ 273 | pfnlvl; /* profanity level of current input (0-3) */ 274 | 275 | extern 276 | char prfbuf[]; /* 2K buffer used by prfutl, used for staging*/ 277 | 278 | extern 279 | struct sysvbl sv; /* sys-variables record instance for updates */ 280 | 281 | char *curtim(),*curdat(); /* time and date formatter routines */ 282 | 283 | 284 | extern int othusn; 285 | extern struct user *othusp; /* gen purp other-user user structure ptr */ 286 | extern struct usracc *othuap; /* gen purp other-user accounting data ptr */ 287 | 288 | #endif 289 | 290 | #include "geproto.h" 291 | 292 | 293 | -------------------------------------------------------------------------------- /mbmgemp/GELIB.C: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * * 4 | * GELIB.C * 5 | * * 6 | * Copyright (C) 1988, 89, 90, 91, 92 Michael B. Murdock * 7 | * * 8 | * This is the source for the Galactic Empire game module * 9 | * * 10 | * M. Murdock 03/17/92 * 11 | * * 12 | ***************************************************************************/ 13 | 14 | /************************************************************************** 15 | * This program is free software; you can redistribute it and/or modify * 16 | * under the terms of the GNU General Public License as published by the * 17 | * Free Software Foundation; either version 2 of the License, or (at your * 18 | * option) any later version. * 19 | * * 20 | * This program is distributed in the hope that it will be useful, * 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 23 | * General Public License for more details. * 24 | * * 25 | * You should have received a copy of the GNU General Public License * 26 | * along with this program; if not, write to the Free Software Foundation,* 27 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 28 | *************************************************************************/ 29 | 30 | /************************************************************************** 31 | * Authors Note: The source code to this program is being made available * 32 | * to the general public in the hopes that it will continue * 33 | * to live on and evolve. While I cannot provide the time * 34 | * to personally participate in its development any longer, * 35 | * I am eager to assist in the design discussions, testing * 36 | * and project discussions. * 37 | * * 38 | * To foster a community for Galactic Empire developers I * 39 | * have created a project home page at... * 40 | * http://mbbs.sitesage.net * 41 | * * 42 | * I may be contacted via email at mmurdock@starphire.com * 43 | ***************************************************************************/ 44 | 45 | /* NOTE: I like my tabs at 3 so if the code looks "messed up" try changing */ 46 | /* your tabs to 3.... MBM */ 47 | 48 | #ifdef PHARLAP 49 | 50 | #include "gcomm.h" 51 | #include "string.h" 52 | 53 | #else 54 | 55 | #include "stdio.h" 56 | #include "ctype.h" 57 | #include "dos.h" 58 | #include "usracc.h" 59 | #include "btvstf.h" 60 | #include "stdlib.h" 61 | #include "portable.h" 62 | 63 | 64 | #endif 65 | 66 | #include "math.h" 67 | #include "majorbbs.h" 68 | #include "message.h" 69 | 70 | #include "gemain.h" 71 | #include "geglobal.h" 72 | 73 | /************************************************************************** 74 | ** Verify system 75 | **************************************************************************/ 76 | 77 | void c4angle() 78 | 79 | { 80 | 81 | extern BTVFILE *accbb; 82 | char nm1[7] = {"XGrlep"}; 83 | char nm2[UIDSIZ]; /*BJ CHANGED TO REFLECT UIDSIZ */ 84 | static int hap; 85 | if (hap != 1) 86 | { 87 | setbtv(accbb); 88 | strncpy(nm2,"abcerr",UIDSIZ); 89 | nm2[0] = nm1[1]; 90 | nm2[1] = nm1[3]; 91 | nm2[2] = nm1[5]; 92 | if (qeqbtv(nm2,0)) 93 | catastro("GE SYSTEM FAULT"); 94 | else 95 | hap = 1; 96 | } 97 | } 98 | 99 | /************************************************************************** 100 | ** Determine the smallest of two complementary angles ** 101 | **************************************************************************/ 102 | 103 | unsigned smallest(a1,a2) 104 | unsigned a1,a2; 105 | 106 | { 107 | int a; 108 | 109 | a = abs(a1-a2); 110 | 111 | if (a > 180) 112 | return (360 - a); 113 | else 114 | return (a); 115 | } 116 | 117 | 118 | /************************************************************************** 119 | ** Generate a random number ** 120 | **************************************************************************/ 121 | 122 | double rndm(mod) 123 | double mod; 124 | { 125 | 126 | static randmax = (double)RAND_MAX; 127 | 128 | return(mod*(((double)((unsigned)rand()))/randmax)); 129 | } 130 | 131 | 132 | unsigned int gernd() 133 | 134 | { 135 | return(rand()); 136 | } 137 | 138 | /************************************************************************** 139 | ** Calculate ship bearing between two objects ** 140 | **************************************************************************/ 141 | 142 | double cbearing(ptr1, ptr2, heading) 143 | COORD *ptr1,*ptr2; 144 | double heading; 145 | { 146 | double vector(), absol(), normal(); 147 | double b; 148 | 149 | ptr1->xcoord += .000001; 150 | ptr1->ycoord += .000001; 151 | 152 | b = vector(ptr1,ptr2); 153 | /* sprintf(gechrbuf,"vector = %f",b); 154 | logthis(gechrbuf);*/ 155 | 156 | b = normal(360 - heading + b); 157 | /* sprintf(gechrbuf,"normal = %f",b); 158 | logthis(gechrbuf);*/ 159 | 160 | if (b > 180) 161 | b = b-360; 162 | /* sprintf(gechrbuf,"+-180 = %f",b); 163 | logthis(gechrbuf);*/ 164 | return (b); 165 | 166 | } 167 | 168 | /************************************************************************** 169 | ** Calculate the distance between two ships ** 170 | **************************************************************************/ 171 | 172 | double cdistance(ptr1,ptr2) 173 | COORD *ptr1,*ptr2; 174 | { 175 | double a, b, c; 176 | 177 | 178 | 179 | 180 | b = (ptr1->xcoord - ptr2->xcoord); 181 | 182 | c = (ptr1->ycoord - ptr2->ycoord); 183 | 184 | b = absol(b); 185 | 186 | c = absol(c); 187 | 188 | 189 | a = sqrt((b*b) + (c*c)); 190 | 191 | return (a); 192 | } 193 | 194 | /************************************************************************** 195 | ** Calculate the angle from one ship to another ** 196 | **************************************************************************/ 197 | 198 | double vector(ptr1,ptr2) 199 | COORD *ptr1, *ptr2; 200 | 201 | { 202 | double a; 203 | double angleb(),anglec(),normal(); 204 | 205 | if (ptr1->xcoord >= ptr2->xcoord && ptr1->ycoord <= ptr2->ycoord) 206 | { 207 | a = angleb(ptr1,ptr2); 208 | a = 270.0 - a; 209 | return(a); 210 | } 211 | else 212 | if (ptr1->xcoord >= ptr2->xcoord && ptr1->ycoord >= ptr2->ycoord) 213 | { 214 | a = angleb(ptr1,ptr2); 215 | a = 270.0 + a; 216 | return(a); 217 | } 218 | else 219 | if (ptr1->xcoord <= ptr2->xcoord && ptr1->ycoord <= ptr2->ycoord) 220 | { 221 | a = anglec(ptr1,ptr2); 222 | a = 180.0 - a; 223 | return(a); 224 | } 225 | else 226 | if (ptr1->xcoord <= ptr2->xcoord && ptr1->ycoord >= ptr2->ycoord) 227 | { 228 | a = anglec(ptr1,ptr2); 229 | a = 0.0 + a; 230 | return(a); 231 | } 232 | 233 | 234 | return(99999L); 235 | } 236 | 237 | /************************************************************************** 238 | ** Calculate the angle from the center to the other ship ** 239 | **************************************************************************/ 240 | 241 | double angleb (ptr1, ptr2) 242 | COORD *ptr1, *ptr2; 243 | 244 | { 245 | 246 | double da,db,dc, angle; 247 | 248 | 249 | 250 | da = cdistance(ptr1, ptr2); 251 | dc = absol(ptr1->xcoord - ptr2->xcoord); 252 | db = absol(ptr1->ycoord - ptr2->ycoord); 253 | 254 | if ((da*dc) > 0) 255 | angle = (double) acos( ((da*da) + (dc*dc) - (db*db)) / (2*da*dc)); 256 | else 257 | angle = 0; 258 | 259 | angle = radtodeg(angle); 260 | 261 | return (angle); 262 | 263 | } 264 | 265 | /************************************************************************** 266 | ** Calculate the angle from the center to the other ship ** 267 | **************************************************************************/ 268 | 269 | double anglec (ptr1, ptr2) 270 | COORD *ptr1, *ptr2; 271 | 272 | { 273 | 274 | double da,db,dc, angle; 275 | 276 | 277 | 278 | da = cdistance(ptr1, ptr2); 279 | dc = absol(ptr1->xcoord - ptr2->xcoord); 280 | db = absol(ptr1->ycoord - ptr2->ycoord); 281 | 282 | if ((da*db) > 0) 283 | angle = (double) acos( ((da*da) + (db*db) - (dc*dc)) / (2*da*db)); 284 | else 285 | /* this should not be 0 - figure out what rad(360) is. */ 286 | angle = 0; 287 | 288 | angle = radtodeg(angle); 289 | 290 | return (angle); 291 | 292 | } 293 | 294 | /************************************************************************** 295 | ** Bring an angle back into the range 0 - 360 ** 296 | **************************************************************************/ 297 | 298 | double normal (angle) 299 | double angle; 300 | { 301 | 302 | 303 | if (angle < 0) 304 | { 305 | angle = normal(angle+360); 306 | } 307 | 308 | if (angle >= 360) 309 | { 310 | angle = normal(angle-360); 311 | } 312 | return (angle); 313 | } 314 | 315 | /************************************************************************** 316 | ** convert degrees to radiuns ** 317 | **************************************************************************/ 318 | 319 | double degtorad(value) 320 | double value; 321 | { 322 | return (value*(PI/180)); 323 | } 324 | 325 | /************************************************************************** 326 | ** convert radiuns to degrees ** 327 | **************************************************************************/ 328 | 329 | double radtodeg(value) 330 | double value; 331 | { 332 | return (value*(180/PI)); 333 | } 334 | 335 | /************************************************************************** 336 | ** double absolute function ** 337 | **************************************************************************/ 338 | 339 | double absol(value) 340 | double value; 341 | { 342 | c4angle(); 343 | if (value < 0) 344 | value = value * -1; 345 | 346 | return (value); 347 | } 348 | -------------------------------------------------------------------------------- /mbmgemp/GEPROTO.H: -------------------------------------------------------------------------------- 1 | #ifdef __STDC__ 2 | # define P(s) s 3 | #else 4 | # define P(s) () 5 | #endif 6 | 7 | 8 | /* gemain.c */ 9 | /* 384 */ void EXPORT init__galemp P((void )); 10 | /* 398 */ int FUNC iniwar P((void )); 11 | /* 405 */ void FUNC dummy P((void )); 12 | /* 409 */ void FUNC iniwara P((void )); 13 | /* 966 */ int FUNC gelogon P((void )); 14 | /* 997 */ void FUNC pgedelete P((char *uid )); 15 | /* 1004 */ int gedelete P((char *uid )); 16 | /* 1012 */ void FUNC gedeletea P((char *uid )); 17 | /* 1041 */ void FUNC pgemidnight P((void )); 18 | /* 1047 */ int FUNC gemidnight P((void )); 19 | /* 1054 */ void FUNC gemidnighta P((void )); 20 | /* 1310 */ void FUNC calc_networth P((void )); 21 | /* 1318 */ unsigned FUNC long value_pl P((void )); 22 | /* 1337 */ int FUNC pwarlof P((void )); 23 | /* 1353 */ void FUNC pwarhup P((void )); 24 | /* 1360 */ int FUNC warhup P((void )); 25 | /* 1367 */ void FUNC warhupa P((void )); 26 | /* 1415 */ void FUNC pclswar P((void )); 27 | /* 1421 */ int FUNC clswar P((void )); 28 | /* 1428 */ void FUNC clswara P((void )); 29 | /* 1453 */ int FUNC galemp P((void )); 30 | /* 1487 */ void FUNC outwar P((int filter , unsigned exclude , unsigned freq )); 31 | /* 1519 */ int FUNC gepdb P((int func , char *usrname , int shipnum , WARSHP *geptr )); 32 | /* 1601 */ int FUNC geudb P((int func , char *usrname , WARUSR *geptr )); 33 | /* 1676 */ int FUNC gesdb P((int func , PKEY *sect , GALSECT *geptr )); 34 | /* 1761 */ int FUNC getplanetdat P((int usrn )); 35 | /* 1818 */ void FUNC load_team_tab P((void )); 36 | /* 1886 */ void FUNC update_team_tab P((void )); 37 | /* 1919 */ void FUNC pplarti P((void )); 38 | /* 1925 */ int FUNC plarti P((void )); 39 | /* 1934 */ void FUNC plartia P((void )); 40 | /* 2168 */ void FUNC plabld P((void )); 41 | /* 2187 */ void FUNC pwarrti P((void )); 42 | /* 2193 */ int FUNC warrti P((void )); 43 | /* 2200 */ void FUNC warrtia P((void )); 44 | /* 2253 */ void FUNC pautorti P((void )); 45 | /* 2259 */ int FUNC autorti P((void )); 46 | /* 2266 */ void FUNC autortia P((void )); 47 | /* 2418 */ void FUNC pwarrti2 P((void )); 48 | /* 2425 */ int FUNC warrti2 P((void )); 49 | /* 2432 */ void FUNC warrti2a P((void )); 50 | /* 2473 */ void FUNC pwarrti3 P((void )); 51 | /* 2480 */ int FUNC warrti3 P((void )); 52 | /* 2487 */ void FUNC warrti3a P((void )); 53 | /* 2517 */ void FUNC outprfge P((int class , int shpno )); 54 | /* 2553 */ void FUNC outsect P((int filter , COORD *coordptr , unsigned exclude , unsigned freq )); 55 | /* 2591 */ void FUNC outrange P((int filter , COORD *coordptr )); 56 | /* 2621 */ int FUNC ingegame P((int shpno )); 57 | /* 2647 */ void FUNC geshocst P((int opt , char *str )); 58 | /* 2696 */ int FUNC mnu_main P((void )); 59 | /* 2707 */ int FUNC mnu_main_ans P((void )); 60 | /* 2828 */ int FUNC mnu_fightsub P((void )); 61 | /* 2869 */ int FUNC mnu_admenu1 P((void )); 62 | /* 2919 */ int mnu_admenu1a P((void )); 63 | /* 2958 */ int FUNC mnu_admenu2 P((void )); 64 | /* 3058 */ int FUNC mnu_admenu2b P((void )); 65 | /* 3090 */ int FUNC mnu_admenu2e P((void )); 66 | /* 3114 */ int FUNC mnu_admenu2f1 P((void )); 67 | /* 3134 */ int FUNC mnu_admenu2f2 P((void )); 68 | /* 3155 */ int FUNC mnu_admenu2f3 P((void )); 69 | /* 3173 */ int FUNC mnu_admenu2f4 P((void )); 70 | /* 3194 */ int FUNC mnu_admenu2h P((void )); 71 | /* 3222 */ int FUNC mnu_admenu2i P((void )); 72 | /* 3277 */ int FUNC mnu_admenu2j P((void )); 73 | /* 3309 */ int FUNC mnu_choosesh P((void )); 74 | /* 3318 */ int mnu_menug P((void )); 75 | /* 3381 */ int FUNC mnu_menug1 P((void )); 76 | /* 3428 */ int FUNC mnu_menug2 P((void )); 77 | /* 3473 */ void FUNC disp_main_menu P((void )); 78 | /* 3494 */ void FUNC disp_menu_d P((void )); 79 | /* 3509 */ void FUNC update_items P((void )); 80 | /* 3548 */ void FUNC optdisp P((void )); 81 | /* 3598 */ void FUNC stshdlr P((void )); 82 | 83 | /* gefuncs.c */ 84 | /* 53 */ void FUNC lookupshp P((void )); 85 | /* 123 */ void FUNC tossingegame P((void )); 86 | /* 153 */ int FUNC initshp P((char *userid , int type )); 87 | /* 253 */ int FUNC initusr P((char *userid )); 88 | /* 280 */ int FUNC findships P((void )); 89 | /* 330 */ void FUNC selectship P((void )); 90 | /* 360 */ void FUNC repairship P((WARSHP *ptr , int usrn )); 91 | /* 403 */ void FUNC rotateship P((WARSHP *ptr , int usrn )); 92 | /* 439 */ void FUNC accel P((WARSHP *ptr , int usrn )); 93 | /* 551 */ void FUNC hyperspace P((WARSHP *ptr , int usrn , int flag )); 94 | /* 603 */ void FUNC moveship P((WARSHP *ptr , int usrn )); 95 | /* 790 */ void FUNC telezip P((WARSHP *ptr , int usrn )); 96 | /* 807 */ void FUNC gravity P((WARSHP *ptr , int usrn )); 97 | /* 878 */ void FUNC checkdist P((WARSHP *ptr , int usrn )); 98 | /* 903 */ void FUNC refresh P((WARSHP *ptr , int usrn )); 99 | /* 942 */ void FUNC checkdam P((WARSHP *ptr , int usrn )); 100 | /* 1058 */ void FUNC killem P((WARSHP *ptr , int usrn )); 101 | /* 1261 */ void FUNC recharge P((WARSHP *ptr , int usrn )); 102 | /* 1278 */ void FUNC fluxstat P((WARSHP *ptr , int usrn )); 103 | /* 1305 */ void FUNC shieldstat P((WARSHP *ptr , int usrn )); 104 | /* 1337 */ void FUNC cloakstat P((WARSHP *ptr , int usrn )); 105 | /* 1374 */ void FUNC checkmines P((void )); 106 | /* 1471 */ int FUNC useenergy P((WARSHP *ptr , int usrn , int amount )); 107 | /* 1493 */ void FUNC checktm P((WARSHP *ptr , int usrn )); 108 | /* 1701 */ void FUNC acctm P((WARSHP *ptr , int usrn , int mt , unsigned int channel )); 109 | /* 1721 */ void FUNC cleartm P((int channel )); 110 | /* 1756 */ void FUNC fireion P((WARSHP *ptr , int usrn )); 111 | /* 1791 */ void FUNC destruct P((WARSHP *ptr , int usrn )); 112 | /* 1877 */ int FUNC valpcnt P((char *ptr , unsigned minnum , unsigned maxnum )); 113 | /* 1904 */ int FUNC valdegree P((char *ptr )); 114 | /* 1927 */ void FUNC randamage P((WARSHP *ptr , int usrn )); 115 | /* 2031 */ unsigned FUNC pdamage P((WARSHP *wptr , double dist , int foc )); 116 | /* 2071 */ void FUNC setsect P((WARSHP *ptr )); 117 | /* 2087 */ void FUNC movecoord P((COORD *pointb , COORD *pointa )); 118 | /* 2100 */ int FUNC samesect P((COORD *pointb , COORD *pointa )); 119 | /* 2118 */ int FUNC genearas P((char *str1 , char *str2 )); 120 | /* 2133 */ int FUNC mailscan P((char *userid , int class )); 121 | /* 2162 */ int mailread P((char *userid , int class )); 122 | /* 2194 */ void FUNC mailit P((int flag )); 123 | /* 2290 */ int FUNC sendit P((void )); 124 | /* 2339 */ void FUNC prf2tx P((void )); 125 | /* 2360 */ int FUNC sendgemsg P((struct message *msgptr , char *usrid )); 126 | /* 2380 */ void FUNC shieldup P((WARSHP *wptr , int usrn )); 127 | /* 2390 */ void FUNC shielddn P((WARSHP *wptr , int usrn )); 128 | /* 2401 */ int FUNC shieldhit P((WARSHP *wptr , int usrn , int dam )); 129 | /* 2444 */ void FUNC shieldrep P((WARSHP *wptr , int usrn )); 130 | /* 2462 */ void FUNC shieldchg P((WARSHP *wptr , int usrn )); 131 | /* 2501 */ void FUNC charge P((WARSHP *wptr , int *max , int *pct )); 132 | /* 2512 */ int FUNC chkweight P((WARSHP *wptr , int itm , long amt )); 133 | /* 2533 */ long FUNC calcweight P((WARSHP *wptr )); 134 | /* 2549 */ char FUNC shpltr P((int usrn , int ship )); 135 | /* 2567 */ char *FUNC username P((WARSHP *ptr )); 136 | /* 2579 */ void FUNC logthis P((char *str )); 137 | /* 2609 */ WARUSR *FUNC warusroff P((int usrn )); 138 | /* 2620 */ WARSHP *FUNC warshpoff P((int usrn )); 139 | /* 2632 */ double FUNC ton_fact P((WARSHP *ptr , double damfact )); 140 | /* 2645 */ char *FUNC showarp P((double speed )); 141 | 142 | /* gecmds.c */ 143 | /* 217 */ struct cmd *FUNC gesearch P((char *ptr , struct cmd tab [], int len )); 144 | /* 245 */ void FUNC gwar P((void )); 145 | /* 317 */ void FUNC warnop P((void )); 146 | /* 325 */ void FUNC cmd_gehelp P((void )); 147 | /* 450 */ void FUNC cmd_impulse P((void )); 148 | /* 529 */ void FUNC cmd_warp P((void )); 149 | /* 611 */ void FUNC cmd_rotate P((void )); 150 | /* 703 */ void FUNC cmd_flux P((void )); 151 | /* 726 */ void FUNC cmd_orbit P((void )); 152 | /* 797 */ void FUNC cmd_phas P((void )); 153 | /* 882 */ void FUNC firep P((WARSHP *ptr , int usrn )); 154 | /* 988 */ void FUNC firehp P((WARSHP *ptr , int usrn )); 155 | /* 1069 */ void FUNC cmd_torp P((void )); 156 | /* 1146 */ void FUNC torp P((WARSHP *ptr , int usrn , int shpnum )); 157 | /* 1183 */ void FUNC cmd_missl P((void )); 158 | /* 1307 */ int FUNC lockon P((WARSHP *ptr , int type , int ship , int usrn )); 159 | /* 1400 */ int FUNC findshp P((char *ptr , int type )); 160 | /* 1493 */ void FUNC zaphim P((WARSHP *ptr , int usrn )); 161 | /* 1506 */ void FUNC cmd_decoy P((void )); 162 | /* 1561 */ void FUNC cmd_jammer P((void )); 163 | /* 1592 */ void FUNC jam P((WARSHP *ptr , int usrn )); 164 | /* 1626 */ void FUNC cmd_zipper P((void )); 165 | /* 1657 */ void FUNC zip P((WARSHP *ptr , int usrn )); 166 | /* 1690 */ void FUNC cmd_mine P((void )); 167 | /* 1753 */ int FUNC laymine P((WARSHP *ptr , int usrn , int timer )); 168 | /* 1793 */ void FUNC cmd_send P((void )); 169 | /* 1853 */ void FUNC cmd_freq P((void )); 170 | /* 1914 */ void FUNC cmd_report P((void )); 171 | /* 2078 */ void FUNC damstr P((int damage )); 172 | /* 2106 */ void FUNC cmd_scan P((void )); 173 | /* 2158 */ void FUNC scan_sh P((void )); 174 | /* 2263 */ void FUNC scan_pl P((void )); 175 | /* 2452 */ void FUNC scan_ra P((void )); 176 | /* 2548 */ void FUNC scan_se P((void )); 177 | /* 2608 */ void FUNC scan_lo P((void )); 178 | /* 2696 */ void scan_hy P((void )); 179 | /* 2753 */ void FUNC update_scantab P((WARSHP *ptr , int usrn )); 180 | /* 2863 */ void FUNC pick_letter P((SCANTAB *ptr )); 181 | /* 2922 */ void FUNC map_planets P((void )); 182 | /* 2938 */ void FUNC clearmap P((void )); 183 | /* 2955 */ void FUNC printmap P((void )); 184 | /* 2987 */ void FUNC printmapfull P((void )); 185 | /* 3056 */ unsigned FUNC coord2 P((double dcoord )); 186 | /* 3070 */ int FUNC coord1 P((double dcoord )); 187 | /* 3082 */ void FUNC cmd_shields P((void )); 188 | /* 3156 */ void FUNC cmd_cloak P((void )); 189 | /* 3239 */ void FUNC cmd_transfer P((void )); 190 | /* 3274 */ void trans_down P((int item )); 191 | /* 3323 */ void trans_up P((int item )); 192 | /* 3388 */ void FUNC cmd_abandon P((void )); 193 | /* 3430 */ void FUNC cmd_admin P((void )); 194 | /* 3483 */ void FUNC cmd_attack P((void )); 195 | /* 3591 */ int FUNC attack_men P((unsigned long num )); 196 | /* 3756 */ int FUNC attack_fig P((unsigned long num )); 197 | /* 3920 */ void FUNC call_4_help P((int send_spy_mail , int won )); 198 | /* 3964 */ void FUNC wonplnt P((void )); 199 | /* 3976 */ void FUNC cmd_geroster P((void )); 200 | /* 4031 */ void FUNC cmd_planet P((void )); 201 | /* 4071 */ void FUNC cmd_sell P((void )); 202 | /* 4115 */ void FUNC sell P((int item )); 203 | /* 4169 */ void FUNC cmd_buy P((void )); 204 | /* 4252 */ void FUNC cmd_price P((void )); 205 | /* 4284 */ void FUNC buy P((int item )); 206 | /* 4373 */ long FUNC amt4sale P((int item )); 207 | /* 4398 */ long FUNC price P((unsigned item , unsigned long amt )); 208 | /* 4420 */ void FUNC cmd_maint P((void )); 209 | /* 4502 */ void FUNC cmd_new P((void )); 210 | /* 4710 */ void FUNC cmd_sysop P((void )); 211 | /* 4957 */ void done P((void )); 212 | /* 4970 */ void FUNC cmd_rename P((void )); 213 | /* 4993 */ void FUNC cmd_destruct P((void )); 214 | /* 5012 */ void FUNC cmd_abort P((void )); 215 | /* 5036 */ void FUNC cmd_lock P((void )); 216 | /* 5077 */ void FUNC cmd_navigate P((void )); 217 | /* 5130 */ void FUNC cmd_who P((void )); 218 | /* 5145 */ void FUNC cmd_displ P((void )); 219 | /* 5158 */ void FUNC cmd_set P((void )); 220 | /* 5245 */ void FUNC cmd_team P((void )); 221 | /* 5753 */ void FUNC badfmt P((int msg )); 222 | /* 5759 */ char *FUNC teamname P((WARUSR *ptr )); 223 | /* 5776 */ void FUNC cmd_clear P((void )); 224 | /* 5783 */ void FUNC ansifunc P((int func )); 225 | /* 5797 */ void FUNC cmd_data P((void )); 226 | /* 5911 */ void FUNC scan_data1 P((void )); 227 | /* 5962 */ void FUNC scan_data2 P((void )); 228 | /* 5989 */ char *FUNC gedots P((int numdots )); 229 | /* 6008 */ void FUNC cmd_spy P((void )); 230 | /* 6070 */ void FUNC cmd_jettison P((void )); 231 | /* 6091 */ void FUNC jettison P((int item )); 232 | 233 | /* gecybs.c */ 234 | /* 58 */ void FUNC cyb_init P((WARSHP *ptr , int usrn , int class )); 235 | /* 168 */ void FUNC cyb_lives P((WARSHP *ptr , int usrn )); 236 | /* 327 */ int FUNC notclaimed P((WARSHP *ptr , int usrn )); 237 | /* 349 */ void FUNC cyb_annoy P((WARSHP *ptr , int usrn , int rnd , int first , int last )); 238 | /* 364 */ int FUNC cybwhoops P((WARSHP *ptr , int zothusn )); 239 | /* 386 */ int FUNC gebemean P((WARSHP *ptr , int usrn )); 240 | /* 409 */ void FUNC db_update P((WARSHP *ptr , int usrn )); 241 | /* 453 */ void FUNC cyb_attack P((WARSHP *ptr , int usrn , WARSHP *wptr , int zothusn )); 242 | /* 552 */ void FUNC cyb_lay_decoys P((WARSHP *ptr , int zothusn )); 243 | /* 573 */ void FUNC cyb_check_damage P((WARSHP *ptr , int usrn )); 244 | /* 603 */ void FUNC cyb_check_lockon P((WARSHP *ptr , int usrn )); 245 | /* 763 */ void FUNC cyb_won P((WARSHP *ptr , int usrn , WARSHP *wptr )); 246 | /* 776 */ void FUNC cyb_died P((WARSHP *ptr , int usrn , WARSHP *wptr )); 247 | /* 788 */ int FUNC isquad P((WARSHP *ptr )); 248 | 249 | /* gedroids.c */ 250 | /* 68 */ void FUNC droid_init P((WARSHP *ptr , int usrn , int class )); 251 | /* 151 */ void FUNC droid_lives P((WARSHP *ptr , int usrn )); 252 | /* 202 */ void FUNC droid_annoy P((WARSHP *ptr , int usrn , int rnd , int first , int last )); 253 | /* 223 */ void FUNC droid_act_class_10 P((WARSHP *ptr , int usrn )); 254 | /* 272 */ void FUNC droid_act_class_11 P((WARSHP *ptr , int usrn )); 255 | /* 380 */ void FUNC droid_act_class_12 P((WARSHP *ptr , int usrn )); 256 | /* 504 */ void FUNC droid_won P((WARSHP *ptr )); 257 | /* 512 */ void FUNC droid_died P((WARSHP *ptr )); 258 | /* 520 */ int FUNC missl_attached P((WARSHP *ptr , int usrn )); 259 | 260 | /* geplanet.c */ 261 | /* 54 */ void FUNC check_spy P((void )); 262 | /* 165 */ void FUNC multiply P((void )); 263 | /* 357 */ int FUNC getsector P((COORD *sect )); 264 | /* 425 */ int FUNC xgetsector P((COORD *sect , int wormy )); 265 | /* 635 */ void FUNC build_plan_1 P((int idx )); 266 | /* 700 */ void FUNC build_plan_2 P((int idx )); 267 | /* 741 */ void FUNC build_other P((int idx )); 268 | /* 770 */ void FUNC build_worm P((int idx )); 269 | /* 815 */ int FUNC getplanet P((COORD *sect , int plnt )); 270 | /* 836 */ int FUNC neutral P((COORD *coord )); 271 | 272 | /* gelib.c */ 273 | /* 46 */ void c4angle P((void )); 274 | /* 72 */ unsigned smallest P((unsigned a1 , unsigned a2 )); 275 | /* 91 */ double rndm P((double mod )); 276 | /* 101 */ unsigned int gernd P((void )); 277 | /* 111 */ double cbearing P((COORD *ptr1 , COORD *ptr2 , double heading )); 278 | /* 141 */ double cdistance P((COORD *ptr1 , COORD *ptr2 )); 279 | /* 167 */ double vector P((COORD *ptr1 , COORD *ptr2 )); 280 | /* 210 */ double angleb P((COORD *ptr1 , COORD *ptr2 )); 281 | /* 238 */ double anglec P((COORD *ptr1 , COORD *ptr2 )); 282 | /* 267 */ double normal P((double angle )); 283 | /* 288 */ double degtorad P((double value )); 284 | /* 298 */ double radtodeg P((double value )); 285 | /* 308 */ double absol P((double value )); 286 | 287 | #undef P 288 | -------------------------------------------------------------------------------- /mbmgemp/GESAMPLE.C: -------------------------------------------------------------------------------- 1 | 2 | /*************************************************************************** 3 | * * 4 | * GEDROIDS.C * 5 | * * 6 | * Copyright (C) 1988, 89, 90, 91, 92 Michael B. Murdock * 7 | * * 8 | * This is the source for the Galactic Empire game module * 9 | * * 10 | * M. Murdock 03/17/92 * 11 | * * 12 | ***************************************************************************/ 13 | 14 | /************************************************************************** 15 | * This program is free software; you can redistribute it and/or modify * 16 | * under the terms of the GNU General Public License as published by the * 17 | * Free Software Foundation; either version 2 of the License, or (at your * 18 | * option) any later version. * 19 | * * 20 | * This program is distributed in the hope that it will be useful, * 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 23 | * General Public License for more details. * 24 | * * 25 | * You should have received a copy of the GNU General Public License * 26 | * along with this program; if not, write to the Free Software Foundation,* 27 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 28 | *************************************************************************/ 29 | 30 | /************************************************************************** 31 | * Authors Note: The source code to this program is being made available * 32 | * to the general public in the hopes that it will continue * 33 | * to live on and evolve. While I cannot provide the time * 34 | * to personally participate in its development any longer, * 35 | * I am eager to assist in the design discussions, testing * 36 | * and project discussions. * 37 | * * 38 | * To foster a community for Galactic Empire developers I * 39 | * have created a project home page at... * 40 | * http://mbbs.sitesage.net * 41 | * * 42 | * I may be contacted via email at mmurdock@starphire.com * 43 | ***************************************************************************/ 44 | 45 | /* NOTE: I like my tabs at 3 so if the code looks "messed up" try changing */ 46 | /* your tabs to 3.... MBM */ 47 | 48 | #ifdef PHARLAP 49 | 50 | #include "gcomm.h" 51 | #include "string.h" 52 | 53 | #else 54 | 55 | #include "stdio.h" 56 | #include "ctype.h" 57 | #include "dos.h" 58 | #include "usracc.h" 59 | #include "btvstf.h" 60 | #include "stdlib.h" 61 | #include "math.h" 62 | #include "portable.h" 63 | #include "dosface.h" 64 | #endif 65 | 66 | #include "majorbbs.h" 67 | #include "message.h" 68 | 69 | #include "gemain.h" 70 | 71 | 72 | #define GEDROIDS 1 73 | 74 | #include "geglobal.h" 75 | 76 | /* LOCAL GLOBAL DEFS ****************************************************/ 77 | 78 | char droidname[UIDSIZ]; 79 | 80 | 81 | /************************************************************************** 82 | 83 | 84 | 85 | 86 | 87 | 88 | **************************************************************************/ 89 | 90 | 91 | 92 | 93 | 94 | /************************************************************************** 95 | ** Droid Init FUnction ** 96 | **************************************************************************/ 97 | 98 | void droid_init(ptr, usrn, class) 99 | WARSHP *ptr; 100 | int usrn; 101 | int class; 102 | 103 | { 104 | 105 | strncpy(droidname,"@Droid-",UIDSIZ);/* Bj Added name here */ 106 | sprintf(&droidname[7],"%d",usrn); 107 | 108 | waruptr = warusroff(usrn); 109 | warsptr = warshpoff(usrn); 110 | 111 | logthis(spr("GE:INF:Adding %s user",droidname)); 112 | 113 | initusr(droidname); 114 | 115 | /* geudb(GEADD,tmpusr.userid,&tmpusr);DONT NEED TO WRITE IN DB*/ 116 | 117 | memcpy(waruptr,&tmpusr,sizeof(WARUSR)); /* make it the current user */ 118 | 119 | /* make me a Ship */ 120 | logthis(spr("GE:INF:Adding %s ship - %d",ptr->userid,class)); 121 | 122 | initshp(droidname,class); 123 | 124 | /*gepdb(GEADD,tmpshp.userid,tmpshp.shipno,&tmpshp);DONT NEED TO WRITE IN DB*/ 125 | 126 | memcpy(ptr,&tmpshp,sizeof(WARSHP)); /* make is the current ship */ 127 | sprintf(ptr->shipname,"%s%u\0",shipclass[class].shipname,usrn*usrn+gernd()%100); 128 | 129 | ptr->coord.xcoord = (rndm((double)univmax-.1)-((double)univmax/2.0))+1.0; 130 | ptr->coord.ycoord = (rndm((double)univmax-.1)-((double)univmax/2.0))+1.0; 131 | ptr->phasrtype = shipclass[class].max_phasr; 132 | ptr->shieldtype = shipclass[class].max_shlds; 133 | ptr->items[I_FLUXPOD] = gernd()%5; 134 | ptr->items[I_DECOYS] = gernd()%25; 135 | ptr->items[I_TORPEDO] = gernd()%25; 136 | ptr->items[I_MINE] = gernd()%100; 137 | ptr->items[I_JAMMERS] = gernd()%100; 138 | ptr->speed2b = rndm((double)(shipclass[ptr->shpclass].max_warp * 1000.0)); 139 | ptr->holdcourse = 0; 140 | 141 | ptr->status = GESTAT_AUTO; 142 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 143 | 144 | /*gepdb(GEUPDATE,ptr->userid,ptr->shipno,ptr); DONT NEED TO MAKE PERM*/ 145 | prfmsg(CYBMSG15,gernd()%359); 146 | outwar(usrn,0); 147 | } 148 | 149 | /************************************************************************** 150 | ** Droid Lives FUnction ** 151 | **************************************************************************/ 152 | 153 | void droid_lives(ptr,usrn) 154 | 155 | WARSHP *ptr; 156 | int usrn; 157 | { 158 | 159 | sprintf(&droidname[7],"%d",usrn+1); 160 | 161 | /* DEBUG 162 | logthis(spr("GE:%s Lives",droidname)); */ 163 | 164 | /* reset the ticker to 255 to cause it to recalc */ 165 | ptr->tick = 255; 166 | 167 | warusroff(usrn)->cash += CYB_ALLOW; 168 | 169 | if(ptr->shpclass == 10) 170 | droid_act_class_10(ptr,usrn); /* Lydorian Garbage Scow */ 171 | else 172 | if(ptr->shpclass == 11) 173 | droid_act_class_11(ptr,usrn); /* Murdonian Transport */ 174 | else 175 | if(ptr->shpclass == 12) 176 | droid_act_class_12(ptr,usrn); /* Vakory Survey Droid */ 177 | 178 | 179 | 180 | ptr->energy = 50000L; 181 | 182 | if (ptr->tick == 255) 183 | { 184 | /* if just cruising around don't get back to me for some time */ 185 | if (ptr->cantexit==0) 186 | { 187 | ptr->tick = (CYBTICKTIME + gernd()%CYBTICKTIME)*3; 188 | } 189 | else 190 | { 191 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 192 | } 193 | } 194 | } 195 | 196 | 197 | /* ptr to sender , usrn = reciever */ 198 | void droid_annoy(ptr,usrn,rnd,first,last) 199 | WARSHP *ptr; 200 | int usrn; 201 | int rnd; 202 | int first; 203 | int last; 204 | { 205 | 206 | if ((gernd()%rnd) == 1) 207 | { 208 | prfmsg(first+gernd()%(last-first+1),ptr->shipname); 209 | outprfge(usrn); 210 | } 211 | } 212 | 213 | 214 | /************************************************************************** 215 | ** Class 10 Action ** 216 | ** Lydorian Garbage Scow ** 217 | **************************************************************************/ 218 | 219 | void droid_act_class_10(ptr,usrn) 220 | 221 | WARSHP *ptr; 222 | int usrn; 223 | { 224 | 225 | WARSHP *wptr; 226 | int zothusn; 227 | 228 | double ddist; 229 | 230 | /* am I being jammed ? */ 231 | if (ptr->jammer == 0) 232 | { 233 | /* look at all the other ships */ 234 | for (zothusn=0 ; zothusn < nterms ;zothusn++) 235 | { 236 | wptr=warshpoff(zothusn); 237 | /* if not me, and playing, and not cyborg, go getem */ 238 | if (ingegame(zothusn) && wptr->status == GESTAT_USER) 239 | { 240 | ddist = cdistance(&ptr->coord,&wptr->coord); 241 | ddist *= 10000; 242 | if (ddist < (double)shipclass[ptr->shpclass].scanrange) 243 | { 244 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 245 | droid_annoy(ptr,zothusn,4,DRDMSG6,DRDMSG6); 246 | } 247 | } 248 | } 249 | } 250 | else 251 | { 252 | ptr->speed2b = 999.9; /* has no warp capability */ 253 | ptr->holdcourse = gernd()%50 + 10; 254 | } 255 | /* Runs with shields up all the time */ 256 | shieldup(ptr,usrn); 257 | } 258 | 259 | 260 | /************************************************************************** 261 | ** Class 11 Action ** 262 | ** Murdonian Transport 263 | **************************************************************************/ 264 | 265 | void droid_act_class_11(ptr,usrn) 266 | 267 | WARSHP *ptr; 268 | int usrn; 269 | { 270 | 271 | WARSHP *wptr; 272 | int zothusn; 273 | 274 | 275 | double ddist; 276 | 277 | /* am I being jammed ? */ 278 | if (ptr->jammer == 0) 279 | { 280 | /* look at all the other ships */ 281 | for (zothusn=0 ; zothusn < nterms ;zothusn++) 282 | { 283 | wptr=warshpoff(zothusn); 284 | /* if not me, and playing, and not cyborg, go getem */ 285 | if (ingegame(zothusn) && wptr->status == GESTAT_USER) 286 | { 287 | ddist = cdistance(&ptr->coord,&wptr->coord); 288 | ddist *= 10000; 289 | if (ddist < (double)shipclass[ptr->shpclass].scanrange) 290 | { 291 | if (ptr->holdcourse == 0) 292 | ptr->speed2b = rndm(999.9); 293 | shieldup(ptr,usrn); 294 | 295 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 296 | droid_annoy(ptr,zothusn,4,DRDMSG11,DRDMSG15); 297 | } 298 | } 299 | } 300 | if (ptr->cantexit > 0) 301 | { 302 | wptr = warshpoff(ptr->lastfired); 303 | zothusn = ptr->lastfired; 304 | 305 | droid_annoy(ptr,zothusn,4,DRDHLP11,DRDHLP15); 306 | 307 | /* fire phasers at the fool */ 308 | if (ptr->where == 1 && wptr->where == 1 ) 309 | { 310 | if (ddist < 30000) 311 | { 312 | ptr->degrees = (int)(cbearing(&ptr->coord,&wptr->coord,ptr->heading)+.5); 313 | firehp(ptr,usrn); 314 | } 315 | } 316 | else 317 | if ((ptr->where == 0 && wptr->where == 0) 318 | || (ptr->where == 0 && wptr->where >= 2)) 319 | { 320 | ptr->degrees = 0; 321 | ptr->percent = 2; 322 | if (ptr->phasr >= PMINFIRE && !wptr->cloak) 323 | { 324 | /* logthis(spr("GE:phaser fired %d",ptr->degrees));*/ 325 | firep(ptr,usrn); 326 | } 327 | 328 | /* just to confuse them sometimes alter attack vector */ 329 | 330 | if (ptr->holdcourse == 0 && gernd()%10 == 1) 331 | { 332 | ptr->speed2b = rndm(10000.0); 333 | ptr->head2b = rndm(359.9); 334 | ptr->holdcourse = gernd()%10 + 3; 335 | } 336 | } 337 | 338 | /* if we are in hyperspace and fighting and missiles detected 339 | get out of hyperspace */ 340 | 341 | if (ptr->where == 1) 342 | { 343 | if (missl_attached(ptr,usrn)) 344 | { 345 | ptr->speed2b = rndm(999.0); 346 | ptr->holdcourse = gernd()%15 + 5; 347 | } 348 | } 349 | shieldup(ptr,usrn); 350 | } 351 | } 352 | else 353 | { 354 | ptr->speed2b = (double)(shipclass[ptr->shpclass].max_warp * 1000); 355 | ptr->holdcourse = gernd()%50 + 10; 356 | } 357 | } 358 | 359 | 360 | 361 | /************************************************************************** 362 | ** Class 12 Action ** 363 | ** Vakory Survey Droid 364 | **************************************************************************/ 365 | 366 | void droid_act_class_12(ptr,usrn) 367 | 368 | WARSHP *ptr; 369 | int usrn; 370 | { 371 | int i,j; 372 | 373 | WARSHP *wptr; 374 | int zothusn; 375 | 376 | double ddist; 377 | 378 | /* am I being jammed ? */ 379 | if (ptr->jammer == 0) 380 | { 381 | /* look at all the other ships */ 382 | for (zothusn=0 ; zothusn < nterms ;zothusn++) 383 | { 384 | wptr=warshpoff(zothusn); 385 | /* if not me, and playing, and not cyborg, go getem */ 386 | if (ingegame(zothusn) && wptr->status == GESTAT_USER) 387 | { 388 | ddist = cdistance(&ptr->coord,&wptr->coord); 389 | ddist *= 10000; 390 | if (ddist < (double)shipclass[ptr->shpclass].scanrange) 391 | { 392 | shieldup(ptr,usrn); 393 | 394 | droid_annoy(ptr,zothusn,4,DRDMSG1,DRDMSG5); 395 | ptr->tick = CYBTICKTIME + gernd()%CYBTICKTIME; 396 | 397 | } 398 | } 399 | } 400 | if (ptr->cantexit > 0) 401 | { 402 | wptr = warshpoff(ptr->lastfired); 403 | zothusn = ptr->lastfired; 404 | 405 | droid_annoy(ptr,zothusn,4,DRDHLP1,DRDHLP5); 406 | 407 | /* fire phasers at the fool */ 408 | if (ptr->where == 1 && wptr->where == 1 ) 409 | { 410 | if (ddist < 30000) 411 | { 412 | ptr->degrees = (int)(cbearing(&ptr->coord,&wptr->coord,ptr->heading)+.5); 413 | firehp(ptr,usrn); 414 | } 415 | } 416 | else 417 | if ((ptr->where == 0 && wptr->where == 0) 418 | || (ptr->where == 0 && wptr->where >= 2)) 419 | { 420 | ptr->degrees = 0; 421 | ptr->percent = 2; 422 | if (ptr->phasr >= PMINFIRE && !wptr->cloak) 423 | { 424 | /* logthis(spr("GE:phaser fired %d",ptr->degrees));*/ 425 | firep(ptr,usrn); 426 | } 427 | 428 | /* fire torpedoes at the fool */ 429 | j = gernd()%2; 430 | for (i=0;iitems[I_TORPEDO] = (gernd()%5)+1; 433 | if (i>0) lockwarn = FALSE; 434 | torp(ptr,usrn,zothusn); 435 | } 436 | 437 | /* just to confuse them sometimes alter attack vector */ 438 | 439 | if (ptr->holdcourse == 0 && gernd()%20 == 1) 440 | { 441 | ptr->speed2b = rndm(5000.0); 442 | ptr->head2b = rndm(359.9); 443 | ptr->holdcourse = gernd()%10 + 3; 444 | } 445 | } 446 | 447 | /* if we are in hyperspace and fighting and missiles detected 448 | speed up and loose them */ 449 | 450 | if (missl_attached(ptr,usrn)) 451 | { 452 | ptr->speed2b = rndm(5900.0)+5000.0; 453 | ptr->holdcourse = gernd()%5 + 5; 454 | } 455 | 456 | shieldup(ptr,usrn); 457 | if (ptr->damage > 75) 458 | { 459 | if (ptr->items[I_MINE] > 0) 460 | laymine(ptr,usrn,10); 461 | 462 | if (ptr->items[I_JAMMERS] >0) 463 | jam(ptr,usrn); 464 | 465 | ptr->speed2b = (double)(shipclass[ptr->shpclass].max_warp * 1000); 466 | ptr->head2b = rndm(359.9); 467 | ptr->holdcourse = gernd()%30 + 20; 468 | 469 | } 470 | } 471 | } 472 | else 473 | { 474 | ptr->speed2b = (double)(shipclass[ptr->shpclass].max_warp * 1000); 475 | ptr->holdcourse = gernd()%50 + 10; 476 | } 477 | 478 | } 479 | 480 | 481 | 482 | void droid_won(ptr) 483 | WARSHP *ptr; 484 | 485 | { 486 | ptr->speed2b = rndm(5000.0); 487 | } 488 | 489 | 490 | void droid_died(ptr) 491 | WARSHP *ptr; 492 | 493 | { 494 | ptr->status = GESTAT_AVAIL; 495 | logthis(spr("GE:INF:%s Died!",ptr->userid)); 496 | } 497 | 498 | int missl_attached(ptr,usrn) 499 | WARSHP *ptr; 500 | int usrn; 501 | 502 | { 503 | int i; 504 | MISSILE *mptr; 505 | 506 | usrn=usrn; 507 | 508 | for (i=0,mptr=ptr->lmissl;idistance > 0) 511 | { 512 | return(TRUE); 513 | } 514 | } 515 | return(FALSE); 516 | } 517 | 518 | -------------------------------------------------------------------------------- /mbmgemp/MBMGEGRF.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEGRF.C -------------------------------------------------------------------------------- /mbmgemp/MBMGEMAL.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEMAL.DAT -------------------------------------------------------------------------------- /mbmgemp/MBMGEMAL.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEMAL.NEW -------------------------------------------------------------------------------- /mbmgemp/MBMGEMNU.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEMNU.TXT -------------------------------------------------------------------------------- /mbmgemp/MBMGEMP.LNK: -------------------------------------------------------------------------------- 1 | \run286\bc3\lib\c0phdll + 2 | \run286\bc3\lib\fpdmy + 3 | \bbsv6\phobj\gemain + 4 | \bbsv6\phobj\gefuncs + 5 | \bbsv6\phobj\gecmds + 6 | \bbsv6\phobj\gecybs + 7 | \bbsv6\phobj\gedroids + 8 | \bbsv6\phobj\geplanet + 9 | \bbsv6\phobj\gelib + 10 | \bbsv6\phobj\secure 11 | \bbsv6\mbmgemp 12 | \bbsv6\mbmgemp.map 13 | \run286\bc3\lib\phapi + 14 | \bbsv6\dlib\galimp + 15 | \bbsv6\dlib\msgimp + 16 | \bbsv6\dlib\gsblimp + 17 | \borlandc\lib\mathh /Twd /s /n 18 | \bbsv6\dlib\mathdef 19 | 20 |  -------------------------------------------------------------------------------- /mbmgemp/MBMGEMP.MAK: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ##### This Makefile generates the "MAJORBBS.EXE" and all standard DLL's ##### 3 | ############################################################################### 4 | 5 | .autodepend 6 | .silent 7 | .path.c=\bbsv6\src 8 | .path.h=\bbsv6\src 9 | .path.dll=\bbsv6 10 | .path.msg=\bbsv6 11 | .path.obj=\bbsv6\phobj 12 | .path.exe=\bbsv6 13 | 14 | 15 | ############################################################################### 16 | ##### Build DLL's ##### 17 | ############################################################################### 18 | mbmgemp.dll: \ 19 | mbmgemsg.h mbmgehlp.h \ 20 | gemain.obj gefuncs.obj gecmds.obj gecybs.obj geplanet.obj \ 21 | gelib.obj \ 22 | \bbsv6\dlib\galimp.lib \bbsv6\dlib\gsblimp.lib \ 23 | \run286\bc3\lib\phapi.lib \bbsv6\dlib\nodef.def 24 | ltdll mbmgemp 25 | 26 | 27 | ############################################################################### 28 | ##### Build Objects For FASTPACE DLL ##### 29 | ############################################################################### 30 | 31 | gemain.obj: gemain.c 32 | ctdll gemain 33 | gefuncs.obj: gefuncs.c 34 | ctdll gefuncs 35 | gecmds.obj: gecmds.c 36 | ctdll gecmds 37 | gecybs.obj: gecybs.c 38 | ctdll gecybs 39 | geplanet.obj: geplanet.c 40 | ctdll geplanet 41 | gelib.obj: gelib.c 42 | ctdll gelib 43 | 44 | ############################################################################### 45 | ##### Generate Headers for Compilation ##### 46 | ############################################################################### 47 | 48 | mbmgemsg.h: mbmgemsg.msg 49 | cd \bbsv6 50 | bbsmsx mbmgemsg -osrc 51 | cd \bbsv6\src 52 | mbmgehlp.h: mbmgehlp.msg 53 | cd \bbsv6 54 | bbsmsx mbmgehlp -osrc 55 | cd \bbsv6\src 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /mbmgemp/MBMGEMP.MDF: -------------------------------------------------------------------------------- 1 | ; MBMGEMP.MDF 2 | 3 | Module Name: Galactic Empire 4 | 5 | Developer: M.B. Murdock & Associates 6 | 7 | 8 | Requires: 9 | Replaces: 10 | 11 | Install: 12 | 13 | Online user manual:MBMGEMP.DOC 14 | 15 | DLLs:MBMGEMP 16 | MSGs:MBMGEHLP MBMGEMSG MBMGESHP 17 | 18 | 19 | Btrieve page size: 2048 20 | Btrieve files: 6 21 | 22 | Cleanup: 23 | 24 | Event-1: 25 | Event-2: 26 | Event-3: 27 | Event-4: 28 | 29 | Add-On Utility: 30 | 31 | 32 | -------------------------------------------------------------------------------- /mbmgemp/MBMGEPLT.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEPLT.DAT -------------------------------------------------------------------------------- /mbmgemp/MBMGEPLT.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEPLT.NEW -------------------------------------------------------------------------------- /mbmgemp/MBMGESHP.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGESHP.DAT -------------------------------------------------------------------------------- /mbmgemp/MBMGESHP.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGESHP.NEW -------------------------------------------------------------------------------- /mbmgemp/MBMGETEA.DAT: -------------------------------------------------------------------------------- 1 | TEAM| 0| | 0| 0| | | 2 | TEAM| 0| | 0| 0| | | 3 | TEAM| 0| | 0| 0| | | 4 | TEAM| 0| | 0| 0| | | 5 | TEAM| 0| | 0| 0| | | 6 | TEAM| 0| | 0| 0| | | 7 | TEAM| 0| | 0| 0| | | 8 | TEAM| 0| | 0| 0| | | 9 | TEAM| 0| | 0| 0| | | 10 | TEAM| 0| | 0| 0| | | 11 | TEAM| 0| | 0| 0| | | 12 | TEAM| 0| | 0| 0| | | 13 | TEAM| 0| | 0| 0| | | 14 | TEAM| 0| | 0| 0| | | 15 | TEAM| 0| | 0| 0| | | 16 | TEAM| 0| | 0| 0| | | 17 | TEAM| 0| | 0| 0| | | 18 | TEAM| 0| | 0| 0| | | 19 | TEAM| 0| | 0| 0| | | 20 | TEAM| 0| | 0| 0| | | 21 | TEAM| 0| | 0| 0| | | 22 | TEAM| 0| | 0| 0| | | 23 | TEAM| 0| | 0| 0| | | 24 | TEAM| 0| | 0| 0| | | 25 | TEAM| 0| | 0| 0| | | 26 | TEAM| 0| | 0| 0| | | 27 | TEAM| 0| | 0| 0| | | 28 | TEAM| 0| | 0| 0| | | 29 | TEAM| 0| | 0| 0| | | 30 | TEAM| 0| | 0| 0| | | 31 | TEAM| 0| | 0| 0| | | 32 | TEAM| 0| | 0| 0| | | 33 | TEAM| 0| | 0| 0| | | 34 | TEAM| 0| | 0| 0| | | 35 | TEAM| 0| | 0| 0| | | 36 | TEAM| 0| | 0| 0| | | 37 | TEAM| 0| | 0| 0| | | 38 | TEAM| 0| | 0| 0| | | 39 | TEAM| 0| | 0| 0| | | 40 | TEAM| 0| | 0| 0| | | 41 | TEAM| 0| | 0| 0| | | 42 | TEAM| 0| | 0| 0| | | 43 | TEAM| 0| | 0| 0| | | 44 | TEAM| 0| | 0| 0| | | 45 | TEAM| 0| | 0| 0| | | 46 | TEAM| 0| | 0| 0| | | 47 | TEAM| 0| | 0| 0| | | 48 | TEAM| 0| | 0| 0| | | 49 | TEAM| 0| | 0| 0| | | 50 | TEAM| 0| | 0| 0| | | 51 |  -------------------------------------------------------------------------------- /mbmgemp/MBMGETEA.NEW: -------------------------------------------------------------------------------- 1 | TEAM| 0| | 0| 0| | | 2 | TEAM| 0| | 0| 0| | | 3 | TEAM| 0| | 0| 0| | | 4 | TEAM| 0| | 0| 0| | | 5 | TEAM| 0| | 0| 0| | | 6 | TEAM| 0| | 0| 0| | | 7 | TEAM| 0| | 0| 0| | | 8 | TEAM| 0| | 0| 0| | | 9 | TEAM| 0| | 0| 0| | | 10 | TEAM| 0| | 0| 0| | | 11 | TEAM| 0| | 0| 0| | | 12 | TEAM| 0| | 0| 0| | | 13 | TEAM| 0| | 0| 0| | | 14 | TEAM| 0| | 0| 0| | | 15 | TEAM| 0| | 0| 0| | | 16 | TEAM| 0| | 0| 0| | | 17 | TEAM| 0| | 0| 0| | | 18 | TEAM| 0| | 0| 0| | | 19 | TEAM| 0| | 0| 0| | | 20 | TEAM| 0| | 0| 0| | | 21 | TEAM| 0| | 0| 0| | | 22 | TEAM| 0| | 0| 0| | | 23 | TEAM| 0| | 0| 0| | | 24 | TEAM| 0| | 0| 0| | | 25 | TEAM| 0| | 0| 0| | | 26 | TEAM| 0| | 0| 0| | | 27 | TEAM| 0| | 0| 0| | | 28 | TEAM| 0| | 0| 0| | | 29 | TEAM| 0| | 0| 0| | | 30 | TEAM| 0| | 0| 0| | | 31 | TEAM| 0| | 0| 0| | | 32 | TEAM| 0| | 0| 0| | | 33 | TEAM| 0| | 0| 0| | | 34 | TEAM| 0| | 0| 0| | | 35 | TEAM| 0| | 0| 0| | | 36 | TEAM| 0| | 0| 0| | | 37 | TEAM| 0| | 0| 0| | | 38 | TEAM| 0| | 0| 0| | | 39 | TEAM| 0| | 0| 0| | | 40 | TEAM| 0| | 0| 0| | | 41 | TEAM| 0| | 0| 0| | | 42 | TEAM| 0| | 0| 0| | | 43 | TEAM| 0| | 0| 0| | | 44 | TEAM| 0| | 0| 0| | | 45 | TEAM| 0| | 0| 0| | | 46 | TEAM| 0| | 0| 0| | | 47 | TEAM| 0| | 0| 0| | | 48 | TEAM| 0| | 0| 0| | | 49 | TEAM| 0| | 0| 0| | | 50 | TEAM| 0| | 0| 0| | | 51 | -------------------------------------------------------------------------------- /mbmgemp/MBMGEUSR.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEUSR.DAT -------------------------------------------------------------------------------- /mbmgemp/MBMGEUSR.NEW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsimser/ge/9bf8e3a2125b0a0b33cf3910c629da92214e091f/mbmgemp/MBMGEUSR.NEW -------------------------------------------------------------------------------- /mbmgemp/README.TXT: -------------------------------------------------------------------------------- 1 | Galactic Empire 2 | Copyright (C) 1988, 89, 90, 91, 92 Michael B. Murdock 3 | 4 | This is the source for the Galactic Empire game module which is being 5 | released under the terms of the GNU General Public License (see below). 6 | This file MUST accompany any distribution of this program, and part of this 7 | program, or any derivitive works of this program. 8 | 9 | Authors Note: The source code to this program is being made available 10 | to the general public in the hopes that it will continue 11 | to live on and evolve. While I cannot provide the time 12 | to personally participate in its development any longer, 13 | I am eager to assist in the design discussions, testing 14 | and project discussions. 15 | 16 | To foster a community for Galactic Empire developers I 17 | have created a project home page at... 18 | http://mbbs.sitesage.net 19 | 20 | I may be contacted via email at mmurdock@starphire.com 21 | 22 | 23 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 | 25 | This program is free software; you can redistribute it and/or modify 26 | under the terms of the GNU General Public License as published by the 27 | Free Software Foundation; either version 2 of the License, or (at your 28 | option) any later version. 29 | 30 | This program is distributed in the hope that it will be useful, 31 | but WITHOUT ANY WARRANTY; without even the implied warranty of 32 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 33 | General Public License for more details. 34 | 35 | You should have received a copy of the GNU General Public License 36 | along with this program; if not, write to the Free Software Foundation, 37 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 38 | 39 | 40 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 41 | 42 | The GNU General Public License (GPL) 43 | Version 2, June 1991 44 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 45 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 46 | 47 | Everyone is permitted to copy and distribute verbatim copies 48 | of this license document, but changing it is not allowed. 49 | 50 | Preamble 51 | 52 | The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. 53 | 54 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. 55 | 56 | To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. 57 | 58 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. 59 | 60 | We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. 61 | 62 | Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. 63 | 64 | Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. 65 | 66 | The precise terms and conditions for copying, distribution and modification follow. 67 | 68 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 69 | 70 | 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 73 | 74 | 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 75 | 76 | You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 77 | 78 | 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 79 | 80 | a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. 81 | 82 | b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. 83 | 84 | c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) 85 | 86 | These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 87 | 88 | Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. 89 | 90 | In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 91 | 92 | 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: 93 | 94 | a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 95 | 96 | b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 97 | 98 | c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) 99 | 100 | The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 101 | 102 | If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 103 | 104 | 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 105 | 106 | 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 107 | 108 | 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 109 | 110 | 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. 111 | 112 | If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. 113 | 114 | It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 115 | 116 | This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 117 | 118 | 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 119 | 120 | 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 121 | 122 | Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 123 | 124 | 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 125 | 126 | NO WARRANTY 127 | 128 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 129 | 130 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 131 | 132 | END OF TERMS AND CONDITIONS 133 | 134 | For more information on the GNU GPL visit http://www.opensource.org 135 | -------------------------------------------------------------------------------- /mbmgemp/SECURE.C: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #include "gcomm.h" 18 | #include "dos.h" 19 | #include "majorbbs.h" 20 | #include "string.h" 21 | #include "secure.h" 22 | 23 | /* Begin btrieve includes */ 24 | char *fbuf; 25 | int fkeylen; 26 | struct btvblk *fopnbtv(char *filnam, int maxlen); 27 | void btverr(char *who); 28 | int fclckln(void); 29 | void maksur(int size); 30 | void eclalcrem(int size, int *seg, char **sel); 31 | int btvu(int funcno, int datbufseg, int keyseg, int keyno, int rlen); 32 | void eclint(int inum, REGS16 *regs); 33 | void DosBlockIntr(void); 34 | void DosUnblockIntr(void); 35 | int protect(int, char *); 36 | int securit(void); 37 | static char *secptr; 38 | static int secseg=0; 39 | 40 | struct filspc { /* Btrieve STAT command file spec */ 41 | int reclen; 42 | int pagsiz; 43 | int numofx; 44 | long numofr; 45 | int flags; 46 | int reserved; 47 | int unupag; 48 | }; 49 | static struct btvblk *bb; /* current btvu file pointer set */ 50 | static int bbomode=PRIMBV; /* opnbtv() file-open mode */ 51 | static char *gpbptr; /* general purpose buffer pointer */ 52 | static int gpbseg; /* real-mode segment of the above */ 53 | static int *statusptr; /* status code returned by btvu() */ 54 | static int statusseg; /* real-mode segment of the above */ 55 | static int lastlen; /* length of last record read in */ 56 | 57 | static 58 | struct btvdat { /* btrieve parameter block structure for use with INT 0x7B */ 59 | int datbufoff; 60 | int datbufseg; 61 | int dbflen; 62 | int posp38off; 63 | int posp38seg; 64 | int posblkoff; 65 | int posblkseg; 66 | int funcno; 67 | int keyoff; 68 | int keyseg; 69 | char keylen; 70 | char keyno; 71 | int statptoff; 72 | int statptseg; 73 | int magic; 74 | } *btvdatptr; 75 | static int btvdatseg; /* real-mode segment of the above */ 76 | 77 | struct keyspc { /* Btrieve STAT command key specs */ 78 | int keypos; 79 | int keylen; 80 | int flags; 81 | long numofk; 82 | int dontcare; 83 | long reserved; 84 | }; 85 | 86 | #define ANOSEG 0x10 /* keyspc.flags bit for key has another seg */ 87 | 88 | struct statbf { /* STAT command ret buf layout */ 89 | struct filspc fs; 90 | struct keyspc ks[SEGMAX]; 91 | char altcol[265]; 92 | }; 93 | 94 | unsigned int oldimsk; /* old 8259 interrupt mask */ 95 | 96 | /* end btrieve includes */ 97 | 98 | /* begin security stuff */ 99 | 100 | char *regpnt; 101 | static int fpend, tdover, fpcnt; 102 | static long encode, fpdays; 103 | static char regrno[9], chkrno[9]; 104 | static char *securn="00000000\0"; 105 | 106 | /* end security stuff */ 107 | 108 | struct btvblk *sec_opnbtv( char *datfilnam, 109 | int sizostruct, 110 | char *seed, 111 | int regnum, 112 | char *key, 113 | int method) 114 | 115 | { 116 | int x; 117 | char pos1[9]; 118 | char pos2[9]; 119 | char pos3[9]; 120 | char pos4[9]; 121 | 122 | struct btvblk* secdb; 123 | extern char bturno[]; 124 | char fpendt[3]; 125 | 126 | tdover = 0; 127 | regpnt = stgopt(regnum); 128 | strcpy(regrno, regpnt); 129 | 130 | secure = (struct secure *)alcmem(sizeof(struct secure)); 131 | secure->open_stat = 0; 132 | secure->days_run = 0; 133 | secure->days_tot = 0; 134 | setmem(secure->reg_num, 9, '\0'); 135 | strcpy(secure->reg_num, regrno); 136 | encode = atol(seed); 137 | fpendt[0] = seed[0]; 138 | fpendt[1] = seed[6]; 139 | fpendt[2] = '\0'; 140 | fpend = atoi(fpendt); 141 | protect(method, seed); 142 | strcpy(securn, chkrno); 143 | secdb = fopnbtv(datfilnam, sizostruct); 144 | setbtv(secdb); 145 | btvu(29, securit(), securit(), bbomode, strlen(chkrno)); 146 | setmem(securn, 9, '\0'); 147 | fbuf = malloc(sizostruct); 148 | setmem(secure->key, fkeylen, '\0'); 149 | memcpy(secure->key, key, fkeylen-1); 150 | if(!cntrbtv()){ 151 | setmem(fbuf, sizostruct, '\0'); 152 | memcpy(fbuf, secure->key, fkeylen); 153 | sprintf(&fbuf[fkeylen], "%8ld", fpdays^encode); 154 | sprintf(&fbuf[fkeylen+8], "%8ld", fpdays^encode); 155 | sprintf(&fbuf[fkeylen+16], "%8ld", (atol(bturno))^(1)); 156 | sprintf(&fbuf[fkeylen+24], "%8ld", (atol(bturno))^(fpdays)); 157 | for(x = fkeylen;xkey, 0); 164 | for(x = fkeylen;xfpdays) 194 | ||((fpdays-(atol(pos1)^(encode)))>fpend) 195 | ||(fpcnt>fpend) 196 | ||((atol(pos1)^(encode))! = (atol(pos4)^(atol(bturno))))) 197 | { 198 | tdover = 1; 199 | secure->open_stat = 0; 200 | clsbtv(secdb); 201 | } 202 | } 203 | else 204 | { 205 | secure->open_stat = 1; 206 | } 207 | 208 | if(!protect(method, seed) && !tdover) 209 | { 210 | secure->open_stat = -1; 211 | } 212 | if((30-fpend)<0){ 213 | secure->open_stat = 0; 214 | clsbtv(secdb); 215 | } 216 | secure->days_run = fpcnt; 217 | secure->days_tot = fpend; 218 | return(secdb); 219 | } 220 | 221 | int 222 | securit() 223 | { 224 | if(secseg = = 0) 225 | eclalcrem(10, &secseg, &secptr); 226 | strcpy(secptr, securn); 227 | return(secseg); 228 | } 229 | 230 | 231 | int protect(int method, char *seed) 232 | { 233 | char tmpc[2]; 234 | char tmpd[3]; 235 | char temp[9]; 236 | int i, val1, val2, dec; 237 | extern char bturno[]; 238 | setmem(chkrno, 9, '\0'); 239 | setmem(temp, 9, '\0'); 240 | strcpy(temp, ltoa(atol(bturno)^(encode))); 241 | dec = 8; 242 | for(i = strlen(temp);i>-1;i = i-1){ 243 | chkrno[dec] = temp[i]; 244 | dec = dec-1; 245 | } 246 | fpdays = cofdat(today()); 247 | if(method = = 1){ 248 | for(i = 0; i<8; ++i){ 249 | tmpc[0] = chkrno[i]; 250 | tmpc[1] = 0; 251 | val1 = atoi(tmpc); 252 | tmpc[0] = seed[i]; 253 | tmpc[1] = 0; 254 | val2 = atoi(tmpc); 255 | setmem(tmpd, 3, '\0'); 256 | itoa(val1+val2, tmpd, 10); 257 | chkrno[i] = tmpd[strlen(tmpd)-1]; 258 | } 259 | } 260 | if(sameas(regrno, chkrno)) return(1); 261 | return(0); 262 | } 263 | 264 | 265 | 266 | 267 | /* Begin btrieve utilities */ 268 | 269 | struct btvblk * 270 | fopnbtv( /* open a Btrieve file; return ptr.*/ 271 | char *filnam, /* name of file to open */ 272 | int maxlen) /* maximum length of recs in file */ 273 | { 274 | int tptr; 275 | 276 | if (statusptr = = NULL) { 277 | eclalcrem(sizeof(int), &statusseg, (char **)&statusptr); 278 | eclalcrem(sizeof(struct btvdat), &btvdatseg, (char **)&btvdatptr); 279 | } 280 | eclalcrem(sizeof(struct btvblk), &tptr, (char **)&bb); 281 | bb->realseg = tptr; 282 | 283 | bb->filnam = malloc(strlen(filnam)+1); 284 | strcpy(bb->filnam, filnam); 285 | bb->reclen = maxlen; 286 | eclalcrem(maxlen, &bb->dataseg, &bb->data); 287 | maksur(strlen(filnam)+1); 288 | strcpy(gpbptr, filnam); 289 | if (btvu(0, securit(), gpbseg, bbomode, bb->reclen) ! = 0) { 290 | btverr("OPEN"); 291 | } 292 | eclalcrem(fclckln(), &bb->keyseg, &bb->key); 293 | return(bb); 294 | } 295 | 296 | STATIC void 297 | btverr( /* print out any btrieve error messages */ 298 | char *who) 299 | { 300 | char buff[40]; 301 | 302 | sprintf(buff, "%s ERROR %d", who, status); 303 | catastro("BTRIEVE %s ON FILE \"%s\"", buff, bb->filnam); 304 | } 305 | 306 | #define GPBP ((struct statbf *)gpbptr) 307 | 308 | int 309 | fclckln(void) /* calculate all key lengths in curr file */ 310 | { /* (and return the max of them all) */ 311 | static int kbfseg = 0; 312 | 313 | int i, keyno, klen, maxofa; 314 | char *tmp; 315 | 316 | if (kbfseg = = 0) { 317 | eclalcrem(64, &kbfseg, &tmp); 318 | } 319 | maksur(sizeof(struct statbf)); 320 | if (btvu(15, gpbseg, kbfseg, 0, sizeof(struct statbf)) ! = 0) { 321 | btverr("STAT"); 322 | } 323 | maxofa = 0; 324 | fkeylen = GPBP->ks[0].keylen; 325 | for (i = 0, keyno = 0 ; keyno < GPBP->fs.numofx ; i++, keyno++) { 326 | klen = GPBP->ks[i].keylen; 327 | while (GPBP->ks[i].flags&ANOSEG) { 328 | klen+ = GPBP->ks[++i].keylen; 329 | } 330 | bb->keylns[keyno] = klen; 331 | if (klen > maxofa) { 332 | maxofa = klen; 333 | } 334 | } 335 | return(maxofa+1); 336 | } 337 | 338 | void 339 | maksur( /* make sure that gen purp buff is big enough*/ 340 | int size) 341 | { 342 | static int gpbsiz = 0; 343 | 344 | if (size > gpbsiz) { 345 | if (gpbsiz > 0) { 346 | free(gpbptr); 347 | } 348 | eclalcrem(size, &gpbseg, &gpbptr); 349 | gpbsiz = size; 350 | } 351 | } 352 | 353 | void 354 | eclalcrem( /* allocate real-mode dynamic memory */ 355 | int size, /* (make both real seg and selector) */ 356 | int *seg, 357 | char **sel) 358 | { 359 | void DosBlockIntr(void); 360 | void DosUnblockIntr(void); 361 | SEL pmsel; 362 | int rv; 363 | 364 | DosBlockIntr(); 365 | if ((rv = DosAllocRealSeg((ULONG)size, (PUSHORT)seg, &pmsel)) ! = 0) { 366 | DosUnblockIntr(); 367 | catastro("REAL-MODE MEMORY POOL EXHAUSTED (rv = %d, %d bytes)", rv, size); 368 | } 369 | DosUnblockIntr(); 370 | *sel = MK_FP(pmsel, 0); 371 | return; 372 | } 373 | 374 | int 375 | btvu( /* underlying Btrieve cmd interface */ 376 | int funcno, 377 | int datbufseg, 378 | int keyseg, 379 | int keyno, 380 | int rlen) 381 | { 382 | REGS16 eclregs; 383 | static int btrvup = 0, alrcat = 0; 384 | 385 | if (!btrvup) { 386 | memset(&eclregs, 0, sizeof(REGS16)); 387 | eclregs.ax = 0x357B; 388 | eclint(0x21, &eclregs); 389 | if (eclregs.bx ! = 0x33) { 390 | if (alrcat) { 391 | return(0); 392 | } 393 | alrcat = 1; 394 | catastro("Run BTRIEVE first, before running The Major BBS!"); 395 | } 396 | btrvup = 1; 397 | } 398 | btvdatptr->datbufoff = 0; 399 | btvdatptr->datbufseg = datbufseg; 400 | btvdatptr->dbflen = rlen; 401 | btvdatptr->posp38off = 38; 402 | btvdatptr->posp38seg = bb->realseg; 403 | btvdatptr->posblkoff = 0; 404 | btvdatptr->posblkseg = bb->realseg; 405 | btvdatptr->funcno = funcno; 406 | btvdatptr->keyoff = 0; 407 | btvdatptr->keyseg = keyseg; 408 | btvdatptr->keylen = (char)255; 409 | btvdatptr->keyno = (char)keyno; 410 | btvdatptr->statptoff = 0; 411 | btvdatptr->statptseg = statusseg; 412 | *statusptr = 0; 413 | btvdatptr->magic = 24950; 414 | memset(&eclregs, 0, sizeof(REGS16)); 415 | eclregs.dx = 0; 416 | eclregs.ds = btvdatseg; 417 | eclint(0x7B, &eclregs); 418 | lastlen = btvdatptr->dbflen; 419 | return(status = *statusptr); 420 | } 421 | 422 | void 423 | eclint( /* protected to real interrupt */ 424 | int inum, 425 | REGS16 *regs) 426 | { 427 | DosRealIntr(inum, regs, 0L, 0); 428 | } 429 | 430 | void 431 | DosBlockIntr(void) /* Block all interrupts at 8259 */ 432 | { 433 | asm cli 434 | asm in al, 0x21 435 | asm mov oldimsk, ax 436 | asm mov al, 0xFF 437 | asm out 0x21, al 438 | } 439 | 440 | void 441 | DosUnblockIntr(void) /* Unblock all interrupts at 8259 */ 442 | { 443 | asm mov ax, oldimsk 444 | asm out 0x21, al 445 | asm sti 446 | } 447 | 448 | /* end btrieve utilities */ 449 | -------------------------------------------------------------------------------- /mbmgemp/SECURE.H: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #define METHOD 0 18 | 19 | #define KEY "~!@#$%^&*~!@#$%^&*~!@#$%^&*~!@#$%^&*~!@#$%^&*~!@#$%^&*~!@#$" 20 | 21 | /* Record Key used in secure process */ 22 | 23 | #define SEED "19283746" /*Choose a unique seed for each application */ 24 | /* ^ ^ */ 25 | /* 1 4 */ 26 | /* 14 = number of day's test drive is to run */ 27 | 28 | struct secure { 29 | int open_stat; /* 0=not opened, -1=testdrive, 1=registered */ 30 | int days_run; /* number of days run as test drive (-1=!testdrive) */ 31 | int days_tot; /* number of days testdrive is good for (-1=!testdrive) */ 32 | char reg_num[9]; /* Registration number */ 33 | char key[UIDSIZ]; 34 | }; 35 | 36 | 37 | extern struct secure *secure; 38 | struct btvblk *sec_opnbtv(char *datfilnam,int sizostruct,char *seed, int regnum,char *key, int method); 39 | 40 | -------------------------------------------------------------------------------- /register/README.NOW: -------------------------------------------------------------------------------- 1 | ******* NOTICE ****** 2 | 3 | THIS DISKETTE AND ALL ITS CONTENTS ARE CONFIDENTIAL INFORMATION. UNDER NO 4 | CONDITIONS MAY IT BE DUPLICATED OR DISTRIBUTED. 5 | 6 | (c) 1995 M.B. Murdock & Associates ALL RIGHTS RESERVED 7 | 8 | 9 | This file describes the registration process for the software products 10 | published by M.B. Murdock & Associates. 11 | 12 | There are two programs contained on this diskette; 13 | 14 | REGISTER.EXE 15 | which is used for Galactic Empire, and The Legend of Elyth Gor. 16 | 17 | REG2.EXE 18 | which is used for all other programs. 19 | 20 | The registration process used requires you to enter a confidential "seed" 21 | number and the customers Major BBS or Worldgroup registration number. It 22 | will then generate a "key" number which when entered according to the 23 | documentation for each software package (usually in the appropriate 24 | .MSG file) will "unlock" the program and permit it to run in non-demo mode. 25 | 26 | The seeds for each program are as follows; 27 | 28 | Galactic Empire 10094056 Use REGISTER method 1 29 | Elyth Gor 09254355 Use REGISTER method 1 30 | Announcer 12332184 Use REG2 31 | Bonus Bonanza 75684539 Use REG2 32 | Newsman 32435465 Use REG2 33 | Major Pager 92564187 Use REG2 34 | 35 | 36 | For additional assistance contact: 37 | 38 | Mike Murdock 39 | P.O. Box 2194 40 | Pinellas Park, Fl. 34665-2194 41 | Phone: 813-545-8050 42 | BBS: 813-541-5876 43 | FAX: 813-541-5876 44 | Pager: 1-800-SKY-PAGE Pin:8373422 45 | Email: mmurdock@digital.net 46 | 47 | 48 | -------------------------------------------------------------------------------- /register/REG2.CPP: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #include "string.h" 18 | #include "dos.h" 19 | #include "stdio.h" 20 | #include "stdlib.h" 21 | 22 | 23 | int getreg(char *seed,char *mbbs); 24 | 25 | char number[2]; 26 | char seed[9]; 27 | char bturno[9]; 28 | 29 | int i; 30 | char k; 31 | 32 | static char mask[] ="12332184"; 33 | 34 | char tmp_bturno[9]; 35 | char tmp_key[9]; 36 | 37 | 38 | void main(void) 39 | { 40 | printf("REGISTER/2 for Non-Btrieve Methods\n\n"); 41 | 42 | 43 | strcpy(seed,'\0'); 44 | while(strlen(seed)!=8){ 45 | printf("The Seed for your module must be 8 characters long!\n\n"); 46 | printf("Enter the SEED for your module : "); 47 | gets(seed); 48 | } 49 | while (getreg(seed,bturno)); 50 | 51 | return; 52 | } 53 | 54 | int getreg(char *seed,char *mbbs) 55 | { 56 | char chkrno[9]; 57 | char tmpc[3]; 58 | int i,val1,val2; 59 | strcpy(mbbs,'\0'); 60 | while(strlen(mbbs)!=8){ 61 | printf("The MBBS registration number must be 8 characters long!\n\n"); 62 | printf("Enter the MBBS registration number (or Q to quit): "); 63 | gets(mbbs); 64 | if((strlen(mbbs)==1)&&((mbbs[0]=='Q')||(mbbs[0]=='q'))){ 65 | strcpy(mbbs,"QQQQQQQQ"); 66 | } 67 | } 68 | if(mbbs[0]=='Q')return(0); 69 | 70 | strncpy(tmp_bturno,bturno,9); 71 | strncpy(mask,seed,9); 72 | 73 | if (strlen(tmp_bturno) != 8) 74 | { 75 | printf("\n\nANN:bturno NG %s\n\n",tmp_bturno); 76 | return(1); 77 | } 78 | 79 | for (i=0;i<8;++i) 80 | { 81 | k = tmp_bturno[i]^mask[7-i]; 82 | k = k%10; 83 | tmp_key[i] = k+48; 84 | } 85 | tmp_key[8] = 0; 86 | 87 | printf("\n\n The registration number for this module is : %s\n",tmp_key); 88 | return(1); 89 | } 90 | 91 | -------------------------------------------------------------------------------- /register/REG3.CPP: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #include "string.h" 18 | #include "dos.h" 19 | #include "stdio.h" 20 | #include "stdlib.h" 21 | 22 | 23 | int getreg(char *seed,char *mbbs); 24 | 25 | char number[2]; 26 | char seed[9]; 27 | char bturno[9]; 28 | 29 | int i; 30 | char k; 31 | 32 | static char mask[] ="12332184"; 33 | 34 | char tmp_bturno[9]; 35 | char tmp_key[9]; 36 | 37 | 38 | void main(void) 39 | { 40 | printf("REGISTER/3 for Non-Btrieve Methods\n\n"); 41 | 42 | 43 | strcpy(seed,'\0'); 44 | while(strlen(seed)!=8){ 45 | printf("The Seed for your module must be 8 characters long!\n\n"); 46 | printf("Enter the SEED for your module : "); 47 | gets(seed); 48 | } 49 | while (getreg(seed,bturno)); 50 | 51 | return; 52 | } 53 | 54 | int getreg(char *seed,char *mbbs) 55 | { 56 | char chkrno[9]; 57 | char tmpc[3]; 58 | int i,val1,val2; 59 | strcpy(mbbs,'\0'); 60 | while(strlen(mbbs)!=8){ 61 | printf("The MBBS registration number must be 8 characters long!\n\n"); 62 | printf("Enter the MBBS registration number (or Q to quit): "); 63 | gets(mbbs); 64 | if((strlen(mbbs)==1)&&((mbbs[0]=='Q')||(mbbs[0]=='q'))){ 65 | strcpy(mbbs,"QQQQQQQQ"); 66 | } 67 | } 68 | if(mbbs[0]=='Q')return(0); 69 | 70 | strncpy(tmp_bturno,bturno,9); 71 | strncpy(mask,seed,9); 72 | 73 | if (strlen(tmp_bturno) != 8) 74 | { 75 | printf("\n\nANN:bturno NG %s\n\n",tmp_bturno); 76 | return(1); 77 | } 78 | 79 | for (i=0;i<8;++i) 80 | { 81 | k = tmp_bturno[i]^mask[7-i]; 82 | k+=(i*3); 83 | k = k%10; 84 | tmp_key[i] = k+48; 85 | } 86 | tmp_key[8] = 0; 87 | 88 | printf("\n\n The registration number for this module is : %s\n",tmp_key); 89 | return(1); 90 | } 91 | 92 | -------------------------------------------------------------------------------- /register/REGISTER.CPP: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * This program is free software; you can redistribute it and/or modify * 3 | * under the terms of the GNU General Public License as published by the * 4 | * Free Software Foundation; either version 2 of the License, or (at your * 5 | * option) any later version. * 6 | * * 7 | * This program is distributed in the hope that it will be useful, * 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 10 | * General Public License for more details. * 11 | * * 12 | * You should have received a copy of the GNU General Public License * 13 | * along with this program; if not, write to the Free Software Foundation,* 14 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 15 | *************************************************************************/ 16 | 17 | #include "string.h" 18 | #include "dos.h" 19 | #include "stdio.h" 20 | #include "stdlib.h" 21 | int getreg(char *seed,char *mbbs,int method); 22 | void main(void) 23 | { 24 | char number[2]; 25 | char seed[9]; 26 | char mbbs[9]; 27 | int method=-1; 28 | strcpy(seed,'\0'); 29 | while(strlen(seed)!=8){ 30 | printf("The Seed for your module must be 8 characters long!\n\n"); 31 | printf("Enter the SEED for your module : "); 32 | gets(seed); 33 | } 34 | while((method<0)||(method>9)){ 35 | printf("The Method number must be between 0 and 9!\n\n"); 36 | printf("Enter the Method Your module uses : "); 37 | gets(number); 38 | method=atoi(number); 39 | } 40 | while (getreg(seed,mbbs,method)); 41 | 42 | return; 43 | } 44 | 45 | int getreg(char *seed,char *mbbs,int method) 46 | { 47 | char chkrno[9]; 48 | char tmpc[3]; 49 | int i,val1,val2; 50 | strcpy(mbbs,'\0'); 51 | while(strlen(mbbs)!=8){ 52 | printf("The MBBS registration number must be 8 characters long!\n\n"); 53 | printf("Enter the MBBS registration number (or Q to quit): "); 54 | gets(mbbs); 55 | if((strlen(mbbs)==1)&&((mbbs[0]=='Q')||(mbbs[0]=='q'))){ 56 | strcpy(mbbs,"QQQQQQQQ"); 57 | } 58 | } 59 | if(mbbs[0]=='Q')return(0); 60 | sprintf(chkrno,"%8ld",(atol(seed))^(atol(mbbs))); 61 | 62 | if(method==1){ 63 | for(i=0; i<8; ++i){ 64 | tmpc[0]=chkrno[i]; 65 | tmpc[1]=0; 66 | val1=atoi(tmpc); 67 | tmpc[0]=seed[i]; 68 | tmpc[1]=0; 69 | val2=atoi(tmpc); 70 | itoa(val1+val2,tmpc,10); 71 | chkrno[i]=tmpc[strlen(tmpc)-1]; 72 | } 73 | } 74 | printf("\n\n The registration number for this module is : %s\n",chkrno); 75 | return(1); 76 | } 77 | --------------------------------------------------------------------------------