You can subscribe to this list here.
2004 |
Jan
(17) |
Feb
(38) |
Mar
(24) |
Apr
(18) |
May
(75) |
Jun
(2) |
Jul
|
Aug
|
Sep
(21) |
Oct
(3) |
Nov
(19) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(15) |
Jul
(2) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
(8) |
Feb
|
Mar
|
Apr
(6) |
May
(73) |
Jun
(57) |
Jul
(12) |
Aug
(68) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
From: S?bastien G. <kx...@us...> - 2004-03-29 22:20:41
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3551/src Modified Files: Makefile.am Makefile.in Removed Files: SDL.cpp TestEmu.cpp debugger.cpp debugger.h Log Message: GTK+ frontend draft added. --- TestEmu.cpp DELETED --- Index: Makefile.am =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Makefile.am 1 Feb 2004 15:02:39 -0000 1.15 --- Makefile.am 29 Mar 2004 22:08:39 -0000 1.16 *************** *** 1,48 **** ! SUBDIRS = gb @VBA_EXTRA@ ! EXTRA_SUBDIRS = i386 prof ! DIST_SUBDIRS = gb $(EXTRA_SUBDIRS) ! bin_PROGRAMS = VisualBoyAdvance TestEmu ! ! VisualBoyAdvance_SOURCES = \ ! SDL.cpp 2xSaI.cpp pixel.cpp motionblur.cpp admame.cpp \ ! simple2x.cpp bilinear.cpp interframe.cpp unzip.cpp \ ! Cheats.cpp EEprom.cpp Flash.cpp GBA.cpp Gfx.cpp Globals.cpp \ ! Mode0.cpp Mode1.cpp Mode2.cpp Mode3.cpp Mode4.cpp Mode5.cpp \ ! Sound.cpp Sram.cpp Util.cpp armdis.cpp bios.cpp elf.cpp \ ! expr.cpp expr-lex.cpp exprNode.cpp debugger.cpp remote.cpp \ ! AutoBuild.h Cheats.h EEprom.h Flash.h GBA.h GBAinline.h \ ! Gfx.h Globals.h NLS.h Port.h Sound.h Sram.h System.h Util.h armdis.h \ ! bios.h debugger.h elf.h expr.cpp.h exprNode.h unzip.h arm-new.h \ ! thumb.h RTC.cpp RTC.h agbprint.cpp agbprint.h scanline.cpp \ ! getopt.c getopt1.c getopt.h memgzio.h memgzio.c \ ! hq2x.cpp hq2x.h lq2x.h Text.cpp Text.h interp.h ! VisualBoyAdvance_LDADD = gb/libgb.a @VBA_PROF@ @VBA_MMX@ ! VisualBoyAdvance_LDFLAGS = `sdl-config --libs` ! TestEmu_SOURCES = \ ! TestEmu.cpp 2xSaI.cpp pixel.cpp motionblur.cpp admame.cpp \ ! simple2x.cpp unzip.cpp \ ! Cheats.cpp EEprom.cpp Flash.cpp GBA.cpp Gfx.cpp Globals.cpp \ ! Mode0.cpp Mode1.cpp Mode2.cpp Mode3.cpp Mode4.cpp Mode5.cpp \ ! Sound.cpp Sram.cpp Util.cpp armdis.cpp bios.cpp elf.cpp \ ! expr.cpp expr-lex.cpp exprNode.cpp debugger.cpp remote.cpp \ ! AutoBuild.h Cheats.h EEprom.h Flash.h GBA.h GBAinline.h \ ! Gfx.h Globals.h NLS.h Port.h Sound.h Sram.h System.h Util.h armdis.h \ ! bios.h debugger.h elf.h expr.cpp.h exprNode.h unzip.h arm-new.h \ ! thumb.h RTC.cpp RTC.h agbprint.cpp agbprint.h scanline.cpp \ ! memgzio.c memgzio.h hq2x.cpp hq2x.h lq2x.h Text.cpp Text.h \ ! interp.h ! TestEmu_LDADD = gb/libgb.a @VBA_PROF@ @VBA_MMX@ ! TestEmu_LDFLAGS = EXTRA_DIST = \ ! win32 VisualBoyAdvance.cfg \ ! expr.l expr.y \ ! CheatSearch.cpp CheatSearch.h dist-hook: - rm -rf `find $(distdir)/i386 -name CVS` rm -rf `find $(distdir)/win32 -name CVS` - rm -rf `find $(distdir)/prof -name CVS` --- 1,18 ---- ! CORE_SUBDIRS = gb ! EXTRA_SUBDIRS = i386 prof sdl gtk ! SUBDIRS = $(CORE_SUBDIRS) @VBA_EXTRA@ ! DIST_SUBDIRS = $(CORE_SUBDIRS) $(EXTRA_SUBDIRS) EXTRA_DIST = \ ! win32 \ ! VisualBoyAdvance.cfg \ ! expr.l \ ! expr.y \ ! CheatSearch.cpp \ ! CheatSearch.h dist-hook: rm -rf `find $(distdir)/win32 -name CVS` --- debugger.cpp DELETED --- --- SDL.cpp DELETED --- Index: Makefile.in =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Makefile.in,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile.in 1 Feb 2004 15:02:39 -0000 1.17 --- Makefile.in 29 Mar 2004 22:08:39 -0000 1.18 *************** *** 1,3 **** ! # Makefile.in generated by automake 1.7.8 from Makefile.am. # @configure_input@ --- 1,3 ---- ! # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ *************** *** 61,76 **** --- 61,88 ---- EGREP = @EGREP@ EXEEXT = @EXEEXT@ + GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ + GMSGFMT = @GMSGFMT@ + GTKMM_CFLAGS = @GTKMM_CFLAGS@ + GTKMM_LIBS = @GTKMM_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ + LIBICONV = @LIBICONV@ + LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ + MKINSTALLDIRS = @MKINSTALLDIRS@ + MSGFMT = @MSGFMT@ + MSGMERGE = @MSGMERGE@ NASM = @NASM@ OBJEXT = @OBJEXT@ *************** *** 82,85 **** --- 94,99 ---- PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ + POSUB = @POSUB@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ *************** *** 89,100 **** SHELL = @SHELL@ STRIP = @STRIP@ VBA_EXTRA = @VBA_EXTRA@ ! VBA_MMX = @VBA_MMX@ ! VBA_PROF = @VBA_PROF@ VERSION = @VERSION@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ - ac_ct_NASM = @ac_ct_NASM@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ --- 103,114 ---- SHELL = @SHELL@ STRIP = @STRIP@ + USE_NLS = @USE_NLS@ VBA_EXTRA = @VBA_EXTRA@ ! VBA_LIBS = @VBA_LIBS@ VERSION = @VERSION@ + XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ *************** *** 137,185 **** target_os = @target_os@ target_vendor = @target_vendor@ ! SUBDIRS = gb @VBA_EXTRA@ ! EXTRA_SUBDIRS = i386 prof ! DIST_SUBDIRS = gb $(EXTRA_SUBDIRS) ! bin_PROGRAMS = VisualBoyAdvance TestEmu ! ! VisualBoyAdvance_SOURCES = \ ! SDL.cpp 2xSaI.cpp pixel.cpp motionblur.cpp admame.cpp \ ! simple2x.cpp bilinear.cpp interframe.cpp unzip.cpp \ ! Cheats.cpp EEprom.cpp Flash.cpp GBA.cpp Gfx.cpp Globals.cpp \ ! Mode0.cpp Mode1.cpp Mode2.cpp Mode3.cpp Mode4.cpp Mode5.cpp \ ! Sound.cpp Sram.cpp Util.cpp armdis.cpp bios.cpp elf.cpp \ ! expr.cpp expr-lex.cpp exprNode.cpp debugger.cpp remote.cpp \ ! AutoBuild.h Cheats.h EEprom.h Flash.h GBA.h GBAinline.h \ ! Gfx.h Globals.h NLS.h Port.h Sound.h Sram.h System.h Util.h armdis.h \ ! bios.h debugger.h elf.h expr.cpp.h exprNode.h unzip.h arm-new.h \ ! thumb.h RTC.cpp RTC.h agbprint.cpp agbprint.h scanline.cpp \ ! getopt.c getopt1.c getopt.h memgzio.h memgzio.c \ ! hq2x.cpp hq2x.h lq2x.h Text.cpp Text.h interp.h ! ! ! VisualBoyAdvance_LDADD = gb/libgb.a @VBA_PROF@ @VBA_MMX@ ! VisualBoyAdvance_LDFLAGS = `sdl-config --libs` ! TestEmu_SOURCES = \ ! TestEmu.cpp 2xSaI.cpp pixel.cpp motionblur.cpp admame.cpp \ ! simple2x.cpp unzip.cpp \ ! Cheats.cpp EEprom.cpp Flash.cpp GBA.cpp Gfx.cpp Globals.cpp \ ! Mode0.cpp Mode1.cpp Mode2.cpp Mode3.cpp Mode4.cpp Mode5.cpp \ ! Sound.cpp Sram.cpp Util.cpp armdis.cpp bios.cpp elf.cpp \ ! expr.cpp expr-lex.cpp exprNode.cpp debugger.cpp remote.cpp \ ! AutoBuild.h Cheats.h EEprom.h Flash.h GBA.h GBAinline.h \ ! Gfx.h Globals.h NLS.h Port.h Sound.h Sram.h System.h Util.h armdis.h \ ! bios.h debugger.h elf.h expr.cpp.h exprNode.h unzip.h arm-new.h \ ! thumb.h RTC.cpp RTC.h agbprint.cpp agbprint.h scanline.cpp \ ! memgzio.c memgzio.h hq2x.cpp hq2x.h lq2x.h Text.cpp Text.h \ ! interp.h ! TestEmu_LDADD = gb/libgb.a @VBA_PROF@ @VBA_MMX@ ! TestEmu_LDFLAGS = EXTRA_DIST = \ ! win32 VisualBoyAdvance.cfg \ ! expr.l expr.y \ ! CheatSearch.cpp CheatSearch.h subdir = src --- 151,169 ---- target_os = @target_os@ target_vendor = @target_vendor@ ! CORE_SUBDIRS = gb ! EXTRA_SUBDIRS = i386 prof sdl gtk + SUBDIRS = $(CORE_SUBDIRS) @VBA_EXTRA@ ! DIST_SUBDIRS = $(CORE_SUBDIRS) $(EXTRA_SUBDIRS) EXTRA_DIST = \ ! win32 \ ! VisualBoyAdvance.cfg \ ! expr.l \ ! expr.y \ ! CheatSearch.cpp \ ! CheatSearch.h subdir = src *************** *** 187,256 **** mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = ! bin_PROGRAMS = VisualBoyAdvance$(EXEEXT) TestEmu$(EXEEXT) ! PROGRAMS = $(bin_PROGRAMS) ! ! am_TestEmu_OBJECTS = TestEmu.$(OBJEXT) 2xSaI.$(OBJEXT) pixel.$(OBJEXT) \ ! motionblur.$(OBJEXT) admame.$(OBJEXT) simple2x.$(OBJEXT) \ ! unzip.$(OBJEXT) Cheats.$(OBJEXT) EEprom.$(OBJEXT) \ ! Flash.$(OBJEXT) GBA.$(OBJEXT) Gfx.$(OBJEXT) Globals.$(OBJEXT) \ ! Mode0.$(OBJEXT) Mode1.$(OBJEXT) Mode2.$(OBJEXT) Mode3.$(OBJEXT) \ ! Mode4.$(OBJEXT) Mode5.$(OBJEXT) Sound.$(OBJEXT) Sram.$(OBJEXT) \ ! Util.$(OBJEXT) armdis.$(OBJEXT) bios.$(OBJEXT) elf.$(OBJEXT) \ ! expr.$(OBJEXT) expr-lex.$(OBJEXT) exprNode.$(OBJEXT) \ ! debugger.$(OBJEXT) remote.$(OBJEXT) RTC.$(OBJEXT) \ ! agbprint.$(OBJEXT) scanline.$(OBJEXT) memgzio.$(OBJEXT) \ ! hq2x.$(OBJEXT) Text.$(OBJEXT) ! TestEmu_OBJECTS = $(am_TestEmu_OBJECTS) ! TestEmu_DEPENDENCIES = gb/libgb.a ! am_VisualBoyAdvance_OBJECTS = SDL.$(OBJEXT) 2xSaI.$(OBJEXT) \ ! pixel.$(OBJEXT) motionblur.$(OBJEXT) admame.$(OBJEXT) \ ! simple2x.$(OBJEXT) bilinear.$(OBJEXT) interframe.$(OBJEXT) \ ! unzip.$(OBJEXT) Cheats.$(OBJEXT) EEprom.$(OBJEXT) \ ! Flash.$(OBJEXT) GBA.$(OBJEXT) Gfx.$(OBJEXT) Globals.$(OBJEXT) \ ! Mode0.$(OBJEXT) Mode1.$(OBJEXT) Mode2.$(OBJEXT) Mode3.$(OBJEXT) \ ! Mode4.$(OBJEXT) Mode5.$(OBJEXT) Sound.$(OBJEXT) Sram.$(OBJEXT) \ ! Util.$(OBJEXT) armdis.$(OBJEXT) bios.$(OBJEXT) elf.$(OBJEXT) \ ! expr.$(OBJEXT) expr-lex.$(OBJEXT) exprNode.$(OBJEXT) \ ! debugger.$(OBJEXT) remote.$(OBJEXT) RTC.$(OBJEXT) \ ! agbprint.$(OBJEXT) scanline.$(OBJEXT) getopt.$(OBJEXT) \ ! getopt1.$(OBJEXT) memgzio.$(OBJEXT) hq2x.$(OBJEXT) \ ! Text.$(OBJEXT) ! VisualBoyAdvance_OBJECTS = $(am_VisualBoyAdvance_OBJECTS) ! VisualBoyAdvance_DEPENDENCIES = gb/libgb.a ! ! DEFAULT_INCLUDES = -I. -I$(srcdir) ! depcomp = $(SHELL) $(top_srcdir)/depcomp ! am__depfiles_maybe = depfiles ! @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/2xSaI.Po ./$(DEPDIR)/Cheats.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/EEprom.Po ./$(DEPDIR)/Flash.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/GBA.Po ./$(DEPDIR)/Gfx.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/Globals.Po ./$(DEPDIR)/Mode0.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/Mode1.Po ./$(DEPDIR)/Mode2.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/Mode3.Po ./$(DEPDIR)/Mode4.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/Mode5.Po ./$(DEPDIR)/RTC.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/SDL.Po ./$(DEPDIR)/Sound.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/Sram.Po ./$(DEPDIR)/TestEmu.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/Text.Po ./$(DEPDIR)/Util.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/admame.Po ./$(DEPDIR)/agbprint.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/armdis.Po ./$(DEPDIR)/bilinear.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/bios.Po ./$(DEPDIR)/debugger.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/elf.Po ./$(DEPDIR)/expr-lex.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/expr.Po ./$(DEPDIR)/exprNode.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/getopt.Po ./$(DEPDIR)/getopt1.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/hq2x.Po ./$(DEPDIR)/interframe.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/memgzio.Po ./$(DEPDIR)/motionblur.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/pixel.Po ./$(DEPDIR)/remote.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/scanline.Po ./$(DEPDIR)/simple2x.Po \ ! @AMDEP_TRUE@ ./$(DEPDIR)/unzip.Po ! COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ! $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ! CCLD = $(CC) ! LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ! CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ! $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) ! CXXLD = $(CXX) ! CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ ! -o $@ ! DIST_SOURCES = $(TestEmu_SOURCES) $(VisualBoyAdvance_SOURCES) RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ --- 171,175 ---- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = ! DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ *************** *** 260,269 **** check-recursive installcheck-recursive DIST_COMMON = $(srcdir)/Makefile.in Makefile.am - SOURCES = $(TestEmu_SOURCES) $(VisualBoyAdvance_SOURCES) - all: all-recursive .SUFFIXES: - .SUFFIXES: .c .cpp .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ --- 179,185 ---- *************** *** 271,396 **** Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) - binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) - install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ - else :; fi; \ - done - - uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ - done - - clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) - TestEmu$(EXEEXT): $(TestEmu_OBJECTS) $(TestEmu_DEPENDENCIES) - @rm -f TestEmu$(EXEEXT) - $(CXXLINK) $(TestEmu_LDFLAGS) $(TestEmu_OBJECTS) $(TestEmu_LDADD) $(LIBS) - VisualBoyAdvance$(EXEEXT): $(VisualBoyAdvance_OBJECTS) $(VisualBoyAdvance_DEPENDENCIES) - @rm -f VisualBoyAdvance$(EXEEXT) - $(CXXLINK) $(VisualBoyAdvance_LDFLAGS) $(VisualBoyAdvance_OBJECTS) $(VisualBoyAdvance_LDADD) $(LIBS) - - mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core - - distclean-compile: - -rm -f *.tab.c - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/2xSaI.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cheats.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EEprom.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Flash.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GBA.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Gfx.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Globals.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mode0.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mode1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mode2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mode3.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mode4.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Mode5.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RTC.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SDL.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sound.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sram.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TestEmu.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Text.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Util.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/admame.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agbprint.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/armdis.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bilinear.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bios.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr-lex.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exprNode.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hq2x.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interframe.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memgzio.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motionblur.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixel.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanline.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple2x.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzip.Po@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ - @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ - @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - @am__fastdepCC_TRUE@ fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< - - .c.obj: - @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ - @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ - @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - @am__fastdepCC_TRUE@ fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` - - .cpp.o: - @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ - @am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ - @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ - @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - @am__fastdepCXX_TRUE@ fi - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< - - .cpp.obj: - @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ - @am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ - @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ - @am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - @am__fastdepCXX_TRUE@ fi - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` uninstall-info-am: --- 187,190 ---- *************** *** 568,575 **** check-am: all-am check: check-recursive ! all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-recursive --- 362,368 ---- check-am: all-am check: check-recursive ! all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive *************** *** 584,588 **** install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install --- 377,381 ---- install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install *************** *** 599,609 **** clean: clean-recursive ! clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive - -rm -rf ./$(DEPDIR) -rm -f Makefile ! distclean-am: clean-am distclean-compile distclean-generic \ ! distclean-tags dvi: dvi-recursive --- 392,400 ---- clean: clean-recursive ! clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile ! distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive *************** *** 617,621 **** install-data-am: ! install-exec-am: install-binPROGRAMS install-info: install-info-recursive --- 408,412 ---- install-data-am: ! install-exec-am: install-info: install-info-recursive *************** *** 626,630 **** maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic --- 417,420 ---- *************** *** 632,636 **** mostlyclean: mostlyclean-recursive ! mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive --- 422,426 ---- mostlyclean: mostlyclean-recursive ! mostlyclean-am: mostlyclean-generic pdf: pdf-recursive *************** *** 642,671 **** ps-am: ! uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ ! clean-binPROGRAMS clean-generic clean-recursive ctags \ ! ctags-recursive distclean distclean-compile distclean-generic \ ! distclean-recursive distclean-tags distdir dvi dvi-am \ ! dvi-recursive info info-am info-recursive install install-am \ ! install-binPROGRAMS install-data install-data-am \ ! install-data-recursive install-exec install-exec-am \ ! install-exec-recursive install-info install-info-am \ ! install-info-recursive install-man install-recursive \ ! install-strip installcheck installcheck-am installdirs \ ! installdirs-am installdirs-recursive maintainer-clean \ ! maintainer-clean-generic maintainer-clean-recursive mostlyclean \ ! mostlyclean-compile mostlyclean-generic mostlyclean-recursive \ ! pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ ! tags-recursive uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-info-am uninstall-info-recursive uninstall-recursive dist-hook: - rm -rf `find $(distdir)/i386 -name CVS` rm -rf `find $(distdir)/win32 -name CVS` - rm -rf `find $(distdir)/prof -name CVS` # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- 432,457 ---- ps-am: ! uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ ! clean-generic clean-recursive ctags ctags-recursive distclean \ ! distclean-generic distclean-recursive distclean-tags distdir \ ! dvi dvi-am dvi-recursive info info-am info-recursive install \ ! install-am install-data install-data-am install-data-recursive \ ! install-exec install-exec-am install-exec-recursive \ ! install-info install-info-am install-info-recursive install-man \ ! install-recursive install-strip installcheck installcheck-am \ ! installdirs installdirs-am installdirs-recursive \ ! maintainer-clean maintainer-clean-generic \ ! maintainer-clean-recursive mostlyclean mostlyclean-generic \ ! mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ ! ps-recursive tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-info-recursive uninstall-recursive dist-hook: rm -rf `find $(distdir)/win32 -name CVS` # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- debugger.h DELETED --- |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:20:41
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3551/src/gb Modified Files: Makefile.am Makefile.in Log Message: GTK+ frontend draft added. Index: Makefile.in =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.in 1 Feb 2004 15:02:39 -0000 1.7 --- Makefile.in 29 Mar 2004 22:08:39 -0000 1.8 *************** *** 1,3 **** ! # Makefile.in generated by automake 1.7.8 from Makefile.am. # @configure_input@ --- 1,3 ---- ! # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ *************** *** 61,76 **** --- 61,88 ---- EGREP = @EGREP@ EXEEXT = @EXEEXT@ + GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ + GMSGFMT = @GMSGFMT@ + GTKMM_CFLAGS = @GTKMM_CFLAGS@ + GTKMM_LIBS = @GTKMM_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ + LIBICONV = @LIBICONV@ + LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ + MKINSTALLDIRS = @MKINSTALLDIRS@ + MSGFMT = @MSGFMT@ + MSGMERGE = @MSGMERGE@ NASM = @NASM@ OBJEXT = @OBJEXT@ *************** *** 82,85 **** --- 94,99 ---- PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ + POSUB = @POSUB@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ *************** *** 89,100 **** SHELL = @SHELL@ STRIP = @STRIP@ VBA_EXTRA = @VBA_EXTRA@ ! VBA_MMX = @VBA_MMX@ ! VBA_PROF = @VBA_PROF@ VERSION = @VERSION@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ - ac_ct_NASM = @ac_ct_NASM@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ --- 103,114 ---- SHELL = @SHELL@ STRIP = @STRIP@ + USE_NLS = @USE_NLS@ VBA_EXTRA = @VBA_EXTRA@ ! VBA_LIBS = @VBA_LIBS@ VERSION = @VERSION@ + XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ *************** *** 140,147 **** libgb_a_SOURCES = \ ! GB.cpp gbCheats.cpp gbGfx.cpp gbGlobals.cpp gbMemory.cpp \ ! gbPrinter.cpp gbSGB.cpp gbSound.cpp GB.h gbCheats.h gbCodes.h \ ! gbCodesCB.h gbGlobals.h gbMemory.h gbPrinter.h gbSGB.h gbSound.h \ ! gbDis.cpp subdir = src/gb --- 154,175 ---- libgb_a_SOURCES = \ ! gbCheats.cpp \ ! gbCheats.h \ ! gbCodesCB.h \ ! gbCodes.h \ ! GB.cpp \ ! GB.h \ ! gbDis.cpp \ ! gbGfx.cpp \ ! gbGlobals.cpp \ ! gbGlobals.h \ ! gbMemory.cpp \ ! gbMemory.h \ ! gbPrinter.cpp \ ! gbPrinter.h \ ! gbSGB.cpp \ ! gbSGB.h \ ! gbSound.cpp \ ! gbSound.h subdir = src/gb *************** *** 153,159 **** libgb_a_AR = $(AR) cru libgb_a_LIBADD = ! am_libgb_a_OBJECTS = GB.$(OBJEXT) gbCheats.$(OBJEXT) gbGfx.$(OBJEXT) \ ! gbGlobals.$(OBJEXT) gbMemory.$(OBJEXT) gbPrinter.$(OBJEXT) \ ! gbSGB.$(OBJEXT) gbSound.$(OBJEXT) gbDis.$(OBJEXT) libgb_a_OBJECTS = $(am_libgb_a_OBJECTS) --- 181,187 ---- libgb_a_AR = $(AR) cru libgb_a_LIBADD = ! am_libgb_a_OBJECTS = gbCheats.$(OBJEXT) GB.$(OBJEXT) gbDis.$(OBJEXT) \ ! gbGfx.$(OBJEXT) gbGlobals.$(OBJEXT) gbMemory.$(OBJEXT) \ ! gbPrinter.$(OBJEXT) gbSGB.$(OBJEXT) gbSound.$(OBJEXT) libgb_a_OBJECTS = $(am_libgb_a_OBJECTS) *************** *** 338,342 **** install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install --- 366,370 ---- install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install Index: Makefile.am =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/gb/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 23 Apr 2003 12:29:53 -0000 1.2 --- Makefile.am 29 Mar 2004 22:08:39 -0000 1.3 *************** *** 2,9 **** libgb_a_SOURCES = \ ! GB.cpp gbCheats.cpp gbGfx.cpp gbGlobals.cpp gbMemory.cpp \ ! gbPrinter.cpp gbSGB.cpp gbSound.cpp GB.h gbCheats.h gbCodes.h \ ! gbCodesCB.h gbGlobals.h gbMemory.h gbPrinter.h gbSGB.h gbSound.h \ ! gbDis.cpp ! ! --- 2,21 ---- libgb_a_SOURCES = \ ! gbCheats.cpp \ ! gbCheats.h \ ! gbCodesCB.h \ ! gbCodes.h \ ! GB.cpp \ ! GB.h \ ! gbDis.cpp \ ! gbGfx.cpp \ ! gbGlobals.cpp \ ! gbGlobals.h \ ! gbMemory.cpp \ ! gbMemory.h \ ! gbPrinter.cpp \ ! gbPrinter.h \ ! gbSGB.cpp \ ! gbSGB.h \ ! gbSound.cpp \ ! gbSound.h |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:20:32
|
Update of /cvsroot/vba/VisualBoyAdvance/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3551/win32 Modified Files: Makefile.am Makefile.in gba_sdl.dsp gba_sdl.vcproj Log Message: GTK+ frontend draft added. Index: Makefile.in =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.in 1 Feb 2004 15:02:39 -0000 1.6 --- Makefile.in 29 Mar 2004 22:08:56 -0000 1.7 *************** *** 1,3 **** ! # Makefile.in generated by automake 1.7.8 from Makefile.am. # @configure_input@ --- 1,3 ---- ! # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ *************** *** 61,76 **** --- 61,88 ---- EGREP = @EGREP@ EXEEXT = @EXEEXT@ + GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ + GMSGFMT = @GMSGFMT@ + GTKMM_CFLAGS = @GTKMM_CFLAGS@ + GTKMM_LIBS = @GTKMM_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ + LIBICONV = @LIBICONV@ + LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ + MKINSTALLDIRS = @MKINSTALLDIRS@ + MSGFMT = @MSGFMT@ + MSGMERGE = @MSGMERGE@ NASM = @NASM@ OBJEXT = @OBJEXT@ *************** *** 82,85 **** --- 94,99 ---- PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ + POSUB = @POSUB@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ *************** *** 89,100 **** SHELL = @SHELL@ STRIP = @STRIP@ VBA_EXTRA = @VBA_EXTRA@ ! VBA_MMX = @VBA_MMX@ ! VBA_PROF = @VBA_PROF@ VERSION = @VERSION@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ - ac_ct_NASM = @ac_ct_NASM@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ --- 103,114 ---- SHELL = @SHELL@ STRIP = @STRIP@ + USE_NLS = @USE_NLS@ VBA_EXTRA = @VBA_EXTRA@ ! VBA_LIBS = @VBA_LIBS@ VERSION = @VERSION@ + XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ *************** *** 138,142 **** target_vendor = @target_vendor@ EXTRA_DIST = \ ! gba_sdl.dsp gba_sdl.dsw GBA.dsp GBA.dsw SDL-1.2.2 lib include subdir = win32 --- 152,166 ---- target_vendor = @target_vendor@ EXTRA_DIST = \ ! gba_sdl.dsp \ ! gba_sdl.dsw \ ! gba_sdl.sln \ ! gba_sdl.vcproj \ ! GBA.dsp \ ! GBA.dsw \ ! gba.sln \ ! GBA.vcproj \ ! SDL-1.2.2 \ ! lib \ ! include subdir = win32 *************** *** 212,216 **** install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install --- 236,240 ---- install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install *************** *** 280,286 **** dist-hook: ! rm -rf `find $(distdir)/SDL-1.2.2 -name CVS` ! rm -rf `find $(distdir)/lib -name CVS` ! rm -rf `find $(distdir)/include -name CVS` # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- 304,308 ---- dist-hook: ! rm -rf `find $(distdir) -name CVS` # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Index: Makefile.am =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 20 Oct 2002 13:03:12 -0000 1.1 --- Makefile.am 29 Mar 2004 22:08:41 -0000 1.2 *************** *** 1,7 **** EXTRA_DIST = \ ! gba_sdl.dsp gba_sdl.dsw GBA.dsp GBA.dsw SDL-1.2.2 lib include dist-hook: ! rm -rf `find $(distdir)/SDL-1.2.2 -name CVS` ! rm -rf `find $(distdir)/lib -name CVS` ! rm -rf `find $(distdir)/include -name CVS` --- 1,15 ---- EXTRA_DIST = \ ! gba_sdl.dsp \ ! gba_sdl.dsw \ ! gba_sdl.sln \ ! gba_sdl.vcproj \ ! GBA.dsp \ ! GBA.dsw \ ! gba.sln \ ! GBA.vcproj \ ! SDL-1.2.2 \ ! lib \ ! include dist-hook: ! rm -rf `find $(distdir) -name CVS` Index: gba_sdl.dsp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/gba_sdl.dsp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gba_sdl.dsp 5 Feb 2004 11:42:36 -0000 1.11 --- gba_sdl.dsp 29 Mar 2004 22:08:56 -0000 1.12 *************** *** 43,47 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "include/zlib" /I "include/png" /I "SDL-1.2.2/include" /D "NDEBUG" /D "FINAL_VERSION" /D "DEV_VERSION" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "BKPT_SUPPORT" /D "MMX" /D "SDL" /D "PROFILING" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" --- 43,47 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../src" /I "include/zlib" /I "include/png" /I "SDL-1.2.2/include" /D "NDEBUG" /D "FINAL_VERSION" /D "DEV_VERSION" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "BKPT_SUPPORT" /D "MMX" /D "SDL" /D "PROFILING" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" *************** *** 68,72 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "include/zlib" /I "include/png" /I "SDL-1.2.2/include" /D "_DEBUG" /D "DEV_VERSION" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "BKPT_SUPPORT" /D "MMX" /D "SDL" /D "PROFILING" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" --- 68,72 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "../src" /I "include/zlib" /I "include/png" /I "SDL-1.2.2/include" /D "_DEBUG" /D "DEV_VERSION" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "BKPT_SUPPORT" /D "MMX" /D "SDL" /D "PROFILING" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" *************** *** 266,270 **** # Begin Source File ! SOURCE=..\src\debugger.cpp # End Source File # Begin Source File --- 266,270 ---- # Begin Source File ! SOURCE=..\src\sdl\debugger.cpp # End Source File # Begin Source File *************** *** 298,302 **** # Begin Source File ! SOURCE=..\src\SDL.cpp # End Source File # Begin Source File --- 298,302 ---- # Begin Source File ! SOURCE=..\src\sdl\SDL.cpp # End Source File # Begin Source File Index: gba_sdl.vcproj =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/gba_sdl.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gba_sdl.vcproj 7 Feb 2004 15:07:18 -0000 1.2 --- gba_sdl.vcproj 29 Mar 2004 22:08:56 -0000 1.3 *************** *** 23,27 **** Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="include/zlib,include/png,SDL-1.2.2/include" PreprocessorDefinitions="_DEBUG,DEV_VERSION,WIN32,_CONSOLE,BKPT_SUPPORT,MMX,SDL,PROFILING" BasicRuntimeChecks="3" --- 23,27 ---- Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="../src,include/zlib,include/png,SDL-1.2.2/include" PreprocessorDefinitions="_DEBUG,DEV_VERSION,WIN32,_CONSOLE,BKPT_SUPPORT,MMX,SDL,PROFILING" BasicRuntimeChecks="3" *************** *** 81,85 **** Optimization="2" InlineFunctionExpansion="2" ! AdditionalIncludeDirectories="include/zlib,include/png,SDL-1.2.2/include" PreprocessorDefinitions="NDEBUG,FINAL_VERSION,DEV_VERSION,WIN32,_CONSOLE,BKPT_SUPPORT,MMX,SDL,PROFILING" StringPooling="TRUE" --- 81,85 ---- Optimization="2" InlineFunctionExpansion="2" ! AdditionalIncludeDirectories="../src,include/zlib,include/png,SDL-1.2.2/include" PreprocessorDefinitions="NDEBUG,FINAL_VERSION,DEV_VERSION,WIN32,_CONSOLE,BKPT_SUPPORT,MMX,SDL,PROFILING" StringPooling="TRUE" *************** *** 255,259 **** Filter=""> <File ! RelativePath="..\src\SDL.cpp"> </File> <File --- 255,259 ---- Filter=""> <File ! RelativePath="..\src\sdl\SDL.cpp"> </File> <File *************** *** 264,268 **** </File> <File ! RelativePath="..\src\debugger.cpp"> </File> <File --- 264,268 ---- </File> <File ! RelativePath="..\src\sdl\debugger.cpp"> </File> <File |
Update of /cvsroot/vba/VisualBoyAdvance/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3551/m4 Added Files: ChangeLog Makefile.am Makefile.in codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 Log Message: GTK+ frontend draft added. --- NEW FILE: gettext.m4 --- # gettext.m4 serial 28 (gettext-0.13) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper <dr...@cy...>, 1995-2000. dnl Bruno Haible <ha...@cl...>, 2000-2003. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Set USE_NLS. AM_NLS ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include <libintl.h> ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include <libintl.h> ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include <libintl.h> ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([bh_C_SIGNED])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl AC_REQUIRE([gt_TYPE_WCHAR_T])dnl AC_REQUIRE([gt_TYPE_WINT_T])dnl AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) AC_REQUIRE([gt_TYPE_INTMAX_T]) AC_REQUIRE([gt_PRINTF_POSIX]) AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_REQUIRE([gl_XSIZE])dnl AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ __fsetlocking]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) dnl Use the *_unlocked functions only if they are declared. dnl (because some of them were defined without being declared in Solaris dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built dnl on Solaris 2.5.1 to run on Solaris 2.6). dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) case $gt_cv_func_printf_posix in *yes) HAVE_POSIX_PRINTF=1 ;; *) HAVE_POSIX_PRINTF=0 ;; esac AC_SUBST([HAVE_POSIX_PRINTF]) if test "$ac_cv_func_asprintf" = yes; then HAVE_ASPRINTF=1 else HAVE_ASPRINTF=0 fi AC_SUBST([HAVE_ASPRINTF]) if test "$ac_cv_func_snprintf" = yes; then HAVE_SNPRINTF=1 else HAVE_SNPRINTF=0 fi AC_SUBST([HAVE_SNPRINTF]) if test "$ac_cv_func_wprintf" = yes; then HAVE_WPRINTF=1 else HAVE_WPRINTF=0 fi AC_SUBST([HAVE_WPRINTF]) AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then AM_LC_MESSAGES fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) dnl gt_CHECK_DECL(FUNC, INCLUDES) dnl Check whether a function is declared. AC_DEFUN([gt_CHECK_DECL], [ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, [AC_TRY_COMPILE([$2], [ #ifndef $1 char *p = (char *) $1; #endif ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) if test $ac_cv_have_decl_$1 = yes; then gt_value=1 else gt_value=0 fi AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) --- NEW FILE: xsize.m4 --- # xsize.m4 serial 2 dnl Copyright (C) 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_XSIZE], [ dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_CHECK_HEADERS(stdint.h) ]) --- NEW FILE: Makefile.am --- EXTRA_DIST = \ codeset.m4 \ gettext.m4 \ glibc21.m4 \ iconv.m4 \ intdiv0.m4 \ intmax.m4 \ inttypes_h.m4 \ inttypes.m4 \ inttypes-pri.m4 \ isc-posix.m4 \ lcmessage.m4 \ lib-ld.m4 \ lib-link.m4 \ lib-prefix.m4 \ longdouble.m4 \ longlong.m4 \ nls.m4 \ po.m4 \ printf-posix.m4 \ progtest.m4 \ signed.m4 \ size_max.m4 \ stdint_h.m4 \ uintmax_t.m4 \ ulonglong.m4 \ wchar_t.m4 \ wint_t.m4 \ xsize.m4 --- NEW FILE: longdouble.m4 --- # longdouble.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl Test whether the compiler supports the 'long double' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_LONGDOUBLE], [ AC_CACHE_CHECK([for long double], gt_cv_c_long_double, [if test "$GCC" = yes; then gt_cv_c_long_double=yes else AC_TRY_COMPILE([ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; ], , gt_cv_c_long_double=yes, gt_cv_c_long_double=no) fi]) if test $gt_cv_c_long_double = yes; then AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) fi ]) --- NEW FILE: iconv.m4 --- # iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include <stdlib.h> #include <iconv.h>], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include <stdlib.h> #include <iconv.h>], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include <stdlib.h> #include <iconv.h> extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) --- NEW FILE: ChangeLog --- 2004-03-29 gettextize <bug...@gn...> * codeset.m4: New file, from gettext-0.14.1. * gettext.m4: New file, from gettext-0.14.1. * glibc21.m4: New file, from gettext-0.14.1. * iconv.m4: New file, from gettext-0.14.1. * intdiv0.m4: New file, from gettext-0.14.1. * intmax.m4: New file, from gettext-0.14.1. * inttypes.m4: New file, from gettext-0.14.1. * inttypes_h.m4: New file, from gettext-0.14.1. * inttypes-pri.m4: New file, from gettext-0.14.1. * isc-posix.m4: New file, from gettext-0.14.1. * lcmessage.m4: New file, from gettext-0.14.1. * lib-ld.m4: New file, from gettext-0.14.1. * lib-link.m4: New file, from gettext-0.14.1. * lib-prefix.m4: New file, from gettext-0.14.1. * longdouble.m4: New file, from gettext-0.14.1. * longlong.m4: New file, from gettext-0.14.1. * nls.m4: New file, from gettext-0.14.1. * po.m4: New file, from gettext-0.14.1. * printf-posix.m4: New file, from gettext-0.14.1. * progtest.m4: New file, from gettext-0.14.1. * signed.m4: New file, from gettext-0.14.1. * size_max.m4: New file, from gettext-0.14.1. * stdint_h.m4: New file, from gettext-0.14.1. * uintmax_t.m4: New file, from gettext-0.14.1. * ulonglong.m4: New file, from gettext-0.14.1. * wchar_t.m4: New file, from gettext-0.14.1. * wint_t.m4: New file, from gettext-0.14.1. * xsize.m4: New file, from gettext-0.14.1. * Makefile.am: New file. --- NEW FILE: nls.m4 --- # nls.m4 serial 1 (gettext-0.12) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper <dr...@cy...>, 1995-2000. dnl Bruno Haible <ha...@cl...>, 2000-2003. AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) AC_DEFUN([AM_MKINSTALLDIRS], [ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but $(top_srcdir). dnl Try to locate it. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then case "$ac_aux_dir" in /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; esac fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) ]) --- NEW FILE: po.m4 --- # po.m4 serial 3 (gettext-0.14) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper <dr...@cy...>, 1995-2000. dnl Bruno Haible <ha...@cl...>, 2000-2003. dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AM_NLS])dnl dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU msgfmt. if test "$GMSGFMT" != ":"; then dnl If it is no GNU msgfmt we define it as : so that the dnl Makefiles still can work. if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` AC_MSG_RESULT( [found $GMSGFMT program is not GNU msgfmt; ignore it]) GMSGFMT=":" fi fi dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po fi AC_OUTPUT_COMMANDS([ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat <<EOT $* EOT } gt_echo='echo_func' fi fi # A sed script that extracts the value of VARIABLE from a Makefile. sed_x_variable=' # Test if the hold space is empty. x s/P/P/ x ta # Yes it was empty. Look if we have the expected variable definition. /^[ ]*VARIABLE[ ]*=/{ # Seen the first line of the variable definition. s/^[ ]*VARIABLE[ ]*=// ba } bd :a # Here we are processing a line from the variable definition. # Remove comment, more precisely replace it with a space. s/#.*$/ / # See if the line ends in a backslash. tb :b s/\\$// # Print the line, without the trailing backslash. p tc # There was no trailing backslash. The end of the variable definition is # reached. Clear the hold space. s/^.*$// x bd :c # A trailing backslash means that the variable definition continues in the # next line. Put a nonempty string into the hold space to indicate this. s/^.*$/P/ x :d ' changequote([,])dnl # Set POTFILES to the value of the Makefile variable POTFILES. sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`" POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` # Compute POTFILES_DEPS as # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) POTFILES_DEPS= for file in $POTFILES; do POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" done POMAKEFILEDEPS="" if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`" ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) # Compute PROPERTIESFILES # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) # Compute CLASSFILES # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) # Compute QMFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) # Compute MSGFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) # Compute RESOURCESDLLFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= PROPERTIESFILES= CLASSFILES= QMFILES= MSGFILES= RESOURCESDLLFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" QMFILES="$QMFILES $srcdirpre$lang.qm" frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" frobbedlang=`echo $lang | sed -e 's/_/-/g'` RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= JAVACATALOGS= QTCATALOGS= TCLCATALOGS= CSHARPCATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" QTCATALOGS="$QTCATALOGS $lang.qm" frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" frobbedlang=`echo $lang | sed -e 's/_/-/g'` CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" done fi sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" <<EOF $frobbedlang.msg: $lang.po @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } EOF done fi if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g'` cat >> "$ac_file.tmp" <<EOF $frobbedlang/\$(DOMAIN).resources.dll: $lang.po @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } EOF done fi if test -n "$POMAKEFILEDEPS"; then cat >> "$ac_file.tmp" <<EOF Makefile: $POMAKEFILEDEPS EOF fi mv "$ac_file.tmp" "$ac_file" ]) --- NEW FILE: longlong.m4 --- # longlong.m4 serial 4 dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_LONG_LONG if 'long long' works. AC_DEFUN([jm_AC_TYPE_LONG_LONG], [ AC_CACHE_CHECK([for long long], ac_cv_type_long_long, [AC_TRY_LINK([long long ll = 1LL; int i = 63;], [long long llmax = (long long) -1; return ll << i | ll >> i | llmax / ll | llmax % ll;], ac_cv_type_long_long=yes, ac_cv_type_long_long=no)]) if test $ac_cv_type_long_long = yes; then AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have the 'long long' type.]) fi ]) --- NEW FILE: intdiv0.m4 --- # intdiv0.m4 serial 1 (gettext-0.11.3) dnl Copyright (C) 2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([gt_INTDIV0], [ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], gt_cv_int_divbyzero_sigfpe, [ AC_TRY_RUN([ #include <stdlib.h> #include <signal.h> static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, [ # Guess based on the CPU. case "$host_cpu" in alpha* | i[34567]86 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac ]) ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, [Define if integer division by zero raises signal SIGFPE.]) ]) --- NEW FILE: codeset.m4 --- # codeset.m4 serial AM1 (gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include <langinfo.h>], [char* cs = nl_langinfo(CODESET);], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) fi ]) --- NEW FILE: intmax.m4 --- # intmax.m4 serial 1 (gettext-0.12) dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl Test whether the system has the 'intmax_t' type, but don't attempt to dnl find a replacement if it is lacking. AC_DEFUN([gt_TYPE_INTMAX_T], [ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, [AC_TRY_COMPILE([ #include <stddef.h> #include <stdlib.h> #if HAVE_STDINT_H_WITH_UINTMAX #include <stdint.h> #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include <inttypes.h> #endif ], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) if test $gt_cv_c_intmax_t = yes; then AC_DEFINE(HAVE_INTMAX_T, 1, [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) fi ]) --- NEW FILE: lib-ld.m4 --- # lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) acl_cv_prog_gnu_ld=yes ;; *) acl_cv_prog_gnu_ld=no ;; esac]) with_gnu_ld=$acl_cv_prog_gnu_ld ]) dnl From libtool-1.4. Sets the variable LD. AC_DEFUN([AC_LIB_PROG_LD], [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) --- NEW FILE: ulonglong.m4 --- # ulonglong.m4 serial 3 dnl Copyright (C) 1999-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], [unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull;], ac_cv_type_unsigned_long_long=yes, ac_cv_type_unsigned_long_long=no)]) if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, [Define if you have the 'unsigned long long' type.]) fi ]) --- NEW FILE: lcmessage.m4 --- # lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper <dr...@cy...>, 1995. # Check whether LC_MESSAGES is available in <locale.h>. AC_DEFUN([AM_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your <locale.h> file defines LC_MESSAGES.]) fi ]) --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMSGFMT = @GMSGFMT@ GTKMM_CFLAGS = @GTKMM_CFLAGS@ GTKMM_LIBS = @GTKMM_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ NASM = @NASM@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POSUB = @POSUB@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VBA_EXTRA = @VBA_EXTRA@ VBA_LIBS = @VBA_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepC... [truncated message content] |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:20:13
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3551/src/sdl Added Files: Makefile.am Makefile.in SDL.cpp TestEmu.cpp debugger.cpp debugger.h Log Message: GTK+ frontend draft added. --- NEW FILE: TestEmu.cpp --- /* * VisualBoyAdvanced - Nintendo Gameboy/GameboyAdvance (TM) emulator * Copyrigh(c) 1999-2002 Forgotten (vb...@em...) * * 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 */ #include <stdarg.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include "AutoBuild.h" #include "GBA.h" #include "debugger.h" #include "Sound.h" #include "unzip.h" #include "Util.h" #include "gb/GB.h" #include "gb/gbGlobals.h" #ifdef __GNUC__ #include <unistd.h> #define GETCWD getcwd #else #include <direct.h> #define GETCWD _getcwd #endif #ifdef MMX extern "C" bool cpu_mmx; #endif extern bool soundEcho; extern bool soundLowPass; extern bool soundReverse; extern void remoteInit(); extern void remoteCleanUp(); extern void remoteStubMain(); extern void remoteStubSignal(int,int); extern void remoteOutput(char *, u32); extern void remoteSetProtocol(int); extern void remoteSetPort(int); extern void debuggerOutput(char *, u32); struct EmulatedSystem emulator; static u8 COPYRIGHT[] = { 0xa9, 0x96, 0x8c, 0x8a, 0x9e, 0x93, 0xbd, 0x90, 0x86, 0xbe, 0x9b, 0x89, 0x9e, 0x91, 0x9c, 0x9a, 0xdf, 0xd7, 0xbc, 0xd6, 0xdf, 0xce, 0xc6, 0xc6, 0xc6, 0xd3, 0xcd, 0xcf, 0xcf, 0xcf, 0xd3, 0xcd, 0xcf, 0xcf, 0xce, 0xdf, 0x9d, 0x86, 0xdf, 0xb9, 0x90, 0x8d, 0x98, 0x90, 0x8b, 0x8b, 0x9a, 0x91, 0x00 }; int systemRedShift = 0; int systemBlueShift = 16; int systemGreenShift = 8; int systemColorDepth = 32; int systemDebug = 0; int systemVerbose = 0; int systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED; int cartridgeType = 3; int captureFormat = 0; int emulating = 0; int RGB_LOW_BITS_MASK=0x821; int systemFrameSkip = 0; u32 systemColorMap32[0x10000]; u16 systemColorMap16[0x10000]; u16 systemGbPalette[24]; char filename[2048]; char biosFileName[2048]; char captureDir[2048]; char saveDir[2048]; char batteryDir[2048]; bool paused = false; bool debugger = true; bool debuggerStub = false; bool systemSoundOn = false; bool removeIntros = false; extern void debuggerSignal(int,int); void (*dbgMain)() = debuggerMain; void (*dbgSignal)(int,int) = debuggerSignal; void (*dbgOutput)(char *, u32) = debuggerOutput; char *sdlGetFilename(char *name) { static char filebuffer[2048]; int len = strlen(name); char *p = name + len - 1; while(true) { if(*p == '/' || *p == '\\') { p++; break; } len--; p--; if(len == 0) break; } if(len == 0) strcpy(filebuffer, name); else strcpy(filebuffer, p); return filebuffer; } void usage(char *cmd) { printf("%s file-name\n",cmd); } int main(int argc, char **argv) { fprintf(stderr,"VisualBoyAdvance-Test version %s\n", VERSION); #ifdef __GNUC__ fprintf(stderr,"Linux version\n"); #else fprintf(stderr,"Windows version\n"); #endif captureDir[0] = 0; saveDir[0] = 0; batteryDir[0] = 0; char buffer[1024]; int op = -1; systemFrameSkip = frameSkip = 2; gbBorderOn = 0; parseDebug = true; if(!debuggerStub) { if(argc <= 1) { systemMessage(0,"Missing image name"); usage(argv[0]); exit(-1); } } for(int i = 0; i < 24;) { systemGbPalette[i++] = (0x1f) | (0x1f << 5) | (0x1f << 10); systemGbPalette[i++] = (0x15) | (0x15 << 5) | (0x15 << 10); systemGbPalette[i++] = (0x0c) | (0x0c << 5) | (0x0c << 10); systemGbPalette[i++] = 0; } if(argc == 2) { char *szFile = argv[optind]; bool failed = false; if(CPUIsZipFile(szFile)) { unzFile unz = unzOpen(szFile); if(unz == NULL) { systemMessage(0, "Cannot open file %s", szFile); exit(-1); } int r = unzGoToFirstFile(unz); if(r != UNZ_OK) { unzClose(unz); systemMessage(0, "Bad ZIP file %s", szFile); exit(-1); } bool found = false; unz_file_info info; while(true) { r = unzGetCurrentFileInfo(unz, &info, buffer, sizeof(buffer), NULL, 0, NULL, 0); if(r != UNZ_OK) { unzClose(unz); systemMessage(0,"Bad ZIP file %s", szFile); exit(-1); } if(utilIsGBImage(buffer)) { found = true; cartridgeType = 1; break; } if(utilIsGBAImage(buffer)) { found = true; cartridgeType = 0; break; } r = unzGoToNextFile(unz); if(r != UNZ_OK) break; } if(!found) { unzClose(unz); systemMessage(0, "No image found on ZIP file %s", szFile); exit(-1); } unzClose(unz); } if(utilIsGBImage(szFile) || cartridgeType == 1) { failed = !gbLoadRom(szFile); cartridgeType = 1; emulator = GBSystem; } else if(utilIsGBAImage(szFile) || cartridgeType == 0) { failed = !CPULoadRom(szFile); cartridgeType = 0; emulator = GBASystem; CPUInit(biosFileName, useBios); CPUReset(); } else { systemMessage(0, "Unknown file type %s", szFile); exit(-1); } if(failed) { systemMessage(0, "Failed to load file %s", szFile); exit(-1); } strcpy(filename, szFile); char *p = strrchr(filename, '.'); if(p) *p = 0; } else { cartridgeType = 0; strcpy(filename, "gnu_stub"); rom = (u8 *)malloc(0x2000000); workRAM = (u8 *)calloc(1, 0x40000); bios = (u8 *)calloc(1,0x4000); internalRAM = (u8 *)calloc(1,0x8000); paletteRAM = (u8 *)calloc(1,0x400); vram = (u8 *)calloc(1, 0x20000); oam = (u8 *)calloc(1, 0x400); pix = (u8 *)calloc(1, 4 * 240 * 160); ioMem = (u8 *)calloc(1, 0x400); emulator = GBASystem; CPUInit(biosFileName, useBios); CPUReset(); } if(debuggerStub) remoteInit(); if(cartridgeType == 0) { } else if (cartridgeType == 1) { if(gbBorderOn) { gbBorderLineSkip = 256; gbBorderColumnSkip = 48; gbBorderRowSkip = 40; } else { gbBorderLineSkip = 160; gbBorderColumnSkip = 0; gbBorderRowSkip = 0; } } else { } for(int i = 0; i < 0x10000; i++) { systemColorMap32[i] = ((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift); } emulating = 1; soundInit(); while(emulating) { if(!paused) { if(debugger && emulator.emuHasDebugger) dbgMain(); else emulator.emuMain(emulator.emuCount); } } emulating = 0; fprintf(stderr,"Shutting down\n"); remoteCleanUp(); soundShutdown(); if(gbRom != NULL || rom != NULL) { emulator.emuCleanUp(); } return 0; } void systemMessage(int num, const char *msg, ...) { char buffer[2048]; va_list valist; va_start(valist, msg); vsprintf(buffer, msg, valist); fprintf(stderr, "%s\n", buffer); va_end(valist); } void systemDrawScreen() { } bool systemReadJoypads() { return true; } u32 systemReadJoypad(int) { return 0; } void systemShowSpeed(int speed) { } void system10Frames(int rate) { } void systemFrame() { } void systemSetTitle(const char *title) { } void systemScreenCapture(int a) { char buffer[2048]; if(captureFormat) { if(captureDir[0]) sprintf(buffer, "%s/%s%02d.bmp", captureDir, sdlGetFilename(filename), a); else sprintf(buffer, "%s%02d.bmp", filename, a); emulator.emuWriteBMP(buffer); } else { if(captureDir[0]) sprintf(buffer, "%s/%s%02d.png", captureDir, sdlGetFilename(filename), a); else sprintf(buffer, "%s%02d.png", filename, a); emulator.emuWritePNG(buffer); } systemScreenMessage("Screen capture"); } u32 systemReadJoypadExtended() { return 0; } void systemWriteDataToSoundBuffer() { } bool systemSoundInit() { return true; } void systemSoundShutdown() { } void systemSoundPause() { } void systemSoundResume() { } void systemSoundReset() { } static int ticks = 0; u32 systemGetClock() { return ticks++; } void systemUpdateMotionSensor() { } int systemGetSensorX() { return 0; } int systemGetSensorY() { return 0; } void systemGbPrint(u8 *data,int pages,int feed,int palette, int contrast) { } void systemScreenMessage(const char *msg) { } bool systemCanChangeSoundQuality() { return false; } bool systemPauseOnFrame() { return false; } void systemGbBorderOn() { } --- NEW FILE: Makefile.am --- bin_PROGRAMS = VisualBoyAdvance noinst_PROGRAMS = TestEmu VisualBoyAdvance_SOURCES = \ SDL.cpp \ debugger.cpp \ debugger.h \ ../2xSaI.cpp \ ../AutoBuild.h \ ../Cheats.cpp \ ../Cheats.h \ ../EEprom.cpp \ ../EEprom.h \ ../Flash.cpp \ ../Flash.h \ ../GBA.cpp \ ../GBA.h \ ../GBAinline.h \ ../Gfx.cpp \ ../Gfx.h \ ../Globals.cpp \ ../Globals.h \ ../Mode0.cpp \ ../Mode1.cpp \ ../Mode2.cpp \ ../Mode3.cpp \ ../Mode4.cpp \ ../Mode5.cpp \ ../NLS.h \ ../Port.h \ ../RTC.cpp \ ../RTC.h \ ../Sound.cpp \ ../Sound.h \ ../Sram.cpp \ ../Sram.h \ ../System.h \ ../Text.cpp \ ../Text.h \ ../Util.cpp \ ../Util.h \ ../admame.cpp \ ../agbprint.cpp \ ../agbprint.h \ ../arm-new.h \ ../armdis.cpp \ ../armdis.h \ ../bilinear.cpp \ ../bios.cpp \ ../bios.h \ ../elf.cpp \ ../elf.h \ ../expr-lex.cpp \ ../expr.cpp \ ../expr.cpp.h \ ../exprNode.cpp \ ../exprNode.h \ ../getopt.c \ ../getopt.h \ ../getopt1.c \ ../hq2x.cpp \ ../hq2x.h \ ../interframe.cpp \ ../interp.h \ ../lq2x.h \ ../memgzio.c \ ../memgzio.h \ ../motionblur.cpp \ ../pixel.cpp \ ../remote.cpp \ ../scanline.cpp \ ../simple2x.cpp \ ../thumb.h \ ../unzip.cpp \ ../unzip.h VisualBoyAdvance_LDADD = @VBA_LIBS@ @SDL_LIBS@ TestEmu_SOURCES = \ TestEmu.cpp \ debugger.cpp \ debugger.h \ ../2xSaI.cpp \ ../AutoBuild.h \ ../Cheats.cpp \ ../Cheats.h \ ../EEprom.cpp \ ../EEprom.h \ ../Flash.cpp \ ../Flash.h \ ../GBA.cpp \ ../GBA.h \ ../GBAinline.h \ ../Gfx.cpp \ ../Gfx.h \ ../Globals.cpp \ ../Globals.h \ ../Mode0.cpp \ ../Mode1.cpp \ ../Mode2.cpp \ ../Mode3.cpp \ ../Mode4.cpp \ ../Mode5.cpp \ ../NLS.h \ ../Port.h \ ../RTC.cpp \ ../RTC.h \ ../Sound.cpp \ ../Sound.h \ ../Sram.cpp \ ../Sram.h \ ../System.h \ ../Text.cpp \ ../Text.h \ ../Util.cpp \ ../Util.h \ ../admame.cpp \ ../agbprint.cpp \ ../agbprint.h \ ../arm-new.h \ ../armdis.cpp \ ../armdis.h \ ../bios.cpp \ ../bios.h \ ../elf.cpp \ ../elf.h \ ../expr-lex.cpp \ ../expr.cpp \ ../expr.cpp.h \ ../exprNode.cpp \ ../exprNode.h \ ../hq2x.cpp \ ../hq2x.h \ ../interp.h \ ../lq2x.h \ ../memgzio.c \ ../memgzio.h \ ../motionblur.cpp \ ../pixel.cpp \ ../remote.cpp \ ../scanline.cpp \ ../simple2x.cpp \ ../thumb.h \ ../unzip.cpp \ ../unzip.h TestEmu_LDADD = @VBA_LIBS@ @SDL_LIBS@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -DSDL AM_CXXFLAGS = -fno-exceptions @SDL_CFLAGS@ --- NEW FILE: debugger.cpp --- /* * VisualBoyAdvanced - Nintendo Gameboy/GameboyAdvance (TM) emulator * Copyrigh(c) 1999-2002 Forgotten (vb...@em...) * * 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 */ #include <stdio.h> [...1415 lines suppressed...] continue; commandCount++; while((s = strtok(NULL, " \t\n"))) { commands[commandCount++] = s; if(commandCount == 10) break; } for(int j = 0; ; j++) { if(debuggerCommands[j].name == NULL) { printf("Unrecognized command %s. Type h for help.\n", commands[0]); break; } if(!strcmp(commands[0], debuggerCommands[j].name)) { debuggerCommands[j].function(commandCount, commands); break; } } } } --- NEW FILE: SDL.cpp --- /* * VisualBoyAdvanced - Nintendo Gameboy/GameboyAdvance (TM) emulator * Copyrigh(c) 1999-2002 Forgotten (vb...@em...) * * 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 */ #include <stdarg.h> [...3402 lines suppressed...] } srcPitch = srcWidth * 2+4; } else { if(systemColorDepth != 32) filterFunction = NULL; RGB_LOW_BITS_MASK = 0x010101; if(systemColorDepth == 32) { Init_2xSaI(32); } for(int i = 0; i < 0x10000; i++) { systemColorMap32[i] = ((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift); } if(systemColorDepth == 32) srcPitch = srcWidth*4 + 4; else srcPitch = srcWidth*3; } } --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ [...1494 lines suppressed...] ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: debugger.h --- /* * VisualBoyAdvanced - Nintendo Gameboy/GameboyAdvance (TM) emulator * Copyrigh(c) 1999-2002 Forgotten (vb...@em...) * * 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 */ extern void debuggerMain(); |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:20:13
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3551/src/gtk Added Files: Makefile.am Makefile.in filters.h input.cpp input.h intl.h main.cpp screenarea.cpp system.cpp tools.cpp tools.h vba.glade window.cpp window.h Log Message: GTK+ frontend draft added. --- NEW FILE: tools.h --- // -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #ifndef __VBA_TOOLS_H__ #define __VBA_TOOLS_H__ #include <string> namespace VBA { std::string sCutSuffix(const std::string & _sString, const std::string & _sSep = std::string(".")); } #endif // __VBA_TOOLS_H__ --- NEW FILE: input.h --- // -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #ifndef __VBA_INPUT_H__ #define __VBA_INPUT_H__ #include <glib.h> namespace VBA { enum EKey { KEY_NONE, // GBA keys KEY_A, KEY_B, KEY_SELECT, KEY_START, KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN, KEY_R, KEY_L, // VBA extension KEY_SPEED, KEY_CAPTURE }; enum EKeyFlag { // GBA keys KEYFLAG_A = 1 << 0, KEYFLAG_B = 1 << 1, KEYFLAG_SELECT = 1 << 2, KEYFLAG_START = 1 << 3, KEYFLAG_RIGHT = 1 << 4, KEYFLAG_LEFT = 1 << 5, KEYFLAG_UP = 1 << 6, KEYFLAG_DOWN = 1 << 7, KEYFLAG_R = 1 << 8, KEYFLAG_L = 1 << 9, // VBA extension KEYFLAG_SPEED = 1 << 10, KEYFLAG_CAPTURE = 1 << 11, }; class Keymap { public: Keymap(); ~Keymap(); void vRegister(guint _uiVal, EKey _eKey); void vClear(); inline EKey eGetKey(guint _uiVal); private: GHashTable * m_pstTable; // noncopyable Keymap(const Keymap &); Keymap & operator=(const Keymap &); }; inline EKey Keymap::eGetKey(guint _uiVal) { return (EKey)GPOINTER_TO_UINT(g_hash_table_lookup(m_pstTable, GUINT_TO_POINTER(_uiVal))); } } // namespace VBA #endif // __VBA_INPUT_H__ --- NEW FILE: main.cpp --- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #include <libglademm.h> #include <gtkmm/main.h> #include <gtkmm/messagedialog.h> #include "window.h" #include "intl.h" using Gnome::Glade::Xml; int main(int argc, char * argv[]) { #ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); #endif // ENABLE_NLS Gtk::Main oKit(argc, argv); Glib::RefPtr<Xml> poXml; try { poXml = Xml::create(PKGDATADIR "/vba.glade", "MainWindow"); } catch (const Xml::Error & e) { Gtk::MessageDialog oDialog(e.what(), Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE); oDialog.run(); return 1; } VBA::Window * poWindow = NULL; poXml->get_widget_derived<VBA::Window>("MainWindow", poWindow); Gtk::Main::run(*poWindow); return 0; } --- NEW FILE: tools.cpp --- // -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #include "tools.h" namespace VBA { std::string sCutSuffix(const std::string & _sString, const std::string & _sSep) { return _sString.substr(0, _sString.find_last_of(_sSep)); } } // namespace VBA --- NEW FILE: Makefile.in --- # Makefile.in generated by automake 1.7.9 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ [...1550 lines suppressed...] ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dist_pkgdataDATA \ uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dist_pkgdataDATA \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-dist_pkgdataDATA uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: screenarea.cpp --- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #include "screenarea.h" #include <string.h> namespace VBA { ScreenArea::ScreenArea(int _iWidth, int _iHeight, int _iScale) : m_puiPixels(NULL), m_puiDelta(NULL), m_vFilter2x(NULL) { g_assert(_iWidth >= 1 && _iHeight >= 1 && _iScale >= 1); m_iWidth = _iWidth; m_iHeight = _iHeight; m_iScale = _iScale; vUpdateSize(); set_events(Gdk::EXPOSURE_MASK); } ScreenArea::~ScreenArea() { if (m_puiPixels != NULL) { delete[] m_puiPixels; } if (m_puiDelta != NULL) { delete[] m_puiDelta; } } void ScreenArea::vSetSize(int _iWidth, int _iHeight) { g_return_if_fail(_iWidth >= 1 && _iHeight >= 1); if (_iWidth != m_iWidth || _iHeight != m_iHeight) { m_iWidth = _iWidth; m_iHeight = _iHeight; vUpdateSize(); } } void ScreenArea::vSetScale(int _iScale) { g_return_if_fail(_iScale >= 1); if (_iScale != m_iScale) { m_iScale = _iScale; vUpdateSize(); } } void ScreenArea::vSetFilter2x(Filter2x _vFilter2x) { m_vFilter2x = _vFilter2x; } void ScreenArea::vDrawPixels(const u8 * _puiData) { if (m_iScale == 1) { u32 * puiSrc = (u32 *)_puiData + m_iWidth + 1; u32 * puiPixel = m_puiPixels; for (int y = 0; y < m_iHeight; y++) { for (int x = 0; x < m_iWidth; x++) { *puiPixel++ = *puiSrc++; } puiSrc++; } } else if (m_iScale == 2 && m_vFilter2x != NULL) { m_vFilter2x(const_cast<u8 *>(_puiData) + m_iAreaWidth * 2 + 4, m_iAreaWidth * 2 + 4, m_puiDelta, (u8 *)m_puiPixels, m_iRowStride, m_iWidth, m_iHeight); } else { u32 * puiSrc = (u32 *)_puiData + m_iWidth + 1; u32 * puiSrc2; u32 * puiPixel = m_puiPixels; for (int y = 0; y < m_iHeight; y++) { for (int j = 0; j < m_iScale; j++) { puiSrc2 = puiSrc; for (int x = 0; x < m_iWidth; x++) { for (int i = 0; i < m_iScale; i++) { *puiPixel++ = *puiSrc2; } puiSrc2++; } } puiSrc = puiSrc2 + 1; } } queue_draw_area(0, 0, m_iAreaWidth, m_iAreaHeight); } void ScreenArea::vDrawColor(u32 _uiColor) { _uiColor = GUINT32_TO_BE(_uiColor) << 8; u32 * puiPixel = m_puiPixels; u32 * puiEnd = m_puiPixels + m_iAreaWidth * m_iAreaHeight; while (puiPixel != puiEnd) { *puiPixel++ = _uiColor; } queue_draw_area(0, 0, m_iAreaWidth, m_iAreaHeight); } bool ScreenArea::on_expose_event(GdkEventExpose * _pstEvent) { if (_pstEvent->area.x + _pstEvent->area.width > m_iAreaWidth || _pstEvent->area.y + _pstEvent->area.height > m_iAreaHeight) { return false; } guchar * puiAreaPixels = (guchar *)m_puiPixels; if (_pstEvent->area.x != 0) { puiAreaPixels += _pstEvent->area.x << 2; } if (_pstEvent->area.y != 0) { puiAreaPixels += _pstEvent->area.y * m_iRowStride; } get_window()->draw_rgb_32_image(get_style()->get_fg_gc(get_state()), _pstEvent->area.x, _pstEvent->area.y, _pstEvent->area.width, _pstEvent->area.height, Gdk::RGB_DITHER_MAX, puiAreaPixels, m_iRowStride); return true; } void ScreenArea::vUpdateSize() { if (m_puiPixels != NULL) { delete[] m_puiPixels; } if (m_puiDelta != NULL) { delete[] m_puiDelta; } m_iAreaWidth = m_iScale * m_iWidth; m_iAreaHeight = m_iScale * m_iHeight; m_iRowStride = m_iAreaWidth * 4; m_puiPixels = new u32[m_iAreaWidth * m_iAreaHeight]; m_puiDelta = new u8[(m_iWidth + 2) * (m_iHeight + 2) * 4]; memset(m_puiDelta, 255, (m_iWidth + 2) * (m_iHeight + 2) * 4); set_size_request(m_iAreaWidth, m_iAreaHeight); } } // namespace VBA --- NEW FILE: filters.h --- // -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #ifndef __VBA_FILTERS_H__ #define __VBA_FILTERS_H__ #include "../System.h" int Init_2xSaI(u32); void _2xSaI (u8 *, u32, u8 *, u8 *, u32, int, int); void _2xSaI32 (u8 *, u32, u8 *, u8 *, u32, int, int); void Super2xSaI (u8 *, u32, u8 *, u8 *, u32, int, int); void Super2xSaI32 (u8 *, u32, u8 *, u8 *, u32, int, int); void SuperEagle (u8 *, u32, u8 *, u8 *, u32, int, int); void SuperEagle32 (u8 *, u32, u8 *, u8 *, u32, int, int); void Pixelate (u8 *, u32, u8 *, u8 *, u32, int, int); void Pixelate32 (u8 *, u32, u8 *, u8 *, u32, int, int); void MotionBlur (u8 *, u32, u8 *, u8 *, u32, int, int); void MotionBlur32 (u8 *, u32, u8 *, u8 *, u32, int, int); void AdMame2x (u8 *, u32, u8 *, u8 *, u32, int, int); void AdMame2x32 (u8 *, u32, u8 *, u8 *, u32, int, int); void Simple2x (u8 *, u32, u8 *, u8 *, u32, int, int); void Simple2x32 (u8 *, u32, u8 *, u8 *, u32, int, int); void Bilinear (u8 *, u32, u8 *, u8 *, u32, int, int); void Bilinear32 (u8 *, u32, u8 *, u8 *, u32, int, int); void BilinearPlus (u8 *, u32, u8 *, u8 *, u32, int, int); void BilinearPlus32(u8 *, u32, u8 *, u8 *, u32, int, int); void Scanlines (u8 *, u32, u8 *, u8 *, u32, int, int); void Scanlines32 (u8 *, u32, u8 *, u8 *, u32, int, int); void ScanlinesTV (u8 *, u32, u8 *, u8 *, u32, int, int); void ScanlinesTV32 (u8 *, u32, u8 *, u8 *, u32, int, int); void hq2x (u8 *, u32, u8 *, u8 *, u32, int, int); void hq2x32 (u8 *, u32, u8 *, u8 *, u32, int, int); void lq2x (u8 *, u32, u8 *, u8 *, u32, int, int); void lq2x32 (u8 *, u32, u8 *, u8 *, u32, int, int); void SmartIB (u8 *, u32, int, int); void SmartIB32 (u8 *, u32, int, int); void MotionBlurIB (u8 *, u32, int, int); void MotionBlurIB32(u8 *, u32, int, int); typedef void (*Filter2x)(u8 *, u32, u8 *, u8 *, u32, int, int); typedef void (*FilterIB)(u8 *, u32, int, int); #endif // __VBA_FILTERS_H__ --- NEW FILE: vba.glade --- <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> <widget class="GtkWindow" id="MainWindow"> <property name="visible">True</property> <property name="title" translatable="yes">VisualBoyAdvance</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <child> <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> <widget class="GtkHandleBox" id="handlebox1"> <property name="visible">True</property> <property name="shadow_type">GTK_SHADOW_OUT</property> <property name="handle_position">GTK_POS_LEFT</property> <property name="snap_edge">GTK_POS_TOP</property> <child> <widget class="GtkMenuBar" id="menubar1"> <property name="visible">True</property> <child> <widget class="GtkMenuItem" id="FileMenu"> <property name="visible">True</property> <property name="label" translatable="yes">_File</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="FileMenu_menu"> <child> <widget class="GtkImageMenuItem" id="FileOpen"> <property name="visible">True</property> <property name="label">gtk-open</property> <property name="use_stock">True</property> </widget> </child> <child> <widget class="GtkCheckMenuItem" id="FilePause"> <property name="visible">True</property> <property name="label" translatable="yes">_Pause</property> <property name="use_underline">True</property> <property name="active">False</property> </widget> </child> <child> <widget class="GtkImageMenuItem" id="FileReset"> <property name="visible">True</property> <property name="label" translatable="yes">_Reset</property> <property name="use_underline">True</property> <child internal-child="image"> <widget class="GtkImage" id="image2"> <property name="visible">True</property> <property name="stock">gtk-refresh</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="separatormenuitem1"> <property name="visible">True</property> </widget> </child> <child> <widget class="GtkImageMenuItem" id="FileClose"> <property name="visible">True</property> <property name="label">gtk-close</property> <property name="use_stock">True</property> </widget> </child> <child> <widget class="GtkImageMenuItem" id="FileQuit"> <property name="visible">True</property> <property name="label">gtk-quit</property> <property name="use_stock">True</property> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="VideoMenu"> <property name="visible">True</property> <property name="label" translatable="yes">_Video</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="VideoMenu_menu"> <child> <widget class="GtkMenuItem" id="VideoZoom"> <property name="visible">True</property> <property name="label" translatable="yes">_Zoom</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="VideoZoom_menu"> <child> <widget class="GtkRadioMenuItem" id="VideoZoom1x"> <property name="visible">True</property> <property name="label" translatable="yes">_1x</property> <property name="use_underline">True</property> <property name="active">False</property> </widget> </child> <child> <widget class="GtkRadioMenuItem" id="VideoZoom2x"> <property name="visible">True</property> <property name="label" translatable="yes">_2x</property> <property name="use_underline">True</property> <property name="active">False</property> <property name="group">VideoZoom1x</property> </widget> </child> <child> <widget class="GtkRadioMenuItem" id="VideoZoom3x"> <property name="visible">True</property> <property name="label" translatable="yes">_3x</property> <property name="use_underline">True</property> <property name="active">False</property> <property name="group">VideoZoom1x</property> </widget> </child> <child> <widget class="GtkRadioMenuItem" id="VideoZoom4x"> <property name="visible">True</property> <property name="label" translatable="yes">_4x</property> <property name="use_underline">True</property> <property name="active">False</property> <property name="group">VideoZoom1x</property> </widget> </child> </widget> </child> </widget> </child> </widget> </child> </widget> </child> <child> <widget class="GtkMenuItem" id="HelpMenu"> <property name="visible">True</property> <property name="label" translatable="yes">_Help</property> <property name="use_underline">True</property> <child> <widget class="GtkMenu" id="HelpMenu_menu"> <child> <widget class="GtkMenuItem" id="HelpAbout"> <property name="visible">True</property> <property name="label" translatable="yes">_About</property> <property name="use_underline">True</property> </widget> </child> </widget> </child> </widget> </child> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> </packing> </child> <child> <widget class="GtkAlignment" id="ScreenContainer"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xscale">0</property> <property name="yscale">0</property> <child> <placeholder/> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">True</property> </packing> </child> </widget> </child> </widget> <widget class="GtkDialog" id="AboutDialog"> <property name="title" translatable="yes">About VBA</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area1"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="closebutton1"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-close</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="response_id">-7</property> </widget> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> <property name="fill">True</property> <property name="pack_type">GTK_PACK_END</property> </packing> </child> <child> <widget class="GtkLabel" id="VersionLabel"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label" translatable="yes"></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_CENTER</property> <property name="wrap">False</property> <property name="selectable">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">5</property> <property name="ypad">5</property> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label" translatable="yes">An emulator for Gameboy⢠and GameboyAdvanceâ¢.</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_CENTER</property> <property name="wrap">True</property> <property name="selectable">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">5</property> <property name="ypad">5</property> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">False</property> </packing> </child> <child> <widget class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label" translatable="yes"><small>Copyright © 1999-2004 Forgotten</small></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_CENTER</property> <property name="wrap">True</property> <property name="selectable">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">5</property> <property name="ypad">5</property> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> <property name="fill">False</property> </packing> </child> </widget> </child> </widget> </glade-interface> --- NEW FILE: Makefile.am --- bin_PROGRAMS = gVisualBoyAdvance noinst_LIBRARIES = libgba.a gVisualBoyAdvance_SOURCES = \ filters.h \ input.cpp \ input.h \ intl.h \ main.cpp \ screenarea.cpp \ screenarea.h \ system.cpp \ tools.cpp \ tools.h \ window.cpp \ window.h gVisualBoyAdvance_LDADD = libgba.a @VBA_LIBS@ @GTKMM_LIBS@ @LIBINTL@ @SDL_LIBS@ gVisualBoyAdvance_CPPFLAGS = \ -DPKGDATADIR=\"$(pkgdatadir)\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" gVisualBoyAdvance_CXXFLAGS = @GTKMM_CFLAGS@ @SDL_CFLAGS@ libgba_a_SOURCES = \ ../2xSaI.cpp \ ../AutoBuild.h \ ../Cheats.cpp \ ../Cheats.h \ ../EEprom.cpp \ ../EEprom.h \ ../Flash.cpp \ ../Flash.h \ ../GBA.cpp \ ../GBA.h \ ../GBAinline.h \ ../Gfx.cpp \ ../Gfx.h \ ../Globals.cpp \ ../Globals.h \ ../Mode0.cpp \ ../Mode1.cpp \ ../Mode2.cpp \ ../Mode3.cpp \ ../Mode4.cpp \ ../Mode5.cpp \ ../NLS.h \ ../Port.h \ ../RTC.cpp \ ../RTC.h \ ../Sound.cpp \ ../Sound.h \ ../Sram.cpp \ ../Sram.h \ ../System.h \ ../Text.cpp \ ../Text.h \ ../Util.cpp \ ../Util.h \ ../admame.cpp \ ../agbprint.cpp \ ../agbprint.h \ ../arm-new.h \ ../armdis.cpp \ ../armdis.h \ ../bilinear.cpp \ ../bios.cpp \ ../bios.h \ ../elf.cpp \ ../elf.h \ ../getopt.c \ ../getopt.h \ ../getopt1.c \ ../hq2x.cpp \ ../hq2x.h \ ../interframe.cpp \ ../interp.h \ ../lq2x.h \ ../memgzio.c \ ../memgzio.h \ ../motionblur.cpp \ ../pixel.cpp \ ../remote.cpp \ ../scanline.cpp \ ../simple2x.cpp \ ../thumb.h \ ../unzip.cpp \ ../unzip.h libgba_a_CPPFLAGS = -DSDL libgba_a_CXXFLAGS = -fno-exceptions dist_pkgdata_DATA = vba.glade --- NEW FILE: system.cpp --- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #include <stdio.h> #include <stdarg.h> #include <SDL.h> #include "../GBA.h" #include "../gb/GB.h" #include "../gb/gbGlobals.h" #include "../Util.h" #include "window.h" int systemRedShift; int systemGreenShift; int systemBlueShift; int systemColorDepth; int systemDebug; int systemVerbose; int systemSaveUpdateCounter; int systemFrameSkip; u32 systemColorMap32[0x10000]; u16 systemColorMap16[0x10000]; u16 systemGbPalette[24]; bool systemSoundOn; int emulating; bool debugger; int RGB_LOW_BITS_MASK; inline VBA::Window * gui() { return VBA::Window::poGetInstance(); } void systemMessage(int _iId, const char * _csFormat, ...) { va_list args; va_start(args, _csFormat); char * csMsg = g_strdup_vprintf(_csFormat, args); va_end(args); Gtk::MessageDialog oDialog(*gui(), csMsg, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK); oDialog.run(); free(csMsg); } void systemDrawScreen() { gui()->vDrawScreen(); } bool systemReadJoypads() { return true; } u32 systemReadJoypad(int) { return gui()->uiReadJoypad(); } void systemShowSpeed(int _iSpeed) { char csTitle[50]; snprintf(csTitle, 50, "VisualBoyAdvance-%.3d%%", _iSpeed); gui()->set_title(csTitle); } void system10Frames(int _iRate) { } void systemFrame() { } void systemSetTitle(const char * _csTitle) { gui()->set_title(_csTitle); } void systemScreenCapture(int _iNum) { } void systemWriteDataToSoundBuffer() { } bool systemSoundInit() { return true; } void systemSoundShutdown() { } void systemSoundPause() { } void systemSoundResume() { } void systemSoundReset() { } u32 systemGetClock() { return SDL_GetTicks(); } void systemUpdateMotionSensor() { } int systemGetSensorX() { return 0; } int systemGetSensorY() { return 0; } void systemGbPrint(u8 * _puiData, int _iPages, int _iFeed, int _iPalette, int _iContrast) { } void systemScreenMessage(const char * _csMsg) { } bool systemCanChangeSoundQuality() { return false; } bool systemPauseOnFrame() { return false; } void systemGbBorderOn() { } void debuggerMain() { } void debuggerSignal(int, int) { } void debuggerOutput(char *, u32) { } void (*dbgMain)() = debuggerMain; void (*dbgSignal)(int, int) = debuggerSignal; void (*dbgOutput)(char *, u32) = debuggerOutput; --- NEW FILE: intl.h --- // -*- C++ -*- /* * VisualBoyAdvanced - Nintendo Gameboy/GameboyAdvance (TM) emulator * Copyrigh(c) 1999-2002 Forgotten (vb...@em...) * * 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 */ #ifndef __VBA_INTL_H__ #define __VBA_INTL_H__ #ifndef GETTEXT_PACKAGE # error "GETTEXT_PACKAGE must be defined" #endif #ifdef ENABLE_NLS # include <libintl.h> # define _(String) gettext(String) # define N_(String) (String) #else # define _(String) (String) # define N_(String) (String) # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,String) (String) # define dcgettext(Domain,String,Type) (String) # define bindtextdomain(Domain,Directory) (Domain) #endif #endif // __VBA_INTL_H__ --- NEW FILE: window.h --- // -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #ifndef __VBA_WINDOW_H__ #define __VBA_WINDOW_H__ #include <libglademm.h> #include <gtkmm.h> #include <string> #include "screenarea.h" #include "input.h" #include "filters.h" namespace VBA { class Window : public Gtk::Window { friend class Gnome::Glade::Xml; public: inline static Window * poGetInstance() { return m_poInstance; } void vDrawScreen(); inline u32 uiReadJoypad() { return m_uiJoypadState; } enum ECartridge { NO_CARTRIDGE, GB_CARTRIDGE, GBA_CARTRIDGE }; inline ECartridge eGetCartridge() { return m_eCartridge; } protected: virtual bool on_key_press_event(GdkEventKey * _pstEvent); virtual bool on_key_release_event(GdkEventKey * _pstEvent); private: Window(GtkWindow * _pstWindow, const Glib::RefPtr<Gnome::Glade::Xml> & _poXml); ~Window(); static Window * m_poInstance; Gtk::FileSelection * m_poFileOpenDialog; ScreenArea * m_poScreenArea; Gtk::CheckMenuItem * m_poFilePauseItem; SigC::Connection m_oEmuSig; std::string m_sFilename; ECartridge m_eCartridge; EmulatedSystem m_stEmulator; Keymap m_oKeymap; u32 m_uiJoypadState; int m_iScreenWidth; int m_iScreenHeight; int m_iScreenScale; Filter2x m_vFilter2x; FilterIB m_vFilterIB; void vInitSystem(); void vInitSDL(); void vLoadKeymap(); void vUpdateScreen(); void vDrawDefaultScreen(); bool bLoadROM(const std::string & _rsFilename); void vLoadBattery(); void vSaveBattery(); void vLoadState(int _iNum); void vSaveState(int _iNum); void vStartEmu(); void vStopEmu(); void vOnFileOpen(); void vOnFilePause(); void vOnFileReset(); void vOnFileClose(); void vOnFileQuit(); void vOnVideoZoom1x(); void vOnVideoZoom2x(); void vOnVideoZoom3x(); void vOnVideoZoom4x(); void vOnHelpAbout(); bool bOnEmuIdle(); }; } // namespace VBA #endif // __VBA_WINDOW_H__ --- NEW FILE: window.cpp --- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #include "window.h" #include <SDL.h> #include "../GBA.h" #include "../gb/GB.h" #include "../gb/gbGlobals.h" #include "../Util.h" #include "tools.h" #include "intl.h" extern bool debugger; extern int RGB_LOW_BITS_MASK; namespace VBA { using Gnome::Glade::Xml; Window * Window::m_poInstance = NULL; const int iGBScreenWidth = 160; const int iGBScreenHeight = 144; const int iSGBScreenWidth = 256; const int iSGBScreenHeight = 224; const int iGBAScreenWidth = 240; const int iGBAScreenHeight = 160; Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr<Xml> & _poXml) : Gtk::Window(_pstWindow), m_poFileOpenDialog(NULL), m_eCartridge(NO_CARTRIDGE), m_uiJoypadState(0), m_iScreenWidth(iGBAScreenWidth), m_iScreenHeight(iGBAScreenHeight), m_iScreenScale(1), m_vFilter2x(NULL), m_vFilterIB(NULL) { vInitSystem(); vInitSDL(); vLoadKeymap(); Gtk::Container * poC; poC = dynamic_cast<Gtk::Container *>(_poXml->get_widget("ScreenContainer")); m_poScreenArea = Gtk::manage(new ScreenArea(m_iScreenWidth, m_iScreenHeight)); poC->add(*m_poScreenArea); vDrawDefaultScreen(); m_poScreenArea->vSetFilter2x(SuperEagle32); // TEST m_poScreenArea->show(); m_poFilePauseItem = dynamic_cast<Gtk::CheckMenuItem *>(_poXml->get_widget("FilePause")); m_poFilePauseItem->signal_toggled().connect(SigC::slot(*this, &Window::vOnFilePause)); Gtk::MenuItem * poMI; poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("FileOpen")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnFileOpen)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("FileReset")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnFileReset)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("FileClose")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnFileClose)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("FileQuit")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnFileQuit)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("VideoZoom1x")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnVideoZoom1x)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("VideoZoom2x")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnVideoZoom2x)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("VideoZoom3x")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnVideoZoom3x)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("VideoZoom4x")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnVideoZoom4x)); poMI = dynamic_cast<Gtk::MenuItem *>(_poXml->get_widget("HelpAbout")); poMI->signal_activate().connect(SigC::slot(*this, &Window::vOnHelpAbout)); if (m_poInstance == NULL) { m_poInstance = this; } else { abort(); } } Window::~Window() { vOnFileClose(); if (m_poFileOpenDialog != NULL) { delete m_poFileOpenDialog; } m_poInstance = NULL; } void Window::vInitSystem() { Init_2xSaI(32); #if G_BYTE_ORDER == G_LITTLE_ENDIAN systemRedShift = 3; systemGreenShift = 11; systemBlueShift = 19; RGB_LOW_BITS_MASK = 0x00010101; #else systemRedShift = 27; systemGreenShift = 19; systemBlueShift = 11; RGB_LOW_BITS_MASK = 0x01010100; #endif systemColorDepth = 32; systemDebug = 0; systemVerbose = 0; systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED; systemFrameSkip = 5; // TEST systemSoundOn = false; emulating = 0; debugger = true; for (int i = 0; i < 0x10000; i++) { #if G_BYTE_ORDER == G_LITTLE_ENDIAN systemColorMap32[i] = (((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift) | 0xff000000); #else systemColorMap32[i] = (((i & 0x1f) << systemRedShift) | (((i & 0x3e0) >> 5) << systemGreenShift) | (((i & 0x7c00) >> 10) << systemBlueShift) | 0xff); #endif } // TODO : GB init and 16-bit color map (?) } void Window::vInitSDL() { static bool bDone = false; if (bDone) return; int iFlags = (SDL_INIT_AUDIO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE); if (SDL_Init(iFlags) < 0) { fprintf(stderr, "Failed to init SDL: %s", SDL_GetError()); abort(); } bDone = true; } void Window::vLoadKeymap() { // TODO : load from prefs m_oKeymap.vRegister(GDK_z, KEY_A); m_oKeymap.vRegister(GDK_Z, KEY_A); m_oKeymap.vRegister(GDK_x, KEY_B); m_oKeymap.vRegister(GDK_X, KEY_B); m_oKeymap.vRegister(GDK_BackSpace, KEY_SELECT); m_oKeymap.vRegister(GDK_Return, KEY_START); m_oKeymap.vRegister(GDK_Right, KEY_RIGHT); m_oKeymap.vRegister(GDK_Left, KEY_LEFT); m_oKeymap.vRegister(GDK_Up, KEY_UP); m_oKeymap.vRegister(GDK_Down, KEY_DOWN); m_oKeymap.vRegister(GDK_s, KEY_R); m_oKeymap.vRegister(GDK_S, KEY_R); m_oKeymap.vRegister(GDK_a, KEY_L); m_oKeymap.vRegister(GDK_A, KEY_L); m_oKeymap.vRegister(GDK_space, KEY_SPEED); m_oKeymap.vRegister(GDK_F12, KEY_CAPTURE); } void Window::vUpdateScreen() { g_return_if_fail(m_iScreenWidth >= 1 && m_iScreenHeight >= 1 && m_iScreenScale >= 1); m_poScreenArea->vSetSize(m_iScreenWidth, m_iScreenHeight); m_poScreenArea->vSetScale(m_iScreenScale); resize(1, 1); if (emulating) { vDrawScreen(); } else { vDrawDefaultScreen(); } } void Window::vDrawScreen() { m_poScreenArea->vDrawPixels(pix); } void Window::vDrawDefaultScreen() { m_poScreenArea->vDrawColor(0x000000); // Black } bool Window::bLoadROM(const std::string & _rsFilename) { vOnFileClose(); m_sFilename = _rsFilename; const char * csFilename = _rsFilename.c_str(); IMAGE_TYPE eType = utilFindType(csFilename); if (eType == IMAGE_UNKNOWN) { systemMessage(0, _("Unknown file type %s"), csFilename); return false; } bool bLoaded = false; if (eType == IMAGE_GB) { bLoaded = gbLoadRom(csFilename); if (bLoaded) { m_eCartridge = GB_CARTRIDGE; m_stEmulator = GBSystem; //if(sdlAutoIPS) { // int size = gbRomSize; // utilApplyIPS(ipsname, &gbRom, &size); // if(size != gbRomSize) { // extern bool gbUpdateSizes(); // gbUpdateSizes(); // gbReset(); // } //} if (gbBorderOn) { m_iScreenWidth = iSGBScreenWidth; m_iScreenHeight = iSGBScreenHeight; gbBorderLineSkip = iSGBScreenWidth; gbBorderColumnSkip = (iSGBScreenWidth - iGBScreenWidth) / 2; gbBorderRowSkip = (iSGBScreenHeight - iGBScreenHeight) / 2; } else { m_iScreenWidth = iGBScreenWidth; m_iScreenHeight = iGBScreenHeight; gbBorderLineSkip = iGBScreenWidth; gbBorderColumnSkip = 0; gbBorderRowSkip = 0; } // TODO //systemFrameSkip = gbFrameSkip; } } else if (eType == IMAGE_GBA) { int iSize = CPULoadRom(csFilename); bLoaded = (iSize > 0); if (bLoaded) { //sdlApplyPerImagePreferences(); m_eCartridge = GBA_CARTRIDGE; m_stEmulator = GBASystem; // TODO //CPUInit(biosFileName, useBios); useBios = false; CPUInit(NULL, useBios); CPUReset(); //if(sdlAutoIPS) { // int size = 0x2000000; // utilApplyIPS(ipsname, &rom, &size); // if(size != 0x2000000) { // CPUReset(); // } //} m_iScreenWidth = iGBAScreenWidth; m_iScreenHeight = iGBAScreenHeight; // TODO //systemFrameSkip = frameSkip; } } if (! bLoaded) { systemMessage(0, _("Failed to load file %s"), csFilename); return false; } vLoadBattery(); vUpdateScreen(); emulating = 1; if (m_poFilePauseItem->get_active()) { m_poFilePauseItem->set_active(false); } else { vStartEmu(); } return true; } void Window::vLoadBattery() { // TODO : from battery dir std::string sBattery = sCutSuffix(m_sFilename) + ".sav"; if (m_stEmulator.emuReadBattery(sBattery.c_str())) { systemScreenMessage(_("Loaded battery")); } } void Window::vSaveBattery() { // TODO : from battery dir std::string sBattery = sCutSuffix(m_sFilename) + ".sav"; if (m_stEmulator.emuWriteBattery(sBattery.c_str())) { systemScreenMessage(_("Saved battery")); } } void Window::vLoadState(int _iNum) { // TODO } void Window::vSaveState(int _iNum) { // TODO } void Window::vStartEmu() { if (m_oEmuSig.connected()) { return; } m_oEmuSig = Glib::signal_idle().connect(SigC::slot(*this, &Window::bOnEmuIdle), Glib::PRIORITY_DEFAULT_IDLE); } void Window::vStopEmu() { m_oEmuSig.disconnect(); } void Window::vOnFileOpen() { if (m_poFileOpenDialog == NULL) { m_poFileOpenDialog = new Gtk::FileSelection(_("Open a ROM")); } m_poFileOpenDialog->show(); int iResponse = m_poFileOpenDialog->run(); if (iResponse == Gtk::RESPONSE_OK) { if (! bLoadROM(m_poFileOpenDialog->get_filename())) { return; } } m_poFileOpenDialog->hide(); } void Window::vOnFilePause() { if (emulating) { if (m_poFilePauseItem->get_active()) { vStopEmu(); } else { vStartEmu(); } } } void Window::vOnFileReset() { if (emulating) { m_stEmulator.emuReset(); } } void Window::vOnFileClose() { if (emulating) { vSaveBattery(); m_stEmulator.emuCleanUp(); emulating = 0; } m_eCartridge = NO_CARTRIDGE; vStopEmu(); vDrawDefaultScreen(); } void Window::vOnFileQuit() { hide(); } void Window::vOnVideoZoom1x() { m_iScreenScale = 1; vUpdateScreen(); } void Window::vOnVideoZoom2x() { m_iScreenScale = 2; vUpdateScreen(); } void Window::vOnVideoZoom3x() { m_iScreenScale = 3; vUpdateScreen(); } void Window::vOnVideoZoom4x() { m_iScreenScale = 4; vUpdateScreen(); } void Window::vOnHelpAbout() { Glib::RefPtr<Xml> poXml; poXml = Xml::create(PKGDATADIR "/vba.glade", "AboutDialog"); Gtk::Dialog * poDialog = dynamic_cast<Gtk::Dialog *>(poXml->get_widget("AboutDialog")); Gtk::Label * poLabel = dynamic_cast<Gtk::Label *>(poXml->get_widget("VersionLabel")); poLabel->set_markup("<b><big>" PACKAGE " " VERSION "</big></b>"); poDialog->run(); delete poDialog; } bool Window::bOnEmuIdle() { if (emulating) { m_stEmulator.emuMain(m_stEmulator.emuCount); } return true; } bool Window::on_key_press_event(GdkEventKey * _pstEvent) { EKey eKey; if ((_pstEvent->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)) || (eKey = m_oKeymap.eGetKey(_pstEvent->keyval)) == KEY_NONE) { return Gtk::Window::on_key_press_event(_pstEvent); } switch (eKey) { case KEY_A: m_uiJoypadState |= KEYFLAG_A; break; case KEY_B: m_uiJoypadState |= KEYFLAG_B; break; case KEY_SELECT: m_uiJoypadState |= KEYFLAG_SELECT; break; case KEY_START: m_uiJoypadState |= KEYFLAG_START; break; case KEY_RIGHT: m_uiJoypadState |= KEYFLAG_RIGHT; m_uiJoypadState &= ~KEYFLAG_LEFT; break; case KEY_LEFT: m_uiJoypadState |= KEYFLAG_LEFT; m_uiJoypadState &= ~KEYFLAG_RIGHT; break; case KEY_UP: m_uiJoypadState |= KEYFLAG_UP; m_uiJoypadState &= ~KEYFLAG_DOWN; break; case KEY_DOWN: m_uiJoypadState |= KEYFLAG_DOWN; m_uiJoypadState &= ~KEYFLAG_UP; break; case KEY_R: m_uiJoypadState |= KEYFLAG_R; break; case KEY_L: m_uiJoypadState |= KEYFLAG_L; break; case KEY_SPEED: m_uiJoypadState |= KEYFLAG_SPEED; break; case KEY_CAPTURE: m_uiJoypadState |= KEYFLAG_CAPTURE; break; case KEY_NONE: break; } return true; } bool Window::on_key_release_event(GdkEventKey * _pstEvent) { EKey eKey; if ((_pstEvent->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)) || (eKey = m_oKeymap.eGetKey(_pstEvent->keyval)) == KEY_NONE) { return Gtk::Window::on_key_press_event(_pstEvent); } switch (eKey) { case KEY_A: m_uiJoypadState &= ~KEYFLAG_A; break; case KEY_B: m_uiJoypadState &= ~KEYFLAG_B; break; case KEY_SELECT: m_uiJoypadState &= ~KEYFLAG_SELECT; break; case KEY_START: m_uiJoypadState &= ~KEYFLAG_START; break; case KEY_RIGHT: m_uiJoypadState &= ~KEYFLAG_RIGHT; break; case KEY_LEFT: m_uiJoypadState &= ~KEYFLAG_LEFT; break; case KEY_UP: m_uiJoypadState &= ~KEYFLAG_UP; break; case KEY_DOWN: m_uiJoypadState &= ~KEYFLAG_DOWN; break; case KEY_R: m_uiJoypadState &= ~KEYFLAG_R; break; case KEY_L: m_uiJoypadState &= ~KEYFLAG_L; break; case KEY_SPEED: m_uiJoypadState &= ~KEYFLAG_SPEED; break; case KEY_CAPTURE: m_uiJoypadState &= ~KEYFLAG_CAPTURE; break; case KEY_NONE: break; } return true; } } // VBA namespace --- NEW FILE: input.cpp --- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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. // // 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. #include "input.h" #include <new> namespace VBA { Keymap::Keymap() { m_pstTable = g_hash_table_new(g_direct_hash, g_direct_equal); if (m_pstTable == NULL) { throw std::bad_alloc(); } } Keymap::~Keymap() { g_hash_table_destroy(m_pstTable); } void Keymap::vRegister(guint _uiVal, EKey _eKey) { g_hash_table_insert(m_pstTable, GUINT_TO_POINTER(_uiVal), GUINT_TO_POINTER(_eKey)); } void Keymap::vClear() { g_hash_table_destroy(m_pstTable); m_pstTable = g_hash_table_new(g_direct_hash, g_direct_equal); } } // namespace VBA |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:20:11
|
Update of /cvsroot/vba/VisualBoyAdvance/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3551/po Added Files: ChangeLog Makefile.in.in Makevars POTFILES.in Rules-quot boldquot.sed en@boldquot.header en@quot.header fr.gmo fr.po insert-header.sin quot.sed remove-potcdate.sin vba-1.7.2.pot Log Message: GTK+ frontend draft added. --- NEW FILE: en@quot.header --- # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # --- NEW FILE: fr.po --- # French translation for VBA. # # Copyright (C) 2004 VBA development team # This file is distributed under the same license as the VisualBoyAdvance package. # # Sébastien Guignot <kx...@ts...>, 2004. # msgid "" msgstr "" "Project-Id-Version: VisualBoyAdvance 1.7.2\n" "Report-Msgid-Bugs-To: undefined\n" "POT-Creation-Date: 2004-03-29 19:53+0200\n" "PO-Revision-Date: 2004-03-29 20:04+0200\n" "Last-Translator: Sébastien Guignot <kx...@ts...>\n" "Language-Team: French <@>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/gtk/vba.glade:8 msgid "VisualBoyAdvance" msgstr "VisualBoyAdvance" #: src/gtk/vba.glade:35 msgid "_File" msgstr "_Fichier" #: src/gtk/vba.glade:52 msgid "_Pause" msgstr "_Pause" #: src/gtk/vba.glade:61 msgid "_Reset" msgstr "_Reset" #: src/gtk/vba.glade:107 msgid "_Video" msgstr "_Vidéo" #: src/gtk/vba.glade:116 msgid "_Zoom" msgstr "_Zoom" #: src/gtk/vba.glade:125 msgid "_1x" msgstr "_1x" #: src/gtk/vba.glade:134 msgid "_2x" msgstr "_2x" #: src/gtk/vba.glade:144 msgid "_3x" msgstr "_3x" #: src/gtk/vba.glade:154 msgid "_4x" msgstr "_4x" #: src/gtk/vba.glade:172 msgid "_Help" msgstr "_Aide" #: src/gtk/vba.glade:181 msgid "_About" msgstr "à _propos" #: src/gtk/vba.glade:222 msgid "About VBA" msgstr "à propos de VBA" #: src/gtk/vba.glade:287 msgid "An emulator for Gameboy⢠and GameboyAdvanceâ¢." msgstr "Ãmulateur pour Gameboy⢠et GameboyAdvanceâ¢." #: src/gtk/vba.glade:309 msgid "<small>Copyright © 1999-2004 Forgotten</small>" msgstr "<small>Copyright © 1999-2004 Forgotten</small>" #: src/gtk/window.cpp:245 #, c-format msgid "Unknown file type %s" msgstr "Type de fichier inconnu %s" #: src/gtk/window.cpp:324 #, c-format msgid "Failed to load file %s" msgstr "Le chargement du fichier %s a échoué" #: src/gtk/window.cpp:352 msgid "Loaded battery" msgstr "Sauvegarde chargée" #: src/gtk/window.cpp:363 msgid "Saved battery" msgstr "Sauvegarde effectuée" #: src/gtk/window.cpp:397 msgid "Open a ROM" msgstr "Ouvrir une ROM" --- NEW FILE: ChangeLog --- 2004-03-29 gettextize <bug...@gn...> * Makefile.in.in: New file, from gettext-0.14.1. * boldquot.sed: New file, from gettext-0.14.1. * en@boldquot.header: New file, from gettext-0.14.1. * en@quot.header: New file, from gettext-0.14.1. * insert-header.sin: New file, from gettext-0.14.1. * quot.sed: New file, from gettext-0.14.1. * remove-potcdate.sin: New file, from gettext-0.14.1. * Rules-quot: New file, from gettext-0.14.1. --- NEW FILE: quot.sed --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Rules-quot --- # Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en...@qu...sert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en...@qu...sert-header en...@bo...sert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en...@bo...sert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header --- NEW FILE: Makevars --- # Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(GETTEXT_PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = VBA development team # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = undefined # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = --- NEW FILE: POTFILES.in --- # List of source files which containing translatable strings. src/gtk/vba.glade src/gtk/window.cpp --- NEW FILE: en@boldquot.header --- # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # --- NEW FILE: fr.gmo --- (This appears to be a binary file; contents omitted.) --- NEW FILE: boldquot.sed --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Makefile.in.in --- # Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper <dr...@gn...> # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.14 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @echo "touch stamp-po" @echo timestamp > stamp-poT @mv stamp-poT stamp-po # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir); \ else \ cp -p $(srcdir)/$$file $(distdir); \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: --- NEW FILE: remove-potcdate.sin --- # Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } --- NEW FILE: vba-1.7.2.pot --- # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR VBA development team # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: undefined\n" "POT-Creation-Date: 2004-03-29 19:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/gtk/vba.glade:8 msgid "VisualBoyAdvance" msgstr "" #: src/gtk/vba.glade:35 msgid "_File" msgstr "" #: src/gtk/vba.glade:52 msgid "_Pause" msgstr "" #: src/gtk/vba.glade:61 msgid "_Reset" msgstr "" #: src/gtk/vba.glade:107 msgid "_Video" msgstr "" #: src/gtk/vba.glade:116 msgid "_Zoom" msgstr "" #: src/gtk/vba.glade:125 msgid "_1x" msgstr "" #: src/gtk/vba.glade:134 msgid "_2x" msgstr "" #: src/gtk/vba.glade:144 msgid "_3x" msgstr "" #: src/gtk/vba.glade:154 msgid "_4x" msgstr "" #: src/gtk/vba.glade:172 msgid "_Help" msgstr "" #: src/gtk/vba.glade:181 msgid "_About" msgstr "" #: src/gtk/vba.glade:222 msgid "About VBA" msgstr "" #: src/gtk/vba.glade:287 msgid "An emulator for Gameboy⢠and GameboyAdvanceâ¢." msgstr "" #: src/gtk/vba.glade:309 msgid "<small>Copyright © 1999-2004 Forgotten</small>" msgstr "" #: src/gtk/window.cpp:245 #, c-format msgid "Unknown file type %s" msgstr "" #: src/gtk/window.cpp:324 #, c-format msgid "Failed to load file %s" msgstr "" #: src/gtk/window.cpp:352 msgid "Loaded battery" msgstr "" #: src/gtk/window.cpp:363 msgid "Saved battery" msgstr "" #: src/gtk/window.cpp:397 msgid "Open a ROM" msgstr "" --- NEW FILE: insert-header.sin --- # Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:19:19
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3450 Modified Files: arm-new.h Log Message: Little optimization. Index: arm-new.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/arm-new.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** arm-new.h 20 Mar 2004 00:18:33 -0000 1.9 --- arm-new.h 29 Mar 2004 22:07:47 -0000 1.10 *************** *** 275,293 **** #define OP_SUBS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("subco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_RSB \ --- 275,293 ---- #define OP_SUBS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("subco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_RSB \ *************** *** 297,315 **** #define OP_RSBS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("subfco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_ADD \ --- 297,315 ---- #define OP_RSBS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("subfco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_ADD \ *************** *** 320,338 **** #define OP_ADDS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("addco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_ADC \ --- 320,338 ---- #define OP_ADDS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("addco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_ADC \ *************** *** 342,362 **** #define OP_ADCS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("mtspr xer, %4\n" \ ! "addeo. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value), \ ! "r" (C_FLAG << 29) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_SBC \ --- 342,362 ---- #define OP_ADCS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("mtspr xer, %4\n" \ ! "addeo. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value), \ ! "r" (C_FLAG << 29) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_SBC \ *************** *** 366,386 **** #define OP_SBCS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("mtspr xer, %4\n" \ ! "subfeo. %0, %3, %2\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value), \ ! "r" (C_FLAG << 29) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_RSC \ --- 366,386 ---- #define OP_SBCS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("mtspr xer, %4\n" \ ! "subfeo. %0, %3, %2\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value), \ ! "r" (C_FLAG << 29) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_RSC \ *************** *** 390,444 **** #define OP_RSCS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("mtspr xer, %4\n" \ ! "subfeo. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value), \ ! "r" (C_FLAG << 29) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_CMP \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("subco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_CMN \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("addco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } --- 390,444 ---- #define OP_RSCS \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("mtspr xer, %4\n" \ ! "subfeo. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value), \ ! "r" (C_FLAG << 29) \ ! ); \ ! reg[dest].I = Result; \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_CMP \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("subco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } #define OP_CMN \ {\ ! register int Flags; \ ! register int Result; \ ! asm volatile("addco. %0, %2, %3\n" \ ! "mcrxr cr1\n" \ ! "mfcr %1\n" \ ! : "=r" (Result), \ ! "=r" (Flags) \ ! : "r" (reg[base].I), \ ! "r" (value) \ ! ); \ ! Z_FLAG = (Flags >> 29) & 1; \ ! N_FLAG = (Flags >> 31) & 1; \ ! C_FLAG = (Flags >> 25) & 1; \ ! V_FLAG = (Flags >> 26) & 1; \ } *************** *** 1475,1478 **** --- 1475,1842 ---- break; + #define LOGICAL_DATA_OPCODE_WITHOUT_base(OPCODE, OPCODE2, BASE) \ + case BASE: \ + case BASE+8:\ + {\ + /* OP Rd,Rb,Rm LSL # */ \ + int shift = (opcode >> 7) & 0x1F;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + \ + if(shift) {\ + LOGICAL_LSL_REG\ + } else {\ + value = reg[opcode & 0x0F].I;\ + }\ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+2:\ + case BASE+10:\ + {\ + /* OP Rd,Rb,Rm LSR # */ \ + int shift = (opcode >> 7) & 0x1F;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift) {\ + LOGICAL_LSR_REG\ + } else {\ + value = 0;\ + C_OUT = (reg[opcode & 0x0F].I & 0x80000000) ? true : false;\ + }\ + \ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+4:\ + case BASE+12:\ + {\ + /* OP Rd,Rb,Rm ASR # */\ + int shift = (opcode >> 7) & 0x1F;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift) {\ + LOGICAL_ASR_REG\ + } else {\ + if(reg[opcode & 0x0F].I & 0x80000000){\ + value = 0xFFFFFFFF;\ + C_OUT = true;\ + } else {\ + value = 0;\ + C_OUT = false;\ + } \ + }\ + \ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+6:\ + case BASE+14:\ + {\ + /* OP Rd,Rb,Rm ROR # */\ + int shift = (opcode >> 7) & 0x1F;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift) {\ + LOGICAL_ROR_REG\ + } else {\ + LOGICAL_RRX_REG\ + }\ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+1:\ + {\ + /* OP Rd,Rb,Rm LSL Rs */\ + clockTicks++;\ + int shift = reg[(opcode >> 8)&15].B.B0;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift) {\ + if(shift == 32) {\ + value = 0;\ + C_OUT = (reg[opcode & 0x0F].I & 1 ? true : false);\ + } else if(shift < 32) {\ + LOGICAL_LSL_REG\ + } else {\ + value = 0;\ + C_OUT = false;\ + }\ + } else {\ + value = reg[opcode & 0x0F].I;\ + }\ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+3:\ + {\ + /* OP Rd,Rb,Rm LSR Rs */ \ + clockTicks++;\ + int shift = reg[(opcode >> 8)&15].B.B0;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift) {\ + if(shift == 32) {\ + value = 0;\ + C_OUT = (reg[opcode & 0x0F].I & 0x80000000 ? true : false);\ + } else if(shift < 32) {\ + LOGICAL_LSR_REG\ + } else {\ + value = 0;\ + C_OUT = false;\ + }\ + } else {\ + value = reg[opcode & 0x0F].I;\ + }\ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+5:\ + {\ + /* OP Rd,Rb,Rm ASR Rs */ \ + clockTicks++;\ + int shift = reg[(opcode >> 8)&15].B.B0;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift < 32) {\ + if(shift) {\ + LOGICAL_ASR_REG\ + } else {\ + value = reg[opcode & 0x0F].I;\ + }\ + } else {\ + if(reg[opcode & 0x0F].I & 0x80000000){\ + value = 0xFFFFFFFF;\ + C_OUT = true;\ + } else {\ + value = 0;\ + C_OUT = false;\ + }\ + }\ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+7:\ + {\ + /* OP Rd,Rb,Rm ROR Rs */\ + clockTicks++;\ + int shift = reg[(opcode >> 8)&15].B.B0;\ + int dest = (opcode>>12) & 15;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift) {\ + shift &= 0x1f;\ + if(shift) {\ + LOGICAL_ROR_REG\ + } else {\ + value = reg[opcode & 0x0F].I;\ + C_OUT = (value & 0x80000000 ? true : false);\ + }\ + } else {\ + value = reg[opcode & 0x0F].I;\ + C_OUT = (value & 0x80000000 ? true : false);\ + }\ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break;\ + case BASE+0x200:\ + case BASE+0x201:\ + case BASE+0x202:\ + case BASE+0x203:\ + case BASE+0x204:\ + case BASE+0x205:\ + case BASE+0x206:\ + case BASE+0x207:\ + case BASE+0x208:\ + case BASE+0x209:\ + case BASE+0x20a:\ + case BASE+0x20b:\ + case BASE+0x20c:\ + case BASE+0x20d:\ + case BASE+0x20e:\ + case BASE+0x20f:\ + {\ + int shift = (opcode & 0xF00) >> 7;\ + int dest = (opcode >> 12) & 0x0F;\ + bool C_OUT = C_FLAG;\ + u32 value;\ + if(shift) {\ + LOGICAL_ROR_IMM\ + } else {\ + value = opcode & 0xff;\ + }\ + if(dest == 15) {\ + OPCODE2\ + /* todo */\ + if(opcode & 0x00100000) {\ + clockTicks++;\ + CPUSwitchMode(reg[17].I & 0x1f, false);\ + }\ + if(armState) {\ + reg[15].I &= 0xFFFFFFFC;\ + armNextPC = reg[15].I;\ + reg[15].I += 4;\ + } else {\ + reg[15].I &= 0xFFFFFFFE;\ + armNextPC = reg[15].I;\ + reg[15].I += 2;\ + }\ + } else {\ + OPCODE \ + }\ + }\ + break; + #define ARITHMETIC_DATA_OPCODE(OPCODE, OPCODE2, BASE) \ case BASE:\ *************** *** 1889,1894 **** if(cond_res) { switch(((opcode>>16)&0xFF0) | ((opcode>>4)&0x0F)) { ! LOGICAL_DATA_OPCODE(OP_AND, OP_AND, 0x000); ! LOGICAL_DATA_OPCODE(OP_ANDS, OP_AND, 0x010); case 0x009: { --- 2253,2258 ---- if(cond_res) { switch(((opcode>>16)&0xFF0) | ((opcode>>4)&0x0F)) { ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_AND, OP_AND, 0x000); ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_ANDS, OP_AND, 0x010); case 0x009: { *************** *** 2527,2532 **** } break; ! LOGICAL_DATA_OPCODE(OP_EOR, OP_EOR, 0x020); ! LOGICAL_DATA_OPCODE(OP_EORS, OP_EOR, 0x030); case 0x029: { --- 2891,2896 ---- } break; ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_EOR, OP_EOR, 0x020); ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_EORS, OP_EOR, 0x030); case 0x029: { *************** *** 2862,2873 **** } break; ! LOGICAL_DATA_OPCODE(OP_ORR, OP_ORR, 0x180); ! LOGICAL_DATA_OPCODE(OP_ORRS, OP_ORR, 0x190); ! LOGICAL_DATA_OPCODE(OP_MOV, OP_MOV, 0x1a0); ! LOGICAL_DATA_OPCODE(OP_MOVS, OP_MOV, 0x1b0); ! LOGICAL_DATA_OPCODE(OP_BIC, OP_BIC, 0x1c0); ! LOGICAL_DATA_OPCODE(OP_BICS, OP_BIC, 0x1d0); ! LOGICAL_DATA_OPCODE(OP_MVN, OP_MVN, 0x1e0); ! LOGICAL_DATA_OPCODE(OP_MVNS, OP_MVN, 0x1f0); #ifdef BKPT_SUPPORT case 0x127: --- 3226,3237 ---- } break; ! LOGICAL_DATA_OPCODE (OP_ORR, OP_ORR, 0x180); ! LOGICAL_DATA_OPCODE (OP_ORRS, OP_ORR, 0x190); ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_MOV, OP_MOV, 0x1a0); ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_MOVS, OP_MOV, 0x1b0); ! LOGICAL_DATA_OPCODE (OP_BIC, OP_BIC, 0x1c0); ! LOGICAL_DATA_OPCODE (OP_BICS, OP_BIC, 0x1d0); ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_MVN, OP_MVN, 0x1e0); ! LOGICAL_DATA_OPCODE_WITHOUT_base(OP_MVNS, OP_MVN, 0x1f0); #ifdef BKPT_SUPPORT case 0x127: *************** *** 6133,6138 **** // LDMIA Rn, {Rlist}^ int base = (opcode & 0x000F0000) >> 16; - u32 temp = reg[base].I + - 4 * (cpuBitsSet[opcode & 255] + cpuBitsSet[(opcode >> 8) & 255]); u32 address = reg[base].I & 0xFFFFFFFC; clockTicks += 2; --- 6497,6500 ---- *************** *** 6585,6590 **** // LDMIB Rn, {Rlist}^ int base = (opcode & 0x000F0000) >> 16; - u32 temp = reg[base].I + - 4 * (cpuBitsSet[opcode & 255] + cpuBitsSet[(opcode >> 8) & 255]); u32 address = (reg[base].I+4) & 0xFFFFFFFC; clockTicks += 2; --- 6947,6950 ---- |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:16:45
|
Update of /cvsroot/vba/VisualBoyAdvance/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3047/po Log Message: Directory /cvsroot/vba/VisualBoyAdvance/po added to the repository |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:16:13
|
Update of /cvsroot/vba/VisualBoyAdvance/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2794/m4 Log Message: Directory /cvsroot/vba/VisualBoyAdvance/m4 added to the repository |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:11:26
|
Update of /cvsroot/vba/VisualBoyAdvance/src/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1751/gtk Log Message: Directory /cvsroot/vba/VisualBoyAdvance/src/gtk added to the repository |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:11:26
|
Update of /cvsroot/vba/VisualBoyAdvance/src/sdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1751/sdl Log Message: Directory /cvsroot/vba/VisualBoyAdvance/src/sdl added to the repository |
From: S?bastien G. <kx...@us...> - 2004-03-29 22:09:04
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1315 Modified Files: Gfx.h Log Message: Fixed the mosaic rendering. Index: Gfx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Gfx.h 20 Mar 2004 00:18:33 -0000 1.11 --- Gfx.h 29 Mar 2004 21:57:33 -0000 1.12 *************** *** 252,258 **** } if(mosaicOn) { ! for(int i = 0; i < 240; i+=2) { ! for(int m = 1; m < mosaicX; m++) { ! line[i] = line[i-1]; i++; } } --- 252,264 ---- } if(mosaicOn) { ! if(mosaicX > 1) { ! int m = 1; ! for(int i = 0; i < 239; i++) { ! line[i+1] = line[i]; ! m++; ! if(m == mosaicX) { ! m = 1; ! i++; ! } } } *************** *** 412,418 **** if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! for(int i = 0; i < 240; i+=2) { ! for(int m = 1; m < mosaicX; m++) { ! line[i] = line[i-1]; i++; } } --- 418,430 ---- if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! if(mosaicX > 1) { ! int m = 1; ! for(int i = 0; i < 239; i++) { ! line[i+1] = line[i]; ! m++; ! if(m == mosaicX) { ! m = 1; ! i++; ! } } } *************** *** 503,509 **** if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! for(int i = 0; i < 240; i+=2) { ! for(int m = 1; m < mosaicX; m++) { ! line[i] = line[i-1]; i++; } } --- 515,527 ---- if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! if(mosaicX > 1) { ! int m = 1; ! for(int i = 0; i < 239; i++) { ! line[i+1] = line[i]; ! m++; ! if(m == mosaicX) { ! m = 1; ! i++; ! } } } *************** *** 598,604 **** if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! for(int i = 0; i < 240; i+=2) { ! for(int m = 1; m < mosaicX; m++) { ! line[i] = line[i-1]; i++; } } --- 616,628 ---- if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! if(mosaicX > 1) { ! int m = 1; ! for(int i = 0; i < 239; i++) { ! line[i+1] = line[i]; ! m++; ! if(m == mosaicX) { ! m = 1; ! i++; ! } } } *************** *** 691,697 **** if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! for(int i = 0; i < 240; i+=2) { ! for(int m = 1; m < mosaicX; m++) { ! line[i] = line[i-1]; i++; } } --- 715,727 ---- if(control & 0x40) { int mosaicX = (MOSAIC & 0xF) + 1; ! if(mosaicX > 1) { ! int m = 1; ! for(int i = 0; i < 239; i++) { ! line[i+1] = line[i]; ! m++; ! if(m == mosaicX) { ! m = 1; ! i++; ! } } } |
From: Forgotten <for...@us...> - 2004-03-20 00:28:27
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11808/src Modified Files: GBA.cpp Gfx.h arm-new.h thumb.h Log Message: Final updates Index: Gfx.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/Gfx.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Gfx.h 16 Feb 2004 03:08:40 -0000 1.10 --- Gfx.h 20 Mar 2004 00:18:33 -0000 1.11 *************** *** 26,29 **** --- 26,31 ---- #include "Port.h" + //#define SPRITE_DEBUG + void gfxDrawTextScreen(u16, u16, u16, u32 *); void gfxDrawRotScreen(u16, *************** *** 763,766 **** --- 765,773 ---- } + #ifdef SPRITE_DEBUG + int maskX = sizeX-1; + int maskY = sizeY-1; + #endif + int sy = (a0 & 255); *************** *** 828,844 **** (xxx & 7))&0x7FFF)]; if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[color]) | prio; } if (a0 & 0x1000) { - if (m) - lineOBJ[sx]=lineOBJ[sx-1]; m++; if (m==mosaicX) m=0; } } sx = (sx+1)&511;; --- 835,857 ---- (xxx & 7))&0x7FFF)]; if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) { lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! if((a0 & 0x1000) && m) ! lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; ! } else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[color]) | prio; + if((a0 & 0x1000) && m) + lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; } if (a0 & 0x1000) { m++; if (m==mosaicX) m=0; } + #ifdef SPRITE_DEBUG + if(t == 0 || t == maskY || x == 0 || x == maskX) + lineOBJ[sx] = 0x001F; + #endif } sx = (sx+1)&511;; *************** *** 871,887 **** if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[palette+color]) | prio; } } ! if (a0 & 0x1000) { ! if (m) ! lineOBJ[sx]=lineOBJ[sx-1]; m++; if (m==mosaicX) m=0; } sx = (sx+1)&511;; realX += dx; --- 884,907 ---- if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) { lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! if((a0 & 0x1000) && m) ! lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; ! } else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[palette+color]) | prio; + if((a0 & 0x1000) && m) + lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; } } ! if((a0 & 0x1000) && m) { m++; if (m==mosaicX) m=0; } + + #ifdef SPRITE_DEBUG + if(t == 0 || t == maskY || x == 0 || x == maskX) + lineOBJ[sx] = 0x001F; + #endif sx = (sx+1)&511;; realX += dx; *************** *** 929,944 **** u8 color = vram[address]; if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[color]) | prio; } if (a0 & 0x1000) { - if (m) - lineOBJ[sx]=lineOBJ[sx-1]; m++; if (m==mosaicX) m=0; } } --- 949,972 ---- u8 color = vram[address]; if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) { lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! if((a0 & 0x1000) && m) ! lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; ! } else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[color]) | prio; + if((a0 & 0x1000) && m) + lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; } + if (a0 & 0x1000) { m++; if (m==mosaicX) m=0; } + + #ifdef SPRITE_DEBUG + if(t == 0 || t == maskY || xx == 0 || xx == maskX) + lineOBJ[sx] = 0x001F; + #endif } *************** *** 998,1014 **** if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[palette + color]) | prio; } } if (a0 & 0x1000) { - if (m) - lineOBJ[sx]=lineOBJ[sx-1]; m++; if (m==mosaicX) m=0; } sx = (sx+1) & 511; xxx--; --- 1026,1048 ---- if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) { lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! if((a0 & 0x1000) && m) ! lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; ! } else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[palette + color]) | prio; + if((a0 & 0x1000) && m) + lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; } } if (a0 & 0x1000) { m++; if (m==mosaicX) m=0; } + #ifdef SPRITE_DEBUG + if(t == 0 || t == maskY || xx == 0 || xx == maskX) + lineOBJ[sx] = 0x001F; + #endif sx = (sx+1) & 511; xxx--; *************** *** 1032,1048 **** if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[palette + color]) | prio; } } if (a0 & 0x1000) { - if (m) - lineOBJ[sx]=lineOBJ[sx-1]; m++; if (m==mosaicX) m=0; } sx = (sx+1) & 511; xxx++; --- 1066,1089 ---- if ((color==0) && (((prio >> 25)&3) < ! ((lineOBJ[sx]>>25)&3))) { lineOBJ[sx] = (lineOBJ[sx] & 0xF9FFFFFF) | prio; ! if((a0 & 0x1000) && m) ! lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; ! } else if((color) && (prio < (lineOBJ[sx]&0xFF000000))) { lineOBJ[sx] = READ16LE(&spritePalette[palette + color]) | prio; + if((a0 & 0x1000) && m) + lineOBJ[sx]=(lineOBJ[sx-1] & 0xF9FFFFFF) | prio; + } } if (a0 & 0x1000) { m++; if (m==mosaicX) m=0; } + #ifdef SPRITE_DEBUG + if(t == 0 || t == maskY || xx == 0 || xx == maskX) + lineOBJ[sx] = 0x001F; + #endif sx = (sx+1) & 511; xxx++; Index: arm-new.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/arm-new.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** arm-new.h 8 Dec 2003 11:38:17 -0000 1.8 --- arm-new.h 20 Mar 2004 00:18:33 -0000 1.9 *************** *** 1817,1821 **** u32 opcode = CPUReadMemoryQuick(armNextPC); ! clockTicks = memoryWait32[(armNextPC >> 24) & 15]; #ifndef FINAL_VERSION --- 1817,1821 ---- u32 opcode = CPUReadMemoryQuick(armNextPC); ! clockTicks = memoryWaitFetch32[(armNextPC >> 24) & 15]; #ifndef FINAL_VERSION Index: thumb.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/thumb.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** thumb.h 4 Nov 2003 14:11:52 -0000 1.9 --- thumb.h 20 Mar 2004 00:18:34 -0000 1.10 *************** *** 764,768 **** u32 opcode = CPUReadHalfWordQuick(armNextPC); ! clockTicks = thumbCycles[opcode >> 8] + cpuMemoryWait[(armNextPC >> 24) & 15]; #ifndef FINAL_VERSION if(armNextPC == stop) { --- 764,768 ---- u32 opcode = CPUReadHalfWordQuick(armNextPC); ! clockTicks = thumbCycles[opcode >> 8] + memoryWaitFetch[(armNextPC >> 24) & 15]; #ifndef FINAL_VERSION if(armNextPC == stop) { Index: GBA.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/GBA.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** GBA.cpp 6 Feb 2004 11:26:58 -0000 1.52 --- GBA.cpp 20 Mar 2004 00:18:33 -0000 1.53 *************** *** 165,169 **** { 0, 0, 2, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0 }; int memoryWait32[16] = ! { 0, 0, 6, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 0 }; int memoryWaitSeq[16] = { 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 4, 4, 8, 8, 4, 0 }; --- 165,169 ---- { 0, 0, 2, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0 }; int memoryWait32[16] = ! { 0, 0, 9, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 0 }; int memoryWaitSeq[16] = { 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 4, 4, 8, 8, 4, 0 }; *************** *** 529,540 **** } ! inline void CPUUpdateTicks(int &cpuLoopTicks) { ! cpuLoopTicks = lcdTicks; if(soundTicks < cpuLoopTicks) cpuLoopTicks = soundTicks; ! if(timer0On && (timer0Ticks < cpuLoopTicks)) { cpuLoopTicks = timer0Ticks; } --- 529,540 ---- } ! inline int CPUUpdateTicks() { ! int cpuLoopTicks = lcdTicks; if(soundTicks < cpuLoopTicks) cpuLoopTicks = soundTicks; ! if(timer0On && !(TM0CNT & 4) && (timer0Ticks < cpuLoopTicks)) { cpuLoopTicks = timer0Ticks; } *************** *** 556,559 **** --- 556,560 ---- #endif cpuSavedTicks = cpuLoopTicks; + return cpuLoopTicks; } *************** *** 2650,2690 **** break; case 0x204: - memoryWait[0x0e] = memoryWaitSeq[0x0e] = gamepakRamWaitState[value & 3]; - - if(!speedHack) { - memoryWait[0x08] = memoryWait[0x09] = gamepakWaitState[(value >> 2) & 7]; - memoryWaitSeq[0x08] = memoryWaitSeq[0x09] = - gamepakWaitState0[(value >> 2) & 7]; - - memoryWait[0x0a] = memoryWait[0x0b] = gamepakWaitState[(value >> 5) & 7]; - memoryWaitSeq[0x0a] = memoryWaitSeq[0x0b] = - gamepakWaitState1[(value >> 5) & 7]; - - memoryWait[0x0c] = memoryWait[0x0d] = gamepakWaitState[(value >> 8) & 7]; - memoryWaitSeq[0x0c] = memoryWaitSeq[0x0d] = - gamepakWaitState2[(value >> 8) & 7]; - } else { - memoryWait[0x08] = memoryWait[0x09] = 4; - memoryWaitSeq[0x08] = memoryWaitSeq[0x09] = 2; - - memoryWait[0x0a] = memoryWait[0x0b] = 4; - memoryWaitSeq[0x0a] = memoryWaitSeq[0x0b] = 4; - - memoryWait[0x0c] = memoryWait[0x0d] = 4; - memoryWaitSeq[0x0c] = memoryWaitSeq[0x0d] = 8; - } { ! for(int i = 0; i < 16; i++) { memoryWaitFetch32[i] = memoryWait32[i] = memoryWait[i] * (memory32[i] ? 1 : 2); memoryWaitFetch[i] = memoryWait[i]; } ! } ! if(value & 0x4000) { ! for(int i = 0; i < 16; i++) { ! memoryWaitFetch32[i] = memoryWaitFetch[i] = cpuMemoryWait[i]; } } - UPDATE_REG(0x204, value); break; case 0x208: --- 2651,2696 ---- break; case 0x204: { ! int i; ! memoryWait[0x0e] = memoryWaitSeq[0x0e] = gamepakRamWaitState[value & 3]; ! ! if(!speedHack) { ! memoryWait[0x08] = memoryWait[0x09] = gamepakWaitState[(value >> 2) & 7]; ! memoryWaitSeq[0x08] = memoryWaitSeq[0x09] = ! gamepakWaitState0[(value >> 2) & 7]; ! ! memoryWait[0x0a] = memoryWait[0x0b] = gamepakWaitState[(value >> 5) & 7]; ! memoryWaitSeq[0x0a] = memoryWaitSeq[0x0b] = ! gamepakWaitState1[(value >> 5) & 7]; ! ! memoryWait[0x0c] = memoryWait[0x0d] = gamepakWaitState[(value >> 8) & 7]; ! memoryWaitSeq[0x0c] = memoryWaitSeq[0x0d] = ! gamepakWaitState2[(value >> 8) & 7]; ! } else { ! memoryWait[0x08] = memoryWait[0x09] = 4; ! memoryWaitSeq[0x08] = memoryWaitSeq[0x09] = 2; ! ! memoryWait[0x0a] = memoryWait[0x0b] = 4; ! memoryWaitSeq[0x0a] = memoryWaitSeq[0x0b] = 4; ! ! memoryWait[0x0c] = memoryWait[0x0d] = 4; ! memoryWaitSeq[0x0c] = memoryWaitSeq[0x0d] = 8; ! } ! for(i = 0; i < 16; i++) { memoryWaitFetch32[i] = memoryWait32[i] = memoryWait[i] * (memory32[i] ? 1 : 2); memoryWaitFetch[i] = memoryWait[i]; } ! memoryWaitFetch32[3] += 1; ! memoryWaitFetch32[2] += 3; ! ! if(value & 0x4000) { ! for(i = 8; i < 16; i++) { ! memoryWaitFetch32[i] = 2*cpuMemoryWait[i]; ! memoryWaitFetch[i] = cpuMemoryWait[i]; ! } } + UPDATE_REG(0x204, value); } break; case 0x208: *************** *** 3348,3352 **** extTicks = &ticks; ! CPUUpdateTicks(cpuLoopTicks); if(cpuLoopTicks > ticks) { cpuLoopTicks = ticks; --- 3354,3358 ---- extTicks = &ticks; ! cpuLoopTicks = CPUUpdateTicks(); if(cpuLoopTicks > ticks) { cpuLoopTicks = ticks; *************** *** 3423,3426 **** --- 3429,3433 ---- clockTicks = cpuSavedTicks;// + cpuLoopTicks; } + cpuDmaTicksToUpdate = -cpuLoopTicks; updateLoop: *************** *** 3866,3870 **** ticks -= clockTicks; ! CPUUpdateTicks(cpuLoopTicks); if(cpuDmaTicksToUpdate > 0) { --- 3873,3877 ---- ticks -= clockTicks; ! cpuLoopTicks = CPUUpdateTicks(); if(cpuDmaTicksToUpdate > 0) { |
From: Forgotten <for...@us...> - 2004-03-20 00:28:26
|
Update of /cvsroot/vba/VisualBoyAdvance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11808 Modified Files: ChangeLog Added Files: ChangeLog.1.7.1 Log Message: Final updates --- NEW FILE: ChangeLog.1.7.1 --- 2004-02-07 Forgotten <for...@us...> * src/SDL.cpp (main): disable remove intros option * src/win32/MainWndOptions.cpp (OnUpdateOptionsEmulatorRemoveintrosgba): disable remove intros option * src/win32/MainWnd.cpp: disable remove intros option * src/win32/VBA.cpp: fix power management code * src/win32/MainWnd.cpp (OnMySysCommand): fix power management code * src/win32/MainWndFile.cpp: fix power management code 2004-02-06 Forgotten <for...@us...> * src/Sound.cpp (soundSetQuality): avoid turning sound on if sound off is checked * src/gb/gbSound.cpp (gbSoundSetQuality): avoid turning sound on if sound off is checked * src/GBA.cpp (CPUSoftwareInterrupt): added SWI call to exit emulator 2004-02-05 Forgotten <for...@us...> * src/win32/MainWnd.cpp (FileRun): update battery file more often * src/win32/VBA.cpp (system10Frames): update battery file more often * src/gb/gbMemory.cpp: update battery file more often * src/gb/GB.cpp: update battery file more often * src/System.h: update battery file more often * src/Sram.cpp (sramWrite): update battery file more often * src/SDL.cpp (main): update battery file more often * src/GBA.cpp: update battery file more often * src/Flash.cpp (flashWrite): update battery file more often * src/EEprom.cpp (eepromWrite): update battery file more often 2004-01-30 Forgotten <for...@us...> * src/win32/OpenGL.cpp (render): fix memory leak in OpenGL rendering 2004-01-29 Forgotten <for...@us...> * src/gb/gbCodes.h: fix HALT when no matching in IE and IF 2004-01-28 Forgotten <for...@us...> * src/prof/prof.cpp: fix compile warnings * src/win32/MainWndTools.cpp: switch to use structure functions * src/win32/MainWndFile.cpp: switch to use structure functions * src/win32/VBA.cpp (VBA): use structure instead of individual functions for emulation * src/win32/VBA.h (class VBA): use structure instead of individual functions for emulation * src/win32/MainWnd.cpp: switch to use structure functions * src/System.h: structure for emulator functions * src/win32/MainWnd.cpp (FileRun): save rom size for later use * src/win32/BugReport.cpp (createReport): include cart save strings to bug report 2004-01-25 Forgotten <for...@us...> * src/win32/AboutDialog.cpp (OnInitDialog): fix problem with translator URLs not working correctly and force URL to new site * src/win32/MainWndHelp.cpp (OnHelpFaq): update FAQ URL to new site 2004-01-21 Forgotten <for...@us...> * src/Util.cpp (utilLoad): fix possible memory corruption when loading files with a passed in memory location 2004-01-20 Forgotten <for...@us...> * src/Port.h (READ32LE): big endian updates from flea * src/GBA.cpp: big endian updates from flea * src/Cheats.cpp: big endian updates from flea * src/win32/VBA.cpp (VBA): initialize default GB color palette * src/win32/Direct3D.cpp (initialize): avoid resetting GB colors set by user * src/win32/OpenGL.cpp (initialize): avoid resetting GB colors set by user * src/win32/GDIDisplay.cpp (initialize): avoid resetting GB colors set by user * src/win32/DirectDraw.cpp (initializeOffscreen): avoid resetting GB colors set by user 2004-01-19 Forgotten <for...@us...> * src/gb/GB.cpp (gbEmulate): reset the window line before starting a new frame * src/elf.cpp (elfRead): fix memory leak * src/GBA.cpp (CPULoadRom): avoid crash with invalid ELF file 2004-01-18 Forgotten <for...@us...> * src/win32/FileDlg.cpp (FileDlg): fix problem on 320x240 mode * src/win32/ZoomControl.cpp (OnPaint): fix crash on map/oam/tile viewer 2004-01-16 Forgotten <for...@us...> * win32/GBMemoryViewerDlg.cpp (OnLoad): fixed bug loading memory dump * win32/MemoryViewerDlg.cpp (OnLoad): fixed bug loading memory dump 2004-01-15 Forgotten <for...@us...> * win32/VBA.cpp: store throttle value 2004-01-14 Forgotten <for...@us...> * win32/VBA.cpp (adjustDestRect): fix multi-mon support * win32/FileDlg.cpp (FileDlg): fix problem on VC 7.1 * win32/MainWnd.cpp (OnActivateApp): fix compile errors on VC 7.1 * win32/GBCheatsDlg.cpp: fix compile errors on VC 7.1 * win32/GBACheats.cpp: fix compile errors on VC 7.1 * bios.cpp: fix compile errors on VC 7.1 Index: ChangeLog =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/ChangeLog,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** ChangeLog 7 Feb 2004 14:07:28 -0000 1.68 --- ChangeLog 20 Mar 2004 00:18:32 -0000 1.69 *************** *** 1,97 **** ! 2004-02-07 Forgotten <for...@us...> ! ! * src/SDL.cpp (main): disable remove intros option ! * src/win32/MainWndOptions.cpp (OnUpdateOptionsEmulatorRemoveintrosgba): disable remove intros option ! * src/win32/MainWnd.cpp: disable remove intros option ! * src/win32/VBA.cpp: fix power management code ! * src/win32/MainWnd.cpp (OnMySysCommand): fix power management code ! * src/win32/MainWndFile.cpp: fix power management code ! ! 2004-02-06 Forgotten <for...@us...> ! ! * src/Sound.cpp (soundSetQuality): avoid turning sound on if sound off is checked ! * src/gb/gbSound.cpp (gbSoundSetQuality): avoid turning sound on if sound off is checked ! * src/GBA.cpp (CPUSoftwareInterrupt): added SWI call to exit emulator ! ! 2004-02-05 Forgotten <for...@us...> ! ! * src/win32/MainWnd.cpp (FileRun): update battery file more often ! * src/win32/VBA.cpp (system10Frames): update battery file more often ! * src/gb/gbMemory.cpp: update battery file more often ! * src/gb/GB.cpp: update battery file more often ! * src/System.h: update battery file more often ! * src/Sram.cpp (sramWrite): update battery file more often ! * src/SDL.cpp (main): update battery file more often ! * src/GBA.cpp: update battery file more often ! * src/Flash.cpp (flashWrite): update battery file more often ! * src/EEprom.cpp (eepromWrite): update battery file more often ! ! 2004-01-30 Forgotten <for...@us...> ! ! * src/win32/OpenGL.cpp (render): fix memory leak in OpenGL rendering ! ! 2004-01-29 Forgotten <for...@us...> ! ! * src/gb/gbCodes.h: fix HALT when no matching in IE and IF ! ! 2004-01-28 Forgotten <for...@us...> ! ! * src/prof/prof.cpp: fix compile warnings ! * src/win32/MainWndTools.cpp: switch to use structure functions ! * src/win32/MainWndFile.cpp: switch to use structure functions ! * src/win32/VBA.cpp (VBA): use structure instead of individual functions for emulation ! * src/win32/VBA.h (class VBA): use structure instead of individual functions for emulation ! * src/win32/MainWnd.cpp: switch to use structure functions ! * src/System.h: structure for emulator functions ! * src/win32/MainWnd.cpp (FileRun): save rom size for later use ! * src/win32/BugReport.cpp (createReport): include cart save strings to bug report ! ! 2004-01-25 Forgotten <for...@us...> ! ! * src/win32/AboutDialog.cpp (OnInitDialog): fix problem with translator URLs not working correctly and force URL to new site ! * src/win32/MainWndHelp.cpp (OnHelpFaq): update FAQ URL to new site ! ! 2004-01-21 Forgotten <for...@us...> ! * src/Util.cpp (utilLoad): fix possible memory corruption when loading files with a passed in memory location ! 2004-01-20 Forgotten <for...@us...> ! * src/Port.h (READ32LE): big endian updates from flea ! * src/GBA.cpp: big endian updates from flea ! * src/Cheats.cpp: big endian updates from flea ! * src/win32/VBA.cpp (VBA): initialize default GB color palette ! * src/win32/Direct3D.cpp (initialize): avoid resetting GB colors set by user ! * src/win32/OpenGL.cpp (initialize): avoid resetting GB colors set by user ! * src/win32/GDIDisplay.cpp (initialize): avoid resetting GB colors set by user ! * src/win32/DirectDraw.cpp (initializeOffscreen): avoid resetting GB colors set by user ! 2004-01-19 Forgotten <for...@us...> ! * src/gb/GB.cpp (gbEmulate): reset the window line before starting a new frame ! * src/elf.cpp (elfRead): fix memory leak ! * src/GBA.cpp (CPULoadRom): avoid crash with invalid ELF file ! 2004-01-18 Forgotten <for...@us...> ! * src/win32/FileDlg.cpp (FileDlg): fix problem on 320x240 mode ! * src/win32/ZoomControl.cpp (OnPaint): fix crash on map/oam/tile viewer ! 2004-01-16 Forgotten <for...@us...> ! * win32/GBMemoryViewerDlg.cpp (OnLoad): fixed bug loading memory dump ! * win32/MemoryViewerDlg.cpp (OnLoad): fixed bug loading memory dump ! 2004-01-15 Forgotten <for...@us...> ! * win32/VBA.cpp: store throttle value ! 2004-01-14 Forgotten <for...@us...> ! * win32/VBA.cpp (adjustDestRect): fix multi-mon support ! * win32/FileDlg.cpp (FileDlg): fix problem on VC 7.1 ! * win32/MainWnd.cpp (OnActivateApp): fix compile errors on VC 7.1 ! * win32/GBCheatsDlg.cpp: fix compile errors on VC 7.1 ! * win32/GBACheats.cpp: fix compile errors on VC 7.1 ! * bios.cpp: fix compile errors on VC 7.1 --- 1,38 ---- ! 2004-03-11 Forgotten <for...@us...> ! * src/win32/MainWndFile.cpp: changed import/export battery file to default to battery directory ! 2004-03-10 Forgotten <for...@us...> ! * src/win32/DirectSound.cpp (class DirectSound): make destructor virtual to avoid problems when deleting ! * src/win32/Sound.h (class ISound ): make destructor virtual to avoid problems when changing sound quality ! 2004-03-09 Forgotten <for...@us...> ! * src/elf.cpp (elfCleanUp): fix corruption on ELF clean up ! 2004-03-08 Forgotten <for...@us...> ! * src/win32/MapView.cpp (enableButtons): fix radio button bug using keyboard ! * src/win32/GBMapView.cpp (OnInitDialog): fix radio button bug using keyboard ! * src/win32/MapView.cpp (GetClickAddress): fixes for rot. bgs ! 2004-02-29 Forgotten <for...@us...> ! * src/win32/skin.cpp (GetSkinData): allow for JPEG and PNG images to also be loaded ! 2004-02-24 Forgotten <for...@us...> ! * src/admame.cpp: sync code with Scale2x 2.0 ! * src/Cheats.cpp (cheatsCheckKeys): improve CodeBreaker 0xDxxxxxxx code support ! 2004-02-17 Forgotten <for...@us...> ! * src/win32/skinButton.cpp (OnPaint): fix GDI problems with selected bitmap being deleted ! * src/win32/ZoomControl.cpp (OnPaint): fix GDI problems with selected bitmap being deleted ! * src/win32/PaletteViewControl.cpp (OnPaint): fix GDI problems with selected bitmap being deleted ! * src/win32/MemoryViewer.cpp (OnPaint): fix GDI problems with selected bitmap being deleted ! * src/win32/BitmapControl.cpp (OnDraw): fix GDI problems with selected bitmap being deleted ! * src/win32/VBA.cpp (winSetLanguageOption): patch for searching for base language dll ! * elf.cpp (elfRead): fix problem caused by previous memory leak fix |
From: <for...@us...> - 2004-03-11 11:36:42
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26660 Modified Files: MainWndFile.cpp Log Message: Change default directory for import/export battery file to the battery dir. Index: MainWndFile.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/MainWndFile.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MainWndFile.cpp 7 Feb 2004 13:55:16 -0000 1.4 --- MainWndFile.cpp 11 Mar 2004 11:18:02 -0000 1.5 *************** *** 350,354 **** CString title = winResLoadString(IDS_SELECT_BATTERY_FILE); ! FileDlg dlg(this, "", filter, 0, "", exts, "", title, false); if(dlg.DoModal() == IDCANCEL) --- 350,359 ---- CString title = winResLoadString(IDS_SELECT_BATTERY_FILE); ! CString saveDir = regQueryStringValue("batteryDir", NULL); ! ! if(saveDir.IsEmpty()) ! saveDir = getDirFromFile(theApp.filename); ! ! FileDlg dlg(this, "", filter, 0, "", exts, saveDir, title, false); if(dlg.DoModal() == IDCANCEL) *************** *** 461,464 **** --- 466,474 ---- CString title = winResLoadString(IDS_SELECT_BATTERY_FILE); + CString saveDir = regQueryStringValue("batteryDir", NULL); + + if(saveDir.IsEmpty()) + saveDir = getDirFromFile(theApp.filename); + FileDlg dlg(this, name, *************** *** 467,471 **** "SAV", exts, ! "", title, true); --- 477,481 ---- "SAV", exts, ! saveDir, title, true); |
From: <for...@us...> - 2004-03-10 11:24:13
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31464 Modified Files: DirectSound.cpp Sound.h Log Message: Fix bug when loading a state with a different sound quality when menu is not visible Index: DirectSound.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/DirectSound.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DirectSound.cpp 4 Nov 2003 14:09:52 -0000 1.1 --- DirectSound.cpp 10 Mar 2004 11:06:20 -0000 1.2 *************** *** 44,48 **** public: DirectSound(); ! ~DirectSound(); bool init(); --- 44,48 ---- public: DirectSound(); ! virtual ~DirectSound(); bool init(); Index: Sound.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Sound.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Sound.h 4 Nov 2003 14:09:53 -0000 1.1 --- Sound.h 10 Mar 2004 11:06:20 -0000 1.2 *************** *** 23,27 **** { public: ! virtual bool init() = 0; virtual void pause() = 0; --- 23,28 ---- { public: ! virtual ~ISound() {}; ! virtual bool init() = 0; virtual void pause() = 0; |
From: <kx...@us...> - 2004-03-09 21:20:47
|
Update of /cvsroot/vba/VisualBoyAdvance/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2804 Modified Files: GBA.vcproj Log Message: Added support for JPEG/PNG skin images Index: GBA.vcproj =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/GBA.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GBA.vcproj 20 Jan 2004 02:16:02 -0000 1.1 --- GBA.vcproj 9 Mar 2004 21:03:21 -0000 1.2 *************** *** 24,28 **** Optimization="2" InlineFunctionExpansion="1" ! AdditionalIncludeDirectories="include\zlib,include\png" PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;OEMRESOURCE;MMX;FINAL_VERSION;BKPT_SUPPORT;DEV_VERSION" StringPooling="TRUE" --- 24,28 ---- Optimization="2" InlineFunctionExpansion="1" ! AdditionalIncludeDirectories="include\zlib,include\png,include\cxImage" PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;OEMRESOURCE;MMX;FINAL_VERSION;BKPT_SUPPORT;DEV_VERSION" StringPooling="TRUE" *************** *** 43,47 **** <Tool Name="VCLinkerTool" ! AdditionalDependencies="libpngMD.lib zlibMD.lib d3dx8.lib wsock32.lib ddraw.lib dxguid.lib winmm.lib dinput.lib vfw32.lib opengl32.lib" OutputFile="Release/VisualBoyAdvance.exe" LinkIncremental="1" --- 43,47 ---- <Tool Name="VCLinkerTool" ! AdditionalDependencies="libpngMD.lib zlibMD.lib CxImage.lib jpeg.lib d3dx8.lib wsock32.lib ddraw.lib dxguid.lib winmm.lib dinput.lib vfw32.lib opengl32.lib" OutputFile="Release/VisualBoyAdvance.exe" LinkIncremental="1" *************** *** 88,92 **** Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="include\zlib,include\png" PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;OEMRESOURCE;MMX;DEV_VERSION;BKPT_SUPPORT" BasicRuntimeChecks="3" --- 88,92 ---- Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="include\zlib,include\png,include\cxImage" PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;OEMRESOURCE;MMX;DEV_VERSION;BKPT_SUPPORT" BasicRuntimeChecks="3" *************** *** 106,110 **** <Tool Name="VCLinkerTool" ! AdditionalDependencies="libpngMD.lib zlibMD.lib d3dx8.lib wsock32.lib ddraw.lib dxguid.lib winmm.lib dinput.lib vfw32.lib opengl32.lib" OutputFile="Debug/VisualBoyAdvance.exe" LinkIncremental="1" --- 106,110 ---- <Tool Name="VCLinkerTool" ! AdditionalDependencies="libpngMD.lib zlibMD.lib CxImage.lib jpeg.lib d3dx8.lib wsock32.lib ddraw.lib dxguid.lib winmm.lib dinput.lib vfw32.lib opengl32.lib" OutputFile="Debug/VisualBoyAdvance.exe" LinkIncremental="1" *************** *** 152,156 **** Optimization="2" InlineFunctionExpansion="1" ! AdditionalIncludeDirectories="include\zlib,include\png" PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;OEMRESOURCE;MMX;FINAL_VERSION;BKPT_SUPPORT" StringPooling="TRUE" --- 152,156 ---- Optimization="2" InlineFunctionExpansion="1" ! AdditionalIncludeDirectories="include\zlib,include\png,include\cxImage" PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;OEMRESOURCE;MMX;FINAL_VERSION;BKPT_SUPPORT" StringPooling="TRUE" *************** *** 170,174 **** <Tool Name="VCLinkerTool" ! AdditionalDependencies="libpngMD.lib zlibMD.lib d3dx8.lib wsock32.lib ddraw.lib dxguid.lib winmm.lib dinput.lib vfw32.lib opengl32.lib" OutputFile="ReleaseNoDev/VisualBoyAdvance.exe" LinkIncremental="1" --- 170,174 ---- <Tool Name="VCLinkerTool" ! AdditionalDependencies="libpngMD.lib zlibMD.lib CxImage.lib jpeg.lib d3dx8.lib wsock32.lib ddraw.lib dxguid.lib winmm.lib dinput.lib vfw32.lib opengl32.lib" OutputFile="ReleaseNoDev/VisualBoyAdvance.exe" LinkIncremental="1" *************** *** 919,922 **** --- 919,928 ---- RelativePath=".\lib\win32\zlibMD.lib"> </File> + <File + RelativePath=".\lib\win32\CxImage.lib"> + </File> + <File + RelativePath=".\lib\win32\jpeg.lib"> + </File> </Files> <Globals> |
From: <for...@us...> - 2004-03-09 11:21:11
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16004 Modified Files: elf.cpp Log Message: Fix memory being free'd twice. Index: elf.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/elf.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** elf.cpp 17 Feb 2004 11:10:53 -0000 1.14 --- elf.cpp 9 Mar 2004 11:03:59 -0000 1.15 *************** *** 2962,2966 **** elfDebugStrings = NULL; if(elfDebugInfo) { - free(elfDebugInfo->debugdata); int num = elfDebugInfo->numRanges; int i; --- 2962,2965 ---- |
Update of /cvsroot/vba/VisualBoyAdvance/win32/include/cximage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28367/include/cximage Added Files: xfile.h ximabmp.h ximadefs.h ximage.h ximagif.h ximaico.h ximaiter.h ximaj2k.h ximajas.h ximajbg.h ximajpg.h ximamng.h ximapcx.h ximapng.h ximatga.h ximatif.h ximawbmp.h ximawmf.h xiofile.h xmemfile.h Log Message: Added support for JPEG/PNG skin images --- NEW FILE: xfile.h --- /* * File: xfile.h * Purpose: General Purpose File Class */ /* === C R E D I T S & D I S C L A I M E R S ============== * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxFile (c) 11/May/2002 Davide Pizzolato - www.xdp.it * CxFile version 2.00 23/Aug/2002 * See the file history.htm for the complete bugfix and news report. * * Special thanks to Chris Shearer Cooper for new features, enhancements and bugfixes * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__xfile_h) #define __xfile_h #ifdef WIN32 #include <windows.h> #endif #include <stdio.h> #include <stdlib.h> #include "ximadefs.h" class DLL_EXP CxFile { public: CxFile(void) { }; virtual ~CxFile() { }; virtual bool Close() = 0; virtual size_t Read(void *buffer, size_t size, size_t count) = 0; virtual size_t Write(const void *buffer, size_t size, size_t count) = 0; virtual bool Seek(long offset, int origin) = 0; virtual long Tell() = 0; virtual long Size() = 0; virtual bool Flush() = 0; virtual bool Eof() = 0; virtual long Error() = 0; virtual bool PutC(unsigned char c) { // Default implementation size_t nWrote = Write(&c, 1, 1); return (bool)(nWrote == 1); } virtual long GetC() = 0; }; #endif //__xfile_h --- NEW FILE: ximabmp.h --- /* * File: ximabmp.h * Purpose: BMP Image Class Loader and Writer */ /* === C R E D I T S & D I S C L A I M E R S ============== * CxImageBMP (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * Special thanks to Troels Knakkergaard for new features, enhancements and bugfixes * * original CImageBMP and CImageIterator implementation are: * Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra(at)servidor(dot)unam(dot)mx> * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ximaBMP_h) #define __ximaBMP_h #include "ximage.h" const int RLE_COMMAND = 0; const int RLE_ENDOFLINE = 0; const int RLE_ENDOFBITMAP = 1; const int RLE_DELTA = 2; #if !defined(BI_RLE8) #define BI_RLE8 1L #endif #if !defined(BI_RLE4) #define BI_RLE4 2L #endif #if CXIMAGE_SUPPORT_BMP class CxImageBMP: public CxImage { public: CxImageBMP(): CxImage(CXIMAGE_FORMAT_BMP) {}; bool Decode(CxFile * hFile); bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); } #if CXIMAGE_SUPPORT_ENCODE bool Encode(CxFile * hFile); bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); } #endif // CXIMAGE_SUPPORT_ENCODE protected: bool DibReadBitmapInfo(CxFile* fh, BITMAPINFOHEADER *pdib); }; #define BFT_ICON 0x4349 /* 'IC' */ #define BFT_BITMAP 0x4d42 /* 'BM' */ #define BFT_CURSOR 0x5450 /* 'PT' */ #ifndef WIDTHBYTES #define WIDTHBYTES(i) ((unsigned)((i+31)&(~31))/8) /* ULONG aligned ! */ #endif #define DibWidthBytesN(lpbi, n) (UINT)WIDTHBYTES((UINT)(lpbi)->biWidth * (UINT)(n)) #define DibWidthBytes(lpbi) DibWidthBytesN(lpbi, (lpbi)->biBitCount) #define DibSizeImage(lpbi) ((lpbi)->biSizeImage == 0 \ ? ((DWORD)(UINT)DibWidthBytes(lpbi) * (DWORD)(UINT)(lpbi)->biHeight) \ : (lpbi)->biSizeImage) #define DibNumColors(lpbi) ((lpbi)->biClrUsed == 0 && (lpbi)->biBitCount <= 8 \ ? (int)(1 << (int)(lpbi)->biBitCount) \ : (int)(lpbi)->biClrUsed) #define FixBitmapInfo(lpbi) if ((lpbi)->biSizeImage == 0) \ (lpbi)->biSizeImage = DibSizeImage(lpbi); \ if ((lpbi)->biClrUsed == 0) \ (lpbi)->biClrUsed = DibNumColors(lpbi); \ #endif #endif --- NEW FILE: ximadefs.h --- #if !defined(__ximadefs_h) #define __ximadefs_h #if defined(_AFXDLL)||defined(_USRDLL) #define DLL_EXP __declspec(dllexport) #elif defined(_MSC_VER)&&(_MSC_VER<1200) #define DLL_EXP __declspec(dllimport) #else #define DLL_EXP #endif #if CXIMAGE_SUPPORT_JP2 || CXIMAGE_SUPPORT_JPC || CXIMAGE_SUPPORT_PGX || CXIMAGE_SUPPORT_PNM || CXIMAGE_SUPPORT_RAS #define CXIMAGE_SUPPORT_JASPER 1 #else #define CXIMAGE_SUPPORT_JASPER 0 #endif #if CXIMAGE_SUPPORT_DSP #undef CXIMAGE_SUPPORT_TRANSFORMATION #define CXIMAGE_SUPPORT_TRANSFORMATION 1 #endif #if CXIMAGE_SUPPORT_TRANSFORMATION || CXIMAGE_SUPPORT_TIF || CXIMAGE_SUPPORT_TGA || CXIMAGE_SUPPORT_BMP || CXIMAGE_SUPPORT_WINDOWS #define CXIMAGE_SUPPORT_BASICTRANSFORMATIONS 1 #endif #if CXIMAGE_SUPPORT_WINCE #undef CXIMAGE_SUPPORT_WMF #define CXIMAGE_SUPPORT_WMF 0 #undef CXIMAGE_SUPPORT_WINDOWS #define CXIMAGE_SUPPORT_WINDOWS 0 #endif #ifndef WIN32 #undef CXIMAGE_SUPPORT_WINDOWS #define CXIMAGE_SUPPORT_WINDOWS 0 #endif #ifndef min #define min(a,b) (((a)<(b))?(a):(b)) #endif #ifndef max #define max(a,b) (((a)>(b))?(a):(b)) #endif #ifdef WIN32 #include <windows.h> //#include <tchar.h> #endif #include <stdio.h> #include <math.h> #ifdef __BORLANDC__ #define _complex complex #define _cabs cabs #endif #ifndef WIN32 #include <stdlib.h> #include <string.h> #include <ctype.h> typedef unsigned char BYTE; typedef unsigned short WORD; typedef unsigned long DWORD; typedef unsigned int UINT; typedef DWORD COLORREF; typedef unsigned int HANDLE; typedef void* HRGN; #define BOOL bool #define TRUE true #define FALSE false typedef struct tagRECT { long left; long top; long right; long bottom; } RECT; typedef struct tagPOINT { long x; long y; } POINT; typedef struct tagRGBQUAD { BYTE rgbBlue; BYTE rgbGreen; BYTE rgbRed; BYTE rgbReserved; } RGBQUAD; #pragma pack(1) typedef struct tagBITMAPINFOHEADER{ DWORD biSize; long biWidth; long biHeight; WORD biPlanes; WORD biBitCount; DWORD biCompression; DWORD biSizeImage; long biXPelsPerMeter; long biYPelsPerMeter; DWORD biClrUsed; DWORD biClrImportant; } BITMAPINFOHEADER; typedef struct tagBITMAPFILEHEADER { WORD bfType; DWORD bfSize; WORD bfReserved1; WORD bfReserved2; DWORD bfOffBits; } BITMAPFILEHEADER; typedef struct tagBITMAPCOREHEADER { DWORD bcSize; WORD bcWidth; WORD bcHeight; WORD bcPlanes; WORD bcBitCount; } BITMAPCOREHEADER; typedef struct tagRGBTRIPLE { BYTE rgbtBlue; BYTE rgbtGreen; BYTE rgbtRed; } RGBTRIPLE; #pragma pack() #define BI_RGB 0L #define BI_RLE8 1L #define BI_RLE4 2L #define BI_BITFIELDS 3L #define GetRValue(rgb) ((BYTE)(rgb)) #define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8)) #define GetBValue(rgb) ((BYTE)((rgb)>>16)) #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) #ifndef _COMPLEX_DEFINED typedef struct tagcomplex { double x,y; } _complex; #endif #define _cabs(c) sqrt(c.x*c.x+c.y*c.y) #endif #endif //__ximadefs --- NEW FILE: ximage.h --- /* * File: ximage.h * Purpose: General Purpose Image Class */ /* === C R E D I T S & D I S C L A I M E R S ============== * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * original CImage and CImageIterator implementation are: * Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra(at)servidor(dot)unam(dot)mx> * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__CXIMAGE_H) #define __CXIMAGE_H #if _MSC_VER > 1000 #pragma once #endif ///////////////////////////////////////////////////////////////////////////// // CxImage supported features #define CXIMAGE_SUPPORT_ALPHA 1 #define CXIMAGE_SUPPORT_SELECTION 0 #define CXIMAGE_SUPPORT_TRANSFORMATION 0 #define CXIMAGE_SUPPORT_DSP 0 #define CXIMAGE_SUPPORT_LAYERS 0 #define CXIMAGE_SUPPORT_DECODE 1 #define CXIMAGE_SUPPORT_ENCODE 0 //<vho><T.Peck> #define CXIMAGE_SUPPORT_WINDOWS 1 #define CXIMAGE_SUPPORT_WINCE 0 //<T.Peck> ///////////////////////////////////////////////////////////////////////////// // CxImage supported formats #define CXIMAGE_SUPPORT_BMP 1 #define CXIMAGE_SUPPORT_GIF 0 #define CXIMAGE_SUPPORT_JPG 1 #define CXIMAGE_SUPPORT_PNG 1 #define CXIMAGE_SUPPORT_MNG 0 #define CXIMAGE_SUPPORT_ICO 0 #define CXIMAGE_SUPPORT_TIF 0 #define CXIMAGE_SUPPORT_TGA 0 #define CXIMAGE_SUPPORT_PCX 0 #define CXIMAGE_SUPPORT_WBMP 0 #define CXIMAGE_SUPPORT_WMF 0 #define CXIMAGE_SUPPORT_J2K 0 // Beta, use JP2 #define CXIMAGE_SUPPORT_JBG 0 // GPL'd see ../jbig/copying.txt & ../jbig/patents.htm #define CXIMAGE_SUPPORT_JP2 0 #define CXIMAGE_SUPPORT_JPC 0 #define CXIMAGE_SUPPORT_PGX 0 #define CXIMAGE_SUPPORT_PNM 0 #define CXIMAGE_SUPPORT_RAS 0 ///////////////////////////////////////////////////////////////////////////// #include <TCHAR.h> // For UNICODE support #include "xfile.h" #include "xiofile.h" #include "xmemfile.h" #include "ximadefs.h" //<vho> adjust some #define ///////////////////////////////////////////////////////////////////////////// // CxImage formats enumerator enum ENUM_CXIMAGE_FORMATS{ CXIMAGE_FORMAT_UNKNOWN, #if CXIMAGE_SUPPORT_BMP CXIMAGE_FORMAT_BMP, #endif #if CXIMAGE_SUPPORT_GIF CXIMAGE_FORMAT_GIF, #endif #if CXIMAGE_SUPPORT_JPG CXIMAGE_FORMAT_JPG, #endif #if CXIMAGE_SUPPORT_PNG CXIMAGE_FORMAT_PNG, #endif #if CXIMAGE_SUPPORT_MNG CXIMAGE_FORMAT_MNG, #endif #if CXIMAGE_SUPPORT_ICO CXIMAGE_FORMAT_ICO, #endif #if CXIMAGE_SUPPORT_TIF CXIMAGE_FORMAT_TIF, #endif #if CXIMAGE_SUPPORT_TGA CXIMAGE_FORMAT_TGA, #endif #if CXIMAGE_SUPPORT_PCX CXIMAGE_FORMAT_PCX, #endif #if CXIMAGE_SUPPORT_WBMP CXIMAGE_FORMAT_WBMP, #endif #if CXIMAGE_SUPPORT_WMF CXIMAGE_FORMAT_WMF, #endif #if CXIMAGE_SUPPORT_J2K CXIMAGE_FORMAT_J2K, #endif #if CXIMAGE_SUPPORT_JBG CXIMAGE_FORMAT_JBG, #endif #if CXIMAGE_SUPPORT_JP2 CXIMAGE_FORMAT_JP2, #endif #if CXIMAGE_SUPPORT_JPC CXIMAGE_FORMAT_JPC, #endif #if CXIMAGE_SUPPORT_PGX CXIMAGE_FORMAT_PGX, #endif #if CXIMAGE_SUPPORT_PNM CXIMAGE_FORMAT_PNM, #endif #if CXIMAGE_SUPPORT_RAS CXIMAGE_FORMAT_RAS, #endif CMAX_IMAGE_FORMATS }; //color to grey mapping <H. Muelner> <jurgene> //#define RGB2GRAY(r,g,b) (((b)*114 + (g)*587 + (r)*299)/1000) #define RGB2GRAY(r,g,b) (((b)*117 + (g)*601 + (r)*306) >> 10) struct rgb_color { BYTE r,g,b; }; // <VATI> text placement data // members must be initialized with the InitTextInfo(&this) function. typedef struct DLL_EXP tagCxTextInfo { char text[4096]; // text LOGFONT lfont; // font and codepage data COLORREF fcolor; // foreground color long align; // DT_CENTER, DT_RIGHT, DT_LEFT aligment for multiline text BYTE opaque; // text has background or hasn't. Default is true. // data for background (ignored if .opaque==FALSE) COLORREF bcolor; // background color float b_opacity; // opacity value for background between 0.0-1.0 Default is 0. (opaque) BYTE b_outline; // outline width for background (zero: no outline) BYTE b_round; // rounding radius for background rectangle. % of the height, between 0-50. Default is 10. // (backgr. always has a frame: width = 3 pixel + 10% of height by default.) } CXTEXTINFO; ///////////////////////////////////////////////////////////////////////////// // CxImage class ///////////////////////////////////////////////////////////////////////////// class DLL_EXP CxImage { //extensible information collector typedef struct tagCxImageInfo { DWORD dwEffWidth; //DWORD aligned scan line width BYTE* pImage; //THE IMAGE BITS CxImage* pGhost; //if this is a ghost, pGhost points to the body CxImage* pParent; //if this is a layer, pParent points to the body DWORD dwType; //original image format char szLastError[256]; //debugging long nProgress; //monitor long nEscape; //escape long nBkgndIndex; //used for GIF, PNG, MNG RGBQUAD nBkgndColor; //used for RGB transparency BYTE nQuality; //used for JPEG BYTE nScale; //used for JPEG <ignacio> long nFrame; //used for TIF, GIF, MNG : actual frame long nNumFrames; //used for TIF, GIF, MNG : total number of frames DWORD dwFrameDelay; //used for GIF, MNG long xDPI; //horizontal resolution long yDPI; //vertical resolution RECT rSelectionBox; //bounding rectangle BYTE nAlphaMax; //max opacity (fade) bool bAlphaPaletteEnabled; //true if alpha values in the palette are enabled. bool bEnabled; //enables the painting functions long xOffset; long yOffset; DWORD dwCodecOption; //for GIF, TIF : 0=def.1=unc,2=fax3,3=fax4,4=pack,5=jpg RGBQUAD last_c; //for GetNearestIndex optimization BYTE last_c_index; bool last_c_isvalid; long nNumLayers; DWORD dwFlags; // 0x??00000 = reserved, 0x00??0000 = blend mode, 0x0000???? = layer id - user flags } CXIMAGEINFO; public: //constructors CxImage(DWORD imagetype = 0); CxImage(DWORD dwWidth, DWORD dwHeight, DWORD wBpp, DWORD imagetype = 0); CxImage(const CxImage &src, bool copypixels = true, bool copyselection = true, bool copyalpha = true); CxImage(const TCHAR * filename, DWORD imagetype); // For UNICODE support: char -> TCHAR // CxImage(const char * filename, DWORD imagetype); CxImage(FILE * stream, DWORD imagetype); CxImage(CxFile * stream, DWORD imagetype); CxImage(BYTE * buffer, DWORD size, DWORD imagetype); virtual ~CxImage() { Destroy(); }; CxImage& operator = (const CxImage&); //initializzation void* Create(DWORD dwWidth, DWORD dwHeight, DWORD wBpp, DWORD imagetype = 0); bool Destroy(); void Clear(BYTE bval=0); void Copy(const CxImage &src, bool copypixels = true, bool copyselection = true, bool copyalpha = true); bool Transfer(CxImage &from); bool CreateFromArray(BYTE* pArray,DWORD dwWidth,DWORD dwHeight,DWORD dwBitsperpixel, DWORD dwBytesperline, bool bFlipImage); bool CreateFromMatrix(BYTE** ppMatrix,DWORD dwWidth,DWORD dwHeight,DWORD dwBitsperpixel, DWORD dwBytesperline, bool bFlipImage); //Attributes long GetSize(); BYTE* GetBits(DWORD row = 0); BYTE GetColorType(); void* GetDIB() const {return pDib;} DWORD GetHeight() const {return head.biHeight;} DWORD GetWidth() const {return head.biWidth;} DWORD GetEffWidth() const {return info.dwEffWidth;} DWORD GetNumColors() const {return head.biClrUsed;} WORD GetBpp() const {return head.biBitCount;} DWORD GetType() const {return info.dwType;} char* GetLastError() {return info.szLastError;} const TCHAR* GetVersion(); DWORD GetFrameDelay() const {return info.dwFrameDelay;} void SetFrameDelay(DWORD d) {info.dwFrameDelay=d;} void GetOffset(long *x,long *y) {*x=info.xOffset; *y=info.yOffset;} void SetOffset(long x,long y) {info.xOffset=x; info.yOffset=y;} BYTE GetJpegQuality() const {return info.nQuality;} void SetJpegQuality(BYTE q) {info.nQuality = q;} //<ignacio> used for scaling down during JPEG decoding valid numbers are 1, 2, 4, 8 BYTE GetJpegScale() const {return info.nScale;} void SetJpegScale(BYTE q) {info.nScale = q;} long GetXDPI() const {return info.xDPI;} long GetYDPI() const {return info.yDPI;} void SetXDPI(long dpi); void SetYDPI(long dpi); DWORD GetClrImportant() const {return head.biClrImportant;} void SetClrImportant(DWORD ncolors = 0); long GetProgress() const {return info.nProgress;} long GetEscape() const {return info.nEscape;} void SetProgress(long p) {info.nProgress = p;} void SetEscape(long i) {info.nEscape = i;} long GetTransIndex() const {return info.nBkgndIndex;} RGBQUAD GetTransColor(); void SetTransIndex(long idx) {info.nBkgndIndex = idx;} void SetTransColor(RGBQUAD rgb) {rgb.rgbReserved=0; info.nBkgndColor = rgb;} bool IsTransparent() const {return info.nBkgndIndex>=0;} // <vho> DWORD GetCodecOption() const {return info.dwCodecOption;} void SetCodecOption(DWORD opt) {info.dwCodecOption = opt;} DWORD GetFlags() const {return info.dwFlags;} void SetFlags(DWORD flags, bool bLockReservedFlags = true); //void* GetUserData() const {return info.pUserData;} //void SetUserData(void* pUserData) {info.pUserData = pUserData;} //palette operations bool IsGrayScale(); bool IsIndexed() {return head.biClrUsed!=0;} DWORD GetPaletteSize(); RGBQUAD* GetPalette() const; RGBQUAD GetPaletteColor(BYTE idx); bool GetPaletteColor(BYTE i, BYTE* r, BYTE* g, BYTE* b); BYTE GetNearestIndex(RGBQUAD c); void BlendPalette(COLORREF cr,long perc); void SetGrayPalette(); void SetPalette(DWORD n, BYTE *r, BYTE *g, BYTE *b); void SetPalette(RGBQUAD* pPal,DWORD nColors=256); void SetPalette(rgb_color *rgb,DWORD nColors=256); void SetPaletteColor(BYTE idx, BYTE r, BYTE g, BYTE b, BYTE alpha=0); void SetPaletteColor(BYTE idx, RGBQUAD c); void SetPaletteColor(BYTE idx, COLORREF cr); void SwapIndex(BYTE idx1, BYTE idx2); void SetStdPalette(); //pixel operations bool IsInside(long x, long y); bool IsTransparent(long x,long y); RGBQUAD GetPixelColor(long x,long y, bool bGetAlpha = true); BYTE GetPixelIndex(long x,long y); BYTE GetPixelGray(long x, long y); void SetPixelColor(long x,long y,RGBQUAD c, bool bSetAlpha = false); void SetPixelColor(long x,long y,COLORREF cr); void SetPixelIndex(long x,long y,BYTE i); void DrawLine(int StartX, int EndX, int StartY, int EndY, RGBQUAD color, bool bSetAlpha=false); void DrawLine(int StartX, int EndX, int StartY, int EndY, COLORREF cr); //painting operations #if CXIMAGE_SUPPORT_WINCE long Blt(HDC pDC, long x=0, long y=0); #endif #if CXIMAGE_SUPPORT_WINDOWS HBITMAP MakeBitmap(HDC hdc = NULL); HANDLE CopyToHandle(); bool CreateFromHANDLE(HANDLE hMem); //Windows objects (clipboard) bool CreateFromHBITMAP(HBITMAP hbmp, HPALETTE hpal=0); //Windows resource bool CreateFromHICON(HICON hico); long Draw(HDC hdc, long x=0, long y=0, long cx = -1, long cy = -1, RECT* pClipRect = 0); long Draw(HDC hdc, const RECT& rect, RECT* pClipRect=NULL) { return Draw(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, pClipRect); } long Stretch(HDC hdc, long xoffset, long yoffset, long xsize, long ysize, DWORD dwRop = SRCCOPY); long Stretch(HDC hdc, const RECT& rect, DWORD dwRop = SRCCOPY) { return Stretch(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, dwRop); } long Tile(HDC hdc, RECT *rc); long Draw2(HDC hdc, long x=0, long y=0, long cx = -1, long cy = -1); long Draw2(HDC hdc, const RECT& rect) { return Draw2(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); } //long DrawString(HDC hdc, long x, long y, const char* text, RGBQUAD color, const char* font, long lSize=0, long lWeight=400, BYTE bItalic=0, BYTE bUnderline=0, bool bSetAlpha=false); long DrawString(HDC hdc, long x, long y, const TCHAR* text, RGBQUAD color, const TCHAR* font, long lSize=0, long lWeight=400, BYTE bItalic=0, BYTE bUnderline=0, bool bSetAlpha=false); // <VATI> extensions long DrawStringEx(HDC hdc, long x, long y, CXTEXTINFO *pTextType, bool bSetAlpha=false ); void InitTextInfo( CXTEXTINFO *txt ); #endif //CXIMAGE_SUPPORT_WINDOWS // file operations #if CXIMAGE_SUPPORT_DECODE #ifdef WIN32 //bool Load(LPCWSTR filename, DWORD imagetype=0); bool LoadResource(HRSRC hRes, DWORD imagetype, HMODULE hModule=NULL); #endif // For UNICODE support: char -> TCHAR bool Load(const TCHAR* filename, DWORD imagetype=0); //bool Load(const char * filename, DWORD imagetype=0); bool Decode(FILE * hFile, DWORD imagetype); bool Decode(CxFile * hFile, DWORD imagetype); bool Decode(BYTE * buffer, DWORD size, DWORD imagetype); #endif //CXIMAGE_SUPPORT_DECODE #if CXIMAGE_SUPPORT_ENCODE protected: bool EncodeSafeCheck(CxFile *hFile); public: #ifdef WIN32 //bool Save(LPCWSTR filename, DWORD imagetype=0); #endif // For UNICODE support: char -> TCHAR bool Save(const TCHAR* filename, DWORD imagetype=0); //bool Save(const char * filename, DWORD imagetype=0); bool Encode(FILE * hFile, DWORD imagetype); bool Encode(CxFile * hFile, DWORD imagetype); bool Encode(CxFile * hFile, CxImage ** pImages, int pagecount, DWORD imagetype); bool Encode(FILE *hFile, CxImage ** pImages, int pagecount, DWORD imagetype); bool Encode(BYTE * &buffer, long &size, DWORD imagetype); #endif //CXIMAGE_SUPPORT_ENCODE //misc. bool IsValid() const {return pDib!=0;} bool IsEnabled() const {return info.bEnabled;} void Enable(bool enable=true){info.bEnabled=enable;} // frame operations long GetNumFrames() const {return info.nNumFrames;} long GetFrame() const {return info.nFrame;} void SetFrame(long nFrame) {info.nFrame=nFrame;} #if CXIMAGE_SUPPORT_BASICTRANSFORMATIONS bool GrayScale(); bool Flip(); bool Mirror(); bool Negative(); bool RotateLeft(CxImage* iDst = NULL); bool RotateRight(CxImage* iDst = NULL); #endif //CXIMAGE_SUPPORT_BASICTRANSFORMATIONS #if CXIMAGE_SUPPORT_TRANSFORMATION // image operations bool Rotate(float angle, CxImage* iDst = NULL); bool Rotate180(CxImage* iDst = NULL); bool Resample(long newx, long newy, int mode = 1, CxImage* iDst = NULL); bool DecreaseBpp(DWORD nbit, bool errordiffusion, RGBQUAD* ppal = 0, DWORD clrimportant = 0); bool IncreaseBpp(DWORD nbit); bool Dither(long method = 0); bool Crop(long left, long top, long right, long bottom, CxImage* iDst = NULL); bool Crop(const RECT& rect, CxImage* iDst = NULL) { return Crop(rect.left, rect.top, rect.right, rect.bottom, iDst); } bool CropRotatedRectangle( long topx, long topy, long width, long height, float angle, CxImage* iDst = NULL); bool Skew(float xgain, float ygain, long xpivot=0, long ypivot=0); bool Expand(long left, long top, long right, long bottom, RGBQUAD canvascolor, CxImage* iDst = 0); bool Expand(long newx, long newy, RGBQUAD canvascolor, CxImage* iDst = 0); bool Thumbnail(long newx, long newy, RGBQUAD canvascolor, CxImage* iDst = 0); bool CircleTransform(int type,long rmax=0,float Koeff=1.0f); protected: float b3spline(float x); public: #endif //CXIMAGE_SUPPORT_TRANSFORMATION #if CXIMAGE_SUPPORT_DSP bool Contour(); bool HistogramStretch(long method = 0); bool HistogramEqualize(); bool HistogramNormalize(); bool HistogramRoot(); bool HistogramLog(); long Histogram(long* red, long* green = 0, long* blue = 0, long* gray = 0, long colorspace = 0); bool Jitter(long radius=2); bool Repair(float radius = 0.25f, long niterations = 1, long colorspace = 0); bool Combine(CxImage* r,CxImage* g,CxImage* b,CxImage* a, long colorspace = 0); bool FFT2(CxImage* srcReal, CxImage* srcImag, CxImage* dstReal, CxImage* dstImag, long direction = 1, bool bForceFFT = true, bool bMagnitude = true); bool Noise(long level); bool Median(long Ksize=3); bool Gamma(float gamma); bool ShiftRGB(long r, long g, long b); bool Threshold(BYTE level); bool Colorize(BYTE hue, BYTE sat); bool Light(long brightness, long contrast = 0); float Mean(); bool Filter(long* kernel, long Ksize, long Kfactor, long Koffset); bool Erode(long Ksize=2); bool Dilate(long Ksize=2); void HuePalette(float correction=1); enum ImageOpType { OpAdd, OpAnd, OpXor, OpOr, OpMask, OpSrcCopy, OpDstCopy, OpSub, OpSrcBlend }; void Mix(CxImage & imgsrc2, ImageOpType op, long lXOffset = 0, long lYOffset = 0); void MixFrom(CxImage & imagesrc2, long lXOffset, long lYOffset); bool UnsharpMask(float radius = 5.0, float amount = 0.5, int threshold = 0); bool Lut(BYTE* pLut); bool Lut(BYTE* pLutR, BYTE* pLutG, BYTE* pLutB, BYTE* pLutA = 0); protected: bool IsPowerof2(long x); bool FFT(int dir,int m,double *x,double *y); bool DFT(int dir,long m,double *x1,double *y1,double *x2,double *y2); bool RepairChannel(CxImage *ch, float radius); // <nipper> int gen_convolve_matrix (float radius, float **cmatrix_p); float* gen_lookup_table (float *cmatrix, int cmatrix_length); void blur_line (float *ctable, float *cmatrix, int cmatrix_length, BYTE* cur_col, BYTE* dest_col, int y, long bytes); public: //color conversion utilities bool SplitRGB(CxImage* r,CxImage* g,CxImage* b); bool SplitYUV(CxImage* y,CxImage* u,CxImage* v); bool SplitHSL(CxImage* h,CxImage* s,CxImage* l); bool SplitYIQ(CxImage* y,CxImage* i,CxImage* q); bool SplitXYZ(CxImage* x,CxImage* y,CxImage* z); bool SplitCMYK(CxImage* c,CxImage* m,CxImage* y,CxImage* k); RGBQUAD HSLtoRGB(COLORREF cHSLColor); RGBQUAD RGBtoHSL(RGBQUAD lRGBColor); RGBQUAD HSLtoRGB(RGBQUAD lHSLColor); RGBQUAD YUVtoRGB(RGBQUAD lYUVColor); RGBQUAD RGBtoYUV(RGBQUAD lRGBColor); RGBQUAD YIQtoRGB(RGBQUAD lYIQColor); RGBQUAD RGBtoYIQ(RGBQUAD lRGBColor); RGBQUAD XYZtoRGB(RGBQUAD lXYZColor); RGBQUAD RGBtoXYZ(RGBQUAD lRGBColor); #endif //CXIMAGE_SUPPORT_DSP RGBQUAD RGBtoRGBQUAD(COLORREF cr); COLORREF RGBQUADtoRGB (RGBQUAD c); #if CXIMAGE_SUPPORT_SELECTION //selection bool SelectionClear(); bool SelectionCreate(); bool SelectionDelete(); bool SelectionInvert(); bool SelectionAddRect(RECT r); bool SelectionAddEllipse(RECT r); bool SelectionAddPolygon(POINT *points, long npoints); bool SelectionAddColor(RGBQUAD c); bool SelectionAddPixel(int x, int y); bool SelectionCopy(CxImage &from); bool SelectionIsInside(long x, long y); bool SelectionIsValid(){return pSelection!=0;} void SelectionGetBox(RECT& r){memcpy(&r,&info.rSelectionBox,sizeof(RECT));} bool SelectionToHRGN(HRGN& region); #endif //CXIMAGE_SUPPORT_SELECTION #if CXIMAGE_SUPPORT_ALPHA //Alpha void AlphaClear(); void AlphaCreate(); void AlphaDelete(); void AlphaInvert(); bool AlphaMirror(); bool AlphaFlip(); bool AlphaCopy(CxImage &from); bool AlphaSplit(CxImage *dest); void AlphaStrip(); void AlphaSet(BYTE level); bool AlphaSet(CxImage &from); void AlphaSet(long x,long y,BYTE level); BYTE AlphaGet(long x,long y); BYTE AlphaGetMax() const {return info.nAlphaMax;} void AlphaSetMax(BYTE nAlphaMax) {info.nAlphaMax=nAlphaMax;} bool AlphaIsValid(){return pAlpha!=0;} BYTE* AlphaGetBits() const {return pAlpha;} void AlphaPaletteClear(); void AlphaPaletteEnable(bool enable=true){info.bAlphaPaletteEnabled=enable;} bool AlphaPaletteIsEnabled(){return info.bAlphaPaletteEnabled;} bool AlphaPaletteIsValid(); bool AlphaPaletteSplit(CxImage *dest); #endif //CXIMAGE_SUPPORT_ALPHA #if CXIMAGE_SUPPORT_LAYERS bool LayerCreate(long position = -1); bool LayerDelete(long position = -1); void LayerDeleteAll(); CxImage* GetLayer(long position); CxImage* GetParent() const {return info.pParent;} long GetNumLayers() const {return info.nNumLayers;} #endif //CXIMAGE_SUPPORT_LAYERS protected: void Startup(DWORD imagetype = 0); void CopyInfo(const CxImage &src); void Ghost(CxImage *src); void RGBtoBGR(BYTE *buffer, int length); float HueToRGB(float n1,float n2, float hue); void Bitfield2RGB(BYTE *src, WORD redmask, WORD greenmask, WORD bluemask, BYTE bpp); static int CompareColors(const void *elem1, const void *elem2); void* pDib; //contains the header, the palette, the pixels BITMAPINFOHEADER head; //standard header CXIMAGEINFO info; //extended information BYTE* pSelection; //selected region BYTE* pAlpha; //alpha channel CxImage** pLayers; //generic layers }; //////////////////////////////////////////////////////////////////////////// #define CXIMAGE_MAX_MEMORY 256000000 #define CXIMAGE_ERR_NOFILE "null file handler" #define CXIMAGE_ERR_NOIMAGE "null image!!!" //////////////////////////////////////////////////////////////////////////// #endif // !defined(__CXIMAGE_H) --- NEW FILE: ximagif.h --- /* * File: ximagif.h * Purpose: GIF Image Class Loader and Writer */ /* === C R E D I T S & D I S C L A I M E R S ============== * CxImageGIF (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * Special thanks to Troels Knakkergaard for new features, enhancements and bugfixes * * original CImageGIF and CImageIterator implementation are: * Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra(at)servidor(dot)unam(dot)mx> * * 6/15/97 Randy Spann: Added GIF87a writing support * R....@Co... * * DECODE.C - An LZW decoder for GIF * Copyright (C) 1987, by Steven A. Bennett * Copyright (C) 1994, C++ version by Alejandro Aguilar Sierra * * In accordance with the above, I want to credit Steve Wilhite who wrote * the code which this is heavily inspired by... * * GIF and 'Graphics Interchange Format' are trademarks (tm) of * Compuserve, Incorporated, an H&R Block Company. * * Release Notes: This file contains a decoder routine for GIF images * which is similar, structurally, to the original routine by Steve Wilhite. * It is, however, somewhat noticably faster in most cases. * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ximaGIF_h) #define __ximaGIF_h #include "ximage.h" #if CXIMAGE_SUPPORT_GIF typedef short int code_int; /* Various error codes used by decoder */ #define OUT_OF_MEMORY -10 #define BAD_CODE_SIZE -20 #define READ_ERROR -1 #define WRITE_ERROR -2 #define OPEN_ERROR -3 #define CREATE_ERROR -4 #define MAX_CODES 4095 #define GIFBUFTAM 16384 #define TRANSPARENCY_CODE 0xF9 //LZW GIF Image compression #define MAXBITSCODES 12 #define HSIZE 5003 /* 80% occupancy */ #define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1) #define HashTabOf(i) htab[i] #define CodeTabOf(i) codetab[i] class CImageIterator; class DLL_EXP CxImageGIF: public CxImage { #pragma pack(1) typedef struct tag_gifgce{ BYTE transpcolflag:1; BYTE userinputflag:1; BYTE dispmeth:3; BYTE res:3; WORD delaytime; BYTE transpcolindex; } struct_gifgce; typedef struct tag_dscgif{ /* Logic Screen Descriptor */ char header[6]; /* Firma and version */ WORD scrwidth; WORD scrheight; char pflds; char bcindx; char pxasrat; } struct_dscgif; typedef struct tag_image{ /* Image Descriptor */ WORD l; WORD t; WORD w; WORD h; BYTE pf; } struct_image; typedef struct tag_TabCol{ /* Tabla de colores */ short colres; /* color resolution */ short sogct; /* size of global color table */ rgb_color paleta[256]; /* paleta */ } struct_TabCol; typedef struct tag_RLE{ int rl_pixel; int rl_basecode; int rl_count; int rl_table_pixel; int rl_table_max; int just_cleared; int out_bits; int out_bits_init; int out_count; int out_bump; int out_bump_init; int out_clear; int out_clear_init; int max_ocodes; int code_clear; int code_eof; unsigned int obuf; int obits; unsigned char oblock[256]; int oblen; } struct_RLE; #pragma pack() public: CxImageGIF(): CxImage(CXIMAGE_FORMAT_GIF) {m_loops=0; m_dispmeth=0; m_comment[0]='\0';} // bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_GIF);} // bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_GIF);} bool Decode(CxFile * fp); bool Decode(FILE *fp) { CxIOFile file(fp); return Decode(&file); } #if CXIMAGE_SUPPORT_ENCODE bool Encode(CxFile * fp); bool Encode(CxFile * fp, CxImage ** pImages, int pagecount, bool bLocalColorMap = false); bool Encode(FILE *fp) { CxIOFile file(fp); return Encode(&file); } bool Encode(FILE *fp, CxImage ** pImages, int pagecount, bool bLocalColorMap = false) { CxIOFile file(fp); return Encode(&file, pImages, pagecount, bLocalColorMap); } #endif // CXIMAGE_SUPPORT_ENCODE void SetLoops(int loops); long GetLoops(); void SetComment(const char* sz_comment_in); void GetComment(char* sz_comment_out); void SetDisposalMethod(int dm); long GetDisposalMethod(); protected: bool DecodeExtension(CxFile *fp); void EncodeHeader(CxFile *fp); void EncodeLoopExtension(CxFile *fp); void EncodeExtension(CxFile *fp); void EncodeBody(CxFile *fp, bool bLocalColorMap = false); void EncodeComment(CxFile *fp); bool EncodeRGB(CxFile *fp); void GifMix(CxImage & imgsrc2, long lxOffset, long lyOffset); struct_gifgce gifgce; int curx, cury; long CountDown; unsigned long cur_accum; int cur_bits; int interlaced, iypos, istep, iheight, ipass; int ibf; int ibfmax; BYTE buf[GIFBUFTAM + 1]; // Implementation int GifNextPixel (); void Putword (int w, CxFile* fp ); void compressNONE (int init_bits, CxFile* outfile); void compressLZW (int init_bits, CxFile* outfile); void output (code_int code ); void cl_hash (long hsize); void char_out (int c); void flush_char (); short init_exp(short size); short get_next_code(CxFile*); short decoder(CxFile*, CImageIterator* iter, short linewidth, int &bad_code_count); int get_byte(CxFile*); int out_line(CImageIterator* iter, unsigned char *pixels, int linelen); int get_num_frames(CxFile *f,struct_TabCol* TabColSrc); short curr_size; /* The current code size */ short clear; /* Value for a clear code */ short ending; /* Value for a ending code */ short newcodes; /* First available code */ short top_slot; /* Highest code for current size */ short slot; /* Last read code */ /* The following static variables are used * for seperating out codes */ short navail_bytes; /* # bytes left in block */ short nbits_left; /* # bits left in current BYTE */ BYTE b1; /* Current BYTE */ BYTE byte_buff[257]; /* Current block */ BYTE *pbytes; /* Pointer to next BYTE in block */ /* The reason we have these seperated like this instead of using * a structure like the original Wilhite code did, is because this * stuff generally produces significantly faster code when compiled... * This code is full of similar speedups... (For a good book on writing * C for speed or for space optomisation, see Efficient C by Tom Plum, * published by Plum-Hall Associates...) */ BYTE stack[MAX_CODES + 1]; /* Stack for storing pixels */ BYTE suffix[MAX_CODES + 1]; /* Suffix table */ WORD prefix[MAX_CODES + 1]; /* Prefix linked list */ //LZW GIF Image compression routines long htab [HSIZE]; unsigned short codetab [HSIZE]; int n_bits; /* number of bits/code */ code_int maxcode; /* maximum code, given n_bits */ code_int free_ent; /* first unused entry */ int clear_flg; int g_init_bits; CxFile* g_outfile; int ClearCode; int EOFCode; int a_count; char accum[256]; char m_comment[256]; int m_loops; int m_dispmeth; //RLE compression routines void compressRLE( int init_bits, CxFile* outfile); void rle_clear(struct_RLE* rle); void rle_flush(struct_RLE* rle); void rle_flush_withtable(int count, struct_RLE* rle); void rle_flush_clearorrep(int count, struct_RLE* rle); void rle_flush_fromclear(int count,struct_RLE* rle); void rle_output_plain(int c,struct_RLE* rle); void rle_reset_out_clear(struct_RLE* rle); unsigned int rle_compute_triangle_count(unsigned int count, unsigned int nrepcodes); unsigned int rle_isqrt(unsigned int x); void rle_write_block(struct_RLE* rle); void rle_block_out(unsigned char c, struct_RLE* rle); void rle_block_flush(struct_RLE* rle); void rle_output(int val, struct_RLE* rle); void rle_output_flush(struct_RLE* rle); }; #endif #endif --- NEW FILE: ximaico.h --- /* * File: ximaico.h * Purpose: ICON Image Class Loader and Writer */ /* === C R E D I T S & D I S C L A I M E R S ============== * CxImageICO (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * Parts of the code come from FreeImage 2 * Design and implementation by Floris van den Berg <flvdberg(at)wxs(dot)nl> * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ximaICO_h) #define __ximaICO_h #include "ximage.h" #if CXIMAGE_SUPPORT_ICO class CxImageICO: public CxImage { typedef struct tagIconDirectoryEntry { BYTE bWidth; BYTE bHeight; BYTE bColorCount; BYTE bReserved; WORD wPlanes; WORD wBitCount; DWORD dwBytesInRes; DWORD dwImageOffset; } ICONDIRENTRY; typedef struct tagIconDir { WORD idReserved; WORD idType; WORD idCount; } ICONHEADER; public: CxImageICO(): CxImage(CXIMAGE_FORMAT_ICO) {} // bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_ICO);} // bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_ICO);} bool Decode(CxFile * hFile); bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); } #if CXIMAGE_SUPPORT_ENCODE bool Encode(CxFile * hFile); bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); } #endif // CXIMAGE_SUPPORT_ENCODE }; #endif #endif --- NEW FILE: ximaiter.h --- /* * File: ImaIter.h * Purpose: Declaration of the Platform Independent Image Base Class * Author: Alejandro Aguilar Sierra * Created: 1995 * Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra(at)servidor(dot)unam(dot)mx> * * 07/08/2001 Davide Pizzolato - www.xdp.it * - removed slow loops * - added safe checks * * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ImaIter_h) #define __ImaIter_h #include "ximage.h" #include "ximadefs.h" class CImageIterator { friend class CxImage; protected: int Itx, Ity; // Counters int Stepx, Stepy; BYTE* IterImage; // Image pointer CxImage *ima; public: // Constructors CImageIterator ( void ); CImageIterator ( CxImage *image ); operator CxImage* (); // Iterators BOOL ItOK (); void Reset (); void Upset (); void SetRow(BYTE *buf, int n); void GetRow(BYTE *buf, int n); BYTE GetByte( ) { return IterImage[Itx]; } void SetByte(BYTE b) { IterImage[Itx] = b; } BYTE* GetRow(void); BYTE* GetRow(int n); BOOL NextRow(); BOOL PrevRow(); BOOL NextByte(); BOOL PrevByte(); void SetSteps(int x, int y=0) { Stepx = x; Stepy = y; } void GetSteps(int *x, int *y) { *x = Stepx; *y = Stepy; } BOOL NextStep(); BOOL PrevStep(); void SetY(int y); /* AD - for interlace */ int GetY() {return Ity;} BOOL GetCol(BYTE* pCol, DWORD x); BOOL SetCol(BYTE* pCol, DWORD x); }; ///////////////////////////////////////////////////////////////////// inline CImageIterator::CImageIterator(void) { ima = 0; IterImage = 0; Itx = Ity = 0; Stepx = Stepy = 0; } ///////////////////////////////////////////////////////////////////// inline CImageIterator::CImageIterator(CxImage *imageImpl): ima(imageImpl) { if (ima) IterImage = ima->GetBits(); Itx = Ity = 0; Stepx = Stepy = 0; } ///////////////////////////////////////////////////////////////////// inline CImageIterator::operator CxImage* () { return ima; } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::ItOK () { if (ima) return ima->IsInside(Itx, Ity); else return FALSE; } ///////////////////////////////////////////////////////////////////// inline void CImageIterator::Reset() { if (ima) IterImage = ima->GetBits(); else IterImage=0; Itx = Ity = 0; } ///////////////////////////////////////////////////////////////////// inline void CImageIterator::Upset() { Itx = 0; Ity = ima->GetHeight()-1; IterImage = ima->GetBits() + ima->GetEffWidth()*(ima->GetHeight()-1); } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::NextRow() { if (++Ity >= (int)ima->GetHeight()) return 0; IterImage += ima->GetEffWidth(); return 1; } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::PrevRow() { if (--Ity < 0) return 0; IterImage -= ima->GetEffWidth(); return 1; } /* AD - for interlace */ inline void CImageIterator::SetY(int y) { if ((y < 0) || (y > (int)ima->GetHeight())) return; Ity = y; IterImage = ima->GetBits() + ima->GetEffWidth()*y; } ///////////////////////////////////////////////////////////////////// inline void CImageIterator::SetRow(BYTE *buf, int n) { if (n<0) n = (int)ima->GetEffWidth(); else n = min(n,(int)ima->GetEffWidth()); if (IterImage) memcpy(IterImage,buf,n); } ///////////////////////////////////////////////////////////////////// inline void CImageIterator::GetRow(BYTE *buf, int n) { if ((buf!=NULL)&&(n>0)) memcpy(buf,IterImage,n); } ///////////////////////////////////////////////////////////////////// inline BYTE* CImageIterator::GetRow() { return IterImage; } ///////////////////////////////////////////////////////////////////// inline BYTE* CImageIterator::GetRow(int n) { SetY(n); return IterImage; } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::NextByte() { if (++Itx < (int)ima->GetEffWidth()) return 1; else if (++Ity < (int)ima->GetHeight()){ IterImage += ima->GetEffWidth(); Itx = 0; return 1; } else return 0; } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::PrevByte() { if (--Itx >= 0) return 1; else if (--Ity >= 0){ IterImage -= ima->GetEffWidth(); Itx = 0; return 1; } else return 0; } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::NextStep() { Itx += Stepx; if (Itx < (int)ima->GetEffWidth()) return 1; else { Ity += Stepy; if (Ity < (int)ima->GetHeight()){ IterImage += ima->GetEffWidth(); Itx = 0; return 1; } else return 0; } } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::PrevStep() { Itx -= Stepx; if (Itx >= 0) return 1; else { Ity -= Stepy; if (Ity >= 0 && Ity < (int)ima->GetHeight()) { IterImage -= ima->GetEffWidth(); Itx = 0; return 1; } else return 0; } } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::GetCol(BYTE* pCol, DWORD x) { if ((pCol==0)||(ima->GetBpp()<8)||(x>=ima->GetWidth())) return 0; DWORD h = ima->GetHeight(); DWORD line = ima->GetEffWidth(); BYTE bytes = ima->GetBpp()>>3; BYTE* pSrc; for (DWORD y=0;y<h;y++){ pSrc = ima->GetBits(y) + x*bytes; for (BYTE w=0;w<bytes;w++){ *pCol++=*pSrc++; } } return 1; } ///////////////////////////////////////////////////////////////////// inline BOOL CImageIterator::SetCol(BYTE* pCol, DWORD x) { if ((pCol==0)||(ima->GetBpp()<8)||(x>=ima->GetWidth())) return 0; DWORD h = ima->GetHeight(); DWORD line = ima->GetEffWidth(); BYTE bytes = ima->GetBpp()>>3; BYTE* pSrc; for (DWORD y=0;y<h;y++){ pSrc = ima->GetBits(y) + x*bytes; for (BYTE w=0;w<bytes;w++){ *pSrc++=*pCol++; } } return 1; } ///////////////////////////////////////////////////////////////////// #endif --- NEW FILE: ximaj2k.h --- /* * File: ximaj2k.h * Purpose: J2K Image Class Loader and Writer */ /* === C R E D I T S & D I S C L A I M E R S ============== * CxImageJ2K (c) 04/Aug/2002 Davide Pizzolato - www.xdp.it * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * based on LIBJ2K Copyright (c) 2001-2002, David Janssens - All rights reserved. * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ximaJ2K_h) #define __ximaJ2K_h #include "ximage.h" #if CXIMAGE_SUPPORT_J2K #define LIBJ2K_EXPORTS extern "C" { #include "../j2k/j2k.h" }; class CxImageJ2K: public CxImage { public: CxImageJ2K(): CxImage(CXIMAGE_FORMAT_J2K) {} // bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_J2K);} // bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_J2K);} bool Decode(CxFile * hFile); bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); } #if CXIMAGE_SUPPORT_ENCODE bool Encode(CxFile * hFile); bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); } #endif // CXIMAGE_SUPPORT_ENCODE protected: void j2k_calc_explicit_stepsizes(j2k_tccp_t *tccp, int prec); void j2k_encode_stepsize(int stepsize, int numbps, int *expn, int *mant); int j2k_floorlog2(int a); }; #endif #endif --- NEW FILE: ximajas.h --- /* * File: ximajas.h * Purpose: Jasper Image Class Loader and Writer */ /* === C R E D I T S & D I S C L A I M E R S ============== * CxImageJAS (c) 12/Apr/2003 Davide Pizzolato - www.xdp.it * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * based on JasPer Copyright (c) 2001-2003 Michael David Adams - All rights reserved. * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ximaJAS_h) #define __ximaJAS_h #include "ximage.h" #if CXIMAGE_SUPPORT_JASPER #include "..\jasper\include\jasper\jasper.h" class CxImageJAS: public CxImage { public: CxImageJAS(): CxImage(0) {} // bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,0);} // bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,0);} bool Decode(CxFile * hFile, DWORD imagetype = 0); bool Decode(FILE *hFile, DWORD imagetype = 0) { CxIOFile file(hFile); return Decode(&file,imagetype); } #if CXIMAGE_SUPPORT_ENCODE bool Encode(CxFile * hFile, DWORD imagetype = 0); bool Encode(FILE *hFile, DWORD imagetype = 0) { CxIOFile file(hFile); return Encode(&file,imagetype); } #endif // CXIMAGE_SUPPORT_ENCODE protected: class CxFileJas { public: CxFileJas(CxFile* pFile,jas_stream_t *stream) { if (stream->obj_) jas_free(stream->obj_); stream->obj_ = pFile; stream->ops_->close_ = JasClose; stream->ops_->read_ = JasRead; stream->ops_->seek_ = JasSeek; stream->ops_->write_ = JasWrite; } static int JasRead(jas_stream_obj_t *obj, char *buf, int cnt) { return ((CxFile*)obj)->Read(buf,1,cnt); } static int JasWrite(jas_stream_obj_t *obj, char *buf, int cnt) { return ((CxFile*)obj)->Write(buf,1,cnt); } static long JasSeek(jas_stream_obj_t *obj, long offset, int origin) { return ((CxFile*)obj)->Seek(offset,origin); } static int JasClose(jas_stream_obj_t *obj) { return 1; } }; }; #endif #endif --- NEW FILE: ximajbg.h --- /* * File: ximajbg.h * Purpose: JBG Image Class Loader and Writer */ /* === C R E D I T S & D I S C L A I M E R S ============== * CxImageJBG (c) 18/Aug/2002 Davide Pizzolato - www.xdp.it * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * based on LIBJBG Copyright (c) 2002, Markus Kuhn - All rights reserved. * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ximaJBG_h) #define __ximaJBG_h #include "ximage.h" #if CXIMAGE_SUPPORT_JBG extern "C" { #include "../jbig/jbig.h" }; class CxImageJBG: public CxImage { public: CxImageJBG(): CxImage(CXIMAGE_FORMAT_JBG) {} // bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_JBG);} // bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_JBG);} bool Decode(CxFile * hFile); bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); } #if CXIMAGE_SUPPORT_ENCODE bool Encode(CxFile * hFile); bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); } #endif // CXIMAGE_SUPPORT_ENCODE protected: static void jbig_data_out(BYTE *buffer, unsigned int len, void *file) {((CxFile*)file)->Write(buffer,len,1);} }; #endif #endif --- NEW FILE: ximajpg.h --- /* * File: ximajpg.h * Purpose: JPG Image Class Loader and Writer */ /* === C R E D I T S & D I S C L A I M E R S ============== * CxImageJPG (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it * Permission is given by the author to freely redistribute and include * this code in any program as long as this credit is given where due. * * CxImage version 5.99a 08/Feb/2004 * See the file history.htm for the complete bugfix and news report. * * Special thanks to Troels Knakkergaard for new features, enhancements and bugfixes * * Special thanks to Chris Shearer Cooper for CxFileJpg tips & code * * EXIF support based on jhead-1.8 by Matthias Wandel <mwandel(at)rim(dot)net> * * original CImageJPG and CImageIterator implementation are: * Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra(at)servidor(dot)unam(dot)mx> * * This software is based in part on the work of the Independent JPEG Group. * Copyright (C) 1991-1998, Thomas G. Lane. * * COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY * OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES * THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE * OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED * CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT * THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY * SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL * PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. * * Use at your own risk! * ========================================================== */ #if !defined(__ximaJPEG_h) #define __ixmaJPEG_h #include "ximage.h" #if CXIMAGE_SUPPORT_JPG #define CXIMAGEJPG_SUPPORT_EXIF 1 extern "C" { #include "../jpeg/jpeglib.h" #include "../jpeg/jerror.h" } class DLL_EXP CxImageJPG: public CxImage { public: CxImageJPG(); ~CxImageJPG() {}; // bool Load(const char * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_JPG);} // bool Save(const char * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_JPG);} bool Decode(CxFile * hFile); bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); } #if CXIMAGE_SUPPORT_ENCODE bool Encode(CxFile * hFile); bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); } #endif // CXIMAGE_SUPPORT_ENCODE /* * EXIF support based on jhead-1.8 by Matthias Wandel <mwandel(at)rim(dot)net> */ #if CXIMAGEJPG_SUPPORT_EXIF #define MAX_COMMENT 1000 #define MAX_SECTIONS 20 typedef struct tag_ExifInfo { char Version [5]; char CameraMake [32]; char CameraModel [40]; char DateTime [20]; int Height, Width; int Orientation; int IsColor; int Process; int FlashUsed; float FocalLength; float ExposureTime; float ApertureFNumber; float Distance; float CCDWidth; float ExposureBias; int Whitebalance; int MeteringMode; int ExposureProgram; int ISOequivalent; int CompressionLevel; float FocalplaneXRes; float FocalplaneYRes; float FocalplaneUnits; float Xresolution; float Yresolution; float ResolutionUnit; float Brightness; char Comments[MAX_COMMENT]; unsigned char * ThumbnailPointer; /* Pointer at the thumbnail */ unsigned ThumbnailSize; /* Size of thumbnail. */ bool IsExif; } EXIFINFO; //-------------------------------------------------------------------------- // JPEG markers consist of one or more 0xFF bytes, followed by a marker // code byte (which is not an FF). Here are the marker codes of interest // in this program. (See jdmarker.c for a more complete list.) //-------------------------------------------------------------------------- #define M_SOF0 0xC0 // Start Of Frame N #define M_SOF1 0xC1 // N indicates which compression process #define M_SOF2 0xC2 // Only SOF0-SOF2 are now in common use #define M_SOF3 0xC3 #define M_SOF5 0xC5 // NB: codes C4 and CC are NOT SOF markers #define M_SOF6 0xC6 #define M_SOF7 0xC7 #define M_SOF9 0xC9 #define M_SOF10 0xCA #define M_SOF11 0xCB #define M_SOF13 0xCD #define M_SOF14 0xCE #define M_SOF15 0xCF #define M_SOI 0xD8 // Start Of Image (beginning of datastream) #define M_EOI 0xD9 // End Of Image (end of datastream) #define M_SOS 0xDA // Start Of Scan (begins compressed data) #define M_JFIF 0xE0 // Jfif marker #define M_EXIF 0xE1 // Exif marker #define M_COM 0xFE // COMment class CxExifInfo { typedef struct tag_Section_t{ BYTE* Data; int Type; unsigned Size; } Section_t; public: EXIFINFO* m_exifi... [truncated message content] |
From: <for...@us...> - 2004-02-29 13:17:17
|
Update of /cvsroot/vba/VisualBoyAdvance/win32/lib/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28367/lib/win32 Added Files: CxImage.lib jpeg.lib Log Message: Added support for JPEG/PNG skin images --- NEW FILE: CxImage.lib --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jpeg.lib --- (This appears to be a binary file; contents omitted.) |
From: <for...@us...> - 2004-02-29 13:17:16
|
Update of /cvsroot/vba/VisualBoyAdvance/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28367 Modified Files: GBA.dsp Log Message: Added support for JPEG/PNG skin images Index: GBA.dsp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/win32/GBA.dsp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** GBA.dsp 9 Dec 2003 21:53:28 -0000 1.19 --- GBA.dsp 29 Feb 2004 13:07:01 -0000 1.20 *************** *** 45,49 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "include\zlib" /I "include\png" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "FINAL_VERSION" /D "BKPT_SUPPORT" /D "DEV_VERSION" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 45,49 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "include\zlib" /I "include\png" /I "include\cxImage" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "FINAL_VERSION" /D "BKPT_SUPPORT" /D "DEV_VERSION" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 72,76 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "include\zlib" /I "include\png" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "DEV_VERSION" /D "BKPT_SUPPORT" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 --- 72,76 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /GZ /c ! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "include\zlib" /I "include\png" /I "include\cxImage" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "DEV_VERSION" /D "BKPT_SUPPORT" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 *************** *** 100,104 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "include\zlib" /I "include\png" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "FINAL_VERSION" /D "BKPT_SUPPORT" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "include\zlib" /I "include\png" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "FINAL_VERSION" /D "BKPT_SUPPORT" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 --- 100,104 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "include\zlib" /I "include\png" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "FINAL_VERSION" /D "BKPT_SUPPORT" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "include\zlib" /I "include\png" /I "include\cxImage" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "OEMRESOURCE" /D "_AFXDLL" /D "MMX" /D "FINAL_VERSION" /D "BKPT_SUPPORT" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 *************** *** 1044,1047 **** --- 1044,1055 ---- SOURCE=.\lib\win32\zlibMD.lib # End Source File + # Begin Source File + + SOURCE=.\lib\win32\CxImage.lib + # End Source File + # Begin Source File + + SOURCE=.\lib\win32\jpeg.lib + # End Source File # End Target # End Project |
From: <for...@us...> - 2004-02-29 13:15:42
|
Update of /cvsroot/vba/VisualBoyAdvance/win32/include/cximage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28169/cximage Log Message: Directory /cvsroot/vba/VisualBoyAdvance/win32/include/cximage added to the repository |
From: <for...@us...> - 2004-02-29 13:15:10
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28019 Modified Files: skin.cpp skin.h Log Message: Added support for JPEG/PNG skin images Index: skin.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skin.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** skin.cpp 4 Nov 2003 14:09:52 -0000 1.5 --- skin.cpp 29 Feb 2004 13:04:54 -0000 1.6 *************** *** 15,18 **** --- 15,19 ---- #include "skin.h" #include <stdio.h> + #include "xImage.h" #include "../System.h" *************** *** 57,60 **** --- 58,72 ---- } + HBITMAP CSkin::LoadImage(const char *filename) + { + CxImage image; + image.Load(filename); + if(!image.IsValid()) { + return NULL; + } + + return image.MakeBitmap(NULL); + } + // ---------------------------------------------------------------------------- // Initialize the skin *************** *** 383,388 **** if(strcmp(rgn, "")) rgn = path + rgn; ! ! m_hBmp = (HBITMAP)LoadImage(NULL, bmpName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_CREATEDIBSECTION); if (!m_hBmp) { m_error = "Error loading skin bitmap " + bmpName; --- 395,401 ---- if(strcmp(rgn, "")) rgn = path + rgn; ! ! m_hBmp = LoadImage(bmpName); ! if (!m_hBmp) { m_error = "Error loading skin bitmap " + bmpName; *************** *** 445,455 **** CString normalBmp = path + buffer; ! HBITMAP bmp = (HBITMAP)LoadImage(NULL, ! normalBmp, ! IMAGE_BITMAP, ! 0, ! 0, ! LR_LOADFROMFILE|LR_CREATEDIBSECTION); ! if (!bmp) { m_error = "Error loading button bitmap " + normalBmp; return false; --- 458,463 ---- CString normalBmp = path + buffer; ! HBITMAP bmp = LoadImage(normalBmp); ! if(!bmp) { m_error = "Error loading button bitmap " + normalBmp; return false; *************** *** 464,473 **** CString downBmp = path + buffer; ! bmp = (HBITMAP)LoadImage(NULL, ! downBmp, ! IMAGE_BITMAP, ! 0, ! 0, ! LR_LOADFROMFILE|LR_CREATEDIBSECTION); if (!bmp) { m_error = "Error loading button down bitmap " + downBmp; --- 472,477 ---- CString downBmp = path + buffer; ! bmp = LoadImage(downBmp); ! if (!bmp) { m_error = "Error loading button down bitmap " + downBmp; *************** *** 479,488 **** CString overBmp = path + buffer; ! bmp = (HBITMAP)LoadImage(NULL, ! overBmp, ! IMAGE_BITMAP, ! 0, ! 0, ! LR_LOADFROMFILE|LR_CREATEDIBSECTION); if (!bmp) { m_error = "Error loading button over bitmap " + overBmp; --- 483,488 ---- CString overBmp = path + buffer; ! bmp = LoadImage(overBmp); ! if (!bmp) { m_error = "Error loading button over bitmap " + overBmp; Index: skin.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/skin.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** skin.h 4 Nov 2003 14:09:53 -0000 1.3 --- skin.h 29 Feb 2004 13:04:54 -0000 1.4 *************** *** 154,157 **** --- 154,158 ---- private: + HBITMAP LoadImage(const char *); bool ReadButton(const char *, int); static bool ParseRect(char *, RECT &); |
From: <for...@us...> - 2004-02-24 11:28:57
|
Update of /cvsroot/vba/VisualBoyAdvance/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19684 Modified Files: admame.cpp Log Message: Sync code with Scale2x V2.0 Index: admame.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/admame.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admame.cpp 20 Jan 2004 22:02:03 -0000 1.9 --- admame.cpp 24 Feb 2004 11:22:35 -0000 1.10 *************** *** 42,171 **** #endif ! /* Suggested in "Intel Optimization" for Pentium II */ ! #define ASM_JUMP_ALIGN ".p2align 4\n" ! ! static void internal_scale2x_16_def(u16 *dst0, u16* dst1, const u16* src0, const u16* src1, const u16* src2, unsigned count) { /* first pixel */ ! dst0[0] = src1[0]; ! dst1[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0]) ! dst0[1] =src0[0]; ! else ! dst0[1] =src1[0]; ! if (src1[1] == src2[0] && src0[0] != src2[0]) ! dst1[1] =src2[0]; else ! dst1[1] =src1[0]; ++src0; ++src1; ++src2; ! dst0 += 2; ! dst1 += 2; /* central pixels */ count -= 2; while (count) { ! if (src1[-1] == src0[0] && src2[0] != src0[0] && src1[1] != src0[0]) ! dst0[0] = src0[0]; ! else ! dst0[0] = src1[0]; ! if (src1[1] == src0[0] && src2[0] != src0[0] && src1[-1] != src0[0]) ! dst0[1] =src0[0]; ! else ! dst0[1] =src1[0]; ! ! if (src1[-1] == src2[0] && src0[0] != src2[0] && src1[1] != src2[0]) ! dst1[0] =src2[0]; ! else ! dst1[0] =src1[0]; ! if (src1[1] == src2[0] && src0[0] != src2[0] && src1[-1] != src2[0]) ! dst1[1] =src2[0]; ! else ! dst1[1] =src1[0]; ! ++src0; ++src1; ++src2; ! dst0 += 2; ! dst1 += 2; --count; } ! /* last pixel */ if (src1[-1] == src0[0] && src2[0] != src0[0]) ! dst0[0] =src0[0]; ! else ! dst0[0] =src1[0]; ! if (src1[-1] == src2[0] && src0[0] != src2[0]) ! dst1[0] =src2[0]; else ! dst1[0] =src1[0]; ! dst0[1] =src1[0]; ! dst1[1] =src1[0]; } ! static void internal_scale2x_32_def(u32* dst0, ! u32* dst1, const u32* src0, const u32* src1, const u32* src2, ! unsigned count) { /* first pixel */ ! dst0[0] = src1[0]; ! dst1[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0]) ! dst0[1] = src0[0]; ! else ! dst0[1] = src1[0]; ! if (src1[1] == src2[0] && src0[0] != src2[0]) ! dst1[1] = src2[0]; else ! dst1[1] = src1[0]; ++src0; ++src1; ++src2; ! dst0 += 2; ! dst1 += 2; ! /* central pixels */ count -= 2; while (count) { ! if (src1[-1] == src0[0] && src2[0] != src0[0] && src1[1] != src0[0]) ! dst0[0] = src0[0]; ! else ! dst0[0] = src1[0]; ! if (src1[1] == src0[0] && src2[0] != src0[0] && src1[-1] != src0[0]) ! dst0[1] = src0[0]; ! else ! dst0[1] = src1[0]; ! ! if (src1[-1] == src2[0] && src0[0] != src2[0] && src1[1] != src2[0]) ! dst1[0] = src2[0]; ! else ! dst1[0] = src1[0]; ! if (src1[1] == src2[0] && src0[0] != src2[0] && src1[-1] != src2[0]) ! dst1[1] = src2[0]; ! else ! dst1[1] = src1[0]; ! ++src0; ++src1; ++src2; ! dst0 += 2; ! dst1 += 2; --count; } ! /* last pixel */ if (src1[-1] == src0[0] && src2[0] != src0[0]) ! dst0[0] = src0[0]; ! else ! dst0[0] = src1[0]; ! if (src1[-1] == src2[0] && src0[0] != src2[0]) ! dst1[0] = src2[0]; else ! dst1[0] = src1[0]; ! dst0[1] = src1[0]; ! dst1[1] = src1[0]; } --- 42,124 ---- #endif ! static void internal_scale2x_16_def(u16 *dst, const u16* src0, const u16* src1, const u16* src2, unsigned count) { /* first pixel */ ! dst[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0]) ! dst[1] = src0[0]; else ! dst[1] = src1[0]; ++src0; ++src1; ++src2; ! dst += 2; /* central pixels */ count -= 2; while (count) { ! if (src0[0] != src2[0] && src1[-1] != src1[1]) { ! dst[0] = src1[-1] == src0[0] ? src0[0] : src1[0]; ! dst[1] = src1[1] == src0[0] ? src0[0] : src1[0]; ! } else { ! dst[0] = src1[0]; ! dst[1] = src1[0]; ! } ! ++src0; ++src1; ++src2; ! dst += 2; --count; } ! /* last pixel */ if (src1[-1] == src0[0] && src2[0] != src0[0]) ! dst[0] = src0[0]; else ! dst[0] = src1[0]; ! dst[1] = src1[0]; } ! static void internal_scale2x_32_def(u32* dst, const u32* src0, const u32* src1, const u32* src2, ! unsigned count) ! { /* first pixel */ ! dst[0] = src1[0]; if (src1[1] == src0[0] && src2[0] != src0[0]) ! dst[1] = src0[0]; else ! dst[1] = src1[0]; ++src0; ++src1; ++src2; ! dst += 2; ! /* central pixels */ count -= 2; while (count) { ! if (src0[0] != src2[0] && src1[-1] != src1[1]) { ! dst[0] = src1[-1] == src0[0] ? src0[0] : src1[0]; ! dst[1] = src1[1] == src0[0] ? src0[0] : src1[0]; ! } else { ! dst[0] = src1[0]; ! dst[1] = src1[0]; ! } ! ++src0; ++src1; ++src2; ! dst += 2; --count; } ! /* last pixel */ if (src1[-1] == src0[0] && src2[0] != src0[0]) ! dst[0] = src0[0]; else ! dst[0] = src1[0]; ! dst[1] = src1[0]; } *************** *** 179,187 **** /* first run */ /* set the current, current_pre, current_next registers */ ! "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */ "movq 0(%1),%%mm7\n" "movq 8(%1),%%mm1\n" ! "psrlq $48,%%mm0\n" "psllq $48,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" --- 132,141 ---- /* first run */ /* set the current, current_pre, current_next registers */ ! "movq 0(%1), %%mm0\n" "movq 0(%1),%%mm7\n" "movq 8(%1),%%mm1\n" ! "psllq $48,%%mm0\n" "psllq $48,%%mm1\n" + "psrlq $48, %%mm0\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" *************** *** 194,199 **** "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" --- 148,153 ---- "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" *************** *** 221,225 **** "por %%mm5,%%mm4\n" ! /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" --- 175,179 ---- "por %%mm5,%%mm4\n" ! /* set *dst */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" *************** *** 237,241 **** "shrl $2,%4\n" "jz 1f\n" ! ASM_JUMP_ALIGN "0:\n" --- 191,195 ---- "shrl $2,%4\n" "jz 1f\n" ! "0:\n" *************** *** 256,261 **** "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" --- 210,215 ---- "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" *************** *** 283,287 **** "por %%mm5,%%mm4\n" ! /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" --- 237,241 ---- "por %%mm5,%%mm4\n" ! /* set *dst */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" *************** *** 302,308 **** /* final run */ /* set the current, current_pre, current_next registers */ ! "movq -8(%1),%%mm0\n" "movq (%1),%%mm7\n" ! "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */ "psrlq $48,%%mm0\n" "psllq $48,%%mm1\n" --- 256,263 ---- /* final run */ /* set the current, current_pre, current_next registers */ ! "movq (%1),%%mm1\n" "movq (%1),%%mm7\n" ! "movq -8(%1),%%mm0\n" ! "psrlq $48,%%mm1\n" "psrlq $48,%%mm0\n" "psllq $48,%%mm1\n" *************** *** 317,322 **** "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" --- 272,277 ---- "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" *************** *** 344,348 **** "por %%mm5,%%mm4\n" ! /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" --- 299,303 ---- "por %%mm5,%%mm4\n" ! /* set *dst */ "movq %%mm2,%%mm3\n" "punpcklwd %%mm4,%%mm2\n" *************** *** 366,374 **** /* first run */ /* set the current, current_pre, current_next registers */ ! pxor mm0,mm0; /* use a fake black out of screen */ movq mm7, qword ptr [ebx]; movq mm1, qword ptr [ebx + 8]; ! psrlq mm0, 48; psllq mm1, 48; movq mm2, mm7; movq mm3, mm7; --- 321,330 ---- /* first run */ /* set the current, current_pre, current_next registers */ ! movq mm0, qword ptr [ebx]; movq mm7, qword ptr [ebx]; movq mm1, qword ptr [ebx + 8]; ! psllq mm0, 48; psllq mm1, 48; + psrlq mm0, 48; movq mm2, mm7; movq mm3, mm7; *************** *** 381,386 **** movq mm6, qword ptr [eax]; ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2, mm0; movq mm4, mm1; --- 337,342 ---- movq mm6, qword ptr [eax]; ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ movq mm2, mm0; movq mm4, mm1; *************** *** 443,448 **** movq mm6, qword ptr [eax]; ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; --- 399,404 ---- movq mm6, qword ptr [eax]; ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ movq mm2,mm0; movq mm4,mm1; *************** *** 470,474 **** por mm4,mm5; ! /* set *dst0 */ movq mm3,mm2; punpcklwd mm2,mm4; --- 426,430 ---- por mm4,mm5; ! /* set *dst */ movq mm3,mm2; punpcklwd mm2,mm4; *************** *** 489,495 **** /* final run */ /* set the current, current_pre, current_next registers */ ! movq mm0, qword ptr [ebx-8]; movq mm7, qword ptr [ebx]; ! pxor mm1,mm1; /* use a fake black out of screen */ psrlq mm0,48; psllq mm1,48; --- 445,452 ---- /* final run */ /* set the current, current_pre, current_next registers */ ! movq mm1, qword ptr [ebx]; movq mm7, qword ptr [ebx]; ! movq mm0, qword ptr [ebx-8]; ! psrlq mm1,48; psrlq mm0,48; psllq mm1,48; *************** *** 504,509 **** movq mm6, qword ptr [eax]; ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; --- 461,466 ---- movq mm6, qword ptr [eax]; ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ movq mm2,mm0; movq mm4,mm1; *************** *** 531,535 **** por mm4,mm5; ! /* set *dst0 */ movq mm3,mm2; punpcklwd mm2,mm4; --- 488,492 ---- por mm4,mm5; ! /* set *dst */ movq mm3,mm2; punpcklwd mm2,mm4; *************** *** 557,565 **** /* first run */ /* set the current, current_pre, current_next registers */ ! "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */ "movq 0(%1),%%mm7\n" "movq 8(%1),%%mm1\n" ! "psrlq $32,%%mm0\n" "psllq $32,%%mm1\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" --- 514,523 ---- /* first run */ /* set the current, current_pre, current_next registers */ ! "movq 0(%1),%%mm0\n" "movq 0(%1),%%mm7\n" "movq 8(%1),%%mm1\n" ! "psllq $32,%%mm0\n" "psllq $32,%%mm1\n" + "psrlq $32,%%mm0\n" "movq %%mm7,%%mm2\n" "movq %%mm7,%%mm3\n" *************** *** 572,577 **** "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" --- 530,535 ---- "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" *************** *** 599,608 **** "por %%mm5,%%mm4\n" ! /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" "punpckhdq %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" ! "movq %%mm3,8(%3)\n" /* next */ --- 557,566 ---- "por %%mm5,%%mm4\n" ! /* set *dst */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" "punpckhdq %%mm4,%%mm3\n" "movq %%mm2,(%3)\n" ! "movq %%mm3, 8(%3)\n" /* next */ *************** *** 615,619 **** "shrl $1,%4\n" "jz 1f\n" ! ASM_JUMP_ALIGN "0:\n" --- 573,577 ---- "shrl $1,%4\n" "jz 1f\n" ! "0:\n" *************** *** 634,639 **** "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" --- 592,597 ---- "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" *************** *** 661,665 **** "por %%mm5,%%mm4\n" ! /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" --- 619,623 ---- "por %%mm5,%%mm4\n" ! /* set *dst */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" *************** *** 680,686 **** /* final run */ /* set the current, current_pre, current_next registers */ ! "movq -8(%1),%%mm0\n" "movq (%1),%%mm7\n" ! "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */ "psrlq $32,%%mm0\n" "psllq $32,%%mm1\n" --- 638,645 ---- /* final run */ /* set the current, current_pre, current_next registers */ ! "movq (%1),%%mm1\n" "movq (%1),%%mm7\n" ! "movq -8(%1), %%mm0\n" ! "psrlq $32,%%mm1\n" "psrlq $32,%%mm0\n" "psllq $32,%%mm1\n" *************** *** 695,700 **** "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" --- 654,659 ---- "movq (%0),%%mm6\n" ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ "movq %%mm0,%%mm2\n" "movq %%mm1,%%mm4\n" *************** *** 722,726 **** "por %%mm5,%%mm4\n" ! /* set *dst0 */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" --- 681,685 ---- "por %%mm5,%%mm4\n" ! /* set *dst */ "movq %%mm2,%%mm3\n" "punpckldq %%mm4,%%mm2\n" *************** *** 744,752 **** /* first run */ /* set the current, current_pre, current_next registers */ ! pxor mm0,mm0; movq mm7,qword ptr [ebx]; movq mm1,qword ptr [ebx + 8]; ! psrlq mm0,32; psllq mm1,32; movq mm2,mm7; movq mm3,mm7; --- 703,712 ---- /* first run */ /* set the current, current_pre, current_next registers */ ! movq mm0,qword ptr [ebx]; movq mm7,qword ptr [ebx]; movq mm1,qword ptr [ebx + 8]; ! psllq mm0,32; psllq mm1,32; + psrlq mm0,32; movq mm2,mm7; movq mm3,mm7; *************** *** 759,764 **** movq mm6,qword ptr [eax]; ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; --- 719,724 ---- movq mm6,qword ptr [eax]; ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ movq mm2,mm0; movq mm4,mm1; *************** *** 786,790 **** por mm4,mm5; ! /* set *dst0 */ movq mm3,mm2; punpckldq mm2,mm4; --- 746,750 ---- por mm4,mm5; ! /* set *dst */ movq mm3,mm2; punpckldq mm2,mm4; *************** *** 820,825 **** movq mm6,qword ptr[eax]; ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; --- 780,785 ---- movq mm6,qword ptr[eax]; ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ movq mm2,mm0; movq mm4,mm1; *************** *** 847,851 **** por mm4,mm5; ! /* set *dst0 */ movq mm3,mm2; punpckldq mm2,mm4; --- 807,811 ---- por mm4,mm5; ! /* set *dst */ movq mm3,mm2; punpckldq mm2,mm4; *************** *** 866,872 **** /* final run */ /* set the current, current_pre, current_next registers */ ! movq mm0,qword ptr [ebx-8]; movq mm7,qword ptr [ebx]; ! pxor mm1,mm1; psrlq mm0,32; psllq mm1,32; --- 826,833 ---- /* final run */ /* set the current, current_pre, current_next registers */ ! movq mm1,qword ptr [ebx]; movq mm7,qword ptr [ebx]; ! movq mm0,qword ptr [ebx-8]; ! psrlq mm1,32; psrlq mm0,32; psllq mm1,32; *************** *** 881,886 **** movq mm6,qword ptr [eax]; ! /* compute the upper-left pixel for dst0 on %%mm2 */ ! /* compute the upper-right pixel for dst0 on %%mm4 */ movq mm2,mm0; movq mm4,mm1; --- 842,847 ---- movq mm6,qword ptr [eax]; ! /* compute the upper-left pixel for dst on %%mm2 */ ! /* compute the upper-right pixel for dst on %%mm4 */ movq mm2,mm0; movq mm4,mm1; *************** *** 908,912 **** por mm4,mm5; ! /* set *dst0 */ movq mm3,mm2; punpckldq mm2,mm4; --- 869,873 ---- por mm4,mm5; ! /* set *dst */ movq mm3,mm2; punpckldq mm2,mm4; *************** *** 969,973 **** } else { #endif ! internal_scale2x_16_def(dst0, dst1, src0, src0, src1, width); int count = height; --- 930,935 ---- } else { #endif ! internal_scale2x_16_def(dst0, src0, src0, src1, width); ! internal_scale2x_16_def(dst1, src1, src0, src0, width); int count = height; *************** *** 977,981 **** dst0 += dstPitch; dst1 += dstPitch; ! internal_scale2x_16_def(dst0, dst1, src0, src1, src2, width); src0 = src1; src1 = src2; --- 939,944 ---- dst0 += dstPitch; dst1 += dstPitch; ! internal_scale2x_16_def(dst0, src0, src1, src2, width); ! internal_scale2x_16_def(dst1, src2, src1, src0, width); src0 = src1; src1 = src2; *************** *** 985,989 **** dst0 += dstPitch; dst1 += dstPitch; ! internal_scale2x_16_def(dst0, dst1, src0, src1, src1, width); #ifdef MMX } --- 948,953 ---- dst0 += dstPitch; dst1 += dstPitch; ! internal_scale2x_16_def(dst0, src0, src1, src1, width); ! internal_scale2x_16_def(dst1, src1, src1, src0, width); #ifdef MMX } *************** *** 1021,1025 **** } else { #endif ! internal_scale2x_32_def(dst0, dst1, src0, src0, src1, width); int count = height; --- 985,990 ---- } else { #endif ! internal_scale2x_32_def(dst0, src0, src0, src1, width); ! internal_scale2x_32_def(dst1, src1, src0, src0, width); int count = height; *************** *** 1029,1033 **** dst0 += dstPitch >> 1; dst1 += dstPitch >> 1; ! internal_scale2x_32_def(dst0, dst1, src0, src1, src2, width); src0 = src1; src1 = src2; --- 994,999 ---- dst0 += dstPitch >> 1; dst1 += dstPitch >> 1; ! internal_scale2x_32_def(dst0, src0, src1, src2, width); ! internal_scale2x_32_def(dst1, src2, src1, src0, width); src0 = src1; src1 = src2; *************** *** 1037,1041 **** dst0 += dstPitch >> 1; dst1 += dstPitch >> 1; ! internal_scale2x_32_def(dst0, dst1, src0, src1, src1, width); #ifdef MMX } --- 1003,1008 ---- dst0 += dstPitch >> 1; dst1 += dstPitch >> 1; ! internal_scale2x_32_def(dst0, src0, src1, src1, width); ! internal_scale2x_32_def(dst1, src1, src1, src0, width); #ifdef MMX } |