--- lxdoom-1.4.4.orig/README +++ lxdoom-1.4.4/README @@ -173,6 +173,13 @@ doesn't trap those keys, or select different keys in lxdoom, via the Key Bindings menu. +If you are playing lxdoom on a remote X display, you will probably want +to use the switch -noaccel. LxDoom doesn't automatically detect remote +connections, and therefore won't automatically disable the (faster) +MITSHM extension. Note that the lag added by having to transmit the image +35 times per second over the network means it's not very usable this way +anyway. + SVGALib Version --------------- --- lxdoom-1.4.4.orig/Makefile.am +++ lxdoom-1.4.4/Makefile.am @@ -7,7 +7,7 @@ docdir=$(prefix)/share/doc/@PACKAGE@ SUBDIRS = doc data src EXTRA_DIST = ChangeLog lxdoom.spec.in -doc_DATA = ChangeLog README COPYING AUTHORS +doc_DATA = ChangeLog README AUTHORS rpm: lxdoom.spec dist mv @PACKAGE@-@VERSION@.tar.gz /usr/src/redhat/SOURCES --- lxdoom-1.4.4.orig/Makefile.in +++ lxdoom-1.4.4/Makefile.in @@ -82,7 +82,7 @@ docdir = $(prefix)/share/doc/@PACKAGE@ SUBDIRS = doc data src EXTRA_DIST = ChangeLog lxdoom.spec.in -doc_DATA = ChangeLog README COPYING AUTHORS +doc_DATA = ChangeLog README AUTHORS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h @@ -102,9 +102,9 @@ all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -292,6 +292,11 @@ -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ --- lxdoom-1.4.4.orig/doc/Makefile.in +++ lxdoom-1.4.4/doc/Makefile.in @@ -103,9 +103,9 @@ all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -209,6 +209,11 @@ subdir = doc distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ --- lxdoom-1.4.4.orig/doc/lxdoom.6 +++ lxdoom-1.4.4/doc/lxdoom.6 @@ -7,26 +7,17 @@ .PP sndserv \- Sound server for LxDoom .SH SYNOPSIS -.ll +8 .B {lxdoom,lsdoom} [ \-complevel \fIlvl\fR ] -.BR [ \-width \fIw\fR ] [ \-height \fIh\fR ] -.BR [ \-iwad \fIiwadname\fR ] [ -file \fIwad1 \&...\fR ] [ \-deh \fIdeh_file\fR ] [ \-noload ] -.BR [ \-loadgame {0,1,2,3,4,5,6,7} ] [ \-warp { \fImap\fR | \fIepis level\fR } \-skill {1,2,3,4,5} ] -.BR [ {\-fastdemo,\-timedemo,\-playdemo} \fIdemofile\fR ] [ \-record \fIdemofile\fR ] -.BR [ \-net \fIhostname\fR[:\fIport\fR] ] [ \-deathmatch [ \-altdeath ] ] [ { \-timer \fImins\fR | \-avg }] ] -.BR [ \-nosound ] [ \-nosfx ] [ \-nomusic] [ \-nojoy ] [ \-grabmouse ] [ \-noaccel ] [ \-{1,2,3} ] -.BR [ \-config \fImyconf\fR ] [ \-save \fIsavedir\fR ] -.BR [ \-bexout \fIbexdbg\fR ] [ \-debugfile \fIdebug_file\fR ] [ \-devparm ] [ \-noblit ] [ \-nodrawers ] .SH DESCRIPTION .B LxDoom --- lxdoom-1.4.4.orig/doc/lxdoom-game-server.6 +++ lxdoom-1.4.4/doc/lxdoom-game-server.6 @@ -3,7 +3,6 @@ .SH NAME lxdoom-game-server \- Server for network games of LxDoom. .SH SYNOPSIS -.ll +8 .B lxdoom-game-sever [ \-adfnrv ] [ \-e \fIepis\fR ] [ \-l \fIlevel\fR ] [ \-t \fIticdup\fR ] .BR --- lxdoom-1.4.4.orig/data/Makefile.in +++ lxdoom-1.4.4/data/Makefile.in @@ -97,9 +97,9 @@ all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps data/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -131,6 +131,11 @@ subdir = data distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu data/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ --- lxdoom-1.4.4.orig/src/Makefile.in +++ lxdoom-1.4.4/src/Makefile.in @@ -196,6 +196,25 @@ TAR = tar GZIP_ENV = --best +DEP_FILES = .deps/am_map.P .deps/d_client.P .deps/d_deh.P \ +.deps/d_items.P .deps/d_main.P .deps/d_server.P .deps/doomdef.P \ +.deps/doomstat.P .deps/drawcol.P .deps/drawspan.P .deps/dstrings.P \ +.deps/f_finale.P .deps/f_wipe.P .deps/g_game.P .deps/hu_lib.P \ +.deps/hu_stuff.P .deps/info.P .deps/l_joy.P .deps/l_main.P \ +.deps/l_sound.P .deps/l_soundgen.P .deps/l_soundsrv.P .deps/l_system.P \ +.deps/l_udp.P .deps/l_video_svgalib.P .deps/l_video_trans.P \ +.deps/l_video_x.P .deps/lprintf.P .deps/m_argv.P .deps/m_bbox.P \ +.deps/m_cheat.P .deps/m_menu.P .deps/m_misc.P .deps/m_random.P \ +.deps/p_ceilng.P .deps/p_doors.P .deps/p_enemy.P .deps/p_floor.P \ +.deps/p_genlin.P .deps/p_inter.P .deps/p_lights.P .deps/p_map.P \ +.deps/p_maputl.P .deps/p_mobj.P .deps/p_plats.P .deps/p_pspr.P \ +.deps/p_saveg.P .deps/p_setup.P .deps/p_sight.P .deps/p_spec.P \ +.deps/p_switch.P .deps/p_telept.P .deps/p_tick.P .deps/p_user.P \ +.deps/r_bsp.P .deps/r_data.P .deps/r_draw.P .deps/r_main.P \ +.deps/r_plane.P .deps/r_segs.P .deps/r_sky.P .deps/r_things.P \ +.deps/s_sound.P .deps/sounds.P .deps/st_lib.P .deps/st_stuff.P \ +.deps/tables.P .deps/v_video.P .deps/version.P .deps/w_wad.P \ +.deps/wi_stuff.P .deps/z_bmalloc.P .deps/z_zone.P SOURCES = $(lsdoom_SOURCES) $(lxdoom_SOURCES) $(EXTRA_lxdoom_SOURCES) $(sndserv_SOURCES) $(lxdoom_game_server_SOURCES) OBJECTS = $(lsdoom_OBJECTS) $(lxdoom_OBJECTS) $(sndserv_OBJECTS) $(lxdoom_game_server_OBJECTS) @@ -203,9 +222,9 @@ .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -235,9 +254,6 @@ rm -f $(DESTDIR)$(gamesdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done -.c.o: - $(COMPILE) -c $< - .s.o: $(COMPILE) -c $< @@ -304,6 +320,11 @@ subdir = src distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ @@ -314,6 +335,38 @@ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp info-am: info: info-am dvi-am: @@ -351,23 +404,24 @@ maintainer-clean-generic: mostlyclean-am: mostlyclean-gamesPROGRAMS mostlyclean-compile \ - mostlyclean-tags mostlyclean-generic + mostlyclean-tags mostlyclean-depend mostlyclean-generic mostlyclean: mostlyclean-am -clean-am: clean-gamesPROGRAMS clean-compile clean-tags clean-generic \ - mostlyclean-am +clean-am: clean-gamesPROGRAMS clean-compile clean-tags clean-depend \ + clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-gamesPROGRAMS distclean-compile distclean-tags \ - distclean-generic clean-am + distclean-depend distclean-generic clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-gamesPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ - maintainer-clean-generic distclean-am + maintainer-clean-depend maintainer-clean-generic \ + distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." @@ -378,11 +432,13 @@ uninstall-gamesPROGRAMS install-gamesPROGRAMS mostlyclean-compile \ distclean-compile clean-compile maintainer-clean-compile tags \ mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ -distdir info-am info dvi-am dvi check check-am installcheck-am \ -installcheck install-exec-am install-exec install-data-am install-data \ -install-am install uninstall-am uninstall all-redirect all-am all \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean +distdir mostlyclean-depend distclean-depend clean-depend \ +maintainer-clean-depend info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean # --- lxdoom-1.4.4.orig/src/g_game.c +++ lxdoom-1.4.4/src/g_game.c @@ -72,6 +72,9 @@ #define SAVESTRINGSIZE 24 static size_t savegamesize = SAVEGAMESIZE; // killough +#ifndef PATH_MAX +#define PATH_MAX 2048 +#endif static char demoname[PATH_MAX]; static boolean netdemo; static byte *demobuffer; // made some static -- killough @@ -804,8 +807,8 @@ { if (gametic > BACKUPTICS && consistancy[i][buf] != cmd->consistancy) - I_Error ("consistency failure (%i should be %i)", - cmd->consistancy, consistancy[i][buf]); + I_Error ("consistency failure (%i should be %i) %i", + cmd->consistancy, consistancy[i][buf], gametic); if (players[i].mo) consistancy[i][buf] = players[i].mo->x; else --- lxdoom-1.4.4.orig/src/d_client.c +++ lxdoom-1.4.4/src/d_client.c @@ -53,6 +53,7 @@ #include #include #include +#include static boolean server; static int remotetic; // Tic expected from the remote @@ -129,7 +130,8 @@ lprintf(LO_INFO, "D_CheckNetGame: waiting for server to signal game start\n"); do { while (!I_GetPacket(packet, sizeof *packet)) { - packet->tic = 0; packet->type = PKT_GO; + packet->tic = 0; + packet->type = PKT_GO; *(byte*)(packet+1) = consoleplayer; I_SendPacket(packet, 1 + sizeof *packet); I_uSleep(100000); @@ -151,7 +153,8 @@ do { // Send WAD request to remote packet = Z_Malloc(psize, PU_STATIC, NULL); - packet->type = PKT_WAD; packet->tic = 0; + packet->type = PKT_WAD; + packet->tic = 0; *(byte*)(packet+1) = consoleplayer; strcpy(1+(byte*)(packet+1), name); I_SendPacket(packet, sizeof(packet_header_t) + strlen(name) + 2); @@ -213,14 +216,15 @@ { byte *p = (void*)(packet+1); int tics = *p++; - if (packet->tic > remotetic) { // Missed some + if (ntohl(packet->tic) > remotetic) { // Missed some packet->type = PKT_RETRANS; - packet->tic = remotetic; + packet->tic = htonl(remotetic); *(byte*)(packet+1) = consoleplayer; I_SendPacket(packet, sizeof(*packet)+1); } else { - if (packet->tic + tics <= remotetic) break; // Will not improve things - remotetic = packet->tic; + if (ntohl(packet->tic) + tics <= remotetic) + break; // Will not improve things + remotetic = ntohl(packet->tic); while (tics--) { int players = *p++; while (players--) { @@ -234,7 +238,7 @@ } break; case PKT_RETRANS: // Resend request - remotesend = packet->tic; + remotesend = ntohl(packet->tic); break; case PKT_DOWN: // Server downed { @@ -279,13 +283,14 @@ size_t pkt_size = sizeof(packet_header_t) + 2 + sendtics * sizeof(ticcmd_t); packet_header_t *packet = Z_Malloc(pkt_size, PU_STATIC, NULL); - packet->tic = maketic - sendtics; packet->type = PKT_TICC; + packet->tic = htonl(maketic - sendtics); *(byte*)(packet+1) = sendtics; *(((byte*)(packet+1))+1) = consoleplayer; { - ticcmd_t *tic = (void*)(((char*)(packet+1)) +2); - while (sendtics--) GetTicSwap(tic++, &localcmds[remotesend++%BACKUPTICS]); + ticcmd_t *tic = (void*)(((byte*)(packet+1)) +2); + while (sendtics--) + GetTicSwap(tic++, &localcmds[remotesend++%BACKUPTICS]); } I_SendPacket(packet, pkt_size); Z_Free(packet); @@ -301,7 +306,7 @@ packet_header_t *packet = Z_Malloc(size, PU_STATIC, NULL); int *p = (void*)(packet+1); - packet->tic = gametic; + packet->tic = htonl(gametic); packet->type = PKT_EXTRA; *p++ = type; *p++ = consoleplayer; *p++ = len; memcpy(p, data, len); @@ -401,7 +406,8 @@ if (!server) return; buf[sizeof(packet_header_t)] = consoleplayer; - packet->type = PKT_QUIT; packet->tic = gametic; + packet->type = PKT_QUIT; + packet->tic = htonl(gametic); for (i=0; i<4; i++) { I_SendPacket(packet, 1 + sizeof(packet_header_t)); --- lxdoom-1.4.4.orig/src/d_main.c +++ lxdoom-1.4.4/src/d_main.c @@ -108,6 +108,10 @@ extern boolean timingdemo, singledemo, demoplayback, fastdemo; // killough +#ifndef PATH_MAX +#define PATH_MAX 2048 +#endif + char wadfile[PATH_MAX+1]; // primary wad file char mapdir[PATH_MAX+1]; // directory of development maps char basedefault[PATH_MAX+1]; // default file --- lxdoom-1.4.4.orig/src/m_menu.c +++ lxdoom-1.4.4/src/m_menu.c @@ -876,6 +876,9 @@ for (i = 0 ; i < load_end ; i++) { int handle; +#ifndef PATH_MAX +#define PATH_MAX 2048 +#endif char name[PATH_MAX+1]; // killough 3/22/98 G_SaveGameName(name,sizeof(name),i); // killough 3/22/98 --- lxdoom-1.4.4.orig/src/p_spec.c +++ lxdoom-1.4.4/src/p_spec.c @@ -81,12 +81,12 @@ #pragma options align=packed #endif -typedef struct +typedef __attribute__ ((packed)) struct { - signed char istexture; //jff 3/23/98 make char for comparison // cph - make signed - char endname[9]; // if false, it is a flat - char startname[9]; - int speed; + signed char __attribute__ ((packed)) istexture; //jff 3/23/98 make char for comparison // cph - make signed + char __attribute__ ((packed)) endname[9]; // if false, it is a flat + char __attribute__ ((packed)) startname[9]; + int __attribute__ ((packed)) speed; } __attribute__ ((packed)) animdef_t; //jff 3/23/98 pack to read from memory #if defined(__MWERKS__) --- lxdoom-1.4.4.orig/src/p_spec.h +++ lxdoom-1.4.4/src/p_spec.h @@ -516,11 +516,11 @@ #pragma options align=packed #endif -typedef struct +typedef __attribute__ ((packed)) struct { - char name1[9]; - char name2[9]; - short episode; + char __attribute__ ((packed)) name1[9]; + char __attribute__ ((packed)) name2[9]; + short __attribute__ ((packed)) episode; } __attribute__ ((packed)) switchlist_t; //jff 3/23/98 pack to read from memory #if defined(__MWERKS__) --- lxdoom-1.4.4.orig/src/m_misc.c +++ lxdoom-1.4.4/src/m_misc.c @@ -861,28 +861,28 @@ #pragma options align=packed #endif -typedef struct tagBITMAPFILEHEADER +typedef __attribute__ ((packed)) struct tagBITMAPFILEHEADER { - unsigned short bfType; - dword_t bfSize; - unsigned short bfReserved1; - unsigned short bfReserved2; - dword_t bfOffBits; + unsigned short __attribute__ ((packed)) bfType; + dword_t __attribute__ ((packed)) bfSize; + unsigned short __attribute__ ((packed)) bfReserved1; + unsigned short __attribute__ ((packed)) bfReserved2; + dword_t __attribute__ ((packed)) bfOffBits; } __attribute__ ((packed)) BITMAPFILEHEADER; -typedef struct tagBITMAPINFOHEADER +typedef __attribute__ ((packed)) struct tagBITMAPINFOHEADER { - dword_t biSize; - long_t biWidth; - long_t biHeight; - unsigned short biPlanes; - unsigned short biBitCount; - dword_t biCompression; - dword_t biSizeImage; - long_t biXPelsPerMeter; - long_t biYPelsPerMeter; - dword_t biClrUsed; - dword_t biClrImportant; + dword_t __attribute__ ((packed)) biSize; + long_t __attribute__ ((packed)) biWidth; + long_t __attribute__ ((packed)) biHeight; + unsigned short __attribute__ ((packed)) biPlanes; + unsigned short __attribute__ ((packed)) biBitCount; + dword_t __attribute__ ((packed)) biCompression; + dword_t __attribute__ ((packed)) biSizeImage; + long_t __attribute__ ((packed)) biXPelsPerMeter; + long_t __attribute__ ((packed)) biYPelsPerMeter; + dword_t __attribute__ ((packed)) biClrUsed; + dword_t __attribute__ ((packed)) biClrImportant; } __attribute__ ((packed)) BITMAPINFOHEADER; #if defined(__MWERKS__) --- lxdoom-1.4.4.orig/src/d_ticcmd.h +++ lxdoom-1.4.4/src/d_ticcmd.h @@ -44,15 +44,15 @@ * plus a checksum for internal state consistency. * CPhipps - explicitely signed the elements, since they have to be signed to work right */ -typedef struct +typedef __attribute__ ((packed)) struct { - signed char forwardmove; /* *2048 for move */ - signed char sidemove; /* *2048 for move */ - signed short angleturn; /* <<16 for angle delta */ - short consistancy; /* checks for net game */ - byte chatchar; - byte buttons; -} ticcmd_t; + signed char __attribute__ ((packed)) forwardmove; /* *2048 for move */ + signed char __attribute__ ((packed)) sidemove; /* *2048 for move */ + signed short __attribute__ ((packed)) angleturn; /* <<16 for angle delta */ + short __attribute__ ((packed)) consistancy; /* checks for net game */ + byte __attribute__ ((packed)) chatchar; + byte __attribute__ ((packed)) buttons; +} __attribute__ ((packed)) ticcmd_t; #endif --- lxdoom-1.4.4.orig/src/doomdata.h +++ lxdoom-1.4.4/src/doomdata.h @@ -64,31 +64,31 @@ #define GCC_PACKED __attribute__((packed)) // A single Vertex. -typedef struct { - short x,y; -} mapvertex_t GCC_PACKED; +typedef GCC_PACKED struct { + short GCC_PACKED x,y; +} GCC_PACKED mapvertex_t; // A SideDef, defining the visual appearance of a wall, // by setting textures and offsets. -typedef struct { - short textureoffset; - short rowoffset; - char toptexture[8]; - char bottomtexture[8]; - char midtexture[8]; - short sector; // Front sector, towards viewer. -} mapsidedef_t GCC_PACKED; +typedef GCC_PACKED struct { + short GCC_PACKED textureoffset; + short GCC_PACKED rowoffset; + char GCC_PACKED toptexture[8]; + char GCC_PACKED bottomtexture[8]; + char GCC_PACKED midtexture[8]; + short GCC_PACKED sector; // Front sector, towards viewer. +} GCC_PACKED mapsidedef_t; // A LineDef, as used for editing, and as input to the BSP builder. -typedef struct { - short v1; - short v2; - short flags; - short special; - short tag; - short sidenum[2]; // sidenum[1] will be -1 if one sided -} maplinedef_t GCC_PACKED; +typedef GCC_PACKED struct { + short GCC_PACKED v1; + short GCC_PACKED v2; + short GCC_PACKED flags; + short GCC_PACKED special; + short GCC_PACKED tag; + short GCC_PACKED sidenum[2]; // sidenum[1] will be -1 if one sided +} GCC_PACKED maplinedef_t; // // LineDef attributes. @@ -135,58 +135,58 @@ #define ML_PASSUSE 512 // Sector definition, from editing. -typedef struct { - short floorheight; - short ceilingheight; - char floorpic[8]; - char ceilingpic[8]; - short lightlevel; - short special; - short tag; -} mapsector_t GCC_PACKED; +typedef GCC_PACKED struct { + short GCC_PACKED floorheight; + short GCC_PACKED ceilingheight; + char GCC_PACKED floorpic[8]; + char GCC_PACKED ceilingpic[8]; + short GCC_PACKED lightlevel; + short GCC_PACKED special; + short GCC_PACKED tag; +} GCC_PACKED mapsector_t; // SubSector, as generated by BSP. -typedef struct { - short numsegs; - short firstseg; // Index of first one; segs are stored sequentially. -} mapsubsector_t GCC_PACKED; +typedef GCC_PACKED struct { + short GCC_PACKED numsegs; + short GCC_PACKED firstseg; // Index of first one; segs are stored sequentially. +} GCC_PACKED mapsubsector_t; // LineSeg, generated by splitting LineDefs // using partition lines selected by BSP builder. -typedef struct { - short v1; - short v2; - short angle; - short linedef; - short side; - short offset; -} mapseg_t GCC_PACKED; +typedef GCC_PACKED struct { + short GCC_PACKED v1; + short GCC_PACKED v2; + short GCC_PACKED angle; + short GCC_PACKED linedef; + short GCC_PACKED side; + short GCC_PACKED offset; +} GCC_PACKED mapseg_t; // BSP node structure. // Indicate a leaf. #define NF_SUBSECTOR 0x8000 -typedef struct { - short x; // Partition line from (x,y) to x+dx,y+dy) - short y; - short dx; - short dy; +typedef GCC_PACKED struct { + short GCC_PACKED x; // Partition line from (x,y) to x+dx,y+dy) + short GCC_PACKED y; + short GCC_PACKED dx; + short GCC_PACKED dy; // Bounding box for each child, clip against view frustum. - short bbox[2][4]; + short GCC_PACKED bbox[2][4]; // If NF_SUBSECTOR its a subsector, else it's a node of another subtree. - unsigned short children[2]; -} mapnode_t GCC_PACKED; + unsigned short GCC_PACKED children[2]; +} GCC_PACKED mapnode_t; // Thing definition, position, orientation and type, // plus skill/visibility flags and attributes. -typedef struct { - short x; - short y; - short angle; - short type; - short options; -} mapthing_t GCC_PACKED; +typedef GCC_PACKED struct { + short GCC_PACKED x; + short GCC_PACKED y; + short GCC_PACKED angle; + short GCC_PACKED type; + short GCC_PACKED options; +} GCC_PACKED mapthing_t; #endif // __DOOMDATA__ --- lxdoom-1.4.4.orig/src/l_sound.c +++ lxdoom-1.4.4/src/l_sound.c @@ -152,14 +152,14 @@ else { // CPhipps - must use the length as specified by the MUS data, not the lump length, // as lxmusserver expects the former. - struct { - char sig[4]; - unsigned short scorelen; - unsigned short scorestart; - unsigned short channels; - unsigned short sec_channels; - unsigned short instrumentcount; - unsigned short pad; + __attribute__ ((packed)) struct { + char __attribute__ ((packed)) sig[4]; + unsigned short __attribute__ ((packed)) scorelen; + unsigned short __attribute__ ((packed)) scorestart; + unsigned short __attribute__ ((packed)) channels; + unsigned short __attribute__ ((packed)) sec_channels; + unsigned short __attribute__ ((packed)) instrumentcount; + unsigned short __attribute__ ((packed)) pad; } __attribute__ ((packed)) *musheader = (void*)musdata; size_t MUSlen = sizeof(*musheader) + sizeof(unsigned short) * musheader->instrumentcount + musheader->scorelen; --- lxdoom-1.4.4.orig/src/protocol.h +++ lxdoom-1.4.4/src/protocol.h @@ -30,42 +30,55 @@ #include "d_ticcmd.h" #include "m_swap.h" -enum packet_type_e { - PKT_INIT, // initial packet to server - PKT_SETUP, // game information packet - PKT_GO, // game has started - PKT_TICC, // tics from client - PKT_TICS, // tics from server - PKT_RETRANS, // Request for retransmission - PKT_EXTRA, // Extra info packet - PKT_QUIT, // Player quit game - PKT_DOWN, // Server downed - PKT_WAD, // Wad file request -}; - -typedef struct { - byte checksum; // Simple checksum of the entire packet - enum packet_type_e type; // Type of packet - unsigned tic; // Timestamp -} packet_header_t; +#define PKT_INIT 0 // initial packet to server +#define PKT_SETUP 1 // game information packet +#define PKT_GO 2 // game has started +#define PKT_TICC 3 // tics from client +#define PKT_TICS 4 // tics from server +#define PKT_RETRANS 5 // Request for retransmission +#define PKT_EXTRA 6 // Extra info packet +#define PKT_QUIT 7 // Player quit game +#define PKT_DOWN 8 // Server downed +#define PKT_WAD 9 // Wad file request + +typedef __attribute__ ((packed)) struct { + // Simple checksum of the entire packet + byte __attribute__ ((packed)) checksum; + // Type of packet + byte __attribute__ ((packed)) type; + // Timestamp + unsigned __attribute__ ((packed)) tic; +} __attribute__ ((packed)) packet_header_t; #ifndef GAME_OPTIONS_SIZE // From g_game.h #define GAME_OPTIONS_SIZE 64 #endif -struct setup_packet_s { - byte players, yourplayer, skill, episode, level, deathmatch, complevel, ticdup, extratic; - byte game_options[GAME_OPTIONS_SIZE]; - byte numwads; - byte wadnames[1]; // Actually longer +struct __attribute__ ((packed)) setup_packet_s { + byte __attribute__ ((packed)) players; + byte __attribute__ ((packed)) yourplayer; + byte __attribute__ ((packed)) skill; + byte __attribute__ ((packed)) episode; + byte __attribute__ ((packed)) level; + byte __attribute__ ((packed)) deathmatch; + byte __attribute__ ((packed)) complevel; + byte __attribute__ ((packed)) ticdup; + byte __attribute__ ((packed)) extratic; + byte __attribute__ ((packed)) game_options[GAME_OPTIONS_SIZE]; + byte __attribute__ ((packed)) numwads; + byte __attribute__ ((packed)) wadnames[1]; // Actually longer }; static inline void GetTicSwap(ticcmd_t* dst, const ticcmd_t* src) { - *dst = *src; - dst->angleturn = doom_ntohs(dst->angleturn); - dst->consistancy = doom_ntohs(dst->consistancy); + dst->forwardmove = src->forwardmove; + dst->sidemove = src->sidemove; + dst->angleturn = src->angleturn; + dst->angleturn = doom_ntohs(src->angleturn); + dst->consistancy = doom_ntohs(src->consistancy); + dst->chatchar = src->chatchar; + dst->buttons = src->buttons; } /* --- lxdoom-1.4.4.orig/src/r_data.c +++ lxdoom-1.4.4/src/r_data.c @@ -56,14 +56,14 @@ // and possibly other attributes. // -typedef struct +typedef __attribute__ ((packed)) struct { - short originx; - short originy; - short patch; - short stepdir; // unused in Doom but might be used in Phase 2 Boom - short colormap; // unused in Doom but might be used in Phase 2 Boom -} mappatch_t __attribute__((packed)); + short __attribute__ ((packed)) originx; + short __attribute__ ((packed)) originy; + short __attribute__ ((packed)) patch; + short __attribute__ ((packed)) stepdir; // unused in Doom but might be used in Phase 2 Boom; + short __attribute__ ((packed)) colormap; // unused in Doom but might be used in Phase 2 Boom; +} __attribute__ ((packed)) mappatch_t; // @@ -71,24 +71,24 @@ // A DOOM wall texture is a list of patches // which are to be combined in a predefined order. // -typedef struct +typedef __attribute__ ((packed)) struct { - char name[8]; - boolean masked; - short width; - short height; - char pad[4]; // unused in Doom but might be used in Boom Phase 2 - short patchcount; - mappatch_t patches[1]; -} maptexture_t __attribute__((packed)); + char __attribute__ ((packed)) name[8]; + boolean __attribute__ ((packed)) masked; + short __attribute__ ((packed)) width; + short __attribute__ ((packed)) height; + char __attribute__ ((packed)) pad[4]; // unused in Doom but might be used in Boom Phase 2 + short __attribute__ ((packed)) patchcount; + mappatch_t __attribute__ ((packed)) patches[1]; +} __attribute__ ((packed)) maptexture_t; // A single patch from a texture definition, basically // a rectangular area within the texture rectangle. -typedef struct +typedef __attribute__ ((packed)) struct { - int originx, originy; // Block origin, which has already accounted - int patch; // for the internal origin of the patch. + int __attribute__ ((packed)) originx, originy; // Block origin, which has already accounted + int __attribute__ ((packed)) patch; // for the internal origin of the patch. } texpatch_t __attribute__((packed)); @@ -484,6 +484,8 @@ maxoff2 = 0; } numtextures = numtextures1 + numtextures2; + //lprintf(LO_WARN,"\nR_InitTextures numtextures %d,%d,%d (%d,%d)", + // numtextures, numtextures1, numtextures2, sizeof(maptexture_t),sizeof(mappatch_t)); // killough 4/9/98: make column offsets 32-bit; // clean up malloc-ing to use sizeof @@ -528,7 +530,13 @@ * but I don't believe the pointers to memcpy have to be aligned * either. Use fast memcpy on other machines anyway. */ - memcpy(texture->name, mtexture->name, sizeof(texture->name)); + // memcpy(&texture->name[0], &mtexture->name[0], sizeof(texture->name)); + { char *src; char *dst; + src = (char *)mtexture->name; + dst = (char *)texture->name; + for (j=0; jname); ++j ) + *dst++ = *src++; + } #else /* memcpy seems to assume that its params are aligned on sparc - josh */ /* cph - how this can core dump is beyond me */ @@ -538,15 +546,26 @@ texture->name[j]=mtexture->name[j]; } #endif + //lprintf(LO_WARN,"\nR_InitTextures: Patch %.8s(%.8s)%d w=%hx h=%hx count=%hx %d", + // mtexture->name, + // texture->name, + // offset, + // mtexture->width, + // mtexture->height, + // mtexture->patchcount,sizeof(texture->name)); - mpatch = mtexture->patches; - patch = texture->patches; + mpatch = &mtexture->patches[0]; + patch = &texture->patches[0]; for (j=0 ; jpatchcount ; j++, mpatch++, patch++) { patch->originx = SHORT(mpatch->originx); patch->originy = SHORT(mpatch->originy); patch->patch = patchlookup[SHORT(mpatch->patch)]; + //lprintf(LO_WARN,", %d:%dx%d", + // SHORT(mpatch->patch), + // SHORT(mpatch->originx), + // SHORT(mpatch->originy)); if (patch->patch == -1) { //jff 8/3/98 use logical output routine @@ -735,6 +754,9 @@ const byte *playpal = W_CacheLumpName("PLAYPAL"); byte *my_tranmap; +#ifndef PATH_MAX +#define PATH_MAX 2048 +#endif char fname[PATH_MAX+1], *D_DoomExeDir(void); struct { unsigned char pct; --- lxdoom-1.4.4.orig/src/l_udp.c +++ lxdoom-1.4.4/src/l_udp.c @@ -121,6 +121,22 @@ return 1; } +#ifdef DEBUG_NETWORK +void DebugDumpPacket(packet_header_t* packet, size_t len) +{ + const byte* p = (void*)packet; + + for (p = (void*)packet; p < (byte*)((void*)packet + len) ; p++) + fprintf(stderr,"%02x ", *p); + for (p = (void*)packet; p < (byte*)((void*)packet + len) ; p++) + if (isprint(*p)) + fprintf(stderr,"%c", *p); + else + fprintf(stderr,"."); + fprintf(stderr,"\n"); +} +#endif + static byte ChecksumPacket(const packet_header_t* buffer, size_t len) { const byte* p = (void*)buffer; @@ -139,26 +155,45 @@ size_t sfsize = sizeof(sentfrom); int n = recvfrom(recvsocket, buffer, buflen, 0, (struct sockaddr*)&sentfrom, &sfsize); - if (n >= 0) recvdbytes += n; - else if (errno != EWOULDBLOCK) perror("I_Getpacket:recvfrom"); - return ((n>0 && (buffer->checksum == ChecksumPacket(buffer, n))) ? n : 0); + if (n >= 0) + recvdbytes += n; + else if (errno != EWOULDBLOCK) + perror("I_Getpacket:recvfrom"); + if (n > 0 && buffer->checksum == ChecksumPacket(buffer, n)) + { +#ifdef DEBUG_NETWORK + fprintf(stderr,"\nI_GetPacket %d:", n); + DebugDumpPacket(buffer, n); +#endif + return n; + } + else + return 0; } -void I_SendPacket(packet_header_t* packet, size_t len) +void I_SendPacketTo(packet_header_t* packet, size_t len, struct sockaddr_in* to) { packet->checksum = ChecksumPacket(packet, len); - if (sendto(sendsocket, packet, len, 0, (struct sockaddr *)&sendtoaddr, - sizeof sendtoaddr) < 0) - perror("I_SendPacket: sendto"); +#ifdef DEBUG_NETWORK + fprintf(stderr,"\nI_SendPacketTo %d:", len); + DebugDumpPacket(packet, len); +#endif + if (sendto(sendsocket, packet, len, 0, (struct sockaddr *)to, sizeof *to)<0) + perror("I_SendPacketTo: sendto"); else sentbytes+=len; } -void I_SendPacketTo(packet_header_t* packet, size_t len, struct sockaddr_in* to) +void I_SendPacket(packet_header_t* packet, size_t len) { +#if 0 packet->checksum = ChecksumPacket(packet, len); - if (sendto(sendsocket, packet, len, 0, (struct sockaddr *)to, sizeof *to)<0) - perror("I_SendPacketTo: sendto"); + if (sendto(sendsocket, packet, len, 0, (struct sockaddr *)&sendtoaddr, + sizeof sendtoaddr) < 0) + perror("I_SendPacket: sendto"); else sentbytes+=len; +#else + I_SendPacketTo(packet,len,&sendtoaddr); +#endif } void I_InitSockets(int localport) @@ -178,11 +213,16 @@ } +typedef __attribute__ ((packed)) struct { + packet_header_t __attribute__ ((packed)) head; + short __attribute__ ((packed)) port; + char __attribute__ ((packed)) myaddr[200]; +} __attribute__ ((packed)) initpacket_t; + boolean I_InitNetwork(void) { + initpacket_t initpacket; int p, localport = 5029; - struct { packet_header_t head; short port; char myaddr[200]; } initpacket; - // Get local & remote network addresses if (!(p=M_CheckParm("-net"))) return false; if (++p>=myargc) return false; --- lxdoom-1.4.4.orig/src/l_video_x.c +++ lxdoom-1.4.4/src/l_video_x.c @@ -33,6 +33,7 @@ #include #include +#include #include #include --- lxdoom-1.4.4.orig/src/d_server.c +++ lxdoom-1.4.4/src/d_server.c @@ -221,8 +221,8 @@ signal(SIGHUP , sig_handler); { - int remoteticfrom[MAXPLAYERS] = { 0, 0, 0, 0 }; - int remoteticto[MAXPLAYERS] = { 0, 0, 0, 0 }; + unsigned remoteticfrom[MAXPLAYERS] = { 0, 0, 0, 0 }; + unsigned remoteticto[MAXPLAYERS] = { 0, 0, 0, 0 }; int curplayers = 0; boolean ingame = false; ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS]; @@ -288,7 +288,8 @@ if (++curplayers == numplayers) { ingame=true; printf("All players joined, beginning game.\n"); - packet->type = PKT_GO; packet->tic = 0; + packet->type = PKT_GO; + packet->tic = 0; BroadcastPacket(packet, sizeof *packet); usleep(10000); BroadcastPacket(packet, sizeof *packet); @@ -298,20 +299,22 @@ break; case PKT_TICC: { - byte tics = *(byte*)(packet+1); - int from = *(((byte*)(packet+1))+1); + unsigned tic = ntohl(packet->tic); + unsigned tics = *(byte*)(packet+1); + unsigned from = *(((byte*)(packet+1))+1); if (verbose>2) - printf("tics %d - %d from %d\n", packet->tic, packet->tic + tics - 1, from); - if (packet->tic > remoteticfrom[from]) { + printf("tics %d - %d from %d\n", tic, tic + tics - 1, from); + if (tic > remoteticfrom[from]) { // Missed tics, so request a resend - packet->tic = remoteticfrom[from]; + packet->tic = htonl(remoteticfrom[from]); packet->type = PKT_RETRANS; I_SendPacketTo(packet, sizeof *packet, remoteaddr+from); } else { ticcmd_t *newtic = (void*)(((byte*)(packet+1))+2); - if (packet->tic + tics < remoteticfrom[from]) break; // Won't help - remoteticfrom[from] = packet->tic; + if (tic + tics < remoteticfrom[from]) + break; // Won't help + remoteticfrom[from] = tic; while (tics--) netcmds[from][remoteticfrom[from]++%BACKUPTICS] = *newtic++; } @@ -320,17 +323,18 @@ case PKT_RETRANS: { int from = *(byte*)(packet+1); - if (verbose>2) printf("%d requests resend from %d\n", from, packet->tic); - remoteticto[from] = packet->tic; + if (verbose>2) printf("%d requests resend from %d\n", from, ntohl(packet->tic)); + remoteticto[from] = ntohl(packet->tic); } break; case PKT_QUIT: { int from = *(byte*)(packet+1); - if (verbose>2) printf("%d quits at %d\n", from, packet->tic); + if (verbose>2) + printf("%d quits at %d\n", from, ntohl(packet->tic)); if (playerleftgame[from] == INT_MAX) { // In the game - playerleftgame[from] = packet->tic; + playerleftgame[from] = ntohl(packet->tic); if (ingame && !--curplayers) exit(0); // All players have exited } } @@ -401,7 +405,8 @@ packet_header_t *packet = malloc(sizeof(packet_header_t) + 1 + tics * (1 + numplayers * (1 + sizeof(ticcmd_t)))); byte *p = (void*)(packet+1); - packet->type = PKT_TICS; packet->tic = remoteticto[i] - xtratics; + packet->type = PKT_TICS; + packet->tic = htonl(remoteticto[i] - xtratics); *p++ = tics; if (verbose>1) printf("sending %d tics to %d\n", tics, i); while (tics--) { --- lxdoom-1.4.4.orig/debian/patches/00_fix_errno_decls.dpatch +++ lxdoom-1.4.4/debian/patches/00_fix_errno_decls.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 00_fix_errno_decls.dpatch by Reinhard Tartler +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad lxdoom-1.4.4/src/l_soundgen.c /tmp/dpep.A8QiXe/lxdoom-1.4.4/src/l_soundgen.c +--- lxdoom-1.4.4/src/l_soundgen.c 1999-10-12 15:01:11.000000000 +0200 ++++ /tmp/dpep.A8QiXe/lxdoom-1.4.4/src/l_soundgen.c 2005-03-29 22:28:11.203584656 +0200 +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_CONFIG_H + #include "../config.h" +@@ -179,7 +180,7 @@ + static void I_Ioctl( int fd, int command, int* arg ) + { + int rc; +- extern int errno; ++/* extern int errno; */ + + rc = ioctl(fd, command, arg); + if (rc < 0) { +diff -urNad lxdoom-1.4.4/src/l_video_x.c /tmp/dpep.A8QiXe/lxdoom-1.4.4/src/l_video_x.c +--- lxdoom-1.4.4/src/l_video_x.c 2005-03-29 22:21:45.564210752 +0200 ++++ /tmp/dpep.A8QiXe/lxdoom-1.4.4/src/l_video_x.c 2005-03-29 22:28:38.443443568 +0200 +@@ -749,7 +749,7 @@ + } else { + id = shmget((key_t)key, size, IPC_CREAT|0777); + if (id==-1) { +- extern int errno; ++/* extern int errno; */ + fprintf(stderr, "errno=%d\n", errno); + I_Error("Could not get any shared memory"); + } --- lxdoom-1.4.4.orig/debian/patches/00list +++ lxdoom-1.4.4/debian/patches/00list @@ -0,0 +1 @@ +00_fix_errno_decls.dpatch --- lxdoom-1.4.4.orig/debian/lxdoom.docs +++ lxdoom-1.4.4/debian/lxdoom.docs @@ -0,0 +1,7 @@ +NEWS +README +debian/tmp/usr/share/doc/lxdoom/old-source-docs.tar.gz +debian/tmp/usr/share/doc/lxdoom/boom.txt +debian/tmp/usr/share/doc/lxdoom/boomref.txt +debian/tmp/usr/share/doc/lxdoom/AUTHORS +debian/README.upgrading --- lxdoom-1.4.4.orig/debian/control +++ lxdoom-1.4.4/debian/control @@ -0,0 +1,74 @@ +Source: lxdoom +Section: games +Priority: optional +Maintainer: Joe Drew +Standards-Version: 3.6.1 +Build-Depends: svgalibg1-dev [i386], debhelper (>= 3.0.0), xlibs-dev, dpatch + +Package: lxdoom +Architecture: any +Depends: ${shlibs:Depends}, lxdoom-x11 | lxdoom-svga +Recommends: doom-wad | doom-wad-editor +Description: Unix port of boom, an enhanced version of DOOM + Doom is a 3d shoot'em'up game, written by id Software, first released in + 1993. + . + LxDoom is a version of Doom, designed to run on Unix either under XFree86 or + using SVGALib. + . + LxDoom is based on Boom, a freely available port of Doom for DOS, written by + TeamTNT (http://www.teamtnt.com/). + . + This package includes only the network game server and the required game + wad file (boomlump.wad). To actually play lxdoom, you require lxdoom-x11 + or lxdoom-svga, depending on whether you're going to play lxdoom on the + console or X. Packages which may also enhance your gameplay are + lxdoom-sndserv and lxmusserv, which are the sound server and music server + packages, respectively. + +Package: lxdoom-svga +Architecture: i386 +Depends: ${shlibs:Depends}, lxdoom, debconf +Recommends: lxdoom-sndserv, lxmusserv +Conflicts: suidmanager (<< 0.50) +Provides: doom-engine +Description: svgalib binary for lxdoom + Doom is a 3d shoot'em'up game, written by id Software, first released in + 1993. + . + LxDoom is a version of Doom, designed to run on Unix either under XFree86 or + using SVGALib. + . + LxDoom is based on Boom, a freely available port of Doom for DOS, written by + TeamTNT (http://www.teamtnt.com/). + . + This is the svgalib binary for lxdoom. Note that installing this could + be a security risk - if you don't completely trust a setuid doom binary, + only use lxdoom-x11. + +Package: lxdoom-x11 +Architecture: any +Depends: ${shlibs:Depends}, lxdoom +Recommends: lxdoom-sndserv, lxmusserv +Provides: doom-engine +Description: X binary for lxdoom + Doom is a 3d shoot'em'up game, written by id Software, first released in + 1993. + . + LxDoom is a version of Doom, designed to run on Unix either under XFree86 or + using SVGALib. + . + LxDoom is based on Boom, a freely available port of Doom for DOS, written by + TeamTNT (http://www.teamtnt.com/). + . + This is the X binary for LxDoom. + +Package: lxdoom-sndserv +Architecture: any +Depends: ${shlibs:Depends}, lxdoom-x11 | lxdoom-svga +Replaces: lxdoom (<< 1.4.4-2) +Description: sound effects server for lxdoom + Sound effects in LxDoom are played by a separate executable, the sound + server. This sound server isn't required to play LxDoom (it will detect + the presence or absence of both sndserv and musserv) -- it will, however, + enhance your playing experience. --- lxdoom-1.4.4.orig/debian/README.Debian +++ lxdoom-1.4.4/debian/README.Debian @@ -0,0 +1,30 @@ +lxdoom for Debian +----------------- + +Debianised now that lxdoom is GPL'd. + +The sound server lxdoom-sndserv isn't required; without it, however, +you don't hear any sound. ;) + +Same goes for lxmusserv, the music server. + +There are two separate binaries for lxdoom; one is lxdoom, which requires +X, and is in package lxdoom-x11. The other is lsdoom, which requires +svgalib, and is in package lxdoom-svga. + +The file ~/.lxdoom/boom.cfg could prove useful to configure, particularly +with regard to screen size in X. See also boom.cfg(5). + +Also note that if you have previously installed lxdoom, you probably +have a ~/.lxdoom/boom.cfg file that refers to /usr/local/games or +/usr/local/share. Just s/local//g and you'll be fine. + +If you want to run lsdoom, the lxdoom SVGAlib binary, as a normal user, +it will need to be setuid root. You can accomplish this by using the +following sequence of commands: + + dpkg-statoverride --add root root 4755 /usr/games/lsdoom + chown root:root /usr/games/lsdoom + chmod 4755 /usr/games/lsdoom + + -- Joe Drew , Fri, 26 Mar 2004 23:44:44 -0500 --- lxdoom-1.4.4.orig/debian/rules +++ lxdoom-1.4.4/debian/rules @@ -0,0 +1,111 @@ +#!/usr/bin/make -f +# Debhelper-using rules file for lxdoom + +include /usr/share/dpatch/dpatch.make + +DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) +DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM) + +SVGA_ARCHS=i386 +SVGA_KERNS=linux +ifneq ($(findstring $(DEB_BUILD_GNU_CPU),$(SVGA_ARCHS)),) +ifneq ($(findstring $(DEB_BUILD_GNU_SYSTEM),$(SVGA_KERNS)),) +DO_SVGA=1 +endif +endif + +SOUND_KERNS=linux +ifneq ($(findstring $(DEB_BUILD_GNU_SYSTEM),$(SOUND_KERNS)),) +DO_SOUND=1 +endif + +CFLAGS = -g +INSTALL_PROGRAM = /usr/bin/install -c + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +build: patch-stamp build-stamp +build-stamp: + dh_testdir + + CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir=/usr/share/man --disable-cpu-opt + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp install-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + + dh_clean + +install: DH_OPTIONS=-s +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) install prefix=`pwd`/debian/tmp/usr mandir=`pwd`/debian/tmp/usr/share/man INSTALL_PROGRAM="$(INSTALL_PROGRAM)" + +ifndef DO_SOUND + install -m755 debian/no_sound debian/tmp/usr/games/sndserv +endif + dh_movefiles +ifdef DO_SVGA + cp debian/lxdoom-x11/usr/share/man/man6/lxdoom.6 \ + debian/lxdoom-svga/usr/share/man/man6/lsdoom.6 +endif + + cp debian/lxdoom.xpm debian/lxdoom/usr/share/pixmaps + + touch install-stamp + +# Build architecture-independent files here. (none) +binary-indep: + +# Build architecture-dependent files here. +binary-arch: DH_OPTIONS=-s +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs + dh_installmenu + dh_installman + dh_undocumented + dh_installchangelogs ChangeLog + dh_strip + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- lxdoom-1.4.4.orig/debian/lxdoom.xpm +++ lxdoom-1.4.4/debian/lxdoom.xpm @@ -0,0 +1,41 @@ +/* XPM */ +static char * lxdoom_icon2_xpm[] = { +"32 32 6 1", +" c None", +". c #000000", +"+ c #FF0000", +"@ c #00007F", +"# c #0000FF", +"$ c #FFFF00", +" ", +" ", +" .... .... ... ", +" .++. .++.. ..+. ", +" .++. .+++...+.. ", +" .++. ..+++.+.. ", +" .++. ..+++.. ", +" .++. ..+++.. ", +" .++........+.+++.. ", +" .+++++++..+...+++. ", +" .+++++++.+.. ..++. ", +" ........... .... ", +"................................", +".@@@@@@.@@@@@@@.@@@@@@@.@@@@@@@.", +".@@@@@#.##@@@@@.@@@@@##.##@@@@@.", +".@@.@##.###.@@@.@@@.###.####@@@.", +".@@.##$.$##.##@.@##.##$.$#####@.", +".@#.#$$.$$#.###.###.#$$.$$#####.", +".##.$$$.$$$.###.###.$$$.$$$####.", +".##.$$$.$$$.###.###.$$$.$$.$###.", +".#$.$$$.$$$.$##.##$.$$$.$$.$$##.", +".$$$$$$.$$$$$$#.#$$$$$$.$$.$.$#.", +".$$$$$$.$$$$$$$.$$$$$$$.$$.$.$$.", +".$$$$$...$$$$$$.$$$$$$...$.$.$$.", +".$$$$.. ..$$$$$.$$$$$.. ...$.$$.", +".$$$.. ..$$$$.$$$$.. .$.$$.", +".$$.. ..$$$.$$$.. ...$$.", +".$.. ..$$.$$.. .$$.", +"... ..$.$.. ..$.", +".. ..... ...", +" ", +" "}; --- lxdoom-1.4.4.orig/debian/changelog +++ lxdoom-1.4.4/debian/changelog @@ -0,0 +1,151 @@ +lxdoom (1.4.4-9ubuntu1) hoary; urgency=low + + * fix ftbfs on amd64 with removing "extern int errno;" declarations + + -- Reinhard Tartler Tue, 29 Mar 2005 22:30:27 +0200 + +lxdoom (1.4.4-9) unstable; urgency=low + + * Move lxdoom to main (Closes: Bug#266197) + * Build with correct manpage. I guess I uploaded a .deb without the + changes before. Closes: Bug#186404 + + -- Joe Drew Wed, 25 Aug 2004 21:52:22 -0400 + +lxdoom (1.4.4-8) unstable; urgency=low + + * Remove debconf handling of suid bit/dpkg-statoverride. Time to get + with the program and stop having ridiculous debconf use in my packages. + Closes: Bug#237108 + * Change Depends: to lxdoom-x11 | lxdoom-svga so that -x11 is chosen + by default when someone runs `apt-get install lxdoom'. + * Integrate GNU/Hurd patch. Closes: Bug#148857 + * debian/rules: + + Support more recent DEB_BUILD_OPTIONS + * debian/control: + + Update to Standards-Version 3.6.1 + * Fix lxdoom man page wrapping. Closes: Bug#186404 + * Update menu files to be more syntax-compliant. + + -- Joe Drew Sat, 27 Mar 2004 00:17:56 -0500 + +lxdoom (1.4.4-7) unstable; urgency=low + + * debian/control: + + Correct spelling error in lxdoom-sndserv description (Closes: #125101) + + Correct reference to lxdoom-x11 from lxdoom-x (Closes: #128962) + + Change Suggests to Recommends for lxdoom-sndserv and lxmusserv + (Closes: #128359) + + Upgrade to Standards-Version 3.5.6 + + Change Build-Depends on debhelper to >= 3.0.0, because of use + of dh_installman + * Wrote a manpage for sndserv. + * debian/rules: + + modify to support DEB_BUILD_OPTIONS + * Switch to DH_COMPAT=3, and all that entails + + -- Joe Drew Sun, 13 Jan 2002 01:21:26 -0500 + +lxdoom (1.4.4-6) unstable; urgency=low + + * Tuned build-dependencies for i386 only + * network and disk structure packing for arm (possibly others?) + Gallantly provided by Tim Rikers I'm in your debt! + + -- Joe Drew Wed, 30 May 2001 22:28:56 -0400 + +lxdoom (1.4.4-5) unstable; urgency=low + + * Enabled build on multiple architectures (ignoring lxdoom-svga) + Closes: Bug#85850 + + -- Joe Drew Tue, 13 Feb 2001 22:10:52 -0500 + +lxdoom (1.4.4-4) unstable; urgency=low + + * Fixed stupid template paste error + + -- Joe Drew Mon, 5 Feb 2001 21:36:14 -0500 + +lxdoom (1.4.4-3) unstable; urgency=low + + * Update lxdoom-svga to be Architecture: i386 only, as svgalib isn't + available on other platforms. + * Include german localizations for lxdoom-svga debconf templates + (Closes: Bug#84838) + + -- Joe Drew Sun, 4 Feb 2001 14:56:42 -0500 + +lxdoom (1.4.4-2) unstable; urgency=low + + * Moved filesystem-touching stuff from lxdoom-svga's config to its postinst + (Closes: Bug#82609) + * .lxdoom directory no longer created as user root (Closes: Bug#50890) + * Added README.upgrading for people who used to use extremely old versions + of lxdoom (<1.4) (bug technically was not a bug) (Closes: Bug#80978) + * Removed COPYING from lxdoom package (removed from Makefile.am) + * Added documentation for remote X displays to README (Closes: Bug#52523) + * New version of lxdoom fixes svgalib mouse problem (Closes: Bug#63043) + * Added icon to menu system (Closes: Bug#75762) + Thanks to Robert Ancell who took his time to create not one, but TWO + icons for lxdoom. If someone who has more time/talent/etc wants to + create another one, feel free! + * Created proper lxdoom-sndserv.6 undocumented link in lxdoom-sndserv package + + -- Joe Drew Mon, 22 Jan 2001 23:14:30 -0500 + +lxdoom (1.4.4-1) unstable; urgency=low + + * New upstream release + * Remove suidmanager, add debconf + * New things coming up: fbdoom + + -- Joe Drew Thu, 11 Jan 2001 23:29:39 -0500 + +lxdoom (1.4.2-1) unstable; urgency=low + + * New upstream release + * Added Build-Depends + * Never uploaded + + -- Joe Drew Sat, 11 Mar 2000 22:12:25 -0500 + +lxdoom (1.4.1-2) unstable; urgency=low + + * Back in contrib, at least until we can get some DFSG-free iwads + * Ship lsdoom as suid by default + * Made /etc/lxdoom.conf be removed on purge + + -- Joe Drew Tue, 23 Nov 1999 18:02:57 -0500 + +lxdoom (1.4.1-1.1) unstable; urgency=low + + * Sponsored upload, minor changes + * changed lxdoom-x to lxdoom-x11 for consistancy + * added menu entry for lxdoom-svga + * added hints to menu entries + * actually copy the lxdoom manpage as lsdoom.6 so you don't need to have + lxdoom-x11 installed to read the manpag + * move where lsdoom's suid thingy gets installed to after dh_movefiles + * put the package in main since it's now useful without non-free wad + files--if used with a doom-wad-editor it can be used to make real DFSG + free wads. And it will be, too! + + -- Joseph Carter Sun, 7 Nov 1999 00:32:26 -0800 + +lxdoom (1.4.1-1) unstable; urgency=low + + * New upstream release + + -- Joe Drew Sat, 23 Oct 1999 16:21:19 -0400 + +lxdoom (1.4.0-1) unstable; urgency=low + + * Initial Release. + * Never uploaded. + + -- Joe Drew Sat, 23 Oct 1999 14:55:39 -0400 + +Local variables: +mode: debian-changelog +End: --- lxdoom-1.4.4.orig/debian/copyright +++ lxdoom-1.4.4/debian/copyright @@ -0,0 +1,18 @@ +This package was debianized by Joe Drew on +Wed, 13 Oct 1999 16:20:35 -0400. + +It was downloaded from http://lxdoom.linuxgames.com . + +Upstream Author: Colin Phipps + +Copyright: + +Copyright (C) 1993-1996 by id Software +Copyright (C) 1999 by Colin Phipps +Copyright (C) 1999 by Colin Phipps, Gady Kozma +Copyright (C) 1999 by Jim Flynn, Rand Phares, Ty Halderman, Colin Phipps + +You are free to distribute this software under the terms of +the GNU General Public License. +On Debian systems, the complete text of the GNU General Public +License can be found in the file /usr/share/common-licenses/GPL. --- lxdoom-1.4.4.orig/debian/lxdoom-x11.files +++ lxdoom-1.4.4/debian/lxdoom-x11.files @@ -0,0 +1,2 @@ +usr/games/lxdoom +usr/share/man/man6/lxdoom.6 --- lxdoom-1.4.4.orig/debian/lxdoom-x11.menu +++ lxdoom-1.4.4/debian/lxdoom-x11.menu @@ -0,0 +1,3 @@ +?package(lxdoom-x11):needs="X11" section="Games/Arcade"\ + title="LxDoom" hints="Doom,3D" command="/usr/games/lxdoom"\ + icon="/usr/share/pixmaps/lxdoom.xpm" --- lxdoom-1.4.4.orig/debian/watch +++ lxdoom-1.4.4/debian/watch @@ -0,0 +1,5 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +ftp.linuxgames.com /cph lxdoom-(.*)\.tar\.gz debian uupdate --- lxdoom-1.4.4.orig/debian/lxdoom-svga.menu +++ lxdoom-1.4.4/debian/lxdoom-svga.menu @@ -0,0 +1,3 @@ +?package(lxdoom-svga):needs="vc" section="Games/Arcade"\ + title="LsDoom" hints="Doom,3D" command="/usr/games/lsdoom"\ + icon="/usr/share/pixmaps/lxdoom.xpm" --- lxdoom-1.4.4.orig/debian/lxdoom-sndserv.files +++ lxdoom-1.4.4/debian/lxdoom-sndserv.files @@ -0,0 +1 @@ +usr/games/sndserv --- lxdoom-1.4.4.orig/debian/lxdoom-svga.files +++ lxdoom-1.4.4/debian/lxdoom-svga.files @@ -0,0 +1 @@ +usr/games/lsdoom --- lxdoom-1.4.4.orig/debian/lxdoom-svga.postinst +++ lxdoom-1.4.4/debian/lxdoom-svga.postinst @@ -0,0 +1,27 @@ +#! /bin/sh +# postinst script for tmp +# +# see: dh_installdeb(1) + +set -e + +OLDCONF=/etc/lsdoom.conf + +if [ -e "$OLDCONF" ]; then + if grep -q "^is_suid=y.*$" /etc/lsdoom.conf; then + dpkg-statoverride --add root root 4755 /usr/games/lsdoom \ + >/dev/null 2>&1 || true + chown root:root /usr/games/lsdoom + chmod 4755 /usr/games/lsdoom + else + dpkg-statoverride --remove /usr/games/lsdoom \ + >/dev/null 2>&1 || true + chmod 0755 /usr/games/lsdoom + fi +fi + +rm -f /etc/lsdoom.conf + +#DEBHELPER# + +exit 0 --- lxdoom-1.4.4.orig/debian/sndserv.6 +++ lxdoom-1.4.4/debian/sndserv.6 @@ -0,0 +1,32 @@ +.TH SNDSERV 6 +.SH NAME +sndserv \- sound effects server for lxdoom and related games + +.SH SYNOPSIS +\fBsndserv\fR [\fIdevice\fR] [\fI-devparm\fR] + +.SH DESCRIPTION +.I sndserv +is the sound-playing server used by lxdoom for sound output. +.PP +It is not likely of any use to the average end-user, except for in +conjunction with lxdoom. + +.SH OPTIONS +.TP +.B device +The device used for output. Must be the first option on the command line. +.TP +.B \-devparm +Be verbose; output debugging information. Must be the second or third +option on the command-line. +.SH AUTHOR +DOOM was originally written by id Software, and is Copyright (C) 1993-1996 +id Software. LxDoom is based on Boom, a freely available port of Doom for DOS, +written by TeamTNT ( +.B http://www.teamtnt.com/ +), and is Copyright (C) 1999 Colin Phipps. LxDoom is licensed under the +GNU General Public License. +.PP +This manual page was written by Joe Drew for the +Debian system, but may be used elsewhere under the GPL. --- lxdoom-1.4.4.orig/debian/README.upgrading +++ lxdoom-1.4.4/debian/README.upgrading @@ -0,0 +1,6 @@ +If you have trouble with scripts written for lxdoom < 1.4, particularly +with regard to the -net command and multiplayer, please note that +there has been a complete change in the semantics of the -net option. +This will cause network games to not function. Please note that lxdoom +doesn't fail because of bad command-line options; it simply doesn't work! +Read the manpage for lxdoom(1) for further details. --- lxdoom-1.4.4.orig/debian/lxdoom-svga.postrm +++ lxdoom-1.4.4/debian/lxdoom-svga.postrm @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ "$1" == "purge" ]; then + dpkg-statoverride --remove /usr/games/lsdoom >/dev/null 2>&1 || true +fi + + +#DEBHELPER# --- lxdoom-1.4.4.orig/debian/lxdoom-svga.README.Debian +++ lxdoom-1.4.4/debian/lxdoom-svga.README.Debian @@ -0,0 +1,13 @@ +lxdoom-svga +----------- +If you want to run lsdoom, the lxdoom SVGAlib binary, as a normal user, +it will need to be setuid root. You can accomplish this by using the +following sequence of commands: + + dpkg-statoverride --add root root 4755 /usr/games/lsdoom + chown root:root /usr/games/lsdoom + chmod 4755 /usr/games/lsdoom + +This used to be automated via debconf, but is now left up to the user. + + -- Joe Drew , Fri, 26 Mar 2004 23:43:36 -0500 --- lxdoom-1.4.4.orig/debian/lxdoom-svga.dirs +++ lxdoom-1.4.4/debian/lxdoom-svga.dirs @@ -0,0 +1 @@ +usr/share/man/man6/ --- lxdoom-1.4.4.orig/debian/lxdoom.files +++ lxdoom-1.4.4/debian/lxdoom.files @@ -0,0 +1,2 @@ +usr/games/lxdoom-game-server +usr/share/games/doom/boomlump.wad --- lxdoom-1.4.4.orig/debian/lxdoom.dirs +++ lxdoom-1.4.4/debian/lxdoom.dirs @@ -0,0 +1,10 @@ +usr/ +usr/sbin +usr/share +usr/share/games +usr/share/games/doom +usr/share/man +usr/share/man/man5 +usr/share/man/man6 +usr/share/pixmaps +usr/games --- lxdoom-1.4.4.orig/debian/lxdoom.manpages +++ lxdoom-1.4.4/debian/lxdoom.manpages @@ -0,0 +1,2 @@ +debian/tmp/usr/share/man/man5/boom.cfg.5 +debian/tmp/usr/share/man/man6/lxdoom-game-server.6 --- lxdoom-1.4.4.orig/debian/lxdoom-sndserv.manpages +++ lxdoom-1.4.4/debian/lxdoom-sndserv.manpages @@ -0,0 +1 @@ +debian/sndserv.6 --- lxdoom-1.4.4.orig/debian/no_sound +++ lxdoom-1.4.4/debian/no_sound @@ -0,0 +1,3 @@ +#!/bin/sh +echo "Sorry, no sound support for `uname -s` yet." +exit 1