home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
vmsnet.sources.games
/
vmsnetrek
/
part26
< prev
next >
Wrap
Text File
|
1992-11-14
|
15KB
|
365 lines
Newsgroups: vmsnet.sources.games
Path: uunet!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!usenet.coe.montana.edu!news.u.washington.edu!raven.alaska.edu!acad2.alaska.edu!asdmf
From: asdmf@acad2.alaska.edu
Subject: Vmsnetrek 26/47
Message-ID: <1992Nov13.140735.1@acad2.alaska.edu>
Lines: 352
Sender: news@raven.alaska.edu (USENET News System)
Nntp-Posting-Host: acad2.alaska.edu
Organization: University of Alaska
Date: Fri, 13 Nov 1992 18:07:35 GMT
Xref: uunet vmsnet.sources.games:512
-+-+-+-+-+-+-+-+ START OF PART 26 -+-+-+-+-+-+-+-+
X#define press_height 5
Xstatic char press_bits`091`093 = `123
X 0x0f, 0x11, 0x0f, 0x01, 0x01`125;
X
X
X#ifdef VMS
Xnewwinf(hostmon, progname)
X#else
Xnewwin(hostmon, progname)
X#endif
Xchar *hostmon, *progname;
X`123
X int i;
X
X W_Initialize(hostmon);
X
X baseWin = W_MakeWindow("netrek",0,YOFF,WINSIDE*2+1*BORDER,
X`009WINSIDE+2*BORDER+2*MESSAGESIZE,NULL,BORDER,gColor);
X iconWin = W_MakeWindow("netrek_icon",0, 0, icon_width, icon_height, NULL
V,
X`009BORDER, gColor);
X W_SetIconWindow(baseWin, iconWin);
X w = W_MakeWindow("local",-BORDER, -BORDER, WINSIDE, WINSIDE, baseWin,`03
V2
X`009BORDER, foreColor);
X mapw = W_MakeWindow("map", WINSIDE, -BORDER, WINSIDE, WINSIDE, baseWin,`
V032
X`009BORDER, foreColor);
X tstatw = W_MakeWindow("tstat", -BORDER,WINSIDE,WINSIDE,STATSIZE,baseWin,
X`009BORDER, foreColor);
X warnw = W_MakeWindow("warn", WINSIDE, WINSIDE, WINSIDE, MESSAGESIZE,`032
X`009baseWin, BORDER, foreColor);
X messagew = W_MakeWindow("message", WINSIDE, WINSIDE+BORDER+MESSAGESIZE,
X`009WINSIDE, MESSAGESIZE, baseWin, BORDER, foreColor);
X planetw = W_MakeTextWindow("planet",10,10,53,MAXPLANETS+3,w,2);
X rankw = W_MakeTextWindow("rank",50,300,65,NUMRANKS+8,w,2);
X playerw = W_MakeTextWindow("player",0,YOFF+WINSIDE+2*BORDER+2*MESSAGESIZ
VE,
X`00983, MAXPLAYER+3, NULL, 2);
X helpWin = W_MakeTextWindow("help",0,YOFF+WINSIDE+2*BORDER+2*MESSAGESIZE,
X`009160, 13, NULL, BORDER);
X messwa = W_MakeScrollingWindow("review_all", WINSIDE + BORDER,
X`009YOFF + WINSIDE + 3 * BORDER + 2 * MESSAGESIZE, 80, 10, 0, BORDER);
X messwt = W_MakeScrollingWindow("review_team", WINSIDE + BORDER,
X`009YOFF + WINSIDE + 4 * BORDER + 2 * MESSAGESIZE + 10*W_Textheight + 8,
X`00980, 5, 0, BORDER);
X messwi = W_MakeScrollingWindow("review_your",WINSIDE + BORDER,
X`009YOFF + WINSIDE + 5 * BORDER + 2 * MESSAGESIZE + 15*W_Textheight + 16,
X`00980, 4, 0, BORDER);
X messwk = W_MakeScrollingWindow("review_kill", WINSIDE + BORDER,
X`009YOFF + WINSIDE + 6 * BORDER + 2 * MESSAGESIZE + 19*W_Textheight + 24,
X`00980, 6, 0, BORDER);
X reviewWin = W_MakeScrollingWindow("review", WINSIDE+BORDER,
X`009YOFF + WINSIDE +3*BORDER+2*MESSAGESIZE,80,20,0,BORDER);
X udpWin = W_MakeMenu("UDP", WINSIDE+10, -BORDER+10, 40, UDP_NUMOPTS,
X`009NULL, 2);
X for (i = 0; i < 4; i++) `123
X teamWin`091i`093 = W_MakeWindow(teamshort`0911<<i`093, i * BOXSIDE,
V 400,`032
X`009 BOXSIDE, BOXSIDE, w, 1, foreColor);
X `125
X qwin = W_MakeWindow("quit", 4 * BOXSIDE, 400, BOXSIDE, BOXSIDE, w, 1,`03
V2
X`009foreColor);
X statwin = W_MakeWindow("stats", 422, 13, 160, 95, NULL, 5, foreColor);
X scanwin = W_MakeWindow("scanner", 422, 13, 160, 120, baseWin, 5, foreCol
Vor);
X W_DefineCursor(baseWin, 16, 16, cross_bits, crossmask_bits, 7, 7);
X W_DefineCursor(messwa, 16, 16, cross_bits, crossmask_bits, 7, 7);
X W_DefineCursor(messwt, 16, 16, cross_bits, crossmask_bits, 7, 7);
X W_DefineCursor(messwi, 16, 16, cross_bits, crossmask_bits, 7, 7);
X W_DefineCursor(helpWin, 16, 16, cross_bits, crossmask_bits, 7, 7);
X W_DefineCursor(playerw, 16, 16, cross_bits, crossmask_bits, 7, 7);
X W_DefineCursor(statwin, 16, 16, cross_bits, crossmask_bits, 7, 7);
X W_DefineCursor(scanwin, 16, 16, cross_bits, crossmask_bits, 7, 7);
X
X#define WARHEIGHT 2
X#define WARWIDTH 20
X#define WARBORDER 2
X
X war = W_MakeMenu("war", WINSIDE+10, -BORDER+10, WARWIDTH, 6, baseWin,`03
V2
X`009WARBORDER);
X
X getResources(progname);
X savebitmaps();
X`125
X
XmapAll()
X`123
X initinput();
X W_MapWindow(mapw);
X W_MapWindow(tstatw);
X W_MapWindow(warnw);
X W_MapWindow(messagew);
X W_MapWindow(w);
X W_MapWindow(baseWin);
X`125
X
Xsavebitmaps()
X`123
X register int i;
X for (i = 0; i < VIEWS; i++) `123`032
X`009fed_bitmaps`091SCOUT`093`091i`093 =`032
X`009 W_StoreBitmap(fed_scout_width, fed_scout_height,
X`009`009`009fed_scout_bits`091i`093, w);
X`009fed_bitmaps`091DESTROYER`093`091i`093 =`032
X`009 W_StoreBitmap(fed_destroyer_width, fed_destroyer_height,
X`009`009`009fed_destroyer_bits`091i`093, w);
X`009fed_bitmaps`091CRUISER`093`091i`093 =`032
X`009 W_StoreBitmap(fed_cruiser_width, fed_cruiser_height,
X`009`009`009fed_cruiser_bits`091i`093, w);
X`009fed_bitmaps`091BATTLESHIP`093`091i`093 =`032
X`009 W_StoreBitmap(fed_battleship_width, fed_battleship_height,
X`009`009`009fed_battleship_bits`091i`093, w);
X`009fed_bitmaps`091ASSAULT`093`091i`093 =`032
X`009 W_StoreBitmap(fed_assault_width, fed_assault_height,
X`009`009`009fed_assault_bits`091i`093, w);
X`009fed_bitmaps`091STARBASE`093`091i`093 =`032
X`009 W_StoreBitmap(fed_starbase_width, fed_starbase_height,
X`009`009`009fed_starbase_bits`091i`093, w);
X`009fed_bitmaps`091GALAXY`093`091i`093 = `009`009/* ATM - Galaxy */
X`009 W_StoreBitmap(fed_galaxy_width, fed_galaxy_height,
X`009`009`009fed_galaxy_bits`091i`093, w);
X
X `009kli_bitmaps`091SCOUT`093`091i`093 =`032
X`009 W_StoreBitmap(kli_scout_width, kli_scout_height,
X`009`009`009kli_scout_bits`091i`093, w);
X `009kli_bitmaps`091DESTROYER`093`091i`093 =`032
X`009 W_StoreBitmap(kli_destroyer_width, kli_destroyer_height,
X`009`009`009kli_destroyer_bits`091i`093, w);
X`009kli_bitmaps`091CRUISER`093`091i`093 =`032
X`009 W_StoreBitmap(kli_cruiser_width, kli_cruiser_height,
X`009`009`009kli_cruiser_bits`091i`093, w);
X`009kli_bitmaps`091BATTLESHIP`093`091i`093 =`032
X`009 W_StoreBitmap(kli_battleship_width, kli_battleship_height,
X`009`009`009kli_battleship_bits`091i`093, w);
X `009kli_bitmaps`091ASSAULT`093`091i`093 =`032
X`009 W_StoreBitmap(kli_assault_width, kli_assault_height,
X`009`009`009kli_assault_bits`091i`093, w);
X `009kli_bitmaps`091STARBASE`093`091i`093 =`032
X`009 W_StoreBitmap(kli_starbase_width, kli_starbase_height,
X`009`009`009kli_starbase_bits`091i`093, w);
X `009kli_bitmaps`091GALAXY`093`091i`093 = `009`009/* ATM - Galaxy */
X`009 W_StoreBitmap(kli_galaxy_width, kli_galaxy_height,
X`009`009`009kli_galaxy_bits`091i`093, w);
X
X`009rom_bitmaps`091SCOUT`093`091i`093 =`032
X`009 W_StoreBitmap(rom_scout_width, rom_scout_height,
X`009`009`009rom_scout_bits`091i`093, w);
X`009rom_bitmaps`091DESTROYER`093`091i`093 =`032
X`009 W_StoreBitmap(rom_destroyer_width, rom_destroyer_height,
X`009`009`009rom_destroyer_bits`091i`093, w);
X`009rom_bitmaps`091CRUISER`093`091i`093 =`032
X`009 W_StoreBitmap(rom_cruiser_width, rom_cruiser_height,
X`009`009`009rom_cruiser_bits`091i`093, w);
X`009rom_bitmaps`091BATTLESHIP`093`091i`093 =`032
X`009 W_StoreBitmap(rom_battleship_width, rom_battleship_height,
X`009`009`009rom_battleship_bits`091i`093, w);
X`009rom_bitmaps`091ASSAULT`093`091i`093 =`032
X`009 W_StoreBitmap(rom_assault_width, rom_assault_height,
X`009`009`009rom_assault_bits`091i`093, w);
X`009rom_bitmaps`091STARBASE`093`091i`093 =`032
X`009 W_StoreBitmap(rom_starbase_width, rom_starbase_height,
X`009`009`009rom_starbase_bits`091i`093, w);
X`009rom_bitmaps`091GALAXY`093`091i`093 = `009`009/* ATM - Galaxy */
X`009 W_StoreBitmap(rom_galaxy_width, rom_galaxy_height,
X`009`009`009rom_galaxy_bits`091i`093, w);
X
X`009ori_bitmaps`091SCOUT`093`091i`093 =`032
X`009 W_StoreBitmap(ori_scout_width, ori_scout_height,
X`009`009`009ori_scout_bits`091i`093, w);
X`009ori_bitmaps`091DESTROYER`093`091i`093 =`032
X`009 W_StoreBitmap(ori_destroyer_width, ori_destroyer_height,
X`009`009`009ori_destroyer_bits`091i`093, w);
X`009ori_bitmaps`091CRUISER`093`091i`093 =`032
X`009 W_StoreBitmap(ori_cruiser_width, ori_cruiser_height,
X`009`009`009ori_cruiser_bits`091i`093, w);`032
X`009ori_bitmaps`091BATTLESHIP`093`091i`093 =`032
X`009 W_StoreBitmap(ori_battleship_width, ori_battleship_height,
X`009`009`009ori_battleship_bits`091i`093, w);
X`009ori_bitmaps`091ASSAULT`093`091i`093 =`032
X`009 W_StoreBitmap(ori_assault_width, ori_assault_height,
X`009`009`009ori_assault_bits`091i`093, w);
X`009ori_bitmaps`091STARBASE`093`091i`093 =`032
X`009 W_StoreBitmap(ori_starbase_width, ori_starbase_height,
X`009`009`009ori_starbase_bits`091i`093, w);
X`009ori_bitmaps`091GALAXY`093`091i`093 = `009`009/* ATM - Galaxy */
X`009 W_StoreBitmap(ori_galaxy_width, ori_galaxy_height,
X`009`009`009ori_galaxy_bits`091i`093, w);
X
X`009ind_bitmaps`091SCOUT`093`091i`093 =`032
X`009 W_StoreBitmap(IggSC_width, IggSC_height,
X`009`009`009IggSC_bits`091i`093, w);
X`009ind_bitmaps`091DESTROYER`093`091i`093 =`032
X`009 W_StoreBitmap(IggDD_width, IggDD_height,
X`009`009`009IggDD_bits`091i`093, w);
X`009ind_bitmaps`091CRUISER`093`091i`093 =`032
X`009 W_StoreBitmap(IggCA_width, IggCA_height,
X`009`009`009IggCA_bits`091i`093, w);`032
X`009ind_bitmaps`091BATTLESHIP`093`091i`093 =`032
X`009 W_StoreBitmap(IggBB_width, IggBB_height,
X`009`009`009IggBB_bits`091i`093, w);
X`009ind_bitmaps`091ASSAULT`093`091i`093 =`032
X`009 W_StoreBitmap(IggAS_width, IggAS_height,
X`009`009`009IggAS_bits`091i`093, w);
X`009ind_bitmaps`091STARBASE`093`091i`093 =`032
X`009 W_StoreBitmap(IggSB_width, IggSB_height,
X`009`009`009IggSB_bits`091i`093, w);
X`009ind_bitmaps`091GALAXY`093`091i`093 = `009/* no GA bitmaps; reuse AS */
X`009 W_StoreBitmap(IggAS_width, IggAS_height,
X`009`009`009IggAS_bits`091i`093, w);
X
X`009fed_bitmaps`091ATT`093`091i`093 = kli_bitmaps`091ATT`093`091i`093 = rom_
Vbitmaps`091ATT`093`091i`093 =
X`009 ori_bitmaps`091ATT`093`091i`093 =
X`009 W_StoreBitmap(att_width, att_height, att_bits`091i`093, w);`009/* ATM
V */
X `125
X clockpic=W_StoreBitmap(clock_width, clock_height, clock_bits,
X`009qwin);
X for (i=0; i<5; i++) `123
X`009cloud`091i`093 = W_StoreBitmap(cloud_width, cloud_height, cloud_bits`091
V4-i`093,w);
X`009plasmacloud`091i`093 = W_StoreBitmap(plasmacloud_width,`032
X`009 plasmacloud_height, plasmacloud_bits`0914-i`093,w);
X `125
X etorp = W_StoreBitmap(etorp_width, etorp_height, etorp_bits,w);
X mtorp = W_StoreBitmap(mtorp_width, mtorp_height, mtorp_bits,w);
X eplasmatorp =`032
X W_StoreBitmap(eplasmatorp_width, eplasmatorp_height, eplasmatorp_bits,
Vw);
X mplasmatorp =`032
X W_StoreBitmap(mplasmatorp_width, mplasmatorp_height, mplasmatorp_bits,
Vw);
X bplanets`0910`093 = W_StoreBitmap(planet_width, planet_height, indplanet
V_bits,w);
X bplanets`0911`093 = W_StoreBitmap(planet_width, planet_height, fedplanet
V_bits,w);
X bplanets`0912`093 = W_StoreBitmap(planet_width, planet_height, romplanet
V_bits,w);
X bplanets`0913`093 = W_StoreBitmap(planet_width, planet_height, kliplanet
V_bits,w);
X bplanets`0914`093 = W_StoreBitmap(planet_width, planet_height, oriplanet
V_bits,w);
X bplanets`0915`093 = W_StoreBitmap(planet_width, planet_height, planet_bi
Vts,w);
X mbplanets`0910`093 = W_StoreBitmap(mplanet_width, mplanet_height, indmpl
Vanet_bits,mapw);
X mbplanets`0911`093 = W_StoreBitmap(mplanet_width, mplanet_height, fedmpl
Vanet_bits,mapw);
X mbplanets`0912`093 = W_StoreBitmap(mplanet_width, mplanet_height, rommpl
Vanet_bits,mapw);
X mbplanets`0913`093 = W_StoreBitmap(mplanet_width, mplanet_height, klimpl
Vanet_bits,mapw);
X mbplanets`0914`093 = W_StoreBitmap(mplanet_width, mplanet_height, orimpl
Vanet_bits,mapw);
X mbplanets`0915`093 = W_StoreBitmap(mplanet_width, mplanet_height, mplane
Vt_bits,mapw);
X bplanets2`0910`093 = bplanets`0910`093;
X mbplanets2`0910`093 = mbplanets`0910`093;
X bplanets2`0911`093 = W_StoreBitmap(planet_width, planet_height, planet00
V1_bits,w);
X bplanets2`0912`093 = W_StoreBitmap(planet_width, planet_height, planet01
V0_bits,w);
X bplanets2`0913`093 = W_StoreBitmap(planet_width, planet_height, planet01
V1_bits,w);
X bplanets2`0914`093 = W_StoreBitmap(planet_width, planet_height, planet10
V0_bits,w);
X bplanets2`0915`093 = W_StoreBitmap(planet_width, planet_height, planet10
V1_bits,w);
X bplanets2`0916`093 = W_StoreBitmap(planet_width, planet_height, planet11
V0_bits,w);
X bplanets2`0917`093 = W_StoreBitmap(planet_width, planet_height, planet11
V1_bits,w);
X mbplanets2`0911`093=W_StoreBitmap(mplanet_width,mplanet_height,mplanet00
V1_bits,mapw);
X mbplanets2`0912`093=W_StoreBitmap(mplanet_width,mplanet_height,mplanet01
V0_bits,mapw);
X mbplanets2`0913`093=W_StoreBitmap(mplanet_width,mplanet_height,mplanet01
V1_bits,mapw);
X mbplanets2`0914`093=W_StoreBitmap(mplanet_width,mplanet_height,mplanet10
V0_bits,mapw);
X mbplanets2`0915`093=W_StoreBitmap(mplanet_width,mplanet_height,mplanet10
V1_bits,mapw);
X mbplanets2`0916`093=W_StoreBitmap(mplanet_width,mplanet_height,mplanet11
V0_bits,mapw);
X mbplanets2`0917`093=W_StoreBitmap(mplanet_width,mplanet_height,mplanet11
V1_bits,mapw);
X for (i = 0; i < EX_FRAMES; i++) `123
X`009expview`091i`093=W_StoreBitmap(ex_width, ex_height, ex_bits`091i`093,w);
X `125
X for (i = 0; i < SBEXPVIEWS; i++) `123
X`009sbexpview`091i`093=W_StoreBitmap(sbexp_width, sbexp_height, sbexp_bits`0
V91i`093,w);
X `125
X shield = W_StoreBitmap(shield_width, shield_height, shield_bits,w);
X cloakicon = W_StoreBitmap(cloak_width, cloak_height, cloak_bits,w);
X icon = W_StoreBitmap(icon_width, icon_height, icon_bits, iconWin);
X tractbits = W_StoreBitmap(tract_width, tract_height, tract_bits, w);
X pressbits = W_StoreBitmap(press_width, press_height, press_bits, w);
X`125
X
X/* This routine throws up an entry window for the player. */
X
Xentrywindow(team, s_type)`032
Xint *team, *s_type;
X`123
X int typeok=0, i=0;
X long startTime;
X W_Event event;
X int lastplayercount`0914`093;
X int okayMask, lastOkayMask;
X int resetting=0;
X int tiled=0;
X long lasttime = -1;
X int spareTime=240;`009/* Allow them an extra 240 seconds, as long */
X`009`009`009/* as they are active */
X
X /* The following allows quick choosing of teams */
X
X lastOkayMask = okayMask = tournMask;
X
X for (i = 0; i < 4; i++) `123
X`009if (okayMask & (1 << i)) `123
X`009 tiled=0;
X`009`125 else `123
X`009 tiled=1;
X `125
X
X`009if (tiled) `123
X`009 W_TileWindow(teamWin`091i`093,stipple);
X`009`125 else `123
X`009 W_UnTileWindow(teamWin`091i`093);
X`009`125
X W_MapWindow(teamWin`091i`093);
X lastplayercount`091i`093 = -1; /* force redraw first time thr
Vough */
X `125
X W_MapWindow(qwin);
X
X *team = -1;
X startTime = time(0);
X if (me->p_whydead != KWINNER && me->p_whydead != KGENOCIDE) showMotd();
X do `123
X`009 while (!W_EventsPending()) `123
X`009`009int`009`009mask, elapsed;
X`009`009struct timeval`009tv;
X
X`009`009readFromServer();
+-+-+-+-+-+-+-+- END OF PART 26 +-+-+-+-+-+-+-+-