From modemhero at users.sourceforge.net Sat May 12 15:27:01 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 12 May 2007 20:27:01 +0000 Subject: [netrek-cvs] client/netrekxp/src defaults.c, 1.83, 1.84 main.c, 1.12, 1.13 Message-ID: <20070512202712.9AD0EB3F6@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv28319/src Modified Files: defaults.c main.c Log Message: Make console window default to on. Point playnetrek.org references to netrek.org in lieu of upcoming merger. Default login name is now playnetrek. Index: main.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- main.c 12 Apr 2007 09:06:10 -0000 1.12 +++ main.c 12 May 2007 20:26:58 -0000 1.13 @@ -73,7 +73,7 @@ #endif LineToConsole (" [-D] output debug info\n"); - LineToConsole (" [-n] show console window\n"); + LineToConsole (" [-n] hide console window\n"); LineToConsole (" [-u] show usage\n"); LineToConsole (" [-v] display client version info\n"); @@ -88,7 +88,7 @@ { int usage = 0; int err = 0; - int hideConsole = 1; + int hideConsole = 0; char *name, *ptr; int i; time_t tm; @@ -145,12 +145,10 @@ case 'u': /* program usage */ usage++; - hideConsole = 0; break; case 'c': /* run ck_players */ checking = 1; - hideConsole = 0; break; case 's': /* listen socket number */ @@ -361,15 +359,13 @@ case 'D': /* add debug info */ debug++; - hideConsole = 0; break; - case 'n': /* don't hide console window */ - hideConsole = 0; + case 'n': /* hide console window */ + hideConsole = 1; break; case 'v': /* output version info */ - hideConsole = 0; LineToConsole ("%s %s\n", version, mvers); LineToConsole ("%s\n", CBUGS); #ifdef RSA Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- defaults.c 27 Apr 2007 07:15:28 -0000 1.83 +++ defaults.c 12 May 2007 20:26:58 -0000 1.84 @@ -939,7 +939,7 @@ { "Allows observers to see all weapons fire on galaxy map", "by using long torp packets instead of short torp packets,", - "can increase bandwidth usage by 1 kb/second.", + "can increase bandwidth usage by 1 kb/second, more if obs.", "Also allows self torps to be seen beyond tactical range,", "again via the galaxy map.", NULL From modemhero at users.sourceforge.net Sat May 12 15:27:00 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 12 May 2007 20:27:00 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.194, 1.195 netrekrc, 1.70, 1.71 Message-ID: <20070512202711.50CB1B3F0@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv28319/resources/docs Modified Files: changes.txt netrekrc Log Message: Make console window default to on. Point playnetrek.org references to netrek.org in lieu of upcoming merger. Default login name is now playnetrek. Index: netrekrc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/netrekrc,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- netrekrc 27 Apr 2007 07:15:28 -0000 1.70 +++ netrekrc 12 May 2007 20:26:58 -0000 1.71 @@ -5,7 +5,7 @@ password: # Login name -login: netrek_player +login: playnetrek # Key mapping # Define your keymap here. The format is newkey defaultkey. For example, the @@ -513,7 +513,7 @@ # Allows observers to see all weapons fire on galaxy map # by using long torp packets instead of short torp packets, -# can increase bandwidth usage by 1 kb/second. +# can increase bandwidth usage by 1 kb/second, more if obs. # Also allows self torps to be seen beyond tactical range, # again via the galaxy map. useFullWeapInfo: on @@ -874,8 +874,8 @@ macro.0.A:% __ __ ______ __ Zoom in/out! Anti-packet loss, macro.0.A:% / \ / /__/_ __/______ / /__ observers see all weapons, etc. macro.0.A:% / /\ \/ / -_)/ / / __/ -_) '_/ Plus 50 updates/sec support! -macro.0.A:% /_/ \__/\__//_/ /_/ \__/_/\_\ XP 2006, v1.3, released March 2007 -macro.0.A:% Get it today at http://www.playnetrek.org +macro.0.A:% /_/ \__/\__//_/ /_/ \__/_/\_\ XP 2006, v1.3, released May 2007 +macro.0.A:% Get it today at http://www.netrek.org macro.a.A:. o Just | Squeal boy... macro.a.A:. //\ %p: ABUSED! Plain | just like a @@ -1057,10 +1057,8 @@ macro.).A:/* 10pm EST/7pm PST */ macro.(.A:/* Get the latest version of Netrek XP 2006 today! */ -macro.(.A:/* Current version is 1.3, released April 2007 */ +macro.(.A:/* Current version is 1.3, released May 2007 */ macro.(.A:/* Download it at http://www.netrek.org/files/NetrekXP_2006/ */ -macro.(.A:/* or */ -macro.(.A:/* http://www.playnetrek.org/ */ mac.e.T: Escorting %g (%d%%D %s%%S %f%%F) mac.V.A: %T%c PING stats: Average: %v ms, Stdv: %V ms, Loss: %y%% Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.194 retrieving revision 1.195 diff -u -d -r1.194 -r1.195 --- changes.txt 28 Apr 2007 12:09:50 -0000 1.194 +++ changes.txt 12 May 2007 20:26:57 -0000 1.195 @@ -69,6 +69,11 @@ server side via the TURN_KEYS feature packet, so they will only work if the server allows it. 21) The up and down arrow keys now are mapped to accelerate and deccelerate. +22) The console window is now on by default. To hide it, use the -n option, +which was previously used to turn console window on (it now turns it off). +23) Cambot playback, cambot record, and console window symbolic links are no +longer included in the distribution. Cambot is most easily played/recorded +with the cambot utility, and console window is now default to on. Graphics: 1) New graphics for the team select windows, and new option @@ -118,7 +123,10 @@ 16) Phaser misses on sturgeon servers now show proper phaser length based on how many phaser upgrades the ship has. 17) Certain abnormal game terminations (such as caused by a server exiting -the daemon) will no longer crash the client, instead client will just exit +the daemon) will no longer crash the client, instead client will just exit. +This fixes the last known "crash bug". There still may exist times when the +client is seen to freeze, such as upon ghostbust or slot being freed in INL, +as the client hopes to re-establish a connection and thus doesn't exit. New features: 1) Main window titlebar now shows your loginname and slot number, in addition From modemhero at users.sourceforge.net Sat May 12 15:26:59 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Sat, 12 May 2007 20:26:59 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.145, 1.146 clientr.suo, 1.128, 1.129 Message-ID: <20070512202711.6E582B3F2@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv28319 Modified Files: NetrekXP to do list.C clientr.suo Log Message: Make console window default to on. Point playnetrek.org references to netrek.org in lieu of upcoming merger. Default login name is now playnetrek. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.145 retrieving revision 1.146 diff -u -d -r1.145 -r1.146 --- NetrekXP to do list.C 27 Apr 2007 07:15:26 -0000 1.145 +++ NetrekXP to do list.C 12 May 2007 20:26:54 -0000 1.146 @@ -33,6 +33,7 @@ rect doesn't take these into account. 4) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! +5) change netrekrc to netrekrc.txt Wish list: 1) Rewrite graphics engine using SDL Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 Binary files /tmp/cvsPKZkVo and /tmp/cvs0yrMqd differ From modemhero at users.sourceforge.net Sun May 13 21:44:09 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 14 May 2007 02:44:09 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc - New directory Message-ID: <20070514024420.4305AB3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory sc8-pr-cvs16:/tmp/cvs-serv1279/netrekrc Log Message: Directory /cvsroot/netrek/client/netrekxp/resources/netrekrc added to the repository From modemhero at users.sourceforge.net Sun May 13 21:56:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 14 May 2007 02:56:40 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h,1.83,1.84 Message-ID: <20070514025719.2510C1867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv8178/include Modified Files: data.h Log Message: The default configuration file has been changed from netrekrc to netrekrc.txt to make life easier on Windows users. Extensionless filenames are a unix artifact and it's just for the better this way, in the long run. Moved netrekrc.txt file from docs folder to a new folder called netrekrc, just makes for easier/more logical build routine. Previously, text files in the same source docs folder were copied to different destination folders. Now each source folder only has items that get sent to the same destination folder. Cambot playback speed 9 is now halfway between speed 8 and max speed, to provide a finer control over speed at the highest playback speeds. Of course > and < work just fine too. Default playback speed now assumes 10 updates/sec instead of 6.5/sec. Double buffering now used for cambot playback. Fixes the issue with border redraw so that's turned back on too. Moved cambot playback delay variable pbdelay from local to global, so that receiving a FPS feature packet will set the playback speed. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- data.h 28 Apr 2007 12:09:50 -0000 1.83 +++ data.h 14 May 2007 02:56:38 -0000 1.84 @@ -85,6 +85,7 @@ extern FILE *recordFile; /* recorder */ extern int inplayback; extern int playback; +extern int pbdelay; #define PL_PAUSE 1 #define PL_FORWARD 2 #define PL_REVERSE 3 From modemhero at users.sourceforge.net Sun May 13 21:56:40 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 14 May 2007 02:56:40 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.146, 1.147 build.cmd, 1.26, 1.27 clientr.suo, 1.129, 1.130 Message-ID: <20070514025719.8AEA41867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv8178 Modified Files: NetrekXP to do list.C build.cmd clientr.suo Log Message: The default configuration file has been changed from netrekrc to netrekrc.txt to make life easier on Windows users. Extensionless filenames are a unix artifact and it's just for the better this way, in the long run. Moved netrekrc.txt file from docs folder to a new folder called netrekrc, just makes for easier/more logical build routine. Previously, text files in the same source docs folder were copied to different destination folders. Now each source folder only has items that get sent to the same destination folder. Cambot playback speed 9 is now halfway between speed 8 and max speed, to provide a finer control over speed at the highest playback speeds. Of course > and < work just fine too. Default playback speed now assumes 10 updates/sec instead of 6.5/sec. Double buffering now used for cambot playback. Fixes the issue with border redraw so that's turned back on too. Moved cambot playback delay variable pbdelay from local to global, so that receiving a FPS feature packet will set the playback speed. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.146 retrieving revision 1.147 diff -u -d -r1.146 -r1.147 --- NetrekXP to do list.C 12 May 2007 20:26:54 -0000 1.146 +++ NetrekXP to do list.C 14 May 2007 02:56:35 -0000 1.147 @@ -33,7 +33,6 @@ rect doesn't take these into account. 4) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! -5) change netrekrc to netrekrc.txt Wish list: 1) Rewrite graphics engine using SDL Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 Binary files /tmp/cvsVGLGX9 and /tmp/cvsZxKOCI differ Index: build.cmd =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/build.cmd,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- build.cmd 19 Apr 2007 08:50:23 -0000 1.26 +++ build.cmd 14 May 2007 02:56:35 -0000 1.27 @@ -509,7 +509,8 @@ copy resources\docs\*.doc %InstCWD%\netrek\docs copy resources\docs\*.dat %InstCWD%\netrek\docs copy resources\docs\*.txt %InstCWD%\netrek\docs -copy resources\docs\netrekrc %InstCWD%\netrek + +copy resources\netrekrc\netrekrc.txt %InstCWD%\netrek mkdir %InstCWD%\netrek\sounds copy resources\sounds\*.wav %InstCWD%\netrek\sounds From modemhero at users.sourceforge.net Sun May 13 21:56:42 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 14 May 2007 02:56:42 +0000 Subject: [netrek-cvs] client/netrekxp/resources/htmlhelp/html configfile.html, 1.3, 1.4 Message-ID: <20070514025720.5E5F2B3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html In directory sc8-pr-cvs16:/tmp/cvs-serv8178/resources/htmlhelp/html Modified Files: configfile.html Log Message: The default configuration file has been changed from netrekrc to netrekrc.txt to make life easier on Windows users. Extensionless filenames are a unix artifact and it's just for the better this way, in the long run. Moved netrekrc.txt file from docs folder to a new folder called netrekrc, just makes for easier/more logical build routine. Previously, text files in the same source docs folder were copied to different destination folders. Now each source folder only has items that get sent to the same destination folder. Cambot playback speed 9 is now halfway between speed 8 and max speed, to provide a finer control over speed at the highest playback speeds. Of course > and < work just fine too. Default playback speed now assumes 10 updates/sec instead of 6.5/sec. Double buffering now used for cambot playback. Fixes the issue with border redraw so that's turned back on too. Moved cambot playback delay variable pbdelay from local to global, so that receiving a FPS feature packet will set the playback speed. Index: configfile.html =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/htmlhelp/html/configfile.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configfile.html 7 May 2006 16:59:27 -0000 1.3 +++ configfile.html 14 May 2007 02:56:39 -0000 1.4 @@ -15,10 +15,10 @@ executable directory:

So if you have one of these files it will be read at startup and then change application defaults to whatever values are set in the configuration file. From modemhero at users.sourceforge.net Sun May 13 21:56:41 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 14 May 2007 02:56:41 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.195, 1.196 netrekrc, 1.71, NONE Message-ID: <20070514025720.17125B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv8178/resources/docs Modified Files: changes.txt Removed Files: netrekrc Log Message: The default configuration file has been changed from netrekrc to netrekrc.txt to make life easier on Windows users. Extensionless filenames are a unix artifact and it's just for the better this way, in the long run. Moved netrekrc.txt file from docs folder to a new folder called netrekrc, just makes for easier/more logical build routine. Previously, text files in the same source docs folder were copied to different destination folders. Now each source folder only has items that get sent to the same destination folder. Cambot playback speed 9 is now halfway between speed 8 and max speed, to provide a finer control over speed at the highest playback speeds. Of course > and < work just fine too. Default playback speed now assumes 10 updates/sec instead of 6.5/sec. Double buffering now used for cambot playback. Fixes the issue with border redraw so that's turned back on too. Moved cambot playback delay variable pbdelay from local to global, so that receiving a FPS feature packet will set the playback speed. --- netrekrc DELETED --- Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.195 retrieving revision 1.196 diff -u -d -r1.195 -r1.196 --- changes.txt 12 May 2007 20:26:57 -0000 1.195 +++ changes.txt 14 May 2007 02:56:38 -0000 1.196 @@ -74,6 +74,19 @@ 23) Cambot playback, cambot record, and console window symbolic links are no longer included in the distribution. Cambot is most easily played/recorded with the cambot utility, and console window is now default to on. +24) Cambot playback speed key 9 is now not quite the fastest speed, it's twice +as fast as speed 8, but the fastest speed key is now !. +25) + *** Important *** +The default configuration file filename has been changed from netrekrc to +netrekrc.txt. This is so that opening the netrekrc can be done with any text +editor. The convention of having a config file without a file extension dates +back to the unix root of the client, and while previous client maintainers have +danced around the issue by allowing support for either netrekrc or netrekrc.txt, +none took the plunge and changed the default naming to be Windows friendly. +Well, we have now took the plunge! The config utility AND in game save key will +now modify netrekrc.txt. + *** End Important *** Graphics: 1) New graphics for the team select windows, and new option @@ -127,6 +140,10 @@ This fixes the last known "crash bug". There still may exist times when the client is seen to freeze, such as upon ghostbust or slot being freed in INL, as the client hopes to re-establish a connection and thus doesn't exit. +18) Cambot playback now recognizes the framerate that the game was recorded at, +and adjusts default playback speed accordingly. +19) Cambot now uses double buffering during playback, so that everything looks +smoother. New features: 1) Main window titlebar now shows your loginname and slot number, in addition From modemhero at users.sourceforge.net Sun May 13 21:56:45 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 14 May 2007 02:56:45 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, NONE, 1.1 Message-ID: <20070514025653.8C33D1867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory sc8-pr-cvs16:/tmp/cvs-serv8178/resources/netrekrc Added Files: netrekrc.txt Log Message: The default configuration file has been changed from netrekrc to netrekrc.txt to make life easier on Windows users. Extensionless filenames are a unix artifact and it's just for the better this way, in the long run. Moved netrekrc.txt file from docs folder to a new folder called netrekrc, just makes for easier/more logical build routine. Previously, text files in the same source docs folder were copied to different destination folders. Now each source folder only has items that get sent to the same destination folder. Cambot playback speed 9 is now halfway between speed 8 and max speed, to provide a finer control over speed at the highest playback speeds. Of course > and < work just fine too. Default playback speed now assumes 10 updates/sec instead of 6.5/sec. Double buffering now used for cambot playback. Fixes the issue with border redraw so that's turned back on too. Moved cambot playback delay variable pbdelay from local to global, so that receiving a FPS feature packet will set the playback speed. --- NEW FILE: netrekrc.txt --- # Default character name name: guest # Default password password: # Login name login: playnetrek # Key mapping # Define your keymap here. The format is newkey defaultkey. For example, the # default key for shield toggle is 's', if you want to remap shield toggle to # 'q', you would put 'qs' in your keymap. Shields would still be mapped to # 's' as well as now being on 'q'. Adding a mapping doesn't delete the old # one. If you want shields on 'w' as well, put 'ws' in your keymap. If you # had instead put 'wq', it would have mapped quit (the default action of 'q') # onto 'w'. keymap: PpW Zva%d_eyftg^jmnrpPrls3tfuwvDwsye d [...1096 lines suppressed...] # Color settings color.white: white color.black: black color.red: red color.green: green color.yellow: yellow color.cyan: cyan color.light grey: gray63 color.God: white color.Rom: red color.Kli: green color.Fed: yellow color.Ori: cyan color.Ind: gray63 # Esoteric features such as individual ship rcfiles/keymaps # /ckeymaps/buttonmaps (i.e. keymap-ca: ), observer # /servertype options (i.e. keymap.bronco: ), and # button keymaps (b1keymap through b5keymap) From modemhero at users.sourceforge.net Sun May 13 21:56:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Mon, 14 May 2007 02:56:44 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.90, 1.91 defaults.c, 1.84, 1.85 docwin.c, 1.6, 1.7 feature.c, 1.17, 1.18 helpwin.c, 1.9, 1.10 local.c, 1.100, 1.101 main.c, 1.13, 1.14 map.c, 1.54, 1.55 option.c, 1.48, 1.49 parsemeta.c, 1.37, 1.38 playback.c, 1.20, 1.21 sound.c, 1.40, 1.41 Message-ID: <20070514025726.4828CB3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv8178/src Modified Files: data.c defaults.c docwin.c feature.c helpwin.c local.c main.c map.c option.c parsemeta.c playback.c sound.c Log Message: The default configuration file has been changed from netrekrc to netrekrc.txt to make life easier on Windows users. Extensionless filenames are a unix artifact and it's just for the better this way, in the long run. Moved netrekrc.txt file from docs folder to a new folder called netrekrc, just makes for easier/more logical build routine. Previously, text files in the same source docs folder were copied to different destination folders. Now each source folder only has items that get sent to the same destination folder. Cambot playback speed 9 is now halfway between speed 8 and max speed, to provide a finer control over speed at the highest playback speeds. Of course > and < work just fine too. Default playback speed now assumes 10 updates/sec instead of 6.5/sec. Double buffering now used for cambot playback. Fixes the issue with border redraw so that's turned back on too. Moved cambot playback delay variable pbdelay from local to global, so that receiving a FPS feature packet will set the playback speed. Index: sound.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- sound.c 10 Apr 2007 05:43:45 -0000 1.40 +++ sound.c 14 May 2007 02:56:42 -0000 1.41 @@ -91,7 +91,7 @@ for (i=0; i < NUM_WAVES; i++) { if (!sounds[i]) { - LineToConsole("Mix_LoadWAV sounds[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError()); + LineToConsole("Mix_LoadWAV sounds[%d] could not be loaded. Check soundDir in your netrekrc.txt: %s\n", i, Mix_GetError()); return(-1); } } @@ -117,7 +117,7 @@ for (i=0; i < NUM_MUSIC; i++) { if (!music[i]) { - LineToConsole("Mix_LoadMUS music[%d] could not be loaded. Check soundDir in your .netrekrc: %s\n", i, Mix_GetError()); + LineToConsole("Mix_LoadMUS music[%d] could not be loaded. Check soundDir in your netrekrc.txt: %s\n", i, Mix_GetError()); return(-1); } } Index: main.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/main.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- main.c 12 May 2007 20:26:58 -0000 1.13 +++ main.c 14 May 2007 02:56:41 -0000 1.14 @@ -279,7 +279,7 @@ servertmp = argv[i + 1]; if (metablock(servertmp)) { - LineToConsole ("Default logins not welcome there, please edit your netrekrc file and add a 'login: yourhandle' line\n"); + LineToConsole ("Default logins not welcome there, please edit your netrekrc.txt file and add a 'login: yourhandle' line\n"); exit (0); } usemeta = 0; Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- local.c 14 Apr 2007 09:49:35 -0000 1.100 +++ local.c 14 May 2007 02:56:41 -0000 1.101 @@ -2733,12 +2733,8 @@ /* Force a border redraw? Bitmaps rotated realtime as well as viewRange circles will overwrite the border. Since it is very CPU expensive to write rectangles (drawborder function) to the active window, especially if double - buffering is off, let's slow down redraws to at most 10 per second. - Turned off during playback due to excessive CPU usage. */ + buffering is off, let's slow down redraws to at most 10 per second. */ else -#ifdef RECORDGAME - if (!playback) -#endif { static int border_refresh = 0; @@ -2858,13 +2854,8 @@ Draw out the 'tactical' map */ { -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Win2Mem (localSDB); -#else if (doubleBuffering) W_Win2Mem (localSDB); -#endif clearLocal (); /* Keep redrawing for double buffered observers who get set out of normal gameplay bounds, @@ -2895,13 +2886,9 @@ weaponUpdate = 0; DrawMisc (); -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Mem2Win (localSDB); -#else if (doubleBuffering) W_Mem2Win (localSDB); -#endif + /* Fade all sounds on quit */ if (me->p_whydead == KQUIT && me->p_status == PEXPLODE) Mix_FadeOutChannel(-1, 1000); Index: playback.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- playback.c 5 Apr 2007 12:57:22 -0000 1.20 +++ playback.c 14 May 2007 02:56:41 -0000 1.21 @@ -44,8 +44,6 @@ extern jmp_buf env; -int pbdelay = 150; - struct player dummyme; struct player *packetsme; @@ -359,6 +357,8 @@ Play_Sound(ENTER_SHIP_WAV, SF_INFO); #endif + ingame = 1; + while (1) { #ifdef BRMH @@ -422,6 +422,8 @@ pbdelay = 6; break; case '9': + pbdelay = 3; + break; case '#': case '!': case '@': @@ -433,6 +435,8 @@ break; case '>': pbdelay *= 2; + if (pbdelay == 0) + pbdelay = 3; if (pbdelay > 600) pbdelay = 600; break; @@ -511,6 +515,7 @@ case SP_S_PHASER: case SP_S_KILLS: case SP_S_STATS: + case SP_FEATURE: return 1; } Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- option.c 14 Apr 2007 02:56:19 -0000 1.48 +++ option.c 14 May 2007 02:56:41 -0000 1.49 @@ -379,7 +379,7 @@ {1, "show xtrekrc defaults window", 0, &defWin, 0, 0, NULL, NULL}, #endif #ifdef DOC_WIN - {1, "show netrekrc", 0, &xtrekrcwin, 0, 0, NULL, NULL}, + {1, "show netrekrc.txt", 0, &xtrekrcwin, 0, 0, NULL, NULL}, {1, "show documentation window", 0, &docwin, 0, 0, NULL, NULL}, #endif #ifdef TOOLS Index: docwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/docwin.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- docwin.c 13 Apr 2007 07:52:41 -0000 1.6 +++ docwin.c 14 May 2007 02:56:40 -0000 1.7 @@ -318,7 +318,7 @@ filename[0] = '\0'; - if (!findfile ("netrekrc", filename) && !findfile ("xtrekrc", filename)) + if (!findfile ("netrekrc.txt", filename) && !findfile ("netrekrc", filename)) return; if ((fptr = fopen (filename, "r")) == NULL) Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- data.c 28 Apr 2007 12:09:51 -0000 1.90 +++ data.c 14 May 2007 02:56:40 -0000 1.91 @@ -175,6 +175,7 @@ * here */ int playback = 0; int inplayback = 0; +int pbdelay = 100; /* default sleep time in ms */ #endif FILE *logFile = NULL; /* log messages to this file */ Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- feature.c 25 Apr 2007 07:21:50 -0000 1.17 +++ feature.c 14 May 2007 02:56:40 -0000 1.18 @@ -192,6 +192,9 @@ } if (strcmpi(packet->name, "UPS") == 0 && value != -1) { lastUpdateSpeed = updatesPerSec = server_ups = value; +#ifdef RECORDGAME + pbdelay = 100 * 10 / server_ups; +#endif LineToConsole("Server actually sending %d updates per second.\n", value); return; } Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- parsemeta.c 17 Mar 2007 17:12:09 -0000 1.37 +++ parsemeta.c 14 May 2007 02:56:41 -0000 1.38 @@ -1176,7 +1176,7 @@ if (!metaCache) { - LineToConsole ("You must define the netrekrc variable `metaCache' in\n"); + LineToConsole ("You must define the netrekrc.txt variable `metaCache' in\n"); LineToConsole ("order to use the `show known servers' option.\n"); return 0; } Index: helpwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- helpwin.c 17 Apr 2007 07:48:50 -0000 1.9 +++ helpwin.c 14 May 2007 02:56:40 -0000 1.10 @@ -177,11 +177,11 @@ "6 Set playback speed", "7 Set playback speed", "8 Set playback speed", - "9 Set playback speed (fast)", - "! Set playback speed (as 9)", - "@ Set playback speed (as 9)", - "% Set playback speed (as 9)", - "# Set playback speed (as 9)", + "9 Set playback speed", + "! Set playback speed (fastest)", + "@ Set playback speed (as !)", + "% Set playback speed (as !)", + "# Set playback speed (as !)", "< Speed up playback", "> Speed down playback", "R Start from the beginning", Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- map.c 25 Apr 2007 06:50:43 -0000 1.54 +++ map.c 14 May 2007 02:56:41 -0000 1.55 @@ -856,13 +856,9 @@ int view = TWINSIDE * scaleFactor / 2; int mvx, mvy; -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Win2Mem (mapSDB); -#else if (doubleBuffering) W_Win2Mem (mapSDB); -#endif + clearMap (); if (GWINSIDE == 0) @@ -1449,13 +1445,8 @@ } } -#ifdef RECORDGAME - if (doubleBuffering && !inplayback) - W_Mem2Win (mapSDB); -#else if (doubleBuffering) W_Mem2Win (mapSDB); -#endif } Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- defaults.c 12 May 2007 20:26:58 -0000 1.84 +++ defaults.c 14 May 2007 02:56:40 -0000 1.85 @@ -171,8 +171,8 @@ { "Allow switching of ship bitmaps in game. With this option disabled", "not all bitmaps load into memory. This option is thus not changeable", - "in game. Do not attempt to edit your netrekrc to turn dynamic bitmaps", - "on and then reload the netrekrc with the & key - restart the client instead.", + "in game. Do not attempt to edit your netrekrc.txt to turn dynamic bitmaps", + "on and then reload netrekrc.txt with the & key - restart the client instead.", NULL } }, @@ -1694,18 +1694,18 @@ { /* Check base names */ - if (findfile (NETREKRC, file)) - return 1; - if (findfile (NETREKRCTXT, file)) return 1; - if (findfile (XTREKRC, file)) + if (findfile (NETREKRC, file)) return 1; if (findfile (XTREKRCTXT, file)) return 1; + if (findfile (XTREKRC, file)) + return 1; + #ifdef SYSTEM_DEFAULTFILE /* now try for a system default defaults file */ if (findfile (SYSTEM_DEFAULTFILE, file)) @@ -2170,7 +2170,7 @@ if (!saveFile) { saveFile = (char *) malloc (sizeof (char) * 13); - sprintf (saveFile, "%s", "netrekrc"); + sprintf (saveFile, "%s", "netrekrc.txt"); } exe_dir = GetExeDir (); From modemhero at users.sourceforge.net Tue May 15 19:05:19 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 16 May 2007 00:05:19 +0000 Subject: [netrek-cvs] client/netrekxp/win32 config.h,1.18,1.19 Message-ID: <20070516000532.72CB71867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/win32 In directory sc8-pr-cvs16:/tmp/cvs-serv30344/win32 Modified Files: config.h Log Message: Add new #define PARADISE for trying to add support for paradise servers. There are some issues that make bronco and paradise not compatable, namely overlapping definitions of packet types (see CP_PLANET or GENERIC_32). Also paradise uses a different set of global constants (GWIDTH and MAXPLAYER come to mind as the biggest changes). So for now, for testing with paradise, I will simply flip the PARADISE define in config.h. Added in the paradise packet types and packet handlers. The actual functionality is commented out, it needs a lot more work. Client is able to connect to paradise server with no broken packet types, so that's a good start. Don't save INL servers in UDP metacache. Rename xtrekrc to netrekrc.txt in the help window. Index: config.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/win32/config.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- config.h 13 Apr 2007 07:12:26 -0000 1.18 +++ config.h 16 May 2007 00:05:16 -0000 1.19 @@ -66,9 +66,6 @@ /* NBT - Nick trown's macro code */ #define NBT -/* MAXPLAYER - Maximal number of players + observers */ -#define MAXPLAYER 36 - /* CORRUPTED_PACKETS - prevents some seg faults but verbose output */ #define CORRUPTED_PACKETS @@ -117,6 +114,9 @@ /* WARP_DEAD - Use death detection */ #undef WARP_DEAD +/* PARADISE - Support paradise servers */ +#undef PARADISE + /* RCM - Receiver configurable Server messages */ #define RCM From modemhero at users.sourceforge.net Tue May 15 19:05:13 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 16 May 2007 00:05:13 +0000 Subject: [netrek-cvs] client/netrekxp clientr.suo,1.130,1.131 Message-ID: <20070516000551.D34061867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv30344 Modified Files: clientr.suo Log Message: Add new #define PARADISE for trying to add support for paradise servers. There are some issues that make bronco and paradise not compatable, namely overlapping definitions of packet types (see CP_PLANET or GENERIC_32). Also paradise uses a different set of global constants (GWIDTH and MAXPLAYER come to mind as the biggest changes). So for now, for testing with paradise, I will simply flip the PARADISE define in config.h. Added in the paradise packet types and packet handlers. The actual functionality is commented out, it needs a lot more work. Client is able to connect to paradise server with no broken packet types, so that's a good start. Don't save INL servers in UDP metacache. Rename xtrekrc to netrekrc.txt in the help window. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 Binary files /tmp/cvsR1RZm0 and /tmp/cvspaIor7 differ From modemhero at users.sourceforge.net Tue May 15 19:05:15 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 16 May 2007 00:05:15 +0000 Subject: [netrek-cvs] client/netrekxp/include data.h, 1.84, 1.85 defs.h, 1.24, 1.25 packets.h, 1.7, 1.8 proto.h, 1.54, 1.55 struct.h, 1.18, 1.19 Message-ID: <20070516000558.6B8741867CE@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv30344/include Modified Files: data.h defs.h packets.h proto.h struct.h Log Message: Add new #define PARADISE for trying to add support for paradise servers. There are some issues that make bronco and paradise not compatable, namely overlapping definitions of packet types (see CP_PLANET or GENERIC_32). Also paradise uses a different set of global constants (GWIDTH and MAXPLAYER come to mind as the biggest changes). So for now, for testing with paradise, I will simply flip the PARADISE define in config.h. Added in the paradise packet types and packet handlers. The actual functionality is commented out, it needs a lot more work. Client is able to connect to paradise server with no broken packet types, so that's a good start. Don't save INL servers in UDP metacache. Rename xtrekrc to netrekrc.txt in the help window. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- defs.h 28 Apr 2007 12:09:50 -0000 1.24 +++ defs.h 16 May 2007 00:05:11 -0000 1.25 @@ -8,6 +8,32 @@ #include "copyright.h" +#ifdef PARADISE +/* defs for updatePlayer [BDyess] */ +#define NO_UPDATE 0 +#define SMALL_UPDATE 1 /* update non-blk_bozo players */ +#define LARGE_UPDATE 2 /* update blk_bozo players */ +#define ALL_UPDATE (SMALL_UPDATE|LARGE_UPDATE) /* update both */ + +/* defs for terrain */ +#define TERRAIN_STARTED 1 +#define TERRAIN_DONE 2 + +/* defs for timer [BDyess] */ +#define T_NONE 0 /* no timer */ +#define T_DAY 1 /* time of day */ +#define T_SERVER 2 /* time on server */ +#define T_SHIP 3 /* time in ship */ +#define T_USER 4 /* user reset timer */ +#define T_TOTAL 5 /* number of T_ defs */ +#define TIMESTRLEN 10 /* used in db_timer(), timeString() */ + +/* defs for mapmode */ +#define GMAP_NEVER 0 +#define GMAP_FREQUENT 1 +#define GMAP_INFREQUENT 2 +#endif /* PARADISE */ + /* Error handling */ #define RETURNBASE 10 @@ -18,13 +44,19 @@ #define MAX_MACRO 500 #endif -#ifndef MAXPLAYER -#define MAXPLAYER 36 /* Defined in config.h as well */ +#ifdef PARADISE +#define MAXPLAYER 257 +#else +#define MAXPLAYER 36 #endif #define TESTERS 4 /* Priveledged slots for * robots and game 'testers' */ +#ifdef PARADISE +#define MAXPLANETS 60 +#else #define MAXPLANETS 40 +#endif #define MAXTORP 8 #define MAXPLASMA 1 #define PKEY 128 @@ -44,9 +76,12 @@ #define DESIRED_TIC_LEN 10 /* for desired heading */ /* These are configuration definitions */ - +#ifdef PARADISE +#define GWIDTH 200000 +#else #define GWIDTH 100000 /* galaxy is 100000 spaces * on a side */ +#endif #define SCALE 40 /* Window will be one pixel for these # spaces */ #define WARP1 20 /* warp one will move 20 Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- data.h 14 May 2007 02:56:38 -0000 1.84 +++ data.h 16 May 2007 00:05:11 -0000 1.85 @@ -37,6 +37,9 @@ extern struct torp *torps; extern struct plasmatorp *plasmatorps; extern struct status *status; +#ifdef PARADISE +extern struct status2 *status2; +#endif extern struct ship *myship; extern struct stats *mystats; extern struct planet *planets; @@ -95,6 +98,10 @@ extern int warncount; extern int warntimer; extern int infomapped; +extern void *infothing; /* infow contents [BDyess] */ +extern int infoupdate; /* update flag for infow [BDyess] */ +extern int infotype; /* type of info thing [BDyess] */ +extern int scanmapped; /* ATM - scanner stuff */ extern int mustexit; extern int messtime; extern int keepPeace; Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- packets.h 25 Apr 2007 06:50:41 -0000 1.7 +++ packets.h 16 May 2007 00:05:12 -0000 1.8 @@ -68,9 +68,10 @@ #define SP_RESERVED 25 /* for future use */ #define SP_PLANET_LOC 26 /* planet name, x, y */ -/* NOTE: not implemented */ +#ifdef PARADISE #define SP_SCAN 27 /* ATM: results of player * scan */ +#endif #define SP_UDP_REPLY 28 /* notify client of UDP * status */ @@ -83,8 +84,19 @@ * verification */ #endif +#ifdef PARADISE +#define SP_MOTD_PIC 32 /* motd bitmap pictures */ +#define SP_STATS2 33 /* new stats packet */ +#define SP_STATUS2 34 /* new status packet */ +#define SP_PLANET2 35 /* new planet packet */ +#define SP_NEW_MOTD 36 /* New MOTD info notification uses */ +#define SP_THINGY 37 /* thingy location */ +#define SP_THINGY_INFO 38 /* thingy status */ +#else #define SP_GENERIC_32 32 /* 32 byte generic, see struct */ #define SP_FLAGS_ALL 33 /* abbreviated flags for all players */ +#endif + #define SP_SHIP_CAP 39 /* Handles server ship mods */ #ifdef SHORT_PACKETS @@ -110,6 +122,18 @@ #define SP_S_8_TORP 49 /* optimized SP_S_TORP */ #define SP_S_PLANET 50 /* see SP_PLANET */ +#ifdef PARADISE +#define SP_GPARAM 51 /* game params packet */ +/* the following is a family of packets with the same type, but a + discriminating subtype */ +#define SP_PARADISE_EXT1 52 +#define SP_PE1_MISSING_BITMAP 0 +#define SP_PE1_NUM_MISSILES 1 +/* end of packet 52 subtypes */ +#define SP_TERRAIN2 53 /* Terrain packets */ +#define SP_TERRAIN_INFO2 54 /* Terrain info */ +#endif + /* S_P2 */ #define SP_S_SEQUENCE 56 /* SP_SEQUENCE for * compressed packets */ @@ -1095,3 +1119,180 @@ }; #endif + +#ifdef PARADISE +/* Shapes of thingys. It would be best to add to the end of this list and + try to coordinate your additions with other hackers. */ +enum thingy_types { + SHP_BLANK, SHP_MISSILE, SHP_BOOM, SHP_TORP, SHP_PLASMA, SHP_MINE, + SHP_PBOOM, SHP_FIGHTER, SHP_WARP_BEACON, SHP_FBOOM, SHP_DBOOM +}; + +struct thingy_info_spacket { + char type; /* SP_THINGY_INFO */ + char war; + unsigned short shape; /* a thingy_types */ + unsigned short tnum; + unsigned short owner; +}; + +struct thingy_spacket { + char type; /* SP_THINGY */ + char dir; + unsigned short tnum; + LONG x, y; +}; + +/* terrain info for Paradise terrain */ +/* 5/16/95 rpg */ + +struct terrain_info_packet2 { + char type; /* SP_TERRAIN_INFO2 */ + char pad; + unsigned short pad2; + unsigned short xdim; + unsigned short ydim; +}; + +struct terrain_packet2 { + char type; /* SP_TERRAIN2 */ + char sequence; + char total_pkts; + char length; + char terrain_type[128]; /* Ugh... this needs to be fixed 5/16/95 rpg */ + /* unsigned short terrain_alt1[128]; */ + /* unsigned short terrain_alt2[128]; */ +}; + +struct scan_spacket { /* ATM */ + char type; /* SP_SCAN */ + char pnum; + char success; + char pad1; + LONG p_fuel; + LONG p_armies; + LONG p_shield; + LONG p_damage; + LONG p_etemp; + LONG p_wtemp; +}; + +struct motd_pic_spacket { + char type; /* SP_MOTD_PIC */ + char pad1; + unsigned short x, y, page; + unsigned short width, height; + char bits[1016]; +}; + + /* This is used to send paradise style stats */ +struct stats_spacket2 { + char type; /* SP_STATS2 */ + char pnum; + char pad1; + char pad2; + + LONG genocides; /* number of genocides participated in */ + LONG maxkills; /* max kills ever * 100 */ + LONG di; /* destruction inflicted for all time * 100 */ + LONG kills; /* Kills in tournament play */ + LONG losses; /* Losses in tournament play */ + LONG armsbomb; /* Tournament armies bombed */ + LONG resbomb; /* resources bombed off */ + LONG dooshes; /* armies killed while being carried */ + LONG planets; /* Tournament planets conquered */ + LONG tticks; /* Tournament ticks */ + /* SB/WB/JS stats are entirely separate */ + LONG sbkills; /* Kills as starbase */ + LONG sblosses; /* Losses as starbase */ + LONG sbticks; /* Time as starbase */ + LONG sbmaxkills; /* Max kills as starbase * 100 */ + LONG wbkills; /* Kills as warbase */ + LONG wblosses; /* Losses as warbase */ + LONG wbticks; /* Time as warbase */ + LONG wbmaxkills; /* Max kills as warbase * 100 */ + LONG jsplanets; /* planets assisted with in JS */ + LONG jsticks; /* ticks played as a JS */ + LONG rank; /* Ranking of the player */ + LONG royal; /* royaly, specialty, rank */ +}; + + /* status info for paradise stats */ +struct status_spacket2 { + char type; /* SP_STATUS2 */ + char tourn; + char pad1; + char pad2; + unsigned int dooshes; /* total number of armies dooshed */ + unsigned int armsbomb; /* all t-mode armies bombed */ + unsigned int resbomb; /* resources bombed */ + unsigned int planets; /* all t-mode planets taken */ + unsigned int kills; /* all t-mode kills made */ + unsigned int losses; /* all t-mode losses */ + unsigned int sbkills; /* total kills in SB's */ + unsigned int sblosses; /* total losses in Sb's */ + unsigned int sbtime; /* total time in SB's */ + unsigned int wbkills; /* kills in warbases */ + unsigned int wblosses; /* losses in warbases */ + unsigned int wbtime; /* total time played in wb's */ + unsigned int jsplanets; /* total planets taken by jump ships */ + unsigned int jstime; /* total time in a jump ship */ + unsigned int time; /* t mode time in this game */ + unsigned int timeprod; /* t-mode ship ticks--sort of like */ +}; + + + /* planet info for a paradise planet */ +struct planet_spacket2 { + char type; /* SP_PLANET2 */ + char pnum; /* planet number */ + char owner; /* owner of the planet */ + char info; /* who has touched planet */ + LONG flags; /* planet's flags */ + LONG timestamp; /* timestamp for info on planet */ + LONG armies; /* armies on the planet */ +}; + +struct obvious_packet { + char type; /* SP_NEW_MOTD */ + char pad1; /* CP_ASK_MOTD */ +}; + +struct paradiseext1_spacket { + char type; + char subtype; + short pad; +}; + +struct pe1_missing_bitmap_spacket { + char type; + char subtype; + + short page; + + short x, y; + short width, height; +}; + +struct pe1_num_missiles_spacket { + char type; /* SP_PARADISE_EXT1 */ + char subtype; /* SP_PE1_NUM_MISSILES */ + + short num; /* number of missiles */ +}; + +struct scan_cpacket { /* ATM */ + char type; /* CP_SCAN */ + char pnum; + char pad1; + char pad2; +}; + +struct gameparam_spacket { + char type; + char subtype; /* this packet is not real */ + /* generic game parameter packet */ + int pad; +}; + +#endif Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- struct.h 10 Apr 2007 00:44:02 -0000 1.18 +++ struct.h 16 May 2007 00:05:13 -0000 1.19 @@ -44,6 +44,35 @@ unsigned LONG timeprod; }; +#ifdef PARADISE +struct status2 { /* paradise status struct */ + int active; /* for interfacing with people who */ + unsigned int wait, count; /* want to get into the game */ + unsigned int number, request, answer; + unsigned char tourn; /* Tournament mode? */ + unsigned long dooshes; /* total number of armies dooshed */ + unsigned long armsbomb; /* all t-mode armies bombed */ + unsigned long resbomb; /* resources bombed */ + unsigned long planets; /* all t-mode planets taken */ + unsigned long kills; /* all t-mode kills made */ + unsigned long losses; /* all t-mode losses */ + unsigned long genocides; /* number of genocides */ + unsigned long sbkills; /* total kills in SB's */ + unsigned long sblosses; /* total losses in Sb's */ + unsigned long sbtime; /* total time in SB's */ + unsigned long wbkills; /* kills in warbases */ + unsigned long wblosses; /* losses in warbases */ + unsigned long wbtime; /* total time played in wb's */ + unsigned long jsplanets; /* total planets taken by jump ships */ + unsigned long jstime; /* total time in a jump ship */ + unsigned long time; /* t-mode time */ + unsigned long timeprod; /* t-mode ship ticks--sort of like */ + /* manhours in t-mode */ + int gameup; /* is game up */ + unsigned long clock; /* clock for planet info timestamp */ +}; +#endif + enum dist_type { /* help me do series */ @@ -214,6 +243,37 @@ int st_rank; /* Ranking of the player */ }; +#ifdef PARADISE +struct stats2 { /* paradise stats */ + int st_genocides; /* number of genocides participated in */ + float st_tmaxkills; /* max kills ever */ + float st_di; /* total destruction inflicted for all time */ + int st_tkills; /* Kills in tournament play */ + int st_tlosses; /* Losses in tournament play */ + int st_tarmsbomb; /* Tournament armies bombed */ + int st_tresbomb; /* resources bombed off */ + int st_tdooshes; /* armies killed while being carried */ + int st_tplanets; /* Tournament planets conquered */ + int st_tticks; /* Tournament ticks */ + /* SB/WB/JS stats are entirely separate */ + int st_sbkills; /* Kills as starbase */ + int st_sblosses; /* Losses as starbase */ + int st_sbticks; /* Time as starbase */ + float st_sbmaxkills; /* Max kills as starbase */ + int st_wbkills; /* Kills as warbase */ + int st_wblosses; /* Losses as warbase */ + int st_wbticks; /* Time as warbase */ + float st_wbmaxkills; /* Max kills as warbase */ + int st_jsplanets; /* planets assisted with in JS */ + int st_jsticks; /* ticks played as a JS */ + long st_lastlogin; /* Last time this player was played */ + int st_flags; /* Misc option flags */ + unsigned char st_keymap[256]; /* keymap for this player */ + int st_rank; /* Ranking of the player */ + int st_royal; /* royaly, specialty, rank */ +}; +#endif + #define ST_MAPMODE 1 #define ST_NAMEMODE 2 #define ST_SHOWSHIELDS 4 @@ -277,6 +337,9 @@ short p_whydead; /* Tells you why you died */ short p_whodead; /* Tells you who killed you */ struct stats p_stats; /* player statistics */ +#ifdef PARADISE + struct stats2 p_stats2; /* Paradise stats */ +#endif short p_genoplanets; /* planets taken since last * genocide */ short p_genoarmsbomb; /* armies bombed since last Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- proto.h 28 Apr 2007 12:09:50 -0000 1.54 +++ proto.h 16 May 2007 00:05:12 -0000 1.55 @@ -1142,10 +1142,19 @@ void handleFlagsAll (struct flags_all_spacket *packet); struct rsa_key_spacket; void handleRSAKey (struct rsa_key_spacket *packet); -#ifdef INCLUDE_SCAN -void -handleScan (packet) - struct scan_spacket *packet; +#ifdef PARADISE +void handleScan (struct scan_spacket *packet); +void handleMotdPic (struct motd_pic_spacket * packet); +void handleStats2 (struct stats_spacket2 * packet); +void handleStatus2 (struct status_spacket2 * packet); +void handlePlanet2 (struct planet_spacket2 * packet); +void handleTerrain2 (struct terrain_packet2 * pkt); +void handleTerrainInfo2 (struct terrain_info_packet2 *pkt); +void handleTempPack (struct obvious_packet * packet); +void handleThingy (struct thingy_spacket * packet); +void handleThingyInfo (struct thingy_info_spacket * packet); +void handleExtension1 (struct paradiseext1_spacket * packet); +void handleGameparams (struct gameparam_spacket * packet); #endif void sendUdpReq (int req); struct udp_reply_spacket; From modemhero at users.sourceforge.net Tue May 15 19:05:17 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 16 May 2007 00:05:17 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.196, 1.197 Message-ID: <20070516000555.C31E31867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16:/tmp/cvs-serv30344/resources/docs Modified Files: changes.txt Log Message: Add new #define PARADISE for trying to add support for paradise servers. There are some issues that make bronco and paradise not compatable, namely overlapping definitions of packet types (see CP_PLANET or GENERIC_32). Also paradise uses a different set of global constants (GWIDTH and MAXPLAYER come to mind as the biggest changes). So for now, for testing with paradise, I will simply flip the PARADISE define in config.h. Added in the paradise packet types and packet handlers. The actual functionality is commented out, it needs a lot more work. Client is able to connect to paradise server with no broken packet types, so that's a good start. Don't save INL servers in UDP metacache. Rename xtrekrc to netrekrc.txt in the help window. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.196 retrieving revision 1.197 diff -u -d -r1.196 -r1.197 --- changes.txt 14 May 2007 02:56:38 -0000 1.196 +++ changes.txt 16 May 2007 00:05:13 -0000 1.197 @@ -282,6 +282,8 @@ packets. 34) Added improved explanation to netrekrc for the bandwidth costs of using the 4 new(ish) feature packets which actually increase bandwidth use. +35) INL servers will no longer save in the UDP metacache file, so they won't +show up on the metaserver listing unless people are actually on the server. Netrek XP 2006, Version 1.2: (Released Mar-2007) - added "messageKeyOnly: (on)/off" so that you will only start messages with the actual From modemhero at users.sourceforge.net Tue May 15 19:05:18 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Wed, 16 May 2007 00:05:18 +0000 Subject: [netrek-cvs] client/netrekxp/src data.c, 1.91, 1.92 helpwin.c, 1.10, 1.11 input.c, 1.38, 1.39 parsemeta.c, 1.38, 1.39 playback.c, 1.21, 1.22 socket.c, 1.31, 1.32 Message-ID: <20070516000601.6466E1867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv30344/src Modified Files: data.c helpwin.c input.c parsemeta.c playback.c socket.c Log Message: Add new #define PARADISE for trying to add support for paradise servers. There are some issues that make bronco and paradise not compatable, namely overlapping definitions of packet types (see CP_PLANET or GENERIC_32). Also paradise uses a different set of global constants (GWIDTH and MAXPLAYER come to mind as the biggest changes). So for now, for testing with paradise, I will simply flip the PARADISE define in config.h. Added in the paradise packet types and packet handlers. The actual functionality is commented out, it needs a lot more work. Client is able to connect to paradise server with no broken packet types, so that's a good start. Don't save INL servers in UDP metacache. Rename xtrekrc to netrekrc.txt in the help window. Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- input.c 28 Apr 2007 12:09:51 -0000 1.38 +++ input.c 16 May 2007 00:05:15 -0000 1.39 @@ -1892,8 +1892,11 @@ int detmine (void) { - register int i; + register int i = 0; +#ifdef PARADISE + sendDetMineReq(-1); +#else for (i = 0; i < MAXTORP; i++) { if (torps[i + (me->p_no * MAXTORP)].t_status == TMOVE || @@ -1907,6 +1910,7 @@ #endif } } +#endif return (0); } Index: playback.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- playback.c 14 May 2007 02:56:41 -0000 1.21 +++ playback.c 16 May 2007 00:05:16 -0000 1.22 @@ -506,7 +506,9 @@ case SP_S_YOU_SS: case SP_S_PLAYER: case SP_SHIP_CAP: +#ifndef PARADISE case SP_GENERIC_32: +#endif case SP_S_TORP: case SP_S_TORP_INFO: case SP_S_8_TORP: Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- data.c 14 May 2007 02:56:40 -0000 1.91 +++ data.c 16 May 2007 00:05:15 -0000 1.92 @@ -24,6 +24,9 @@ struct torp *torps; struct plasmatorp *plasmatorps; struct status *status; +#ifdef PARADISE +struct status2 *status2; +#endif struct ship *myship; struct stats *mystats; struct planet *planets; @@ -107,6 +110,9 @@ int warncount = 0; int warntimer = -1; int infomapped = 0; +void *infothing = NULL; /* infow contents [BDyess] */ +int infoupdate = 0; /* update flag for infow [BDyess] */ +int infotype = 0; /* type of info thing [BDyess] */ int mustexit = 0; int messtime = 5; int keepPeace = 1; @@ -117,6 +123,7 @@ #endif int msgBeep = 1; /* ATM - msg beep */ +int scanmapped = 0; /* ATM - scanners */ int planetBitmap = 0; int planetBitmapGalaxy = 0; Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- parsemeta.c 14 May 2007 02:56:41 -0000 1.38 +++ parsemeta.c 16 May 2007 00:05:16 -0000 1.39 @@ -845,6 +845,9 @@ instead they default to "Active". */ for (i = 0; i < num_servers; i++) { + /* Don't cache INL servers */ + if (serverlist[i].typeflag == 'I') + continue; #ifdef METAPING /* Don't cache servers that aren't responding to ping, they are likely defunct. */ Index: helpwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- helpwin.c 14 May 2007 02:56:40 -0000 1.10 +++ helpwin.c 16 May 2007 00:05:15 -0000 1.11 @@ -157,7 +157,7 @@ "V Increase sound volume", #endif - "& Reread xtrekrc", + "& Reread netrekrc.txt", "\" Save current options", 0 }; Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- socket.c 28 Apr 2007 12:09:51 -0000 1.31 +++ socket.c 16 May 2007 00:05:16 -0000 1.32 @@ -31,7 +31,6 @@ #include "local.h" #include "proto.h" -/* #define INCLUDE_SCAN /* include Amdahl scanning beams */ #define INCLUDE_VISTRACT /* include visible tractor beams */ #define NETSTAT @@ -130,8 +129,8 @@ {sizeof (struct reserved_spacket), handleReserved}, /* SP_RESERVED */ {sizeof (struct planet_loc_spacket), handlePlanetLoc}, /* SP_PLANET_LOC */ -#ifdef HANDLE_SCAN - {sizeof (struct scan_spacket), handleScan} /* SP_SCAN (ATM) */ +#ifdef PARADISE + {sizeof (struct scan_spacket), handleScan}, /* SP_SCAN (ATM) */ #else {0, dummy}, /* won't be called */ #endif @@ -146,6 +145,15 @@ {0, dummy}, /* #31, and dummy won't */ #endif +#ifdef PARADISE + {sizeof (struct motd_pic_spacket), handleMotdPic}, /* SP_MOTD_PIC */ + {sizeof (struct stats_spacket2), handleStats2}, /* SP_STATS2 */ + {sizeof (struct status_spacket2), handleStatus2}, /* SP_STATUS2 */ + {sizeof (struct planet_spacket2), handlePlanet2}, /* SP_PLANET2 */ + {sizeof (struct obvious_packet), handleTempPack}, /* SP_TEMP_5 */ + {sizeof (struct thingy_spacket), handleThingy}, /* SP_THINGY */ + {sizeof (struct thingy_info_spacket), handleThingyInfo}, /* SP_THINGY_INFO */ +#else {sizeof (struct generic_32_spacket), handleGeneric32}, /* SP_GENERIC_32 */ {sizeof (struct flags_all_spacket), handleFlagsAll}, /* SP_FLAGS_ALL */ {0, dummy}, /* 34 */ @@ -153,6 +161,7 @@ {0, dummy}, /* 36 */ {0, dummy}, /* 37 */ {0, dummy}, /* 38 */ +#endif {sizeof (struct ship_cap_spacket), handleShipCap}, /* SP_SHIP_CAP */ #ifdef SHORT_PACKETS @@ -186,10 +195,17 @@ {0, dummy}, /* 50 */ #endif +#ifdef PARADISE + {-1, /* variable */ handleGameparams}, + {-1, /* variable */ handleExtension1}, + {sizeof (struct terrain_packet2), handleTerrain2}, /* 53 */ + {sizeof (struct terrain_info_packet2), handleTerrainInfo2}, /* 54 */ +#else {0, dummy}, /* 51 */ {0, dummy}, /* 52 */ {0, dummy}, /* 53 */ {0, dummy}, /* 54 */ +#endif {0, dummy}, /* 55 */ #ifdef SHORT_PACKETS /* S_P2 */ @@ -247,7 +263,7 @@ sizeof (struct resetstats_cpacket), /* CP_RESETSTATS */ sizeof (struct reserved_cpacket), /* CP_RESERVED */ -#ifdef INCLUDE_SCAN +#ifdef PARADISE sizeof (struct scan_cpacket), /* CP_SCAN (ATM) */ #else 0, @@ -926,6 +942,50 @@ switch (*bufptr) { +#ifdef PARADISE + case SP_GPARAM: + switch ((unsigned char) bufptr[1]) { +/* case 0: + size = sizeof(struct gp_sizes_spacket); + break; + case 1: + size = sizeof(struct gp_team_spacket); + break; + case 2: + size = sizeof(struct gp_teamlogo_spacket); + break; + case 3: + size = sizeof(struct gp_shipshape_spacket); + break; + case 4: + size = sizeof(struct gp_shipbitmap_spacket); + break; + case 5: + size = sizeof(struct gp_rank_spacket); + break; + case 6: + size = sizeof(struct gp_royal_spacket); + break; + case 7: + size = sizeof(struct gp_teamplanet_spacket); + break;*/ + default: + size = 0; + break; + } + case SP_PARADISE_EXT1: + switch ((unsigned char) bufptr[1]) { + case SP_PE1_MISSING_BITMAP: + size = sizeof(struct pe1_missing_bitmap_spacket); + break; + case SP_PE1_NUM_MISSILES: + size = sizeof(struct pe1_num_missiles_spacket); + break; + default: + size = 0; + break; + } +#endif case SP_S_MESSAGE: size = ((unsigned char) bufptr[4]); /* IMPORTANT Changed */ break; @@ -1640,7 +1700,7 @@ case CP_COUP: case CP_DOCKPERM: -#ifdef INCLUDE_SCAN +#ifdef PARADISE case CP_SCAN: #endif @@ -1841,8 +1901,10 @@ strcpy (packet.login, login); packet.type = CP_LOGIN; packet.query = query; - //packet.pad2 = 0x69; /* Paradise support */ - //packet.pad3 = 0x43; /* Paradise support */ +#ifdef PARADISE + packet.pad2 = 0x69; /* Paradise support */ + packet.pad3 = 0x43; /* Paradise support */ +#endif sendServerPacket ((struct player_spacket *) &packet); } @@ -2646,10 +2708,367 @@ #endif -#ifdef INCLUDE_SCAN -void -handleScan (packet) - struct scan_spacket *packet; +#ifdef PARADISE +void handleMotdPic (struct motd_pic_spacket *packet) +{ + int x, y, page, width, height; + + x = ntohs(packet->x); + y = ntohs(packet->y); + width = ntohs(packet->width); + height = ntohs(packet->height); + page = ntohs(packet->page); + + //newMotdPic(x, y, width, height, (char *) packet->bits, page); +} + +void handleStats2 (struct stats_spacket2 *packet) +{ + struct stats2 *p; /* to hold packet's player's stats2 struct */ + +#ifdef CORRUPTED_PACKETS + if (packet->pnum >= MAXPLAYER) + { + LineToConsole ("handleStats2: bad index\n"); + return; + } +#endif + + updatePlayer[packet->pnum] |= LARGE_UPDATE; + if (infomapped && infotype == PLAYERTYPE && + ((struct player *) infothing)->p_no == packet->pnum) + infoupdate = 1; + p = &(players[packet->pnum].p_stats2); /* get player's stats2 struct */ + p->st_genocides = ntohl(packet->genocides); + p->st_tmaxkills = (float) ntohl(packet->maxkills) / (float) 100.0; + p->st_di = (float) ntohl(packet->di) / (float) 100.0; + p->st_tkills = (int) ntohl(packet->kills); + p->st_tlosses = (int) ntohl(packet->losses); + p->st_tarmsbomb = (int) ntohl(packet->armsbomb); + p->st_tresbomb = (int) ntohl(packet->resbomb); + p->st_tdooshes = (int) ntohl(packet->dooshes); + p->st_tplanets = (int) ntohl(packet->planets); + p->st_tticks = (int) ntohl(packet->tticks); + p->st_sbkills = (int) ntohl(packet->sbkills); + p->st_sblosses = (int) ntohl(packet->sblosses); + p->st_sbticks = (int) ntohl(packet->sbticks); + p->st_sbmaxkills = (float) ntohl(packet->sbmaxkills) / (float) 100.0; + p->st_wbkills = (int) ntohl(packet->wbkills); + p->st_wblosses = (int) ntohl(packet->wblosses); + p->st_wbticks = (int) ntohl(packet->wbticks); + p->st_wbmaxkills = (float) ntohl(packet->wbmaxkills) / (float) 100.0; + p->st_jsplanets = (int) ntohl(packet->jsplanets); + p->st_jsticks = (int) ntohl(packet->jsticks); + if (p->st_rank != (int) ntohl(packet->rank) || + p->st_royal != (int) ntohl(packet->royal)) { + p->st_rank = (int) ntohl(packet->rank); + p->st_royal = (int) ntohl(packet->royal); + updatePlayer[packet->pnum] |= ALL_UPDATE; + } +} + +void handleStatus2 (struct status_spacket2 *packet) +{ +/* + updatePlayer[me->p_no] |= LARGE_UPDATE; + if (infomapped && infotype == PLAYERTYPE && + ((struct player *) infothing)->p_no == me->p_no) + infoupdate = 1; + status2->tourn = packet->tourn; + status2->dooshes = ntohl(packet->dooshes); + status2->armsbomb = ntohl(packet->armsbomb); + status2->resbomb = ntohl(packet->resbomb); + status2->planets = ntohl(packet->planets); + status2->kills = ntohl(packet->kills); + status2->losses = ntohl(packet->losses); + status2->sbkills = ntohl(packet->sbkills); + status2->sblosses = ntohl(packet->sblosses); + status2->sbtime = ntohl(packet->sbtime); + status2->wbkills = ntohl(packet->wbkills); + status2->wblosses = ntohl(packet->wblosses); + status2->wbtime = ntohl(packet->wbtime); + status2->jsplanets = ntohl(packet->jsplanets); + status2->jstime = ntohl(packet->jstime); + status2->time = ntohl(packet->time); + status2->timeprod = ntohl(packet->timeprod); +*/ +} + +void handlePlanet2 (struct planet_spacket2 *packet) +{ + static int first_planet_packet = 1; + +#ifdef CORRUPTED_PACKETS + if (packet->pnum >= MAXPLANETS) + { + LineToConsole ("handlePlanet2: bad index %d\n", packet->pnum); + return; + } +#endif +/* + if(first_planet_packet) + { + first_planet_packet = 0; + nplanets = packet->pnum+1; + } + else + { + if((packet->pnum+1) > nplanets) + nplanets = packet->pnum+1; + } + + planets[packet->pnum].pl_owner = packet->owner; + planets[packet->pnum].pl_info = packet->info; + planets[packet->pnum].pl_flags = ntohl(packet->flags); + if(PL_TYPE(planets[packet->pnum]) != PLPLANET) { + planets[packet->pnum].pl_owner = ALLTEAM; + } + planets[packet->pnum].pl_timestamp = ntohl(packet->timestamp); + planets[packet->pnum].pl_armies = ntohl(packet->armies); + planets[packet->pnum].pl_flags |= PLREDRAW; + pl_update[packet->pnum].plu_update = 1; + pl_update[packet->pnum].plu_x = planets[packet->pnum].pl_x; + pl_update[packet->pnum].plu_y = planets[packet->pnum].pl_y; + if (infomapped && infotype == PLANETTYPE && + ((struct planet *) infothing)->pl_no == packet->pnum) + infoupdate = 1; +*/ +} + +void handleTerrainInfo2 (struct terrain_info_packet2 *pkt) +{ +/* +#ifdef ZDIAG2 + fprintf( stderr, "Receiving terrain info packet\n" ); + fprintf( stderr, "Terrain dims: %d x %d\n", ntohs(pkt->xdim), ntohs(pkt->ydim) ); +#endif + received_terrain_info = TERRAIN_STARTED; + terrain_x = ntohs(pkt->xdim); + terrain_y = ntohs(pkt->ydim); +*/ +}; + +void handleTerrain2 (struct terrain_packet2 *pkt) +{ +/* + static int curseq = 0, totbytes = 0, done = 0; + int i; +#if defined(ZDIAG) || defined(ZDIAG2) + int status; +#endif // ZDIAG || ZDIAG2 + unsigned long dlen; +#ifdef ZDIAG2 + static unsigned char sum = 0; + static unsigned numnz = 0; +#endif + static unsigned char *gzipTerrain = NULL, *orgTerrain = NULL; + +#ifdef ZDIAG2 + fprintf( stderr, "Receiving Terrain packet. This should be %d.\n", curseq+1 ); +#endif + + if( (done == TERRAIN_DONE) && (received_terrain_info == TERRAIN_STARTED ) ){ + // receiving new terrain info + free( gzipTerrain ); + free( orgTerrain ); + free( terrainInfo ); + gzipTerrain = orgTerrain = NULL; + terrainInfo = NULL; + curseq = done = totbytes = 0; + } + + curseq++; + if( (curseq != pkt->sequence) || !(received_terrain_info) ){ + // Should fill in a list of all packets missed + // or request header packet from server + fprintf( stderr, "Blech! Received terrain packet before terrain_info\n" ); + return; + } +#ifdef ZDIAG2 + fprintf( stderr, "Receiving packet %d out of %d\n", curseq, pkt->total_pkts ); +#endif + if( !gzipTerrain ){ + gzipTerrain = (unsigned char *)malloc( pkt->total_pkts << 7 ); +#if defined(ZDIAG) || defined(ZDIAG2) + fprintf( stderr, "Allocating %d bytes for gzipTerrain.\n", pkt->total_pkts << 7 ); +#endif + // another yukko constant + } + if( !orgTerrain ){ + orgTerrain = (unsigned char *)malloc( terrain_x*terrain_y ); + dlen = terrain_x * terrain_y; +#if defined(ZDIAG) || defined(ZDIAG2) + fprintf( stderr, "Allocating %d bytes for orgTerrain.\n", dlen ); +#endif + } + for( i = 0; i < pkt->length; i++ ){ +#ifdef ZDIAG2 + if( !(i%10) ){ + fprintf( stderr, "Params: %d, %d\n", ((curseq-1)<<7)+i, i ); + } +#endif + gzipTerrain[((curseq-1)<<7)+i] = pkt->terrain_type[i]; + } + totbytes += pkt->length; + if( curseq == pkt->total_pkts ){ +#if defined(ZDIAG) || defined(ZDIAG2) + status = uncompress( orgTerrain, &dlen, gzipTerrain, totbytes ); + if( status != Z_OK ){ + if( status == Z_BUF_ERROR ){ + fprintf( stderr, "Unable to uncompress -- Z_BUF_ERROR.\n" ); + } + if( status == Z_MEM_ERROR ){ + fprintf( stderr, "Unable to uncompress -- Z_MEM_ERROR.\n" ); + } + if( status = Z_DATA_ERROR ){ + fprintf( stderr, "Unable to uncompress -- Z_DATA_ERROR!\n" ); + } + } + else{ + fprintf( stderr, "Total zipped terrain received: %d bytes\n", totbytes ); + } +#else + uncompress( orgTerrain, &dlen, gzipTerrain, totbytes ); +#endif + terrainInfo = (struct t_unit *)malloc( dlen * sizeof( struct t_unit ) ); + for( i = 0; i < dlen; i++ ){ + terrainInfo[i].types = orgTerrain[i]; +#ifdef ZDIAG2 + sum |= orgTerrain[i]; + if( orgTerrain[i] != 0 ){ + numnz++; + } +#endif + } + done = received_terrain_info = TERRAIN_DONE; +#ifdef ZDIAG2 + fprintf( stderr, "Sum = %d, numnz = %d\n", sum, numnz ); +#endif + } +*/ +} + +void handleTempPack (struct obvious_packet *packet) +{ +/* + struct obvious_packet reply; + // printf("New MOTD info available\n"); + erase_motd(); + reply.type = CP_ASK_MOTD; + sendServerPacket((struct player_spacket *) & reply); +*/ +} + +/* handlers for the extension1 packet */ + +int compute_extension1_size (char *pkt) +{ + if (pkt[0] != SP_PARADISE_EXT1) + return -1; + + switch (pkt[1]) { + case SP_PE1_MISSING_BITMAP: + return sizeof(struct pe1_missing_bitmap_spacket); + case SP_PE1_NUM_MISSILES: + return sizeof(struct pe1_num_missiles_spacket); + default: + return -1; + } +} + +void handleExtension1 (struct paradiseext1_spacket *packet) +{ +/* + switch (packet->subtype) { + case SP_PE1_MISSING_BITMAP: + { + struct pe1_missing_bitmap_spacket *pkt = + (struct pe1_missing_bitmap_spacket *) packet; + + newMotdPic(ntohs(pkt->x), ntohs(pkt->y), ntohs(pkt->width), ntohs(pkt->height), 0, ntohs(pkt->page)); + } + break; + case SP_PE1_NUM_MISSILES: + me->p_totmissiles = ntohs(((struct pe1_num_missiles_spacket *) packet)->num); + // printf("updated totmissiles to %d\n",me->p_totmissiles); + if (me->p_totmissiles < 0) + me->p_totmissiles = 0; // SB/WB have + break; + default: + printf("unknown paradise extension packet 1 subtype = %d\n", + packet->subtype); + } +*/ +} +void handleThingy (struct thingy_spacket *packet) +{ +/* + struct thingy *thetorp; + + //SANITY_THINGYNUM(ntohs(packet->tnum)); + + thetorp = &thingies[ntohs(packet->tnum)]; + thetorp->t_x = ntohl(packet->x); + thetorp->t_y = ntohl(packet->y); + // printf("drone at %d, %d\n", thetorp->t_x, thetorp->t_y); + thetorp->t_dir = packet->dir; + + + if (rotate) { + rotate_gcenter(&thetorp->t_x, &thetorp->t_y); + rotate_dir(&thetorp->t_dir, rotate_deg); + } + + if (thetorp->t_shape == SHP_WARP_BEACON) + redrawall = 1; // shoot, route has changed +*/ +} + +void handleThingyInfo (struct thingy_info_spacket *packet) +{ +/* + struct thingy *thetorp; + + //SANITY_THINGYNUM(ntohs(packet->tnum)); + + thetorp = &thingies[ntohs(packet->tnum)]; + + thetorp->t_owner = ntohs(packet->owner); + + if (thetorp->t_shape == SHP_WARP_BEACON) + redrawall = 1; // redraw the lines, I guess + + if (ntohs(packet->shape) == SHP_BOOM && thetorp->t_shape == SHP_BLANK) { + // FAT: redundant explosion; don't update p_ntorp + // printf("texplode ignored\n"); + return; + } + + if (thetorp->t_shape == SHP_BLANK && ntohs(packet->shape) != SHP_BLANK) { + players[thetorp->t_owner].p_ndrone++; + } + if (thetorp->t_shape != SHP_BLANK && ntohs(packet->shape) == SHP_BLANK) { + players[thetorp->t_owner].p_ndrone--; + } + thetorp->t_war = packet->war; + + if (ntohs(packet->shape) != thetorp->t_shape) { + // FAT: prevent explosion reset + int shape = ntohs(packet->shape); + + if(shape == SHP_BOOM || shape == SHP_PBOOM) { + if(thetorp->t_shape == SHP_FIGHTER) + shape = SHP_FBOOM; + if(thetorp->t_shape == SHP_MISSILE) + shape = SHP_DBOOM; + thetorp->t_fuse = BIGINT; + } + thetorp->t_shape = shape; + } +*/ +} + +void handleScan (struct scan_spacket *packet) { struct player *pp; @@ -2670,16 +3089,42 @@ pp->p_damage = ntohl (packet->p_damage); pp->p_etemp = ntohl (packet->p_etemp); pp->p_wtemp = ntohl (packet->p_wtemp); - informScan (packet->pnum); } } -informScan (p) - int p; +void handleGameparams (struct gameparam_spacket *packet) { + /*switch (pkt->subtype) { + case 0: + handleGPsizes((struct gp_sizes_spacket *) pkt); + break; + case 1: + handleGPteam((struct gp_team_spacket *) pkt); + break; + case 2: + handleGPteamlogo((struct gp_teamlogo_spacket *) pkt); + break; + case 3: + handleGPshipshape((struct gp_shipshape_spacket *) pkt); + break; + case 4: + handleGPshipbitmap((struct gp_shipbitmap_spacket *) pkt); + break; + case 5: + handleGPrank((struct gp_rank_spacket *) pkt); + break; + case 6: + handleGProyal((struct gp_royal_spacket *) pkt); + break; + case 7: + handleGPteamplanet((struct gp_teamplanet_spacket *) pkt); + break; + default: + fprintf(stderr, "Gameparams packet subtype %d not yet implemented\n", + pkt->subtype); + }*/ } - -#endif /* INCLUDE_SCAN */ +#endif /* PARADISE*/ /* UDP stuff */ void @@ -3698,8 +4143,7 @@ ntohl(((struct planet_loc_spacket *) packet)->y), ((struct planet_loc_spacket *) packet)->name ); break; -#ifdef INCLUDE_SCAN - /* NOTE: not implemented */ +#ifdef PARADISE case SP_SCAN : /* ATM: results of player * * * scan */ LineToConsole("\nS->C SP_SCAN\t"); @@ -4200,8 +4644,7 @@ LineToConsole(","); } break; -#ifdef INCLUDE_SCAN - /* NOTE: not implemented. */ +#ifdef PARADISE case CP_SCAN : /* ATM: request for player * * * * scan */ From modemhero at users.sourceforge.net Thu May 17 03:49:50 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 17 May 2007 08:49:50 +0000 Subject: [netrek-cvs] client/netrekxp/include bitmaps.h, 1.18, 1.19 data.h, 1.85, 1.86 defs.h, 1.25, 1.26 packets.h, 1.8, 1.9 proto.h, 1.55, 1.56 struct.h, 1.19, 1.20 wlib.h, 1.13, 1.14 Message-ID: <20070517085030.CAA59B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv31445/include Modified Files: bitmaps.h data.h defs.h packets.h proto.h struct.h wlib.h Log Message: A bunch of paradise additions, mostly separated by #ifdef's but a few things impact outside that condition, which are listed below. 1) Added paradise ships (CL, CV, FL, JS, PT, UT, WB) bitmap set and bitmaps for stars (local and map). 2) New function W_WriteRectangle, only used in paradise gridbox drawing, but it's available for general use. 3) Removed unused PLCLEAR flag. It overlapped with a paradise flag, and it wasn't used at all with current code so I just removed it. 4) Moved the redrawall = 0 from near top of main map function to bottom. I don't see any harm in doing this, and it was necessary to get a paradise draw function to work. 5) The BIGBITMAP_WIDTH size was changed from 240x240 to 500x500 to accomodate MOTD pics from paradise servers. Again I don't see any harm in increasing size. And this wasn't even used with bitmap storage, the StoreBitmap() function had been completely phased out. Along the way of adding in paradise functionality, numerous problems with defines have come up, ie MAXSECTOR, GWIDTH, ship array, and most seriously, overlapping packet types. There are also very serious problems with overlapping p_flag and p_status values, namely observers overlap with warp states and tournament queue status. Some p_whydead messages also overlap. Also paradise servers send phaser damage caps differently. Things that could use work are the motd paging system (gutted it for sake of simplicity), planet window (paradise has 2 planet windows, also sorting doesn't work), a bunch of gridline/zoom options should be made into netrekrc options. The galactic zoom doesn't work. Ships disappear while warping (due to the aforementioned problem with PFOBSERV overlap with PFWARP). Most of the paradise packet types, including special weapons and game parameters, are still not handled. Gwidth is not malleable based on paradise vs bronco server. No color ship bitmaps were added. No special items other than stars were added. No new weapon types like fighters were added. A bunch of keys like afterburners and engage warp don't exist. Info windows and rank windows not working right with paradise. Index: bitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- bitmaps.h 7 Apr 2007 11:35:26 -0000 1.18 +++ bitmaps.h 17 May 2007 08:49:47 -0000 1.19 @@ -26,7 +26,9 @@ #define BMP_KLI_SHIP 3 #define BMP_ROM_SHIP 5 #define BMP_IND_SHIP 2 - +#ifdef PARADISE +#define BMP_PSHIP 6 +#endif // Weapons // ------- @@ -188,3 +190,13 @@ #define BMP_CPLANET_HEIGHT 120 #define CPLANET_VIEWS 16 + +#ifdef PARADISE +#define BMP_STAR 12 +#define BMP_MSTAR 13 +#define BMP_STAR_WIDTH 30 +#define BMP_STAR_HEIGHT 30 +#define BMP_MSTAR_WIDTH 16 +#define BMP_MSTAR_HEIGHT 16 +#define STAR_VIEWS 5 +#endif Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- defs.h 16 May 2007 00:05:11 -0000 1.25 +++ defs.h 17 May 2007 08:49:47 -0000 1.26 @@ -9,6 +9,8 @@ #include "copyright.h" #ifdef PARADISE +#define GRIDSIZE 33333 + /* defs for updatePlayer [BDyess] */ #define NO_UPDATE 0 #define SMALL_UPDATE 1 /* update non-blk_bozo players */ @@ -110,7 +112,11 @@ /* At this range a player can be seen while visible (uncloaked) */ +#ifdef PARADISE +#define MAXSECTORS 20 +#else #define MAXSECTORS 10 /* Max # of star sectors */ +#endif #define MAXSTARS 100 /* Max # of stars in a sector */ /* 6 minutes is maximum for autoquit -- anything more causes problems in the Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- packets.h 16 May 2007 00:05:12 -0000 1.8 +++ packets.h 17 May 2007 08:49:47 -0000 1.9 @@ -1292,7 +1292,154 @@ char type; char subtype; /* this packet is not real */ /* generic game parameter packet */ - int pad; + short pad; }; +struct gp_sizes_spacket { + char type; + char subtype; /* =0 */ + + char nplayers; + char nteams; /* max of 8 */ + + char nshiptypes; + char nranks; /* number of ranks */ + char nroyal; /* number of royalties */ + char nphasers; + + char ntorps; + char nplasmas; + char nthingies; /* per-player */ + char gthingies; /* auxiliary thingies */ + + unsigned int gwidth; /* galaxy width */ + /* 16 bytes */ + unsigned int flags; /* some game parameter flags */ +#define GP_WRAPVERT (1<<0) +#define GP_WRAPHORIZ (1<<1) +#define GP_WRAPALL (GP_WRAPVERT|GP_WRAPHORIZ) + + /* + The following bytes are room for growth. The size of this packet is + unimportant because it only gets sent once. hopefully we've got + plenty of room. + */ + int ext1; /* maybe more flags? */ + int ext2; + int ext3; + /* 32 bytes */ + + int ext4; + int ext5; + int ext6; + int ext7; + + int ext8; + int ext9; + int ext10; + int ext11; /* 16 ints, 64 bytes */ +}; + +struct gp_team_spacket { + char type; + char subtype; /* =1 */ + + char index; /* team index */ + char letter; /* team letter 'F' */ + + char shortname[3]; /* non-null-terminated 3-letter abbrev 'FED' */ + char pad; + /* 8 bytes */ + char teamname[56]; /* padding to 64 byte packet */ +}; + +struct gp_teamlogo_spacket { + /* + This packet contains several adjacent rows of a team's logo bitmap + Data is in raw XBM format (scanline-padded to 8 bits). Maximum bitmap + size is 99x99, which takes 1287 (99x13) bytes. + */ + char type; + char subtype; /* =2 */ + + char logowidth; /* <= 99 */ + char logoheight; /* <= 99 */ + + char y; /* y coord of the start of this packets info */ + char thisheight; /* the height of this packet's info */ + char teamindex; /* which team's logo this is */ + + char data[768 - 7]; /* pad packet to 768 bytes. */ +}; + +struct gp_shipshape_spacket { + char type; + char subtype; /* =3 */ + + char shipno; + char race; /* -1 is independent */ + char nviews; /* typically 16 */ + + char width, height; + char pad1; +}; + +struct gp_shipbitmap_spacket { + char type; + char subtype; /* =4 */ + + char shipno; + char race; /* -1 is independent */ + char thisview; /* 0..nviews-1 */ + + char bitmapdata[999]; +}; + +struct gp_rank_spacket { + char type; + char subtype; /* =5 */ + + char rankn; /* rank number */ + + char name[-3 + 64 - 20]; /* name of the rank */ + + int genocides; + int milliDI; /* DI*1000 */ + int millibattle; /* battle*1000 */ + int millistrat; /* strategy*1000 */ + int millispec; /* special ships*1000 */ +}; + +struct gp_royal_spacket { + char type; + char subtype; /* =6 */ + + char rankn; /* rank number */ + + char name[-3 + 64]; /* name of the rank */ +}; + +struct gp_teamplanet_spacket { + char type; + char subtype; /* =7 */ + + char teamn; /* 0..7 */ + char pad1; + + int ext1; /* extensions? */ + + /* + Bitmaps of the team logo and masks. The bitmap of the planet will be + constructed with (mask ? logo : planet), applied bitwise. This + calculation is equivalent to (logo&mask)|(planet&~mask) + */ + + /* bitmap 30x30, X bitmap format (scanline padded to 8 bits) */ + char tactical[120]; + char tacticalM[120]; + + /* bitmap 16x16, X bitmap format (scanline padded to 8 bits) */ + char galactic[32]; + char galacticM[32]; +}; #endif Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- struct.h 16 May 2007 00:05:13 -0000 1.19 +++ struct.h 17 May 2007 08:49:47 -0000 1.20 @@ -71,6 +71,32 @@ int gameup; /* is game up */ unsigned long clock; /* clock for planet info timestamp */ }; + +struct teaminfo_s { + char name[32]; /* this is not meant to limit the length of + team names */ + W_Icon shield_logo; /* logo that appears in the team choice + window */ + char letter; /* 1-letter abbreviation */ + char shortname[4]; /* 3-letter abbreviation */ +}; + +/* MOTD structures */ +struct piclist { + int page; + W_Icon thepic; + int x, y; + int width, height; + struct piclist *next; +}; +struct page { + struct list *text; + struct page *next; + struct page *prev; + int first; + int page; +}; + #endif enum dist_type @@ -161,6 +187,15 @@ #define PFPRESS 0x800000 /* pressor beam activated */ #define PFDOCKOK 0x1000000 /* docking permission */ #define PFSEEN 0x2000000 /* seen by enemy on galactic map? */ +#ifdef PARADISE +/* Note overlap with PFWARP/PFOBSERV and PFSNAKE/PFTWARP */ +#define PFWARPPREP (1<<26) /* in warp prep [BDyess] */ +#define PFWARP (1<<27) /* ship warping */ +#define PFAFTER (1<<28) /* after burners on */ +#define PFWPSUSPENDED (1<<29) /* warp prep suspended [BDyess] */ +#define PFSNAKE (1<<30) /* it's a space snake */ +#define PFBIRD (1<<31) /* it's a space bird */ +#endif #define PFOBSERV 0x8000000 /* for observers */ #define PFTWARP 0x40000000 /* transwarping to base */ @@ -183,7 +218,33 @@ #define KTORP2 0x10 /* killed by detted torps */ #define KSHIP2 0x11 /* chain-reaction explosions */ #define KPLASMA2 0x12 /* killed by zapped plasma */ +#ifdef PARADISE +#define KMISSILE 0x10 /* missile, note the overlap with KTORP2! */ +#define KASTEROID 0x11 /* asteroid, note the overlap with KSHIP2! */ +#endif +#ifdef PARADISE +#define NUM_TYPES 15 +#define NUM_PSHIP_TYPES 7 +#define PARADISE_SHIP_OFFSET 7 /* To make jumpship first entry in the paradise ship bitmap array */ +#define SCOUT 0 +#define DESTROYER 1 +#define CRUISER 2 +#define BATTLESHIP 3 +#define ASSAULT 4 +#define STARBASE 5 +#define ATT 6 +#define SGALAXY 6 /* galaxy ships now supported - they look + extremely similar to flagships :) [BDyess] */ +#define JUMPSHIP 7 +#define FLAGSHIP 8 +#define WARBASE 9 +#define LIGHTCRUISER 10 +#define CARRIER 11 +#define UTILITY 12 +#define PATROL 13 +#define PUCK 14 +#else #define NUM_TYPES 8 #define SCOUT 0 #define DESTROYER 1 @@ -193,6 +254,7 @@ #define STARBASE 5 #define SGALAXY 6 #define ATT 7 +#endif struct ship { @@ -446,6 +508,94 @@ * are in a 'known' order. Ten planets per team, the first being the home * planet. */ +#ifdef PARADISE +/* + pl_flags is an int of 32 bits: + + bits 16 and 23 currently define the type of the planet. The + interpretation of the other bits is dependent upon the planet + type. + + Here is the interpretation for a planet + bits 0..3 unknown + bits 4..6 planetary facilities (REPAIR,FUEL,AGRI) + bit 7 redraw (archaic, recyclable?) + bits 8..11 old flags (archaic, recyclable?) + bits 12..15 paradise planetary facilities + (REPAIR,FUEL,AGRI,SHIPY) + bit 16 cosmic object type (also bit 23) + bits 17,18 planet atmosphere type + bits 19..21 planetary surface properties + (DILYTH,METAL,ARABLE) + bit 22 paradise planet flag (why?) + bits 23,24 cosmic object type (also bit 16) + bits 25..31 currently unallocated (7 bits to play with) + + Asteroids are NYI but here is a draft standard: + bits 12,15 facilities + (REPAIR,FUEL,SHIPY) + bit 20 surface properties + (DILYTH,METAL) + other bits currently unallocated + + */ + +/* facilities, bits 4..6 and 12..15 + valid for planets and asteroids */ +#define PLREPAIR ((1<<12) | (1<<4)) /* planet can repair ships */ +#define PLFUEL ((1<<13) | (1<<5)) /* planet has fuel depot */ +#define PLAGRI ((1<<14) | (1<<6)) /* agricultural thingies built here */ +#define PLSHIPYARD ((1<<15)) /* planet has a shipyard on it */ +#define PLORESMASK (0x7<<4) /* mask for original resource flags */ +#define PLRESSHIFT 12 /* bit to shift right by for resources */ +#define PLRESMASK (0xF< Update of /cvsroot/netrek/client/netrekxp/resources/ships/mono In directory sc8-pr-cvs16:/tmp/cvs-serv31445/resources/ships/mono Added Files: paradise_ships.bmp Log Message: A bunch of paradise additions, mostly separated by #ifdef's but a few things impact outside that condition, which are listed below. 1) Added paradise ships (CL, CV, FL, JS, PT, UT, WB) bitmap set and bitmaps for stars (local and map). 2) New function W_WriteRectangle, only used in paradise gridbox drawing, but it's available for general use. 3) Removed unused PLCLEAR flag. It overlapped with a paradise flag, and it wasn't used at all with current code so I just removed it. 4) Moved the redrawall = 0 from near top of main map function to bottom. I don't see any harm in doing this, and it was necessary to get a paradise draw function to work. 5) The BIGBITMAP_WIDTH size was changed from 240x240 to 500x500 to accomodate MOTD pics from paradise servers. Again I don't see any harm in increasing size. And this wasn't even used with bitmap storage, the StoreBitmap() function had been completely phased out. Along the way of adding in paradise functionality, numerous problems with defines have come up, ie MAXSECTOR, GWIDTH, ship array, and most seriously, overlapping packet types. There are also very serious problems with overlapping p_flag and p_status values, namely observers overlap with warp states and tournament queue status. Some p_whydead messages also overlap. Also paradise servers send phaser damage caps differently. Things that could use work are the motd paging system (gutted it for sake of simplicity), planet window (paradise has 2 planet windows, also sorting doesn't work), a bunch of gridline/zoom options should be made into netrekrc options. The galactic zoom doesn't work. Ships disappear while warping (due to the aforementioned problem with PFOBSERV overlap with PFWARP). Most of the paradise packet types, including special weapons and game parameters, are still not handled. Gwidth is not malleable based on paradise vs bronco server. No color ship bitmaps were added. No special items other than stars were added. No new weapon types like fighters were added. A bunch of keys like afterburners and engage warp don't exist. Info windows and rank windows not working right with paradise. --- NEW FILE: paradise_ships.bmp --- (This appears to be a binary file; contents omitted.) From modemhero at users.sourceforge.net Thu May 17 03:49:51 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 17 May 2007 08:49:51 +0000 Subject: [netrek-cvs] client/netrekxp/src beeplite.c, 1.15, 1.16 data.c, 1.92, 1.93 death.c, 1.19, 1.20 defaults.c, 1.85, 1.86 feature.c, 1.18, 1.19 findslot.c, 1.9, 1.10 getship.c, 1.4, 1.5 inform.c, 1.4, 1.5 input.c, 1.39, 1.40 local.c, 1.101, 1.102 map.c, 1.55, 1.56 mswindow.c, 1.82, 1.83 newwin.c, 1.63, 1.64 planetlist.c, 1.7, 1.8 playerlist.c, 1.12, 1.13 socket.c, 1.32, 1.33 Message-ID: <20070517085003.BFCA5B3ED@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv31445/src Modified Files: beeplite.c data.c death.c defaults.c feature.c findslot.c getship.c inform.c input.c local.c map.c mswindow.c newwin.c planetlist.c playerlist.c socket.c Log Message: A bunch of paradise additions, mostly separated by #ifdef's but a few things impact outside that condition, which are listed below. 1) Added paradise ships (CL, CV, FL, JS, PT, UT, WB) bitmap set and bitmaps for stars (local and map). 2) New function W_WriteRectangle, only used in paradise gridbox drawing, but it's available for general use. 3) Removed unused PLCLEAR flag. It overlapped with a paradise flag, and it wasn't used at all with current code so I just removed it. 4) Moved the redrawall = 0 from near top of main map function to bottom. I don't see any harm in doing this, and it was necessary to get a paradise draw function to work. 5) The BIGBITMAP_WIDTH size was changed from 240x240 to 500x500 to accomodate MOTD pics from paradise servers. Again I don't see any harm in increasing size. And this wasn't even used with bitmap storage, the StoreBitmap() function had been completely phased out. Along the way of adding in paradise functionality, numerous problems with defines have come up, ie MAXSECTOR, GWIDTH, ship array, and most seriously, overlapping packet types. There are also very serious problems with overlapping p_flag and p_status values, namely observers overlap with warp states and tournament queue status. Some p_whydead messages also overlap. Also paradise servers send phaser damage caps differently. Things that could use work are the motd paging system (gutted it for sake of simplicity), planet window (paradise has 2 planet windows, also sorting doesn't work), a bunch of gridline/zoom options should be made into netrekrc options. The galactic zoom doesn't work. Ships disappear while warping (due to the aforementioned problem with PFOBSERV overlap with PFWARP). Most of the paradise packet types, including special weapons and game parameters, are still not handled. Gwidth is not malleable based on paradise vs bronco server. No color ship bitmaps were added. No special items other than stars were added. No new weapon types like fighters were added. A bunch of keys like afterburners and engage warp don't exist. Info windows and rank windows not working right with paradise. Index: getship.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/getship.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- getship.c 15 Jun 2006 05:09:04 -0000 1.4 +++ getship.c 17 May 2007 08:49:48 -0000 1.5 @@ -145,6 +145,128 @@ shipvals[CRUISER].s_type = CRUISER; /* cruiser: */ shipvals[CRUISER].s_phaserfuse = 10; /* cruiser: */ shipvals[CRUISER].s_repair = 110; /* cruiser: */ + +#ifdef PARADISE + shipvals[JUMPSHIP].s_phaserdamage = 25; + shipvals[JUMPSHIP].s_torpspeed = 18; + shipvals[JUMPSHIP].s_maxspeed = 20; + shipvals[JUMPSHIP].s_maxfuel = 50000; + shipvals[JUMPSHIP].s_maxarmies = 0; + shipvals[JUMPSHIP].s_maxshield = 5; + shipvals[JUMPSHIP].s_maxdamage = 60; + shipvals[JUMPSHIP].s_maxwpntemp = 1300; + shipvals[JUMPSHIP].s_maxegntemp = 5000; + shipvals[JUMPSHIP].s_type = JUMPSHIP; + shipvals[JUMPSHIP].s_width = 20; + shipvals[JUMPSHIP].s_height = 20; + shipvals[JUMPSHIP].s_phaserfuse = 4; + shipvals[JUMPSHIP].s_repair = 200; + + shipvals[FLAGSHIP].s_phaserdamage = 102; + shipvals[FLAGSHIP].s_torpspeed = 12; + shipvals[FLAGSHIP].s_maxspeed = 9; + shipvals[FLAGSHIP].s_maxfuel = 12500; + shipvals[FLAGSHIP].s_maxarmies = 6; + shipvals[FLAGSHIP].s_maxshield = 115; + shipvals[FLAGSHIP].s_maxdamage = 115; + shipvals[FLAGSHIP].s_maxwpntemp = 1000; + shipvals[FLAGSHIP].s_maxegntemp = 1500; + shipvals[FLAGSHIP].s_type = FLAGSHIP; + shipvals[FLAGSHIP].s_width = 20; + shipvals[FLAGSHIP].s_height = 20; + shipvals[FLAGSHIP].s_phaserfuse = 10; + shipvals[FLAGSHIP].s_repair = 118; + + shipvals[WARBASE].s_phaserdamage = 125; + shipvals[WARBASE].s_torpspeed = 15; + shipvals[WARBASE].s_maxspeed = 3; + shipvals[WARBASE].s_maxfuel = 50000; + shipvals[WARBASE].s_maxarmies = 0; + shipvals[WARBASE].s_maxshield = 250; + shipvals[WARBASE].s_maxdamage = 500; + shipvals[WARBASE].s_maxwpntemp = 1500; + shipvals[WARBASE].s_maxegntemp = 1000; + shipvals[WARBASE].s_type = WARBASE; + shipvals[WARBASE].s_width = 20; + shipvals[WARBASE].s_height = 20; + shipvals[WARBASE].s_phaserfuse = 5; + shipvals[WARBASE].s_repair = 170; + + shipvals[LIGHTCRUISER].s_phaserdamage = 90; + shipvals[LIGHTCRUISER].s_torpspeed = 13; + shipvals[LIGHTCRUISER].s_maxspeed = 10; + shipvals[LIGHTCRUISER].s_maxfuel = 8500; + shipvals[LIGHTCRUISER].s_maxarmies = 3; + shipvals[LIGHTCRUISER].s_maxshield = 95; + shipvals[LIGHTCRUISER].s_maxdamage = 90; + shipvals[LIGHTCRUISER].s_maxwpntemp = 1000; + shipvals[LIGHTCRUISER].s_maxegntemp = 1500; + shipvals[LIGHTCRUISER].s_type = LIGHTCRUISER; + shipvals[LIGHTCRUISER].s_width = 20; + shipvals[LIGHTCRUISER].s_height = 20; + shipvals[LIGHTCRUISER].s_phaserfuse = 10; + shipvals[LIGHTCRUISER].s_repair = 80; + + shipvals[CARRIER].s_phaserdamage = 95; + shipvals[CARRIER].s_torpspeed = 13; + shipvals[CARRIER].s_maxspeed = 9; + shipvals[CARRIER].s_maxfuel = 15000; + shipvals[CARRIER].s_maxarmies = 3; + shipvals[CARRIER].s_maxshield = 120; + shipvals[CARRIER].s_maxdamage = 150; + shipvals[CARRIER].s_maxwpntemp = 1000; + shipvals[CARRIER].s_maxegntemp = 1500; + shipvals[CARRIER].s_type = CARRIER; + shipvals[CARRIER].s_width = 20; + shipvals[CARRIER].s_height = 20; + shipvals[CARRIER].s_phaserfuse = 6; + shipvals[CARRIER].s_repair = 105; + + shipvals[UTILITY].s_phaserdamage = 80; + shipvals[UTILITY].s_torpspeed = 15; + shipvals[UTILITY].s_maxspeed = 7; + shipvals[UTILITY].s_maxfuel = 16000; + shipvals[UTILITY].s_maxarmies = 12; + shipvals[UTILITY].s_maxshield = 120; + shipvals[UTILITY].s_maxdamage = 220; + shipvals[UTILITY].s_maxwpntemp = 1000; + shipvals[UTILITY].s_maxegntemp = 1800; + shipvals[UTILITY].s_type = UTILITY; + shipvals[UTILITY].s_width = 20; + shipvals[UTILITY].s_height = 20; + shipvals[UTILITY].s_phaserfuse = 8; + shipvals[UTILITY].s_repair = 120; + + shipvals[PATROL].s_phaserdamage = 50; + shipvals[PATROL].s_torpspeed = 15; + shipvals[PATROL].s_maxspeed = 13; + shipvals[PATROL].s_maxfuel = 4000; + shipvals[PATROL].s_maxarmies = 1; + shipvals[PATROL].s_maxshield = 50; + shipvals[PATROL].s_maxdamage = 40; + shipvals[PATROL].s_maxwpntemp = 1000; + shipvals[PATROL].s_maxegntemp = 1500; + shipvals[PATROL].s_type = PATROL; + shipvals[PATROL].s_width = 20; + shipvals[PATROL].s_height = 20; + shipvals[PATROL].s_phaserfuse = 8; + shipvals[PATROL].s_repair = 50; + + shipvals[PUCK].s_phaserdamage = 75; + shipvals[PUCK].s_torpspeed = 16; + shipvals[PUCK].s_maxspeed = 12; + shipvals[PUCK].s_maxfuel = 5000; + shipvals[PUCK].s_maxarmies = 2; + shipvals[PUCK].s_maxshield = 75; + shipvals[PUCK].s_maxdamage = 75; + shipvals[PUCK].s_maxwpntemp = 1000; + shipvals[PUCK].s_maxegntemp = 1000; + shipvals[PUCK].s_type = PUCK; + shipvals[PUCK].s_width = 20; + shipvals[PUCK].s_height = 20; + shipvals[PUCK].s_phaserfuse = 10; + shipvals[PUCK].s_repair = 80; +#endif } /******************************************************************************/ Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- mswindow.c 27 Apr 2007 10:04:19 -0000 1.82 +++ mswindow.c 17 May 2007 08:49:49 -0000 1.83 @@ -323,11 +323,11 @@ }; #ifndef SCALE_BITMAPS -#define BIGBITMAP_WIDTH 240 -#define BIGBITMAP_HEIGHT 240 +#define BIGBITMAP_WIDTH 500 +#define BIGBITMAP_HEIGHT 500 #else -static int BIGBITMAP_WIDTH = 240; -static int BIGBITMAP_HEIGHT = 240; +static int BIGBITMAP_WIDTH = 500; +static int BIGBITMAP_HEIGHT = 500; #endif struct BitmapList @@ -3607,6 +3607,50 @@ ReleaseDC (win->hwnd, hdc); } +//Draw a rectangle +void +W_WriteRectangle (W_Window window, + int x, + int y, + int width, + int height, + int dashed, + W_Color color) +{ + POINT points[4]; + DBHEADER_VOID; + + x += win->border; + y += win->border; + + points[0].x = x; + points[0].y = y; + points[1].x = x + width; + points[1].y = y; + points[2].x = x + width; + points[2].y = y + height; + points[3].x = x; + points[3].y = y + height; + + if (NetrekPalette) + { + SelectPalette (hdc, NetrekPalette, FALSE); + RealizePalette (hdc); + } + if (dashed) + { + SetBkColor (hdc, colortable[BLACK].rgb); + SelectObject (hdc, colortable[color].dashedpen); + } + else + SelectObject (hdc, colortable[color].pen); + SelectObject (hdc, GetStockObject (NULL_BRUSH)); + + Polygon (hdc, points, 4); + + if (!sdb || !doubleBuffering || !ingame) + ReleaseDC (win->hwnd, hdc); +} //Put some text in a window. This is a straight ExtTextOut call if it's a //graphics window, a ExtTextOut call with mapped coordinates if it's a Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- newwin.c 13 Apr 2007 09:10:16 -0000 1.63 +++ newwin.c 17 May 2007 08:49:49 -0000 1.64 @@ -36,6 +36,23 @@ static int line = 0; int MaxMotdLine = 0; +#ifdef PARADISE +#define LINESPERPAGE 38 +#else +#define LINESPERPAGE 28 +#endif + +#ifdef PARADISE +#define S_MOTD 0 +#define S_SYSDEF 1 +#define S_CREDITS 2 +#define S_MAX 3 +static void showPics (W_Window win, int atline); +int newMotdStuff = 0; /* set to 1 when new motd packets arrive */ +static struct piclist *motdPics = NULL; +static struct piclist **motd_buftail = &motdPics; +#endif + /* if a motd line from the server is this, the client will junk all motd * * data it currently has. New data may be received */ #define MOTDCLEARLINE "\033\030CLEAR_MOTD\000" @@ -54,6 +71,10 @@ void loadbitmapsM (void); void loadbitmapsG (void); void loadbitmapsHR (void); +#ifdef PARADISE +void loadbitmapsparadise (void); +void loadparadisethings (void); +#endif void loadweaponsC (void); void loadplanetsC (void); @@ -429,8 +450,41 @@ } } +#ifdef PARADISE /******************************************************************************/ -/*** loadweaponsHR() - high quality ship bitmaps, 80x80 +/*** loadbitmapsParadise() +/******************************************************************************/ +void loadbitmapsParadise() +{ + int j, k; + + if ( access("bitmaps/shiplib/paradise_ships.bmp", R_OK) == 0 ) + { + paradise_ship_bitmaps = + W_StoreBitmap3 ("bitmaps/shiplib/paradise_ships.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES, + BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_MONOCHROME); + } + else // No paradise ship bitmaps, doh! + { + LineToConsole("Failed to load paradise bitmaps, defaulting to cruiser for all ships.\n"); + noParadiseBitmaps = 1; + return; + } + + for (j = 0; j < NUM_PSHIP_TYPES; j++) + { + for (k = 0; k < NUMTEAMS; k++) + { + paradise_ships[j][k] = + W_PointBitmap2 (paradise_ship_bitmaps, j, k, BMP_SHIP_WIDTH, + BMP_SHIP_HEIGHT); + } + } +} +#endif + +/******************************************************************************/ +/*** loadbitmapsHR() - high quality ship bitmaps, 80x80 /******************************************************************************/ void loadbitmapsHR() { @@ -767,6 +821,29 @@ LR_DEFAULTCOLOR); } +#ifdef PARADISE +/******************************************************************************/ +/*** loadparadisethings() - misc paradise art like stars, wormholes, etc +/******************************************************************************/ +void loadparadisethings (void) +{ + int i; + + base_star_bitmap = + W_StoreBitmap3 ("bitmaps/misclib/color/star.bmp", BMP_STAR_WIDTH, + BMP_STAR_HEIGHT * STAR_VIEWS, BMP_STAR, w, + LR_DEFAULTCOLOR); + for (i = 0; i < STAR_VIEWS; i++) + star_bitmap[i] = + W_PointBitmap2 (base_star_bitmap, 0, i, BMP_STAR_WIDTH, BMP_STAR_HEIGHT); + + star_mbitmap = + W_StoreBitmap3 ("bitmaps/misclib/color/starm.bmp", BMP_MSTAR_WIDTH, + BMP_MSTAR_HEIGHT, BMP_MSTAR, mapw, + LR_DEFAULTCOLOR); +} +#endif + /******************************************************************************/ /*** handleMessageWindowKeyDown() /******************************************************************************/ @@ -852,7 +929,11 @@ W_SetWindowKeyDownHandler (warnw, handleMessageWindowKeyDown); +#ifdef PARADISE + planetw = W_MakeTextWindow ("planet", TWINSIDE + 2 * THICKBORDER + 10, 10, 70, MAXPLANETS + 8, baseWin, 2); +#else planetw = W_MakeTextWindow ("planet", TWINSIDE + 2 * THICKBORDER + 10, 10, 57, MAXPLANETS + 3, baseWin, 2); +#endif W_SetWindowExposeHandler (planetw, planetlist); rankw = W_MakeTextWindow ("rank", 10, 300, 80, NUMRANKS + 9, baseWin, 2); @@ -1149,6 +1230,9 @@ rotatePlanets = booleanDefault ("rotatePlanets", rotatePlanets); loadplanetsC(); // Always load new color planet bitmaps..for now loadmplanetsC(); +#ifdef PARADISE + loadparadisethings(); +#endif switch (planetBitmap) // Case 3 = new color, but we never use Planlib { case 1: @@ -1196,6 +1280,9 @@ loadbitmapsM(); break; } +#ifdef PARADISE + loadbitmapsParadise(); +#endif } else /* Load all bitmaps */ { @@ -1205,6 +1292,9 @@ loadbitmapsT(); loadbitmapsM(); loadbitmapsHR(); +#ifdef PARADISE + loadbitmapsParadise(); +#endif } #ifdef BEEPLITE @@ -1535,6 +1625,13 @@ updatedeath (); if (W_IsMapped (playerw)) UpdatePlayerList (); +#ifdef PARADISE + if (newMotdStuff) + { + showMotdWin (w, line); + //showValues(mapw); + } +#endif showTimeLeft (elapsed, autoQuit); lasttime = time (0); } @@ -1605,6 +1702,29 @@ case 'o': *s_type = STARBASE; break; +#ifdef PARADISE + case 'j': + *s_type = JUMPSHIP; + break; + case 'f': + *s_type = FLAGSHIP; + break; + case 'w': + *s_type = WARBASE; + break; + case 'l': + *s_type = LIGHTCRUISER; + break; + case 'v': + *s_type = CARRIER; + break; + case 'u': + *s_type = UTILITY; + break; + case 'p': + *s_type = PATROL; + break; +#endif case ' ': switch (me->p_team) { @@ -1653,10 +1773,10 @@ resetting = 1; break; case 'f': /* Scroll motd forward */ - line = line + 28; + line = line + LINESPERPAGE; if (line > MaxMotdLine) { - line = line - 28; + line = line - LINESPERPAGE; break; } W_ClearWindow (w); @@ -1665,13 +1785,14 @@ case 'b': /* Scroll motd backward */ if (line == 0) break; - line = line - 28; + line = line - LINESPERPAGE; if (line < 0) line = 0; W_ClearWindow (w); showMotdWin (w, line); break; - case 'F': /* Scroll motd forward */ +#ifndef PARADISE /* Paradise MOTD requires paging */ + case 'F': /* Scroll motd a bit forwards */ line = line + 4; if (line > MaxMotdLine) { @@ -1681,7 +1802,7 @@ W_ClearWindow (w); showMotdWin (w, line); break; - case 'B': /* Scroll motd backward */ + case 'B': /* Scroll motd a bit backwards */ if (line == 0) break; line = line - 4; @@ -1690,6 +1811,7 @@ W_ClearWindow (w); showMotdWin (w, line); break; +#endif } } /* No break, we just fall through */ @@ -1942,18 +2064,30 @@ int count; char buf[128]; +#ifdef PARADISE + newMotdStuff = 0; /* clear the flag */ +#endif + sprintf (buf, "--- %s ---", (char *) query_cowid ()); length = strlen (buf); center = TWINSIDE / 2 - (length * W_Textwidth) / 2; +#ifndef PARADISE /* no space for client header in paradise */ W_WriteText (motdwin, center, W_Textheight, textColor, buf, length, W_BoldFont); +#endif sprintf (buf, CBUGS); length = strlen (buf); center = TWINSIDE / 2 - (length * W_Textwidth) / 2; +#ifndef PARADISE /* no space for client header in paradise */ W_WriteText (motdwin, center, 3 * W_Textheight, textColor, buf, length, W_RegularFont); +#endif +#ifdef PARADISE + top = 0; +#else top = 10; +#endif if (first) { @@ -1977,7 +2111,8 @@ } data = data->next; } - count = 28; /* Magical # of lines to + + count = LINESPERPAGE; /* Magical # of lines to * display */ for (i = top; i < 50; i++) { @@ -2000,10 +2135,50 @@ if (count <= 0) break; } - +#ifdef PARADISE + if (motdwin == w) { + W_WriteText(mapw, GWINSIDE/2 - W_Textwidth * strlen(blk_refitstring) / 2, GWINSIDE - 20, textColor, blk_refitstring, + strlen(blk_refitstring), W_RegularFont); + } + showPics(motdwin, atline); +#endif showValues (data); } +/******************************************************************************/ +/*** showPics() */ +/******************************************************************************/ +#ifdef PARADISE +static void +showPics(W_Window win, int atline) +{ + struct piclist *temp; + + temp = motdPics; + + while (temp != NULL) { + if (atline/LINESPERPAGE == temp->page) { /* hack for paging not working */ + if (temp->thepic) + W_WriteBitmap(temp->x, temp->y, temp->thepic, foreColor, win); + else { + W_MakeLine(win, temp->x, temp->y, + temp->x + temp->width - 1, temp->y + temp->height - 1, W_Grey); + W_MakeLine(win, temp->x, temp->y + temp->height - 1, + temp->x + temp->width - 1, temp->y, W_Grey); + W_MakeLine(win, temp->x, temp->y, + temp->x + temp->width - 1, temp->y, W_Grey); + W_MakeLine(win, temp->x, temp->y, + temp->x, temp->y + temp->height - 1, W_Grey); + W_MakeLine(win, temp->x, temp->y + temp->height - 1, + temp->x + temp->width - 1, temp->y + temp->height - 1, W_Grey); + W_MakeLine(win, temp->x + temp->width - 1, temp->y + temp->height - 1, + temp->x + temp->width - 1, temp->y, W_Grey); + } + } + temp = temp->next; + } +} +#endif /******************************************************************************/ /*** showValues() @@ -2028,7 +2203,11 @@ W_WriteText (mapw, 20, 14 * W_Textheight, textColor, msg, strlen (msg), W_RegularFont); +#ifdef PARADISE + for (i = 16; i < 50; i++) +#else for (i = 16; i < 50; i += 2) +#endif { if (data == NULL) break; @@ -2072,6 +2251,29 @@ static struct list **temp = &motddata; static int statmode = 0; /* ATM */ +#ifdef PARADISE + /* Inlined blk_parsemotd() paradise client function */ + if (strncmp("BLK: ", line, 5) == 0) { + /* See if it's a refit string.*/ + if (strncmp(&line[5], "REFIT", 5) == 0) { + strncpy(blk_refitstring, &line[10], 79); + blk_refitstring[79] = '\0'; + } + /* Check to see if it's a borgish feature being enabled. */ + else if (strncmp(&line[5], "BORGISH ", 8) == 0) { + if (strncmp(&line[13], "FRCLOAK", 7) == 0) + blk_friendlycloak = 1; + } + return; + } + if ( strncmp("\t@@b", line, 4) == 0) // Between pages + return; + /*if (!currpage || + (pagecount - 1) == currpage->page || + motdlinestate == IN_SYSDEF) */ + newMotdStuff = 1; /* set flag for event loop */ + first = 1; /* check for bold again */ +#endif if (!statmode && !strcmp (line, STATUS_TOKEN)) statmode = 1; if (!statmode) @@ -2097,6 +2299,41 @@ temp = &((*temp)->next); } +#ifdef PARADISE +/******************************************************************************/ +/*** newMotdPic() +/******************************************************************************/ +void +newMotdPic(int x, int y, int width, int height, char *bits, int page) +{ + struct piclist *tmp; + struct motd_pic_spacket dummy; + + if ((width + 7) / 8 * height > sizeof(dummy.bits) && bits) + { + LineToConsole("MOTD picture from server is too big! %dx%d couldn't possibly fit in the %d data bytes of the packet\n", + width, height, (int) sizeof(dummy.bits)); + return; + } + + if ((currpage && page == currpage->page) || page == 0) + { + newMotdStuff = 1; /* set flag for event loop */ + first = 1; /* check for bold again */ + } + + tmp = (*motd_buftail) = (struct piclist *) malloc(sizeof(struct piclist)); + tmp->next = NULL; + tmp->x = x; + tmp->y = y - 112; /* 112 is magic number of height of the paradise header + image which we do NOT have */ + tmp->width = width; + tmp->height = height; + tmp->thepic = bits ? W_StoreBitmap(width, height, bits, w) : 0; + tmp->page = page; + motd_buftail = &(tmp->next); +} +#endif /******************************************************************************/ /*** getResources() Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- input.c 16 May 2007 00:05:15 -0000 1.39 +++ input.c 17 May 2007 08:49:48 -0000 1.40 @@ -1292,6 +1292,43 @@ localflags &= ~(PFREFIT); return; break; +#ifdef PARADISE + case 'j': + sendRefitReq (JUMPSHIP); + localflags &= ~(PFREFIT); + return; + break; + case 'f': + sendRefitReq (FLAGSHIP); + localflags &= ~(PFREFIT); + return; + break; + case 'w': + sendRefitReq (WARBASE); + localflags &= ~(PFREFIT); + return; + break; + case 'l': + sendRefitReq (LIGHTCRUISER); + localflags &= ~(PFREFIT); + return; + break; + case 'v': + sendRefitReq (CARRIER); + localflags &= ~(PFREFIT); + return; + break; + case 'u': + sendRefitReq (UTILITY); + localflags &= ~(PFREFIT); + return; + break; + case 'p': + sendRefitReq (PATROL); + localflags &= ~(PFREFIT); + return; + break; +#endif default: localflags &= ~(PFREFIT); return; Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- local.c 14 May 2007 02:56:41 -0000 1.101 +++ local.c 17 May 2007 08:49:48 -0000 1.102 @@ -38,6 +38,9 @@ static int clearline[4][MAXPLAYER + 2 * MAXPLAYER]; #endif static int planet_frame = 0; +#ifdef PARADISE +static int star_frame = 0; +#endif static int star_updates = 0; static int last_speed = 0; static int streaks_on = 0; @@ -129,10 +132,10 @@ if (TWINSIDE == 0) return; - imax = 5 * STARSIDE / TWINSIDE + 1; + imax = 10 * STARSIDE / TWINSIDE + 1; if (imax > MAXSECTORS) imax = MAXSECTORS; - jmax = 5 * STARSIDE / TWINSIDE + 1; + jmax = 10 * STARSIDE / TWINSIDE + 1; if (jmax > MAXSECTORS) jmax = MAXSECTORS; kmax = 16 * TWINSIDE / STARSIDE * TWINSIDE / STARSIDE; @@ -545,7 +548,29 @@ dx = dx / scaleFactor + TWINSIDE / 2; dy = dy / scaleFactor + TWINSIDE / 2; - + +#ifdef PARADISE + if (PL_TYPE(*l) == PLSTAR) + { + int j = star_frame * 10 / server_ups; + if ((j >= STAR_VIEWS - 1) || (j < 0)) + { + j = 0; + star_frame = 0; + } + W_WriteScaleBitmap (dx - (BMP_STAR_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_STAR_HEIGHT / 2) * SCALE / scaleFactor, + BMP_STAR_WIDTH * SCALE / scaleFactor, + BMP_STAR_HEIGHT * SCALE / scaleFactor, + BMP_STAR_WIDTH, + BMP_STAR_HEIGHT, + 0, + star_bitmap[j], + planetColor (l), + w); + } + else +#endif if (planetBitmap == 3) { W_WriteScaleBitmap (dx - (BMP_PLANET_WIDTH / 2) * SCALE / scaleFactor, @@ -553,8 +578,8 @@ BMP_PLANET_WIDTH * SCALE / scaleFactor, BMP_PLANET_HEIGHT * SCALE / scaleFactor, BMP_CPLANET_WIDTH, - BMP_CPLANET_HEIGHT, - 0, + BMP_CPLANET_HEIGHT, + 0, planetBitmapC (l), planetColor (l), w); @@ -573,7 +598,7 @@ BMP_PLANET_WIDTH * SCALE / scaleFactor, BMP_PLANET_HEIGHT * SCALE / scaleFactor, BMP_PLANET_WIDTH, - BMP_PLANET_HEIGHT, + BMP_PLANET_HEIGHT, 0, getPlanetBitmap (l), planetColor (l), @@ -614,6 +639,9 @@ /* Allow army display if player/observer is orbitting a planet, or alternatively if observer is locked onto a planet, or is show_army_count feature packet is on */ if ((showArmy == 1 || showArmy == 3) && (l->pl_info & me->p_team) +#ifdef PARADISE + && (PL_TYPE(*l) != PLSTAR) +#endif && (F_show_army_count || ( (me->p_flags & PFORBIT) && (F_sp_generic_32 ? me->pl_orbit : get_closest_planet(me->p_x, me->p_y)) == l->pl_no) || ((me->p_flags & PFPLLOCK) && (me->p_flags & PFOBSERV) && (me->p_planet == l->pl_no)) )) @@ -669,6 +697,9 @@ clearcount++; } planet_frame++; +#ifdef PARADISE + star_frame++; +#endif } @@ -719,6 +750,7 @@ int dx, dy, px, py, wx, wy, tx, ty, lx, ly; int new_dx, new_dy; int startx, starty, endx, endy; + int type; W_Icon (*ship_bits)[SHIP_VIEWS]; W_Icon (*ship_bitsHR); @@ -1021,6 +1053,49 @@ } } + type = j->p_ship.s_type; +#ifdef PARADISE + // We missing paradise bitmaps? + if (noParadiseBitmaps) + type = CRUISER; + // If it's a paradise ship, we only have 1 bitmap set + // so let's use it, rotating bitmaps realtime. + if (type >= PARADISE_SHIP_OFFSET) + { + int pos; + + switch (j->p_team) + { + case FED: + pos = 0; + break; + case ROM: + pos = 4; + break; + case KLI: + pos = 2; + break; + case ORI: + pos = 3; + break; + default: // Ind + pos = 1; + break; + } + W_WriteScaleBitmap (dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor, + dy - (j->p_ship.s_height / 2) * SCALE / scaleFactor, + j->p_ship.s_width * SCALE / scaleFactor, + j->p_ship.s_height * SCALE / scaleFactor, + BMP_SHIP_WIDTH, + BMP_SHIP_HEIGHT, + (360 * j->p_dir/255), + paradise_ships[type - PARADISE_SHIP_OFFSET][pos], + playerColor (j), + w); + } + else + { +#endif if (colorClient != 4) { W_WriteScaleBitmap (dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor, @@ -1033,8 +1108,8 @@ // pointing up position. If not, find the correct bitmap in // the ship rosette and set angle to 0. fullBitmapRotation ? (360 * j->p_dir/255) : 0, - fullBitmapRotation ? ship_bits[j->p_ship.s_type][0] : - ship_bits[j->p_ship.s_type][rosette (j->p_dir)], + fullBitmapRotation ? ship_bits[type][0] : + ship_bits[type][rosette (j->p_dir)], playerColor (j), w); } @@ -1047,10 +1122,13 @@ BMP_SHIP_WIDTH_HR, BMP_SHIP_HEIGHT_HR, (360 * j->p_dir/255), // Converted to angle - ship_bitsHR[j->p_ship.s_type], + ship_bitsHR[type], playerColor (j), w); } +#ifdef PARADISE + } +#endif /* If the ship is not yet fully cloaked, draw the cloak icon on top of the ship icon */ @@ -1601,12 +1679,19 @@ } else { +#ifdef PARADISE + /* Paradise servers changed the ship cap protocol for + phaser damage :( */ + tx = (int) (j->p_ship.s_phaserdamage * Cos[php->ph_dir]); + + ty = (int) (j->p_ship.s_phaserdamage * Sin[php->ph_dir]); +#else tx = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * Cos[php->ph_dir]); ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * Sin[php->ph_dir]); - +#endif tx = (j->p_x + tx - me->p_x) / scaleFactor + TWINSIDE / 2; ty = (j->p_y + ty - me->p_y) / scaleFactor + TWINSIDE / 2; } Index: findslot.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/findslot.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- findslot.c 13 Apr 2007 07:12:24 -0000 1.9 +++ findslot.c 17 May 2007 08:49:48 -0000 1.10 @@ -33,6 +33,10 @@ #define WAITTITLE 15 /* height of title for wait * window */ +#ifdef PARADISE +extern int newMotdStuff; /* from newwin.c */ +#endif + /******************************************************************************/ /*** mapWaitWin() ***/ /******************************************************************************/ @@ -157,6 +161,10 @@ LineToConsole ("Damn, We've been ghostbusted!\n"); terminate (0); } +#ifdef PARADISE + if (newMotdStuff) + showMotdWin(motdWin, WaitMotdLine); +#endif while (W_EventsPending ()) { W_NextEvent (&event); Index: planetlist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/planetlist.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- planetlist.c 17 Mar 2007 01:21:49 -0000 1.7 +++ planetlist.c 17 May 2007 08:49:49 -0000 1.8 @@ -18,6 +18,11 @@ #include "data.h" #include "proto.h" +/* Prototypes */ +#ifdef PARADISE +static void planet_list_paradise (void); +static void print_planet (W_Window wind, int line, struct planet * ); +#endif static char priorplanets[MAXPLANETS][BUFSIZ]; int planet_row[MAXPLANETS]; /* planets location in current plist */ @@ -39,6 +44,12 @@ void planetlist (void) { +#ifdef PARADISE + if (paradise) + planet_list_paradise(); + else + { +#else register int i; char buf[BUFSIZ]; @@ -51,8 +62,197 @@ for (i = 0; i < MAXPLANETS; i++) strcpy(priorplanets[i], ""); updatePlanetw (); +#endif +#ifdef PARADISE + } +#endif +} + +#ifdef PARADISE +int mask_to_idx(int m) +{ + switch(m) { + case NOBODY: + return -1; + case FED: + return 0; + case ROM: + return 1; + case KLI: + return 2; + case ORI: + return 3; + default: + return number_of_teams; + } } +/*This function provides the planet list for a paradise server version 2.0 */ +static void planet_list_paradise (void) +{ + typedef struct planet *plptr; + + int k = 0; /* for row number */ + int i, team_pnum; /* looping var */ + plptr j; /* to point to a planet */ + char buf[100]; /* to sprintf into */ + W_Window wind; + extern int number_of_teams; + plptr **team_p; + int *team_pcount; + + wind = planetw; + + /* this malloc stuff will handle any number of teams/races */ + + /* team's planet counters */ + team_pcount = (int *) malloc((number_of_teams + 2) * sizeof(int)); + for (i = 0; i < number_of_teams + 2; i++) + team_pcount[i] = 0; + + if (sortPlanets) { + /* make some memory */ + team_p = (plptr **) malloc((number_of_teams + 2) * sizeof(struct planet *)); + for (i = 0; i < (number_of_teams + 2); i++) + team_p[i] = (plptr *) malloc(nplanets * sizeof(struct planet *)); + + /* loop thru and put proper team planeter point on each planet */ + for (i = 0, j = &planets[i]; i < nplanets; i++, j++) { + k = mask_to_idx(j->pl_owner) + 1; /* which team gets planet */ + team_p[k][team_pcount[k]] = j; + team_pcount[k]++; + } + + /* go thru each teams planet list and display */ + for (i = 0, k = 0; i < (number_of_teams + 2); i++) { + for (team_pnum = 0; team_pnum < team_pcount[i]; team_pnum++, k++) { + + j = team_p[i][team_pnum]; + /* (nplanets+13)/2 is the height of window; from newwin.c */ + if (k == 0 || k >= ((nplanets + 13) / 2)) { + if (k != 0) + continue; + //wind = planetw2; + sprintf(buf, "Planet name sctr own armies RESOURCES SURFC ATMOS VISIT TIME"); + W_WriteText(wind, 2, 1, textColor, buf, strlen(buf), + W_RegularFont); + k = 2; + } + print_planet(wind, k, j); + } /* end of 2nd for */ + if (team_pcount[i] > 0) + k++; + } /* end of 1st for */ + + for (i = 0; i < (number_of_teams + 2); i++) + free(team_p[i]); + free(team_p); + } else { /* do the original alpa only sort planet list */ + + for (i = 0, j = &planets[i]; i < nplanets; i++, j++, k++) { + if (i == 0 || i == nplanets / 2) { + + sprintf(buf, "Planet name sctr own armies RESOURCES SURFC ATMOS VISIT TIME"); + + if (i != 0) { + continue; + //wind = planetw2; + } + W_WriteText(wind, 2, 1, textColor, buf, strlen(buf), + W_RegularFont); + k = 2; + } + team_pcount[mask_to_idx(j->pl_owner) + 1]++; + print_planet(wind, k, j); + } + } + + k++; + for (i = 0; i < (number_of_teams + 1); i++) { + W_Color cur_color; + + cur_color = shipCol[i]; + //sprintf(buf, "%s: ", teaminfo[i-1].shortname); + sprintf(buf, "%s : ", teamname[i]); + W_WriteText(wind, i * 7 + 2, k, cur_color, buf, strlen(buf), + W_RegularFont); + sprintf(buf, " %-2d", team_pcount[i]); + W_WriteText(wind, i * 7 + 2, k + 1, cur_color, buf, strlen(buf), + W_RegularFont); + } + + free(team_pcount); + +} /* end of planet_list_paradise */ + +/****************************** print_planet() ************************/ +static void print_planet (W_Window wind, int line, struct planet *j) +{ + char buf[100]; /* to sprintf into */ + + sprintf(buf, "%-16s %d-%d", j->pl_name, (j->pl_x / GRIDSIZE) + 1, + (j->pl_y / GRIDSIZE) + 1); + W_WriteText(wind, 2, line, textColor, buf, strlen(buf), + W_RegularFont); + + if (j->pl_info & me->p_team) { + if (PL_TYPE(*j) == PLSTAR) { /* if planet actually a star */ + W_WriteText(wind, 24, line, textColor, "---S T A R---", 13, + W_RegularFont); + } else if (PL_TYPE(*j) == PLWHOLE) { /* if wormhole... */ + W_WriteText(wind, 24, line, textColor, "---W O R M H O L E---", 21, + W_RegularFont); + } else { /* else planet not a star */ + char *s = NULL; + + switch (j->pl_flags & PLATMASK) { + case PLPOISON: + s = "TOXC"; + break; + case PLATYPE3: + s = "TNTD"; + break; + case PLATYPE2: + s = "THIN"; + break; + case PLATYPE1: + s = "STND"; + break; + }; + sprintf(buf, "%3s %3d %c%c%c%c %c%c%c %4s", + teamname[j->pl_owner], + //teaminfo[mask_to_idx(j->pl_owner)].shortname, + j->pl_armies, + (j->pl_flags & PLREPAIR ? 'R' : ' '), + (j->pl_flags & PLFUEL ? 'F' : ' '), + (j->pl_flags & PLAGRI ? 'A' : ' '), + (j->pl_flags & PLSHIPYARD ? 'S' : ' '), + (j->pl_flags & PLDILYTH ? 'D' : ' '), + (j->pl_flags & PLMETAL ? 'M' : ' '), + (j->pl_flags & PLARABLE ? 'A' : ' '), + s); + + W_WriteText(wind, 24, line, planetColor(j), buf, strlen(buf), + planetFont(j)); + + sprintf(buf, "%c%c%c%c %3ld", /* Remove team_bit_string reference */ + (j->pl_info & FED ? 'F' : ' '), + (j->pl_info & ROM ? 'R' : ' '), + (j->pl_info & KLI ? 'K' : ' '), + (j->pl_info & ORI ? 'O' : ' '), + (me->p_team == j->pl_owner ? 0 : (status2->clock - j->pl_timestamp))); + + W_WriteText(wind, 64, line, planetColor(j), buf, strlen(buf), + planetFont(j)); + } + } else { + sprintf(buf, "--- No info; Scout me ---"); + W_WriteText(wind, 24, line, textColor, buf, strlen(buf), + W_RegularFont); + } +} /* end of print_planet */ +#endif + /* Update only lines that have changed */ void updatePlanetw (void) Index: death.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/death.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- death.c 28 Apr 2007 12:09:51 -0000 1.19 +++ death.c 17 May 2007 08:49:48 -0000 1.20 @@ -122,6 +122,14 @@ shipnos[me->p_whodead]); break; case KPLANET: +#ifdef PARADISE + /* different message if killed by a star [BDyess] */ + if(planets[me->p_whodead].pl_flags && PLSTAR) + sprintf (deathmessage, + "You were burned to a crisp by %s [star]", + planets[me->p_whodead].pl_name); + else +#endif sprintf (deathmessage, "You were killed by planetary fire from %s (%c).", planets[me->p_whodead].pl_name, @@ -217,12 +225,30 @@ case KBADBIN: strcpy (deathmessage, "Your netrek executable didn't verify correctly."); break; +#ifdef PARADISE + /* Unfortunately the numbering of whydead messages is inconsistent between + paradise and Vanilla */ + case KMISSILE: + sprintf (deathmessage, "You were killed by a missile from %s (%c%c).", + players[me->p_whodead].p_name, + teamlet[players[me->p_whodead].p_team], + shipnos[me->p_whodead]); + break; +#else case KTORP2: strcpy (deathmessage, "You were killed by detonated torpedo."); break; +#endif +#ifdef PARADISE + case KASTEROID: + /* asteroid death [BDyess] */ + sprintf(deathmessage, "You were smashed to bits by an asteroid."); + break; +#else case KSHIP2: strcpy (deathmessage, "You were killed by chain reaction explosion."); break; +#endif case KPLASMA2: strcpy (deathmessage, "You were killed by zapped plasma."); break; Index: playerlist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playerlist.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- playerlist.c 16 Mar 2007 01:44:24 -0000 1.12 +++ playerlist.c 17 May 2007 08:49:49 -0000 1.13 @@ -106,8 +106,13 @@ static int plistPos[MAXPLAYER]; static int plistWidth = 0; static int plist2Width = 0; +#ifdef PARADISE +static char *my_classes[NUM_TYPES] = { + "SC", "DD", "CA", "BB", "AS", "SB", "GA", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" }; +#else static char *my_classes[NUM_TYPES] = { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" }; +#endif /* Local Functions */ Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- socket.c 16 May 2007 00:05:16 -0000 1.32 +++ socket.c 17 May 2007 08:49:49 -0000 1.33 @@ -945,7 +945,7 @@ #ifdef PARADISE case SP_GPARAM: switch ((unsigned char) bufptr[1]) { -/* case 0: + case 0: size = sizeof(struct gp_sizes_spacket); break; case 1: @@ -968,11 +968,12 @@ break; case 7: size = sizeof(struct gp_teamplanet_spacket); - break;*/ + break; default: size = 0; break; } + break; case SP_PARADISE_EXT1: switch ((unsigned char) bufptr[1]) { case SP_PE1_MISSING_BITMAP: @@ -985,6 +986,7 @@ size = 0; break; } + break; #endif case SP_S_MESSAGE: size = ((unsigned char) bufptr[4]); /* IMPORTANT Changed */ @@ -1912,6 +1914,10 @@ handleLogin (struct login_spacket *packet) { loginAccept = packet->accept; +#ifdef PARADISE + if ((packet->pad2 == 69) && (packet->pad3 == 42)) + paradise = 1; +#endif if (packet->accept) { /* no longer needed .. we have it in xtrekrc bcopy(packet->keymap, @@ -2526,7 +2532,7 @@ pl->pl_y = ntohl (packet->y); strcpy (pl->pl_name, packet->name); pl->pl_namelen = strlen (packet->name); - pl->pl_flags |= (PLREDRAW | PLCLEAR); + pl->pl_flags |= PLREDRAW; reinitPlanets = 1; #ifdef ROTATERACE @@ -2719,7 +2725,7 @@ height = ntohs(packet->height); page = ntohs(packet->page); - //newMotdPic(x, y, width, height, (char *) packet->bits, page); + newMotdPic(x, y, width, height, (char *) packet->bits, page); } void handleStats2 (struct stats_spacket2 *packet) @@ -2805,7 +2811,7 @@ return; } #endif -/* + if(first_planet_packet) { first_planet_packet = 0; @@ -2832,7 +2838,7 @@ if (infomapped && infotype == PLANETTYPE && ((struct planet *) infothing)->pl_no == packet->pnum) infoupdate = 1; -*/ + } void handleTerrainInfo2 (struct terrain_info_packet2 *pkt) @@ -3092,38 +3098,294 @@ } } +void handleGPsizes (struct gp_sizes_spacket *pkt) +{ +/* + free_ranks(); + free_royal(); + + free_teams(); + free_torps(); + free_phasers(); + free_plasmas(); + free_thingies(); + + nplayers = pkt->nplayers; + number_of_teams = pkt->nteams; + // shiptypes + nranks2 = pkt->nranks; + nroyals = pkt->nroyal; + nphasers = pkt->nphasers; + ntorps = pkt->ntorps; + nplasmas = pkt->nplasmas; + npthingies = pkt->nthingies; + ngthingies = pkt->gthingies; + + // gwidth + // flags + + load_generic_teams(); + + reinit_ranks(); + reinit_royal(); + + resize_players(); + initialize_torps(); + initialize_phasers(); + initialize_plasmas(); + initialize_thingies(); +*/ +} + +void handleGPteam (struct gp_team_spacket *pkt) +{ +/* + struct teaminfo_s *currteam; + + if ((int) pkt->index >= number_of_teams) { + fprintf(stderr, "Team #%d %s is out of range (0..%d)\n", pkt->index, + pkt->teamname, number_of_teams); + return; + } + currteam = &teaminfo[pkt->index]; + + currteam->letter = pkt->letter; + + strncpy(currteam->shortname, pkt->shortname, 3); + currteam->shortname[3] = 0; + + strncpy(currteam->name, pkt->teamname, sizeof(currteam->name) - 1); + currteam->name[sizeof(currteam->name) - 1] = 0; +*/ +} + +void handleGPteamlogo (struct gp_teamlogo_spacket *pkt) +{ +/* + static char buf[13 * 99]; // 99x99 + static int curr_height = 0; + static int lwidth, lheight; + static int teamindex; + int pwidth; + + if ((unsigned) pkt->teamindex >= number_of_teams) { + fprintf(stderr, "Team #%d is out of range (0..%d)\n", pkt->teamindex, + number_of_teams); + return; + } + if (pkt->y != curr_height) { + fprintf(stderr, "Bad gp_teamlogo packet sequence y(%d) != curr_height(%d)\n", + pkt->y, curr_height); + curr_height = 0; + return; + } + if (curr_height) { + if (lwidth != pkt->logowidth || lheight != pkt->logoheight || + teamindex != pkt->teamindex) { + fprintf(stderr, "gp_teamlogo packet sequence error, %d!=%d || %d!=%d || %d!=%d\n", + lwidth, pkt->logowidth, lheight, pkt->logoheight, + teamindex, pkt->teamindex); + curr_height = 0; + return; + } + } else { + teamindex = pkt->teamindex; + lwidth = pkt->logowidth; + lheight = pkt->logoheight; + if (lwidth > 99 || lheight > 99) { + fprintf(stderr, "logo too big (%dx%d), rejecting\n", lwidth, lheight); + curr_height = 0; + return; + } + } + pwidth = (lwidth - 1) / 8 + 1; + memcpy(buf + pwidth * curr_height, pkt->data, + (unsigned int)(pwidth * pkt->thisheight)); + curr_height += pkt->thisheight; + + if (curr_height >= lheight) { + W_FreeImage(teaminfo[teamindex].shield_logo); + teaminfo[teamindex].shield_logo = + W_BitmapToImage(lwidth, lheight, buf); + curr_height = 0; + } +*/ +} + +void handleGPshipshape (struct gp_shipshape_spacket *pkt) +{ +/* + if (pkt->race < -1 || pkt->race >= number_of_teams) { + fprintf(stderr, "race #%d out of range (-1..%d)\n", pkt->race, + number_of_teams - 1); + return; + } + if ( (int) pkt->shipno >= nshiptypes) { + fprintf(stderr, "ship class #%d out of range (0..%d)\n", pkt->shipno, + nshiptypes - 1); + return; + } +#ifdef FIXME + replace_shipshape(pkt->race, pkt->shipno, pkt->nviews, + pkt->width, pkt->height); +#endif +*/ +} + +void handleGPshipbitmap (struct gp_shipbitmap_spacket *pkt) +{ +/* + if (pkt->race < -1 || pkt->race >= number_of_teams) { + fprintf(stderr, "race #%d out of range (-1..%d)\n", pkt->race, + number_of_teams - 1); + return; + } + if ( (int) pkt->shipno >= nshiptypes) { + fprintf(stderr, "ship class #%d out of range (0..%d)\n", pkt->shipno, + nshiptypes - 1); + return; + } +#ifdef FIXME + replace_ship_bitmap(pkt->race, pkt->shipno, pkt->thisview, pkt->bitmapdata); +#endif +*/ +} + +void handleGPrank (struct gp_rank_spacket *pkt) +{ +/* + struct rank2 *curr; + if (pkt->rankn >= nranks2) { + fprintf(stderr, "rank #%d %s out of range (0..%d)\n", pkt->rankn, + pkt->name, nranks2 - 1); + return; + } + curr = &ranks2[pkt->rankn]; + free(curr->name); + + curr->genocides = htonl(pkt->genocides); + curr->di = htonl(pkt->milliDI) / 1000.0; + curr->battle = htonl(pkt->millibattle) / 1000.0; + curr->strategy = htonl(pkt->millistrat) / 1000.0; + curr->specship = htonl(pkt->millispec) / 1000.0; + curr->name = strdup(pkt->name); +*/ +} + +void handleGProyal (struct gp_royal_spacket *pkt) +{ +/* + if ((int) pkt->rankn >= nroyals) { + fprintf(stderr, "Royalty #%d %s out of range (0..%d)\n", pkt->rankn, + pkt->name, nroyals - 1); + return; + } + free(royal[pkt->rankn].name); + royal[pkt->rankn].name = strdup(pkt->name); +*/ +} + +#ifdef FIXME +static unsigned char mplanet_bits[] = { + 0xe0, 0x03, 0x18, 0x0c, 0x04, 0x10, 0x02, 0x20, 0x02, 0x20, 0x01, 0x40, + 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x02, 0x20, 0x02, 0x20, +0x04, 0x10, 0x18, 0x0c, 0xe0, 0x03, 0x00, 0x00}; +static unsigned char planet_bits[] = { + 0x00, 0xf8, 0x03, 0x00, 0x00, 0x07, 0x1c, 0x00, 0xc0, 0x00, 0x60, 0x00, + 0x20, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x02, + 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x08, + 0x02, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x10, + 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, + 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, + 0x02, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x08, + 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00, 0x02, + 0x10, 0x00, 0x00, 0x01, 0x20, 0x00, 0x80, 0x00, 0xc0, 0x00, 0x60, 0x00, +0x00, 0x07, 0x1c, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}; +#endif + +void handleGPteamplanet (struct gp_teamplanet_spacket *pkt) +{ +/* +#ifdef FIXME + { +#define TACTICALSIZE sizeof(pkt->tactical) + unsigned char tactical[TACTICALSIZE]; + int i; + int race = pkt->teamn; + + if (race < -1 || race >= number_of_teams) { + fprintf(stderr, "race #%d out of range (-1..%d)\n", race, + number_of_teams - 1); + return; + } + for (i = 0; i < TACTICALSIZE; i++) { + tactical[i] = (pkt->tactical[i] & pkt->tacticalM[i]) | + (planet_bits[i] & ~pkt->tacticalM[i]); + } + + W_FreeImage(bplanets[race + 1]); + bplanets[race + 1] = W_BitmapToImage(30, 30, tactical); + +#undef TACTICALSIZE + } + + { +#define GALACTICSIZE sizeof(pkt->galactic) + unsigned char galactic[GALACTICSIZE]; + int i; + int race = pkt->teamn; + + if (race < -1 || race >= number_of_teams) { + fprintf(stderr, "race #%d out of range (-1..%d)\n", race, + number_of_teams - 1); + return; + } + for (i = 0; i < GALACTICSIZE; i++) { + galactic[i] = (pkt->galactic[i] & pkt->galacticM[i]) | + (mplanet_bits[i] & ~pkt->galacticM[i]); + } + + W_FreeImage(mbplanets[race + 1]); + mbplanets[race + 1] = W_BitmapToImage(16, 16, galactic); + +#undef GALACTICSIZE + } +#endif +*/ +} + void handleGameparams (struct gameparam_spacket *packet) { - /*switch (pkt->subtype) { + switch (packet->subtype) { case 0: - handleGPsizes((struct gp_sizes_spacket *) pkt); + handleGPsizes ((struct gp_sizes_spacket *) packet); break; case 1: - handleGPteam((struct gp_team_spacket *) pkt); + handleGPteam ((struct gp_team_spacket *) packet); break; case 2: - handleGPteamlogo((struct gp_teamlogo_spacket *) pkt); + handleGPteamlogo ((struct gp_teamlogo_spacket *) packet); break; case 3: - handleGPshipshape((struct gp_shipshape_spacket *) pkt); + handleGPshipshape ((struct gp_shipshape_spacket *) packet); break; case 4: - handleGPshipbitmap((struct gp_shipbitmap_spacket *) pkt); + handleGPshipbitmap ((struct gp_shipbitmap_spacket *) packet); break; case 5: - handleGPrank((struct gp_rank_spacket *) pkt); + handleGPrank ((struct gp_rank_spacket *) packet); break; case 6: - handleGProyal((struct gp_royal_spacket *) pkt); + handleGProyal ((struct gp_royal_spacket *) packet); break; case 7: - handleGPteamplanet((struct gp_teamplanet_spacket *) pkt); + handleGPteamplanet ((struct gp_teamplanet_spacket *) packet); break; default: - fprintf(stderr, "Gameparams packet subtype %d not yet implemented\n", - pkt->subtype); - }*/ + LineToConsole("Gameparams packet subtype %d not yet implemented\n", packet->subtype); + } } + #endif /* PARADISE*/ /* UDP stuff */ Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- data.c 16 May 2007 00:05:15 -0000 1.92 +++ data.c 17 May 2007 08:49:48 -0000 1.93 @@ -273,6 +273,29 @@ extern double Sin[], Cos[]; +#ifdef PARADISE +int paradise = 0; /* is the server a paradise server */ +int noParadiseBitmaps = 0; +int gwidth = GWIDTH; /* galaxy width, adjusted for zoom [BDyess] */ +int offsetx = 0; +int offsety = 0; /* offsets when zooming [BDyess] */ +int nplayers = 36; +int nshiptypes = 15; +int ntorps = 8; +int npthingies = 20; +int ngthingies = 0; +int nplasmas = 1; +int nphasers = 1; +int nplanets = MAXPLANETS; /* get this info dyn. from Pserver */ +struct teaminfo_s *teaminfo = NULL; +int number_of_teams = 4; +/* MOTD data */ +struct page *currpage = NULL; +struct page *pmotddata = NULL; +char blk_refitstring[80] = "s=scout, d=destroyer, c=cruiser, b=battleship, a=assault, o=starbase"; +int blk_friendlycloak = 0; /* Show color of cloakers who are friendly. */ +#endif + W_Icon fedteam, romteam, kliteam, oriteam; W_Icon stipple, clockpic, clockhandpic, genopic, genopic2, icon; @@ -317,6 +340,14 @@ W_Icon hull[BMP_HULL_FRAMES]; int vary_hull = 0; +// Paradise bitmaps +#ifdef PARADISE +W_Icon base_star_bitmap; +W_Icon star_bitmap[STAR_VIEWS]; +W_Icon star_mbitmap; +W_Icon paradise_ship_bitmaps; +W_Icon paradise_ships[NUM_PSHIP_TYPES][NUMTEAMS]; +#endif // Ships W_Icon ship_bitmaps[5]; W_Icon fed_bitmaps[NUM_TYPES][SHIP_VIEWS], kli_bitmaps[NUM_TYPES][SHIP_VIEWS], Index: feature.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- feature.c 14 May 2007 02:56:40 -0000 1.18 +++ feature.c 17 May 2007 08:49:48 -0000 1.19 @@ -99,7 +99,11 @@ {"SHOW_CLOAKERS", &F_show_cloakers, 'S', 1, 0, 0}, {"TURN_KEYS", &F_turn_keys, 'S', 1, 0, 0}, {"SHOW_VISIBILITY_RANGE", &F_show_visibility_range, 'S', 1, 0, 0}, +#ifdef PARADISE + {"SP_FLAGS_ALL", &F_sp_flags_all, 'S', 0, 0, 0}, +#else {"SP_FLAGS_ALL", &F_sp_flags_all, 'S', 1, 0, 0}, +#endif {0, 0, 0, 0, 0, 0} }; @@ -285,6 +289,7 @@ } /* Ignore these feature packets for testing purposes */ #if DEBUG + motion_mouse_steering = 1; F_show_army_count = 1; F_show_other_speed = 1; F_show_cloakers = 1; Index: beeplite.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/beeplite.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- beeplite.c 28 Feb 2007 12:21:49 -0000 1.15 +++ beeplite.c 17 May 2007 08:49:48 -0000 1.16 @@ -62,8 +62,6 @@ emph_planet_seq_n[l->pl_no] = beep_lite_cycle_time_planet; l->pl_flags |= PLREDRAW; /* Leave redraw on until * * * done highlighting */ - l->pl_flags |= PLCLEAR; /* Leave redraw on until * * - * done highlighting */ } void liteplayer(struct player *j) Index: inform.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/inform.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- inform.c 14 Mar 2007 18:36:07 -0000 1.4 +++ inform.c 17 May 2007 08:49:48 -0000 1.5 @@ -32,9 +32,15 @@ * There is a different sized window for each type player/planet * and we take * care to keep it from extending beyond the main * window boundaries. */ +#ifdef PARADISE +static char *my_classes[NUM_TYPES] = { + "SC", "DD", "CA", "BB", "AS", "SB", "GA", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" +}; +#else static char *my_classes[NUM_TYPES] = { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" }; +#endif /******************************************************************************/ /*** inform() ***/ Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- map.c 14 May 2007 02:56:41 -0000 1.55 +++ map.c 17 May 2007 08:49:49 -0000 1.56 @@ -38,6 +38,13 @@ #define DETAIL 100 #define SIZE (GWIDTH/DETAIL) +#ifdef PARADISE +int drawgrid = 1; /* goes to netrekrc eventually */ +int blk_zoom = 0; /* goes to netrekrc eventually */ +int sectorNums = 1; /* goes to netrekrc eventually */ +#define DRAWGRID 4 +#endif + /* * Local Variables: @@ -577,12 +584,24 @@ dy - (BMP_MPLANET_HEIGHT / 2 + 4), BMP_MPLANET_WIDTH + 8, BMP_MPLANET_HEIGHT + 8); - l->pl_flags &= ~PLCLEAR; } /* Draw the new planet */ - +#ifdef PARADISE + if (PL_TYPE(*l) == PLSTAR) + W_WriteScaleBitmap (dx - (BMP_MSTAR_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_MSTAR_HEIGHT / 2) * SCALE / scaleFactor, + BMP_MSTAR_WIDTH * SCALE / scaleFactor, + BMP_MSTAR_HEIGHT * SCALE / scaleFactor, + BMP_MSTAR_WIDTH, + BMP_MSTAR_HEIGHT, + 0, + star_mbitmap, + planetColor (l), + mapw); + else +#endif #ifdef BEEPLITE if (useLite && emph_planet_seq_n[l->pl_no] > 0) { @@ -626,8 +645,6 @@ emph_planet_seq_n[l->pl_no] -= 1; l->pl_flags |= PLREDRAW; /* Leave redraw on until * * * done highlighting */ - l->pl_flags |= PLCLEAR; /* Leave redraw on until * * - * done highlighting */ } else { @@ -691,7 +708,13 @@ l->pl_name, 3, planetFont (l)); } - if (F_show_army_count && (showArmy == 2 || showArmy == 3) && (l->pl_info & me->p_team)) + if (F_show_army_count + && (showArmy == 2 || showArmy == 3) + && (l->pl_info & me->p_team) +#ifdef PARADISE + && (PL_TYPE(*l) != PLSTAR) +#endif + ) { char armbuf[4]; int armbuflen; @@ -855,6 +878,11 @@ int viewdist; int view = TWINSIDE * scaleFactor / 2; int mvx, mvy; +#ifdef PARADISE + static int osx = 0, osy = 0; /* old square */ + static int scalex, scaley; + static int grid_fuse; +#endif if (doubleBuffering) W_Win2Mem (mapSDB); @@ -868,6 +896,10 @@ dx = (me->p_x) / (GWIDTH / GWINSIDE); dy = (me->p_y) / (GWIDTH / GWINSIDE); +#ifdef PARADISE + grid_fuse++; /* we only draw the grids every DRAWGRID interval */ +#endif + if (redrawall) { /* @@ -897,8 +929,6 @@ for (l = planets + MAXPLANETS - 1; l >= planets; --l) l->pl_flags |= PLREDRAW; - - redrawall = 0; } else { @@ -971,6 +1001,109 @@ } } +#ifdef PARADISE + /* draw grid on galactic */ + if ((redrawall || (grid_fuse % DRAWGRID) == 0) && (drawgrid)) { + int x, y, width, h, grid; + char numbuf[1]; + int blk_gwidth = GWIDTH; /* hack */ + grid = GRIDSIZE * GWINSIDE / GWIDTH; + for (i = 1; i <= 6 / (blk_zoom ? 2 : 1); i++) { + /* looks nasty but we only have to do it 3 times if blk_zoom */ + + /* horizontal line */ + x = 0; + y = i * grid; + width = GWINSIDE; + numbuf[0] = '0' + (char) i; + if (blk_zoom) { + /* we might have to clip */ + dy = i * GRIDSIZE + offsety; + if (dy >= 0 && dy <= blk_gwidth + 2 * GRIDSIZE) { + if (offsetx < 0) { + x = grid; + width = 2 * x; + } else if (offsetx + 3 * GRIDSIZE > blk_gwidth) { + width = 2 * grid; + } + W_MakeDashedLine(mapw, x, y, x + width, y, W_Grey); + } + if (sectorNums) { + numbuf[0] = '0' + (char) (i + offsety / GRIDSIZE); + if ((numbuf[0] == '0') || (numbuf[0] == '7')) + numbuf[0] = ' '; + if (i == 1) /* so numbers dont overwrite in 1st box */ + W_WriteText(mapw, x + 2, y - grid + 11, W_Grey, numbuf, 1, + W_RegularFont); + else + W_WriteText(mapw, x + 2, y - grid + 2, W_Grey, numbuf, 1, + W_RegularFont); + } + } else { + W_MakeDashedLine(mapw, x, y, x + width, y, W_Grey); + if (sectorNums) { + W_WriteText(mapw, x + 2, y - grid + 2, W_Grey, numbuf, 1, W_RegularFont); + } + } + /* vertical line */ + x = i * grid; + y = 0; + h = GWINSIDE; + + if (blk_zoom) { + /* we might have to clip */ + dx = i * GRIDSIZE + offsetx; + if (dx >= 0 && dx <= blk_gwidth + 2 * GRIDSIZE) { + if (offsety < 0) { + y = grid; + h = 2 * y; + } else if (offsety + 3 * GRIDSIZE > blk_gwidth) { + h = 2 * grid; + } + W_MakeDashedLine(mapw, x, y, x, y + h, W_Grey); + } + if (sectorNums) { + numbuf[0] = '0' + (char) (i + offsetx / GRIDSIZE); + if ((numbuf[0] == '0') || (numbuf[0] == '7')) + numbuf[0] = ' '; + if (i == 1) + W_WriteText(mapw, x - grid + 11, y + 2, W_Grey, numbuf, 1, + W_RegularFont); + else + W_WriteText(mapw, x - grid + 2, y + 2, W_Grey, numbuf, 1, + W_RegularFont); + } + } else { + W_MakeDashedLine(mapw, x, y, x, y + h, W_Grey); + if (sectorNums) { + W_WriteText(mapw, x - grid + 2, y + 2, W_Grey, numbuf, 1, + W_RegularFont); + } + } + } + + scalex = ((me->p_x - offsetx) / GRIDSIZE) * GRIDSIZE; + scaley = ((me->p_y - offsety) / GRIDSIZE) * GRIDSIZE; + if (!redrawall && ((osx != scalex) || (osy != scaley))) { + + /* clear old sector */ + x = osx * GWINSIDE / GWIDTH; + y = osy * GWINSIDE / GWIDTH; + width = h = grid; + + W_WriteRectangle (mapw, x + 2, y + 2, width - 4, h - 4, 0, backColor); + + osx = scalex; + osy = scaley; + } + /* draw our current sector */ + x = scalex * GWINSIDE / GWIDTH; + width = h = grid; + y = scaley * GWINSIDE / GWIDTH; + + W_WriteRectangle (mapw, x + 2, y + 2, width - 4, h - 4, 1, yColor); + } +#endif /* Draw Planets */ @@ -1211,10 +1344,19 @@ } else { +#ifdef PARADISE + /* Paradise servers changed the ship cap protocol for + phaser damage :( */ + tx = (int) (j->p_x + j->p_ship.s_phaserdamage + * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH; + ty = (int) (j->p_y + j->p_ship.s_phaserdamage + * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH; +#else tx = (int) (j->p_x + PHASEDIST * j->p_ship.s_phaserdamage / 100 * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH; ty = (int) (j->p_y + PHASEDIST * j->p_ship.s_phaserdamage / 100 * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH; +#endif } break; case PHHIT2: @@ -1445,6 +1587,8 @@ } } + redrawall = 0; + if (doubleBuffering) W_Mem2Win (mapSDB); } Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- defaults.c 14 May 2007 02:56:40 -0000 1.85 +++ defaults.c 17 May 2007 08:49:48 -0000 1.86 @@ -23,6 +23,26 @@ #define DEFAULTSHIP NUM_TYPES +#ifdef PARADISE +struct shipdef shipdefaults[NUM_TYPES + 1] = { + {"sc", NULL, NULL, NULL, NULL}, + {"dd", NULL, NULL, NULL, NULL}, + {"ca", NULL, NULL, NULL, NULL}, + {"bb", NULL, NULL, NULL, NULL}, + {"as", NULL, NULL, NULL, NULL}, + {"sb", NULL, NULL, NULL, NULL}, + {"ga", NULL, NULL, NULL, NULL}, + {"js", NULL, NULL, NULL, NULL}, + {"fl", NULL, NULL, NULL, NULL}, + {"wb", NULL, NULL, NULL, NULL}, + {"cl", NULL, NULL, NULL, NULL}, + {"cv", NULL, NULL, NULL, NULL}, + {"ut", NULL, NULL, NULL, NULL}, + {"pt", NULL, NULL, NULL, NULL}, + {"pu", NULL, NULL, NULL, NULL}, + {"default", NULL, NULL, NULL, NULL} +}; +#else struct shipdef shipdefaults[NUM_TYPES + 1] = { {"sc", NULL, NULL, NULL, NULL}, {"dd", NULL, NULL, NULL, NULL}, @@ -34,6 +54,7 @@ {"att", NULL, NULL, NULL, NULL}, {"default", NULL, NULL, NULL, NULL} }; +#endif int myshiptype = DEFAULTSHIP; struct shipdef *myshipdef = &shipdefaults[DEFAULTSHIP]; From modemhero at users.sourceforge.net Thu May 17 03:49:49 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 17 May 2007 08:49:49 +0000 Subject: [netrek-cvs] client/netrekxp build.cmd, 1.27, 1.28 clientr.suo, 1.131, 1.132 Message-ID: <20070517085027.E97201867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv31445 Modified Files: build.cmd clientr.suo Log Message: A bunch of paradise additions, mostly separated by #ifdef's but a few things impact outside that condition, which are listed below. 1) Added paradise ships (CL, CV, FL, JS, PT, UT, WB) bitmap set and bitmaps for stars (local and map). 2) New function W_WriteRectangle, only used in paradise gridbox drawing, but it's available for general use. 3) Removed unused PLCLEAR flag. It overlapped with a paradise flag, and it wasn't used at all with current code so I just removed it. 4) Moved the redrawall = 0 from near top of main map function to bottom. I don't see any harm in doing this, and it was necessary to get a paradise draw function to work. 5) The BIGBITMAP_WIDTH size was changed from 240x240 to 500x500 to accomodate MOTD pics from paradise servers. Again I don't see any harm in increasing size. And this wasn't even used with bitmap storage, the StoreBitmap() function had been completely phased out. Along the way of adding in paradise functionality, numerous problems with defines have come up, ie MAXSECTOR, GWIDTH, ship array, and most seriously, overlapping packet types. There are also very serious problems with overlapping p_flag and p_status values, namely observers overlap with warp states and tournament queue status. Some p_whydead messages also overlap. Also paradise servers send phaser damage caps differently. Things that could use work are the motd paging system (gutted it for sake of simplicity), planet window (paradise has 2 planet windows, also sorting doesn't work), a bunch of gridline/zoom options should be made into netrekrc options. The galactic zoom doesn't work. Ships disappear while warping (due to the aforementioned problem with PFOBSERV overlap with PFWARP). Most of the paradise packet types, including special weapons and game parameters, are still not handled. Gwidth is not malleable based on paradise vs bronco server. No color ship bitmaps were added. No special items other than stars were added. No new weapon types like fighters were added. A bunch of keys like afterburners and engage warp don't exist. Info windows and rank windows not working right with paradise. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 Binary files /tmp/cvsjXgAYY and /tmp/cvsVTaM5U differ Index: build.cmd =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/build.cmd,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- build.cmd 14 May 2007 02:56:35 -0000 1.27 +++ build.cmd 17 May 2007 08:49:45 -0000 1.28 @@ -441,6 +441,7 @@ copy resources\ships\mono\kli\klishipM.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\mono\ori\orishipM.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\mono\rom\romshipM.bmp %InstCWD%\netrek\bitmaps\shiplib +copy resources\ships\mono\paradise_ships.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\grayscale\fed\fedshipG.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\grayscale\ind\indshipG.bmp %InstCWD%\netrek\bitmaps\shiplib @@ -502,6 +503,7 @@ copy resources\misclib\color\genocide.bmp %InstCWD%\netrek\bitmaps\misclib\color copy resources\misclib\color\genocide2.bmp %InstCWD%\netrek\bitmaps\misclib\color copy resources\misclib\color\*team.bmp %InstCWD%\netrek\bitmaps\misclib\color +copy resources\misclib\color\star*.bmp %InstCWD%\netrek\bitmaps\misclib\color copy resources\fonts\ntfonts2.fon %InstCWD%\netrek From modemhero at users.sourceforge.net Thu May 17 03:49:52 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 17 May 2007 08:49:52 +0000 Subject: [netrek-cvs] client/netrekxp/resources/misclib/color star.bmp, NONE, 1.1 starm.bmp, NONE, 1.1 Message-ID: <20070517085003.BDDA0B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/misclib/color In directory sc8-pr-cvs16:/tmp/cvs-serv31445/resources/misclib/color Added Files: star.bmp starm.bmp Log Message: A bunch of paradise additions, mostly separated by #ifdef's but a few things impact outside that condition, which are listed below. 1) Added paradise ships (CL, CV, FL, JS, PT, UT, WB) bitmap set and bitmaps for stars (local and map). 2) New function W_WriteRectangle, only used in paradise gridbox drawing, but it's available for general use. 3) Removed unused PLCLEAR flag. It overlapped with a paradise flag, and it wasn't used at all with current code so I just removed it. 4) Moved the redrawall = 0 from near top of main map function to bottom. I don't see any harm in doing this, and it was necessary to get a paradise draw function to work. 5) The BIGBITMAP_WIDTH size was changed from 240x240 to 500x500 to accomodate MOTD pics from paradise servers. Again I don't see any harm in increasing size. And this wasn't even used with bitmap storage, the StoreBitmap() function had been completely phased out. Along the way of adding in paradise functionality, numerous problems with defines have come up, ie MAXSECTOR, GWIDTH, ship array, and most seriously, overlapping packet types. There are also very serious problems with overlapping p_flag and p_status values, namely observers overlap with warp states and tournament queue status. Some p_whydead messages also overlap. Also paradise servers send phaser damage caps differently. Things that could use work are the motd paging system (gutted it for sake of simplicity), planet window (paradise has 2 planet windows, also sorting doesn't work), a bunch of gridline/zoom options should be made into netrekrc options. The galactic zoom doesn't work. Ships disappear while warping (due to the aforementioned problem with PFOBSERV overlap with PFWARP). Most of the paradise packet types, including special weapons and game parameters, are still not handled. Gwidth is not malleable based on paradise vs bronco server. No color ship bitmaps were added. No special items other than stars were added. No new weapon types like fighters were added. A bunch of keys like afterburners and engage warp don't exist. Info windows and rank windows not working right with paradise. --- NEW FILE: starm.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: star.bmp --- (This appears to be a binary file; contents omitted.) From modemhero at users.sourceforge.net Thu May 17 18:57:03 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Thu, 17 May 2007 23:57:03 +0000 Subject: [netrek-cvs] client/netrekxp/resources/paradise - New directory Message-ID: <20070517235712.B31231867D2@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/paradise In directory sc8-pr-cvs16:/tmp/cvs-serv10668/paradise Log Message: Directory /cvsroot/netrek/client/netrekxp/resources/paradise added to the repository From modemhero at users.sourceforge.net Fri May 18 14:54:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 18 May 2007 19:54:38 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.147, 1.148 build.cmd, 1.28, 1.29 clientr.suo, 1.132, 1.133 Message-ID: <20070518195517.86035B3EA@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16:/tmp/cvs-serv25761 Modified Files: NetrekXP to do list.C build.cmd clientr.suo Log Message: Paradise changes: New folder in resources tree named paradise which contains all paradise related bitmaps. Added support for paradise shipyard graphics, stars, ships (mono and color), and missiles, Added several parallel defines to deal with the problem of overlapping defines (ie PFOBSERV overlap with PFWARP). Also things like planet graphics having more bitmap frames due to shipyards. It moves bronco and paradise compatability further apart, but only by keeping them separate can I attempt to get this to work, there's just too many conflicts to try to resolve. Moved flagship (frigate?) to overlap with galaxy class in array of ship types, seems best solution (overlap with AT was previous way). GA and FL/FR seem to be identical on the pserver. Added new keys for engage warp (J), toggle warp (^j) and afterburners (.). Apparently the bronco way of setting maxwarp (speed req to speed 99) is the paradise way of requesting to engage warp, so that had to be switched around a bit. As for changes that effect bronco: 1) Added new dashboard message types for paradise, caused renumbering of internal counter for impulse/stopped but this doesn't matter. 2) Found bug with plasma and torp fuses (mono) where the final frame was not being drawn due to logic error regarding fuses. 3) Added check during receiving login packet, if the proper pad bits are not set right, it will close client. So running netrek.exe, you can't connect to a paradise server. Running paradise.exe, you can't connect to a bronco server. Ideally would send user a popup box but ran into issue with that, it was continually polling the password entry screen so that popup box got sent behind the (now-frozen) netrek window. Could use some work, to close client properly AND send a popup box explaining why. Index: NetrekXP to do list.C =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/NetrekXP to do list.C,v retrieving revision 1.147 retrieving revision 1.148 diff -u -d -r1.147 -r1.148 --- NetrekXP to do list.C 14 May 2007 02:56:35 -0000 1.147 +++ NetrekXP to do list.C 18 May 2007 19:54:30 -0000 1.148 @@ -34,6 +34,15 @@ 4) With expanded tactical ..can now see ships at galactic coordinates (-500,-500), if you fly into the NW corner of the galaxy. this was never anticipated! +Paradise issues: +Motd paging system gutted for sake of simplicity +A bunch of gridline/zoom options should be made into netrekrc options. +The galactic zoom doesn't work, gwidth is not malleable +Most of the paradise packet types, including special weapons and game parameters are still not handled. +Still missing wormholes, asteroids, fighters, warpbeacons, and warpflash functionality.. +Info windows and rank windows not working right with paradise. +Need popup box that works, when connecting to wrong server type + Wish list: 1) Rewrite graphics engine using SDL Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 Binary files /tmp/cvsKo5OkT and /tmp/cvs8do2Gf differ Index: build.cmd =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/build.cmd,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- build.cmd 17 May 2007 08:49:45 -0000 1.28 +++ build.cmd 18 May 2007 19:54:30 -0000 1.29 @@ -441,7 +441,6 @@ copy resources\ships\mono\kli\klishipM.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\mono\ori\orishipM.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\mono\rom\romshipM.bmp %InstCWD%\netrek\bitmaps\shiplib -copy resources\ships\mono\paradise_ships.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\grayscale\fed\fedshipG.bmp %InstCWD%\netrek\bitmaps\shiplib copy resources\ships\grayscale\ind\indshipG.bmp %InstCWD%\netrek\bitmaps\shiplib @@ -503,7 +502,13 @@ copy resources\misclib\color\genocide.bmp %InstCWD%\netrek\bitmaps\misclib\color copy resources\misclib\color\genocide2.bmp %InstCWD%\netrek\bitmaps\misclib\color copy resources\misclib\color\*team.bmp %InstCWD%\netrek\bitmaps\misclib\color -copy resources\misclib\color\star*.bmp %InstCWD%\netrek\bitmaps\misclib\color + +mkdir %InstCWD%\netrek\bitmaps\paradise +copy resources\paradise\paradise_*.bmp %InstCWD%\netrek\bitmaps\paradise +copy resources\paradise\star*.bmp %InstCWD%\netrek\bitmaps\paradise +copy resources\paradise\mdroneC.bmp %InstCWD%\netrek\bitmaps\paradise +copy resources\paradise\drone*.bmp %InstCWD%\netrek\bitmaps\paradise +copy resources\paradise\gear.bmp %InstCWD%\netrek\bitmaps\paradise copy resources\fonts\ntfonts2.fon %InstCWD%\netrek From modemhero at users.sourceforge.net Fri May 18 14:54:45 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 18 May 2007 19:54:45 +0000 Subject: [netrek-cvs] client/netrekxp/resources/misclib/color star.bmp, 1.1, NONE starm.bmp, 1.1, NONE Message-ID: <20070518195453.71BE51867D7@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/misclib/color In directory sc8-pr-cvs16:/tmp/cvs-serv25761/resources/misclib/color Removed Files: star.bmp starm.bmp Log Message: Paradise changes: New folder in resources tree named paradise which contains all paradise related bitmaps. Added support for paradise shipyard graphics, stars, ships (mono and color), and missiles, Added several parallel defines to deal with the problem of overlapping defines (ie PFOBSERV overlap with PFWARP). Also things like planet graphics having more bitmap frames due to shipyards. It moves bronco and paradise compatability further apart, but only by keeping them separate can I attempt to get this to work, there's just too many conflicts to try to resolve. Moved flagship (frigate?) to overlap with galaxy class in array of ship types, seems best solution (overlap with AT was previous way). GA and FL/FR seem to be identical on the pserver. Added new keys for engage warp (J), toggle warp (^j) and afterburners (.). Apparently the bronco way of setting maxwarp (speed req to speed 99) is the paradise way of requesting to engage warp, so that had to be switched around a bit. As for changes that effect bronco: 1) Added new dashboard message types for paradise, caused renumbering of internal counter for impulse/stopped but this doesn't matter. 2) Found bug with plasma and torp fuses (mono) where the final frame was not being drawn due to logic error regarding fuses. 3) Added check during receiving login packet, if the proper pad bits are not set right, it will close client. So running netrek.exe, you can't connect to a paradise server. Running paradise.exe, you can't connect to a bronco server. Ideally would send user a popup box but ran into issue with that, it was continually polling the password entry screen so that popup box got sent behind the (now-frozen) netrek window. Could use some work, to close client properly AND send a popup box explaining why. --- starm.bmp DELETED --- --- star.bmp DELETED --- From modemhero at users.sourceforge.net Fri May 18 14:54:44 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 18 May 2007 19:54:44 +0000 Subject: [netrek-cvs] client/netrekxp/resources/paradise drone.bmp, NONE, 1.1 droneC.bmp, NONE, 1.1 dronecloud.bmp, NONE, 1.1 dronecloudC.bmp, NONE, 1.1 gear.bmp, NONE, 1.1 mdroneC.bmp, NONE, 1.1 paradise_cships.bmp, NONE, 1.1 paradise_cships_self.bmp, NONE, 1.1 paradise_mplan.bmp, NONE, 1.1 paradise_plan.bmp, NONE, 1.1 paradise_ships.bmp, NONE, 1.1 star.bmp, NONE, 1.1 starm.bmp, NONE, 1.1 Message-ID: <20070518195453.6F42BB3EA@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/paradise In directory sc8-pr-cvs16:/tmp/cvs-serv25761/resources/paradise Added Files: drone.bmp droneC.bmp dronecloud.bmp dronecloudC.bmp gear.bmp mdroneC.bmp paradise_cships.bmp paradise_cships_self.bmp paradise_mplan.bmp paradise_plan.bmp paradise_ships.bmp star.bmp starm.bmp Log Message: Paradise changes: New folder in resources tree named paradise which contains all paradise related bitmaps. Added support for paradise shipyard graphics, stars, ships (mono and color), and missiles, Added several parallel defines to deal with the problem of overlapping defines (ie PFOBSERV overlap with PFWARP). Also things like planet graphics having more bitmap frames due to shipyards. It moves bronco and paradise compatability further apart, but only by keeping them separate can I attempt to get this to work, there's just too many conflicts to try to resolve. Moved flagship (frigate?) to overlap with galaxy class in array of ship types, seems best solution (overlap with AT was previous way). GA and FL/FR seem to be identical on the pserver. Added new keys for engage warp (J), toggle warp (^j) and afterburners (.). Apparently the bronco way of setting maxwarp (speed req to speed 99) is the paradise way of requesting to engage warp, so that had to be switched around a bit. As for changes that effect bronco: 1) Added new dashboard message types for paradise, caused renumbering of internal counter for impulse/stopped but this doesn't matter. 2) Found bug with plasma and torp fuses (mono) where the final frame was not being drawn due to logic error regarding fuses. 3) Added check during receiving login packet, if the proper pad bits are not set right, it will close client. So running netrek.exe, you can't connect to a paradise server. Running paradise.exe, you can't connect to a bronco server. Ideally would send user a popup box but ran into issue with that, it was continually polling the password entry screen so that popup box got sent behind the (now-frozen) netrek window. Could use some work, to close client properly AND send a popup box explaining why. --- NEW FILE: paradise_cships_self.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: paradise_mplan.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: drone.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: paradise_plan.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: paradise_ships.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: star.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dronecloud.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: starm.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: dronecloudC.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: paradise_cships.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: droneC.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mdroneC.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gear.bmp --- (This appears to be a binary file; contents omitted.) From modemhero at users.sourceforge.net Fri May 18 14:54:41 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 18 May 2007 19:54:41 +0000 Subject: [netrek-cvs] client/netrekxp/src dashboard.c, 1.22, 1.23 dashboard3.c, 1.10, 1.11 data.c, 1.93, 1.94 defaults.c, 1.86, 1.87 enter.c, 1.10, 1.11 helpwin.c, 1.11, 1.12 inform.c, 1.5, 1.6 input.c, 1.40, 1.41 local.c, 1.102, 1.103 map.c, 1.56, 1.57 mswindow.c, 1.83, 1.84 newwin.c, 1.64, 1.65 option.c, 1.49, 1.50 planetlist.c, 1.8, 1.9 playerlist.c, 1.13, 1.14 socket.c, 1.33, 1.34 warning.c, 1.13, 1.14 Message-ID: <20070518195527.A93B6B3EA@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv25761/src Modified Files: dashboard.c dashboard3.c data.c defaults.c enter.c helpwin.c inform.c input.c local.c map.c mswindow.c newwin.c option.c planetlist.c playerlist.c socket.c warning.c Log Message: Paradise changes: New folder in resources tree named paradise which contains all paradise related bitmaps. Added support for paradise shipyard graphics, stars, ships (mono and color), and missiles, Added several parallel defines to deal with the problem of overlapping defines (ie PFOBSERV overlap with PFWARP). Also things like planet graphics having more bitmap frames due to shipyards. It moves bronco and paradise compatability further apart, but only by keeping them separate can I attempt to get this to work, there's just too many conflicts to try to resolve. Moved flagship (frigate?) to overlap with galaxy class in array of ship types, seems best solution (overlap with AT was previous way). GA and FL/FR seem to be identical on the pserver. Added new keys for engage warp (J), toggle warp (^j) and afterburners (.). Apparently the bronco way of setting maxwarp (speed req to speed 99) is the paradise way of requesting to engage warp, so that had to be switched around a bit. As for changes that effect bronco: 1) Added new dashboard message types for paradise, caused renumbering of internal counter for impulse/stopped but this doesn't matter. 2) Found bug with plasma and torp fuses (mono) where the final frame was not being drawn due to logic error regarding fuses. 3) Added check during receiving login packet, if the proper pad bits are not set right, it will close client. So running netrek.exe, you can't connect to a paradise server. Running paradise.exe, you can't connect to a bronco server. Ideally would send user a popup box but ran into issue with that, it was continually polling the password entry screen so that popup box got sent behind the (now-frozen) netrek window. Could use some work, to close client properly AND send a popup box explaining why. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- mswindow.c 17 May 2007 08:49:49 -0000 1.83 +++ mswindow.c 18 May 2007 19:54:38 -0000 1.84 @@ -578,6 +578,35 @@ free (genopic); free (genopic2); +#ifdef PARADISE + free (drone_bitmap); + free (dronec_bitmap); + free (mdronec_bitmap); + free (base_drone_explosion_bitmap); + for (i = 0; i < BMP_DRONEDET_FRAMES; i++) + free (drone_explosion_bitmap[i]); + free (base_dronec_explosion_bitmap); + for (i = 0; i < BMP_DRONEDET_FRAMES; i++) + free (dronec_explosion_bitmap[i]); + free (gear_bitmap); + free (mgear_bitmap); + free (base_star_bitmap); + for (i = 0; i < STAR_VIEWS; i++) + free (star_bitmap[i]); + free (star_mbitmap); + free (paradise_ship_bitmaps); + free (paradise_cship_self_bitmaps); + free (paradise_cship_bitmaps); + for (j = 0; j < NUM_PSHIP_TYPES; j++) + { + for (i = 0; i < NUMTEAMS; i++) + { + free (paradise_ships[j][i]); + free (paradise_cships_self[j][i]); + free (paradise_cships[j][i]); + } + } +#endif //Remove default objects while (defaults) { Index: dashboard.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- dashboard.c 13 Apr 2007 11:07:29 -0000 1.22 +++ dashboard.c 18 May 2007 19:54:36 -0000 1.23 @@ -460,18 +460,50 @@ msgtype = 4; color = W_White; } +#ifdef PARADISE + /* Transwarp text */ + else if (me->p_flags & PFWARP) + { + sprintf (buf, "Warp"); + msgtype = 5; + color = W_White; + } + /* Afterburners */ + else if (me->p_flags & PFAFTER) + { + sprintf (buf, "Aftrbrn"); + msgtype = 6; + color = W_Red; + } + /* Warp preparation */ + else if (me->p_flags & PFWARPPREP) + { + if (me->p_flags & PFWPSUSPENDED) + { + sprintf (buf, "WrpPaus"); + msgtype = 7; + color = W_Cyan; + } + else + { + sprintf (buf, "WrpPrep"); + msgtype = 8; + color = W_Cyan; + } + } +#endif /* Ship stopped */ else if (me->p_speed == 0) { sprintf (buf, "Stopped"); - msgtype = 5; + msgtype = 9; color = W_Grey; } /* Default impulse text */ else { sprintf (buf, "Impulse"); - msgtype = 6; + msgtype = 10; color = W_Yellow; } @@ -524,6 +556,11 @@ { static float old_kills = -1.0; static int old_torp = -1; +#ifdef PARADISE + int i = 0; + static int old_drone = -1; + static int old_totmissiles = -1; +#endif static unsigned int old_flags = (unsigned int) -1; static int old_tourn = 0; register int BAR_LENGTH = W_Textwidth/3 + 9 * W_Textwidth; @@ -637,6 +674,30 @@ } old_torp = plr->p_ntorp; } +#ifdef PARADISE + /* code to show the number of drones out */ + strcpy(buf, "Miss: "); + if (fr || plr->p_totmissiles != old_totmissiles || plr->p_ndrone != old_drone) + { + if (plr->p_totmissiles > 0) + sprintf(buf + strlen(buf), "L%d ", plr->p_totmissiles); + old_totmissiles = me->p_totmissiles; + if (plr->p_ndrone > 0) + sprintf(buf + strlen(buf), "O%d", plr->p_ndrone); + old_drone = plr->p_ndrone; + if (!plr->p_totmissiles && !plr->p_ndrone) /* clear missile text */ + W_ClearArea(tstatw, 199 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), 13 * W_Textwidth, W_Textheight); + else + { + for (i = strlen(buf); i < 14; i++) + { + buf[i] = ' '; + buf[14] = 0; + } + W_WriteText(tstatw, 199 * W_Textwidth / 3, 3 + 2 * (W_Textheight + SPACING), textColor, buf, 14, W_RegularFont); + } + } +#endif } Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- map.c 17 May 2007 08:49:49 -0000 1.56 +++ map.c 18 May 2007 19:54:38 -0000 1.57 @@ -344,6 +344,16 @@ i += 2; if (p->pl_flags & PLFUEL) i += 1; +#ifdef PARADISE + if (p->pl_flags & PLSHIPYARD) + { + i = 9; /* Base for shipyards */ + if (p->pl_flags & PLFUEL) + i += 1; + if (p->pl_armies > 4) + i += 2; + } +#endif return bmplanets[i]; } else @@ -469,6 +479,18 @@ 0, mwrench_bitmap, planetColor(p), window); +#ifdef PARADISE + if (p->pl_flags & PLSHIPYARD) + W_WriteScaleBitmap(dx + destwidth, + dy - destheight/3 - 1, + destwidth/3 + 1, + destheight/3 + 1, + BMP_GEAR_WIDTH, + BMP_GEAR_HEIGHT, + 0, + mgear_bitmap, planetColor(p), + window); +#endif if (p->pl_flags & PLFUEL) W_WriteScaleBitmap(dx + destwidth, dy, @@ -531,6 +553,11 @@ sendPlanetsPacket(l->pl_no); } +#ifdef PARADISE + /* Stars need to be refreshed often... */ + if (PL_TYPE(*l) == PLSTAR) + l->pl_flags |= PLREDRAW; +#endif if (!(l->pl_flags & PLREDRAW)) continue; @@ -550,7 +577,15 @@ odx = pl_update[l->pl_no].plu_x * GWINSIDE / GWIDTH; ody = pl_update[l->pl_no].plu_y * GWINSIDE / GWIDTH; - +#ifdef PARADISE + if (PL_TYPE(*l) == PLSTAR) + W_ClearArea (mapw, dx - ( BMP_MSTAR_WIDTH / 2), + dy - ( BMP_MSTAR_HEIGHT / 2), + BMP_MSTAR_WIDTH, + BMP_MSTAR_HEIGHT); + else + { +#endif /* XFIX */ if (planetBitmapGalaxy == 3) W_ClearArea (mapw, odx - (5 * BMP_MPLANET_WIDTH / 6) - 1, @@ -566,11 +601,22 @@ ody + (BMP_MPLANET_HEIGHT / 2), backColor, l->pl_name, 3, planetFont (l)); pl_update[l->pl_no].plu_update = 0; +#ifdef PARADISE + } +#endif } else { /* Clear the planet normally */ - +#ifdef PARADISE + if (PL_TYPE(*l) == PLSTAR) + W_ClearArea (mapw, dx - ( BMP_MSTAR_WIDTH / 2), + dy - ( BMP_MSTAR_HEIGHT / 2), + BMP_MSTAR_WIDTH, + BMP_MSTAR_HEIGHT); + else + { +#endif /* XFIX */ if (planetBitmapGalaxy == 3) W_ClearArea (mapw, dx - (5 * BMP_MPLANET_WIDTH / 6) - 1, @@ -584,16 +630,19 @@ dy - (BMP_MPLANET_HEIGHT / 2 + 4), BMP_MPLANET_WIDTH + 8, BMP_MPLANET_HEIGHT + 8); +#ifdef PARADISE + } +#endif } /* Draw the new planet */ #ifdef PARADISE if (PL_TYPE(*l) == PLSTAR) - W_WriteScaleBitmap (dx - (BMP_MSTAR_WIDTH / 2) * SCALE / scaleFactor, - dy - (BMP_MSTAR_HEIGHT / 2) * SCALE / scaleFactor, - BMP_MSTAR_WIDTH * SCALE / scaleFactor, - BMP_MSTAR_HEIGHT * SCALE / scaleFactor, + W_OverlayScaleBitmap (dx - (BMP_MSTAR_WIDTH / 2), + dy - (BMP_MSTAR_HEIGHT / 2), + BMP_MSTAR_WIDTH, + BMP_MSTAR_HEIGHT, BMP_MSTAR_WIDTH, BMP_MSTAR_HEIGHT, 0, @@ -1304,6 +1353,9 @@ register struct phaser *ph; register struct torp *k; register struct plasmatorp *pt; +#ifdef PARADISE + register struct thingy *th; +#endif int tx, ty; for (i = 0, j = &players[i]; i < MAXPLAYER; i++, j++) @@ -1388,7 +1440,11 @@ checkRedraw(tx * (GWIDTH / GWINSIDE), ty * (GWIDTH / GWINSIDE)); } - if (!j->p_ntorp && !j->p_nplasmatorp) + if (!j->p_ntorp && !j->p_nplasmatorp +#ifdef PARADISE + && !j->p_ndrone +#endif + ) continue; /* torps */ @@ -1506,6 +1562,29 @@ /* Check for overwriting planets */ checkRedraw(pt->pt_x, pt->pt_y); } +#ifdef PARADISE + /* missiles */ + for (h = i * npthingies, th = &thingies[i * npthingies]; h < npthingies * (i + 1); h++, th++) + { + if (th->t_x < 0 || th->t_y < 0) + continue; + + dx = th->t_x * GWINSIDE / GWIDTH; + dy = th->t_y * GWINSIDE / GWIDTH; + + /* Draw missile as a 2x2 pixel torp */ + W_MakeLine(mapw, dx, dy, dx + 1, dy, torpColor (th)); + W_MakeLine(mapw, dx, dy + 1, dx + 1, dy + 1, torpColor (th)); + mcleararea[0][mclearacount] = dx; + mcleararea[1][mclearacount] = dy; + mcleararea[2][mclearacount] = 2; + mcleararea[3][mclearacount] = 2; + mclearacount++; + + /* Check for overwriting planets */ + checkRedraw(k->t_x, k->t_y); + } +#endif } } /* Reset weapon update marker */ Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- newwin.c 17 May 2007 08:49:49 -0000 1.64 +++ newwin.c 18 May 2007 19:54:38 -0000 1.65 @@ -458,18 +458,15 @@ { int j, k; - if ( access("bitmaps/shiplib/paradise_ships.bmp", R_OK) == 0 ) - { - paradise_ship_bitmaps = - W_StoreBitmap3 ("bitmaps/shiplib/paradise_ships.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES, - BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_MONOCHROME); - } - else // No paradise ship bitmaps, doh! - { - LineToConsole("Failed to load paradise bitmaps, defaulting to cruiser for all ships.\n"); - noParadiseBitmaps = 1; - return; - } + paradise_ship_bitmaps = + W_StoreBitmap3 ("bitmaps/paradise/paradise_ships.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES, + BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_MONOCHROME); + paradise_cship_self_bitmaps = + W_StoreBitmap3 ("bitmaps/paradise/paradise_cships_self.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES, + BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_DEFAULTCOLOR); + paradise_cship_bitmaps = + W_StoreBitmap3 ("bitmaps/paradise/paradise_cships.bmp", BMP_SHIP_WIDTH * NUM_PSHIP_TYPES, + BMP_SHIP_HEIGHT * NUMTEAMS, BMP_PSHIP, w, LR_DEFAULTCOLOR); for (j = 0; j < NUM_PSHIP_TYPES; j++) { @@ -478,9 +475,62 @@ paradise_ships[j][k] = W_PointBitmap2 (paradise_ship_bitmaps, j, k, BMP_SHIP_WIDTH, BMP_SHIP_HEIGHT); + paradise_cships_self[j][k] = + W_PointBitmap2 (paradise_cship_self_bitmaps, j, k, BMP_SHIP_WIDTH, + BMP_SHIP_HEIGHT); + paradise_cships[j][k] = + W_PointBitmap2 (paradise_cship_bitmaps, j, k, BMP_SHIP_WIDTH, + BMP_SHIP_HEIGHT); } } } + +/******************************************************************************/ +/*** loadparadisethings() - misc paradise art like stars, wormholes, etc +/******************************************************************************/ +void loadparadisethings (void) +{ + int i; + + base_star_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/star.bmp", BMP_STAR_WIDTH, + BMP_STAR_HEIGHT * STAR_VIEWS, BMP_STAR, w, + LR_DEFAULTCOLOR); + for (i = 0; i < STAR_VIEWS; i++) + star_bitmap[i] = + W_PointBitmap2 (base_star_bitmap, 0, i, BMP_STAR_WIDTH, BMP_STAR_HEIGHT); + + star_mbitmap = + W_StoreBitmap3 ("bitmaps/paradise/starm.bmp", BMP_MSTAR_WIDTH, + BMP_MSTAR_HEIGHT, BMP_MSTAR, mapw, + LR_DEFAULTCOLOR); + + drone_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/drone.bmp", BMP_DRONE_WIDTH, + BMP_DRONE_HEIGHT, BMP_DRONE, w, LR_MONOCHROME); + dronec_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/droneC.bmp", BMP_DRONE_WIDTH, + BMP_DRONE_HEIGHT, BMP_DRONEC, w, LR_DEFAULTCOLOR); + mdronec_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/mdroneC.bmp", BMP_DRONE_WIDTH, + BMP_DRONE_HEIGHT, BMP_MDRONEC, w, LR_DEFAULTCOLOR); + + base_drone_explosion_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/dronecloud.bmp", BMP_DRONEDET_WIDTH, + BMP_DRONEDET_HEIGHT * BMP_DRONEDET_FRAMES, BMP_DRONECLOUD, w, + LR_MONOCHROME); + for (i = 0; i < BMP_DRONEDET_FRAMES; i++) + drone_explosion_bitmap[i] = + W_PointBitmap2 (base_drone_explosion_bitmap, 0, i, BMP_DRONEDET_WIDTH, BMP_DRONEDET_HEIGHT); + + base_dronec_explosion_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/dronecloudC.bmp", BMP_DRONEDET_WIDTH, + BMP_DRONEDET_HEIGHT * BMP_DRONEDET_FRAMES, BMP_DRONECLOUD, w, + LR_DEFAULTCOLOR); + for (i = 0; i < BMP_DRONEDET_FRAMES; i++) + dronec_explosion_bitmap[i] = + W_PointBitmap2 (base_dronec_explosion_bitmap, 0, i, BMP_DRONEDET_WIDTH, BMP_DRONEDET_HEIGHT); +} #endif /******************************************************************************/ @@ -723,6 +773,12 @@ W_StoreBitmap3 ("bitmaps/planlibm/color/wrench.bmp", BMP_WRENCH_WIDTH, BMP_WRENCH_HEIGHT, BMP_WRENCHBMP, w, LR_DEFAULTCOLOR); +#ifdef PARADISE + gear_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/gear.bmp", + BMP_GEAR_WIDTH, BMP_GEAR_HEIGHT, BMP_GEARBMP, w, + LR_DEFAULTCOLOR); +#endif fuel_bitmap = W_StoreBitmap3 ("bitmaps/planlibm/color/fuel.bmp", BMP_FUEL_WIDTH, BMP_FUEL_HEIGHT, BMP_FUELBMP, w, @@ -815,35 +871,18 @@ W_StoreBitmap3 ("bitmaps/planlibm/color/wrench.bmp", BMP_WRENCH_WIDTH, BMP_WRENCH_HEIGHT, BMP_WRENCHBMP, mapw, LR_DEFAULTCOLOR); +#ifdef PARADISE + mgear_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/gear.bmp", + BMP_GEAR_WIDTH, BMP_GEAR_HEIGHT, BMP_GEARBMP, w, + LR_DEFAULTCOLOR); +#endif mfuel_bitmap = W_StoreBitmap3 ("bitmaps/planlibm/color/fuel.bmp", BMP_FUEL_WIDTH, BMP_FUEL_HEIGHT, BMP_FUELBMP, mapw, LR_DEFAULTCOLOR); } -#ifdef PARADISE -/******************************************************************************/ -/*** loadparadisethings() - misc paradise art like stars, wormholes, etc -/******************************************************************************/ -void loadparadisethings (void) -{ - int i; - - base_star_bitmap = - W_StoreBitmap3 ("bitmaps/misclib/color/star.bmp", BMP_STAR_WIDTH, - BMP_STAR_HEIGHT * STAR_VIEWS, BMP_STAR, w, - LR_DEFAULTCOLOR); - for (i = 0; i < STAR_VIEWS; i++) - star_bitmap[i] = - W_PointBitmap2 (base_star_bitmap, 0, i, BMP_STAR_WIDTH, BMP_STAR_HEIGHT); - - star_mbitmap = - W_StoreBitmap3 ("bitmaps/misclib/color/starm.bmp", BMP_MSTAR_WIDTH, - BMP_MSTAR_HEIGHT, BMP_MSTAR, mapw, - LR_DEFAULTCOLOR); -} -#endif - /******************************************************************************/ /*** handleMessageWindowKeyDown() /******************************************************************************/ @@ -955,7 +994,11 @@ #endif helpWin = W_MakeTextWindow ("help", 20, TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER - 5, +#ifdef PARADISE + 160, 23, NULL, BORDER); +#else 160, 21, NULL, BORDER); +#endif #ifdef RECORDGAME if (playback) @@ -1233,6 +1276,10 @@ #ifdef PARADISE loadparadisethings(); #endif +#ifdef PARADISE + Planlib = "bitmaps/paradise/paradise_plan.bmp"; + MPlanlib = "bitmaps/paradise/paradise_mplan.bmp"; +#else switch (planetBitmap) // Case 3 = new color, but we never use Planlib { case 1: @@ -1257,7 +1304,8 @@ MPlanlib = "bitmaps/planlibm/mplan.bmp"; break; } - +#endif + if (!dynamicBitmaps) /* Only load needed bitmaps */ { switch (colorClient) @@ -1380,12 +1428,12 @@ mplasmatorp = W_StoreBitmap3 ("bitmaps/weaplibm/mono/mplasma.bmp", BMP_MPLASMA_WIDTH, BMP_MPLASMA_HEIGHT, BMP_MPLASMA, w, LR_MONOCHROME); - + base_planets = - W_StoreBitmap3 (Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * 9, + W_StoreBitmap3 (Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * PLANET_VIEWS, BMP_PLANET000, w, LR_MONOCHROME); base_mplanets = - W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * 9, + W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * PLANET_VIEWS, BMP_MPLANET000, mapw, LR_MONOCHROME); for (k = 0; k < PLANET_VIEWS; k++) Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- input.c 17 May 2007 08:49:48 -0000 1.40 +++ input.c 18 May 2007 19:54:38 -0000 1.41 @@ -276,7 +276,7 @@ emptyKey, /* 31 */ Key200, /* ^h */ emptyKey, /* 31 */ - emptyKey, /* 31 */ + Key202, /* ^j */ emptyKey, /* 31 */ Key204, /* ^l */ Key205, /* ^m */ @@ -2282,7 +2282,11 @@ void Key37 (void) { +#ifdef PARADISE + set_speed(me->p_ship.s_maxspeed); +#else set_speed (99); /* Max speed... */ +#endif } /******************************************************************************/ @@ -2391,7 +2395,11 @@ void Key46 (void) { +#ifdef PARADISE + set_speed(98); /* afterburners */ +#else emptyKey(); +#endif } /******************************************************************************/ @@ -2729,7 +2737,11 @@ void Key74 (W_Event * data) { +#ifdef PARADISE + set_speed(99); /* warp! */ +#else emptyKey (); +#endif } /******************************************************************************/ @@ -3869,3 +3881,20 @@ { emergency (other2, data); } + +/******************************************************************************/ +/*** Key202() ***/ +/******************************************************************************/ +void +Key202 (W_Event * data) +{ +#ifdef PARADISE + /* suspend warp toggle [BDyess] */ + if (me->p_flags & PFWPSUSPENDED) + set_speed(96); /* unsuspend */ + else + set_speed(97); /* suspend */ +#else + emptyKey (); +#endif +} \ No newline at end of file Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- local.c 17 May 2007 08:49:48 -0000 1.102 +++ local.c 18 May 2007 19:54:38 -0000 1.103 @@ -19,6 +19,7 @@ #include "struct.h" #include "data.h" #include "local.h" +#include "packets.h" #include "proto.h" #include "SDL.h" #include "SDL_mixer.h" @@ -53,6 +54,13 @@ static int sound_plasma = 0; static int sound_other_plasmas = 0; static int num_other_plasmas = 0; +#ifdef PARADISE +static int sound_missiles = 0; +static int sound_other_missiles = 0; +static int num_other_missiles = 0; +static int other_missile_dist = 0; +static int other_missile_angle = 0; +#endif static unsigned int sound_flags = 0; static int other_torp_dist = 0; static int other_torp_angle = 0; @@ -381,6 +389,16 @@ i += 2; if (p->pl_flags & PLFUEL) i += 1; +#ifdef PARADISE + if (p->pl_flags & PLSHIPYARD) + { + i = 9; /* Base for shipyards */ + if (p->pl_flags & PLFUEL) + i += 1; + if (p->pl_armies > 4) + i += 2; + } +#endif return (bplanets[i]); } else @@ -515,6 +533,18 @@ 0, wrench_bitmap, planetColor(p), window); +#ifdef PARADISE + if (p->pl_flags & PLSHIPYARD) + W_WriteScaleBitmap(dx + destwidth, + dy - destheight/3 - 1, + destwidth/3 + 1, + destheight/3 + 1, + BMP_GEAR_WIDTH, + BMP_GEAR_HEIGHT, + 0, + gear_bitmap, planetColor(p), + window); +#endif if (p->pl_flags & PLFUEL) W_WriteScaleBitmap(dx + destwidth, dy, @@ -640,7 +670,7 @@ if observer is locked onto a planet, or is show_army_count feature packet is on */ if ((showArmy == 1 || showArmy == 3) && (l->pl_info & me->p_team) #ifdef PARADISE - && (PL_TYPE(*l) != PLSTAR) + && (PL_TYPE(*l) == PLPLANET) #endif && (F_show_army_count || ( (me->p_flags & PFORBIT) && (F_sp_generic_32 ? me->pl_orbit : get_closest_planet(me->p_x, me->p_y)) == l->pl_no) @@ -753,6 +783,9 @@ int type; W_Icon (*ship_bits)[SHIP_VIEWS]; +#ifdef PARADISE + W_Icon (*ship_bits_paradise)[NUMTEAMS]; +#endif W_Icon (*ship_bitsHR); /* Kludge to try to fix missing ID chars on tactical (short range) @@ -1055,11 +1088,7 @@ type = j->p_ship.s_type; #ifdef PARADISE - // We missing paradise bitmaps? - if (noParadiseBitmaps) - type = CRUISER; - // If it's a paradise ship, we only have 1 bitmap set - // so let's use it, rotating bitmaps realtime. + // If it's a paradise ship, use a paradise bitmap set. if (type >= PARADISE_SHIP_OFFSET) { int pos; @@ -1082,6 +1111,16 @@ pos = 1; break; } + if (colorClient <= 0 || colorClient > 4) + ship_bits_paradise = paradise_ships; + else + { + if (myPlayer(j)) + ship_bits_paradise = paradise_cships_self; + else + ship_bits_paradise = paradise_cships; + } + W_WriteScaleBitmap (dx - (j->p_ship.s_width / 2) * SCALE / scaleFactor, dy - (j->p_ship.s_height / 2) * SCALE / scaleFactor, j->p_ship.s_width * SCALE / scaleFactor, @@ -1089,7 +1128,7 @@ BMP_SHIP_WIDTH, BMP_SHIP_HEIGHT, (360 * j->p_dir/255), - paradise_ships[type - PARADISE_SHIP_OFFSET][pos], + ship_bits_paradise[type - PARADISE_SHIP_OFFSET][pos], playerColor (j), w); } @@ -2105,7 +2144,7 @@ k->t_fuse--; frame = k->t_fuse * 10 / server_ups; - if (k->t_fuse <= 0) + if (k->t_fuse < 0) { k->t_status = TFREE; j->p_ntorp--; @@ -2333,7 +2372,7 @@ pt->pt_fuse--; frame = pt->pt_fuse * 10 / server_ups; - if (pt->pt_fuse <= 0) + if (pt->pt_fuse < 0) { pt->pt_status = PTFREE; players[pt->pt_owner].p_nplasmatorp--; @@ -2484,6 +2523,186 @@ } } +#ifdef PARADISE +void +draw_one_thingy(struct thingy *k) +{ + int dx, dy; + int frame; + int view = scaleFactor * TWINSIDE / 2; + + if (k->t_shape == SHP_BLANK) + return; + /* LineToConsole("%d,%d - %d,%d\n", me->p_x, me->p_y, k->t_x, k->t_y); */ + dx = k->t_x - me->p_x; + dy = k->t_y - me->p_y; + if (ABS(dx) > view || ABS(dy) > view) + return; + + dx = scaleLocal(dx); + dy = scaleLocal(dy); + switch (k->t_shape) { +/* case SHP_BOOM: + k->t_fuse--; + if (k->t_fuse <= 0) { + k->t_shape = SHP_BLANK; + return; + } + if (k->t_fuse > image->frames) + k->t_fuse = image->frames; + + frame = image->frames - k->t_fuse; + break;*/ + case SHP_MISSILE: +#ifdef SOUND + if (k->t_owner != me->p_no) + { + num_other_missiles++; + SetDistAngle(dx, dy); + if (distance < other_missile_dist) + { + other_missile_dist = distance; + other_missile_angle = angle; + } + } +#endif + W_WriteScaleBitmap (dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor, + BMP_DRONE_WIDTH * SCALE / scaleFactor, + BMP_DRONE_HEIGHT * SCALE / scaleFactor, + BMP_DRONE_WIDTH, + BMP_DRONE_HEIGHT, + (360 * k->t_dir/255), + (colorWeapons ? (myPlayer(&players[k->t_owner]) ? mdronec_bitmap : dronec_bitmap) : drone_bitmap), + playerColor (&players[k->t_owner]), + w); + clearzone[0][clearcount] = dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor - 1; + clearzone[1][clearcount] = dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor - 1; + clearzone[2][clearcount] = BMP_DRONE_WIDTH * SCALE / scaleFactor + 2; + clearzone[3][clearcount] = BMP_DRONE_HEIGHT * SCALE / scaleFactor + 2; + clearcount++; + break; +/* case SHP_TORP: + image = getImage(friendlyThingy(k) ? I_MTORP : I_ETORP); + frame = udcounter + k->t_no; + break; + case SHP_PLASMA: + case SHP_MINE: // use plasma until I get a nifty bitmap + image = getImage(friendlyThingy(k) ? I_MPLASMATORP : I_EPLASMATORP); + frame = udcounter + k->t_no; + break; + case SHP_PBOOM: + image = getImage(friendlyThingy(k) ? I_MPLASMACLOUD : I_EPLASMACLOUD); + k->t_fuse--; + if (k->t_fuse < 0) { + k->t_shape = SHP_BLANK; + return; + } + if (k->t_fuse > image->frames) { + k->t_fuse = image->frames; + } + frame = image->frames - k->t_fuse; + break; + case SHP_FBOOM: + image = getImage(friendlyThingy(k) ? I_MFIGHTERCLOUD : I_EFIGHTERCLOUD); + k->t_fuse--; + if (k->t_fuse < 0) { + k->t_shape = SHP_BLANK; + return; + } + if (k->t_fuse > image->frames) { + k->t_fuse = image->frames; + } + frame = image->frames - k->t_fuse; + break; + */ + case SHP_DBOOM: + k->t_fuse--; + frame = k->t_fuse * 10 / server_ups; + + if (k->t_fuse < 0) + { + k->t_shape = SHP_BLANK; + return; + } + + if (frame >= BMP_DRONEDET_FRAMES) + frame = BMP_DRONEDET_FRAMES - 1; + +#ifdef SOUND + if (k->t_fuse == (MAX(2, BMP_TORPDET_FRAMES * server_ups / 10) - 1)) + { + SetDistAngle(dx, dy); + // At short distances, don't use angular sound + if (!soundAngles || distance < SCALE/2) + Play_Sound_Loc(PLASMA_HIT_WAV, SF_WEAPONS, -1, distance); + else + Play_Sound_Loc(PLASMA_HIT_WAV, SF_WEAPONS, angle, distance); + } +#endif + W_WriteScaleBitmap (dx - (BMP_DRONEDET_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_DRONEDET_HEIGHT / 2) * SCALE / scaleFactor, + BMP_DRONEDET_WIDTH * SCALE / scaleFactor, + BMP_DRONEDET_HEIGHT * SCALE / scaleFactor, + BMP_DRONEDET_WIDTH, + BMP_DRONEDET_HEIGHT, + 0, + drone_explosion_bitmap[frame], + playerColor (&players[k->t_owner]), + w); + clearzone[0][clearcount] = dx - (BMP_DRONEDET_WIDTH / 2) * SCALE / scaleFactor ; + clearzone[1][clearcount] = dy - (BMP_DRONEDET_HEIGHT / 2) * SCALE / scaleFactor; + clearzone[2][clearcount] = BMP_DRONEDET_WIDTH * SCALE / scaleFactor; + clearzone[3][clearcount] = BMP_DRONEDET_HEIGHT * SCALE / scaleFactor; + clearcount++; + break; + /* + case SHP_FIGHTER: + image = getImage(friendlyThingy(k) ? I_MFIGHTER : I_EFIGHTER); + frame = (int) (k->t_dir * image->frames + 128) / 256; + break; + case SHP_WARP_BEACON: + image = getImage(I_WARPBEACON); + frame = udcounter; + if (k->t_fuse > 4) { + image = getImage(I_WARPFLASH); + } + if (++(k->t_fuse) > 6) { + k->t_fuse = 0; + } + break; +*/ + default: + LineToConsole("Wierd...unknown thingy number (%d).\n", k->t_shape); + return; + } +} + +void +DrawThingies (void) +{ + int i, h; + int count; + struct player *j; + + for (j = players; j != players + MAXPLAYER; ++j) + { + i = j->p_no; + + if (!j->p_ndrone) + return; + count = 0; + + for (h = i * npthingies; h < npthingies * (i + 1); h++) + { + draw_one_thingy(&thingies[h]); + if (thingies[h].t_shape != SHP_BLANK) + count++; + } + j->p_ndrone = count; + } +} +#endif static void DrawMisc (void) @@ -2851,11 +3070,26 @@ else Play_Sound_Loc(FIRE_PLASMA_OTHER_WAV, SF_OTHER|SF_WEAPONS, other_plasma_angle, other_plasma_dist); } +#ifdef PARADISE + if (sound_missiles < me->p_ndrone ) + Play_Sound(FIRE_PLASMA_WAV, SF_WEAPONS); + if (sound_other_missiles < num_other_missiles) + { + if (!soundAngles || other_missile_dist < SCALE/2) + Play_Sound_Loc(FIRE_TORP_OTHER_WAV, SF_OTHER|SF_WEAPONS, -1, other_missile_dist); + else + Play_Sound_Loc(FIRE_TORP_OTHER_WAV, SF_OTHER|SF_WEAPONS, other_missile_angle, other_missile_dist); + } +#endif // Reset locations and fuses of other's closest torps and plasmas other_torp_dist = SOUND_MAXRANGE; other_torp_angle = 0; other_plasma_dist = SOUND_MAXRANGE; other_plasma_angle = 0; +#ifdef PARADISE + other_missile_dist = SOUND_MAXRANGE; + other_missile_angle = 0; +#endif sound_flags = me->p_flags; sound_torps = me->p_ntorp; @@ -2864,6 +3098,11 @@ sound_plasma = me->p_nplasmatorp; sound_other_plasmas = num_other_plasmas; num_other_plasmas = 0; +#ifdef PARADISE + sound_missiles = me->p_ndrone; + sound_other_missiles = num_other_missiles; + num_other_missiles = 0; +#endif #endif /* show 'lock' icon on local map (Actually an EM hack ) */ @@ -2966,6 +3205,9 @@ DrawTorps (); DrawPlasmaTorps (); +#ifdef PARADISE + DrawThingies (); +#endif if (!weaponsOnMap) weaponUpdate = 0; Index: enter.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/enter.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- enter.c 6 Apr 2007 06:46:31 -0000 1.10 +++ enter.c 18 May 2007 19:54:37 -0000 1.11 @@ -51,6 +51,9 @@ players = universe.players; torps = universe.torps; plasmatorps = universe.plasmatorps; +#ifdef PARADISE + thingies = universe.thingies; +#endif status = universe.status; planets = universe.planets; phasers = universe.phasers; Index: planetlist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/planetlist.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- planetlist.c 17 May 2007 08:49:49 -0000 1.8 +++ planetlist.c 18 May 2007 19:54:39 -0000 1.9 @@ -45,10 +45,7 @@ planetlist (void) { #ifdef PARADISE - if (paradise) - planet_list_paradise(); - else - { + planet_list_paradise(); #else register int i; char buf[BUFSIZ]; @@ -63,9 +60,6 @@ strcpy(priorplanets[i], ""); updatePlanetw (); #endif -#ifdef PARADISE - } -#endif } #ifdef PARADISE @@ -128,11 +122,7 @@ for (team_pnum = 0; team_pnum < team_pcount[i]; team_pnum++, k++) { j = team_p[i][team_pnum]; - /* (nplanets+13)/2 is the height of window; from newwin.c */ - if (k == 0 || k >= ((nplanets + 13) / 2)) { - if (k != 0) - continue; - //wind = planetw2; + if (k == 0) { sprintf(buf, "Planet name sctr own armies RESOURCES SURFC ATMOS VISIT TIME"); W_WriteText(wind, 2, 1, textColor, buf, strlen(buf), W_RegularFont); @@ -150,14 +140,9 @@ } else { /* do the original alpa only sort planet list */ for (i = 0, j = &planets[i]; i < nplanets; i++, j++, k++) { - if (i == 0 || i == nplanets / 2) { + if (i == 0) { sprintf(buf, "Planet name sctr own armies RESOURCES SURFC ATMOS VISIT TIME"); - - if (i != 0) { - continue; - //wind = planetw2; - } W_WriteText(wind, 2, 1, textColor, buf, strlen(buf), W_RegularFont); k = 2; Index: playerlist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playerlist.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- playerlist.c 17 May 2007 08:49:49 -0000 1.13 +++ playerlist.c 18 May 2007 19:54:39 -0000 1.14 @@ -108,7 +108,7 @@ static int plist2Width = 0; #ifdef PARADISE static char *my_classes[NUM_TYPES] = { - "SC", "DD", "CA", "BB", "AS", "SB", "GA", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" }; + "SC", "DD", "CA", "BB", "AS", "SB", "AT", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" }; #else static char *my_classes[NUM_TYPES] = { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" }; Index: helpwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/helpwin.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- helpwin.c 16 May 2007 00:05:15 -0000 1.11 +++ helpwin.c 18 May 2007 19:54:37 -0000 1.12 @@ -79,6 +79,11 @@ "@ speed = 12", "% speed = maximum", "# speed = 1/2 maximum", +#ifdef PARADISE + ". Afterburners", + "J Engage Warp", + "^j Toggle warp prep", +#endif "< slow speed 1", "> speed up 1", "k Set course", @@ -302,7 +307,7 @@ char helpmessage[MAXHELP]; - /* 4 column help window. THis may be changed depending on font size */ + /* 2 column help window. THis may be changed depending on font size */ for (column = 0; column < 2; column++) { for (row = 1; row < PBHELPMESSAGES / 2 + 1; row++) Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- socket.c 17 May 2007 08:49:49 -0000 1.33 +++ socket.c 18 May 2007 19:54:39 -0000 1.34 @@ -1915,8 +1915,17 @@ { loginAccept = packet->accept; #ifdef PARADISE + if ((packet->pad2 != 69) && (packet->pad3 != 42)) + { + LineToConsole ("Paradise.exe only works on paradise servers, either select a paradise server or use netrek.exe.\n"); + exit (0); + } +#else if ((packet->pad2 == 69) && (packet->pad3 == 42)) - paradise = 1; + { + LineToConsole ("Netrek.exe only works on non-paradise servers, either select a non-paradise server or use paradise.exe.\n"); + exit (0); + } #endif if (packet->accept) { @@ -3008,34 +3017,46 @@ } void handleThingy (struct thingy_spacket *packet) { -/* + struct thingy *thetorp; - //SANITY_THINGYNUM(ntohs(packet->tnum)); +#ifdef CORRUPTED_PACKETS + if (packet->tnum >= npthingies*nplayers + ngthingies) + { + LineToConsole ("handleThingy: bad index %d\n", packet->tnum); + return; + } +#endif thetorp = &thingies[ntohs(packet->tnum)]; thetorp->t_x = ntohl(packet->x); thetorp->t_y = ntohl(packet->y); - // printf("drone at %d, %d\n", thetorp->t_x, thetorp->t_y); + // LineToConsole("drone at %d, %d\n", thetorp->t_x, thetorp->t_y); thetorp->t_dir = packet->dir; - - if (rotate) { - rotate_gcenter(&thetorp->t_x, &thetorp->t_y); - rotate_dir(&thetorp->t_dir, rotate_deg); +#ifdef ROTATERACE + if (rotate) + { + rotate_coord (&thetorp->t_x, &thetorp->t_y, rotate_deg, GWIDTH / 2, + GWIDTH / 2); } +#endif if (thetorp->t_shape == SHP_WARP_BEACON) redrawall = 1; // shoot, route has changed -*/ } void handleThingyInfo (struct thingy_info_spacket *packet) { -/* struct thingy *thetorp; - //SANITY_THINGYNUM(ntohs(packet->tnum)); +#ifdef CORRUPTED_PACKETS + if (packet->tnum >= npthingies*nplayers + ngthingies) + { + LineToConsole ("handleThingyInfo: bad index %d\n", packet->tnum); + return; + } +#endif thetorp = &thingies[ntohs(packet->tnum)]; @@ -3046,7 +3067,7 @@ if (ntohs(packet->shape) == SHP_BOOM && thetorp->t_shape == SHP_BLANK) { // FAT: redundant explosion; don't update p_ntorp - // printf("texplode ignored\n"); + // LineToConsole("texplode ignored\n"); return; } @@ -3057,21 +3078,24 @@ players[thetorp->t_owner].p_ndrone--; } thetorp->t_war = packet->war; - if (ntohs(packet->shape) != thetorp->t_shape) { // FAT: prevent explosion reset int shape = ntohs(packet->shape); if(shape == SHP_BOOM || shape == SHP_PBOOM) { if(thetorp->t_shape == SHP_FIGHTER) + { shape = SHP_FBOOM; + thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 10); + } if(thetorp->t_shape == SHP_MISSILE) + { shape = SHP_DBOOM; - thetorp->t_fuse = BIGINT; + thetorp->t_fuse = MAX(2, BMP_DRONEDET_FRAMES * server_ups / 10); + } } thetorp->t_shape = shape; } -*/ } void handleScan (struct scan_spacket *packet) Index: dashboard3.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard3.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- dashboard3.c 13 Apr 2007 12:02:46 -0000 1.10 +++ dashboard3.c 18 May 2007 19:54:37 -0000 1.11 @@ -381,6 +381,14 @@ static int old_ful = -1; static float old_kills = -1; static int old_torp = -1; +#ifdef PARADISE + char buf[16]; + int i = 0; + static int old_drone = -1; + static int old_totmissiles = -1; + int drone; + int totmissiles; +#endif int cur_max, cur_arm, label_len; /* Was 75, too bad it wasn't defined as an even multiple of text width. */ register int BAR_LENGTH = W_Textwidth/2 + 12 * W_Textwidth; @@ -392,11 +400,19 @@ { kills = players[me->p_playerl].p_kills; torp = players[me->p_playerl].p_ntorp; +#ifdef PARADISE + drone = players[me->p_playerl].p_ndrone; + totmissiles = players[me->p_playerl].p_totmissiles; +#endif } else { kills = me->p_kills; torp = me->p_ntorp; +#ifdef PARADISE + drone = me->p_ndrone; + totmissiles = me->p_totmissiles; +#endif } if (fr) @@ -632,7 +648,32 @@ } old_torp = torp; } - + +#ifdef PARADISE + /* code to show the number of drones out */ + strcpy(buf, "M: "); + if (fr || totmissiles != old_totmissiles || drone != old_drone) + { + if (totmissiles > 0) + sprintf(buf + strlen(buf), "L%d ", totmissiles); + old_totmissiles = totmissiles; + if (drone > 0) + sprintf(buf + strlen(buf), "O%d", drone); + old_drone = drone; + if (!totmissiles && !drone) /* clear missile text */ + W_ClearArea(tstatw, 7 + BAR_LENGTH, 12 + 2 * W_Textheight, 10 * W_Textwidth, W_Textheight); + else + { + for (i = strlen(buf); i < 11; i++) + { + buf[i] = ' '; + buf[11] = 0; + } + W_WriteText(tstatw, 7 + BAR_LENGTH, 12 + 2 * W_Textheight, textColor, buf, 11, W_RegularFont); + } + } +#endif + old_spd = me->p_speed; old_cur_max = cur_max; old_shl = me->p_shield; Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- data.c 17 May 2007 08:49:48 -0000 1.93 +++ data.c 18 May 2007 19:54:37 -0000 1.94 @@ -26,6 +26,7 @@ struct status *status; #ifdef PARADISE struct status2 *status2; +struct thingy *thingies; #endif struct ship *myship; struct stats *mystats; @@ -274,12 +275,10 @@ extern double Sin[], Cos[]; #ifdef PARADISE -int paradise = 0; /* is the server a paradise server */ -int noParadiseBitmaps = 0; int gwidth = GWIDTH; /* galaxy width, adjusted for zoom [BDyess] */ int offsetx = 0; int offsety = 0; /* offsets when zooming [BDyess] */ -int nplayers = 36; +int nplayers = 256; int nshiptypes = 15; int ntorps = 8; int npthingies = 20; @@ -342,11 +341,21 @@ // Paradise bitmaps #ifdef PARADISE +W_Icon drone_bitmap, dronec_bitmap, mdronec_bitmap; +W_Icon base_drone_explosion_bitmap; +W_Icon drone_explosion_bitmap[BMP_DRONEDET_FRAMES]; +W_Icon base_dronec_explosion_bitmap; +W_Icon dronec_explosion_bitmap[BMP_DRONEDET_FRAMES]; +W_Icon gear_bitmap, mgear_bitmap; W_Icon base_star_bitmap; W_Icon star_bitmap[STAR_VIEWS]; W_Icon star_mbitmap; W_Icon paradise_ship_bitmaps; W_Icon paradise_ships[NUM_PSHIP_TYPES][NUMTEAMS]; +W_Icon paradise_cship_self_bitmaps; +W_Icon paradise_cships_self[NUM_PSHIP_TYPES][NUMTEAMS]; +W_Icon paradise_cship_bitmaps; +W_Icon paradise_cships[NUM_PSHIP_TYPES][NUMTEAMS]; #endif // Ships W_Icon ship_bitmaps[5]; Index: warning.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/warning.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- warning.c 28 Feb 2007 12:21:50 -0000 1.13 +++ warning.c 18 May 2007 19:54:39 -0000 1.14 @@ -145,4 +145,15 @@ if (doPhaser) W_MessageAllowedWindows (WAM_PHASER, 0, 0, textColor, newtext, warncount, 0); } +#ifdef PARADISE + if (strncmp(text, "Missile away", 12) == 0) { + /* missile total kludge. No value until one is shot :( */ + me->p_totmissiles = atoi(text + 13); + } else if (strcmp(text, "Prepping for warp jump") == 0) { + /* keep track of when in warp prep */ + me->p_flags |= PFWARPPREP; + } else if (strcmp(text, "Warp drive aborted") == 0) { + me->p_flags &= ~PFWARPPREP; + } +#endif } Index: inform.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/inform.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- inform.c 17 May 2007 08:49:48 -0000 1.5 +++ inform.c 18 May 2007 19:54:38 -0000 1.6 @@ -34,7 +34,7 @@ #ifdef PARADISE static char *my_classes[NUM_TYPES] = { - "SC", "DD", "CA", "BB", "AS", "SB", "GA", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" + "SC", "DD", "CA", "BB", "AS", "SB", "AT", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU", }; #else static char *my_classes[NUM_TYPES] = { Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- option.c 14 May 2007 02:56:41 -0000 1.49 +++ option.c 18 May 2007 19:54:38 -0000 1.50 @@ -784,6 +784,9 @@ for (i = 0; i < PLANET_VIEWS; i++) free (bplanets[i]); +#ifdef PARADISE + Planlib = "bitmaps/paradise/paradise_plan.bmp"; +#else switch (planetBitmap) { case 1: @@ -796,6 +799,7 @@ Planlib = "bitmaps/planlibm/plan.bmp"; break; } +#endif base_planets = W_StoreBitmap3 (Planlib, BMP_PLANET_WIDTH, BMP_PLANET_HEIGHT * 9, BMP_PLANET000, w, LR_MONOCHROME); @@ -816,7 +820,10 @@ for (i = 0; i < MPLANET_VIEWS; i++) free (bmplanets[i]); - + +#ifdef PARADISE + MPlanlib = "bitmaps/paradise/paradise_mplan.bmp"; +#else switch (planetBitmapGalaxy) { case 1: @@ -829,6 +836,7 @@ MPlanlib = "bitmaps/planlibm/mplan.bmp"; break; } +#endif base_mplanets = W_StoreBitmap3 (MPlanlib, BMP_MPLANET_WIDTH, BMP_MPLANET_HEIGHT * 9, BMP_MPLANET000, mapw, LR_MONOCHROME); Index: defaults.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- defaults.c 17 May 2007 08:49:48 -0000 1.86 +++ defaults.c 18 May 2007 19:54:37 -0000 1.87 @@ -31,7 +31,7 @@ {"bb", NULL, NULL, NULL, NULL}, {"as", NULL, NULL, NULL, NULL}, {"sb", NULL, NULL, NULL, NULL}, - {"ga", NULL, NULL, NULL, NULL}, + {"att", NULL, NULL, NULL, NULL}, {"js", NULL, NULL, NULL, NULL}, {"fl", NULL, NULL, NULL, NULL}, {"wb", NULL, NULL, NULL, NULL}, From modemhero at users.sourceforge.net Fri May 18 14:54:46 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 18 May 2007 19:54:46 +0000 Subject: [netrek-cvs] client/netrekxp/resources/ships/mono paradise_ships.bmp, 1.1, NONE Message-ID: <20070518195453.DFFDF1867D9@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/ships/mono In directory sc8-pr-cvs16:/tmp/cvs-serv25761/resources/ships/mono Removed Files: paradise_ships.bmp Log Message: Paradise changes: New folder in resources tree named paradise which contains all paradise related bitmaps. Added support for paradise shipyard graphics, stars, ships (mono and color), and missiles, Added several parallel defines to deal with the problem of overlapping defines (ie PFOBSERV overlap with PFWARP). Also things like planet graphics having more bitmap frames due to shipyards. It moves bronco and paradise compatability further apart, but only by keeping them separate can I attempt to get this to work, there's just too many conflicts to try to resolve. Moved flagship (frigate?) to overlap with galaxy class in array of ship types, seems best solution (overlap with AT was previous way). GA and FL/FR seem to be identical on the pserver. Added new keys for engage warp (J), toggle warp (^j) and afterburners (.). Apparently the bronco way of setting maxwarp (speed req to speed 99) is the paradise way of requesting to engage warp, so that had to be switched around a bit. As for changes that effect bronco: 1) Added new dashboard message types for paradise, caused renumbering of internal counter for impulse/stopped but this doesn't matter. 2) Found bug with plasma and torp fuses (mono) where the final frame was not being drawn due to logic error regarding fuses. 3) Added check during receiving login packet, if the proper pad bits are not set right, it will close client. So running netrek.exe, you can't connect to a paradise server. Running paradise.exe, you can't connect to a bronco server. Ideally would send user a popup box but ran into issue with that, it was continually polling the password entry screen so that popup box got sent behind the (now-frozen) netrek window. Could use some work, to close client properly AND send a popup box explaining why. --- paradise_ships.bmp DELETED --- From modemhero at users.sourceforge.net Fri May 18 14:54:38 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 18 May 2007 19:54:38 +0000 Subject: [netrek-cvs] client/netrekxp/include bitmaps.h, 1.19, 1.20 data.h, 1.86, 1.87 defs.h, 1.26, 1.27 proto.h, 1.56, 1.57 struct.h, 1.20, 1.21 Message-ID: <20070518195518.B33FEB3EA@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16:/tmp/cvs-serv25761/include Modified Files: bitmaps.h data.h defs.h proto.h struct.h Log Message: Paradise changes: New folder in resources tree named paradise which contains all paradise related bitmaps. Added support for paradise shipyard graphics, stars, ships (mono and color), and missiles, Added several parallel defines to deal with the problem of overlapping defines (ie PFOBSERV overlap with PFWARP). Also things like planet graphics having more bitmap frames due to shipyards. It moves bronco and paradise compatability further apart, but only by keeping them separate can I attempt to get this to work, there's just too many conflicts to try to resolve. Moved flagship (frigate?) to overlap with galaxy class in array of ship types, seems best solution (overlap with AT was previous way). GA and FL/FR seem to be identical on the pserver. Added new keys for engage warp (J), toggle warp (^j) and afterburners (.). Apparently the bronco way of setting maxwarp (speed req to speed 99) is the paradise way of requesting to engage warp, so that had to be switched around a bit. As for changes that effect bronco: 1) Added new dashboard message types for paradise, caused renumbering of internal counter for impulse/stopped but this doesn't matter. 2) Found bug with plasma and torp fuses (mono) where the final frame was not being drawn due to logic error regarding fuses. 3) Added check during receiving login packet, if the proper pad bits are not set right, it will close client. So running netrek.exe, you can't connect to a paradise server. Running paradise.exe, you can't connect to a bronco server. Ideally would send user a popup box but ran into issue with that, it was continually polling the password entry screen so that popup box got sent behind the (now-frozen) netrek window. Could use some work, to close client properly AND send a popup box explaining why. Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- defs.h 17 May 2007 08:49:47 -0000 1.26 +++ defs.h 18 May 2007 19:54:36 -0000 1.27 @@ -21,15 +21,6 @@ #define TERRAIN_STARTED 1 #define TERRAIN_DONE 2 -/* defs for timer [BDyess] */ -#define T_NONE 0 /* no timer */ -#define T_DAY 1 /* time of day */ -#define T_SERVER 2 /* time on server */ -#define T_SHIP 3 /* time in ship */ -#define T_USER 4 /* user reset timer */ -#define T_TOTAL 5 /* number of T_ defs */ -#define TIMESTRLEN 10 /* used in db_timer(), timeString() */ - /* defs for mapmode */ #define GMAP_NEVER 0 #define GMAP_FREQUENT 1 Index: bitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- bitmaps.h 17 May 2007 08:49:47 -0000 1.19 +++ bitmaps.h 18 May 2007 19:54:36 -0000 1.20 @@ -150,8 +150,13 @@ #define BMP_MPLANET_WIDTH 16 #define BMP_MPLANET_HEIGHT 16 +#ifdef PARADISE +#define PLANET_VIEWS 13 +#define MPLANET_VIEWS 13 +#else #define PLANET_VIEWS 9 #define MPLANET_VIEWS 9 +#endif // Color planets @@ -192,8 +197,21 @@ #define CPLANET_VIEWS 16 #ifdef PARADISE +#define BMP_DRONE 9 +#define BMP_DRONEC 10 +#define BMP_MDRONEC 11 +#define BMP_DRONE_WIDTH 6 +#define BMP_DRONE_HEIGHT 6 +#define BMP_DRONECLOUD 12 +#define BMP_DRONECLOUDC 13 +#define BMP_DRONEDET_FRAMES 5 +#define BMP_DRONEDET_WIDTH 13 +#define BMP_DRONEDET_HEIGHT 13 #define BMP_STAR 12 #define BMP_MSTAR 13 +#define BMP_GEARBMP 14 +#define BMP_GEAR_WIDTH 10 +#define BMP_GEAR_HEIGHT 10 #define BMP_STAR_WIDTH 30 #define BMP_STAR_HEIGHT 30 #define BMP_MSTAR_WIDTH 16 Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- data.h 17 May 2007 08:49:47 -0000 1.86 +++ data.h 18 May 2007 19:54:36 -0000 1.87 @@ -39,6 +39,7 @@ extern struct status *status; #ifdef PARADISE extern struct status2 *status2; +extern struct thingy *thingies; #endif extern struct ship *myship; extern struct stats *mystats; @@ -278,8 +279,6 @@ extern double Sin[], Cos[]; #ifdef PARADISE -extern int paradise; /* is the server a paradise server? */ -extern int noParadiseBitmaps; extern int gwidth; /* galaxy width, adjusted for zoom [BDyess] */ extern int offsetx; extern int offsety; /* offsets when zooming [BDyess] */ @@ -346,11 +345,21 @@ //Paradise bitmaps #ifdef PARADISE +extern W_Icon drone_bitmap, dronec_bitmap, mdronec_bitmap; +extern W_Icon base_drone_explosion_bitmap; +extern W_Icon drone_explosion_bitmap[BMP_DRONEDET_FRAMES]; +extern W_Icon base_dronec_explosion_bitmap; +extern W_Icon dronec_explosion_bitmap[BMP_DRONEDET_FRAMES]; +extern W_Icon gear_bitmap, mgear_bitmap; extern W_Icon base_star_bitmap; extern W_Icon star_bitmap[STAR_VIEWS]; extern W_Icon star_mbitmap; extern W_Icon paradise_ship_bitmaps; extern W_Icon paradise_ships[NUM_PSHIP_TYPES][NUMTEAMS]; +extern W_Icon paradise_cship_self_bitmaps; +extern W_Icon paradise_cships_self[NUM_PSHIP_TYPES][NUMTEAMS]; +extern W_Icon paradise_cship_bitmaps; +extern W_Icon paradise_cships[NUM_PSHIP_TYPES][NUMTEAMS]; #endif //Ships Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- struct.h 17 May 2007 08:49:47 -0000 1.20 +++ struct.h 18 May 2007 19:54:36 -0000 1.21 @@ -45,6 +45,18 @@ }; #ifdef PARADISE +struct thingy { + int t_no; + int t_shape; /* State information */ + int t_owner; + int t_x; + int t_y; + unsigned char t_dir; /* direction */ + int t_speed; /* Moving speed */ + int t_fuse; /* Life left in current state */ + char t_war; /* enemies */ +}; + struct status2 { /* paradise status struct */ int active; /* for interfacing with people who */ unsigned int wait, count; /* want to get into the game */ @@ -195,9 +207,12 @@ #define PFWPSUSPENDED (1<<29) /* warp prep suspended [BDyess] */ #define PFSNAKE (1<<30) /* it's a space snake */ #define PFBIRD (1<<31) /* it's a space bird */ -#endif +#define PFOBSERV (1<<31) /* set to something unused */ +#define PFTWARP (1<<31) /* set to something unused */ +#else #define PFOBSERV 0x8000000 /* for observers */ #define PFTWARP 0x40000000 /* transwarping to base */ +#endif #define KLOGIN 0x00 /* initial state */ #define KQUIT 0x01 /* Player quit */ @@ -215,13 +230,14 @@ #define KOVER 0x0d /* game over */ #define TOURNSTART 0x0e /* tournament game starting */ #define KBADBIN 0x0f /* bad binary */ -#define KTORP2 0x10 /* killed by detted torps */ -#define KSHIP2 0x11 /* chain-reaction explosions */ -#define KPLASMA2 0x12 /* killed by zapped plasma */ #ifdef PARADISE #define KMISSILE 0x10 /* missile, note the overlap with KTORP2! */ #define KASTEROID 0x11 /* asteroid, note the overlap with KSHIP2! */ +#else +#define KTORP2 0x10 /* killed by detted torps */ +#define KSHIP2 0x11 /* chain-reaction explosions */ #endif +#define KPLASMA2 0x12 /* killed by zapped plasma */ #ifdef PARADISE #define NUM_TYPES 15 @@ -234,9 +250,8 @@ #define ASSAULT 4 #define STARBASE 5 #define ATT 6 -#define SGALAXY 6 /* galaxy ships now supported - they look - extremely similar to flagships :) [BDyess] */ #define JUMPSHIP 7 +#define SGALAXY 8 /* Not sure where to put this .. */ #define FLAGSHIP 8 #define WARBASE 9 #define LIGHTCRUISER 10 @@ -400,6 +415,8 @@ short p_whodead; /* Tells you who killed you */ struct stats p_stats; /* player statistics */ #ifdef PARADISE + short p_ndrone; /* Number of drones .. why was this missing? */ + short p_totmissiles; /* number of total missiles [Bill Dyess] */ struct stats2 p_stats2; /* Paradise stats */ #endif short p_genoplanets; /* planets taken since last @@ -742,6 +759,9 @@ struct player players[MAXPLAYER]; struct torp torps[MAXPLAYER * MAXTORP]; struct plasmatorp plasmatorps[MAXPLAYER * MAXPLASMA]; +#ifdef PARADISE + struct thingy thingies[MAXPLAYER * 20]; // Arbitrary +#endif struct status status[1]; struct planet planets[MAXPLANETS]; struct phaser phasers[MAXPLAYER]; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- proto.h 17 May 2007 08:49:47 -0000 1.56 +++ proto.h 18 May 2007 19:54:36 -0000 1.57 @@ -400,6 +400,7 @@ Key197 (W_Event * data), Key198 (W_Event * data), Key200 (W_Event * data), + Key202 (W_Event * data), Key206 (W_Event * data), Key207 (W_Event * data), Key204 (W_Event * data), From modemhero at users.sourceforge.net Thu May 24 22:36:52 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 25 May 2007 03:36:52 +0000 Subject: [netrek-cvs] client/netrekxp/resources/paradise droneC.bmp, 1.1, NONE mdroneC.bmp, 1.1, NONE Message-ID: <20070525033702.1D04DB3FF@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/paradise In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18320/resources/paradise Removed Files: droneC.bmp mdroneC.bmp Log Message: Paradise only changes: 1) Colorized drone bitmaps by team. 2) Support for terrain, terrain info, status2, temp, exentension1, and game conf packets. 3) Support for ranks and royalties, including paradise rank window. Paradise changes with overall impact: 1) Added zdll.lib to linked libs, needed for uncompress of paradise terrain packets. Regular changes: 1) Wheel mouse up/down now is zoom in/out instead of accel/decel. 2) Bug fix for mono plasma and torp animations, last frame was being cut off. --- droneC.bmp DELETED --- --- mdroneC.bmp DELETED --- From modemhero at users.sourceforge.net Thu May 24 22:36:48 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 25 May 2007 03:36:48 +0000 Subject: [netrek-cvs] client/netrekxp/src/cursors curslib.suo,1.6,1.7 Message-ID: <20070525033726.8E2141867D2@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src/cursors In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18320/src/cursors Modified Files: curslib.suo Log Message: Paradise only changes: 1) Colorized drone bitmaps by team. 2) Support for terrain, terrain info, status2, temp, exentension1, and game conf packets. 3) Support for ranks and royalties, including paradise rank window. Paradise changes with overall impact: 1) Added zdll.lib to linked libs, needed for uncompress of paradise terrain packets. Regular changes: 1) Wheel mouse up/down now is zoom in/out instead of accel/decel. 2) Bug fix for mono plasma and torp animations, last frame was being cut off. Index: curslib.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/cursors/curslib.suo,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 Binary files /tmp/cvsIwcGtQ and /tmp/cvsXuIEzM differ From modemhero at users.sourceforge.net Thu May 24 22:36:47 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 25 May 2007 03:36:47 +0000 Subject: [netrek-cvs] client/netrekxp/resources/netrekrc netrekrc.txt, 1.1, 1.2 Message-ID: <20070525033726.738CE1867D0@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/netrekrc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18320/resources/netrekrc Modified Files: netrekrc.txt Log Message: Paradise only changes: 1) Colorized drone bitmaps by team. 2) Support for terrain, terrain info, status2, temp, exentension1, and game conf packets. 3) Support for ranks and royalties, including paradise rank window. Paradise changes with overall impact: 1) Added zdll.lib to linked libs, needed for uncompress of paradise terrain packets. Regular changes: 1) Wheel mouse up/down now is zoom in/out instead of accel/decel. 2) Bug fix for mono plasma and torp animations, last frame was being cut off. Index: netrekrc.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/netrekrc/netrekrc.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- netrekrc.txt 14 May 2007 02:56:42 -0000 1.1 +++ netrekrc.txt 25 May 2007 03:36:45 -0000 1.2 @@ -27,7 +27,7 @@ # wheel is button 6 and the down wheel is button 7. There is also support # for shifted, controled, and control-shifted mouse actions, see the netrek # help file for more details. -buttonmap: 1P2f3k6%70 +buttonmap: 1P2f3k # Key to switch to macro mode # TAB, ESC could be used too From modemhero at users.sourceforge.net Thu May 24 22:36:50 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 25 May 2007 03:36:50 +0000 Subject: [netrek-cvs] client/netrekxp/src dashboard.c, 1.23, 1.24 data.c, 1.94, 1.95 death.c, 1.20, 1.21 enter.c, 1.11, 1.12 input.c, 1.41, 1.42 local.c, 1.103, 1.104 mswindow.c, 1.84, 1.85 newwin.c, 1.65, 1.66 playerlist.c, 1.14, 1.15 ranklist.c, 1.3, 1.4 socket.c, 1.34, 1.35 Message-ID: <20070525033735.6C42DB409@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18320/src Modified Files: dashboard.c data.c death.c enter.c input.c local.c mswindow.c newwin.c playerlist.c ranklist.c socket.c Log Message: Paradise only changes: 1) Colorized drone bitmaps by team. 2) Support for terrain, terrain info, status2, temp, exentension1, and game conf packets. 3) Support for ranks and royalties, including paradise rank window. Paradise changes with overall impact: 1) Added zdll.lib to linked libs, needed for uncompress of paradise terrain packets. Regular changes: 1) Wheel mouse up/down now is zoom in/out instead of accel/decel. 2) Bug fix for mono plasma and torp animations, last frame was being cut off. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- mswindow.c 18 May 2007 19:54:38 -0000 1.84 +++ mswindow.c 25 May 2007 03:36:46 -0000 1.85 @@ -470,7 +470,7 @@ free (oriteam); free (clockpic); free (clockhandpic); - + for (j = 0; j < NUM_CTORP_TYPES; j++) { for (i = 0; i < BMP_TORPDET_FRAMES; i++) @@ -580,8 +580,9 @@ #ifdef PARADISE free (drone_bitmap); - free (dronec_bitmap); - free (mdronec_bitmap); + free (base_dronec_bitmap); + for (i = 0; i < NUM_CTORP_TYPES; i++) + free (dronec_bitmap[i]); free (base_drone_explosion_bitmap); for (i = 0; i < BMP_DRONEDET_FRAMES; i++) free (drone_explosion_bitmap[i]); Index: dashboard.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/dashboard.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- dashboard.c 18 May 2007 19:54:36 -0000 1.23 +++ dashboard.c 25 May 2007 03:36:46 -0000 1.24 @@ -1080,7 +1080,7 @@ int obs = 0; int shieldtime = 0; int hulltime = 0; - int shieldneeded, hullneeded; + int shieldneeded = 0, hullneeded = 0; float shieldrate = 0.0, hullrate = 0.0; short planet; struct player *plr; Index: newwin.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- newwin.c 18 May 2007 19:54:38 -0000 1.65 +++ newwin.c 25 May 2007 03:36:47 -0000 1.66 @@ -508,12 +508,12 @@ drone_bitmap = W_StoreBitmap3 ("bitmaps/paradise/drone.bmp", BMP_DRONE_WIDTH, BMP_DRONE_HEIGHT, BMP_DRONE, w, LR_MONOCHROME); - dronec_bitmap = - W_StoreBitmap3 ("bitmaps/paradise/droneC.bmp", BMP_DRONE_WIDTH, + base_dronec_bitmap = + W_StoreBitmap3 ("bitmaps/paradise/droneC.bmp", BMP_DRONE_WIDTH * NUM_CTORP_TYPES, BMP_DRONE_HEIGHT, BMP_DRONEC, w, LR_DEFAULTCOLOR); - mdronec_bitmap = - W_StoreBitmap3 ("bitmaps/paradise/mdroneC.bmp", BMP_DRONE_WIDTH, - BMP_DRONE_HEIGHT, BMP_MDRONEC, w, LR_DEFAULTCOLOR); + for (i = 0; i < NUM_CTORP_TYPES; i++) + dronec_bitmap[i] = + W_PointBitmap2 (base_dronec_bitmap, i, 0, BMP_DRONE_WIDTH, BMP_DRONE_HEIGHT); base_drone_explosion_bitmap = W_StoreBitmap3 ("bitmaps/paradise/dronecloud.bmp", BMP_DRONEDET_WIDTH, @@ -975,7 +975,11 @@ #endif W_SetWindowExposeHandler (planetw, planetlist); +#ifdef PARADISE + rankw = W_MakeTextWindow ("rank", 10, 100, 80, nranks2 + 9, baseWin, 2); +#else rankw = W_MakeTextWindow ("rank", 10, 300, 80, NUMRANKS + 9, baseWin, 2); +#endif W_SetWindowExposeHandler (rankw, ranklist); playerw = W_MakeTextWindow ("player", 0, TWINSIDE + 2 * THICKBORDER + STATSIZE + 2 * BORDER, @@ -1931,7 +1935,12 @@ { char buf[80]; +#ifdef PARADISE + sprintf (buf, "Welcome aboard %s!", + (me->p_stats2.st_royal == 0 ? ranks2[me->p_stats2.st_rank].name : royal[me->p_stats2.st_royal].name)); +#else sprintf (buf, "Welcome aboard %s!", ranks[me->p_stats.st_rank].name); +#endif warning (buf); } @@ -2273,7 +2282,7 @@ /*** ClearMotd() /*** Free the current motdData /******************************************************************************/ -ClearMotd (void) +void ClearMotd (void) { struct list *temp, *temp2; @@ -2285,6 +2294,9 @@ free (temp2->data); free (temp2); } +#ifdef PARADISE + // Probably need some stuff here from erase_motd() +#endif first = 1; /* so that it'll check bold * next time around */ Index: input.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- input.c 18 May 2007 19:54:38 -0000 1.41 +++ input.c 25 May 2007 03:36:46 -0000 1.42 @@ -1732,7 +1732,24 @@ bomb_planet (); #endif /* AUTOKEY */ } - + else if (data->key == W_WHEELUP) + { + scaleFactor -= 2; + if (scaleFactor < 10) + scaleFactor = 10; + W_FastClear = 1; + if (viewBox) + redrawall = 1; + } + else if (data->key == W_WHEELDOWN) + { + scaleFactor += 2; + if (scaleFactor > 40) + scaleFactor = 40; + W_FastClear = 1; + if (viewBox) + redrawall = 1; + } #ifdef SHIFTED_MOUSE else if (data->key == W_RBUTTON2) { Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- local.c 18 May 2007 19:54:38 -0000 1.103 +++ local.c 25 May 2007 03:36:46 -0000 1.104 @@ -2527,8 +2527,10 @@ void draw_one_thingy(struct thingy *k) { + struct player *j; int dx, dy; int frame; + int droneTeam; int view = scaleFactor * TWINSIDE / 2; if (k->t_shape == SHP_BLANK) @@ -2554,6 +2556,7 @@ frame = image->frames - k->t_fuse; break;*/ case SHP_MISSILE: + j = &players[k->t_owner]; #ifdef SOUND if (k->t_owner != me->p_no) { @@ -2566,16 +2569,54 @@ } } #endif - W_WriteScaleBitmap (dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor, - dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor, - BMP_DRONE_WIDTH * SCALE / scaleFactor, - BMP_DRONE_HEIGHT * SCALE / scaleFactor, - BMP_DRONE_WIDTH, - BMP_DRONE_HEIGHT, - (360 * k->t_dir/255), - (colorWeapons ? (myPlayer(&players[k->t_owner]) ? mdronec_bitmap : dronec_bitmap) : drone_bitmap), - playerColor (&players[k->t_owner]), - w); + if (colorWeapons) + { + if (myPlayer(j)) + droneTeam = 0; + else + { + switch (j->p_team) + { + case FED: + droneTeam = 1; + break; + case KLI: + droneTeam = 3; + break; + case ORI: + droneTeam = 4; + break; + case ROM: + droneTeam = 5; + break; + default: // IND + droneTeam = 2; + } + } + W_WriteScaleBitmap (dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor, + BMP_DRONE_WIDTH * SCALE / scaleFactor, + BMP_DRONE_HEIGHT * SCALE / scaleFactor, + BMP_DRONE_WIDTH, + BMP_DRONE_HEIGHT, + (360 * k->t_dir/255), + dronec_bitmap[droneTeam], + playerColor (j), + w); + } + else + { + W_WriteScaleBitmap (dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor, + dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor, + BMP_DRONE_WIDTH * SCALE / scaleFactor, + BMP_DRONE_HEIGHT * SCALE / scaleFactor, + BMP_DRONE_WIDTH, + BMP_DRONE_HEIGHT, + (360 * k->t_dir/255), + drone_bitmap, + playerColor (j), + w); + } clearzone[0][clearcount] = dx - (BMP_DRONE_WIDTH / 2) * SCALE / scaleFactor - 1; clearzone[1][clearcount] = dy - (BMP_DRONE_HEIGHT / 2) * SCALE / scaleFactor - 1; clearzone[2][clearcount] = BMP_DRONE_WIDTH * SCALE / scaleFactor + 2; @@ -2647,7 +2688,7 @@ BMP_DRONEDET_WIDTH, BMP_DRONEDET_HEIGHT, 0, - drone_explosion_bitmap[frame], + colorWeapons ? dronec_explosion_bitmap[frame] : drone_explosion_bitmap[frame], playerColor (&players[k->t_owner]), w); clearzone[0][clearcount] = dx - (BMP_DRONEDET_WIDTH / 2) * SCALE / scaleFactor ; Index: enter.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/enter.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- enter.c 18 May 2007 19:54:37 -0000 1.11 +++ enter.c 25 May 2007 03:36:46 -0000 1.12 @@ -53,6 +53,10 @@ plasmatorps = universe.plasmatorps; #ifdef PARADISE thingies = universe.thingies; + ranks2 = universe.ranks2; + teaminfo = universe.teaminfo; + royal = universe.royal; + status2 = universe.status2; #endif status = universe.status; planets = universe.planets; Index: death.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/death.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- death.c 17 May 2007 08:49:48 -0000 1.20 +++ death.c 25 May 2007 03:36:46 -0000 1.21 @@ -90,7 +90,11 @@ if (promoted) { sprintf (rankmessage, "Congratulations, You have scummed up to %s", +#ifdef PARADISE + ranks2[mystats->st_rank].name); +#else ranks[mystats->st_rank].name); +#endif W_WriteText (w, 50, 80, W_Yellow, rankmessage, strlen (rankmessage), W_BoldFont); } Index: playerlist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/playerlist.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- playerlist.c 18 May 2007 19:54:39 -0000 1.14 +++ playerlist.c 25 May 2007 03:36:47 -0000 1.15 @@ -1129,12 +1129,20 @@ break; case 'C': /* Curt (short) Rank */ +#ifdef PARADISE + format (buffPoint, (j->p_stats2.st_royal == 0 ? ranks2[j->p_stats2.st_rank].name : royal[j->p_stats2.st_royal].name), 10, 0); +#else format (buffPoint, ranks[j->p_stats.st_rank].cname, 4, 0); +#endif buffPoint += 4; break; case 'R': /* Rank */ +#ifdef PARADISE + format (buffPoint, (j->p_stats2.st_royal == 0 ? ranks2[j->p_stats2.st_rank].name : royal[j->p_stats2.st_royal].name), 10, 0); +#else format (buffPoint, ranks[j->p_stats.st_rank].name, 10, 0); +#endif buffPoint += 10; break; Index: ranklist.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/ranklist.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ranklist.c 2 Apr 2007 21:12:42 -0000 1.3 +++ ranklist.c 25 May 2007 03:36:47 -0000 1.4 @@ -72,9 +72,48 @@ return (-1); } +#ifdef PARADISE +void +print_ranks_paradise(void) +{ + register int i; + char buf[80]; + + W_ResizeTextWindow(rankw, 65, nranks2 + 8); + + (void) strcpy(buf, " Rank genocides DI battle strategy special ships"); + W_WriteText(rankw, 1, 1, textColor, buf, strlen(buf), W_BoldFont); + for (i = 0; i < nranks2; i++) { + sprintf(buf, "%-11.11s %5d %8.2f %8.2f %8.2f %7.2f", + ranks2[i].name, + ranks2[i].genocides, + ranks2[i].di, + ranks2[i].battle, + ranks2[i].strategy, + ranks2[i].specship); + if (mystats->st_rank == i) { + W_WriteText(rankw, 1, i + 2, W_Cyan, buf, strlen(buf), W_BoldFont); + } else { + W_WriteText(rankw, 1, i + 2, textColor, buf, strlen(buf), W_RegularFont); + } + } + strcpy(buf, "To achieve a rank, you need a high enough number of"); + W_WriteText(rankw, 1, i + 3, textColor, buf, strlen(buf), W_RegularFont); + strcpy(buf, "genocides, a high enough DI, a high enough battle"); + W_WriteText(rankw, 1, i + 4, textColor, buf, strlen(buf), W_RegularFont); + strcpy(buf, "rating, a high enough strategy rating, and a high"); + W_WriteText(rankw, 1, i + 5, textColor, buf, strlen(buf), W_RegularFont); + strcpy(buf, "enough special ship rating"); + W_WriteText(rankw, 1, i + 6, textColor, buf, strlen(buf), W_RegularFont); +} +#endif + void ranklist (void) { +#ifdef PARADISE + print_ranks_paradise(); +#else register int i; char buf[100]; @@ -126,4 +165,5 @@ strcpy (buf, "4xDI with Ratings - 2, and 8xDI with Ratings - 3"); W_WriteText (rankw, 1, i + 7, textColor, buf, strlen (buf), W_RegularFont); +#endif } Index: data.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- data.c 18 May 2007 19:54:37 -0000 1.94 +++ data.c 25 May 2007 03:36:46 -0000 1.95 @@ -27,6 +27,7 @@ #ifdef PARADISE struct status2 *status2; struct thingy *thingies; +struct t_unit *terrainInfo; #endif struct ship *myship; struct stats *mystats; @@ -275,6 +276,9 @@ extern double Sin[], Cos[]; #ifdef PARADISE +int received_terrain_info = 0; +int terrain_x; +int terrain_y; int gwidth = GWIDTH; /* galaxy width, adjusted for zoom [BDyess] */ int offsetx = 0; int offsety = 0; /* offsets when zooming [BDyess] */ @@ -341,7 +345,9 @@ // Paradise bitmaps #ifdef PARADISE -W_Icon drone_bitmap, dronec_bitmap, mdronec_bitmap; +W_Icon drone_bitmap; +W_Icon base_dronec_bitmap; +W_Icon dronec_bitmap[NUM_CTORP_TYPES]; W_Icon base_drone_explosion_bitmap; W_Icon drone_explosion_bitmap[BMP_DRONEDET_FRAMES]; W_Icon base_dronec_explosion_bitmap; @@ -440,6 +446,12 @@ {30.0, 7.0, 0.0, "Rear Adm.", "RAdm"}, {40.0, 8.0, 0.0, "Admiral", "Admr"} }; +#ifdef PARADISE +int nranks2 = 18; +struct rank2 *ranks2; +int nroyals = 5; +struct royalty *royal = 0; +#endif W_Window messagew, w, mapw, statwin, baseWin = 0, infow, tstatw, war, warnw, helpWin, teamWin[4], qwin, messwa, messwt, messwi, messwk, Index: socket.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- socket.c 18 May 2007 19:54:39 -0000 1.34 +++ socket.c 25 May 2007 03:36:47 -0000 1.35 @@ -19,6 +19,9 @@ #include #include #include +#ifdef PARADISE +#include +#endif #include "Wlib.h" #include "defs.h" @@ -2784,7 +2787,6 @@ void handleStatus2 (struct status_spacket2 *packet) { -/* updatePlayer[me->p_no] |= LARGE_UPDATE; if (infomapped && infotype == PLAYERTYPE && ((struct player *) infothing)->p_no == me->p_no) @@ -2806,7 +2808,6 @@ status2->jstime = ntohl(packet->jstime); status2->time = ntohl(packet->time); status2->timeprod = ntohl(packet->timeprod); -*/ } void handlePlanet2 (struct planet_spacket2 *packet) @@ -2852,7 +2853,7 @@ void handleTerrainInfo2 (struct terrain_info_packet2 *pkt) { -/* + #ifdef ZDIAG2 fprintf( stderr, "Receiving terrain info packet\n" ); fprintf( stderr, "Terrain dims: %d x %d\n", ntohs(pkt->xdim), ntohs(pkt->ydim) ); @@ -2860,12 +2861,11 @@ received_terrain_info = TERRAIN_STARTED; terrain_x = ntohs(pkt->xdim); terrain_y = ntohs(pkt->ydim); -*/ + }; void handleTerrain2 (struct terrain_packet2 *pkt) { -/* static int curseq = 0, totbytes = 0, done = 0; int i; #if defined(ZDIAG) || defined(ZDIAG2) @@ -2879,7 +2879,7 @@ static unsigned char *gzipTerrain = NULL, *orgTerrain = NULL; #ifdef ZDIAG2 - fprintf( stderr, "Receiving Terrain packet. This should be %d.\n", curseq+1 ); + LineToConsole("Receiving Terrain packet. This should be %d.\n", curseq+1 ); #endif if( (done == TERRAIN_DONE) && (received_terrain_info == TERRAIN_STARTED ) ){ @@ -2896,16 +2896,16 @@ if( (curseq != pkt->sequence) || !(received_terrain_info) ){ // Should fill in a list of all packets missed // or request header packet from server - fprintf( stderr, "Blech! Received terrain packet before terrain_info\n" ); + LineToConsole("Blech! Received terrain packet before terrain_info\n" ); return; } #ifdef ZDIAG2 - fprintf( stderr, "Receiving packet %d out of %d\n", curseq, pkt->total_pkts ); + LineToConsole("Receiving packet %d out of %d\n", curseq, pkt->total_pkts ); #endif if( !gzipTerrain ){ gzipTerrain = (unsigned char *)malloc( pkt->total_pkts << 7 ); #if defined(ZDIAG) || defined(ZDIAG2) - fprintf( stderr, "Allocating %d bytes for gzipTerrain.\n", pkt->total_pkts << 7 ); + LineToConsole("Allocating %d bytes for gzipTerrain.\n", pkt->total_pkts << 7 ); #endif // another yukko constant } @@ -2913,13 +2913,13 @@ orgTerrain = (unsigned char *)malloc( terrain_x*terrain_y ); dlen = terrain_x * terrain_y; #if defined(ZDIAG) || defined(ZDIAG2) - fprintf( stderr, "Allocating %d bytes for orgTerrain.\n", dlen ); + LineToConsole("Allocating %d bytes for orgTerrain.\n", dlen ); #endif } for( i = 0; i < pkt->length; i++ ){ #ifdef ZDIAG2 if( !(i%10) ){ - fprintf( stderr, "Params: %d, %d\n", ((curseq-1)<<7)+i, i ); + LineToConsole("Params: %d, %d\n", ((curseq-1)<<7)+i, i ); } #endif gzipTerrain[((curseq-1)<<7)+i] = pkt->terrain_type[i]; @@ -2930,23 +2930,23 @@ status = uncompress( orgTerrain, &dlen, gzipTerrain, totbytes ); if( status != Z_OK ){ if( status == Z_BUF_ERROR ){ - fprintf( stderr, "Unable to uncompress -- Z_BUF_ERROR.\n" ); + LineToConsole("Unable to uncompress -- Z_BUF_ERROR.\n" ); } if( status == Z_MEM_ERROR ){ - fprintf( stderr, "Unable to uncompress -- Z_MEM_ERROR.\n" ); + LineToConsole("Unable to uncompress -- Z_MEM_ERROR.\n" ); } if( status = Z_DATA_ERROR ){ - fprintf( stderr, "Unable to uncompress -- Z_DATA_ERROR!\n" ); + LineToConsole("Unable to uncompress -- Z_DATA_ERROR!\n" ); } } else{ - fprintf( stderr, "Total zipped terrain received: %d bytes\n", totbytes ); + LineToConsole("Total zipped terrain received: %d bytes\n", totbytes ); } #else uncompress( orgTerrain, &dlen, gzipTerrain, totbytes ); #endif terrainInfo = (struct t_unit *)malloc( dlen * sizeof( struct t_unit ) ); - for( i = 0; i < dlen; i++ ){ + for( i = 0; i < (long) dlen; i++ ){ terrainInfo[i].types = orgTerrain[i]; #ifdef ZDIAG2 sum |= orgTerrain[i]; @@ -2957,21 +2957,18 @@ } done = received_terrain_info = TERRAIN_DONE; #ifdef ZDIAG2 - fprintf( stderr, "Sum = %d, numnz = %d\n", sum, numnz ); + LineToConsole("Sum = %d, numnz = %d\n", sum, numnz ); #endif } -*/ } void handleTempPack (struct obvious_packet *packet) { -/* struct obvious_packet reply; - // printf("New MOTD info available\n"); - erase_motd(); + // LineToConsole("New MOTD info available\n"); + ClearMotd(); reply.type = CP_ASK_MOTD; sendServerPacket((struct player_spacket *) & reply); -*/ } /* handlers for the extension1 packet */ @@ -2993,13 +2990,10 @@ void handleExtension1 (struct paradiseext1_spacket *packet) { -/* switch (packet->subtype) { case SP_PE1_MISSING_BITMAP: { - struct pe1_missing_bitmap_spacket *pkt = - (struct pe1_missing_bitmap_spacket *) packet; - + struct pe1_missing_bitmap_spacket *pkt = (struct pe1_missing_bitmap_spacket *) packet; newMotdPic(ntohs(pkt->x), ntohs(pkt->y), ntohs(pkt->width), ntohs(pkt->height), 0, ntohs(pkt->page)); } break; @@ -3007,13 +3001,12 @@ me->p_totmissiles = ntohs(((struct pe1_num_missiles_spacket *) packet)->num); // printf("updated totmissiles to %d\n",me->p_totmissiles); if (me->p_totmissiles < 0) - me->p_totmissiles = 0; // SB/WB have + me->p_totmissiles = 0; // SB/WB have -1 break; default: printf("unknown paradise extension packet 1 subtype = %d\n", packet->subtype); } -*/ } void handleThingy (struct thingy_spacket *packet) { @@ -3133,7 +3126,7 @@ free_phasers(); free_plasmas(); free_thingies(); - +*/ nplayers = pkt->nplayers; number_of_teams = pkt->nteams; // shiptypes @@ -3144,7 +3137,7 @@ nplasmas = pkt->nplasmas; npthingies = pkt->nthingies; ngthingies = pkt->gthingies; - +/* // gwidth // flags @@ -3163,11 +3156,10 @@ void handleGPteam (struct gp_team_spacket *pkt) { -/* struct teaminfo_s *currteam; if ((int) pkt->index >= number_of_teams) { - fprintf(stderr, "Team #%d %s is out of range (0..%d)\n", pkt->index, + LineToConsole ("Team #%d %s is out of range (0..%d)\n", pkt->index, pkt->teamname, number_of_teams); return; } @@ -3180,25 +3172,23 @@ strncpy(currteam->name, pkt->teamname, sizeof(currteam->name) - 1); currteam->name[sizeof(currteam->name) - 1] = 0; -*/ } void handleGPteamlogo (struct gp_teamlogo_spacket *pkt) { -/* static char buf[13 * 99]; // 99x99 static int curr_height = 0; static int lwidth, lheight; static int teamindex; int pwidth; - if ((unsigned) pkt->teamindex >= number_of_teams) { - fprintf(stderr, "Team #%d is out of range (0..%d)\n", pkt->teamindex, + if (pkt->teamindex >= number_of_teams) { + LineToConsole ("Team #%d is out of range (0..%d)\n", pkt->teamindex, number_of_teams); return; } if (pkt->y != curr_height) { - fprintf(stderr, "Bad gp_teamlogo packet sequence y(%d) != curr_height(%d)\n", + LineToConsole ("Bad gp_teamlogo packet sequence y(%d) != curr_height(%d)\n", pkt->y, curr_height); curr_height = 0; return; @@ -3206,7 +3196,7 @@ if (curr_height) { if (lwidth != pkt->logowidth || lheight != pkt->logoheight || teamindex != pkt->teamindex) { - fprintf(stderr, "gp_teamlogo packet sequence error, %d!=%d || %d!=%d || %d!=%d\n", + LineToConsole ("gp_teamlogo packet sequence error, %d!=%d || %d!=%d || %d!=%d\n", lwidth, pkt->logowidth, lheight, pkt->logoheight, teamindex, pkt->teamindex); curr_height = 0; @@ -3217,7 +3207,7 @@ lwidth = pkt->logowidth; lheight = pkt->logoheight; if (lwidth > 99 || lheight > 99) { - fprintf(stderr, "logo too big (%dx%d), rejecting\n", lwidth, lheight); + LineToConsole ("logo too big (%dx%d), rejecting\n", lwidth, lheight); curr_height = 0; return; } @@ -3228,24 +3218,22 @@ curr_height += pkt->thisheight; if (curr_height >= lheight) { - W_FreeImage(teaminfo[teamindex].shield_logo); + free (teaminfo[teamindex].shield_logo); teaminfo[teamindex].shield_logo = - W_BitmapToImage(lwidth, lheight, buf); + W_StoreBitmap(lwidth, lheight, buf, w); curr_height = 0; } -*/ } void handleGPshipshape (struct gp_shipshape_spacket *pkt) { -/* if (pkt->race < -1 || pkt->race >= number_of_teams) { - fprintf(stderr, "race #%d out of range (-1..%d)\n", pkt->race, + LineToConsole ("race #%d out of range (-1..%d)\n", pkt->race, number_of_teams - 1); return; } if ( (int) pkt->shipno >= nshiptypes) { - fprintf(stderr, "ship class #%d out of range (0..%d)\n", pkt->shipno, + LineToConsole ("ship class #%d out of range (0..%d)\n", pkt->shipno, nshiptypes - 1); return; } @@ -3253,34 +3241,30 @@ replace_shipshape(pkt->race, pkt->shipno, pkt->nviews, pkt->width, pkt->height); #endif -*/ } void handleGPshipbitmap (struct gp_shipbitmap_spacket *pkt) { -/* if (pkt->race < -1 || pkt->race >= number_of_teams) { - fprintf(stderr, "race #%d out of range (-1..%d)\n", pkt->race, + LineToConsole ("race #%d out of range (-1..%d)\n", pkt->race, number_of_teams - 1); return; } if ( (int) pkt->shipno >= nshiptypes) { - fprintf(stderr, "ship class #%d out of range (0..%d)\n", pkt->shipno, + LineToConsole ("ship class #%d out of range (0..%d)\n", pkt->shipno, nshiptypes - 1); return; } #ifdef FIXME replace_ship_bitmap(pkt->race, pkt->shipno, pkt->thisview, pkt->bitmapdata); #endif -*/ } void handleGPrank (struct gp_rank_spacket *pkt) { -/* struct rank2 *curr; if (pkt->rankn >= nranks2) { - fprintf(stderr, "rank #%d %s out of range (0..%d)\n", pkt->rankn, + LineToConsole("rank #%d %s out of range (0..%d)\n", pkt->rankn, pkt->name, nranks2 - 1); return; } @@ -3288,25 +3272,22 @@ free(curr->name); curr->genocides = htonl(pkt->genocides); - curr->di = htonl(pkt->milliDI) / 1000.0; - curr->battle = htonl(pkt->millibattle) / 1000.0; - curr->strategy = htonl(pkt->millistrat) / 1000.0; - curr->specship = htonl(pkt->millispec) / 1000.0; + curr->di = htonl(pkt->milliDI) / (float) 1000.0; + curr->battle = htonl(pkt->millibattle) / (float) 1000.0; + curr->strategy = htonl(pkt->millistrat) / (float) 1000.0; + curr->specship = htonl(pkt->millispec) / (float) 1000.0; curr->name = strdup(pkt->name); -*/ } void handleGProyal (struct gp_royal_spacket *pkt) { -/* if ((int) pkt->rankn >= nroyals) { - fprintf(stderr, "Royalty #%d %s out of range (0..%d)\n", pkt->rankn, + LineToConsole("Royalty #%d %s out of range (0..%d)\n", pkt->rankn, pkt->name, nroyals - 1); return; } free(royal[pkt->rankn].name); royal[pkt->rankn].name = strdup(pkt->name); -*/ } #ifdef FIXME @@ -3329,7 +3310,6 @@ void handleGPteamplanet (struct gp_teamplanet_spacket *pkt) { -/* #ifdef FIXME { #define TACTICALSIZE sizeof(pkt->tactical) @@ -3375,7 +3355,6 @@ #undef GALACTICSIZE } #endif -*/ } void handleGameparams (struct gameparam_spacket *packet) From modemhero at users.sourceforge.net Thu May 24 22:36:46 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 25 May 2007 03:36:46 +0000 Subject: [netrek-cvs] client/netrekxp NetrekXP to do list.C, 1.148, 1.149 clientr.suo, 1.133, 1.134 clientr.vcproj, 1.11, 1.12 Message-ID: <20070525033725.106D2B3FF@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18320 Modified Files: NetrekXP to do list.C clientr.suo clientr.vcproj Log Message: Paradise only changes: 1) Colorized drone bitmaps by team. 2) Support for terrain, terrain info, status2, temp, exentension1, and game conf packets. 3) Support for ranks and royalties, including paradise rank window. Paradise changes with overall impact: 1) Added zdll.lib to linked libs, needed for uncompress of paradise terrain packets. Regular changes: 1) Wheel mouse up/down now is zoom in/out instead of accel/decel. 2) Bug fix for mono plasma and torp animations, last frame was being cut off. Index: clientr.suo =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.suo,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 Binary files /tmp/cvsdzVi1z and /tmp/cvsqe5BVq differ Index: clientr.vcproj =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/clientr.vcproj,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- clientr.vcproj 28 Feb 2007 09:35:18 -0000 1.11 +++ clientr.vcproj 25 May 2007 03:36:43 -0000 1.12 @@ -72,8 +72,8 @@ /> @@ -177,8 +177,8 @@ /> Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18320/include Modified Files: bitmaps.h data.h packets.h proto.h struct.h Log Message: Paradise only changes: 1) Colorized drone bitmaps by team. 2) Support for terrain, terrain info, status2, temp, exentension1, and game conf packets. 3) Support for ranks and royalties, including paradise rank window. Paradise changes with overall impact: 1) Added zdll.lib to linked libs, needed for uncompress of paradise terrain packets. Regular changes: 1) Wheel mouse up/down now is zoom in/out instead of accel/decel. 2) Bug fix for mono plasma and torp animations, last frame was being cut off. Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- data.h 18 May 2007 19:54:36 -0000 1.87 +++ data.h 25 May 2007 03:36:44 -0000 1.88 @@ -40,6 +40,7 @@ #ifdef PARADISE extern struct status2 *status2; extern struct thingy *thingies; +extern struct t_unit *terrainInfo; #endif extern struct ship *myship; extern struct stats *mystats; @@ -279,6 +280,9 @@ extern double Sin[], Cos[]; #ifdef PARADISE +extern int received_terrain_info; +extern int terrain_x; +extern int terrain_y; extern int gwidth; /* galaxy width, adjusted for zoom [BDyess] */ extern int offsetx; extern int offsety; /* offsets when zooming [BDyess] */ @@ -345,7 +349,9 @@ //Paradise bitmaps #ifdef PARADISE -extern W_Icon drone_bitmap, dronec_bitmap, mdronec_bitmap; +extern W_Icon drone_bitmap; +extern W_Icon base_dronec_bitmap; +extern W_Icon dronec_bitmap[NUM_CTORP_TYPES]; extern W_Icon base_drone_explosion_bitmap; extern W_Icon drone_explosion_bitmap[BMP_DRONEDET_FRAMES]; extern W_Icon base_dronec_explosion_bitmap; @@ -427,6 +433,12 @@ extern char login[PSEUDOSIZE]; extern struct rank ranks[NUMRANKS]; +#ifdef PARADISE +extern struct rank2 *ranks2; +extern struct royalty *royal; +extern int nranks2; +extern int nroyals; +#endif extern W_Window messagew, w, mapw, statwin, baseWin, infow, tstatw, war, warnw, helpWin, teamWin[4], qwin, messwa, messwt, messwi, Index: bitmaps.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/bitmaps.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- bitmaps.h 18 May 2007 19:54:36 -0000 1.20 +++ bitmaps.h 25 May 2007 03:36:44 -0000 1.21 @@ -199,7 +199,6 @@ #ifdef PARADISE #define BMP_DRONE 9 #define BMP_DRONEC 10 -#define BMP_MDRONEC 11 #define BMP_DRONE_WIDTH 6 #define BMP_DRONE_HEIGHT 6 #define BMP_DRONECLOUD 12 Index: packets.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- packets.h 17 May 2007 08:49:47 -0000 1.9 +++ packets.h 25 May 2007 03:36:44 -0000 1.10 @@ -199,6 +199,10 @@ * verification */ #endif +#ifdef PARADISE +/* the CP_ASK_MOTD packet is the same as temp_spacket */ +#define CP_ASK_MOTD 38 /* request MOTD */ +#endif #define CP_PLANET 38 /* cross-check planet info */ #define CP_PING_RESPONSE 42 /* client response */ Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- struct.h 18 May 2007 19:54:36 -0000 1.21 +++ struct.h 25 May 2007 03:36:44 -0000 1.22 @@ -93,6 +93,12 @@ char shortname[4]; /* 3-letter abbreviation */ }; +struct t_unit { +/* int alt1;*/ +/* int alt2;*/ /* Terrain types. */ + char types; +}; + /* MOTD structures */ struct piclist { int page; @@ -754,6 +760,22 @@ char *name, *cname; }; +#ifdef PARADISE +struct rank2 { /* Paradise ranks */ + int genocides; /* minimum number of genocides */ + float di; /* minimum destruction inflicted */ + float battle; /* minimum battle ratings */ + float strategy; /* minimum strategy ratings */ + float specship; /* minimum total ratings in a specialty */ + /* ship SB + WB + JS */ + char *name; /* name of this rank */ +}; + +struct royalty { /* Paradise royalty ranks */ + char *name; /* name of rank */ +}; +#endif + struct memory { struct player players[MAXPLAYER]; @@ -761,6 +783,10 @@ struct plasmatorp plasmatorps[MAXPLAYER * MAXPLASMA]; #ifdef PARADISE struct thingy thingies[MAXPLAYER * 20]; // Arbitrary + struct rank2 ranks2[30]; // Arbitrary + struct teaminfo_s teaminfo[6]; // Arbitrary + struct royalty royal[5]; // Arbitrary + struct status2 status2[1]; // Arbitrary #endif struct status status[1]; struct planet planets[MAXPLANETS]; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- proto.h 18 May 2007 19:54:36 -0000 1.57 +++ proto.h 25 May 2007 03:36:44 -0000 1.58 @@ -820,6 +820,7 @@ int realNumShips (int owner); int deadTeam (int owner); int checkBold (char *line); +void ClearMotd (void); void showMotdWin (W_Window motdwin, int atline); struct list; void showValues (struct list *data); From modemhero at users.sourceforge.net Thu May 24 22:36:47 2007 From: modemhero at users.sourceforge.net (Bill Balcerski) Date: Fri, 25 May 2007 03:36:47 +0000 Subject: [netrek-cvs] client/netrekxp/resources/docs changes.txt, 1.197, 1.198 Message-ID: <20070525033725.E11CAB403@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/resources/docs In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18320/resources/docs Modified Files: changes.txt Log Message: Paradise only changes: 1) Colorized drone bitmaps by team. 2) Support for terrain, terrain info, status2, temp, exentension1, and game conf packets. 3) Support for ranks and royalties, including paradise rank window. Paradise changes with overall impact: 1) Added zdll.lib to linked libs, needed for uncompress of paradise terrain packets. Regular changes: 1) Wheel mouse up/down now is zoom in/out instead of accel/decel. 2) Bug fix for mono plasma and torp animations, last frame was being cut off. Index: changes.txt =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/resources/docs/changes.txt,v retrieving revision 1.197 retrieving revision 1.198 diff -u -d -r1.197 -r1.198 --- changes.txt 16 May 2007 00:05:13 -0000 1.197 +++ changes.txt 25 May 2007 03:36:45 -0000 1.198 @@ -9,8 +9,9 @@ 4) Added ability to update buttonmap through the options menu. 5) Restored ability for middle and right mouse clicks to raise the current window to the top, helps with overlapped windows. -6) Default buttonmap now uses mouse wheel for accel/decel, scroll up to -accelerate to max, scroll down to decelerate to warp 0. +6) Added new function keys, control-z and control-a, for zooming. Control-z +zooms in, and control-a zooms out. As part of the benefit of having all +graphics scale, ALL ship bitmap sets can now show ships to 256 positions. 7) Left clicking on message window will either a) start a new message to all board or b) continue current pending message. 8) Message window will now say "Click here to send a message to ALL" until any @@ -29,9 +30,8 @@ 11) Most netrekrc window's geometries are now commented out (all except map and local), this is because adjusting the size of local or map will now do a pretty good job of autoplacing all the other windows for you. -12) Added new function keys, control-z and control-a, for zooming. Control-z -zooms in, and control-a zooms out. As part of the benefit of having all -graphics scale, ALL ship bitmap sets can now show ships to 256 positions. +12) Default mouse wheel action is now zoom in and out, scroll up to zoom in, +scroll down to zoom out. 13) Added richtext message windows, which allow stuff like cut and paste from within the message windows, and clickable URLs. Richtext message windows are both resizeable and moveable. Moving them works a little different than moving @@ -144,6 +144,8 @@ and adjusts default playback speed accordingly. 19) Cambot now uses double buffering during playback, so that everything looks smoother. +20) Fixed bug with mono torps and plasmas that was causing final animation frame +to not draw on servers running 10 FPS. New features: 1) Main window titlebar now shows your loginname and slot number, in addition From playnetrek at users.sourceforge.net Tue May 15 20:12:23 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Wed, 16 May 2007 01:12:23 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program netrekconfigxp2006.vbp, NONE, 1.1 netrekconfigxp2006.vbw, NONE, 1.1 netrekrc.cfg, NONE, 1.1 Message-ID: <20070516011233.A53B6B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv7867 Added Files: netrekconfigxp2006.vbp netrekconfigxp2006.vbw netrekrc.cfg Log Message: --- NEW FILE: netrekconfigxp2006.vbw --- Form3 = 52, 110, 847, 630, , -62, -9, 651, 494, C Form1 = 254, 308, 947, 952, , 44, 44, 805, 688, C --- NEW FILE: netrekconfigxp2006.vbp --- Type=Exe Form=Form3.frm Form=Form1.frm IconForm="Form3" Startup="Form3" HelpFile="" Title="netrekconfig" ExeName32="netrekconfigXP2006.exe" Path32="..\..\..\NetrekConfig2006" Command32="" Name="Netrek_XP_2006_Configurator" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=4 AutoIncrementVer=0 ServerSupportFiles=0 VersionComments="Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.4 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. To contact the author email joe at playnetrek.org" VersionCompanyName="www.PlayNetrek.org" VersionProductName="Netrek XP 2006 Configuration Program" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 DebugStartupOption=0 [MS Transaction Server] AutoRefresh=1 --- NEW FILE: netrekrc.cfg --- # Default character name name: guest # Default password password: # Login name login: netrek_player # Key to switch to macro mode # TAB, ESC could be used too macroKey: X # Show AGRI planet names in caps on map agriCAPS: on # Color of AGRI planet name on the map # 0 - owner race color # 1 - white [...1027 lines suppressed...] # Color settings color.white: white color.black: black color.red: red color.green: green color.yellow: yellow color.cyan: cyan color.light grey: gray63 color.God: white color.Rom: red color.Kli: green color.Fed: yellow color.Ori: cyan color.Ind: gray63 # Esoteric features such as individual ship rcfiles/keymaps # /ckeymaps/buttonmaps (i.e. keymap-ca: ), observer # /servertype options (i.e. keymap.bronco: ), and # button keymaps (b1keymap through b5keymap) From playnetrek at users.sourceforge.net Tue May 15 20:10:49 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Wed, 16 May 2007 01:10:49 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form1.frm, 1.7, 1.8 Message-ID: <20070516011102.A382AB3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv6916 Modified Files: Form1.frm Log Message: Index: Form1.frm =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/Form1.frm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Form1.frm 16 Apr 2007 02:13:40 -0000 1.7 +++ Form1.frm 16 May 2007 01:10:46 -0000 1.8 @@ -25,7 +25,7 @@ ForeColor = &H8000000E& Height = 195 Left = 7440 - TabIndex = 89 + TabIndex = 88 ToolTipText = "Turns your sound on. For better quality enable layered stereo sound." Top = 8640 Value = 1 'Checked @@ -46,7 +46,7 @@ ForeColor = &H00FFFFFF& Height = 195 Left = 7440 - TabIndex = 88 + TabIndex = 87 ToolTipText = "Shows a circle around your ship, you can Destroy Enemy Torpedoes that are in this circle." Top = 8160 Width = 2415 @@ -67,7 +67,7 @@ Height = 195 Left = 7440 MaskColor = &H00FFFFFF& - TabIndex = 87 + TabIndex = 86 ToolTipText = "Shows your speed next to your ship on the local map." Top = 8400 Value = 1 'Checked @@ -88,7 +88,7 @@ ForeColor = &H8000000E& Height = 195 Left = 7440 - TabIndex = 86 + TabIndex = 85 ToolTipText = "Shows star streaks when tawrping to your base." Top = 7920 Value = 1 'Checked @@ -109,7 +109,7 @@ ForeColor = &H8000000E& Height = 195 Left = 7440 - TabIndex = 85 + TabIndex = 84 ToolTipText = "Shows stars in the background on your local map." Top = 8880 Value = 1 'Checked @@ -130,7 +130,7 @@ ForeColor = &H00FFFFFF& Height = 255 Left = 7440 - TabIndex = 84 + TabIndex = 83 Top = 9120 Width = 2415 End @@ -139,7 +139,7 @@ ItemData = "Form1.frx":08CA Left = 8880 List = "Form1.frx":08D4 - TabIndex = 83 + TabIndex = 82 Text = "Phasers" Top = 5520 Width = 1935 @@ -149,7 +149,7 @@ Index = 30 Left = 9840 MaxLength = 11 - TabIndex = 81 + TabIndex = 80 Text = "Space Bar" Top = 6960 Width = 855 @@ -159,7 +159,7 @@ Index = 29 Left = 9840 MaxLength = 1 - TabIndex = 80 + TabIndex = 79 Text = "v" Top = 6600 Width = 495 @@ -169,7 +169,7 @@ Index = 28 Left = 9840 MaxLength = 1 - TabIndex = 79 + TabIndex = 78 Text = "V" Top = 6240 Width = 495 @@ -179,7 +179,7 @@ Index = 0 Left = 2160 MaxLength = 1 - TabIndex = 34 + TabIndex = 33 Text = "t" Top = 4680 Width = 495 @@ -197,7 +197,7 @@ EndProperty Height = 255 Left = 5640 - TabIndex = 33 + TabIndex = 32 Top = 10080 Width = 1095 End @@ -206,7 +206,7 @@ ItemData = "Form1.frx":08EC Left = 8880 List = "Form1.frx":08F6 - TabIndex = 32 + TabIndex = 31 Text = "Torpedoes" Top = 5160 Width = 1935 @@ -216,7 +216,7 @@ Index = 1 Left = 2160 MaxLength = 1 - TabIndex = 31 + TabIndex = 30 Text = "p" Top = 5040 Width = 495 @@ -226,7 +226,7 @@ Index = 2 Left = 2160 MaxLength = 1 - TabIndex = 30 + TabIndex = 29 Text = "s" Top = 5880 Width = 495 @@ -236,7 +236,7 @@ Index = 3 Left = 2160 MaxLength = 1 - TabIndex = 29 + TabIndex = 28 Text = "b" Top = 6240 Width = 495 @@ -246,7 +246,7 @@ Index = 4 Left = 2160 MaxLength = 1 - TabIndex = 28 + TabIndex = 27 Text = "c" Top = 6600 Width = 495 @@ -256,7 +256,7 @@ Index = 5 Left = 2160 MaxLength = 1 - TabIndex = 27 + TabIndex = 26 Text = "x" Top = 7440 Width = 495 @@ -266,7 +266,7 @@ Index = 6 Left = 2160 MaxLength = 1 - TabIndex = 26 + TabIndex = 25 Text = "z" Top = 7800 Width = 495 @@ -276,7 +276,7 @@ Index = 7 Left = 6360 MaxLength = 1 - TabIndex = 25 + TabIndex = 24 Text = "^" Top = 7080 Width = 495 @@ -286,7 +286,7 @@ Index = 8 Left = 6360 MaxLength = 1 - TabIndex = 24 + TabIndex = 23 Text = "_" Top = 7440 Width = 495 @@ -296,7 +296,7 @@ Index = 9 Left = 2160 MaxLength = 1 - TabIndex = 23 + TabIndex = 22 Text = "%" Top = 8280 Width = 495 @@ -306,7 +306,7 @@ Index = 10 Left = 2160 MaxLength = 1 - TabIndex = 22 + TabIndex = 21 Text = "#" Top = 8640 Width = 495 @@ -316,7 +316,7 @@ Index = 11 Left = 2160 MaxLength = 1 - TabIndex = 21 + TabIndex = 20 Text = "R" Top = 6960 Width = 495 @@ -326,7 +326,7 @@ Index = 12 Left = 6360 MaxLength = 1 - TabIndex = 20 + TabIndex = 19 Text = "r" Top = 4680 Width = 495 @@ -336,7 +336,7 @@ Index = 13 Left = 6360 MaxLength = 1 - TabIndex = 19 + TabIndex = 18 Text = "l" Top = 5040 Width = 495 @@ -346,7 +346,7 @@ Index = 14 Left = 6360 MaxLength = 1 - TabIndex = 18 + TabIndex = 17 Text = "i" Top = 5400 Width = 495 @@ -356,7 +356,7 @@ Index = 15 Left = 6360 MaxLength = 1 - TabIndex = 17 + TabIndex = 16 Text = "q" Top = 9360 Width = 495 @@ -366,7 +366,7 @@ Index = 16 Left = 6360 MaxLength = 1 - TabIndex = 16 + TabIndex = 15 Text = "D" Top = 6240 Width = 495 @@ -376,7 +376,7 @@ Index = 17 Left = 6360 MaxLength = 11 - TabIndex = 15 + TabIndex = 14 Text = "d" Top = 6600 Width = 495 @@ -386,7 +386,7 @@ Index = 18 Left = 2160 MaxLength = 1 - TabIndex = 14 + TabIndex = 13 Text = "f" Top = 5400 Width = 495 @@ -396,7 +396,7 @@ Index = 19 Left = 2160 MaxLength = 1 - TabIndex = 13 + TabIndex = 12 Text = "0" Top = 9000 Width = 495 @@ -406,7 +406,7 @@ Index = 20 Left = 2160 MaxLength = 1 - TabIndex = 12 + TabIndex = 11 Text = "2" Top = 9360 Width = 495 @@ -416,7 +416,7 @@ Index = 21 Left = 2160 MaxLength = 1 - TabIndex = 11 + TabIndex = 10 Text = "3" Top = 9720 Width = 495 @@ -426,7 +426,7 @@ Index = 22 Left = 2160 MaxLength = 1 - TabIndex = 10 + TabIndex = 9 Text = "4" Top = 10080 Width = 495 @@ -436,7 +436,7 @@ Index = 23 Left = 6360 MaxLength = 1 - TabIndex = 9 + TabIndex = 8 Text = "w" Top = 5760 Width = 495 @@ -446,7 +446,7 @@ Index = 24 Left = 6360 MaxLength = 1 - TabIndex = 8 + TabIndex = 7 Text = "y" Top = 7800 Width = 495 @@ -466,21 +466,12 @@ ForeColor = &H8000000E& Height = 195 Left = 7440 - TabIndex = 7 + TabIndex = 6 ToolTipText = $"Form1.frx":090E Top = 7680 Value = 1 'Checked Width = 2175 End - Begin VB.TextBox Text2 - Height = 285 - Left = 0 - TabIndex = 6 - Text = "playnetrek.org" - Top = 10440 - Visible = 0 'False - Width = 1935 - End Begin VB.CommandButton Command2 Caption = "Cancel" BeginProperty Font @@ -597,7 +588,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7560 - TabIndex = 82 + TabIndex = 81 Top = 5520 Width = 1215 End @@ -616,7 +607,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7440 - TabIndex = 78 + TabIndex = 77 Top = 7080 Width = 2295 End @@ -635,7 +626,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7440 - TabIndex = 77 + TabIndex = 76 Top = 6720 Width = 1575 End @@ -654,7 +645,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7440 - TabIndex = 76 + TabIndex = 75 Top = 6360 Width = 1575 End @@ -673,7 +664,7 @@ ForeColor = &H00FFFFFF& Height = 135 Left = 4800 - TabIndex = 75 + TabIndex = 74 Top = 10560 Width = 1455 End @@ -706,7 +697,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 74 + TabIndex = 73 Top = 4680 Width = 1575 End @@ -725,7 +716,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 73 + TabIndex = 72 Top = 5880 Width = 1455 End @@ -744,7 +735,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 72 + TabIndex = 71 Top = 6600 Width = 1455 End @@ -763,7 +754,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 71 + TabIndex = 70 Top = 6240 Width = 1455 End @@ -782,7 +773,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 70 + TabIndex = 69 Top = 6240 Width = 2175 End @@ -801,7 +792,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 69 + TabIndex = 68 Top = 6600 Width = 2295 End @@ -820,7 +811,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 68 + TabIndex = 67 Top = 7440 Width = 1575 End @@ -839,7 +830,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 67 + TabIndex = 66 Top = 5040 Width = 1575 WordWrap = -1 'True @@ -859,7 +850,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 66 + TabIndex = 65 Top = 5400 Width = 1455 End @@ -878,7 +869,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 65 + TabIndex = 64 Top = 5040 Width = 2055 End @@ -897,7 +888,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 64 + TabIndex = 63 Top = 6960 Width = 1455 End @@ -916,7 +907,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 63 + TabIndex = 62 Top = 9360 Width = 1575 End @@ -935,7 +926,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 62 + TabIndex = 61 Top = 7440 Width = 2175 End @@ -954,7 +945,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 61 + TabIndex = 60 Top = 5400 Width = 2175 End @@ -973,7 +964,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 60 + TabIndex = 59 Top = 8640 Width = 1575 End @@ -992,7 +983,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 59 + TabIndex = 58 Top = 8280 Width = 1575 End @@ -1011,7 +1002,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 58 + TabIndex = 57 Top = 4680 Width = 2175 End @@ -1030,7 +1021,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 57 + TabIndex = 56 Top = 9720 Width = 1455 End @@ -1049,7 +1040,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 56 + TabIndex = 55 Top = 7080 Width = 2175 End @@ -1068,7 +1059,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 55 + TabIndex = 54 Top = 7800 Width = 1575 End @@ -1087,7 +1078,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 54 + TabIndex = 53 Top = 10080 Width = 1095 End @@ -1106,7 +1097,7 @@ ForeColor = &H8000000E& Height = 255 Left = 480 - TabIndex = 53 + TabIndex = 52 Top = 9000 Width = 1455 End @@ -1125,7 +1116,7 @@ ForeColor = &H00FFFFFF& Height = 1215 Left = 120 - TabIndex = 52 + TabIndex = 51 Top = 1080 Width = 10695 End @@ -1144,7 +1135,7 @@ ForeColor = &H00C0C000& Height = 255 Left = 120 - TabIndex = 51 + TabIndex = 50 Top = 3960 Width = 2535 End @@ -1163,7 +1154,7 @@ ForeColor = &H00FFFF00& Height = 255 Left = 480 - TabIndex = 50 + TabIndex = 49 Top = 4320 Width = 855 End @@ -1182,7 +1173,7 @@ ForeColor = &H00808000& Height = 255 Left = 2160 - TabIndex = 49 + TabIndex = 48 Top = 4320 Width = 1575 End @@ -1201,7 +1192,7 @@ ForeColor = &H00FFFF00& Height = 255 Left = 4080 - TabIndex = 48 + TabIndex = 47 Top = 4320 Width = 855 End @@ -1220,7 +1211,7 @@ ForeColor = &H00808000& Height = 255 Left = 6480 - TabIndex = 47 + TabIndex = 46 Top = 4320 Width = 1575 End @@ -1246,7 +1237,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7560 - TabIndex = 46 + TabIndex = 45 Top = 5160 Width = 1215 End @@ -1272,7 +1263,7 @@ ForeColor = &H00C0C000& Height = 375 Left = 7560 - TabIndex = 45 + TabIndex = 44 Top = 4680 Width = 2055 End @@ -1291,7 +1282,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 44 + TabIndex = 43 Top = 9480 Width = 615 End @@ -1317,7 +1308,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 43 + TabIndex = 42 Top = 5760 Width = 2175 End @@ -1336,7 +1327,7 @@ ForeColor = &H8000000E& Height = 375 Left = 4080 - TabIndex = 42 + TabIndex = 41 Top = 7800 Width = 2175 End @@ -1355,7 +1346,7 @@ ForeColor = &H00C0C000& Height = 375 Left = 7440 - TabIndex = 41 + TabIndex = 40 Top = 6000 Width = 2055 End @@ -1374,7 +1365,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 40 + TabIndex = 39 Top = 8400 Width = 1095 End @@ -1393,7 +1384,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 39 + TabIndex = 38 Top = 8760 Width = 1215 End @@ -1412,7 +1403,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 38 + TabIndex = 37 Top = 9120 Width = 1935 End @@ -1422,7 +1413,7 @@ ForeColor = &H00FFFFFF& Height = 255 Left = 120 - TabIndex = 37 + TabIndex = 36 Top = 2400 Width = 10695 End @@ -1441,7 +1432,7 @@ ForeColor = &H00C0C000& Height = 375 Left = 120 - TabIndex = 36 + TabIndex = 35 Top = 3000 Width = 2775 End @@ -1451,7 +1442,7 @@ ForeColor = &H00FFFFFF& Height = 615 Left = 3000 - TabIndex = 35 + TabIndex = 34 Top = 3120 Width = 7575 End @@ -1461,7 +1452,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.3 +'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.4 ' 'This program is free software; you can redistribute it and/or 'modify it under the terms of the GNU General Public License @@ -1491,9 +1482,21 @@ ' a Windows client. Also feel free to use the logic in this code to create a config utility for another OS. It ' took a while to put the keymap portion of this together but it works well. I only ask that if any modifications ' are made you also make your code changes available to the community and give me a mention as a contributor +' +' Special thanks to Bill Barcerski for helping me out with the Classic Mode configuration addition and helping test +' +' Program notes from Joe - 5/15/07 +' Removed the repeated append functionality and replaced it with an imported rc file with default setting. +' Options available in the config utility are added at the bottom of the file. These options are excluded from the +' imported file and appended only once to the bottom of the imported rc file. Options are now only specified one time. +' If a netrekrc file already exists it is save in the netrek root install folder as netrek.sav +' In order for the program to function there will need to be a file named netrekrc in the root of where it is executed +' and a file named netrekrc.cfg in the docs folder. Fixed several bugs that have been reported. -'Checks if Classic Mode is enabled and swaps the Classic Mode graphic + + +'swaps the classic mode/xp mode images when the checkbox value changes Private Sub Check1_Click() If (Check1.Value = vbChecked) Then @@ -1508,8 +1511,12 @@ -'Keymap configuration + Private Sub Command1_Click() + +'Saves your current netrekrc to netrekrc.sav and copies a static netrek config file from the docs directory + FileCopy ".\netrekrc", ".\netrekrc.sav" + FileCopy ".\docs\netrekrc.cfg", ".\netrekrc" Dim warp As Integer Dim det As Integer @@ -1621,10 +1628,13 @@ Dim a As Integer Dim b As Integer Dim c As Integer - + Dim d As Integer + Dim duplicate As Integer Dim speckey As Integer + Dim blank As Integer + Dim currentdate As String @@ -1755,6 +1765,8 @@ End If +'Keymap configuration + If torpedo = Text1(0) Then keymap1 = "" Else @@ -1942,10 +1954,11 @@ classicmode = 0 End If -'Error checking for duplicate keymaps +'Error checking for duplicate keymaps and blank values speckey = 0 duplicate = 0 + blank = 0 For a = 0 To 30 For b = 0 To 30 If a <> b And Text1(a) = Text1(b) Then @@ -1969,9 +1982,19 @@ Exit For End If Next c + + For d = 0 To 30 + If Text1(d) = "" Then + blank = 1 + End If + If blank = 1 Then + MsgBox "Blank values are not allowed. If you meant to assign a key to the space bar please go to the key you would like to assign and enter a space by pressing the space bar" + Exit For + End If + Next d - If duplicate = 0 And speckey = 0 Then + If duplicate = 0 And speckey = 0 And blank = 0 Then ' Open the file for append. Open ".\netrekrc" For Append As fnum2 @@ -2009,37 +2032,83 @@ End If keymap = "keymap:" + keymap1 + keymap2 + keymap3 + keymap4 + keymap5 + keymap6 + keymap7 + keymap8 + keymap9 + keymap10 + keymap11 + keymap12 + keymap13 + keymap14 + keymap15 + keymap16 + keymap17 + keymap18 + keymap19 + keymap20 + keymap21 + keymap22 + keymap23 + keymap24 + keymap25 + keymap26 + keymap27 + keymap28 + keymap29 + keymap30 + keymap31 - keytag1 = "###Configuration changes made the Netrek Config Utility on " + currentdate - keytag2 = "###Warning: if you have these options defined earlier in the netrekrc, the settings below will take precedence." - + keytag1 = "###Configuration below was added on - " + currentdate + Print #fnum2, Chr(13) Print #fnum2, Chr(13) Print #fnum2, keytag1 Print #fnum2, Chr(13) - Print #fnum2, keytag2 - Print #fnum2, Chr(13) + Print #fnum2, "# Key mapping" + Print #fnum2, "# Define you keymap here. The format is newkey defaultkey. For example, the" + Print #fnum2, "# default key for shield toggle is 's', if you want to remap shield toggle to" + Print #fnum2, "# 'q', you would put 'qs' in your keymap. Shields would still be mapped to" + Print #fnum2, "# 's' as well as now being on 'q'. Adding a mapping doesn't delete the old" + Print #fnum2, "# one. If you want shields on 'w' as well, put 'ws' in your keymap. If you" + Print #fnum2, "# had instead put 'wq', it would have mapped quit, the default action of 'q'," + Print #fnum2, "# onto 'w'." Print #fnum2, keymap Print #fnum2, Chr(13) + Print #fnum2, "# Mouse button mapping" + Print #fnum2, "# Button map lets you map the mouse buttons. Unfortunately, it works in a" + Print #fnum2, "# different way than keymap. The format is . To map" + Print #fnum2, "# shields onto button 1 (the left one), you would put '1s' in your keymap." + Print #fnum2, "# The buttonmap works through the keymap, so if you have shields mapped to" + Print #fnum2, "# 'q', putting '1q' would make button 1 shields and not quit. Buttons 4 and" + Print #fnum2, "# 5 are support for Microsoft Xbuttons. If you have a wheel mouse, the up" + Print #fnum2, "# wheel is button 6 and the down wheel is button 7. There is also support" + Print #fnum2, "# for shifted, controled, and control-shifted mouse actions, see the netrek" + Print #fnum2, "# help file for more details." Print #fnum2, buttonmap Print #fnum2, Chr(13) + Print #fnum2, "# Show hints window" Print #fnum2, tiptxt Print #fnum2, Chr(13) + Print #fnum2, "# What type of ship bitmaps to use" + Print #fnum2, "# 0 - mono" + Print #fnum2, "# 1 - new color bitmaps (default)" + Print #fnum2, "# 2 - old color bitmaps" + Print #fnum2, "# 3 - shaded old color bitmaps" + Print #fnum2, "# 4 - experimental high res bitmaps" Print #fnum2, mode1 + Print #fnum2, Chr(13) + Print #fnum2, "# Use colored bitmaps for torps and plasmas" Print #fnum2, mode2 + Print #fnum2, Chr(13) + Print #fnum2, "# Type of planet bitmaps on local map" + Print #fnum2, "# 0 - Bronco (default)" + Print #fnum2, "# 1 - Moo" + Print #fnum2, "# 2 - Rabbitear" + Print #fnum2, "# 3 - New color" Print #fnum2, mode4 + Print #fnum2, Chr(13) + Print #fnum2, "# Type of planet bitmaps on galactic map" + Print #fnum2, "# 0 - Bronco (default)" + Print #fnum2, "# 1 - Moo" + Print #fnum2, "# 2 - Rabbitear" + Print #fnum2, "# 3 - New color" Print #fnum2, mode5 + Print #fnum2, Chr(13) + + Print #fnum2, "# Highlight galactic planets by race and army status" Print #fnum2, mode6 + Print #fnum2, "# Use beeplite" Print #fnum2, mode10 + Print #fnum2, Chr(13) + Print #fnum2, "# Enable layered, stereo sound" Print #fnum2, soundtxt Print #fnum2, Chr(13) + Print #fnum2, "# Draw background stars" Print #fnum2, starstxt Print #fnum2, Chr(13) + Print #fnum2, "# Draw warp streaks while transwarping to starbase" Print #fnum2, warptxt Print #fnum2, Chr(13) + Print #fnum2, "# Show det circle around your ship" Print #fnum2, dettxt Print #fnum2, Chr(13) + Print #fnum2, "# Show my speed on local" Print #fnum2, speedtxt Close fnum2 @@ -2111,7 +2180,7 @@ Print #fnum3, "Close Special Windows- " + Text1(30) Close #fnum3 Unload Form1 - MsgBox "YOUR CONFIGURATION HAS BEEN CREATED! After you click on OK a document with the controls you have chosen will open. A shortcut to this document has been created in your Netrek Config Utility program group." + MsgBox "YOUR CONFIGURATION HAS BEEN CREATED! After you click on OK a document with the controls you have chosen will open. A shortcut to this document has been created in your Netrek Config Utility program group. If you already had a configuration file in place it has been saved in your Netrek install directory as netrekrc.sav" Shell Application & " " & FileName, vbNormalFocus Else End If @@ -2122,10 +2191,6 @@ End Sub -Private Sub Form_Load() - -End Sub - Private Sub Option1_Click() Form3.Show Unload Form1 From playnetrek at users.sourceforge.net Tue May 15 20:11:12 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Wed, 16 May 2007 01:11:12 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program Form3.frm, 1.2, 1.3 Message-ID: <20070516011123.A88B6B3EB@smtpgrey-2.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv7112 Modified Files: Form3.frm Log Message: Index: Form3.frm =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/configuration-program/Form3.frm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Form3.frm 15 Apr 2007 23:34:26 -0000 1.2 +++ Form3.frm 16 May 2007 01:11:09 -0000 1.3 @@ -25,7 +25,7 @@ ForeColor = &H8000000E& Height = 195 Left = 7440 - TabIndex = 89 + TabIndex = 88 ToolTipText = "Turns your sound on. For better quality enable layered stereo sound." Top = 8640 Value = 1 'Checked @@ -46,7 +46,7 @@ ForeColor = &H00FFFFFF& Height = 195 Left = 7440 - TabIndex = 88 + TabIndex = 87 ToolTipText = "Shows a circle around your ship, you can Destroy Enemy Torpedoes that are in this circle." Top = 8160 Width = 2415 @@ -67,7 +67,7 @@ Height = 195 Left = 7440 MaskColor = &H00FFFFFF& - TabIndex = 87 + TabIndex = 86 ToolTipText = "Shows your speed next to your ship on the local map." Top = 8400 Value = 1 'Checked @@ -88,7 +88,7 @@ ForeColor = &H8000000E& Height = 195 Left = 7440 - TabIndex = 86 + TabIndex = 85 ToolTipText = "Shows star streaks when tawrping to your base." Top = 7920 Value = 1 'Checked @@ -109,7 +109,7 @@ ForeColor = &H8000000E& Height = 195 Left = 7440 - TabIndex = 85 + TabIndex = 84 ToolTipText = "Shows stars in the background on your local map." Top = 8880 Value = 1 'Checked @@ -130,7 +130,7 @@ ForeColor = &H00FFFFFF& Height = 255 Left = 7440 - TabIndex = 84 + TabIndex = 83 Top = 9120 Width = 2415 End @@ -139,7 +139,7 @@ ItemData = "Form3.frx":08CA Left = 8880 List = "Form3.frx":08D4 - TabIndex = 83 + TabIndex = 82 Text = "Torpedoes" Top = 5520 Width = 1935 @@ -149,7 +149,7 @@ Index = 30 Left = 9960 MaxLength = 1 - TabIndex = 81 + TabIndex = 80 Text = "W" Top = 6960 Width = 495 @@ -159,7 +159,7 @@ Index = 29 Left = 9960 MaxLength = 1 - TabIndex = 80 + TabIndex = 79 Text = "Z" Top = 6600 Width = 495 @@ -169,7 +169,7 @@ Index = 28 Left = 9960 MaxLength = 1 - TabIndex = 79 + TabIndex = 78 Text = "V" Top = 6240 Width = 495 @@ -189,7 +189,7 @@ ForeColor = &H00FFFFFF& Height = 255 Left = 240 - TabIndex = 72 + TabIndex = 71 Top = 3600 Width = 2535 End @@ -208,7 +208,7 @@ ForeColor = &H00FFFFFF& Height = 255 Left = 240 - TabIndex = 71 + TabIndex = 70 Top = 3360 Value = -1 'True Width = 2415 @@ -218,7 +218,7 @@ Index = 27 Left = 6360 MaxLength = 1 - TabIndex = 69 + TabIndex = 68 Text = "y" Top = 9000 Width = 495 @@ -228,7 +228,7 @@ Index = 26 Left = 6360 MaxLength = 1 - TabIndex = 68 + TabIndex = 67 Text = "j" Top = 8640 Width = 495 @@ -238,7 +238,7 @@ Index = 25 Left = 6360 MaxLength = 1 - TabIndex = 67 + TabIndex = 66 Text = "p" Top = 8280 Width = 495 @@ -256,19 +256,10 @@ EndProperty Height = 255 Left = 4200 - TabIndex = 63 + TabIndex = 62 Top = 10080 Width = 1095 End - Begin VB.TextBox Text2 - Height = 285 - Left = 0 - TabIndex = 62 - Text = "playnetrek.org" - Top = 10440 - Visible = 0 'False - Width = 1935 - End Begin VB.CheckBox Check2 BackColor = &H80000012& Caption = "Enable Tip Window" @@ -597,7 +588,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7560 - TabIndex = 82 + TabIndex = 81 Top = 5520 Width = 1215 End @@ -616,7 +607,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7560 - TabIndex = 78 + TabIndex = 77 Top = 7080 Width = 2295 End @@ -635,7 +626,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7560 - TabIndex = 77 + TabIndex = 76 Top = 6720 Width = 1575 End @@ -654,7 +645,7 @@ ForeColor = &H8000000E& Height = 255 Left = 7560 - TabIndex = 76 + TabIndex = 75 Top = 6360 Width = 1575 End @@ -673,7 +664,7 @@ ForeColor = &H00FFFFFF& Height = 135 Left = 4800 - TabIndex = 75 + TabIndex = 74 Top = 10560 Width = 1455 End @@ -683,7 +674,7 @@ ForeColor = &H00FFFFFF& Height = 615 Left = 3000 - TabIndex = 74 + TabIndex = 73 Top = 3120 Width = 7575 End @@ -702,7 +693,7 @@ ForeColor = &H00C0C000& Height = 375 Left = 120 - TabIndex = 73 + TabIndex = 72 Top = 3000 Width = 2775 End @@ -712,7 +703,7 @@ ForeColor = &H00FFFFFF& Height = 495 Left = 120 - TabIndex = 70 + TabIndex = 69 Top = 2400 Width = 10695 End @@ -731,7 +722,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 66 + TabIndex = 65 Top = 9120 Width = 1935 End @@ -750,7 +741,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 65 + TabIndex = 64 Top = 8760 Width = 1215 End @@ -769,7 +760,7 @@ ForeColor = &H8000000E& Height = 255 Left = 4080 - TabIndex = 64 + TabIndex = 63 Top = 8400 Width = 1095 End @@ -1460,7 +1451,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.3 +'Copyright (C) 2007 Joe Evango - Netrek XP 2006 Configuration Program v1.4 ' 'This program is free software; you can redistribute it and/or 'modify it under the terms of the GNU General Public License @@ -1490,8 +1481,20 @@ ' a Windows client. Also feel free to use the logic in this code to create a config utility for another OS. It ' took a while to put the keymap portion of this together but it works well. I only ask that if any modifications ' are made you also make your code changes available to the community and give me a mention as a contributor +' +' Special thanks to Bill Barcerski for helping me out with the Classic Mode configuration addition and helping test +' +' Program notes from Joe - 5/15/07 +' Removed the repeated append functionality and replaced it with an imported rc file with default setting. +' Options available in the config utility are added at the bottom of the file. These options are excluded from the +' imported file and appended only once to the bottom of the imported rc file. Options are now only specified one time. +' If a netrekrc file already exists it is save in the netrek root install folder as netrek.sav. +' In order for the program to function there will need to be a file named netrekrc in the root of where it is executed +' and a file named netrekrc.cfg in the docs folder. Fixed several bugs that have been reported. +'swaps the classic mode/xp mode images when the checkbox value changes + Private Sub Check1_Click() If (Check1.Value = vbChecked) Then Image2.Visible = False @@ -1504,9 +1507,15 @@ -'Keymap configuration + Private Sub Command1_Click() +'Saves your current netrekrc to netrekrc.sav and copies a static netrek config file from the docs directory + + FileCopy ".\netrekrc", ".\netrekrc.sav" + FileCopy ".\docs\netrekrc.cfg", ".\netrekrc" + + Dim warp As Integer Dim det As Integer Dim speed As Integer @@ -1618,10 +1627,12 @@ Dim a As Integer Dim b As Integer Dim c As Integer - + Dim d As Integer + Dim duplicate As Integer Dim speckey As Integer + Dim blank As Integer Dim currentdate As String @@ -1748,7 +1759,8 @@ starstxt = "showStars: off" End If - +'Keymap configuration + If torpedo = Text1(0) Then keymap1 = "" Else @@ -1943,6 +1955,8 @@ speckey = 0 duplicate = 0 + blank = 0 + For a = 0 To 30 For b = 0 To 30 If a <> b And Text1(a) = Text1(b) Then @@ -1954,7 +1968,7 @@ MsgBox "The key '" + Text1(a) + "' is defined more than once. This will cause problems while playing. Please remove the duplicate controls and click on Finish." Exit For End If - Next a + Next a For c = 0 To 30 @@ -1966,9 +1980,19 @@ Exit For End If Next c + + For d = 0 To 30 + If Text1(d) = "" Then + blank = 1 + End If + If blank = 1 Then + MsgBox "Blank values are not allowed. If you meant to assign a key to the space bar please go to the key you would like to assign and enter a space by pressing the space bar" + Exit For + End If + Next d - If duplicate = 0 And speckey = 0 Then + If duplicate = 0 And speckey = 0 And blank = 0 Then ' Open the file for append. Open ".\netrekrc" For Append As fnum2 @@ -1987,6 +2011,7 @@ buttonmap = "buttonmap:" + "1" + Text1(0) + "2" + Text1(0) End If +'Classic Mode / XP Mode options If classicmode = 1 Then mode1 = "colorClient: 0" mode2 = "colorWeapons: off" @@ -2005,41 +2030,83 @@ keymap = "keymap:" + keymap1 + keymap2 + keymap3 + keymap4 + keymap5 + keymap6 + keymap7 + keymap8 + keymap9 + keymap10 + keymap11 + keymap12 + keymap13 + keymap14 + keymap15 + keymap16 + keymap17 + keymap18 + keymap19 + keymap20 + keymap21 + keymap22 + keymap23 + keymap24 + keymap25 + keymap26 + keymap27 + keymap28 + keymap29 + keymap30 + keymap31 - keytag1 = "###Configuration changes made the Netrek Config Utility on " + currentdate - keytag2 = "###Warning: if you have these options defined earlier in the netrekrc, the settings below will take precedence." - + keytag1 = "###Configuration below was added on - " + currentdate + Print #fnum2, Chr(13) Print #fnum2, Chr(13) Print #fnum2, keytag1 Print #fnum2, Chr(13) - Print #fnum2, keytag2 - - Print #fnum2, Chr(13) + Print #fnum2, "# Key mapping" + Print #fnum2, "# Define you keymap here. The format is newkey defaultkey. For example, the" + Print #fnum2, "# default key for shield toggle is 's', if you want to remap shield toggle to" + Print #fnum2, "# 'q', you would put 'qs' in your keymap. Shields would still be mapped to" + Print #fnum2, "# 's' as well as now being on 'q'. Adding a mapping doesn't delete the old" + Print #fnum2, "# one. If you want shields on 'w' as well, put 'ws' in your keymap. If you" + Print #fnum2, "# had instead put 'wq', it would have mapped quit, the default action of 'q'," + Print #fnum2, "# onto 'w'." Print #fnum2, keymap Print #fnum2, Chr(13) + Print #fnum2, "# Mouse button mapping" + Print #fnum2, "# Button map lets you map the mouse buttons. Unfortunately, it works in a" + Print #fnum2, "# different way than keymap. The format is . To map" + Print #fnum2, "# shields onto button 1 (the left one), you would put '1s' in your keymap." + Print #fnum2, "# The buttonmap works through the keymap, so if you have shields mapped to" + Print #fnum2, "# 'q', putting '1q' would make button 1 shields and not quit. Buttons 4 and" + Print #fnum2, "# 5 are support for Microsoft Xbuttons. If you have a wheel mouse, the up" + Print #fnum2, "# wheel is button 6 and the down wheel is button 7. There is also support" + Print #fnum2, "# for shifted, controled, and control-shifted mouse actions, see the netrek" + Print #fnum2, "# help file for more details." Print #fnum2, buttonmap Print #fnum2, Chr(13) - Print #fnum2, logintxt - Print #fnum2, Chr(13) + Print #fnum2, "# Show hints window" Print #fnum2, tiptxt Print #fnum2, Chr(13) + Print #fnum2, "# What type of ship bitmaps to use" + Print #fnum2, "# 0 - mono" + Print #fnum2, "# 1 - new color bitmaps (default)" + Print #fnum2, "# 2 - old color bitmaps" + Print #fnum2, "# 3 - shaded old color bitmaps" + Print #fnum2, "# 4 - experimental high res bitmaps" Print #fnum2, mode1 + Print #fnum2, Chr(13) + Print #fnum2, "# Use colored bitmaps for torps and plasmas" Print #fnum2, mode2 + Print #fnum2, Chr(13) + Print #fnum2, "# Type of planet bitmaps on local map" + Print #fnum2, "# 0 - Bronco (default)" + Print #fnum2, "# 1 - Moo" + Print #fnum2, "# 2 - Rabbitear" + Print #fnum2, "# 3 - New color" Print #fnum2, mode4 + Print #fnum2, Chr(13) + Print #fnum2, "# Type of planet bitmaps on galactic map" + Print #fnum2, "# 0 - Bronco (default)" + Print #fnum2, "# 1 - Moo" + Print #fnum2, "# 2 - Rabbitear" + Print #fnum2, "# 3 - New color" Print #fnum2, mode5 + Print #fnum2, Chr(13) + + Print #fnum2, "# Highlight galactic planets by race and army status" Print #fnum2, mode6 + Print #fnum2, "# Use beeplite" Print #fnum2, mode10 Print #fnum2, Chr(13) + Print #fnum2, "# Enable layered, stereo sound" Print #fnum2, soundtxt Print #fnum2, Chr(13) + Print #fnum2, "# Draw background stars" Print #fnum2, starstxt Print #fnum2, Chr(13) + Print #fnum2, "# Draw warp streaks while transwarping to starbase" Print #fnum2, warptxt Print #fnum2, Chr(13) + Print #fnum2, "# Show det circle around your ship" Print #fnum2, dettxt Print #fnum2, Chr(13) + Print #fnum2, "# Show my speed on local" Print #fnum2, speedtxt Close fnum2 @@ -2111,7 +2178,7 @@ Print #fnum3, "Close Special Windows- " + Text1(30) Close #fnum3 Unload Form3 - MsgBox "YOUR CONFIGURATION HAS BEEN CREATED! After you click on OK a document with the controls you have chosen will open. A shortcut to this document has been created in your Netrek Config Utility program group." + MsgBox "YOUR CONFIGURATION HAS BEEN CREATED! After you click on OK a document with the controls you have chosen will open. A shortcut to this document has been created in your Netrek Config Utility program group. If you already had a configuration file in place it has been saved in your Netrek install directory as netrekrc.sav" Shell Application & " " & FileName, vbNormalFocus Else End If From playnetrek at users.sourceforge.net Tue May 15 20:14:44 2007 From: playnetrek at users.sourceforge.net (Joe Evango) Date: Wed, 16 May 2007 01:14:44 +0000 Subject: [netrek-cvs] client/netrekxp/configuration-program netrekconfigxp2006v11slim-play.VBP, 1.2, NONE netrekconfigxp2006v11slim-play.vbw, 1.1, NONE Message-ID: <20070516011455.4189E1867CC@smtpgrey-1.real-time.com> Update of /cvsroot/netrek/client/netrekxp/configuration-program In directory sc8-pr-cvs16:/tmp/cvs-serv8856 Removed Files: netrekconfigxp2006v11slim-play.VBP netrekconfigxp2006v11slim-play.vbw Log Message: --- netrekconfigxp2006v11slim-play.vbw DELETED --- --- netrekconfigxp2006v11slim-play.VBP DELETED ---