From c54f2f66fcbab44670e50dd88ee57149150053d2 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 20 Jun 2006 20:30:39 +0000 Subject: [PATCH] - Unlimited the monster pain sounds in Hexen after playing as the Cleric a while and killing centaurs with the flechette. - Fixed: Moving to an old level in a hub caused the old player's inventory to spawn owned by the current player (but still hanging off the old player), so the game would hang when trying to delete it. - Modified re2c so that it doesn't add a date to the file it generates. Thus, if it regenerates a file during a full rebuild, SVN won't see it as a change. Also updated it to 0.10.5. - Fixed: SC_GetString() did not properly terminate sc_String when the last token in the file had no white space after it. Since I could not actually find the problem (it works fine in debug mode and I saw no logic errors), I decided to take this opportunity to reimplement it using an re2c-generated scanner. Now it's 1.6x faster than before and correctness is easier to verify. - Fixed: FMODSoundRenderer::Shutdown() also needs to reset NumChannels. - Added back the Manifest to zdoom.rc for non-VC8 Windows compilers. - Fixed MinGW compilation again. Now it uses the same method as Makefile.linux to find all the source files so that it doesn't need to be manually updated each time source files are added or removed. - Added the SVN revision number to the version string. A new tool is used to obtain this information from the svnversion command and write it into a header file. If you don't have the svn command line tools installed or didn't check it out from the repository, you can still build. I added some rules for this to Makefile.linux, and I assume they work because they do for Makefile.mingw. - Fixed: MIDISong2 did not delete MusHeader in its destructor. SVN r200 (trunk) --- Makefile.linux | 21 +- Makefile.mingw | 408 +----- ccdv-win32.c | 3 +- docs/rh-log.txt | 30 + src/farchive.cpp | 16 +- src/p_mobj.cpp | 4 +- src/sc_man.cpp | 148 +- src/sc_man_scanner.h | 540 ++++++++ src/sc_man_scanner.re | 137 ++ src/sound/fmodsound.cpp | 2 + src/sound/music_midi_midiout.cpp | 1010 +++++++------- src/version.h | 14 +- src/win32/i_system.cpp | 16 +- src/win32/zdoom.rc | 16 +- tools/dehsupp/scanner.c | 2 +- tools/re2c/CHANGELOG | 9 + tools/re2c/README | 21 +- tools/re2c/code.cc | 3 +- tools/re2c/config_w32.h | 6 +- tools/re2c/main.cc | 2 +- tools/re2c/parser.cc | 5 +- tools/re2c/re2c.1 | 6 +- tools/re2c/scanner.cc | 1447 ++++++++------------ tools/re2c/scanner.re | 3 +- tools/updaterevision/Makefile | 30 + tools/updaterevision/updaterevision.c | 117 ++ tools/updaterevision/updaterevision.vcproj | 356 +++++ wadsrc/decorate/heretic/hereticammo.txt | 2 +- wadsrc/sndinfo.txt | 12 + wadsrc/wadsrc.vcproj | 35 +- zdoom.sln | 58 +- zdoom.vcproj | 1338 +++++++++--------- 32 files changed, 3198 insertions(+), 2619 deletions(-) create mode 100644 src/sc_man_scanner.h create mode 100644 src/sc_man_scanner.re create mode 100644 tools/updaterevision/Makefile create mode 100644 tools/updaterevision/updaterevision.c create mode 100644 tools/updaterevision/updaterevision.vcproj diff --git a/Makefile.linux b/Makefile.linux index 70d26f329..03200e024 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -62,7 +62,7 @@ OBJS = $(addprefix $(OBJDIR)/,$(AOBJFILES)) $(COBJS) all: $(ZDOOMBIN) toolsandpk3 zdoom.pk3 -$(ZDOOMBIN): ccdv $(OBJDIR) $(OBJS) +$(ZDOOMBIN): ccdv updaterev $(OBJDIR) $(OBJS) $(CCDV) $(CXX) $(LDFLAGS) $(OBJDIR)/autostart.o \ $(filter-out %/autostart.o %/autozend.o,$(OBJS)) \ $(OBJDIR)/autozend.o -o $(ZDOOMBIN) @@ -84,21 +84,28 @@ $(OBJDIR): mkdir $(OBJDIR) toolsandpk3: ccdv tools/makewad/makewad tools/dehsupp/dehsupp tools/xlatcc/xlatcc - make -C wadsrc/ + $(MAKE) -C wadsrc/ zdoom.pk3: toolsandpk3 ln -sf wadsrc/zdoom.pk3 ./ tools/makewad/makewad: - make -C tools/makewad/ + $(MAKE) -C tools/makewad/ tools/dehsupp/dehsupp: - make -C tools/dehsupp/ + $(MAKE) -C tools/dehsupp/ tools/xlatcc/xlatcc: - make -C tools/xlatcc/ + $(MAKE) -C tools/xlatcc/ -.PHONY : clean cleandeps cleanobjs distclean toolsandpk3 cleantools + +updaterev: tools/updaterevision/updaterevision + @tools/updaterevision/updaterevision . src/svnrevision.h + +tools/updaterevision/updaterevision: + $(MAKE) -C tools/updaterevision + +.PHONY : clean cleandeps cleanobjs distclean toolsandpk3 cleantools updaterev clean: cleanobjs rm -f $(ZDOOMDEBUG) $(ZDOOM) $(ZDOOM).map @@ -130,6 +137,6 @@ cleanobjs: ccdv: ccdv-posix.c @gcc -Os -s ccdv-posix.c -o ccdv -ifneq ($(MAKECMDGOALS),clean) +ifeq (,$(findstring $(MAKECMDGOALS),clean cleandeps cleanobjs distclean toolsandpk3 cleantools updaterev)) -include $(DEPS) endif diff --git a/Makefile.mingw b/Makefile.mingw index ba34e25c0..13f14bcfa 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -4,39 +4,20 @@ # Where did you install the FMOD API to? Change this line so that the build process can find it. FMODDIR = "c:/program files/fmodapi375win" -ifndef CC - CC=gcc -endif -ifndef CXX - CC=g++ -endif +CC ?= gcc +CXX ?= g++ -ifndef CONFIG - CONFIG=Release -endif - -ifndef OPTLEVEL - OPTLEVEL=2 -endif - -ifndef ARCH_TYPE - ARCH_TYPE=pentium -endif - -ifndef TUNE_TYPE - TUNE_TYPE=athlon-xp -endif - -ifndef RELEASETARGET - RELEASETARGET = zdoomgcc.exe -endif -ifndef DEBUGTARGET - DEBUGTARGET = zdoomgccd.exe -endif -DEBUGOBJDIR = debugobj -RELEASEOBJDIR = releaseobj +CONFIG ?= Release +OPTLEVEL ?= 2 +ARCH_TYPE ?= pentium +TUNE_TYPE ?= i686 +RELEASETARGET ?= zdoomgcc.exe +DEBUGTARGET ?= zdoomgccd.exe +DEBUGOBJDIR ?= debugobj +RELEASEOBJDIR ?= releaseobj CCDV = @ccdv +RE2C = tools/re2c/re2c CPPFLAGS = -DWIN32 -D_WIN32 -D_WINDOWS -DHAVE_STRUPR -DHAVE_FILELENGTH -DI_DO_NOT_LIKE_BIG_DOWNLOADS -D__forceinline=inline -MMD -Izlib -IFLAC -Isrc -Isrc/win32 -Isrc/g_doom -Isrc/g_heretic -I src/g_hexen -Isrc/g_raven -Isrc/g_strife -Isrc/g_shared -Isrc/oplsynth -Isrc/sound LDFLAGS += flac/libflac.a zlib/libz.a -lfmod -lwsock32 -lwinmm -lddraw -ldsound -ldxguid -ldinput8 -lole32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -lsetupapi -lws2_32 -Wl,--subsystem,windows @@ -65,340 +46,42 @@ ifeq ($(CONFIG),Release) TARGET = $(RELEASETARGET) endif -# This must be first. -OBJECTS = $(OBJDIR)/autostart.o +SRCDIRS = src/ $(addprefix src/,g_doom/ g_heretic/ g_hexen/ g_raven/ g_shared/ g_strife/ oplsynth/ sound/ win32/) +VPATH = $(SRCDIRS) -OBJECTS += \ - $(OBJDIR)/am_map.o \ - $(OBJDIR)/b_bot.o \ - $(OBJDIR)/b_func.o \ - $(OBJDIR)/b_game.o \ - $(OBJDIR)/b_move.o \ - $(OBJDIR)/b_think.o \ - $(OBJDIR)/bbannouncer.o \ - $(OBJDIR)/c_bind.o \ - $(OBJDIR)/c_cmds.o \ - $(OBJDIR)/c_console.o \ - $(OBJDIR)/c_cvars.o \ - $(OBJDIR)/c_dispatch.o \ - $(OBJDIR)/c_expr.o \ - $(OBJDIR)/cmdlib.o \ - $(OBJDIR)/colormatcher.o \ - $(OBJDIR)/configfile.o \ - $(OBJDIR)/ct_chat.o \ - $(OBJDIR)/d_dehacked.o \ - $(OBJDIR)/d_main.o \ - $(OBJDIR)/d_net.o \ - $(OBJDIR)/d_netinfo.o \ - $(OBJDIR)/d_protocol.o \ - $(OBJDIR)/decallib.o \ - $(OBJDIR)/decorations.o \ - $(OBJDIR)/dobject.o \ - $(OBJDIR)/dobjtype.o \ - $(OBJDIR)/doomdef.o \ - $(OBJDIR)/doomstat.o \ - $(OBJDIR)/dsectoreffect.o \ - $(OBJDIR)/dthinker.o \ - $(OBJDIR)/f_finale.o \ - $(OBJDIR)/f_wipe.o \ - $(OBJDIR)/farchive.o \ - $(OBJDIR)/files.o \ - $(OBJDIR)/g_game.o \ - $(OBJDIR)/g_hub.o \ - $(OBJDIR)/g_level.o \ - $(OBJDIR)/gameconfigfile.o \ - $(OBJDIR)/gi.o \ - $(OBJDIR)/hu_scores.o \ - $(OBJDIR)/info.o \ - $(OBJDIR)/infodefaults.o \ - $(OBJDIR)/lumpconfigfile.o \ - $(OBJDIR)/m_alloc.o \ - $(OBJDIR)/m_argv.o \ - $(OBJDIR)/m_bbox.o \ - $(OBJDIR)/m_cheat.o \ - $(OBJDIR)/m_fixed.o \ - $(OBJDIR)/m_menu.o \ - $(OBJDIR)/m_misc.o \ - $(OBJDIR)/m_options.o \ - $(OBJDIR)/m_png.o \ - $(OBJDIR)/m_random.o \ - $(OBJDIR)/mus2midi.o \ - $(OBJDIR)/nodebuild.o \ - $(OBJDIR)/nodebuild_classify_nosse2.o \ - $(OBJDIR)/nodebuild_classify_sse2.o \ - $(OBJDIR)/nodebuild_events.o \ - $(OBJDIR)/nodebuild_extract.o \ - $(OBJDIR)/nodebuild_gl.o \ - $(OBJDIR)/nodebuild_utility.o \ - $(OBJDIR)/p_acs.o \ - $(OBJDIR)/p_buildmap.o \ - $(OBJDIR)/p_ceiling.o \ - $(OBJDIR)/p_conversation.o \ - $(OBJDIR)/p_doors.o \ - $(OBJDIR)/p_effect.o \ - $(OBJDIR)/p_enemy.o \ - $(OBJDIR)/p_floor.o \ - $(OBJDIR)/p_interaction.o \ - $(OBJDIR)/p_lights.o \ - $(OBJDIR)/p_lnspec.o \ - $(OBJDIR)/p_map.o \ - $(OBJDIR)/p_maputl.o \ - $(OBJDIR)/p_mobj.o \ - $(OBJDIR)/p_pillar.o \ - $(OBJDIR)/p_plats.o \ - $(OBJDIR)/p_pspr.o \ - $(OBJDIR)/p_saveg.o \ - $(OBJDIR)/p_sectors.o \ - $(OBJDIR)/p_setup.o \ - $(OBJDIR)/p_sight.o \ - $(OBJDIR)/p_spec.o \ - $(OBJDIR)/p_switch.o \ - $(OBJDIR)/p_teleport.o \ - $(OBJDIR)/p_terrain.o \ - $(OBJDIR)/p_things.o \ - $(OBJDIR)/p_tick.o \ - $(OBJDIR)/p_trace.o \ - $(OBJDIR)/p_user.o \ - $(OBJDIR)/p_writemap.o \ - $(OBJDIR)/p_xlat.o \ - $(OBJDIR)/po_man.o \ - $(OBJDIR)/r_anim.o \ - $(OBJDIR)/r_bsp.o \ - $(OBJDIR)/r_data.o \ - $(OBJDIR)/r_draw.o \ - $(OBJDIR)/r_drawt.o \ - $(OBJDIR)/r_main.o \ - $(OBJDIR)/r_plane.o \ - $(OBJDIR)/r_segs.o \ - $(OBJDIR)/r_sky.o \ - $(OBJDIR)/r_things.o \ - $(OBJDIR)/r_polymost.o \ - $(OBJDIR)/s_advsound.o \ - $(OBJDIR)/s_environment.o \ - $(OBJDIR)/s_playlist.o \ - $(OBJDIR)/s_sndseq.o \ - $(OBJDIR)/s_sound.o \ - $(OBJDIR)/sc_man.o \ - $(OBJDIR)/skins.o \ - $(OBJDIR)/st_stuff.o \ - $(OBJDIR)/stats.o \ - $(OBJDIR)/stringtable.o \ - $(OBJDIR)/tables.o \ - $(OBJDIR)/tempfiles.o \ - $(OBJDIR)/thingdef.o \ - $(OBJDIR)/thingdef_codeptr.o \ - $(OBJDIR)/thingdef_exp.o \ - $(OBJDIR)/v_collection.o \ - $(OBJDIR)/v_draw.o \ - $(OBJDIR)/v_font.o \ - $(OBJDIR)/v_palette.o \ - $(OBJDIR)/v_pfx.o \ - $(OBJDIR)/v_text.o \ - $(OBJDIR)/v_video.o \ - $(OBJDIR)/vectors.o \ - $(OBJDIR)/name.o \ - $(OBJDIR)/zstring.o \ - $(OBJDIR)/zstrformat.o \ - $(OBJDIR)/w_wad.o \ - $(OBJDIR)/wi_stuff.o \ - $(OBJDIR)/a_arachnotron.o \ - $(OBJDIR)/a_archvile.o \ - $(OBJDIR)/a_bossbrain.o \ - $(OBJDIR)/a_bruiser.o \ - $(OBJDIR)/a_cacodemon.o \ - $(OBJDIR)/a_cyberdemon.o \ - $(OBJDIR)/a_demon.o \ - $(OBJDIR)/a_doomhealth.o \ - $(OBJDIR)/a_doomimp.o \ - $(OBJDIR)/a_doommisc.o \ - $(OBJDIR)/a_doomplayer.o \ - $(OBJDIR)/a_doomweaps.o \ - $(OBJDIR)/a_fatso.o \ - $(OBJDIR)/a_keen.o \ - $(OBJDIR)/a_lostsoul.o \ - $(OBJDIR)/a_painelemental.o \ - $(OBJDIR)/a_possessed.o \ - $(OBJDIR)/a_revenant.o \ - $(OBJDIR)/a_scriptedmarine.o \ - $(OBJDIR)/a_spidermaster.o \ - $(OBJDIR)/doom_sbar.o \ - $(OBJDIR)/a_beast.o \ - $(OBJDIR)/a_chicken.o \ - $(OBJDIR)/a_clink.o \ - $(OBJDIR)/a_dsparil.o \ - $(OBJDIR)/a_hereticartifacts.o \ - $(OBJDIR)/a_hereticimp.o \ - $(OBJDIR)/a_heretickeys.o \ - $(OBJDIR)/a_hereticmisc.o \ - $(OBJDIR)/a_hereticplayer.o \ - $(OBJDIR)/a_hereticweaps.o \ - $(OBJDIR)/a_ironlich.o \ - $(OBJDIR)/a_knight.o \ - $(OBJDIR)/a_mummy.o \ - $(OBJDIR)/a_snake.o \ - $(OBJDIR)/a_wizard.o \ - $(OBJDIR)/heretic_sbar.o \ - $(OBJDIR)/a_bats.o \ - $(OBJDIR)/a_bishop.o \ - $(OBJDIR)/a_blastradius.o \ - $(OBJDIR)/a_boostarmor.o \ - $(OBJDIR)/a_centaur.o \ - $(OBJDIR)/a_clericboss.o \ - $(OBJDIR)/a_clericflame.o \ - $(OBJDIR)/a_clericholy.o \ - $(OBJDIR)/a_clericmace.o \ - $(OBJDIR)/a_clericplayer.o \ - $(OBJDIR)/a_clericstaff.o \ - $(OBJDIR)/a_demons.o \ - $(OBJDIR)/a_dragon.o \ - $(OBJDIR)/a_ettin.o \ - $(OBJDIR)/a_fighteraxe.o \ - $(OBJDIR)/a_fighterboss.o \ - $(OBJDIR)/a_fighterhammer.o \ - $(OBJDIR)/a_fighterplayer.o \ - $(OBJDIR)/a_fighterquietus.o \ - $(OBJDIR)/a_firedemon.o \ - $(OBJDIR)/a_flechette.o \ - $(OBJDIR)/a_fog.o \ - $(OBJDIR)/a_healingradius.o \ - $(OBJDIR)/a_heresiarch.o \ - $(OBJDIR)/a_hexenspecialdecs.o \ - $(OBJDIR)/a_iceguy.o \ - $(OBJDIR)/a_korax.o \ - $(OBJDIR)/a_mageboss.o \ - $(OBJDIR)/a_magecone.o \ - $(OBJDIR)/a_magelightning.o \ - $(OBJDIR)/a_mageplayer.o \ - $(OBJDIR)/a_magestaff.o \ - $(OBJDIR)/a_magewand.o \ - $(OBJDIR)/a_mana.o \ - $(OBJDIR)/a_pig.o \ - $(OBJDIR)/a_puzzleitems.o \ - $(OBJDIR)/a_serpent.o \ - $(OBJDIR)/a_spike.o \ - $(OBJDIR)/a_summon.o \ - $(OBJDIR)/a_teleportother.o \ - $(OBJDIR)/a_weaponpiece.o \ - $(OBJDIR)/a_weaponpieces.o \ - $(OBJDIR)/a_wraith.o \ - $(OBJDIR)/hexen_sbar.o \ - $(OBJDIR)/a_artiegg.o \ - $(OBJDIR)/a_artitele.o \ - $(OBJDIR)/a_minotaur.o \ - $(OBJDIR)/a_ravenambient.o \ - $(OBJDIR)/a_acolyte.o \ - $(OBJDIR)/a_alienspectres.o \ - $(OBJDIR)/a_coin.o \ - $(OBJDIR)/a_crusader.o \ - $(OBJDIR)/a_entityboss.o \ - $(OBJDIR)/a_inquisitor.o \ - $(OBJDIR)/a_loremaster.o \ - $(OBJDIR)/a_macil.o \ - $(OBJDIR)/a_oracle.o \ - $(OBJDIR)/a_programmer.o \ - $(OBJDIR)/a_reaver.o \ - $(OBJDIR)/a_rebels.o \ - $(OBJDIR)/a_sentinel.o \ - $(OBJDIR)/a_spectral.o \ - $(OBJDIR)/a_stalker.o \ - $(OBJDIR)/a_strifeammo.o \ - $(OBJDIR)/a_strifebishop.o \ - $(OBJDIR)/a_strifeitems.o \ - $(OBJDIR)/a_strifeplayer.o \ - $(OBJDIR)/a_strifestuff.o \ - $(OBJDIR)/a_strifeweapons.o \ - $(OBJDIR)/a_templar.o \ - $(OBJDIR)/a_thingstoblowup.o \ - $(OBJDIR)/strife_sbar.o \ - $(OBJDIR)/a_action.o \ - $(OBJDIR)/a_artifacts.o \ - $(OBJDIR)/a_bridge.o \ - $(OBJDIR)/a_camera.o \ - $(OBJDIR)/a_debris.o \ - $(OBJDIR)/a_decals.o \ - $(OBJDIR)/a_flashfader.o \ - $(OBJDIR)/a_fountain.o \ - $(OBJDIR)/a_hatetarget.o \ - $(OBJDIR)/a_keys.o \ - $(OBJDIR)/a_lightning.o \ - $(OBJDIR)/a_movingcamera.o \ - $(OBJDIR)/a_pickups.o \ - $(OBJDIR)/a_quake.o \ - $(OBJDIR)/a_secrettrigger.o \ - $(OBJDIR)/a_sectoraction.o \ - $(OBJDIR)/a_sharedmisc.o \ - $(OBJDIR)/a_skies.o \ - $(OBJDIR)/a_soundenvironment.o \ - $(OBJDIR)/a_soundsequence.o \ - $(OBJDIR)/a_spark.o \ - $(OBJDIR)/a_waterzone.o \ - $(OBJDIR)/a_weapons.o \ - $(OBJDIR)/hudmessages.o \ - $(OBJDIR)/shared_sbar.o \ - $(OBJDIR)/fmopl.o \ - $(OBJDIR)/mlkernel.o \ - $(OBJDIR)/mlopl.o \ - $(OBJDIR)/mlopl_io.o \ - $(OBJDIR)/opl_mus_player.o \ - $(OBJDIR)/altsound.o \ - $(OBJDIR)/altsoundmixer.o \ - $(OBJDIR)/fmodsound.o \ - $(OBJDIR)/i_music.o \ - $(OBJDIR)/i_sound.o \ - $(OBJDIR)/music_cd.o \ - $(OBJDIR)/music_flac.o \ - $(OBJDIR)/music_midi_midiout.o \ - $(OBJDIR)/music_midi_stream.o \ - $(OBJDIR)/music_midi_timidity.o \ - $(OBJDIR)/music_mod.o \ - $(OBJDIR)/music_mus_midiout.o \ - $(OBJDIR)/music_mus_opl.o \ - $(OBJDIR)/music_spc.o \ - $(OBJDIR)/music_stream.o \ - $(OBJDIR)/sample_flac.o \ - $(OBJDIR)/helperthread.o \ - $(OBJDIR)/i_input.o \ - $(OBJDIR)/i_net.o \ - $(OBJDIR)/eaxedit.o \ - $(OBJDIR)/i_cd.o \ - $(OBJDIR)/i_main.o \ - $(OBJDIR)/i_system.o \ - $(OBJDIR)/hardware.o \ - $(OBJDIR)/i_crash.o \ - $(OBJDIR)/i_movie.o \ - $(OBJDIR)/win32video.o \ - $(OBJDIR)/zdoom.o - -ifndef NOASM - OBJECTS += \ - $(OBJDIR)/a.o \ - $(OBJDIR)/misc.o \ - $(OBJDIR)/tmap.o \ - $(OBJDIR)/tmap2.o \ - $(OBJDIR)/tmap3.o - CPPFLAGS := -DUSEASM=1 $(CPPFLAGS) +CPPSRCS = $(wildcard $(addsuffix *.cpp,$(SRCDIRS))) +CSRCS = $(wildcard $(addsuffix *.c,$(SRCDIRS))) +RCSRCS = $(wildcard $(addsuffix *.rc,$(SRCDIRS))) +ifdef NOASM + CFLAGS += -DNOASM else - CPPFLAGS := -DNOASM $(CPPFLAGS) + ASRCS = $(wildcard src/*.nas) + CFLAGS += -DUSEASM=1 endif +SRCS = $(CSRCS) $(CPPSRCS) $(ASRCS) +CPPOBJFILES = $(notdir $(CPPSRCS:%.cpp=%.o)) +COBJFILES = $(notdir $(CSRCS:%.c=%.o)) +AOBJFILES = $(notdir $(ASRCS:%.nas=%.o)) +RCOBJFILES = $(notdir $(RCSRCS:%.rc=%.o)) -# This must be last -OBJECTS += $(OBJDIR)/autozend.o +COBJS = $(addprefix $(OBJDIR)/,$(CPPOBJFILES) $(COBJFILES) $(RCOBJFILES)) +DEPS = $(patsubst %.o,%.d,$(COBJS)) +UNORDEREDOBJS = $(addprefix $(OBJDIR)/,$(AOBJFILES)) $(COBJS) -VPATH = src src/g_doom src/g_heretic src/g_hexen src/g_raven src/g_strife src/g_shared src/oplsynth src/sound src/win32 - - -.PHONY: clean all +OBJS = $(OBJDIR)/autostart.o $(filter-out %/autostart.o %/autozend.o,$(UNORDEREDOBJS)) $(OBJDIR)/autozend.o all: $(TARGET) +# This file needs special handling so that it actually gets compiled with SSE2 support. +$(OBJDIR)/nodebuild_classify_sse2.o: src/nodebuild_classify_sse2.cpp + $(CCDV) $(CXX) $(CXXFLAGS) -msse2 -mfpmath=sse -c -o $@ $< + +src/sc_man_scanner.h: src/sc_man_scanner.re + $(CCDV) $(RE2C) -s -o $@ $< $(OBJDIR)/%.o : %.cpp $(CCDV) $(CXX) $(CXXFLAGS) -o $@ -c $< -# This file needs special handling so that it actually gets compiled with SSE2 support. -$(OBJDIR)/nodebuild_classify_sse2.o: nodebuild_classify_sse2.cpp - $(CCDV) $(CXX) $(CXXFLAGS) -msse2 -mfpmath=sse -c -o $@ $< - $(OBJDIR)/%.o : %.nas $(CCDV) nasmw -o $@ -f win32 $< @@ -406,8 +89,8 @@ $(OBJDIR)/%.o : %.rc $(CCDV) windres --include-dir=src/win32 -o $@ -i $< -$(TARGET): testobjdir $(OBJECTS) - $(CCDV) $(CXX) -o $@ $(OBJECTS) $(LDFLAGS) +$(TARGET): testobjdir updaterev $(OBJS) + $(CCDV) $(CXX) -o $@ $(OBJS) $(LDFLAGS) clean: -del /q /f $(RELEASETARGET) 2>nul @@ -415,9 +98,22 @@ clean: -del /q /f $(DEBUGOBJDIR) 2>nul -del /q /f $(RELEASEOBJDIR) 2>nul +cleandep: + -del /q /f $(DEBUGOBJDIR)\*.d 2>nul + -del /q /f $(RELEASEOBJDIR)\*.d 2>nul + testobjdir: -@if not exist $(OBJDIR) mkdir $(OBJDIR) -ifneq ($(MAKECMDGOALS),clean) --include $(OBJECTS:%.o=%.d) +updaterev: tools/updaterevision/updaterevision.exe + @tools/updaterevision/updaterevision . src/svnrevision.h + +tools/updaterevision/updaterevision.exe: + $(MAKE) -C tools/updaterevision + + +ifeq (,$(findstring $(MAKECMDGOALS),clean cleandep updaterev)) +-include $(DEPS) endif + +.PHONY: clean all updaterev testobjdir cleandep diff --git a/ccdv-win32.c b/ccdv-win32.c index 2cbba6afd..c3b77fdae 100644 --- a/ccdv-win32.c +++ b/ccdv-win32.c @@ -473,7 +473,8 @@ void mainCRTStartup(void) lstrcmpi(gAction+8, "ld") == 0)) || (extlen == 3 && (lstrcmpi(gAction+8, "gcc") == 0 || - lstrcmpi(gAction+8, "g++") == 0))) + lstrcmpi(gAction+8, "g++") == 0)) || + (extlen == 7 && lstrcmpi(gAction+8, "windres") == 0)) { gcc = 1; } diff --git a/docs/rh-log.txt b/docs/rh-log.txt index ec1158e22..ee8518a5b 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,33 @@ +June 20, 2006 +- Unlimited the monster pain sounds in Hexen after playing as the Cleric a + while and killing centaurs with the flechette. +- Fixed: Moving to an old level in a hub caused the old player's inventory to + spawn owned by the current player (but still hanging off the old player), so + the game would hang when trying to delete it. +- Modified re2c so that it doesn't add a date to the file it generates. Thus, + if it regenerates a file during a full rebuild, SVN won't see it as a change. + Also updated it to 0.10.5. +- Fixed: SC_GetString() did not properly terminate sc_String when the last + token in the file had no white space after it. Since I could not actually + find the problem (it works fine in debug mode and I saw no logic errors), + I decided to take this opportunity to reimplement it using an re2c-generated + scanner. Now it's 1.6x faster than before and correctness is easier to + verify. + +June 19, 2006 +- Fixed: FMODSoundRenderer::Shutdown() also needs to reset NumChannels. +- Added back the Manifest to zdoom.rc for non-VC8 Windows compilers. +- Fixed MinGW compilation again. Now it uses the same method as Makefile.linux + to find all the source files so that it doesn't need to be manually updated + each time source files are added or removed. +- Added the SVN revision number to the version string. A new tool is used to + obtain this information from the svnversion command and write it into a + header file. If you don't have the svn command line tools installed or didn't + check it out from the repository, you can still build. I added some rules for + this to Makefile.linux, and I assume they work because they do for + Makefile.mingw. +- Fixed: MIDISong2 did not delete MusHeader in its destructor. + June 19, 2006 (Changes by Graf Zahl) - Removed the unused sfx_ variables for the chainsaw sounds. - Fixed map name checks in idclev, hxvisit, for +map and the titlemap. diff --git a/src/farchive.cpp b/src/farchive.cpp index 1ae58ca9a..e5d18bd76 100644 --- a/src/farchive.cpp +++ b/src/farchive.cpp @@ -1138,7 +1138,7 @@ FArchive &FArchive::ReadObject (DObject* &obj, PClass *wanttype) // But also create a new one so that we can get past the one // stored in the archive. - DObject *tempobj = type->CreateNew (); + AActor *tempobj = static_cast(type->CreateNew ()); MapObject (obj != NULL ? obj : tempobj); tempobj->Serialize (*this); tempobj->CheckIfSerialized (); @@ -1146,6 +1146,13 @@ FArchive &FArchive::ReadObject (DObject* &obj, PClass *wanttype) // around just so that the load will succeed. if (obj != NULL) { + // When the temporary player's inventory items were loaded, + // they became owned by the real player. Undo that now. + for (AInventory *item = tempobj->Inventory; + item != NULL; item = item->Inventory) + { + item->Owner = tempobj; + } tempobj->Destroy (); } else @@ -1173,12 +1180,17 @@ FArchive &FArchive::ReadObject (DObject* &obj, PClass *wanttype) // Printf ("Use player class: %s (%u)\n", type->Name, m_File->Tell()); obj = players[playerNum].mo; - DObject *tempobj = type->CreateNew (); + AActor *tempobj = static_cast(type->CreateNew ()); MapObject (obj != NULL ? obj : tempobj); tempobj->Serialize (*this); tempobj->CheckIfSerialized (); if (obj != NULL) { + for (AInventory *item = tempobj->Inventory; + item != NULL; item = item->Inventory) + { + item->Owner = tempobj; + } tempobj->Destroy (); } else diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 4782c7844..838897bf7 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -687,7 +687,9 @@ void AActor::DestroyAllInventory () { while (Inventory != NULL) { - Inventory->Destroy (); + AInventory *item = Inventory; + item->Destroy (); + assert (item != Inventory); } } diff --git a/src/sc_man.cpp b/src/sc_man.cpp index 5de5a22b9..35a796b38 100644 --- a/src/sc_man.cpp +++ b/src/sc_man.cpp @@ -20,6 +20,7 @@ #include "w_wad.h" #include "cmdlib.h" #include "m_misc.h" +#include "templates.h" // MACROS ------------------------------------------------------------------ @@ -263,8 +264,7 @@ void SC_SetEscape (bool esc) BOOL SC_GetString () { - char *text; - BOOL foundToken; + char *marker, *tok; CheckOpen(); if (AlreadyGot) @@ -272,154 +272,16 @@ BOOL SC_GetString () AlreadyGot = false; return true; } - foundToken = false; sc_Crossed = false; if (ScriptPtr >= ScriptEndPtr) { sc_End = true; return false; } - while (foundToken == false) - { - while (ScriptPtr < ScriptEndPtr && *ScriptPtr <= ' ') - { - if (*ScriptPtr++ == '\n') - { - sc_Line++; - sc_Crossed = true; - } - } - if (ScriptPtr >= ScriptEndPtr) - { - sc_End = true; - return false; - } - if ((CMode || *ScriptPtr != ASCII_COMMENT) && - !(ScriptPtr[0] == CPP_COMMENT && ScriptPtr < ScriptEndPtr - 1 && - (ScriptPtr[1] == CPP_COMMENT || ScriptPtr[1] == C_COMMENT))) - { // Found a token - foundToken = true; - } - else - { // Skip comment - if (ScriptPtr[0] == CPP_COMMENT && ScriptPtr[1] == C_COMMENT) - { // C comment - while (ScriptPtr[0] != C_COMMENT || ScriptPtr[1] != CPP_COMMENT) - { - if (ScriptPtr[0] == '\n') - { - sc_Line++; - sc_Crossed = true; - } - ScriptPtr++; - if (ScriptPtr >= ScriptEndPtr - 1) - { - sc_End = true; - return false; - } - } - ScriptPtr += 2; - } - else - { // C++ comment - while (*ScriptPtr++ != '\n') - { - if (ScriptPtr >= ScriptEndPtr) - { - sc_End = true; - return false; - } - } - sc_Line++; - sc_Crossed = true; - } - } - } - text = sc_String; - if (*ScriptPtr == ASCII_QUOTE) - { // Quoted string - ScriptPtr++; - while (*ScriptPtr != ASCII_QUOTE) - { - // Hack alert: Do not allow escaped quotation marks when parsing DECORATE! - if (*ScriptPtr=='\\' && ScriptPtr[1]=='"' && Escape) - { - *text++ = '"'; - ScriptPtr+=2; - } - else - { - *text++ = *ScriptPtr++; - } - if (ScriptPtr == ScriptEndPtr - || text == &sc_String[MAX_STRING_SIZE-1]) - { - break; - } - } - ScriptPtr++; - } - else - { // Normal string - static const char *stopchars; - if (CMode) - { - stopchars = CMODE_STOPCHARS; - - // '-' can be its own token, or it can be part of a negative number - if (*ScriptPtr == '-') - { - *text++ = '-'; - ScriptPtr++; - if (ScriptPtr < ScriptEndPtr && *ScriptPtr >= '0' && *ScriptPtr <= '9') - { - stopchars = CMODE_STOPCHARS_NODECIMAL; - goto grabtoken; - } - goto gottoken; - } - else if (*ScriptPtr >= '0' && *ScriptPtr <= '9') - { - stopchars = CMODE_STOPCHARS_NODECIMAL; - } - else if (*ScriptPtr == '.' && ScriptPtr[1] >= '0' && ScriptPtr[1] <= '9') - { - stopchars = CMODE_STOPCHARS_NODECIMAL; - } - } - else - { - stopchars = NORMAL_STOPCHARS; - } - if (strchr (stopchars, *ScriptPtr)) - { - *text++ = *ScriptPtr++; - // [GRB] Allow 2-char operators - if (CMode && strchr ("&=|<>", *ScriptPtr)) - *text++ = *ScriptPtr++; - } - else - { -grabtoken: - while ((*ScriptPtr > ' ') && (strchr (stopchars, *ScriptPtr) == NULL) - && (CMode || *ScriptPtr != ASCII_COMMENT) - && !(ScriptPtr[0] == CPP_COMMENT && (ScriptPtr < ScriptEndPtr - 1) && - (ScriptPtr[1] == CPP_COMMENT || ScriptPtr[1] == C_COMMENT))) - { - *text++ = *ScriptPtr++; - if (ScriptPtr == ScriptEndPtr - || text == &sc_String[MAX_STRING_SIZE-1]) - { - break; - } - } - } - } -gottoken: - *text = 0; - sc_StringLen = text - sc_String; - return true; + // In case the generated scanner does not use marker, avoid compiler warnings. + marker; +#include "sc_man_scanner.h" } //========================================================================== diff --git a/src/sc_man_scanner.h b/src/sc_man_scanner.h new file mode 100644 index 000000000..d186c94ca --- /dev/null +++ b/src/sc_man_scanner.h @@ -0,0 +1,540 @@ +/* Generated by re2c 0.10.5 */ +#line 1 "src/sc_man_scanner.re" +#define YYCTYPE char +#define YYCURSOR cursor +#define YYLIMIT limit +#define YYMARKER marker + + // This buffer must be as large as the largest YYFILL call + YYCTYPE eofbuf[2]; +#define YYFILL(n) { if(n == 2) { eofbuf[0] = *cursor; } eofbuf[n-1] = '\n'; cursor = eofbuf; limit = eofbuf + n - 1; sc_End = true; } + +//#define YYDEBUG(s,c) { Printf ("%d: %02x\n", s, c); } +#define YYDEBUG(s,c) + + char *cursor = ScriptPtr; + char *limit = ScriptEndPtr; + +std: + tok = YYCURSOR; +#line 32 "src/sc_man_scanner.re" + + if (!CMode) + { + +#line 26 "src/sc_man_scanner.h" +{ + YYCTYPE yych; + + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if(yych <= '/') { + if(yych <= ' ') { + if(yych == 0x0A) goto yy8; + goto yy6; + } else { + if(yych == '"') goto yy10; + if(yych <= '.') goto yy14; + goto yy3; + } + } else { + if(yych <= '<') { + if(yych == ';') goto yy4; + goto yy14; + } else { + if(yych <= '=') goto yy12; + if(yych <= 'z') goto yy14; + if(yych <= '}') goto yy12; + goto yy14; + } + } +yy2: +#line 46 "src/sc_man_scanner.re" + { goto normal_token; } +#line 55 "src/sc_man_scanner.h" +yy3: + yych = *++YYCURSOR; + if(yych == '*') goto yy28; + if(yych == '/') goto yy24; + goto yy19; +yy4: + yych = *++YYCURSOR; + goto yy25; +#line 48 "src/sc_man_scanner.re" + { goto normal_token; } +#line 66 "src/sc_man_scanner.h" +yy6: + ++YYCURSOR; + yych = *YYCURSOR; + goto yy23; +yy7: +#line 39 "src/sc_man_scanner.re" + { goto std; } +#line 74 "src/sc_man_scanner.h" +yy8: + ++YYCURSOR; +#line 40 "src/sc_man_scanner.re" + { goto newline; } +#line 79 "src/sc_man_scanner.h" +yy10: + ++YYCURSOR; +#line 41 "src/sc_man_scanner.re" + { goto string; } +#line 84 "src/sc_man_scanner.h" +yy12: + ++YYCURSOR; +#line 43 "src/sc_man_scanner.re" + { goto normal_token; } +#line 89 "src/sc_man_scanner.h" +yy14: + yych = *++YYCURSOR; + goto yy17; +yy15: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych <= '/') { + if(yych <= '"') { + if(yych == '!') goto yy18; + goto yy2; + } else { + if(yych == '*') goto yy2; + if(yych <= '.') goto yy18; + goto yy2; + } + } else { + if(yych <= '<') { + if(yych == ';') goto yy2; + goto yy18; + } else { + if(yych <= '=') goto yy2; + if(yych <= 'z') goto yy18; + if(yych <= '}') goto yy2; + goto yy18; + } + } +yy16: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy17: + if(yych <= ':') { + if(yych <= '"') { + if(yych == '!') goto yy16; + goto yy2; + } else { + if(yych == '/') goto yy15; + goto yy16; + } + } else { + if(yych <= '=') { + if(yych == '<') goto yy16; + goto yy2; + } else { + if(yych <= 'z') goto yy16; + if(yych <= '}') goto yy2; + goto yy16; + } + } +yy18: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy19: + if(yych <= '/') { + if(yych <= '"') { + if(yych == '!') goto yy18; + goto yy2; + } else { + if(yych == '*') goto yy20; + if(yych <= '.') goto yy18; + goto yy15; + } + } else { + if(yych <= '<') { + if(yych == ';') goto yy2; + goto yy18; + } else { + if(yych <= '=') goto yy2; + if(yych <= 'z') goto yy18; + if(yych <= '}') goto yy2; + goto yy18; + } + } +yy20: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych == '*') goto yy20; + if(yych == '/') goto yy15; + goto yy2; +yy22: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy23: + if(yych == 0x0A) goto yy7; + if(yych <= ' ') goto yy22; + goto yy7; +yy24: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy25: + if(yych != 0x0A) goto yy24; + ++YYCURSOR; +#line 37 "src/sc_man_scanner.re" + { goto newline; } +#line 189 "src/sc_man_scanner.h" +yy28: + ++YYCURSOR; +#line 36 "src/sc_man_scanner.re" + { goto comment; } +#line 194 "src/sc_man_scanner.h" +} +#line 49 "src/sc_man_scanner.re" + + } + else + { + +#line 202 "src/sc_man_scanner.h" +{ + YYCTYPE yych; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if(yych <= '9') { + if(yych <= '%') { + if(yych <= ' ') { + if(yych == 0x0A) goto yy36; + goto yy34; + } else { + if(yych == '"') goto yy38; + goto yy48; + } + } else { + if(yych <= ',') { + if(yych <= '&') goto yy43; + if(yych <= '\'') goto yy49; + goto yy48; + } else { + if(yych <= '-') goto yy40; + if(yych <= '.') goto yy48; + if(yych >= '0') goto yy41; + } + } + } else { + if(yych <= '^') { + if(yych <= '=') { + if(yych <= ';') goto yy48; + if(yych <= '<') goto yy46; + goto yy44; + } else { + if(yych <= '>') goto yy47; + if(yych <= '@') goto yy48; + if(yych <= 'Z') goto yy49; + goto yy48; + } + } else { + if(yych <= 'z') { + if(yych == '`') goto yy48; + goto yy49; + } else { + if(yych == '|') goto yy45; + if(yych <= '~') goto yy48; + goto yy49; + } + } + } + yych = *++YYCURSOR; + if(yych == '*') goto yy73; + if(yych == '/') goto yy71; +yy33: +#line 67 "src/sc_man_scanner.re" + { goto normal_token; } +#line 256 "src/sc_man_scanner.h" +yy34: + ++YYCURSOR; + yych = *YYCURSOR; + goto yy70; +yy35: +#line 57 "src/sc_man_scanner.re" + { goto std; } +#line 264 "src/sc_man_scanner.h" +yy36: + ++YYCURSOR; +#line 58 "src/sc_man_scanner.re" + { goto newline; } +#line 269 "src/sc_man_scanner.h" +yy38: + ++YYCURSOR; +#line 59 "src/sc_man_scanner.re" + { goto string; } +#line 274 "src/sc_man_scanner.h" +yy40: + yych = *++YYCURSOR; + if(yych <= '/') goto yy33; + if(yych <= '9') goto yy67; + goto yy33; +yy41: + ++YYCURSOR; + if((yych = *YYCURSOR) <= '@') { + if(yych <= '-') { + if(yych == '\'') goto yy51; + } else { + if(yych <= '.') goto yy65; + if(yych <= '/') goto yy42; + if(yych <= '9') goto yy63; + } + } else { + if(yych <= '_') { + if(yych <= 'Z') goto yy51; + if(yych >= '_') goto yy51; + } else { + if(yych <= '`') goto yy42; + if(yych <= 'z') goto yy51; + if(yych >= 0x7F) goto yy51; + } + } +yy42: +#line 61 "src/sc_man_scanner.re" + { goto normal_token; } +#line 303 "src/sc_man_scanner.h" +yy43: + yych = *++YYCURSOR; + if(yych == '&') goto yy61; + goto yy33; +yy44: + yych = *++YYCURSOR; + if(yych == '=') goto yy59; + goto yy33; +yy45: + yych = *++YYCURSOR; + if(yych == '|') goto yy57; + goto yy33; +yy46: + yych = *++YYCURSOR; + if(yych == '<') goto yy55; + goto yy33; +yy47: + yych = *++YYCURSOR; + if(yych == '>') goto yy53; + goto yy33; +yy48: + yych = *++YYCURSOR; + goto yy33; +yy49: + ++YYCURSOR; + yych = *YYCURSOR; + goto yy52; +yy50: +#line 68 "src/sc_man_scanner.re" + { goto normal_token; } +#line 334 "src/sc_man_scanner.h" +yy51: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy52: + if(yych <= 'Z') { + if(yych <= '/') { + if(yych == '\'') goto yy51; + goto yy50; + } else { + if(yych <= '9') goto yy51; + if(yych <= '@') goto yy50; + goto yy51; + } + } else { + if(yych <= '`') { + if(yych == '_') goto yy51; + goto yy50; + } else { + if(yych <= 'z') goto yy51; + if(yych <= '~') goto yy50; + goto yy51; + } + } +yy53: + ++YYCURSOR; +#line 66 "src/sc_man_scanner.re" + { goto normal_token; } +#line 363 "src/sc_man_scanner.h" +yy55: + ++YYCURSOR; +#line 65 "src/sc_man_scanner.re" + { goto normal_token; } +#line 368 "src/sc_man_scanner.h" +yy57: + ++YYCURSOR; +#line 64 "src/sc_man_scanner.re" + { goto normal_token; } +#line 373 "src/sc_man_scanner.h" +yy59: + ++YYCURSOR; +#line 63 "src/sc_man_scanner.re" + { goto normal_token; } +#line 378 "src/sc_man_scanner.h" +yy61: + ++YYCURSOR; +#line 62 "src/sc_man_scanner.re" + { goto normal_token; } +#line 383 "src/sc_man_scanner.h" +yy63: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych <= '@') { + if(yych <= '-') { + if(yych == '\'') goto yy51; + goto yy42; + } else { + if(yych <= '.') goto yy65; + if(yych <= '/') goto yy42; + if(yych <= '9') goto yy63; + goto yy42; + } + } else { + if(yych <= '_') { + if(yych <= 'Z') goto yy51; + if(yych <= '^') goto yy42; + goto yy51; + } else { + if(yych <= '`') goto yy42; + if(yych <= 'z') goto yy51; + if(yych <= '~') goto yy42; + goto yy51; + } + } +yy65: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych <= '/') goto yy42; + if(yych <= '9') goto yy65; + goto yy42; +yy67: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych == '.') goto yy65; + if(yych <= '/') goto yy42; + if(yych <= '9') goto yy67; + goto yy42; +yy69: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy70: + if(yych == 0x0A) goto yy35; + if(yych <= ' ') goto yy69; + goto yy35; +yy71: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + if(yych == 0x0A) goto yy75; + goto yy71; +yy73: + ++YYCURSOR; +#line 54 "src/sc_man_scanner.re" + { goto comment; } +#line 443 "src/sc_man_scanner.h" +yy75: + ++YYCURSOR; +#line 55 "src/sc_man_scanner.re" + { goto newline; } +#line 448 "src/sc_man_scanner.h" +} +#line 71 "src/sc_man_scanner.re" + + } + +comment: + +#line 456 "src/sc_man_scanner.h" +{ + YYCTYPE yych; + if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); + yych = *YYCURSOR; + if(yych == 0x0A) goto yy81; + if(yych != '*') goto yy83; + ++YYCURSOR; + if((yych = *YYCURSOR) == '/') goto yy84; +yy80: +#line 88 "src/sc_man_scanner.re" + { goto comment; } +#line 468 "src/sc_man_scanner.h" +yy81: + ++YYCURSOR; +#line 78 "src/sc_man_scanner.re" + { + if (YYCURSOR >= YYLIMIT) + { + ScriptPtr = ScriptEndPtr; + return false; + } + sc_Line++; + sc_Crossed = true; + goto comment; + } +#line 482 "src/sc_man_scanner.h" +yy83: + yych = *++YYCURSOR; + goto yy80; +yy84: + ++YYCURSOR; +#line 76 "src/sc_man_scanner.re" + { goto std; } +#line 490 "src/sc_man_scanner.h" +} +#line 89 "src/sc_man_scanner.re" + + +newline: + if (YYCURSOR >= YYLIMIT) + { + ScriptPtr = ScriptEndPtr; + return false; + } + sc_Line++; + sc_Crossed = true; + goto std; + +normal_token: + ScriptPtr = (YYCURSOR >= YYLIMIT) ? ScriptEndPtr : cursor; + sc_StringLen = MIN (ScriptPtr - tok, MAX_STRING_SIZE-1); + memcpy (sc_String, tok, sc_StringLen); + sc_String[sc_StringLen] = '\0'; + return true; + +string: + if (YYLIMIT != ScriptEndPtr) + { + ScriptPtr = ScriptEndPtr; + return false; + } + ScriptPtr = cursor; + for (sc_StringLen = 0; cursor < YYLIMIT; ++cursor) + { + if (Escape && *cursor == '\\' && *(cursor + 1) == '"') + { + cursor++; + } + else if (*cursor == '"') + { + break; + } + if (*cursor == '\n') + { + sc_Line++; + sc_Crossed = true; + } + if (sc_StringLen < MAX_STRING_SIZE-1) + { + sc_String[sc_StringLen++] = *cursor; + } + } + ScriptPtr = cursor + 1; + sc_String[sc_StringLen] = '\0'; + return true; diff --git a/src/sc_man_scanner.re b/src/sc_man_scanner.re new file mode 100644 index 000000000..55e391d7e --- /dev/null +++ b/src/sc_man_scanner.re @@ -0,0 +1,137 @@ +#define YYCTYPE char +#define YYCURSOR cursor +#define YYLIMIT limit +#define YYMARKER marker + + // This buffer must be as large as the largest YYFILL call + YYCTYPE eofbuf[2]; +#define YYFILL(n) { if(n == 2) { eofbuf[0] = *cursor; } eofbuf[n-1] = '\n'; cursor = eofbuf; limit = eofbuf + n - 1; sc_End = true; } + +//#define YYDEBUG(s,c) { Printf ("%d: %02x\n", s, c); } +#define YYDEBUG(s,c) + + char *cursor = ScriptPtr; + char *limit = ScriptEndPtr; + +std: + tok = YYCURSOR; +/*!re2c + any = [\000-\377]; + WSP = ([\000- ]\[\n]); + NWS = (any\[\000- ]); + D = [0-9]; + + TOK1 = [{}|=]; + TOKC = [{}|=/`~!@#$%^&*()\[\]\\?\-=+;:<>,.]; + + STOP1 = (TOK1|["/;]); + STOPC = (TOKC|["]); + + TOK2 = (NWS\STOP1); + TOKC2 = (NWS\STOPC); +*/ + if (!CMode) + { + /*!re2c + "/*" { goto comment; } /* C comment */ + ("//"|";") (any\"\n")* "\n" { goto newline; } /* C++/Hexen comment */ + + WSP+ { goto std; } /* whitespace */ + "\n" { goto newline; } + "\"" { goto string; } + + TOK1 { goto normal_token; } + + /* Regular tokens may contain /, but they must not contain comment starts */ + TOK2* ([/] (TOK2\[*])+ [*]*)* [/]? { goto normal_token; } + + any { goto normal_token; } /* unknown character */ + */ + } + else + { + /*!re2c + "/*" { goto comment; } /* C comment */ + "//" (any\"\n")* "\n" { goto newline; } /* C++ comment */ + + WSP+ { goto std; } /* whitespace */ + "\n" { goto newline; } + "\"" { goto string; } + + [-]? D+ ([.]D*)? { goto normal_token; } /* number */ + "&&" { goto normal_token; } + "==" { goto normal_token; } + "||" { goto normal_token; } + "<<" { goto normal_token; } + ">>" { goto normal_token; } + TOKC { goto normal_token; } + TOKC2+ { goto normal_token; } + + any { goto normal_token; } /* unknown character */ + */ + } + +comment: +/*!re2c + "*/" { goto std; } + "\n" + { + if (YYCURSOR >= YYLIMIT) + { + ScriptPtr = ScriptEndPtr; + return false; + } + sc_Line++; + sc_Crossed = true; + goto comment; + } + any { goto comment; } +*/ + +newline: + if (YYCURSOR >= YYLIMIT) + { + ScriptPtr = ScriptEndPtr; + return false; + } + sc_Line++; + sc_Crossed = true; + goto std; + +normal_token: + ScriptPtr = (YYCURSOR >= YYLIMIT) ? ScriptEndPtr : cursor; + sc_StringLen = MIN (ScriptPtr - tok, MAX_STRING_SIZE-1); + memcpy (sc_String, tok, sc_StringLen); + sc_String[sc_StringLen] = '\0'; + return true; + +string: + if (YYLIMIT != ScriptEndPtr) + { + ScriptPtr = ScriptEndPtr; + return false; + } + ScriptPtr = cursor; + for (sc_StringLen = 0; cursor < YYLIMIT; ++cursor) + { + if (Escape && *cursor == '\\' && *(cursor + 1) == '"') + { + cursor++; + } + else if (*cursor == '"') + { + break; + } + if (*cursor == '\n') + { + sc_Line++; + sc_Crossed = true; + } + if (sc_StringLen < MAX_STRING_SIZE-1) + { + sc_String[sc_StringLen++] = *cursor; + } + } + ScriptPtr = cursor + 1; + sc_String[sc_StringLen] = '\0'; + return true; diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 01f4b50e3..9b8ca9c9d 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -285,6 +285,7 @@ bool FMODSoundRenderer::Init () bool nosound = false; ChannelMap = NULL; + NumChannels = 0; PrevEnvironment = DefaultEnvironments[0]; #ifdef _WIN32 @@ -483,6 +484,7 @@ void FMODSoundRenderer::Shutdown () delete[] ChannelMap; ChannelMap = NULL; } + NumChannels = 0; // Free all loaded samples for (i = 0; i < S_sfx.Size (); i++) diff --git a/src/sound/music_midi_midiout.cpp b/src/sound/music_midi_midiout.cpp index 103aa72f2..9bd9197c5 100644 --- a/src/sound/music_midi_midiout.cpp +++ b/src/sound/music_midi_midiout.cpp @@ -6,26 +6,26 @@ EXTERN_CVAR (Float, snd_midivolume) -struct MIDISong2::TrackInfo -{ - const BYTE *TrackBegin; - size_t TrackP; - size_t MaxTrackP; - DWORD Delay; - bool Finished; - BYTE RunningStatus; - SBYTE LoopCount; - bool Designated; - bool EProgramChange; - bool EVolume; - WORD Designation; - - size_t LoopBegin; - DWORD LoopDelay; - bool LoopFinished; - - DWORD ReadVarLen (); -}; +struct MIDISong2::TrackInfo +{ + const BYTE *TrackBegin; + size_t TrackP; + size_t MaxTrackP; + DWORD Delay; + bool Finished; + BYTE RunningStatus; + SBYTE LoopCount; + bool Designated; + bool EProgramChange; + bool EVolume; + WORD Designation; + + size_t LoopBegin; + DWORD LoopDelay; + bool LoopFinished; + + DWORD ReadVarLen (); +}; extern DWORD midivolume; extern UINT mididevice; @@ -52,82 +52,82 @@ MIDISong2::MIDISong2 (FILE *file, char * musiccache, int len) memcpy(MusHeader, musiccache, len); } - // Do some validation of the MIDI file - if (MusHeader[4] != 0 || MusHeader[5] != 0 || MusHeader[6] != 0 || MusHeader[7] != 6) - return; - - if (MusHeader[8] != 0 || MusHeader[9] > 2) - return; - - Format = MusHeader[9]; - - if (Format == 0) - { - NumTracks = 1; - } - else - { - NumTracks = MusHeader[10] * 256 + MusHeader[11]; - } + // Do some validation of the MIDI file + if (MusHeader[4] != 0 || MusHeader[5] != 0 || MusHeader[6] != 0 || MusHeader[7] != 6) + return; - // The timers only have millisecond accuracy, not microsecond. - Division = (MusHeader[12] * 256 + MusHeader[13]) * 1000; - - Tracks = new TrackInfo[NumTracks]; - - // Gather information about each track - for (i = 0, p = 14; i < NumTracks && p < len + 8; ++i) - { - DWORD chunkLen = - (MusHeader[p+4]<<24) | - (MusHeader[p+5]<<16) | - (MusHeader[p+6]<<8) | - (MusHeader[p+7]); - - if (chunkLen + p + 8 > (DWORD)len) - { // Track too long, so truncate it - chunkLen = len - p - 8; - } - - if (MusHeader[p+0] == 'M' && - MusHeader[p+1] == 'T' && - MusHeader[p+2] == 'r' && - MusHeader[p+3] == 'k') - { - Tracks[i].TrackBegin = MusHeader + p + 8; - Tracks[i].TrackP = 0; - Tracks[i].MaxTrackP = chunkLen; - } - - p += chunkLen + 8; - } - - // In case there were fewer actual chunks in the file than the - // header specified, update NumTracks with the current value of i - NumTracks = i; - - if (NumTracks == 0) - { // No tracks, so nothing to play - return; - } - - ExitEvent = CreateEvent (NULL, FALSE, FALSE, NULL); - if (ExitEvent == NULL) - { - Printf (PRINT_BOLD, "Could not create exit event for MIDI playback\n"); - return; - } - VolumeChangeEvent = CreateEvent (NULL, FALSE, FALSE, NULL); - if (VolumeChangeEvent == NULL) - { - Printf (PRINT_BOLD, "Could not create volume event for MIDI playback\n"); - return; - } - PauseEvent = CreateEvent (NULL, FALSE, FALSE, NULL); - if (PauseEvent == NULL) - { - Printf (PRINT_BOLD, "Could not create pause event for MIDI playback\n"); - } + if (MusHeader[8] != 0 || MusHeader[9] > 2) + return; + + Format = MusHeader[9]; + + if (Format == 0) + { + NumTracks = 1; + } + else + { + NumTracks = MusHeader[10] * 256 + MusHeader[11]; + } + + // The timers only have millisecond accuracy, not microsecond. + Division = (MusHeader[12] * 256 + MusHeader[13]) * 1000; + + Tracks = new TrackInfo[NumTracks]; + + // Gather information about each track + for (i = 0, p = 14; i < NumTracks && p < len + 8; ++i) + { + DWORD chunkLen = + (MusHeader[p+4]<<24) | + (MusHeader[p+5]<<16) | + (MusHeader[p+6]<<8) | + (MusHeader[p+7]); + + if (chunkLen + p + 8 > (DWORD)len) + { // Track too long, so truncate it + chunkLen = len - p - 8; + } + + if (MusHeader[p+0] == 'M' && + MusHeader[p+1] == 'T' && + MusHeader[p+2] == 'r' && + MusHeader[p+3] == 'k') + { + Tracks[i].TrackBegin = MusHeader + p + 8; + Tracks[i].TrackP = 0; + Tracks[i].MaxTrackP = chunkLen; + } + + p += chunkLen + 8; + } + + // In case there were fewer actual chunks in the file than the + // header specified, update NumTracks with the current value of i + NumTracks = i; + + if (NumTracks == 0) + { // No tracks, so nothing to play + return; + } + + ExitEvent = CreateEvent (NULL, FALSE, FALSE, NULL); + if (ExitEvent == NULL) + { + Printf (PRINT_BOLD, "Could not create exit event for MIDI playback\n"); + return; + } + VolumeChangeEvent = CreateEvent (NULL, FALSE, FALSE, NULL); + if (VolumeChangeEvent == NULL) + { + Printf (PRINT_BOLD, "Could not create volume event for MIDI playback\n"); + return; + } + PauseEvent = CreateEvent (NULL, FALSE, FALSE, NULL); + if (PauseEvent == NULL) + { + Printf (PRINT_BOLD, "Could not create pause event for MIDI playback\n"); + } } MIDISong2::~MIDISong2 () @@ -150,6 +150,10 @@ MIDISong2::~MIDISong2 () { delete[] Tracks; } + if (MusHeader != NULL) + { + delete[] MusHeader; + } } bool MIDISong2::IsMIDI () const @@ -172,18 +176,18 @@ void MIDISong2::Play (bool looping) // Find out if this an FM synth or not for EMIDI DesignationMask = 0xFF0F; - if (MMSYSERR_NOERROR == midiOutGetDevCaps (mididevice, &caps, sizeof(caps))) - { - if (caps.wTechnology == MOD_FMSYNTH) - { - DesignationMask = 0x00F0; - } - else if (caps.wTechnology == MOD_MIDIPORT) - { - DesignationMask = 0x0001; - } - } - + if (MMSYSERR_NOERROR == midiOutGetDevCaps (mididevice, &caps, sizeof(caps))) + { + if (caps.wTechnology == MOD_FMSYNTH) + { + DesignationMask = 0x00F0; + } + else if (caps.wTechnology == MOD_MIDIPORT) + { + DesignationMask = 0x0001; + } + } + if (MMSYSERR_NOERROR != midiOutOpen (&MidiOut, mididevice, 0, 0, CALLBACK_NULL)) { Printf (PRINT_BOLD, "Could not open MIDI out device\n"); @@ -204,17 +208,17 @@ void MIDISong2::Play (bool looping) else { // Send the standard SysEx message for full master volume - BYTE volmess[] = { 0xf0, 0x7f, 0x7f, 0x04, 0x01, 0x7f, 0x7f, 0xf7 }; - MIDIHDR hdr = { (LPSTR)volmess, sizeof(volmess), }; - - if (MMSYSERR_NOERROR == midiOutPrepareHeader (MidiOut, &hdr, sizeof(hdr))) - { - midiOutLongMsg (MidiOut, &hdr, sizeof(hdr)); - while (MIDIERR_STILLPLAYING == midiOutUnprepareHeader (MidiOut, &hdr, sizeof(hdr))) - { - Sleep (10); - } - } + BYTE volmess[] = { 0xf0, 0x7f, 0x7f, 0x04, 0x01, 0x7f, 0x7f, 0xf7 }; + MIDIHDR hdr = { (LPSTR)volmess, sizeof(volmess), }; + + if (MMSYSERR_NOERROR == midiOutPrepareHeader (MidiOut, &hdr, sizeof(hdr))) + { + midiOutLongMsg (MidiOut, &hdr, sizeof(hdr)); + while (MIDIERR_STILLPLAYING == midiOutUnprepareHeader (MidiOut, &hdr, sizeof(hdr))) + { + Sleep (10); + } + } } snd_midivolume.Callback(); // set volume to current music's properties @@ -327,43 +331,43 @@ DWORD WINAPI MIDISong2::PlayerProc (LPVOID lpParameter) song->TrackDue = song->Tracks; song->TrackDue = song->FindNextDue (); - while (0 != (wait = song->SendCommands ())) - { - waited = true; - - // Wait for the exit or pause event or the next note - switch (WaitForMultipleObjects (2, events, FALSE, wait * song->Tempo / song->Division)) - { - case WAIT_OBJECT_0: - song->m_Status = STATE_Stopped; - return 0; - - case WAIT_OBJECT_0+1: - // Go paused - song->OutputVolume (0); - // Wait for the exit or pause event - if (WAIT_OBJECT_0 == WaitForMultipleObjects (2, events, FALSE, INFINITE)) - { - song->m_Status = STATE_Stopped; - return 0; - } - song->OutputVolume (midivolume & 0xffff); - } - - for (i = 0; i < song->NumTracks; ++i) - { - if (!song->Tracks[i].Finished) - { - song->Tracks[i].Delay -= wait; - } - } - song->TrackDue = song->FindNextDue (); - - // Check if the volume needs changing - if (WAIT_OBJECT_0 == WaitForSingleObject (song->VolumeChangeEvent, 0)) - { - song->OutputVolume (midivolume & 0xffff); - } + while (0 != (wait = song->SendCommands ())) + { + waited = true; + + // Wait for the exit or pause event or the next note + switch (WaitForMultipleObjects (2, events, FALSE, wait * song->Tempo / song->Division)) + { + case WAIT_OBJECT_0: + song->m_Status = STATE_Stopped; + return 0; + + case WAIT_OBJECT_0+1: + // Go paused + song->OutputVolume (0); + // Wait for the exit or pause event + if (WAIT_OBJECT_0 == WaitForMultipleObjects (2, events, FALSE, INFINITE)) + { + song->m_Status = STATE_Stopped; + return 0; + } + song->OutputVolume (midivolume & 0xffff); + } + + for (i = 0; i < song->NumTracks; ++i) + { + if (!song->Tracks[i].Finished) + { + song->Tracks[i].Delay -= wait; + } + } + song->TrackDue = song->FindNextDue (); + + // Check if the volume needs changing + if (WAIT_OBJECT_0 == WaitForSingleObject (song->VolumeChangeEvent, 0)) + { + song->OutputVolume (midivolume & 0xffff); + } } } while (waited && song->m_Looping); @@ -391,354 +395,354 @@ DWORD MIDISong2::SendCommands () return TrackDue ? TrackDue->Delay : 0; } -#define CHECK_FINISHED \ - if (track->TrackP >= track->MaxTrackP) \ - { \ - track->Finished = true; \ - return; \ +#define CHECK_FINISHED \ + if (track->TrackP >= track->MaxTrackP) \ + { \ + track->Finished = true; \ + return; \ } -void MIDISong2::SendCommand (TrackInfo *track) -{ - DWORD len; - BYTE event, data1 = 0, data2 = 0; - int i; - - CHECK_FINISHED - event = track->TrackBegin[track->TrackP++]; - CHECK_FINISHED - - if (event != 0xF0 && event != 0xFF && event != 0xF7) - { - // Normal short message - if ((event & 0xF0) == 0xF0) - { - if (CommonLengths[event & 15] > 0) - { - data1 = track->TrackBegin[track->TrackP++]; - if (CommonLengths[event & 15] > 1) - { - data2 = track->TrackBegin[track->TrackP++]; - } - } - } - else if ((event & 0x80) == 0) - { - data1 = event; - event = track->RunningStatus; - } - else - { - track->RunningStatus = event; - data1 = track->TrackBegin[track->TrackP++]; - } - - CHECK_FINISHED - - if (EventLengths[(event&0x70)>>4] == 2) - { - data2 = track->TrackBegin[track->TrackP++]; - } - - switch (event & 0x70) - { - case 0x40: - if (track->EProgramChange) - { - event = 0xFF; - } - break; - - case 0x30: - switch (data1) - { - case 7: - if (track->EVolume) - { - event = 0xFF; - } - else - { - // Some devices don't support master volume - // (e.g. the Audigy's software MIDI synth--but not its two hardware ones), - // so assume none of them do and scale channel volumes manually. - ChannelVolumes[event & 15] = data2; - data2 = (BYTE)(((data2 + 1) * (midivolume & 0xffff)) >> 16); - } - break; - - case 39: - // Skip fine volume adjustment because I am lazy. - // (And it doesn't seem to be used much anyway.) - event = 0xFF; - break; - - case 110: // EMIDI Track Designation - // Instruments 4, 5, 6, and 7 are all FM syth. - // The rest are all wavetable. - if (data2 == 127) - { - track->Designation = ~0; - } - else - { - if (data2 <= 9) - { - track->Designation |= 1 << data2; - } - } - track->Designated = true; - event = 0xFF; - break; - - case 111: // EMIDI Track Exclusion - if (track->Designated) - { - track->Designation &= ~(1 << data2); - } - event = 0xFF; - break; - - case 112: // EMIDI Program Change - track->EProgramChange = true; - event = 0xC0 | (event & 0x0F); - data1 = data2; - data2 = 0; - break; - - case 113: // EMIDI Volume - track->EVolume = true; - data1 = 7; - ChannelVolumes[event & 15] = data2; - data2 = (BYTE)(((data2 + 1) * (midivolume & 0xffff)) >> 16); - break; - - case 116: // EMIDI Loop Begin - track->LoopBegin = track->TrackP; - track->LoopDelay = 0; - track->LoopCount = data2; - track->LoopFinished = track->Finished; - event = 0xFF; - break; - - case 117: // EMIDI Loop End - if (track->LoopCount >= 0 && data2 == 127) - { - if (track->LoopCount == 0 && !m_Looping) - { - track->Finished = true; - } - else - { - if (track->LoopCount > 0 && --track->LoopCount == 0) - { - track->LoopCount = -1; - } - track->TrackP = track->LoopBegin; - track->Delay = track->LoopDelay; - track->Finished = track->LoopFinished; - } - } - event = 0xFF; - break; - - case 118: // EMIDI Global Loop Begin - for (i = 0; i < NumTracks; ++i) - { - Tracks[i].LoopBegin = Tracks[i].TrackP; - Tracks[i].LoopDelay = Tracks[i].Delay; - Tracks[i].LoopCount = data2; - Tracks[i].LoopFinished = Tracks[i].Finished; - } - event = 0xFF; - break; - - case 119: // EMIDI Global Loop End - if (data2 == 127) - { - for (i = 0; i < NumTracks; ++i) - { - if (Tracks[i].LoopCount >= 0) - { - if (Tracks[i].LoopCount == 0 && !m_Looping) - { - Tracks[i].Finished = true; - } - else - { - if (Tracks[i].LoopCount > 0 && --Tracks[i].LoopCount == 0) - { - Tracks[i].LoopCount = -1; - } - Tracks[i].TrackP = Tracks[i].LoopBegin; - Tracks[i].Delay = Tracks[i].LoopDelay; - Tracks[i].Finished = Tracks[i].LoopFinished; - } - } - } - } - event = 0xFF; - break; - } - } - if (event != 0xFF && (!track->Designated || (track->Designation & DesignationMask))) - { - if (MMSYSERR_NOERROR != midiOutShortMsg (MidiOut, event | (data1<<8) | (data2<<16))) - { - track->Finished = true; - return; - } - } - } - else - { - // Skip SysEx events just because I don't want to bother with - // preparing headers and sending them out. The old MIDI player - // ignores them too, so this won't break anything that played - // before. - if (event == 0xF0 || event == 0xF7) - { - len = track->ReadVarLen (); - track->TrackP += len; - } - else if (event == 0xFF) - { - // It's a meta-event - event = track->TrackBegin[track->TrackP++]; - CHECK_FINISHED - len = track->ReadVarLen (); - CHECK_FINISHED - - if (track->TrackP + len <= track->MaxTrackP) - { - switch (event) - { - case 0x2F: - track->Finished = true; - break; - - case 0x51: - Tempo = - (track->TrackBegin[track->TrackP+0]<<16) | - (track->TrackBegin[track->TrackP+1]<<8) | - (track->TrackBegin[track->TrackP+2]); - break; - } - track->TrackP += len; - if (track->TrackP == track->MaxTrackP) - { - track->Finished = true; - } - } - else - { - track->Finished = true; - } - } - } - if (!track->Finished) - { - track->Delay = track->ReadVarLen (); - } -} - -#undef CHECK_FINISHED - -void MIDISong2::ProcessInitialMetaEvents () -{ - TrackInfo *track; - int i; - BYTE event; - DWORD len; - - for (i = 0; i < NumTracks; ++i) - { - track = &Tracks[i]; - while (!track->Finished && - track->TrackP < track->MaxTrackP - 4 && - track->TrackBegin[track->TrackP] == 0 && - track->TrackBegin[track->TrackP+1] == 0xFF) - { - event = track->TrackBegin[track->TrackP+2]; - track->TrackP += 3; - len = track->ReadVarLen (); - if (track->TrackP + len <= track->MaxTrackP) - { - switch (event) - { - case 0x2F: - track->Finished = true; - break; - - case 0x51: - Tempo = - (track->TrackBegin[track->TrackP+0]<<16) | - (track->TrackBegin[track->TrackP+1]<<8) | - (track->TrackBegin[track->TrackP+2]); - break; - } - } - track->TrackP += len; - } - if (track->TrackP >= track->MaxTrackP - 4) - { - track->Finished = true; - } - } -} - -DWORD MIDISong2::TrackInfo::ReadVarLen () -{ - DWORD time = 0, t = 0x80; - - while ((t & 0x80) && TrackP < MaxTrackP) - { - t = TrackBegin[TrackP++]; - time = (time << 7) | (t & 127); - } - return time; -} - -MIDISong2::TrackInfo *MIDISong2::FindNextDue () -{ - TrackInfo *track; +void MIDISong2::SendCommand (TrackInfo *track) +{ + DWORD len; + BYTE event, data1 = 0, data2 = 0; + int i; + + CHECK_FINISHED + event = track->TrackBegin[track->TrackP++]; + CHECK_FINISHED + + if (event != 0xF0 && event != 0xFF && event != 0xF7) + { + // Normal short message + if ((event & 0xF0) == 0xF0) + { + if (CommonLengths[event & 15] > 0) + { + data1 = track->TrackBegin[track->TrackP++]; + if (CommonLengths[event & 15] > 1) + { + data2 = track->TrackBegin[track->TrackP++]; + } + } + } + else if ((event & 0x80) == 0) + { + data1 = event; + event = track->RunningStatus; + } + else + { + track->RunningStatus = event; + data1 = track->TrackBegin[track->TrackP++]; + } + + CHECK_FINISHED + + if (EventLengths[(event&0x70)>>4] == 2) + { + data2 = track->TrackBegin[track->TrackP++]; + } + + switch (event & 0x70) + { + case 0x40: + if (track->EProgramChange) + { + event = 0xFF; + } + break; + + case 0x30: + switch (data1) + { + case 7: + if (track->EVolume) + { + event = 0xFF; + } + else + { + // Some devices don't support master volume + // (e.g. the Audigy's software MIDI synth--but not its two hardware ones), + // so assume none of them do and scale channel volumes manually. + ChannelVolumes[event & 15] = data2; + data2 = (BYTE)(((data2 + 1) * (midivolume & 0xffff)) >> 16); + } + break; + + case 39: + // Skip fine volume adjustment because I am lazy. + // (And it doesn't seem to be used much anyway.) + event = 0xFF; + break; + + case 110: // EMIDI Track Designation + // Instruments 4, 5, 6, and 7 are all FM syth. + // The rest are all wavetable. + if (data2 == 127) + { + track->Designation = ~0; + } + else + { + if (data2 <= 9) + { + track->Designation |= 1 << data2; + } + } + track->Designated = true; + event = 0xFF; + break; + + case 111: // EMIDI Track Exclusion + if (track->Designated) + { + track->Designation &= ~(1 << data2); + } + event = 0xFF; + break; + + case 112: // EMIDI Program Change + track->EProgramChange = true; + event = 0xC0 | (event & 0x0F); + data1 = data2; + data2 = 0; + break; + + case 113: // EMIDI Volume + track->EVolume = true; + data1 = 7; + ChannelVolumes[event & 15] = data2; + data2 = (BYTE)(((data2 + 1) * (midivolume & 0xffff)) >> 16); + break; + + case 116: // EMIDI Loop Begin + track->LoopBegin = track->TrackP; + track->LoopDelay = 0; + track->LoopCount = data2; + track->LoopFinished = track->Finished; + event = 0xFF; + break; + + case 117: // EMIDI Loop End + if (track->LoopCount >= 0 && data2 == 127) + { + if (track->LoopCount == 0 && !m_Looping) + { + track->Finished = true; + } + else + { + if (track->LoopCount > 0 && --track->LoopCount == 0) + { + track->LoopCount = -1; + } + track->TrackP = track->LoopBegin; + track->Delay = track->LoopDelay; + track->Finished = track->LoopFinished; + } + } + event = 0xFF; + break; + + case 118: // EMIDI Global Loop Begin + for (i = 0; i < NumTracks; ++i) + { + Tracks[i].LoopBegin = Tracks[i].TrackP; + Tracks[i].LoopDelay = Tracks[i].Delay; + Tracks[i].LoopCount = data2; + Tracks[i].LoopFinished = Tracks[i].Finished; + } + event = 0xFF; + break; + + case 119: // EMIDI Global Loop End + if (data2 == 127) + { + for (i = 0; i < NumTracks; ++i) + { + if (Tracks[i].LoopCount >= 0) + { + if (Tracks[i].LoopCount == 0 && !m_Looping) + { + Tracks[i].Finished = true; + } + else + { + if (Tracks[i].LoopCount > 0 && --Tracks[i].LoopCount == 0) + { + Tracks[i].LoopCount = -1; + } + Tracks[i].TrackP = Tracks[i].LoopBegin; + Tracks[i].Delay = Tracks[i].LoopDelay; + Tracks[i].Finished = Tracks[i].LoopFinished; + } + } + } + } + event = 0xFF; + break; + } + } + if (event != 0xFF && (!track->Designated || (track->Designation & DesignationMask))) + { + if (MMSYSERR_NOERROR != midiOutShortMsg (MidiOut, event | (data1<<8) | (data2<<16))) + { + track->Finished = true; + return; + } + } + } + else + { + // Skip SysEx events just because I don't want to bother with + // preparing headers and sending them out. The old MIDI player + // ignores them too, so this won't break anything that played + // before. + if (event == 0xF0 || event == 0xF7) + { + len = track->ReadVarLen (); + track->TrackP += len; + } + else if (event == 0xFF) + { + // It's a meta-event + event = track->TrackBegin[track->TrackP++]; + CHECK_FINISHED + len = track->ReadVarLen (); + CHECK_FINISHED + + if (track->TrackP + len <= track->MaxTrackP) + { + switch (event) + { + case 0x2F: + track->Finished = true; + break; + + case 0x51: + Tempo = + (track->TrackBegin[track->TrackP+0]<<16) | + (track->TrackBegin[track->TrackP+1]<<8) | + (track->TrackBegin[track->TrackP+2]); + break; + } + track->TrackP += len; + if (track->TrackP == track->MaxTrackP) + { + track->Finished = true; + } + } + else + { + track->Finished = true; + } + } + } + if (!track->Finished) + { + track->Delay = track->ReadVarLen (); + } +} + +#undef CHECK_FINISHED + +void MIDISong2::ProcessInitialMetaEvents () +{ + TrackInfo *track; + int i; + BYTE event; + DWORD len; + + for (i = 0; i < NumTracks; ++i) + { + track = &Tracks[i]; + while (!track->Finished && + track->TrackP < track->MaxTrackP - 4 && + track->TrackBegin[track->TrackP] == 0 && + track->TrackBegin[track->TrackP+1] == 0xFF) + { + event = track->TrackBegin[track->TrackP+2]; + track->TrackP += 3; + len = track->ReadVarLen (); + if (track->TrackP + len <= track->MaxTrackP) + { + switch (event) + { + case 0x2F: + track->Finished = true; + break; + + case 0x51: + Tempo = + (track->TrackBegin[track->TrackP+0]<<16) | + (track->TrackBegin[track->TrackP+1]<<8) | + (track->TrackBegin[track->TrackP+2]); + break; + } + } + track->TrackP += len; + } + if (track->TrackP >= track->MaxTrackP - 4) + { + track->Finished = true; + } + } +} + +DWORD MIDISong2::TrackInfo::ReadVarLen () +{ + DWORD time = 0, t = 0x80; + + while ((t & 0x80) && TrackP < MaxTrackP) + { + t = TrackBegin[TrackP++]; + time = (time << 7) | (t & 127); + } + return time; +} + +MIDISong2::TrackInfo *MIDISong2::FindNextDue () +{ + TrackInfo *track; DWORD best; - int i; - - if (!TrackDue->Finished && TrackDue->Delay == 0) - { - return TrackDue; - } - - switch (Format) - { - case 0: - return Tracks[0].Finished ? NULL : Tracks; - - case 1: - track = NULL; - best = 0xFFFFFFFF; - for (i = 0; i < NumTracks; ++i) - { - if (!Tracks[i].Finished) - { - if (Tracks[i].Delay < best) - { - best = Tracks[i].Delay; - track = &Tracks[i]; - } - } - } - return track; - - case 2: - track = TrackDue; - if (track->Finished) - { - track++; - } - return track < &Tracks[NumTracks] ? track : NULL; - } - return NULL; -} -#endif + int i; + + if (!TrackDue->Finished && TrackDue->Delay == 0) + { + return TrackDue; + } + + switch (Format) + { + case 0: + return Tracks[0].Finished ? NULL : Tracks; + + case 1: + track = NULL; + best = 0xFFFFFFFF; + for (i = 0; i < NumTracks; ++i) + { + if (!Tracks[i].Finished) + { + if (Tracks[i].Delay < best) + { + best = Tracks[i].Delay; + track = &Tracks[i]; + } + } + } + return track; + + case 2: + track = TrackDue; + if (track->Finished) + { + track++; + } + return track < &Tracks[NumTracks] ? track : NULL; + } + return NULL; +} +#endif diff --git a/src/version.h b/src/version.h index 9b7017677..2bfe7ab14 100644 --- a/src/version.h +++ b/src/version.h @@ -34,10 +34,22 @@ #ifndef __VERSION_H__ #define __VERSION_H__ +// The svnrevision.h is automatically updated to grab the revision of +// of the current source tree so that it can be included with version numbers. +#include "svnrevision.h" + /** Lots of different version numbers **/ +#define DOTVERSIONSTR_NOREV "2.1.0" + // The version string the user actually sees. -#define DOTVERSIONSTR "2.0.99" +#define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ")" + +// The version as seen in the Windows resource +#define RC_FILEVERSION 2,1,0,SVN_REVISION_NUMBER +#define RC_PRODUCTVERSION 2,1,0,0 +#define RC_FILEVERSION2 DOTVERSIONSTR +#define RC_PRODUCTVERSION2 "2.1" // Version identifier for network games. // Bump it every time you do a release unless you're certain you diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 116fe11c8..e9034cfb5 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -630,17 +630,27 @@ BOOL CALLBACK IWADBoxCallback (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP switch (message) { case WM_INITDIALOG: + // Add our program name to the window title + { + TCHAR label[256]; + FString newlabel; + + GetWindowText (hDlg, label, countof(label)); + newlabel.Format (GAMESIG " " DOTVERSIONSTR_NOREV ": %s", label); + SetWindowText (hDlg, newlabel.GetChars()); + } + // Populate the list with all the IWADs found list = GetDlgItem (hDlg, IDC_IWADLIST); for (i = 0; i < NumWads; i++) { - char work[256]; + FString work; const char *filepart = strrchr (WadList[i].Path, '/'); if (filepart == NULL) filepart = WadList[i].Path; else filepart++; - sprintf (work, "%s (%s)", IWADTypeNames[WadList[i].Type], filepart); - SendMessage (list, LB_ADDSTRING, 0, (LPARAM)work); + work.Format ("%s (%s)", IWADTypeNames[WadList[i].Type], filepart); + SendMessage (list, LB_ADDSTRING, 0, (LPARAM)work.GetChars()); SendMessage (list, LB_SETITEMDATA, i, (LPARAM)i); } SendMessage (list, LB_SETCURSEL, 0, 0); diff --git a/src/win32/zdoom.rc b/src/win32/zdoom.rc index 9d3badd51..8d97bb911 100644 --- a/src/win32/zdoom.rc +++ b/src/win32/zdoom.rc @@ -8,7 +8,7 @@ // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" - +#include "../version.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -35,12 +35,14 @@ END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" - "\0" + "#include ""../version.h""\0" END 3 TEXTINCLUDE BEGIN - "\r\n" + "#ifndef NO_MANIFEST\r\n" + " CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""zdoom.exe.manifest""\r\n" + "#endif\r\n" END #endif // APSTUDIO_INVOKED @@ -167,7 +169,7 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,99,0 + FILEVERSION 2,1,0,199 PRODUCTVERSION 2,1,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -186,7 +188,7 @@ BEGIN VALUE "Comments", "Thanks to id Software for creating DOOM and then releasing the source code. Thanks also to TeamTNT for creating BOOM, which ZDoom is partially based on. Includes code based on the Cajun Bot 0.97 by Martin Collberg." VALUE "CompanyName", " " VALUE "FileDescription", "ZDoom" - VALUE "FileVersion", "2.0.99 does not exist" + VALUE "FileVersion", "2.1.0 (r199M)" VALUE "InternalName", "ZDoom" VALUE "LegalCopyright", "Copyright © 1993-1996, id Software & 1998-2006, Randy Heit" VALUE "LegalTrademarks", "Doom® is a Registered Trademark of id Software, Inc." @@ -451,7 +453,9 @@ IDB_DEADGUY BITMAP "deadguy.bmp" // // Generated from the TEXTINCLUDE 3 resource. // - +#ifndef NO_MANIFEST + CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "zdoom.exe.manifest" +#endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/tools/dehsupp/scanner.c b/tools/dehsupp/scanner.c index e3c6072cd..d7bf94525 100644 --- a/tools/dehsupp/scanner.c +++ b/tools/dehsupp/scanner.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.10.3 on Wed Jun 14 22:02:31 2006 */ +/* Generated by re2c 0.10.5 */ #line 1 "scanner.re" #include #include diff --git a/tools/re2c/CHANGELOG b/tools/re2c/CHANGELOG index e1a95b05e..c2b10eeb7 100644 --- a/tools/re2c/CHANGELOG +++ b/tools/re2c/CHANGELOG @@ -1,3 +1,12 @@ +Version 0.10.5 (2006-06-11) +--------------------------- +- Fixed long form of -1 switch to --single-pass as noted in man page and help. +- Added MSVC 2003 project files and renamed old 2002 ones. + +Version 0.10.4 (2006-06-01) +--------------------------- +- Fix whitespace in generated code. + Version 0.10.3 (2006-05-14) --------------------------- - Fixed issue with -wb and -ws. diff --git a/tools/re2c/README b/tools/re2c/README index 918dff725..0cb9ab639 100644 --- a/tools/re2c/README +++ b/tools/re2c/README @@ -1,4 +1,4 @@ -re2c Version 0.10.3 +re2c Version 0.10.5 ------------------ Originally written by Peter Bumbulis (peter@csg.uwaterloo.ca) @@ -12,9 +12,18 @@ The re2c distribution can be found at: http://sourceforge.net/projects/re2c/ -re2c has been developed and tested with gcc 3.3 to 4.0.2, Microsoft and Intel -compilers on various platforms. Building re2c requires autoconf 2.57 and bison -(tested with 1.875 and later). Under windows you don't need autoconf or bison +re2c has been developed and tested with the following compilers on various +platforms in 32 bit and 64 bit mode: +- GCC 3.3 ... 4.1 +- Microsoft VC 7, 7.1, 8 +- Intel 9.0 +- Sun C++ 5.8 (CXXFLAGS='-compat5 -library=stlport4') +- MIPSpro Compilers: Version 7.4.4m + +GCC 2.x and Microsoft VC 6 are not capable of compiling re2c. + +Building re2c on unix like platforms requires autoconf 2.57 and bison (tested +with 1.875 and later). Under windows you don't need autoconf or bison and can use the pregenerated files. You can build this software by simply typing the following commands: @@ -32,7 +41,7 @@ re2c) you need the following steps: Or you can create a rpm package and install it by the following commands: ./configure make rpm - rpm -Uhv /re2c-0.10.3-1.rpm + rpm -Uhv /re2c-0.10.5-1.rpm If you want to build from CVS then the first thing you should do is regenerating all build files using the following command: @@ -42,7 +51,7 @@ need to generate RPM packages for cvs builds use these commands: ./autogen.sh ./configure ./makerpm - rpm -Uhv /re2c-0.10.3-.rpm + rpm -Uhv /re2c-0.10.5-.rpm Here should be a number like 1. And must equal the directory where the makerpm step has written the generated rpm to. diff --git a/tools/re2c/code.cc b/tools/re2c/code.cc index a256a3697..db391046e 100644 --- a/tools/re2c/code.cc +++ b/tools/re2c/code.cc @@ -1602,8 +1602,7 @@ void genGetState(std::ostream &o, uint& ind, uint start_label) if (fFlag && !bWroteGetState) { vUsedLabels.insert(start_label); - o << indent(ind) << "switch(YYGETSTATE())\n"; - o << indent(ind) << "{\n"; + o << indent(ind) << "switch(YYGETSTATE()) {\n"; if (bUseStateAbort) { o << indent(ind) << "default: abort();\n"; diff --git a/tools/re2c/config_w32.h b/tools/re2c/config_w32.h index 28f8eeee2..0032664db 100644 --- a/tools/re2c/config_w32.h +++ b/tools/re2c/config_w32.h @@ -63,13 +63,13 @@ #define PACKAGE_NAME "re2c" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "re2c 0.10.3" +#define PACKAGE_STRING "re2c 0.10.5" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "re2c" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.10.3" +#define PACKAGE_VERSION "0.10.5" /* The size of a `char', as computed by sizeof. */ #define SIZEOF_CHAR 1 @@ -87,7 +87,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "0.10.3" +#define VERSION "0.10.5" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/tools/re2c/main.cc b/tools/re2c/main.cc index fccbde842..d0673b42f 100644 --- a/tools/re2c/main.cc +++ b/tools/re2c/main.cc @@ -78,7 +78,7 @@ static const mbo_opt_struct OPTIONS[] = mbo_opt_struct('v', 0, "version"), mbo_opt_struct('V', 0, "vernum"), mbo_opt_struct('w', 0, "wide-chars"), - mbo_opt_struct('1', 0, "two-pass"), + mbo_opt_struct('1', 0, "single-pass"), mbo_opt_struct('-', 0, NULL) /* end of args */ }; diff --git a/tools/re2c/parser.cc b/tools/re2c/parser.cc index a8f7f474a..5cad94a0d 100644 --- a/tools/re2c/parser.cc +++ b/tools/re2c/parser.cc @@ -1621,10 +1621,7 @@ void parse(Scanner& i, std::ostream& o) { in = &i; - o << "/* Generated by re2c " PACKAGE_VERSION " on "; - time_t now = time(&now); - o.write(ctime(&now), 24); - o << " */\n"; + o << "/* Generated by re2c " PACKAGE_VERSION " */\n"; o << sourceFileInfo; while(i.echo()) diff --git a/tools/re2c/re2c.1 b/tools/re2c/re2c.1 index b7ea56aa5..05f49b2f0 100644 --- a/tools/re2c/re2c.1 +++ b/tools/re2c/re2c.1 @@ -1,7 +1,7 @@ ./" -./" $Id: re2c.1.in,v 1.60 2006/05/14 13:39:16 helly Exp $ +./" $Id: re2c.1.in 523 2006-05-25 13:32:09Z helly $ ./" -.TH RE2C 1 "22 April 2005" "Version 0.10.3" +.TH RE2C 1 "22 April 2005" "Version 0.10.5" .ds re \fBre2c\fP .ds le \fBlex\fP .ds rx regular expression @@ -511,6 +511,6 @@ Emmanuel Mogenet added storable state .PD 1 .SH VERSION INFORMATION -This manpage describes \fBre2c\fP, version 0.10.3. +This manpage describes \fBre2c\fP, version 0.10.5. .fi diff --git a/tools/re2c/scanner.cc b/tools/re2c/scanner.cc index 5d86717c1..6d32c032e 100644 --- a/tools/re2c/scanner.cc +++ b/tools/re2c/scanner.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.10.3 on Wed May 24 19:55:36 2006 */ +/* Generated by re2c 0.10.5 */ #line 1 "scanner.re" /* $Id: scanner.re,v 1.42 2006/04/17 00:18:45 helly Exp $ */ #include @@ -34,8 +34,7 @@ Scanner::Scanner(const char *fn, std::istream& i, std::ostream& o) : in(i) , out(o) , bot(NULL), tok(NULL), ptr(NULL), cur(NULL), pos(NULL), lim(NULL) - , top(NULL), eof(NULL), tchar(0), tline(0), cline(1), iscfg(0) - , filename(fn) + , top(NULL), eof(NULL), tchar(0), tline(0), cline(1), iscfg(0), filename(fn) { ; } @@ -77,7 +76,7 @@ char *Scanner::fill(char *cursor) return cursor; } -#line 96 "scanner.re" +#line 95 "scanner.re" int Scanner::echo() @@ -94,42 +93,37 @@ int Scanner::echo() tok = cursor; echo: -#line 98 "" +#line 97 "scanner.cc" { YYCTYPE yych; unsigned int yyaccept = 0; if((YYLIMIT - YYCURSOR) < 16) YYFILL(16); yych = *YYCURSOR; - switch(yych){ - case 0x00: goto yy7; - case 0x0A: goto yy5; - case '*': goto yy4; - case '/': goto yy2; - default: goto yy9; + if(yych <= ')') { + if(yych <= 0x00) goto yy7; + if(yych == 0x0A) goto yy5; + goto yy9; + } else { + if(yych <= '*') goto yy4; + if(yych != '/') goto yy9; } -yy2: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case '*': goto yy16; - default: goto yy3; - } + if(yych == '*') goto yy16; yy3: -#line 185 "scanner.re" +#line 184 "scanner.re" { goto echo; } -#line 124 "" +#line 120 "scanner.cc" yy4: yych = *++YYCURSOR; - switch(yych){ - case '/': goto yy10; - default: goto yy3; - } + if(yych == '/') goto yy10; + goto yy3; yy5: ++YYCURSOR; -#line 168 "scanner.re" +#line 167 "scanner.re" { if (ignore_eoc) { ignore_cnt++; @@ -139,10 +133,10 @@ yy5: tok = pos = cursor; cline++; goto echo; } -#line 143 "" +#line 137 "scanner.cc" yy7: ++YYCURSOR; -#line 177 "scanner.re" +#line 176 "scanner.re" { if (!ignore_eoc) { out.write((const char*)(tok), (const char*)(cursor) - (const char*)(tok) - 1); // -1 so we don't write out the \0 @@ -151,20 +145,17 @@ yy7: RETURN(0); } } -#line 155 "" +#line 149 "scanner.cc" yy9: yych = *++YYCURSOR; goto yy3; yy10: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case 0x0A: goto yy14; - case 0x0D: goto yy12; - default: goto yy11; - } + if(yych == 0x0A) goto yy14; + if(yych == 0x0D) goto yy12; yy11: -#line 155 "scanner.re" +#line 154 "scanner.re" { if (ignore_eoc) { if (ignore_cnt) { @@ -178,22 +169,20 @@ yy11: tok = pos = cursor; goto echo; } -#line 182 "" +#line 173 "scanner.cc" yy12: yych = *++YYCURSOR; - switch(yych){ - case 0x0A: goto yy14; - default: goto yy13; - } + if(yych == 0x0A) goto yy14; yy13: YYCURSOR = YYMARKER; - switch(yyaccept) { - case 0: goto yy3; - case 1: goto yy11; + if(yyaccept <= 0) { + goto yy3; + } else { + goto yy11; } yy14: ++YYCURSOR; -#line 141 "scanner.re" +#line 140 "scanner.re" { cline++; if (ignore_eoc) { @@ -208,14 +197,10 @@ yy14: tok = pos = cursor; goto echo; } -#line 212 "" +#line 201 "scanner.cc" yy16: yych = *++YYCURSOR; - switch(yych){ - case '!': goto yy17; - default: goto yy13; - } -yy17: + if(yych != '!') goto yy13; yych = *++YYCURSOR; switch(yych){ case 'g': goto yy19; @@ -226,43 +211,25 @@ yy17: } yy18: yych = *++YYCURSOR; - switch(yych){ - case 'g': goto yy47; - default: goto yy13; - } + if(yych == 'g') goto yy47; + goto yy13; yy19: yych = *++YYCURSOR; - switch(yych){ - case 'e': goto yy34; - default: goto yy13; - } + if(yych == 'e') goto yy34; + goto yy13; yy20: yych = *++YYCURSOR; - switch(yych){ - case 'a': goto yy26; - default: goto yy13; - } + if(yych == 'a') goto yy26; + goto yy13; yy21: yych = *++YYCURSOR; - switch(yych){ - case 'e': goto yy22; - default: goto yy13; - } -yy22: + if(yych != 'e') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case '2': goto yy23; - default: goto yy13; - } -yy23: + if(yych != '2') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'c': goto yy24; - default: goto yy13; - } -yy24: + if(yych != 'c') goto yy13; ++YYCURSOR; -#line 112 "scanner.re" +#line 111 "scanner.re" { if (bUsedYYMaxFill && bSinglePass) { fatal("found scanner block after YYMAXFILL declaration"); @@ -271,46 +238,22 @@ yy24: tok = cursor; RETURN(1); } -#line 275 "" +#line 242 "scanner.cc" yy26: yych = *++YYCURSOR; - switch(yych){ - case 'x': goto yy27; - default: goto yy13; - } -yy27: + if(yych != 'x') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case ':': goto yy28; - default: goto yy13; - } -yy28: + if(yych != ':') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'r': goto yy29; - default: goto yy13; - } -yy29: + if(yych != 'r') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'e': goto yy30; - default: goto yy13; - } -yy30: + if(yych != 'e') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case '2': goto yy31; - default: goto yy13; - } -yy31: + if(yych != '2') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'c': goto yy32; - default: goto yy13; - } -yy32: + if(yych != 'c') goto yy13; ++YYCURSOR; -#line 120 "scanner.re" +#line 119 "scanner.re" { if (bUsedYYMaxFill) { fatal("cannot generate YYMAXFILL twice"); @@ -321,148 +264,68 @@ yy32: bUsedYYMaxFill = true; goto echo; } -#line 325 "" +#line 268 "scanner.cc" yy34: yych = *++YYCURSOR; - switch(yych){ - case 't': goto yy35; - default: goto yy13; - } -yy35: + if(yych != 't') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 's': goto yy36; - default: goto yy13; - } -yy36: + if(yych != 's') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 't': goto yy37; - default: goto yy13; - } -yy37: + if(yych != 't') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'a': goto yy38; - default: goto yy13; - } -yy38: + if(yych != 'a') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 't': goto yy39; - default: goto yy13; - } -yy39: + if(yych != 't') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'e': goto yy40; - default: goto yy13; - } -yy40: + if(yych != 'e') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case ':': goto yy41; - default: goto yy13; - } -yy41: + if(yych != ':') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'r': goto yy42; - default: goto yy13; - } -yy42: + if(yych != 'r') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'e': goto yy43; - default: goto yy13; - } -yy43: + if(yych != 'e') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case '2': goto yy44; - default: goto yy13; - } -yy44: + if(yych != '2') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'c': goto yy45; - default: goto yy13; - } -yy45: + if(yych != 'c') goto yy13; ++YYCURSOR; -#line 130 "scanner.re" +#line 129 "scanner.re" { tok = pos = cursor; genGetState(out, topIndent, 0); ignore_eoc = true; goto echo; } -#line 401 "" +#line 300 "scanner.cc" yy47: yych = *++YYCURSOR; - switch(yych){ - case 'n': goto yy48; - default: goto yy13; - } -yy48: + if(yych != 'n') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'o': goto yy49; - default: goto yy13; - } -yy49: + if(yych != 'o') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'r': goto yy50; - default: goto yy13; - } -yy50: + if(yych != 'r') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'e': goto yy51; - default: goto yy13; - } -yy51: + if(yych != 'e') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case ':': goto yy52; - default: goto yy13; - } -yy52: + if(yych != ':') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'r': goto yy53; - default: goto yy13; - } -yy53: + if(yych != 'r') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'e': goto yy54; - default: goto yy13; - } -yy54: + if(yych != 'e') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case '2': goto yy55; - default: goto yy13; - } -yy55: + if(yych != '2') goto yy13; yych = *++YYCURSOR; - switch(yych){ - case 'c': goto yy56; - default: goto yy13; - } -yy56: + if(yych != 'c') goto yy13; ++YYCURSOR; -#line 136 "scanner.re" +#line 135 "scanner.re" { tok = pos = cursor; ignore_eoc = true; goto echo; } -#line 464 "" +#line 327 "scanner.cc" } -#line 188 "scanner.re" +#line 187 "scanner.re" } @@ -485,164 +348,126 @@ scan: goto value; } -#line 489 "" +#line 352 "scanner.cc" { YYCTYPE yych; unsigned int yyaccept = 0; if((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case ' ': goto yy79; - case 0x0A: goto yy81; - case 0x0D: goto yy83; - case '"': goto yy66; - case '\'': goto yy68; - case '(': - case ')': - case ';': - case '=': - case '\\': - case '|': goto yy72; - case '*': goto yy64; - case '+': - case '?': goto yy73; - case '.': goto yy77; - case '/': goto yy62; - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy76; - case '[': goto yy70; - case 'r': goto yy74; - case '{': goto yy60; - default: goto yy85; + if(yych <= '/') { + if(yych <= '!') { + if(yych <= 0x0C) { + if(yych <= 0x08) goto yy85; + if(yych <= 0x09) goto yy79; + if(yych <= 0x0A) goto yy81; + goto yy85; + } else { + if(yych <= 0x0D) goto yy83; + if(yych == ' ') goto yy79; + goto yy85; + } + } else { + if(yych <= ')') { + if(yych <= '"') goto yy66; + if(yych <= '&') goto yy85; + if(yych <= '\'') goto yy68; + goto yy72; + } else { + if(yych <= '+') { + if(yych <= '*') goto yy64; + goto yy73; + } else { + if(yych <= '-') goto yy85; + if(yych <= '.') goto yy77; + goto yy62; + } + } + } + } else { + if(yych <= 'Z') { + if(yych <= '=') { + if(yych == ';') goto yy72; + if(yych <= '<') goto yy85; + goto yy72; + } else { + if(yych == '?') goto yy73; + if(yych <= '@') goto yy85; + goto yy76; + } + } else { + if(yych <= 'q') { + if(yych <= '[') goto yy70; + if(yych <= '\\') goto yy72; + if(yych <= '`') goto yy85; + goto yy76; + } else { + if(yych <= 'z') { + if(yych <= 'r') goto yy74; + goto yy76; + } else { + if(yych <= '{') goto yy60; + if(yych <= '|') goto yy72; + goto yy85; + } + } + } } yy60: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case ',': goto yy126; - case '0': goto yy123; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy124; - default: goto yy61; + if(yych <= '/') { + if(yych == ',') goto yy126; + } else { + if(yych <= '0') goto yy123; + if(yych <= '9') goto yy124; } yy61: -#line 210 "scanner.re" +#line 209 "scanner.re" { depth = 1; goto code; } -#line 591 "" +#line 430 "scanner.cc" yy62: ++YYCURSOR; - switch((yych = *YYCURSOR)) { - case '*': goto yy121; - default: goto yy63; - } + if((yych = *YYCURSOR) == '*') goto yy121; yy63: -#line 240 "scanner.re" +#line 239 "scanner.re" { RETURN(*tok); } -#line 601 "" +#line 437 "scanner.cc" yy64: ++YYCURSOR; - switch((yych = *YYCURSOR)) { - case '/': goto yy119; - default: goto yy65; - } + if((yych = *YYCURSOR) == '/') goto yy119; yy65: -#line 242 "scanner.re" +#line 241 "scanner.re" { yylval.op = *tok; RETURN(CLOSE); } -#line 612 "" +#line 445 "scanner.cc" yy66: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case 0x0A: goto yy67; - default: goto yy115; - } + if(yych != 0x0A) goto yy115; yy67: -#line 227 "scanner.re" +#line 226 "scanner.re" { fatal("unterminated string constant (missing \")"); } -#line 623 "" +#line 453 "scanner.cc" yy68: yyaccept = 2; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case 0x0A: goto yy69; - default: goto yy110; - } + if(yych != 0x0A) goto yy110; yy69: -#line 228 "scanner.re" +#line 227 "scanner.re" { fatal("unterminated string constant (missing ')"); } -#line 634 "" +#line 461 "scanner.cc" yy70: yyaccept = 3; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case 0x0A: goto yy71; - case '^': goto yy101; - default: goto yy100; - } + if(yych == 0x0A) goto yy71; + if(yych == '^') goto yy101; + goto yy100; yy71: -#line 238 "scanner.re" +#line 237 "scanner.re" { fatal("unterminated range (missing ])"); } -#line 646 "" +#line 471 "scanner.cc" yy72: yych = *++YYCURSOR; goto yy63; @@ -651,59 +476,54 @@ yy73: goto yy65; yy74: ++YYCURSOR; - switch((yych = *YYCURSOR)) { - case 'e': goto yy91; - default: goto yy90; - } + if((yych = *YYCURSOR) == 'e') goto yy91; + goto yy90; yy75: -#line 269 "scanner.re" +#line 268 "scanner.re" { cur = cursor; yylval.symbol = Symbol::find(token()); return ID; } -#line 664 "" +#line 487 "scanner.cc" yy76: yych = *++YYCURSOR; goto yy90; yy77: ++YYCURSOR; -#line 273 "scanner.re" +#line 272 "scanner.re" { cur = cursor; yylval.regexp = mkDot(); return RANGE; } -#line 675 "" +#line 498 "scanner.cc" yy79: ++YYCURSOR; yych = *YYCURSOR; goto yy88; yy80: -#line 278 "scanner.re" +#line 277 "scanner.re" { goto scan; } -#line 683 "" +#line 506 "scanner.cc" yy81: ++YYCURSOR; yy82: -#line 280 "scanner.re" +#line 279 "scanner.re" { if(cursor == eof) RETURN(0); pos = cursor; cline++; goto scan; } -#line 692 "" +#line 515 "scanner.cc" yy83: ++YYCURSOR; - switch((yych = *YYCURSOR)) { - case 0x0A: goto yy86; - default: goto yy84; - } + if((yych = *YYCURSOR) == 0x0A) goto yy86; yy84: -#line 285 "scanner.re" +#line 284 "scanner.re" { std::ostringstream msg; msg << "unexpected character: "; prtChOrHex(msg, *tok); fatal(msg.str().c_str()); goto scan; } -#line 707 "" +#line 527 "scanner.cc" yy85: yych = *++YYCURSOR; goto yy84; @@ -715,548 +535,349 @@ yy87: if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy88: - switch(yych){ - case 0x09: - case ' ': goto yy87; - default: goto yy80; - } + if(yych == 0x09) goto yy87; + if(yych == ' ') goto yy87; + goto yy80; yy89: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy90: - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy89; - default: goto yy75; + if(yych <= '@') { + if(yych <= '/') goto yy75; + if(yych <= '9') goto yy89; + goto yy75; + } else { + if(yych <= 'Z') goto yy89; + if(yych <= '`') goto yy75; + if(yych <= 'z') goto yy89; + goto yy75; } yy91: yych = *++YYCURSOR; - switch(yych){ - case '2': goto yy92; - default: goto yy90; - } -yy92: + if(yych != '2') goto yy90; yych = *++YYCURSOR; - switch(yych){ - case 'c': goto yy93; - default: goto yy90; - } -yy93: + if(yych != 'c') goto yy90; yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case ':': goto yy94; - default: goto yy90; - } + if(yych != ':') goto yy90; yy94: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy96; - default: goto yy95; - } + if(yych <= '@') goto yy95; + if(yych <= 'Z') goto yy96; + if(yych <= '`') goto yy95; + if(yych <= 'z') goto yy96; yy95: YYCURSOR = YYMARKER; - switch(yyaccept) { - case 0: goto yy61; - case 1: goto yy67; - case 2: goto yy69; - case 3: goto yy71; - case 4: goto yy75; - case 5: goto yy98; - case 6: goto yy127; + if(yyaccept <= 3) { + if(yyaccept <= 1) { + if(yyaccept <= 0) { + goto yy61; + } else { + goto yy67; + } + } else { + if(yyaccept <= 2) { + goto yy69; + } else { + goto yy71; + } + } + } else { + if(yyaccept <= 5) { + if(yyaccept <= 4) { + goto yy75; + } else { + goto yy98; + } + } else { + goto yy127; + } } yy96: yyaccept = 5; YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case '_': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy96; - case ':': goto yy94; - default: goto yy98; + if(yych <= 'Z') { + if(yych <= '9') { + if(yych >= '0') goto yy96; + } else { + if(yych <= ':') goto yy94; + if(yych >= 'A') goto yy96; + } + } else { + if(yych <= '_') { + if(yych >= '_') goto yy96; + } else { + if(yych <= '`') goto yy98; + if(yych <= 'z') goto yy96; + } } yy98: -#line 262 "scanner.re" +#line 261 "scanner.re" { cur = cursor; tok+= 5; /* skip "re2c:" */ iscfg = 1; yylval.str = new Str(token()); return CONFIG; } -#line 963 "" +#line 628 "scanner.cc" yy99: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy100: - switch(yych){ - case 0x0A: goto yy95; - case '\\': goto yy103; - case ']': goto yy104; - default: goto yy99; + if(yych <= '[') { + if(yych == 0x0A) goto yy95; + goto yy99; + } else { + if(yych <= '\\') goto yy103; + if(yych <= ']') goto yy104; + goto yy99; } yy101: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy95; - case '\\': goto yy106; - case ']': goto yy107; - default: goto yy101; + if(yych <= '[') { + if(yych == 0x0A) goto yy95; + goto yy101; + } else { + if(yych <= '\\') goto yy106; + if(yych <= ']') goto yy107; + goto yy101; } yy103: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy95; - default: goto yy99; - } + if(yych == 0x0A) goto yy95; + goto yy99; yy104: ++YYCURSOR; -#line 234 "scanner.re" +#line 233 "scanner.re" { cur = cursor; yylval.regexp = ranToRE(token()); return RANGE; } -#line 999 "" +#line 666 "scanner.cc" yy106: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy95; - default: goto yy101; - } + if(yych == 0x0A) goto yy95; + goto yy101; yy107: ++YYCURSOR; -#line 230 "scanner.re" +#line 229 "scanner.re" { cur = cursor; yylval.regexp = invToRE(token()); return RANGE; } -#line 1014 "" +#line 679 "scanner.cc" yy109: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy110: - switch(yych){ - case 0x0A: goto yy95; - case '\'': goto yy112; - case '\\': goto yy111; - default: goto yy109; + if(yych <= '&') { + if(yych == 0x0A) goto yy95; + goto yy109; + } else { + if(yych <= '\'') goto yy112; + if(yych != '\\') goto yy109; } -yy111: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy95; - default: goto yy109; - } + if(yych == 0x0A) goto yy95; + goto yy109; yy112: ++YYCURSOR; -#line 223 "scanner.re" +#line 222 "scanner.re" { cur = cursor; yylval.regexp = strToCaseInsensitiveRE(token()); return STRING; } -#line 1040 "" +#line 703 "scanner.cc" yy114: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy115: - switch(yych){ - case 0x0A: goto yy95; - case '"': goto yy117; - case '\\': goto yy116; - default: goto yy114; + if(yych <= '!') { + if(yych == 0x0A) goto yy95; + goto yy114; + } else { + if(yych <= '"') goto yy117; + if(yych != '\\') goto yy114; } -yy116: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy95; - default: goto yy114; - } + if(yych == 0x0A) goto yy95; + goto yy114; yy117: ++YYCURSOR; -#line 219 "scanner.re" +#line 218 "scanner.re" { cur = cursor; yylval.regexp = strToRE(token()); return STRING; } -#line 1066 "" +#line 727 "scanner.cc" yy119: ++YYCURSOR; -#line 216 "scanner.re" +#line 215 "scanner.re" { tok = cursor; RETURN(0); } -#line 1072 "" +#line 733 "scanner.cc" yy121: ++YYCURSOR; -#line 213 "scanner.re" +#line 212 "scanner.re" { depth = 1; goto comment; } -#line 1078 "" +#line 739 "scanner.cc" yy123: yych = *++YYCURSOR; - switch(yych){ - case ',': goto yy137; - default: goto yy125; - } + if(yych == ',') goto yy137; + goto yy125; yy124: ++YYCURSOR; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; yy125: - switch(yych){ - case ',': goto yy130; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy124; - case '}': goto yy128; - default: goto yy95; + if(yych <= '/') { + if(yych == ',') goto yy130; + goto yy95; + } else { + if(yych <= '9') goto yy124; + if(yych == '}') goto yy128; + goto yy95; } yy126: ++YYCURSOR; yy127: -#line 260 "scanner.re" +#line 259 "scanner.re" { fatal("illegal closure form, use '{n}', '{n,}', '{n,m}' where n and m are numbers"); } -#line 1110 "" +#line 762 "scanner.cc" yy128: ++YYCURSOR; -#line 248 "scanner.re" +#line 247 "scanner.re" { yylval.extop.minsize = atoi((char *)tok+1); yylval.extop.maxsize = atoi((char *)tok+1); RETURN(CLOSESIZE); } -#line 1117 "" +#line 769 "scanner.cc" yy130: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy133; - case '}': goto yy131; - default: goto yy127; - } -yy131: + if(yych <= '/') goto yy127; + if(yych <= '9') goto yy133; + if(yych != '}') goto yy127; ++YYCURSOR; -#line 256 "scanner.re" +#line 255 "scanner.re" { yylval.extop.minsize = atoi((char *)tok+1); yylval.extop.maxsize = -1; RETURN(CLOSESIZE); } -#line 1141 "" +#line 781 "scanner.cc" yy133: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy133; - case '}': goto yy135; - default: goto yy95; - } -yy135: + if(yych <= '/') goto yy95; + if(yych <= '9') goto yy133; + if(yych != '}') goto yy95; ++YYCURSOR; -#line 252 "scanner.re" +#line 251 "scanner.re" { yylval.extop.minsize = atoi((char *)tok+1); yylval.extop.maxsize = MAX(yylval.extop.minsize,atoi(strchr((char *)tok, ',')+1)); RETURN(CLOSESIZE); } -#line 1166 "" +#line 794 "scanner.cc" yy137: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy133; - case '}': goto yy138; - default: goto yy127; - } -yy138: + if(yych <= '/') goto yy127; + if(yych <= '9') goto yy133; + if(yych != '}') goto yy127; ++YYCURSOR; -#line 245 "scanner.re" +#line 244 "scanner.re" { yylval.op = '*'; RETURN(CLOSE); } -#line 1189 "" +#line 805 "scanner.cc" } -#line 291 "scanner.re" +#line 290 "scanner.re" code: -#line 1196 "" +#line 812 "scanner.cc" { YYCTYPE yych; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy146; - case '"': goto yy150; - case '\'': goto yy151; - case '{': goto yy144; - case '}': goto yy142; - default: goto yy148; + if(yych <= '&') { + if(yych <= 0x0A) { + if(yych <= 0x09) goto yy148; + goto yy146; + } else { + if(yych == '"') goto yy150; + goto yy148; + } + } else { + if(yych <= '{') { + if(yych <= '\'') goto yy151; + if(yych <= 'z') goto yy148; + goto yy144; + } else { + if(yych != '}') goto yy148; + } } -yy142: ++YYCURSOR; -#line 295 "scanner.re" +#line 294 "scanner.re" { if(--depth == 0){ cur = cursor; yylval.token = new Token(token(), tline); return CODE; } goto code; } -#line 1218 "" +#line 842 "scanner.cc" yy144: ++YYCURSOR; -#line 301 "scanner.re" +#line 300 "scanner.re" { ++depth; goto code; } -#line 1224 "" +#line 848 "scanner.cc" yy146: ++YYCURSOR; -#line 303 "scanner.re" +#line 302 "scanner.re" { if(cursor == eof) fatal("missing '}'"); pos = cursor; cline++; goto code; } -#line 1232 "" +#line 856 "scanner.cc" yy148: ++YYCURSOR; yy149: -#line 307 "scanner.re" +#line 306 "scanner.re" { goto code; } -#line 1238 "" +#line 862 "scanner.cc" yy150: yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case 0x0A: goto yy149; - default: goto yy157; - } + if(yych == 0x0A) goto yy149; + goto yy157; yy151: yych = *(YYMARKER = ++YYCURSOR); - switch(yych){ - case 0x0A: goto yy149; - default: goto yy153; - } + if(yych == 0x0A) goto yy149; + goto yy153; yy152: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy153: - switch(yych){ - case 0x0A: goto yy154; - case '\'': goto yy148; - case '\\': goto yy155; - default: goto yy152; + if(yych <= '&') { + if(yych != 0x0A) goto yy152; + } else { + if(yych <= '\'') goto yy148; + if(yych == '\\') goto yy155; + goto yy152; } yy154: YYCURSOR = YYMARKER; @@ -1265,294 +886,304 @@ yy155: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy154; - default: goto yy152; - } + if(yych == 0x0A) goto yy154; + goto yy152; yy156: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy157: - switch(yych){ - case 0x0A: goto yy154; - case '"': goto yy148; - case '\\': goto yy158; - default: goto yy156; + if(yych <= '!') { + if(yych == 0x0A) goto yy154; + goto yy156; + } else { + if(yych <= '"') goto yy148; + if(yych != '\\') goto yy156; } -yy158: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy154; - default: goto yy156; - } + if(yych == 0x0A) goto yy154; + goto yy156; } -#line 308 "scanner.re" +#line 307 "scanner.re" comment: -#line 1298 "" +#line 915 "scanner.cc" { YYCTYPE yych; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy164; - case '*': goto yy161; - case '/': goto yy163; - default: goto yy166; + if(yych <= ')') { + if(yych == 0x0A) goto yy164; + goto yy166; + } else { + if(yych <= '*') goto yy161; + if(yych == '/') goto yy163; + goto yy166; } yy161: ++YYCURSOR; - switch((yych = *YYCURSOR)) { - case '/': goto yy169; - default: goto yy162; - } + if((yych = *YYCURSOR) == '/') goto yy169; yy162: -#line 323 "scanner.re" +#line 322 "scanner.re" { if(cursor == eof) RETURN(0); goto comment; } -#line 1319 "" +#line 935 "scanner.cc" yy163: yych = *++YYCURSOR; - switch(yych){ - case '*': goto yy167; - default: goto yy162; - } + if(yych == '*') goto yy167; + goto yy162; yy164: ++YYCURSOR; -#line 319 "scanner.re" +#line 318 "scanner.re" { if(cursor == eof) RETURN(0); tok = pos = cursor; cline++; goto comment; } -#line 1333 "" +#line 947 "scanner.cc" yy166: yych = *++YYCURSOR; goto yy162; yy167: ++YYCURSOR; -#line 316 "scanner.re" +#line 315 "scanner.re" { ++depth; fatal("ambiguous /* found"); goto comment; } -#line 1343 "" +#line 957 "scanner.cc" yy169: ++YYCURSOR; -#line 312 "scanner.re" +#line 311 "scanner.re" { if(--depth == 0) goto scan; else goto comment; } -#line 1351 "" +#line 965 "scanner.cc" } -#line 325 "scanner.re" +#line 324 "scanner.re" config: -#line 1358 "" +#line 972 "scanner.cc" { YYCTYPE yych; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case ' ': goto yy173; - case '=': goto yy175; - default: goto yy177; + if(yych <= 0x1F) { + if(yych != 0x09) goto yy177; + } else { + if(yych <= ' ') goto yy173; + if(yych == '=') goto yy175; + goto yy177; } yy173: ++YYCURSOR; yych = *YYCURSOR; goto yy182; yy174: -#line 329 "scanner.re" +#line 328 "scanner.re" { goto config; } -#line 1376 "" +#line 991 "scanner.cc" yy175: ++YYCURSOR; yych = *YYCURSOR; goto yy180; yy176: -#line 330 "scanner.re" +#line 329 "scanner.re" { iscfg = 2; cur = cursor; RETURN('='); } -#line 1387 "" +#line 1002 "scanner.cc" yy177: ++YYCURSOR; -#line 334 "scanner.re" +#line 333 "scanner.re" { fatal("missing '='"); } -#line 1392 "" +#line 1007 "scanner.cc" yy179: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy180: - switch(yych){ - case 0x09: - case ' ': goto yy179; - default: goto yy176; - } + if(yych == 0x09) goto yy179; + if(yych == ' ') goto yy179; + goto yy176; yy181: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy182: - switch(yych){ - case 0x09: - case ' ': goto yy181; - default: goto yy174; - } + if(yych == 0x09) goto yy181; + if(yych == ' ') goto yy181; + goto yy174; } -#line 335 "scanner.re" +#line 334 "scanner.re" value: -#line 1419 "" +#line 1030 "scanner.cc" { YYCTYPE yych; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case 0x0A: - case 0x0D: - case ' ': - case ';': goto yy185; - case '"': goto yy193; - case '\'': goto yy195; - case '-': goto yy188; - case '0': goto yy186; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy189; - default: goto yy191; + if(yych <= '&') { + if(yych <= 0x0D) { + if(yych <= 0x08) goto yy191; + if(yych <= 0x0A) goto yy185; + if(yych <= 0x0C) goto yy191; + } else { + if(yych <= ' ') { + if(yych <= 0x1F) goto yy191; + } else { + if(yych == '"') goto yy193; + goto yy191; + } + } + } else { + if(yych <= '/') { + if(yych <= '\'') goto yy195; + if(yych == '-') goto yy188; + goto yy191; + } else { + if(yych <= '9') { + if(yych <= '0') goto yy186; + goto yy189; + } else { + if(yych != ';') goto yy191; + } + } } yy185: -#line 344 "scanner.re" +#line 343 "scanner.re" { cur = cursor; yylval.str = new Str(token()); iscfg = 0; return VALUE; } -#line 1452 "" +#line 1069 "scanner.cc" yy186: ++YYCURSOR; - switch((yych = *YYCURSOR)) { - case 0x09: - case 0x0A: - case 0x0D: - case ' ': - case ';': goto yy187; - default: goto yy191; + if((yych = *YYCURSOR) <= 0x0D) { + if(yych <= 0x08) goto yy191; + if(yych <= 0x0A) goto yy187; + if(yych <= 0x0C) goto yy191; + } else { + if(yych <= ' ') { + if(yych <= 0x1F) goto yy191; + } else { + if(yych != ';') goto yy191; + } } yy187: -#line 339 "scanner.re" +#line 338 "scanner.re" { cur = cursor; yylval.number = atoi(token().to_string().c_str()); iscfg = 0; return NUMBER; } -#line 1470 "" +#line 1090 "scanner.cc" yy188: yych = *++YYCURSOR; - switch(yych){ - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy189; - default: goto yy192; - } + if(yych <= '0') goto yy192; + if(yych >= ':') goto yy192; yy189: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case 0x0A: - case 0x0D: - case ' ': - case ';': goto yy187; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy189; - default: goto yy191; + if(yych <= 0x1F) { + if(yych <= 0x0A) { + if(yych >= 0x09) goto yy187; + } else { + if(yych == 0x0D) goto yy187; + } + } else { + if(yych <= '9') { + if(yych <= ' ') goto yy187; + if(yych >= '0') goto yy189; + } else { + if(yych == ';') goto yy187; + } } yy191: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; yy192: - switch(yych){ - case 0x09: - case 0x0A: - case 0x0D: - case ' ': - case ';': goto yy185; - default: goto yy191; + if(yych <= 0x0D) { + if(yych <= 0x08) goto yy191; + if(yych <= 0x0A) goto yy185; + if(yych <= 0x0C) goto yy191; + goto yy185; + } else { + if(yych <= ' ') { + if(yych <= 0x1F) goto yy191; + goto yy185; + } else { + if(yych == ';') goto yy185; + goto yy191; + } } yy193: YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case 0x0D: - case ' ': - case ';': goto yy203; - case 0x0A: goto yy185; - case '"': goto yy191; - case '\\': goto yy205; - default: goto yy193; + if(yych <= ' ') { + if(yych <= 0x0A) { + if(yych <= 0x08) goto yy193; + if(yych <= 0x09) goto yy203; + goto yy185; + } else { + if(yych == 0x0D) goto yy203; + if(yych <= 0x1F) goto yy193; + goto yy203; + } + } else { + if(yych <= ':') { + if(yych == '"') goto yy191; + goto yy193; + } else { + if(yych <= ';') goto yy203; + if(yych == '\\') goto yy205; + goto yy193; + } } yy195: YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case 0x0D: - case ' ': - case ';': goto yy197; - case 0x0A: goto yy185; - case '\'': goto yy191; - case '\\': goto yy200; - default: goto yy195; + if(yych <= ' ') { + if(yych <= 0x0A) { + if(yych <= 0x08) goto yy195; + if(yych >= 0x0A) goto yy185; + } else { + if(yych == 0x0D) goto yy197; + if(yych <= 0x1F) goto yy195; + } + } else { + if(yych <= ':') { + if(yych == '\'') goto yy191; + goto yy195; + } else { + if(yych <= ';') goto yy197; + if(yych == '\\') goto yy200; + goto yy195; + } } yy197: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy199; - case '\'': goto yy201; - case '\\': goto yy202; - default: goto yy197; + if(yych <= '&') { + if(yych != 0x0A) goto yy197; + } else { + if(yych <= '\'') goto yy201; + if(yych == '\\') goto yy202; + goto yy197; } yy199: YYCURSOR = YYMARKER; @@ -1561,13 +1192,23 @@ yy200: YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case 0x0D: - case ' ': - case ';': goto yy197; - case 0x0A: goto yy185; - default: goto yy195; + if(yych <= 0x0D) { + if(yych <= 0x09) { + if(yych <= 0x08) goto yy195; + goto yy197; + } else { + if(yych <= 0x0A) goto yy185; + if(yych <= 0x0C) goto yy195; + goto yy197; + } + } else { + if(yych <= ' ') { + if(yych <= 0x1F) goto yy195; + goto yy197; + } else { + if(yych == ';') goto yy197; + goto yy195; + } } yy201: yych = *++YYCURSOR; @@ -1576,42 +1217,50 @@ yy202: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy199; - default: goto yy197; - } + if(yych == 0x0A) goto yy199; + goto yy197; yy203: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy199; - case '"': goto yy201; - case '\\': goto yy206; - default: goto yy203; + if(yych <= '!') { + if(yych == 0x0A) goto yy199; + goto yy203; + } else { + if(yych <= '"') goto yy201; + if(yych == '\\') goto yy206; + goto yy203; } yy205: YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x09: - case 0x0D: - case ' ': - case ';': goto yy203; - case 0x0A: goto yy185; - default: goto yy193; + if(yych <= 0x0D) { + if(yych <= 0x09) { + if(yych <= 0x08) goto yy193; + goto yy203; + } else { + if(yych <= 0x0A) goto yy185; + if(yych <= 0x0C) goto yy193; + goto yy203; + } + } else { + if(yych <= ' ') { + if(yych <= 0x1F) goto yy193; + goto yy203; + } else { + if(yych == ';') goto yy203; + goto yy193; + } } yy206: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - switch(yych){ - case 0x0A: goto yy199; - default: goto yy203; - } + if(yych == 0x0A) goto yy199; + goto yy203; } -#line 349 "scanner.re" +#line 348 "scanner.re" } diff --git a/tools/re2c/scanner.re b/tools/re2c/scanner.re index 3822e3b75..3ce436e49 100644 --- a/tools/re2c/scanner.re +++ b/tools/re2c/scanner.re @@ -32,8 +32,7 @@ Scanner::Scanner(const char *fn, std::istream& i, std::ostream& o) : in(i) , out(o) , bot(NULL), tok(NULL), ptr(NULL), cur(NULL), pos(NULL), lim(NULL) - , top(NULL), eof(NULL), tchar(0), tline(0), cline(1), iscfg(0) - , filename(fn) + , top(NULL), eof(NULL), tchar(0), tline(0), cline(1), iscfg(0), filename(fn) { ; } diff --git a/tools/updaterevision/Makefile b/tools/updaterevision/Makefile new file mode 100644 index 000000000..8d9b6e2e4 --- /dev/null +++ b/tools/updaterevision/Makefile @@ -0,0 +1,30 @@ +CC = gcc +CFLAGS = -Os -Wall -fomit-frame-pointer +LDFLAGS = -s + +ifeq (Windows_NT,$(OS)) + EXE = updaterevision.exe + CCDV = @../../ccdv +else + EXE = updaterevision + CCDV = @../../ccdv + CFLAGS = -Os -Wall -fomit-frame-pointer +endif + +OBJS = updaterevision.o + +all: $(EXE) + +$(EXE): $(OBJS) + $(CCDV) $(CC) -o $(EXE) $(OBJS) $(CFLAGS) $(LDFLAGS) + +.PHONY: clean + +clean: +ifeq (Windows_NT,$(OS)) + -del /q /f $(EXE) 2>nul + -del /q /f *.o 2>nul +else + -rm -f $(EXE) + -rm -f *.o +endif diff --git a/tools/updaterevision/updaterevision.c b/tools/updaterevision/updaterevision.c new file mode 100644 index 000000000..025d5679a --- /dev/null +++ b/tools/updaterevision/updaterevision.c @@ -0,0 +1,117 @@ +/* updaterevision.c + * + * Public domain. This program uses the svnversion command to get the + * repository revision for a particular directory and writes it into + * a header file so that it can be used as a project's build number. + */ + +#define _CRT_SECURE_NO_DEPRECATE + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + char *name; + char currev[64], lastrev[64], run[256], *rev; + unsigned long urev; + FILE *stream = NULL; + int gotrev = 0, needupdate = 1; + + if (argc != 3) + { + fprintf (stderr, "Usage: %s \n", argv[0]); + return 1; + } + + // Use svnversion to get the revision number. If that fails, pretend it's + // revision 0. Note that this requires you have the command-line svn tools installed. + sprintf (run, "svnversion -cn %s", argv[1]); + if ((name = tmpnam(NULL)) != NULL && + (stream = freopen(name, "w+b", stdout)) != NULL && + system(run) == 0 && + errno == 0 && + fseek(stream, 0, SEEK_SET) == 0 && + fgets(currev, sizeof currev, stream) == currev && + (isdigit(currev[0]) || (currev[0] == '-' && currev[1] == '1'))) + { + gotrev = 1; + } + if (stream != NULL) + { + fclose (stream); + remove (name); + } + + if (!gotrev) + { + strcpy (currev, "0"); + rev = currev; + } + else + { + rev = strchr (currev, ':'); + if (rev == NULL) + { + rev = currev; + } + else + { + rev += 1; + } + } + + stream = fopen (argv[2], "r"); + if (stream != NULL) + { + if (!gotrev) + { // If we didn't get a revision but the file does exist, leave it alone. + fclose (stream); + return 0; + } + // Read the revision that's in this file already. If it's the same as + // what we've got, then we don't need to modify it and can avoid rebuilding + // dependant files. + if (fgets(lastrev, sizeof lastrev, stream) == lastrev) + { + if (lastrev[0] != '\0') + { // Strip trailing \n + lastrev[strlen(lastrev) - 1] = '\0'; + } + if (strcmp(rev, lastrev + 3) == 0) + { + needupdate = 0; + } + } + fclose (stream); + } + + if (needupdate) + { + stream = fopen (argv[2], "w"); + if (stream == NULL) + { + return 1; + } + urev = strtoul(rev, NULL, 10); + fprintf (stream, +"// %s\n" +"//\n" +"// This file was automatically generated by the\n" +"// updaterevision tool. Do not edit by hand.\n" +"\n" +"#define SVN_REVISION_STRING \"%s\"\n" +"#define SVN_REVISION_NUMBER %lu\n", + rev, rev, urev); + fclose (stream); + fprintf (stderr, "%s updated to revision %s.\n", argv[2], rev); + } + else + { + fprintf (stderr, "%s is up to date at revision %s.\n", argv[2], rev); + } + + return 0; +} diff --git a/tools/updaterevision/updaterevision.vcproj b/tools/updaterevision/updaterevision.vcproj new file mode 100644 index 000000000..5e579c189 --- /dev/null +++ b/tools/updaterevision/updaterevision.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wadsrc/decorate/heretic/hereticammo.txt b/wadsrc/decorate/heretic/hereticammo.txt index 0e7defd85..eb025683e 100644 --- a/wadsrc/decorate/heretic/hereticammo.txt +++ b/wadsrc/decorate/heretic/hereticammo.txt @@ -227,4 +227,4 @@ ACTOR BagOfHolding : Backpack 8 BAGH A -1 Stop } -} \ No newline at end of file +} diff --git a/wadsrc/sndinfo.txt b/wadsrc/sndinfo.txt index 5914fa4db..357cefed0 100644 --- a/wadsrc/sndinfo.txt +++ b/wadsrc/sndinfo.txt @@ -947,6 +947,18 @@ $alias menu/clear PlatformStop $limit DoorCloseLight 4 +$limit PuppyBeat 0 +$limit CeantaurPain 0 +$limit BishopPain 0 +$limit SerpentPain 0 +$limit DemonPain 0 +$limit WraithPain 0 +$limit MaulatorPain 0 +$limit EttinPain 0 +$limit FireDemonPain 0 +$limit SorcererPain 0 +$limit DragonPain 0 + $endif // ifhexen //=========================================================================== diff --git a/wadsrc/wadsrc.vcproj b/wadsrc/wadsrc.vcproj index 2a2bb25e1..c47dabc4e 100644 --- a/wadsrc/wadsrc.vcproj +++ b/wadsrc/wadsrc.vcproj @@ -4,6 +4,7 @@ Version="8.00" Name="wadsrc" ProjectGUID="{1D179D4B-F008-431B-8C72-111F8372584F}" + RootNamespace="wadsrc" Keyword="MakeFileProj" > @@ -39,15 +40,15 @@ /> + + @@ -378,6 +383,10 @@ RelativePath=".\decorate\doom\doomdecorations.txt" > + + @@ -390,6 +399,10 @@ + + @@ -430,6 +443,10 @@ RelativePath=".\decorate\hexen\hexenspecialdecs.txt" > + + @@ -467,7 +484,7 @@ > @@ -28,6 +28,7 @@ > - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2707,14 +2719,6 @@ GeneratePreprocessedFile="0" /> - - - @@ -2737,7 +2741,7 @@ /> + + + + + + + + + + + + + + + + @@ -3681,7 +3733,7 @@ /> - - - @@ -4752,6 +4794,16 @@ Outputs="$(IntDir)/$(InputName).obj" /> + + + @@ -4776,16 +4828,6 @@ Outputs="$(IntDir)/$(InputName).obj" /> - - - @@ -4796,6 +4838,16 @@ Outputs="$(IntDir)/$(InputName).obj" /> + + + @@ -4820,16 +4872,6 @@ Outputs="$(IntDir)\$(InputName).obj" /> - - - @@ -4840,6 +4882,16 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + @@ -4864,16 +4916,6 @@ Outputs="$(IntDir)\$(InputName).obj" /> - - - @@ -4884,6 +4926,16 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + @@ -4908,16 +4960,6 @@ Outputs="$(IntDir)\$(InputName).obj" /> - - - @@ -4928,6 +4970,16 @@ Outputs="$(IntDir)\$(InputName).obj" /> + + + @@ -4999,7 +5051,7 @@ /> - - - @@ -5572,6 +5616,14 @@ GeneratePreprocessedFile="0" /> + + + @@ -5593,7 +5645,7 @@ /> - - - @@ -9521,11 +9565,21 @@ AdditionalIncludeDirectories="src\win32;$(NoInherit)" /> + + + @@ -9694,7 +9748,7 @@ />