Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24711/src Modified Files: bccnetrek.rc getname.c local.c makefile map.c mswindow.c netrek.rc parsemeta.c short.c vccnetrek.rc Log Message: Conversion from old to new sourceforge directory - changes since May 6 basically, plus whatever else SF decides is different. Index: bccnetrek.rc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/bccnetrek.rc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- bccnetrek.rc 21 Apr 2006 12:00:06 -0000 1.4 +++ bccnetrek.rc 12 May 2006 01:58:37 -0000 1.5 @@ -9,12 +9,12 @@ { BLOCK "040904E4" { VALUE "CompanyName", "Netrek\000" - VALUE "FileDescription", "Netrek XP Mod (Colorized) Client\000" + VALUE "FileDescription", "Netrek XP 2006 Client\000" VALUE "FileVersion", "123456789012345678901234567890\000" - VALUE "InternalName", "Netrek XP Mod\000" - VALUE "LegalCopyright", "Copyright © 1986-2004\000" + VALUE "InternalName", "Netrek XP 2006\000" + VALUE "LegalCopyright", "Copyright © 1986-2006\000" VALUE "OriginalFilename", "netrek.rc\000" - VALUE "ProductName", "Netrek XP Mod Client\000" + VALUE "ProductName", "Netrek XP 2006 Client\000" VALUE "ProductVersion", "123456789012345678901234567890\000" } } Index: netrek.rc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/netrek.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- netrek.rc 12 Apr 2006 04:20:04 -0000 1.2 +++ netrek.rc 12 May 2006 01:58:38 -0000 1.3 @@ -46,14 +46,14 @@ BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "Netrek\0" - VALUE "FileDescription", "Netrek XP Mod (Colorized) Client\0" + VALUE "FileDescription", "Netrek XP 2006 Client\0" VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "Netrek XP Mod\0" - VALUE "LegalCopyright", "Copyright © 1986-2004\0" + VALUE "InternalName", "Netrek XP 2006\0" + VALUE "LegalCopyright", "Copyright © 1986-2006\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "netrek.rc\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Netrek XP Mod Client\0" + VALUE "ProductName", "Netrek XP 2006 Client\0" VALUE "ProductVersion", "1, 0, 0, 1\0" VALUE "SpecialBuild", "\0" END Index: parsemeta.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/parsemeta.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- parsemeta.c 7 May 2006 16:59:27 -0000 1.6 +++ parsemeta.c 12 May 2006 01:58:38 -0000 1.7 @@ -799,7 +799,7 @@ if (x >= 0 && x <= 19) /* Netrek Home Page */ ShellExecute (NULL, "open", "http://www.netrek.org", NULL, NULL, SW_SHOWNORMAL); else if (x >= 21 && x <= 35) /* Newbie Manual */ - ShellExecute (NULL, "open", "http://www.netrek.org/cow/current/newbie.html", NULL, NULL, SW_SHOWNORMAL); + ShellExecute (NULL, "open", "http://genocide.netrek.org/beginner/newbie.php", NULL, NULL, SW_SHOWNORMAL); else if (x >= 37 && x <= 43) /* Forums */ ShellExecute (NULL, "open", "http://groups-beta.google.com/group/rec.games.netrek", NULL, NULL, SW_SHOWNORMAL); else if (x >= 45 && x <= 49) /* FAQ */ Index: vccnetrek.rc =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/vccnetrek.rc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vccnetrek.rc 30 Apr 2006 15:59:40 -0000 1.1 +++ vccnetrek.rc 12 May 2006 01:58:38 -0000 1.2 @@ -2,39 +2,20 @@ MAIN ICON DISCARDABLE "main.ico" -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x3L -#else - FILEFLAGS 0x2L -#endif - FILEOS 0x10004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "Netrek\0" - VALUE "FileDescription", "Netrek XP Mod (Colorized) Client\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "Netrek XP Mod\0" - VALUE "LegalCopyright", "Copyright © 1986-2004\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "netrek.rc\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Netrek XP Mod Client\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END \ No newline at end of file +1 VERSIONINFO +FILEVERSION 4, 4, 0, 4 +PRODUCTVERSION 4, 4, 0, 4 +{ BLOCK "StringFileInfo" +{ BLOCK "040904E4" + { + VALUE "CompanyName", "Netrek\000" + VALUE "FileDescription", "Netrek XP 2006 Client\000" + VALUE "FileVersion", "123456789012345678901234567890\000" + VALUE "InternalName", "Netrek XP 2006\000" + VALUE "LegalCopyright", "Copyright © 1986-2006\000" + VALUE "OriginalFilename", "vccnetrek.rc\000" + VALUE "ProductName", "Netrek XP 2006 Client\000" + VALUE "ProductVersion", "123456789012345678901234567890\000" + } + } +} \ No newline at end of file Index: makefile =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- makefile 7 May 2006 21:10:52 -0000 1.9 +++ makefile 12 May 2006 01:58:37 -0000 1.10 @@ -24,7 +24,7 @@ !ENDIF # Libs -#LIBOPTS = /L..\Win32\lib\BCC /Tpe +LIBOPTS = /L..\Win32\lib\BCC /Tpe LIBS = SDL.LIB SDL_mixer.LIB SDLmain.LIB CW32mt.LIB IMPORT32.LIB user32.lib gdi32.lib wsock32.lib kernel32.lib shell32.lib winmm.lib mpr.lib $(GMPLIB) Index: short.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- short.c 7 May 2006 16:59:27 -0000 1.6 +++ short.c 12 May 2006 01:58:38 -0000 1.7 @@ -1526,7 +1526,7 @@ } if (why_dead) { - add_whydead (msg.mesg, karg5); + add_whydead (msg.mesg, karg5); karg5 = 0; } #endif Index: getname.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/getname.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- getname.c 7 May 2006 16:59:27 -0000 1.5 +++ getname.c 12 May 2006 01:58:37 -0000 1.6 @@ -71,7 +71,7 @@ static char *README[] = { "", - "Netrek XP Mod - the better netrek eXPerience!", + "Netrek XP 2006 - the better netrek eXPerience!", "", "", "", @@ -79,11 +79,11 @@ " No one takes responsibility for lost INL games etc.", " Use at your own risk! If you don't like it, don't use it.", "", - "Comments, suggestions, bugreports to: keyos at keyos.org", + "Comments, suggestions, bugreports to: williamb at its.caltech.edu", "", "Include version and architecture info in bug reports", "", - "Patches to: keyos at keyos.org", + "Patches to: williamb at its.caltech.edu", "", }; int i, length; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- map.c 7 May 2006 16:59:27 -0000 1.6 +++ map.c 12 May 2006 01:58:37 -0000 1.7 @@ -357,7 +357,7 @@ emph_planet_seq[seq_n], W_White); - W_WriteBitmapDB(localSDB, dx - (BMP_MPLANET_WIDTH / 2), dy - (BMP_MPLANET_HEIGHT / 2), + W_WriteBitmapDB(mapSDB, dx - (BMP_MPLANET_WIDTH / 2), dy - (BMP_MPLANET_HEIGHT / 2), planetmBitmap(l), planetColor(l)); #endif emph_planet_seq_n[l->pl_no] -= 1; @@ -867,7 +867,7 @@ emph_player_seq[seq_n], W_White); #else - W_WriteBitmapDB(localSDB, dx - (emph_player_seq_width / 2 - 1), + W_WriteBitmapDB(mapSDB, dx - (emph_player_seq_width / 2 - 1), dy - (emph_player_seq_height / 2 + 1), emph_player_seq[seq_n], W_White); Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- mswindow.c 7 May 2006 21:10:52 -0000 1.16 +++ mswindow.c 12 May 2006 01:58:38 -0000 1.17 @@ -27,6 +27,7 @@ #include <limits.h> #include <string.h> #include <richedit.h> +#include <math.h> #include "copyright2.h" #include "config.h" @@ -38,6 +39,7 @@ #include "cursors.h" #include "proto.h" #include "resource.h" +#include "math.h" #undef WHITE #undef BLACK @@ -5255,7 +5257,7 @@ GetClientRect (win->hwnd, &(sdb->wr)); - sdb->win_dc = GetWindowDC (win->hwnd); + sdb->win_dc = GetDC (win->hwnd); if (sdb->win_dc == NULL) return NULL; @@ -5848,6 +5850,7 @@ register struct Icon *bitmap = (struct Icon *) icon; register int borderx, bordery, width, height; register int srcx, srcy; + HDC hdc; HBITMAP newbmp; XFORM xForm; double radians; @@ -5866,10 +5869,14 @@ width = bitmap->width; height = bitmap->height; +// hdc = GetDC (bitmap->hwnd); +// newbmp = CreateCompatibleBitmap ( hdc, width, height ); newbmp = CreateCompatibleBitmap ( sdb->mem_dc, width, height ); if (NetrekPalette) { + // SelectPalette (hdc, NetrekPalette, FALSE); + // RealizePalette (hdc); SelectPalette (sdb->mem_dc, NetrekPalette, FALSE); RealizePalette (sdb->mem_dc); } @@ -5881,6 +5888,8 @@ //Set the color of the bitmap //(oddly enough, 1-bit = bk color, 0-bit = text (fg) color) + // SetBkColor (hdc, colortable[color].rgb); + // SetTextColor (hdc, colortable[BLACK].rgb); SetBkColor (sdb->mem_dc, colortable[color].rgb); SetTextColor (sdb->mem_dc, colortable[BLACK].rgb); @@ -5907,7 +5916,8 @@ eDx = x + xscale - cosine*(xscale) + sine*(yscale); eDy = y + yscale - cosine*(yscale) - sine*(xscale); - SetGraphicsMode(sdb->mem_dc,GM_ADVANCED); + // SetGraphicsMode(hdc,GM_ADVANCED); + // SetGraphicsMode(sdb->mem_dc,GM_ADVANCED); xForm.eM11=cosine/SCALEX; xForm.eM12=sine/SCALEX; @@ -5915,10 +5925,14 @@ xForm.eM22=cosine/SCALEY; xForm.eDx = eDx; xForm.eDy = eDy; - - SetWorldTransform(sdb->mem_dc,&xForm); - BitBlt(sdb->mem_dc, 0, 0, width, height, GlobalMemDC2, 0, 0, SRCPAINT); - + + // SetWorldTransform(hdc,&xForm); + // SetWorldTransform(sdb->mem_dc,&xForm); + // BitBlt(hdc, 0, 0, width, height, GlobalMemDC2, 0, 0, SRCPAINT); + //BitBlt(sdb->mem_dc, 0, 0, width, height, GlobalMemDC2, 0, 0, SRCPAINT); + BitBlt (sdb->mem_dc, x, y, width, height, GlobalMemDC2, 0, 0, SRCPAINT); + // StretchBlt(sdb->mem_dc, x, y, (int)(width/SCALEX), (int)(height/SCALEY), GlobalMemDC2, 0, 0, width, height, SRCCOPY); +// ReleaseDC (bitmap->hwnd, hdc); DeleteObject (newbmp); } Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- local.c 7 May 2006 16:59:27 -0000 1.19 +++ local.c 12 May 2006 01:58:37 -0000 1.20 @@ -65,7 +65,7 @@ static void redrawStarSector(int sectorx, int sectory); -#define scaleLocal(pt) ((pt) / SCALE + (WINSIDE/2)) +#define scaleLocal(pt) ((pt) + (WINSIDE/2)) int fullview = WINSIDE * SCALE; int view = WINSIDE * SCALE / 2; @@ -259,8 +259,8 @@ dyy = (int) (Sin[mydir] * streaklength); for (i = 0, s = star_sector; i < 16; i++, s++) { - dx = (s->s_x + xbase) - me->p_x; - dy = (s->s_y + ybase) - me->p_y; + dx = (s->s_x + xbase)/SCALE - me->p_x/SCALE; + dy = (s->s_y + ybase)/SCALE - me->p_y/SCALE; if (ABS(dx) > (view) || ABS(dy) > (view)) continue; @@ -283,8 +283,11 @@ } for (i = 0, s = star_sector; i < 16; i++, s++) { - dx = (s->s_x + xbase) - me->p_x; - dy = (s->s_y + ybase) - me->p_y; + int px, py; + px = me->p_x % 40; + py = me->p_y % 40; + dx = (s->s_x + xbase)/SCALE - me->p_x/SCALE; + dy = (s->s_y + ybase)/SCALE - me->p_y/SCALE; if (ABS(dx) > (view) || ABS(dy) > (view)) continue; @@ -1829,15 +1832,28 @@ if (j != me && ((k->t_war & me->p_team) || (j->p_team & (me->p_hostile | me->p_swar)))) { +#ifndef DOUBLE_BUFFERING W_WriteBitmap (dx - (BMP_CTORP_WIDTH / 2), dy - (BMP_CTORP_HEIGHT / 2), torpC[torpTeam][k->t_fuse], torpColor (k)); +#else + W_WriteBitmapDB (localSDB, dx - (BMP_CTORP_WIDTH / 2), + dy - (BMP_CTORP_HEIGHT / 2), + torpC[torpTeam][k->t_fuse], torpColor (k)); +#endif + } else { +#ifndef DOUBLE_BUFFERING W_WriteBitmap (dx - (BMP_CTORP_WIDTH / 2), dy - (BMP_CTORP_HEIGHT / 2), mtorpC[torpTeam][k->t_fuse], torpColor (k)); +#else + W_WriteBitmapDB (localSDB, dx - (BMP_CTORP_WIDTH / 2), + dy - (BMP_CTORP_HEIGHT / 2), + mtorpC[torpTeam][k->t_fuse], torpColor (k)); +#endif } clearzone[0][clearcount] = dx - (BMP_CTORP_WIDTH / 2);