diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 605f60dabd95..000000000000 --- a/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.DS_Store -.gdb_history -*.s[0-9][0-9] -*.c[0-9][0-9] -scummvm diff --git a/.indent.pro b/.indent.pro deleted file mode 100644 index afb9cd1c3347..000000000000 --- a/.indent.pro +++ /dev/null @@ -1,15 +0,0 @@ --br -bap -nbc -lp -ce -cdw -brs -nbad -nbc -npsl -nip -ts2 -ncs -nbs --npcs -nbap -l105 --Tbool -Tbyte -Tvoid -Tuint32 -Tuint8 -Tuint16 -Tint -Tint8 -Tint16 -Tint32 --TFILE --TOSystem -TScumm -TThreadProc -TSoundProc -TEvent -TProperty --TConfig -Thashconfig -TGameDetector -TSaveLoadEntry -TScummPoint --TGui -TGuiWidget -TNewGui -TWidget -TDialog --TArrayHeader -TMemBlkHeader -TVerbSlot -TObjectData -TImageHeader -TRoomHeader --TCodeHeader -TResHdr -TBompHeader -TBompDrawData -TBlastObject -TLoadedCostume --TActor -TBox -TBoxCoords -TVirtScreen -TPathVertex -TPathNode -TFindObjectInRoom --TMidiChannelAdl -TSoundEngine -TPart -TPlayer -TSong --TSerializer -TMidiDriver -TIMuseInternal -TIMuseDriver -TStreamCallback --TSoundMixer -TPlayingSoundHandle -TPremixProc -TMIDIEVENT -TFM_OPL --TItem -TChild -TChild1 -TChild2 -TTimeEvent -TSubroutine -TSubroutineLine --TFillOrCopyStruct -TTrack -TNoteRec -TMidiEvent diff --git a/copying.txt b/COPYING similarity index 100% rename from copying.txt rename to COPYING diff --git a/Makefile b/Makefile index 9320484c29a4..b7746c1bfc2d 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ # $Header$ -CC = g++ +CXX = c++ CFLAGS = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar DEFINES = LDFLAGS := -INCLUDES:= -I./ -I./sound +INCLUDES:= -I. -Icommon -Iscumm -Isound LIBS = -lncurses # Uncomment this to activate the MAD lib for compressed sound files -# DEFINES += -DCOMPRESSED_SOUND_FILE -# LIBS += -lmad +DEFINES += -DCOMPRESSED_SOUND_FILE +LIBS += -lmad # Uncomment this to activate the ALSA lib for midi # DEFINES += -DUSE_ALSA @@ -19,23 +19,23 @@ LIBS = -lncurses # Beware, only define one of them, otherwise the compilation will blow up. # Comment this if you want to disable SDL output -OBJS = sdl.o +OBJS = backends/sdl/sdl.o INCLUDES += `sdl-config --cflags` LIBS += `sdl-config --libs` DEFINES += -DUNIX # Uncomment this (instead of the above) to activate the SDL with OpenGL output -# OBJS = sdl_gl.o +# OBJS = backends/sdl/sdl_gl.o # INCLUDES += `sdl-config --cflags` # LIBS += `sdl-config --libs` -lGL # DEFINES += -DUNIX # Uncomment this in addition to the above if you compile on Mac OS X -# LIBS += -framework QuickTime -framework AudioUnit -# DEFINES += -DMACOSX +LIBS += -framework QuickTime -framework AudioUnit +DEFINES += -DMACOSX # Uncomment this if you rather want X11 output -# OBJS = x11.o +# OBJS = backends/x11/x11.o # DEFINES += -DUNIX -DX11_BACKEND # LDFLAGS := -L/usr/X11R6/lib -L/usr/local/lib # INCLUDES+= -I/usr/X11R6/include diff --git a/Makefile.common b/Makefile.common index 84256ef67403..6fe2133ff40d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -4,31 +4,44 @@ ZIPFILE := scummvm-`date '+%Y-%m-%d'`.zip -INCS = scumm.h scummsys.h stdafx.h - -OBJS += util.o newgui.o gui/widget.o gui/dialog.o \ - gui/ListWidget.o gui/ScrollBarWidget.o \ - actor.o akos.o boxes.o bundle.o config-file.o costume.o debug.o \ - debugrl.o engine.o gameDetector.o gfx.o gui.o insane.o main.o object.o \ - resource.o saveload.o scaler.o script.o script_v1.o script_v2.o \ - scummvm.o sound.o string.o sys.o timer.o vars.o verbs.o \ - sound/imuse.o sound/fmopl.o sound/mixer.o \ - v3/resource_v3.o v4/resource_v4.o \ - simon/midi.o simon/simon.o simon/simonsys.o simon/simonvga.o \ - simon/simondebug.o simon/simonres.o simon/simonitems.o simon/simonverb.o \ - sound/mididrv.o - -DISTFILES=$(OBJS:.o=.cpp) Makefile scummvm.dsp scummvm.dsw stdafx.cpp \ - whatsnew.txt readme.txt copying.txt \ - actor.h akos.h boxes.h bundle.h cmdline.h config-file.h costume.h debug.h \ - debugrl.h engine.h fb2opengl.h gameDetector.h gapi_keys.h gfx.h gui.h guimaps.h \ - newgui.h object.h resource.h saveload.h scaler.h scumm.h scummsys.h smush.h \ - sound.h stdafx.h system.h timer.h util.h sound/fmopl.h +INCS = scumm/scumm.h common/scummsys.h common/stdafx.h + +COMMON_OBJS = common/config-file.o common/gameDetector.o common/main.o \ + common/timer.o common/util.o + +GUI_OBJS = gui/gui.o gui/newgui.o gui/widget.o gui/dialog.o gui/ListWidget.o \ + gui/ScrollBarWidget.o + +SCUMM_OBJS = scumm/actor.o scumm/akos.o scumm/boxes.o scumm/bundle.o \ + scumm/costume.o scumm/debug.o scumm/debugrl.o scumm/engine.o scumm/gfx.o \ + scumm/imuse.o scumm/insane.o scumm/object.o scumm/resource.o \ + scumm/resource_v3.o scumm/resource_v4.o scumm/saveload.o scumm/scaler.o \ + scumm/script.o scumm/script_v1.o scumm/script_v2.o scumm/scummvm.o \ + scumm/string.o scumm/sys.o scumm/vars.o scumm/verbs.o + +SIMON_OBJS = simon/debug.o simon/items.o simon/midi.o simon/res.o simon/simon.o \ + simon/sys.o simon/verb.o simon/vga.o + +SOUND_OBJS = sound/fmopl.o sound/mididrv.o sound/mixer.o sound/sound.o + +OBJS += $(COMMON_OBJS) $(GUI_OBJS) scumm/libscumm.a simon/libsimon.a $(SOUND_OBJS) + +DISTFILES=$(OBJS:.o=.cpp) Makefile scumm.h scummsys.h stdafx.h stdafx.cpp \ + debugrl.h whatsnew.txt readme.txt copying.txt \ + scummvm.dsp scummvm.dsw sound/fmopl.h gui.h sound.h all: scummvm$(EXEEXT) scummvm$(EXEEXT): $(OBJS) - $(CC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) + $(CXX) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) + +scumm/libscumm.a: $(SCUMM_OBJS) + ar cru $@ $+ + ranlib $@ + +simon/libsimon.a: $(SIMON_OBJS) + ar cru $@ $+ + ranlib $@ clean: rm -f $(OBJS) scummvm$(EXEEXT) @@ -37,7 +50,7 @@ clean: # Default (dumb) compile & dependcy rules .cpp.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + $(CXX) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o $(OBJS): $(INCS) @@ -45,10 +58,10 @@ $(OBJS): $(INCS) # dependency tracking. #DEPDIR := .deps #.cpp.o: -# mkdir -p $(DEPDIR) -# $(CC) -Wp,-MMD,"$(DEPDIR)/$(*F).d2" $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o -# echo -n "$(*D)/" > $(DEPDIR)/$(*F).d -# cat "$(DEPDIR)/$(*F).d2" >> "$(DEPDIR)/$(*F).d" -# rm -f "$(DEPDIR)/$(*F).d2" +# mkdir -p $(*D)/$(DEPDIR) +# $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o +# echo -n "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d +# cat "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d" +# rm -f "$(*D)/$(DEPDIR)/$(*F).d2" # #-include $(DEPDIR)/*.d diff --git a/Makefile.irix b/Makefile.irix deleted file mode 100644 index 1cd508ec04b4..000000000000 --- a/Makefile.irix +++ /dev/null @@ -1,21 +0,0 @@ -# $Header$ - -CC = CC -CFLAGS = -O2 -Olimit 9000 -mips2 -#CFLAGS = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -# Remove -DHAVE_NO_BOOL if your compiler has a builtin bool type -DEFINES = -DUNIX -DHAVE_NO_BOOL -DCOMPRESSED_SOUND_FILE -LDFLAGS := -INCLUDES:= `sdl-config --cflags` -I./ -I./sound -CPPFLAGS= $(DEFINES) $(INCLUDES) - -# Add -lmad for -DCOMPRESSED_SOUND_FILE -LIBS = `sdl-config --libs` -lmad -lm - -OBJS = sdl.o - -include Makefile.common - -dist: - rm -f $(ZIPFILE) - zip -q $(ZIPFILE) $(DISTFILES) diff --git a/Makefile.mingw b/Makefile.mingw deleted file mode 100644 index 5c56fa5d57c6..000000000000 --- a/Makefile.mingw +++ /dev/null @@ -1,45 +0,0 @@ -# Where is scummvm will be installed -SCUMMVMPATH=C:/scummvm -SRC=. -VPATH=$(SRC) - -### Modify these paths -SDL_CFLAGS=-I$(SRC)/sdl/include -SDL_LIBS=-L$(SRC)/sdl/lib -lSDLmain -lSDL - -# If MAD (MPEG Audio Decoder) header and library isn't installed remove -lmad and -DCOMPRESSED_SOUND_FILE -CC = g++ -CFLAGS = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -DEFINES = -DCOMPRESSED_SOUND_FILE -LDFLAGS :=-mwindows -mconsole -INCLUDES:= $(SDL_CFLAGS) -I./ -I./sound -CPPFLAGS= $(DEFINES) $(INCLUDES) -LIBS = -lmingw32 -lwinmm -lmad $(SDL_LIBS) -EXEEXT :=.exe - -# Uncomment this for SDL normal output -OBJS = sdl.o scummvmico.o -# Or uncomment this for SDL with OpenGL output -#OBJS = sdl_gl.o scummvmico.o -#LIBS += -lopengl32 - -include Makefile.common - -scummvmico.o: scummvm.ico - windres scummvm.rc scummvmico.o - - -# Some additional targets -install: scummvm$(EXEEXT) - mkdir -p $(SCUMMVMPATH) - strip scummvm$(EXEEXT) -o $(SCUMMVMPATH)/scummvm$(EXEEXT) - -dist: install - cp copying.txt $(SCUMMVMPATH) - cp readme.txt $(SCUMMVMPATH) - cp whatsnew.txt $(SCUMMVMPATH) - cp SDL/README-SDL.txt $(SCUMMVMPATH) - cp SDL/lib/SDL.dll $(SCUMMVMPATH) - u2d $(SCUMMVMPATH)/*.txt - -.PHONY: install dist diff --git a/Makefile.qtopia b/Makefile.qtopia deleted file mode 100644 index e33cf8451f88..000000000000 --- a/Makefile.qtopia +++ /dev/null @@ -1,20 +0,0 @@ -# $Header$ - -CC = arm-linux-g++ -CFLAGS = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -DEFINES = -DUNIX -DCOMPRESSED_SOUND_FILE -DBYPASS_COPY_PROT -DQTOPIA -DSCUMM_NEED_ALIGNMENT -LDFLAGS := -INCLUDES:= `/opt/Qtopia/sharp/bin/sdl-config --cflags` -I./ -I./sound -CPPFLAGS= $(DEFINES) $(INCLUDES) - -# Add -lmad for -DCOMPRESSED_SOUND_FILE -LIBS = `/opt/Qtopia/sharp/bin/sdl-config --libs` -lmad -#-lncurses - -OBJS = sdl.o - -include Makefile.common - -dist: - rm -f $(ZIPFILE) - zip -q $(ZIPFILE) $(DISTFILES) diff --git a/whatsnew.txt b/NEWS similarity index 100% rename from whatsnew.txt rename to NEWS diff --git a/readme.txt b/README similarity index 100% rename from readme.txt rename to README diff --git a/dc/.cvsignore b/backends/dc/.cvsignore similarity index 100% rename from dc/.cvsignore rename to backends/dc/.cvsignore diff --git a/dc/Makefile b/backends/dc/Makefile similarity index 100% rename from dc/Makefile rename to backends/dc/Makefile diff --git a/dc/README b/backends/dc/README similarity index 100% rename from dc/README rename to backends/dc/README diff --git a/dc/audio.cpp b/backends/dc/audio.cpp similarity index 100% rename from dc/audio.cpp rename to backends/dc/audio.cpp diff --git a/dc/dc.h b/backends/dc/dc.h similarity index 100% rename from dc/dc.h rename to backends/dc/dc.h diff --git a/dc/dcmain.cpp b/backends/dc/dcmain.cpp similarity index 100% rename from dc/dcmain.cpp rename to backends/dc/dcmain.cpp diff --git a/dc/display.cpp b/backends/dc/display.cpp similarity index 100% rename from dc/display.cpp rename to backends/dc/display.cpp diff --git a/dc/icon.cpp b/backends/dc/icon.cpp similarity index 100% rename from dc/icon.cpp rename to backends/dc/icon.cpp diff --git a/dc/icon.h b/backends/dc/icon.h similarity index 100% rename from dc/icon.h rename to backends/dc/icon.h diff --git a/dc/input.cpp b/backends/dc/input.cpp similarity index 100% rename from dc/input.cpp rename to backends/dc/input.cpp diff --git a/dc/label.cpp b/backends/dc/label.cpp similarity index 100% rename from dc/label.cpp rename to backends/dc/label.cpp diff --git a/dc/label.h b/backends/dc/label.h similarity index 100% rename from dc/label.h rename to backends/dc/label.h diff --git a/dc/portdefs.h b/backends/dc/portdefs.h similarity index 100% rename from dc/portdefs.h rename to backends/dc/portdefs.h diff --git a/dc/selector.cpp b/backends/dc/selector.cpp similarity index 100% rename from dc/selector.cpp rename to backends/dc/selector.cpp diff --git a/dc/vmsave.cpp b/backends/dc/vmsave.cpp similarity index 100% rename from dc/vmsave.cpp rename to backends/dc/vmsave.cpp diff --git a/mac/Carbon.r b/backends/mac/Carbon.r similarity index 100% rename from mac/Carbon.r rename to backends/mac/Carbon.r diff --git a/mac/CarbonPort-ReadMe.txt b/backends/mac/CarbonPort-ReadMe.txt similarity index 100% rename from mac/CarbonPort-ReadMe.txt rename to backends/mac/CarbonPort-ReadMe.txt diff --git a/mac/mac.cpp b/backends/mac/mac.cpp similarity index 100% rename from mac/mac.cpp rename to backends/mac/mac.cpp diff --git a/mac/macos.h b/backends/mac/macos.h old mode 100755 new mode 100644 similarity index 100% rename from mac/macos.h rename to backends/mac/macos.h diff --git a/backends/mac/scummvm.icns b/backends/mac/scummvm.icns new file mode 100644 index 000000000000..5f5e10d73231 Binary files /dev/null and b/backends/mac/scummvm.icns differ diff --git a/mac/scummvm.mcp b/backends/mac/scummvm.mcp similarity index 89% rename from mac/scummvm.mcp rename to backends/mac/scummvm.mcp index a0c11c764292..41a29050f428 100644 Binary files a/mac/scummvm.mcp and b/backends/mac/scummvm.mcp differ diff --git a/morphos/Makefile b/backends/morphos/Makefile similarity index 74% rename from morphos/Makefile rename to backends/morphos/Makefile index abd5a5c99416..00fd3992d151 100644 --- a/morphos/Makefile +++ b/backends/morphos/Makefile @@ -14,15 +14,14 @@ INCS = scumm.h scummsys.h stdafx.h GUIOBJS = widget.o dialog.o newgui.o ListWidget.o ScrollBarWidget.o -SCUMMOBJS = actor.o akos.o boxes.o bundle.o costume.o debug.o debugrl.o gfx.o \ - object.o saveload.o script.o scummvm.o sound.o string.o sys.o vars.o verbs.o \ - script_v1.o script_v2.o gui.o imuse.o insane.o resource.o resource_v3.o resource_v4.o - SIMONOBJS = midi.o simon.o simondebug.o simonitems.o simonres.o simonsys.o simonverb.o simonvga.o -OBJS = config-file.o engine.o gameDetector.o fmopl.o mixer.o mididrv.o util.o main.o \ +OBJS = actor.o akos.o boxes.o config-file.o costume.o gfx.o object.o resource.o \ + saveload.o script.o scummvm.o sound.o string.o sys.o verbs.o \ morphos.o morphos_scaler.o morphos_sound.o morphos_start.o morphos_timer.o \ - $(GUIOBJS) $(SCUMMOBJS) $(SIMONOBJS) + script_v1.o script_v2.o debug.o gui.o imuse.o fmopl.o mixer.o mididrv.o \ + debugrl.o vars.o insane.o gameDetector.o resource_v3.o resource_v4.o \ + util.o main.o bundle.o $(GUIOBJS) $(SIMONOBJS) DISTFILES=$(OBJS:.o=.cpp) Makefile scumm.h scummsys.h stdafx.h stdafx.cpp \ windows.cpp debugrl.h whatsnew.txt readme.txt copying.txt \ diff --git a/morphos/MorphOS.readme b/backends/morphos/MorphOS.readme similarity index 100% rename from morphos/MorphOS.readme rename to backends/morphos/MorphOS.readme diff --git a/morphos/morphos.cpp b/backends/morphos/morphos.cpp similarity index 100% rename from morphos/morphos.cpp rename to backends/morphos/morphos.cpp diff --git a/morphos/morphos.h b/backends/morphos/morphos.h similarity index 100% rename from morphos/morphos.h rename to backends/morphos/morphos.h diff --git a/morphos/morphos_scaler.cpp b/backends/morphos/morphos_scaler.cpp similarity index 100% rename from morphos/morphos_scaler.cpp rename to backends/morphos/morphos_scaler.cpp diff --git a/morphos/morphos_scaler.h b/backends/morphos/morphos_scaler.h similarity index 100% rename from morphos/morphos_scaler.h rename to backends/morphos/morphos_scaler.h diff --git a/morphos/morphos_sound.cpp b/backends/morphos/morphos_sound.cpp similarity index 100% rename from morphos/morphos_sound.cpp rename to backends/morphos/morphos_sound.cpp diff --git a/morphos/morphos_start.cpp b/backends/morphos/morphos_start.cpp similarity index 100% rename from morphos/morphos_start.cpp rename to backends/morphos/morphos_start.cpp diff --git a/morphos/morphos_timer.cpp b/backends/morphos/morphos_timer.cpp similarity index 100% rename from morphos/morphos_timer.cpp rename to backends/morphos/morphos_timer.cpp diff --git a/morphos/morphos_timer.h b/backends/morphos/morphos_timer.h similarity index 100% rename from morphos/morphos_timer.h rename to backends/morphos/morphos_timer.h diff --git a/fb2opengl.h b/backends/sdl/fb2opengl.h similarity index 100% rename from fb2opengl.h rename to backends/sdl/fb2opengl.h diff --git a/sdl.cpp b/backends/sdl/sdl.cpp similarity index 100% rename from sdl.cpp rename to backends/sdl/sdl.cpp diff --git a/sdl_gl.cpp b/backends/sdl/sdl_gl.cpp similarity index 100% rename from sdl_gl.cpp rename to backends/sdl/sdl_gl.cpp diff --git a/wince/MenuTitle.bmp b/backends/wince/MenuTitle.bmp old mode 100755 new mode 100644 similarity index 78% rename from wince/MenuTitle.bmp rename to backends/wince/MenuTitle.bmp index bcd8c68d14fd..34faf3fbb218 Binary files a/wince/MenuTitle.bmp and b/backends/wince/MenuTitle.bmp differ diff --git a/wince/PocketSCUMM.rc b/backends/wince/PocketSCUMM.rc similarity index 100% rename from wince/PocketSCUMM.rc rename to backends/wince/PocketSCUMM.rc diff --git a/wince/PocketSCUMM.vcc b/backends/wince/PocketSCUMM.vcc old mode 100755 new mode 100644 similarity index 100% rename from wince/PocketSCUMM.vcc rename to backends/wince/PocketSCUMM.vcc diff --git a/wince/PocketSCUMM.vcp b/backends/wince/PocketSCUMM.vcp similarity index 100% rename from wince/PocketSCUMM.vcp rename to backends/wince/PocketSCUMM.vcp diff --git a/wince/PocketSCUMM.vcw b/backends/wince/PocketSCUMM.vcw old mode 100755 new mode 100644 similarity index 100% rename from wince/PocketSCUMM.vcw rename to backends/wince/PocketSCUMM.vcw diff --git a/wince/bitmaps.cpp b/backends/wince/bitmaps.cpp old mode 100755 new mode 100644 similarity index 100% rename from wince/bitmaps.cpp rename to backends/wince/bitmaps.cpp diff --git a/wince/findgame.cpp b/backends/wince/findgame.cpp similarity index 100% rename from wince/findgame.cpp rename to backends/wince/findgame.cpp diff --git a/wince/gapi_keys.cpp b/backends/wince/gapi_keys.cpp similarity index 100% rename from wince/gapi_keys.cpp rename to backends/wince/gapi_keys.cpp diff --git a/gapi_keys.h b/backends/wince/gapi_keys.h similarity index 100% rename from gapi_keys.h rename to backends/wince/gapi_keys.h diff --git a/wince/missing/assert.h b/backends/wince/missing/assert.h similarity index 100% rename from wince/missing/assert.h rename to backends/wince/missing/assert.h diff --git a/wince/missing/conio.h b/backends/wince/missing/conio.h similarity index 100% rename from wince/missing/conio.h rename to backends/wince/missing/conio.h diff --git a/wince/missing/dir.h b/backends/wince/missing/dir.h similarity index 100% rename from wince/missing/dir.h rename to backends/wince/missing/dir.h diff --git a/wince/missing/direct.h b/backends/wince/missing/direct.h similarity index 100% rename from wince/missing/direct.h rename to backends/wince/missing/direct.h diff --git a/wince/missing/dirent.h b/backends/wince/missing/dirent.h similarity index 100% rename from wince/missing/dirent.h rename to backends/wince/missing/dirent.h diff --git a/wince/missing/errno.h b/backends/wince/missing/errno.h similarity index 100% rename from wince/missing/errno.h rename to backends/wince/missing/errno.h diff --git a/wince/missing/fcntl.h b/backends/wince/missing/fcntl.h similarity index 100% rename from wince/missing/fcntl.h rename to backends/wince/missing/fcntl.h diff --git a/wince/missing/io.h b/backends/wince/missing/io.h similarity index 100% rename from wince/missing/io.h rename to backends/wince/missing/io.h diff --git a/wince/missing/missing.cpp b/backends/wince/missing/missing.cpp similarity index 100% rename from wince/missing/missing.cpp rename to backends/wince/missing/missing.cpp diff --git a/wince/missing/signal.h b/backends/wince/missing/signal.h similarity index 100% rename from wince/missing/signal.h rename to backends/wince/missing/signal.h diff --git a/wince/missing/sys/stat.h b/backends/wince/missing/sys/stat.h similarity index 100% rename from wince/missing/sys/stat.h rename to backends/wince/missing/sys/stat.h diff --git a/wince/missing/sys/time.h b/backends/wince/missing/sys/time.h similarity index 100% rename from wince/missing/sys/time.h rename to backends/wince/missing/sys/time.h diff --git a/wince/missing/sys/types.h b/backends/wince/missing/sys/types.h similarity index 100% rename from wince/missing/sys/types.h rename to backends/wince/missing/sys/types.h diff --git a/wince/missing/time.h b/backends/wince/missing/time.h similarity index 100% rename from wince/missing/time.h rename to backends/wince/missing/time.h diff --git a/wince/missing/unistd.h b/backends/wince/missing/unistd.h similarity index 100% rename from wince/missing/unistd.h rename to backends/wince/missing/unistd.h diff --git a/wince/newres.h b/backends/wince/newres.h similarity index 100% rename from wince/newres.h rename to backends/wince/newres.h diff --git a/wince/pocketpc.cpp b/backends/wince/pocketpc.cpp similarity index 100% rename from wince/pocketpc.cpp rename to backends/wince/pocketpc.cpp diff --git a/wince/pocketscumm.ico b/backends/wince/pocketscumm.ico similarity index 100% rename from wince/pocketscumm.ico rename to backends/wince/pocketscumm.ico diff --git a/wince/resource.h b/backends/wince/resource.h similarity index 100% rename from wince/resource.h rename to backends/wince/resource.h diff --git a/wince/screen.cpp b/backends/wince/screen.cpp similarity index 100% rename from wince/screen.cpp rename to backends/wince/screen.cpp diff --git a/wince/screen.h b/backends/wince/screen.h similarity index 100% rename from wince/screen.h rename to backends/wince/screen.h diff --git a/x11.cpp b/backends/x11/x11.cpp similarity index 100% rename from x11.cpp rename to backends/x11/x11.cpp diff --git a/config-file.cpp b/common/config-file.cpp similarity index 100% rename from config-file.cpp rename to common/config-file.cpp diff --git a/config-file.h b/common/config-file.h similarity index 100% rename from config-file.h rename to common/config-file.h diff --git a/gameDetector.cpp b/common/gameDetector.cpp similarity index 99% rename from gameDetector.cpp rename to common/gameDetector.cpp index 9152c4b9c560..421dfd782ea1 100644 --- a/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -22,11 +22,11 @@ #include "stdafx.h" -#include "scumm.h" +#include "scumm/scumm.h" #include "sound/mididrv.h" -#include "sound/imuse.h" -#include "gameDetector.h" -#include "config-file.h" +#include "scumm/imuse.h" +#include "common/gameDetector.h" +#include "common/config-file.h" #define CHECK_OPTION() if ((current_option != NULL) || (*s != '\0')) goto ShowHelpAndExit diff --git a/gameDetector.h b/common/gameDetector.h similarity index 100% rename from gameDetector.h rename to common/gameDetector.h diff --git a/main.cpp b/common/main.cpp similarity index 100% rename from main.cpp rename to common/main.cpp diff --git a/scummsys.h b/common/scummsys.h similarity index 100% rename from scummsys.h rename to common/scummsys.h diff --git a/stdafx.cpp b/common/stdafx.cpp similarity index 100% rename from stdafx.cpp rename to common/stdafx.cpp diff --git a/stdafx.h b/common/stdafx.h similarity index 98% rename from stdafx.h rename to common/stdafx.h index a3daba0b545e..de4f0156ce97 100644 --- a/stdafx.h +++ b/common/stdafx.h @@ -2,6 +2,9 @@ * $Id$ * * $Log$ + * Revision 1.1 2002/08/21 16:07:23 fingolfin + * Initial revision + * * Revision 1.18 2002/07/08 13:33:10 fingolfin * two more small QNX fixes * diff --git a/system.h b/common/system.h similarity index 100% rename from system.h rename to common/system.h diff --git a/timer.cpp b/common/timer.cpp similarity index 100% rename from timer.cpp rename to common/timer.cpp diff --git a/timer.h b/common/timer.h similarity index 100% rename from timer.h rename to common/timer.h diff --git a/util.cpp b/common/util.cpp similarity index 100% rename from util.cpp rename to common/util.cpp diff --git a/util.h b/common/util.h similarity index 100% rename from util.h rename to common/util.h diff --git a/debian/.cvsignore b/debian/.cvsignore deleted file mode 100644 index 2ac039bcbd49..000000000000 --- a/debian/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -changelog -files -scummvm -scummvm.postinst.debhelper -scummvm.prerm.debhelper -scummvm.substvars diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index 5394ccae2648..000000000000 --- a/debian/README.Debian +++ /dev/null @@ -1,9 +0,0 @@ -scummvm for Debian ------------------- - - There is no documentation for the configuration file. For now you can use: - scummvm -w -p[path] [options] game - it will write a config file in ~/.scummvmrc and from then on you can just - run 'scummvm game' and it will remember your options - - -- Bastien Nocera , Friday 10 May 2002 diff --git a/debian/changelog.cvs b/debian/changelog.cvs deleted file mode 100644 index 7cdd91fadaab..000000000000 --- a/debian/changelog.cvs +++ /dev/null @@ -1,8 +0,0 @@ -scummvm (@VERSION@-1) unstable; urgency=low - - * This is a CVS snapshot, don't file bugs on the Debian BTS if you use - this package. Instead use the Sourceforge bug tracker: - http://sourceforge.net/tracker/?group_id=37116 - - -- Bastien Nocera Fri, 5 Apr 2002 16:37:09 +0100 - diff --git a/debian/changelog.debian b/debian/changelog.debian deleted file mode 100644 index e46253fe48bd..000000000000 --- a/debian/changelog.debian +++ /dev/null @@ -1,22 +0,0 @@ -scummvm (0.2.0) unstable; urgency=low - - * Release of ScummVM 0.2.0 - - -- James Brown Tue, 14 May 2002 18:16:02 +0800 - -scummvm (0.1.0b-2) unstable; urgency=low - - * Moved the scummvm main bin under /usr/lib, the wrapper script under - /usr/games - * Fixed bug in the script that made it not work if the path was relative - - -- Bastien Nocera Wed, 10 Apr 2002 19:27:05 +0100 - -scummvm (0.1.0b-1) unstable; urgency=low - - * Initial Release. - * Packaged made under the influence of beer at GUAD3C in Sevilla ! Arriba ! - Ole ! - - -- Bastien Nocera Fri, 5 Apr 2002 16:37:09 +0100 - diff --git a/debian/changelog.debian_official b/debian/changelog.debian_official deleted file mode 100644 index 55fc446a3872..000000000000 --- a/debian/changelog.debian_official +++ /dev/null @@ -1,23 +0,0 @@ -scummvm (0.2.0) unstable; urgency=low - - * New upstream version (Closes: #143281) - * Killed the wrapper script, see upstream changelog - - -- Bastien Nocera Wed, 15 May 2002 03:27:11 +0100 - -scummvm (0.1.0b-2) unstable; urgency=low - - * Moved the scummvm main bin under /usr/lib, the wrapper script under - /usr/games - * Fixed bug in the script that made it not work if the path was relative - - -- Bastien Nocera Wed, 10 Apr 2002 19:27:05 +0100 - -scummvm (0.1.0b-1) unstable; urgency=low - - * Initial Release. - * Packaged made under the influence of beer at GUAD3C in Sevilla ! Arriba ! - Ole ! - - -- Bastien Nocera Fri, 5 Apr 2002 16:37:09 +0100 - diff --git a/debian/control b/debian/control deleted file mode 100644 index f2ffa3a00327..000000000000 --- a/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: scummvm -Section: contrib/games -Priority: optional -Maintainer: Bastien Nocera -Build-Depends: debhelper (>> 3.0.0), libsdl1.2-dev, libreadline4-dev, libncurses5-dev -Standards-Version: 3.5.2 - -Package: scummvm -Architecture: any -Depends: ${shlibs:Depends} -Description: Engine to run some LucasArts adventure games - The "Script Creation Utility for Maniac Mansion Virtual Machine" (scummvm for - short) is an engine used to run a lot of LucasArts adventure games. - . - You will also need the data files from the game to be able to play it. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index ef0334474298..000000000000 --- a/debian/copyright +++ /dev/null @@ -1,16 +0,0 @@ -This package was debianized by Bastien Nocera on -Fri, 5 Apr 2002 16:37:09 +0100. - -It was downloaded from http://prdownloads.sourceforge.net/scummvm/ - -Upstream Author(s): ScummVM team - -Copyright: - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/debian/prepare b/debian/prepare deleted file mode 100755 index 0698be11846a..000000000000 --- a/debian/prepare +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -if [ ! -e debian/rules ] ; then - echo "Run from the top-level source directory as debian/prepare" - exit 1 -fi - -if [ -d CVS/ ] && [ $1 != "--nocvs" ]; then - TODATE=`date +%Y%m%d` - NEXT_VERSION=`grep SCUMMVM_VERSION scumm.h | sed 's,\#define\ SCUMMVM_VERSION\ \",,gi' | sed 's,\ devel\",,gi'` - cat debian/changelog.cvs | sed s/@VERSION@/$NEXT_VERSION.cvs$TODATE/g \ - > debian/changelog.tmp && mv debian/changelog.tmp debian/changelog - exit 0 -else - if [ x$USER = xhadess ]; then - cp debian/changelog.debian_official debian/changelog - else - cp debian/changelog.debian debian/changelog - fi -fi diff --git a/debian/rules b/debian/rules deleted file mode 100755 index b05473cabc7e..000000000000 --- a/debian/rules +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/make -f - -export DH_COMPAT=3 - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -build: - dh_testdir - $(MAKE) - -clean: - dh_testdir - dh_testroot - -$(MAKE) clean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - install -m0777 scummvm $(CURDIR)/debian/scummvm/usr/games/scummvm - install -m0644 scummvm.6 \ - $(CURDIR)/debian/scummvm/usr/share/man/man6 - -binary-arch: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_installmanpages scummvm.6 - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-arch -.PHONY: build clean binary-arch binary install diff --git a/debian/scummvm.dirs b/debian/scummvm.dirs deleted file mode 100644 index 818b207667db..000000000000 --- a/debian/scummvm.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/games -usr/lib/scummvm -usr/share/man/man6 diff --git a/debian/scummvm.docs b/debian/scummvm.docs deleted file mode 100644 index 6e88c596f455..000000000000 --- a/debian/scummvm.docs +++ /dev/null @@ -1,2 +0,0 @@ -readme.txt -whatsnew.txt diff --git a/gui/dialog.cpp b/gui/dialog.cpp index ecc444b71d91..71b55f8c802f 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -28,7 +28,7 @@ #include "ListWidget.h" #include "config-file.h" #include "sound/mididrv.h" -#include "sound/imuse.h" +#include "scumm/imuse.h" /* * TODO list @@ -407,11 +407,29 @@ AboutDialog::AboutDialog(NewGui *gui) } PauseDialog::PauseDialog(NewGui *gui) - : Dialog (gui, 50, 80, 220, 16) + : Dialog (gui, 60, 20, 100, 100) { addResText(4, 4, 220, 16, 10); } +void PauseDialog::draw() +{ + if (_screenBuf) { + _gui->blitFrom(_screenBuf, _x, _y, _w, _h); + } else { + _gui->fillRect(_x, _y, _w, _h, _gui->_bgcolor); + _gui->box(_x, _y, _w, _h); + } + _gui->addDirtyRect(_x, _y, _w, _h); + + _gui->frameRect(10 + _x, 15 + _y, 100, 100, _gui->_color); + for (int y = 0; y < 16; ++y) + for (int x = 0; x < 16; ++x) + _gui->fillRect(10 + _x + x*5, 15 + _y + y*5, 5, 5, y*16 + x); + + +} + SoundDialog::SoundDialog(NewGui *gui) : Dialog (gui, 30, 20, 260, 110) { diff --git a/gui/dialog.h b/gui/dialog.h index 0e9b46222ab8..55fd464a420b 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -116,6 +116,8 @@ class PauseDialog : public Dialog { public: PauseDialog(NewGui *gui); + virtual void draw(); + virtual void handleMouseDown(int x, int y, int button, int clickCount) { close(); } virtual void handleKeyDown(char key, int modifiers) diff --git a/gui.cpp b/gui/gui.cpp similarity index 99% rename from gui.cpp rename to gui/gui.cpp index d80c6948c8a2..270641ae17ac 100644 --- a/gui.cpp +++ b/gui/gui.cpp @@ -22,7 +22,7 @@ #include "stdafx.h" #include "scumm.h" #include "sound/mididrv.h" -#include "sound/imuse.h" +#include "scumm/imuse.h" #include "gui.h" #include "guimaps.h" #include "config-file.h" diff --git a/gui.h b/gui/gui.h similarity index 100% rename from gui.h rename to gui/gui.h diff --git a/guimaps.h b/gui/guimaps.h similarity index 100% rename from guimaps.h rename to gui/guimaps.h diff --git a/newgui.cpp b/gui/newgui.cpp similarity index 100% rename from newgui.cpp rename to gui/newgui.cpp diff --git a/newgui.h b/gui/newgui.h similarity index 100% rename from newgui.h rename to gui/newgui.h diff --git a/mac/ScummVM_Mac_Prefix.h b/mac/ScummVM_Mac_Prefix.h deleted file mode 100644 index ef3f2e6a4bb4..000000000000 --- a/mac/ScummVM_Mac_Prefix.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifdef __cplusplus - #include -#else - #include -#endif - -#define MACOS_CARBON diff --git a/actor.cpp b/scumm/actor.cpp similarity index 100% rename from actor.cpp rename to scumm/actor.cpp diff --git a/actor.h b/scumm/actor.h similarity index 100% rename from actor.h rename to scumm/actor.h diff --git a/akos.cpp b/scumm/akos.cpp similarity index 100% rename from akos.cpp rename to scumm/akos.cpp diff --git a/akos.h b/scumm/akos.h similarity index 100% rename from akos.h rename to scumm/akos.h diff --git a/boxes.cpp b/scumm/boxes.cpp similarity index 100% rename from boxes.cpp rename to scumm/boxes.cpp diff --git a/boxes.h b/scumm/boxes.h similarity index 100% rename from boxes.h rename to scumm/boxes.h diff --git a/bundle.cpp b/scumm/bundle.cpp similarity index 100% rename from bundle.cpp rename to scumm/bundle.cpp diff --git a/bundle.h b/scumm/bundle.h similarity index 100% rename from bundle.h rename to scumm/bundle.h diff --git a/costume.cpp b/scumm/costume.cpp similarity index 100% rename from costume.cpp rename to scumm/costume.cpp diff --git a/costume.h b/scumm/costume.h similarity index 100% rename from costume.h rename to scumm/costume.h diff --git a/debug.cpp b/scumm/debug.cpp similarity index 100% rename from debug.cpp rename to scumm/debug.cpp diff --git a/debug.h b/scumm/debug.h similarity index 100% rename from debug.h rename to scumm/debug.h diff --git a/debugrl.cpp b/scumm/debugrl.cpp similarity index 100% rename from debugrl.cpp rename to scumm/debugrl.cpp diff --git a/debugrl.h b/scumm/debugrl.h similarity index 100% rename from debugrl.h rename to scumm/debugrl.h diff --git a/engine.cpp b/scumm/engine.cpp similarity index 100% rename from engine.cpp rename to scumm/engine.cpp diff --git a/engine.h b/scumm/engine.h similarity index 100% rename from engine.h rename to scumm/engine.h diff --git a/gfx.cpp b/scumm/gfx.cpp similarity index 99% rename from gfx.cpp rename to scumm/gfx.cpp index e16b7662b5c6..5b4e43f1cf42 100644 --- a/gfx.cpp +++ b/scumm/gfx.cpp @@ -22,8 +22,8 @@ #include "stdafx.h" #include "scumm.h" #include "actor.h" -#include "gui.h" -#include "newgui.h" +#include "gui/gui.h" +#include "gui/newgui.h" #include "resource.h" void Scumm::getGraphicsPerformance() diff --git a/gfx.h b/scumm/gfx.h similarity index 100% rename from gfx.h rename to scumm/gfx.h diff --git a/sound/imuse.cpp b/scumm/imuse.cpp similarity index 99% rename from sound/imuse.cpp rename to scumm/imuse.cpp index a0df85aa70dc..93f2f9959700 100644 --- a/sound/imuse.cpp +++ b/scumm/imuse.cpp @@ -316,7 +316,7 @@ class IMuseDriver { class IMuseInternal { friend struct Player; private: - IMuseDriver * _driver; + IMuseDriver * _driver; byte **_base_sounds; @@ -325,8 +325,7 @@ class IMuseInternal { private: - - bool _paused; + bool _paused; bool _active_volume_faders; bool _initialized; byte _volume_fader_counter; @@ -1930,9 +1929,6 @@ byte *Player::parse_midi(byte *s) case 93: /* chorus */ part->set_chorus(value); break; - case 123: /* unhold pedal */ - part->set_pedal(false); - break; default: warning("parse_midi: invalid control %d", control); } diff --git a/sound/imuse.h b/scumm/imuse.h similarity index 100% rename from sound/imuse.h rename to scumm/imuse.h diff --git a/insane.cpp b/scumm/insane.cpp similarity index 100% rename from insane.cpp rename to scumm/insane.cpp diff --git a/object.cpp b/scumm/object.cpp similarity index 100% rename from object.cpp rename to scumm/object.cpp diff --git a/object.h b/scumm/object.h similarity index 100% rename from object.h rename to scumm/object.h diff --git a/resource.cpp b/scumm/resource.cpp similarity index 100% rename from resource.cpp rename to scumm/resource.cpp diff --git a/resource.h b/scumm/resource.h similarity index 100% rename from resource.h rename to scumm/resource.h diff --git a/v3/resource_v3.cpp b/scumm/resource_v3.cpp similarity index 100% rename from v3/resource_v3.cpp rename to scumm/resource_v3.cpp diff --git a/v4/resource_v4.cpp b/scumm/resource_v4.cpp similarity index 100% rename from v4/resource_v4.cpp rename to scumm/resource_v4.cpp diff --git a/saveload.cpp b/scumm/saveload.cpp similarity index 99% rename from saveload.cpp rename to scumm/saveload.cpp index 16200bee9a9d..0f3011721b02 100644 --- a/saveload.cpp +++ b/scumm/saveload.cpp @@ -23,7 +23,7 @@ #include "stdafx.h" #include "scumm.h" #include "sound/mididrv.h" -#include "sound/imuse.h" +#include "scumm/imuse.h" #include "actor.h" #include "config-file.h" #include "resource.h" diff --git a/saveload.h b/scumm/saveload.h similarity index 100% rename from saveload.h rename to scumm/saveload.h diff --git a/scaler.cpp b/scumm/scaler.cpp similarity index 100% rename from scaler.cpp rename to scumm/scaler.cpp diff --git a/scaler.h b/scumm/scaler.h similarity index 100% rename from scaler.h rename to scumm/scaler.h diff --git a/script.cpp b/scumm/script.cpp similarity index 100% rename from script.cpp rename to scumm/script.cpp diff --git a/script_v1.cpp b/scumm/script_v1.cpp similarity index 100% rename from script_v1.cpp rename to scumm/script_v1.cpp diff --git a/script_v2.cpp b/scumm/script_v2.cpp similarity index 99% rename from script_v2.cpp rename to scumm/script_v2.cpp index e402495943c0..5f85f746c20a 100644 --- a/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -27,7 +27,7 @@ #include "smush.h" #include "sound/mididrv.h" -#include "sound/imuse.h" +#include "scumm/imuse.h" void Scumm::setupOpcodes2() { diff --git a/scumm.h b/scumm/scumm.h similarity index 100% rename from scumm.h rename to scumm/scumm.h diff --git a/scummvm.cpp b/scumm/scummvm.cpp similarity index 99% rename from scummvm.cpp rename to scumm/scummvm.cpp index 2471d268aad6..845a8fb4d3d3 100644 --- a/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -24,12 +24,12 @@ #include "scumm.h" #include "sound/mixer.h" #include "sound/mididrv.h" -#include "sound/imuse.h" +#include "scumm/imuse.h" #include "actor.h" #include "debug.h" #include "gameDetector.h" -#include "gui.h" -#include "newgui.h" +#include "gui/gui.h" +#include "gui/newgui.h" #include "object.h" #include "resource.h" #include "string.h" diff --git a/smush.h b/scumm/smush.h similarity index 100% rename from smush.h rename to scumm/smush.h diff --git a/sound.h b/scumm/sound.h similarity index 100% rename from sound.h rename to scumm/sound.h diff --git a/string.cpp b/scumm/string.cpp similarity index 100% rename from string.cpp rename to scumm/string.cpp diff --git a/sys.cpp b/scumm/sys.cpp similarity index 100% rename from sys.cpp rename to scumm/sys.cpp diff --git a/vars.cpp b/scumm/vars.cpp similarity index 100% rename from vars.cpp rename to scumm/vars.cpp diff --git a/verbs.cpp b/scumm/verbs.cpp similarity index 100% rename from verbs.cpp rename to scumm/verbs.cpp diff --git a/simon/simondebug.cpp b/simon/debug.cpp similarity index 99% rename from simon/simondebug.cpp rename to simon/debug.cpp index ed7febe739bd..6b1902c6b7ca 100644 --- a/simon/simondebug.cpp +++ b/simon/debug.cpp @@ -21,8 +21,8 @@ // Simon debug functions #include "stdafx.h" -#include "simon.h" -#include "simonintern.h" +#include "simon/simon.h" +#include "simon/intern.h" #ifdef SIMONDEBUG #define SIMON2 diff --git a/simon/simonintern.h b/simon/intern.h similarity index 100% rename from simon/simonintern.h rename to simon/intern.h diff --git a/simon/simonitems.cpp b/simon/items.cpp similarity index 99% rename from simon/simonitems.cpp rename to simon/items.cpp index 39e95d3a70c5..4baeae0ec866 100644 --- a/simon/simonitems.cpp +++ b/simon/items.cpp @@ -21,8 +21,8 @@ // Item script opcodes for Simon1/Simon2 #include "stdafx.h" -#include "simon.h" -#include "simonintern.h" +#include "simon/simon.h" +#include "simon/intern.h" #ifdef _WIN32_WCE diff --git a/simon/midi.cpp b/simon/midi.cpp index b9cf3ac867de..a55ab0f3ec04 100644 --- a/simon/midi.cpp +++ b/simon/midi.cpp @@ -22,10 +22,10 @@ #include "stdafx.h" #include "scummsys.h" -#include "system.h" -#include "../sound/mididrv.h" -#include "../sound/mixer.h" -#include "simon.h" +#include "common/system.h" +#include "sound/mididrv.h" +#include "sound/mixer.h" +#include "simon/simon.h" void MidiPlayer::read_from_file(void *dst, uint size) { diff --git a/simon/simonres.cpp b/simon/res.cpp similarity index 99% rename from simon/simonres.cpp rename to simon/res.cpp index 7b36d1f770c8..8a059486bd01 100644 --- a/simon/simonres.cpp +++ b/simon/res.cpp @@ -21,8 +21,8 @@ // Resource file routines for Simon1/Simon2 #include "stdafx.h" -#include "simon.h" -#include "simonintern.h" +#include "simon/simon.h" +#include "simon/intern.h" // Script opcodes to load into memory static const char *const opcode_arg_table_simon1win[256] = { diff --git a/simon/simon.cpp b/simon/simon.cpp index a60234d7a290..d3b8a8391f52 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -20,9 +20,9 @@ */ #include "stdafx.h" -#include "simon.h" -#include "simonintern.h" -#include "gameDetector.h" +#include "simon/simon.h" +#include "simon/intern.h" +#include "common/gameDetector.h" #include #include diff --git a/simon/simonsys.cpp b/simon/sys.cpp similarity index 98% rename from simon/simonsys.cpp rename to simon/sys.cpp index 0bef2567641c..5086ba954731 100644 --- a/simon/simonsys.cpp +++ b/simon/sys.cpp @@ -20,7 +20,7 @@ */ #include "stdafx.h" -#include "simon.h" +#include "simon/simon.h" uint fileReadByte(FILE *in) { diff --git a/simon/simonverb.cpp b/simon/verb.cpp similarity index 99% rename from simon/simonverb.cpp rename to simon/verb.cpp index 662237cd68c6..a81627bff266 100644 --- a/simon/simonverb.cpp +++ b/simon/verb.cpp @@ -21,8 +21,8 @@ // Verb and hitarea handling #include "stdafx.h" -#include "simon.h" -#include "simonintern.h" +#include "simon/simon.h" +#include "simon/intern.h" void SimonState::defocusHitarea() { diff --git a/simon/simonvga.cpp b/simon/vga.cpp similarity index 99% rename from simon/simonvga.cpp rename to simon/vga.cpp index 1c56d5295d8c..39d56d0c85c9 100644 --- a/simon/simonvga.cpp +++ b/simon/vga.cpp @@ -21,8 +21,8 @@ // Video script opcodes for Simon1/Simon2 #include "stdafx.h" -#include "simon.h" -#include "simonintern.h" +#include "simon/simon.h" +#include "simon/intern.h" typedef void (SimonState::*VgaOpcodeProc) (); static const uint16 vc_get_out_of_code = 0; diff --git a/sound.cpp b/sound/sound.cpp similarity index 99% rename from sound.cpp rename to sound/sound.cpp index 2f947a7148da..69bdfc8143fc 100644 --- a/sound.cpp +++ b/sound/sound.cpp @@ -21,10 +21,10 @@ */ #include "stdafx.h" -#include "scumm.h" +#include "scumm/scumm.h" #include "sound/mididrv.h" -#include "sound/imuse.h" -#include "actor.h" +#include "scumm/imuse.h" +#include "scumm/actor.h" #include "config-file.h" #include "util.h" diff --git a/sound/sound.h b/sound/sound.h new file mode 100644 index 000000000000..4d2a554d6cfa --- /dev/null +++ b/sound/sound.h @@ -0,0 +1,136 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2002 The ScummVM project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Header$ + */ + +#ifndef SOUND_H +#define SOUND_H + +#include "scummsys.h" +#include "sound/mixer.h" + +class Scumm; + +class Sound { + +private: + +enum { + SOUND_HEADER_SIZE = 26, + SOUND_HEADER_BIG_SIZE = 26 + 8, + +}; + + int16 _soundQuePos, _soundQue[0x100]; + byte _soundQue2Pos, _soundQue2[10]; + bool _soundsPaused2; + bool _soundVolumePreset; + + int32 _numberBundleMusic; + int32 _currentSampleBundleMusic; + int32 _numberSamplesBundleMusic; + int32 _offsetSampleBundleMusic; + int32 _offsetBufBundleMusic; + byte * _musicBundleBufFinal; + byte * _musicBundleBufOutput; + bool _pauseBundleMusic; + + + int _talkChannel; /* Mixer channel actor is talking on */ + void *_sfxFile; + uint32 _talk_sound_a, _talk_sound_b; + byte _talk_sound_mode; + bool _mouthSyncMode; + bool _endOfMouthSync; + uint16 _mouthSyncTimes[52]; + uint _curSoundPos; + + MP3OffsetTable *offset_table; // SO3 MP3 compressed audio + int num_sound_effects; // SO3 MP3 compressed audio +#ifdef COMPRESSED_SOUND_FILE + + #define CACHE_TRACKS 10 + + /* used for mp3 CD music */ + + int _cached_tracks[CACHE_TRACKS]; + struct mad_header _mad_header[CACHE_TRACKS]; + long _mp3_size[CACHE_TRACKS]; + FILE *_mp3_tracks[CACHE_TRACKS]; + int _mp3_index; + bool _mp3_cd_playing; +#endif + + Scumm * _scumm; + +public: + +#ifdef COMPRESSED_SOUND_FILE + + int _current_cache; + +#endif + + bool _soundsPaused; + int16 _sound_volume_master, _sound_volume_music, _sound_volume_sfx; + byte _sfxMode; + + Sound(Scumm *parent); + ~Sound(); + void addSoundToQueue(int sound); + void addSoundToQueue2(int sound); + void processSoundQues(); + void playSound(int sound); + void processSfxQueues(); + int startTalkSound(uint32 offset, uint32 b, int mode); + void stopTalkSound(); + bool isMouthSyncOff(uint pos); + int isSoundRunning(int sound); + bool isSoundInQueue(int sound); + void stopSound(int a); + void stopAllSounds(); + void clearSoundQue(); + void soundKludge(int16 * list); + void talkSound(uint32 a, uint32 b, int mode); + void setupSound(); + void pauseSounds(bool pause); + int startSfxSound(void *file, int file_size); + void * openSfxFile(); + void stopSfxSound(); + bool isSfxFinished(); + uint32 decode12BitsSample(byte * src, byte ** dst, uint32 size); + void playBundleMusic(int32 song); + void pauseBundleMusic(bool state); + void bundleMusicHandler(Scumm * scumm); + void stopBundleMusic(); + void playBundleSound(char *sound); + int playSfxSound(void *sound, uint32 size, uint rate, bool isUnsigned); + int playSfxSound_MP3(void *sound, uint32 size); + +#ifdef COMPRESSED_SOUND_FILE + int getCachedTrack(int track); + int playMP3CDTrack(int track, int num_loops, int start, int delay); + int stopMP3CD(); + int pollMP3CD(); + int updateMP3CD(); +#endif + +}; + +#endif +