ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
609 discussions
Start a n
N
ew thread
[royce] 13915: simplified verbosity
by royce@svn.reactos.com
simplified verbosity Modified: branches/xmlbuildsystem/reactos/Makefile Modified: branches/xmlbuildsystem/reactos/tools/Makefile Modified: branches/xmlbuildsystem/reactos/tools/buildno/makefile Modified: branches/xmlbuildsystem/reactos/tools/cdmake/makefile Modified: branches/xmlbuildsystem/reactos/tools/nci/makefile Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/makefile Modified: branches/xmlbuildsystem/reactos/tools/unicode/makefile Modified: branches/xmlbuildsystem/reactos/tools/wmc/makefile Modified: branches/xmlbuildsystem/reactos/tools/wpp/Makefile Modified: branches/xmlbuildsystem/reactos/tools/wrc/makefile _____ Modified: branches/xmlbuildsystem/reactos/Makefile --- branches/xmlbuildsystem/reactos/Makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/Makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -1,16 +1,53 @@ # Default to half-verbose mode ifeq ($(VERBOSE),no) Q = @ - HALFVERBOSEECHO = @: + HALFVERBOSEECHO = no else ifeq ($(VERBOSE),yes) Q = - HALFVERBOSEECHO = @: + HALFVERBOSEECHO = no else Q = @ - HALFVERBOSEECHO = @echo + HALFVERBOSEECHO = yes endif endif +ifeq ($(HALFVERBOSEECHO),yes) + ECHO_INVOKE =@echo [INVOKE] $< + ECHO_PCH =@echo [PCH] $@ + ECHO_CC =@echo [CC] $< + ECHO_GAS =@echo [GAS] $< + ECHO_NASM =@echo [NASM] $< + ECHO_AR =@echo [AR] $@ + ECHO_WINEBLD=@echo [WINEBLD] $@ + ECHO_WRC =@echo [WRC] $@ + ECHO_BIN2RES=@echo [BIN2RES] $< + ECHO_DLLTOOL=@echo [DLLTOOL] $@ + ECHO_LD =@echo [LD] $@ + ECHO_RBUILD =@echo [RBUILD] $@ + ECHO_RSYM =@echo [RSYM] $@ + ECHO_NCI =@echo [NCI] $@ + ECHO_CABMAN =@echo [CABMAN] $< + ECHO_CDMAKE =@echo [CDMAKE] $@ + ECHO_TEST =@echo [TEST] $@ +else + ECHO_INVOKE =@true + ECHO_PCH =@true + ECHO_CC =@true + ECHO_GAS =@true + ECHO_NASM =@true + ECHO_AR =@true + ECHO_WINEBLD=@true + ECHO_WRC =@true + ECHO_BIN2RES=@true + ECHO_DLLTOOL=@true + ECHO_LD =@true + ECHO_RBUILD =@true + ECHO_RSYM =@true + ECHO_NCI =@true + ECHO_CABMAN =@true + ECHO_CDMAKE =@true + ECHO_TEST =@true +endif host_gcc = $(Q)gcc @@ -77,7 +114,7 @@ makefile.auto: $(RMKDIR_TARGET) $(BUILDNO_TARGET) $(NCI_SERVICE_FILES) $(WMC_TARGET) $(WRC_TARGET) \ $(RSYM_TARGET) $(CDMAKE_TARGET) $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES) - $(HALFVERBOSEECHO) [RBUILD] makefile.auto + $(ECHO_RBUILD) $(Q)tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw _____ Modified: branches/xmlbuildsystem/reactos/tools/Makefile --- branches/xmlbuildsystem/reactos/tools/Makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/Makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -14,11 +14,11 @@ RMKDIR_HOST_LFLAGS = -g $(RMKDIR_TARGET): $(RMKDIR_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gcc} $(RMKDIR_OBJECTS) $(RMKDIR_HOST_LFLAGS) -o $(RMKDIR_TARGET) $(RMKDIR_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(RMKDIR_HOST_CFLAGS) -c $< -o $@ .PHONY: rmkdir_clean @@ -43,11 +43,11 @@ RSYM_HOST_LFLAGS = -g $(RSYM_TARGET): $(RSYM_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gcc} $(RSYM_OBJECTS) $(RSYM_HOST_LFLAGS) -o $(RSYM_TARGET) $(RSYM_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@ .PHONY: rsym_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/buildno/makefile --- branches/xmlbuildsystem/reactos/tools/buildno/makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/buildno/makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -17,11 +17,11 @@ BUILDNO_HOST_LFLAGS = -g $(BUILDNO_TARGET): $(BUILDNO_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gpp} $(BUILDNO_OBJECTS) $(BUILDNO_HOST_CFLAGS) -o $(BUILDNO_TARGET) $(BUILDNO_OBJECTS): %.o : %.cpp include$(SEP)reactos$(SEP)version.h - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@ .PHONY: buildno_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/cdmake/makefile --- branches/xmlbuildsystem/reactos/tools/cdmake/makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/cdmake/makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -15,11 +15,11 @@ CDMAKE_HOST_LFLAGS = -g $(CDMAKE_TARGET): $(CDMAKE_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gcc} $(CDMAKE_OBJECTS) $(CDMAKE_HOST_CFLAGS) -o $(CDMAKE_TARGET) $(CDMAKE_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(CDMAKE_CFLAGS) -c $< -o $@ .PHONY: cdmake_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/nci/makefile --- branches/xmlbuildsystem/reactos/tools/nci/makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/nci/makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -14,11 +14,11 @@ NCI_HOST_LFLAGS = -g $(NCI_TARGET): $(NCI_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gcc} $(NCI_OBJECTS) $(NCI_HOST_CFLAGS) -o $(NCI_TARGET) $(NCI_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(NCI_HOST_CFLAGS) -c $< -o $@ .PHONY: nci_clean @@ -47,7 +47,7 @@ $(WIN32K_USER_STUBS) $(NCI_SERVICE_FILES): $(NCI_TARGET) - $(HALFVERBOSEECHO) [NCI] $@ + $(ECHO_NCI) $(Q)$(EXEPREFIX)$(NCI_TARGET) \ $(KERNEL_SVC_DB) \ $(WIN32K_SVC_DB) \ _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-03-10 19:56:46 UTC (rev 13915) @@ -726,7 +726,7 @@ "%s: %s\n", objectFilename.c_str (), deps.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [CC] $<\n" ); + fprintf ( fMakefile, "\t$(ECHO_CC)\n" ); fprintf ( fMakefile, "\t%s -c %s -o %s %s\n", cc.c_str (), @@ -746,7 +746,7 @@ "%s: %s\n", objectFilename.c_str (), sourceFilename.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [GAS] $<\n" ); + fprintf ( fMakefile, "\t$(ECHO_GAS)\n" ); fprintf ( fMakefile, "\t%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n", cc.c_str (), @@ -765,7 +765,7 @@ "%s: %s\n", objectFilename.c_str (), sourceFilename.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [NASM] $<\n" ); + fprintf ( fMakefile, "\t$(ECHO_NASM)\n" ); fprintf ( fMakefile, "\t%s -f win32 %s -o %s %s\n", "$(Q)nasm", @@ -788,7 +788,7 @@ "%s: %s\n", objectFilename.c_str (), sourceFilename.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [WRC] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_WRC)\n" ); fprintf ( fMakefile, "\t${gcc} -xc -E -DRC_INVOKED ${%s} %s > %s\n", windresflagsMacro.c_str (), @@ -829,7 +829,7 @@ "%s: %s\n", def_file.c_str (), sourceFilename.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [WINEBLD] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_WINEBLD)\n" ); fprintf ( fMakefile, "\t%s --def=%s -o %s\n", "${winebuild}", @@ -840,7 +840,7 @@ "%s: %s\n", stub_file.c_str (), sourceFilename.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [WINEBLD] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_WINEBLD)\n" ); fprintf ( fMakefile, "\t%s --pedll=%s -o %s\n", "${winebuild}", @@ -929,7 +929,7 @@ const string& libsMacro, string_list& clean_files ) const { - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [LD] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_LD)\n" ); string targetName ( module.GetTargetName () ); string target ( FixupTargetFilename ( module.GetPath () ) ); if ( module.importLibrary != NULL ) @@ -996,7 +996,7 @@ GetLinkerMacro ( module ).c_str () ); } - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [RSYM] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_RSYM)\n" ); fprintf ( fMakefile, "\t${rsym} %s %s\n\n", target.c_str (), @@ -1066,7 +1066,7 @@ "%s: %s\n", gch_file.c_str(), pch_file.c_str() ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [PCH] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_PCH)\n" ); fprintf ( fMakefile, "\t%s -c %s -o %s %s\n\n", @@ -1115,7 +1115,7 @@ archiveFilename.c_str (), objs_macro.c_str ()); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [AR] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_AR)\n" ); fprintf ( fMakefile, "\t%s -rc %s %s\n\n", @@ -1320,7 +1320,7 @@ "%s: %s\n", invoke.GetTargets ().c_str (), FixupTargetFilename ( invoke.invokeModule->GetPath () ).c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [INVOKE] $<\n" ); + fprintf ( fMakefile, "\t$(ECHO_INVOKE)\n" ); fprintf ( fMakefile, "\t%s %s\n\n", FixupTargetFilename ( invoke.invokeModule->GetPath () ).c_str (), @@ -1415,7 +1415,7 @@ library_target.c_str (), definitionDependencies.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [DLLTOOL] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_DLLTOOL)\n" ); string killAt = module.mangledSymbols ? "" : "--kill-at"; fprintf ( fMakefile, @@ -1506,7 +1506,7 @@ target.c_str (), objectsMacro.c_str (), linkDepsMacro.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [LD] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_LD)\n" ); fprintf ( fMakefile, "\t%s %s -o %s %s %s\n\n", linker.c_str (), @@ -1561,7 +1561,7 @@ target.c_str (), objectsMacro.c_str (), linkDepsMacro.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [LD] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_LD)\n" ); fprintf ( fMakefile, "\t${gcc} %s %s -Wl,--base-file,%s -o %s %s %s\n", GetLinkerMacro ( module ).c_str (), @@ -1594,7 +1594,7 @@ fprintf ( fMakefile, "\t-@${rm} %s\n", temp_exp.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [RSYM] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_RSYM)\n" ); fprintf ( fMakefile, "\t${rsym} %s %s\n\n", target.c_str (), @@ -1914,7 +1914,7 @@ if ( extension == ".rc" || extension == ".RC" ) { string resource = FixupTargetFilename ( file.name ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [BIN2RES] $<\n" ); + fprintf ( fMakefile, "\t$(ECHO_BIN2RES)\n" ); fprintf ( fMakefile, "\t@:echo ${bin2res} -f -x %s\n", resource.c_str () ); } @@ -2130,7 +2130,7 @@ objectsMacro.c_str (), linkDepsMacro.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [LD] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_LD)\n" ); fprintf ( fMakefile, "\t${ld} %s -N -Ttext=0x8000 -o %s %s %s\n", @@ -2346,7 +2346,7 @@ isoboot.c_str (), cdDirectories.c_str (), cdFiles.c_str () ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [CABMAN] $<\n" ); + fprintf ( fMakefile, "\t$(ECHO_CABMAN)\n" ); fprintf ( fMakefile, "\t${cabman} -C %s -L %s -I\n", reactosDff.c_str (), @@ -2363,7 +2363,7 @@ module ); OutputCdfileCopyCommands ( bootcdDirectory, module ); - fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [CDMAKE] $@\n" ); + fprintf ( fMakefile, "\t$(ECHO_CDMAKE)\n" ); fprintf ( fMakefile, "\t${cdmake} -v -m -b %s %s REACTOS ReactOS.iso\n", isoboot.c_str (), _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/makefile --- branches/xmlbuildsystem/reactos/tools/rbuild/makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/rbuild/makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -85,29 +85,29 @@ RBUILD_HOST_LFLAGS = -g $(RBUILD_TARGET): $(RBUILD_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gpp} $(RBUILD_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $(RBUILD_TARGET) $(RBUILD_COMMON_OBJECTS): %.o: %.cpp - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ $(RBUILD_SPECIAL_OBJECTS): %.o: %.cpp - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ $(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gpp} $(RBUILD_TEST_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $(RBUILD_TEST_TARGET) $(RBUILD_TEST_SPECIAL_OBJECTS): %.o: %.cpp - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ .PHONY: rbuild_test rbuild_test: $(RBUILD_TEST_TARGET) - $(HALFVERBOSEECHO) [TEST] $@ + $(ECHO_TEST) $(Q)$(RBUILD_TEST_TARGET) .PHONY: rbuild_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/unicode/makefile --- branches/xmlbuildsystem/reactos/tools/unicode/makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/unicode/makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -83,12 +83,15 @@ -Dwchar_t="unsigned short" -D_WCHAR_T_DEFINED \ -I$(UNICODE_BASE) -Iinclude/wine -Iw32api/include +.PHONY: unicode +unicode: $(UNICODE_TARGET) + $(UNICODE_TARGET): $(UNICODE_OBJECTS) - $(HALFVERBOSEECHO) [AR] $@ + $(ECHO_AR) ${host_ar} -rc $(UNICODE_TARGET) $(UNICODE_OBJECTS) $(UNICODE_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(UNICODE_HOST_CFLAGS) -c $< -o $@ .PHONY: unicode_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/wmc/makefile --- branches/xmlbuildsystem/reactos/tools/wmc/makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/wmc/makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -21,11 +21,11 @@ WMC_HOST_LFLAGS = -g $(WMC_TARGET): $(WMC_OBJECTS) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gcc} $(WMC_OBJECTS) $(WMC_HOST_LFLAGS) -o $(WMC_TARGET) $(WMC_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@ .PHONY: wmc_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/wpp/Makefile --- branches/xmlbuildsystem/reactos/tools/wpp/Makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/wpp/Makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -15,11 +15,11 @@ WPP_HOST_CFLAGS = -D__USE_W32API -I$(WPP_BASE) -Iinclude -Iinclude/wine -g $(WPP_TARGET): $(WPP_OBJECTS) - $(HALFVERBOSEECHO) [AR] $@ + $(ECHO_AR) ${host_ar} -rc $(WPP_TARGET) $(WPP_OBJECTS) $(WPP_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(WPP_HOST_CFLAGS) -c $< -o $@ .PHONY: wpp_clean _____ Modified: branches/xmlbuildsystem/reactos/tools/wrc/makefile --- branches/xmlbuildsystem/reactos/tools/wrc/makefile 2005-03-10 17:46:44 UTC (rev 13914) +++ branches/xmlbuildsystem/reactos/tools/wrc/makefile 2005-03-10 19:56:46 UTC (rev 13915) @@ -28,11 +28,11 @@ WRC_HOST_LFLAGS = -g $(WRC_TARGET): $(WRC_OBJECTS) $(UNICODE_TARGET) $(WPP_TARGET) - $(HALFVERBOSEECHO) [LD] $@ + $(ECHO_LD) ${host_gcc} $(WRC_OBJECTS) $(UNICODE_TARGET) $(WPP_TARGET) $(WRC_HOST_LFLAGS) -o $(WRC_TARGET) $(WRC_OBJECTS): %.o : %.c - $(HALFVERBOSEECHO) [CC] $< + $(ECHO_CC) ${host_gcc} $(WRC_HOST_CFLAGS) -c $< -o $@ .PHONY: wrc_clean
19 years, 9 months
1
0
0
0
[royce] 13914: remove incorrect <pch>
by royce@svn.reactos.com
remove incorrect <pch> Modified: branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml _____ Modified: branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml --- branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml 2005-03-10 16:50:29 UTC (rev 13913) +++ branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml 2005-03-10 17:46:44 UTC (rev 13914) @@ -4,9 +4,6 @@ <define name="__USE_W32API"/> <include>drivers/net/tcpip/include</include> <include>drivers/lib/oskittcp/include</include> - <directory name="include"> - <pch>precomp.h</pch> - </directory> <directory name="network"> <if property="ARCH" value="i386"> <directory name="i386">
19 years, 9 months
1
0
0
0
[royce] 13913: add <pch> to existing xml files that support pch on trunk
by royce@svn.reactos.com
add <pch> to existing xml files that support pch on trunk Modified: branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml Modified: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml Modified: branches/xmlbuildsystem/reactos/drivers/net/ndis/ndis.xml Modified: branches/xmlbuildsystem/reactos/drivers/net/tcpip/tcpip.xml Modified: branches/xmlbuildsystem/reactos/lib/advapi32/advapi32.xml Modified: branches/xmlbuildsystem/reactos/lib/crt/crt.xml Modified: branches/xmlbuildsystem/reactos/lib/crtdll/crtdll.xml Modified: branches/xmlbuildsystem/reactos/lib/gdi32/gdi32.xml Modified: branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml Modified: branches/xmlbuildsystem/reactos/lib/msvcrt/msvcrt.xml Modified: branches/xmlbuildsystem/reactos/lib/psapi/psapi.xml Modified: branches/xmlbuildsystem/reactos/lib/user32/user32.xml Modified: branches/xmlbuildsystem/reactos/lib/userenv/userenv.xml Modified: branches/xmlbuildsystem/reactos/lib/ws2_32/ws2_32.xml Modified: branches/xmlbuildsystem/reactos/subsys/system/cmd/cmd.xml Modified: branches/xmlbuildsystem/reactos/subsys/system/explorer/explorer.xml Modified: branches/xmlbuildsystem/reactos/subsys/system/ibrowser/ibrowser.xml Modified: branches/xmlbuildsystem/reactos/subsys/system/taskmgr/taskmgr.xml Modified: branches/xmlbuildsystem/reactos/subsys/system/usetup/usetup.xml Modified: branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml _____ Modified: branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml --- branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/drivers/lib/ip/ip.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -4,6 +4,9 @@ <define name="__USE_W32API"/> <include>drivers/net/tcpip/include</include> <include>drivers/lib/oskittcp/include</include> + <directory name="include"> + <pch>precomp.h</pch> + </directory> <directory name="network"> <if property="ARCH" value="i386"> <directory name="i386"> _____ Modified: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml --- branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -5,6 +5,9 @@ <library>ntoskrnl</library> <library>hal</library> <library>pseh</library> + <directory name="include"> + <pch>afd.h</pch> + </directory> <directory name="afd"> <file>bind.c</file> <file>connect.c</file> _____ Modified: branches/xmlbuildsystem/reactos/drivers/net/ndis/ndis.xml --- branches/xmlbuildsystem/reactos/drivers/net/ndis/ndis.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/drivers/net/ndis/ndis.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -8,6 +8,9 @@ <define name="__USE_W32API" /> <library>ntoskrnl</library> <library>hal</library> + <directory name="include"> + <pch>ndissys.h</pch> + </directory> <directory name="ndis"> <file>40gone.c</file> <file>50gone.c</file> _____ Modified: branches/xmlbuildsystem/reactos/drivers/net/tcpip/tcpip.xml --- branches/xmlbuildsystem/reactos/drivers/net/tcpip/tcpip.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/drivers/net/tcpip/tcpip.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -12,6 +12,9 @@ <library>pseh</library> <library>ntoskrnl</library> <library>hal</library> + <directory name="include"> + <pch>precomp.h</pch> + </directory> <directory name="datalink"> <file>lan.c</file> </directory> _____ Modified: branches/xmlbuildsystem/reactos/lib/advapi32/advapi32.xml --- branches/xmlbuildsystem/reactos/lib/advapi32/advapi32.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/advapi32/advapi32.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -7,6 +7,7 @@ <define name="_WIN32_WINNT">0x0501</define> <library>ntdll</library> <library>kernel32</library> + <pch>advapi32.h</pch> <directory name="crypt"> <file>crypt.c</file> <file>crypt_des.c</file> _____ Modified: branches/xmlbuildsystem/reactos/lib/crt/crt.xml --- branches/xmlbuildsystem/reactos/lib/crt/crt.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/crt/crt.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -11,6 +11,7 @@ <define name="_MSVCRT_LIB_" /> <define name="_MSVCRT_" /> <define name="_MT" /> + <pch>precomp.h</pch> <directory name="conio"> <file>cgets.c</file> <file>cprintf.c</file> _____ Modified: branches/xmlbuildsystem/reactos/lib/crtdll/crtdll.xml --- branches/xmlbuildsystem/reactos/lib/crtdll/crtdll.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/crtdll/crtdll.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -15,6 +15,7 @@ <library>string</library> <library>kernel32</library> <library>ntdll</library> + <pch>precomp.h</pch> <file>dllmain.c</file> <file>crtdll.rc</file> </module> _____ Modified: branches/xmlbuildsystem/reactos/lib/gdi32/gdi32.xml --- branches/xmlbuildsystem/reactos/lib/gdi32/gdi32.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/gdi32/gdi32.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -10,6 +10,9 @@ <library>rosrtl</library> <library>kernel32</library> <library>advapi32</library> + <directory name="include"> + <pch>precomp.h</pch> + </directory> <directory name="main"> <file>dllmain.c</file> </directory> _____ Modified: branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml --- branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -11,6 +11,7 @@ <linkerflag>-lgcc</linkerflag> <linkerflag>-nostartfiles</linkerflag> <linkerflag>-nostdlib</linkerflag> + <pch>k32.h</pch> <directory name="debug"> <file>break.c</file> <file>debugger.c</file> _____ Modified: branches/xmlbuildsystem/reactos/lib/msvcrt/msvcrt.xml --- branches/xmlbuildsystem/reactos/lib/msvcrt/msvcrt.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/msvcrt/msvcrt.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -18,6 +18,7 @@ <library>string</library> <library>kernel32</library> <library>ntdll</library> + <pch>precomp.h</pch> <file>dllmain.c</file> <file>msvcrt.rc</file> </module> _____ Modified: branches/xmlbuildsystem/reactos/lib/psapi/psapi.xml --- branches/xmlbuildsystem/reactos/lib/psapi/psapi.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/psapi/psapi.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -7,6 +7,7 @@ <library>pseh</library> <library>ntdll</library> <library>kernel32</library> + <pch>precomp.h</pch> <file>malloc.c</file> <file>psapi.c</file> <file>psapi.rc</file> _____ Modified: branches/xmlbuildsystem/reactos/lib/user32/user32.xml --- branches/xmlbuildsystem/reactos/lib/user32/user32.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/user32/user32.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -14,6 +14,9 @@ <library>rosrtl</library> <library>kernel32</library> <library>advapi32</library> + <directory name="include"> + <pch>user32.h</pch> + </directory> <directory name="controls"> <file>button.c</file> <file>combo.c</file> _____ Modified: branches/xmlbuildsystem/reactos/lib/userenv/userenv.xml --- branches/xmlbuildsystem/reactos/lib/userenv/userenv.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/userenv/userenv.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -9,6 +9,7 @@ <library>kernel32</library> <library>advapi32</library> <library>user32</library> + <pch>precomp.h</pch> <file>desktop.c</file> <file>directory.c</file> <file>environment.c</file> _____ Modified: branches/xmlbuildsystem/reactos/lib/ws2_32/ws2_32.xml --- branches/xmlbuildsystem/reactos/lib/ws2_32/ws2_32.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/lib/ws2_32/ws2_32.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -11,6 +11,9 @@ <library>user32</library> <library>advapi32</library> <library>dnsapi</library> + <directory name="include"> + <pch>ws2_32.h</pch> + </directory> <directory name="misc"> <file>bsd.c</file> <file>catalog.c</file> _____ Modified: branches/xmlbuildsystem/reactos/subsys/system/cmd/cmd.xml --- branches/xmlbuildsystem/reactos/subsys/system/cmd/cmd.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/subsys/system/cmd/cmd.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -5,6 +5,7 @@ <define name="ANONYMOUSUNIONS" /> <define name="_WIN32_WINNT">0x0501</define> <library>kernel32</library> + <pch>precomp.h</pch> <file>alias.c</file> <file>attrib.c</file> <file>batch.c</file> _____ Modified: branches/xmlbuildsystem/reactos/subsys/system/explorer/explorer.xml --- branches/xmlbuildsystem/reactos/subsys/system/explorer/explorer.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/subsys/system/explorer/explorer.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -21,6 +21,7 @@ <library>shell32</library> <library>expat</library> <library>notifyhook</library> + <pch>precomp.h</pch> <directory name="desktop"> <file>desktop.cpp</file> </directory> _____ Modified: branches/xmlbuildsystem/reactos/subsys/system/ibrowser/ibrowser.xml --- branches/xmlbuildsystem/reactos/subsys/system/ibrowser/ibrowser.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/subsys/system/ibrowser/ibrowser.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -17,6 +17,7 @@ <library>oleaut32</library> <library>shell32</library> <library>expat</library> + <pch>precomp.h</pch> <directory name="utility"> <file>utility.cpp</file> <file>window.cpp</file> _____ Modified: branches/xmlbuildsystem/reactos/subsys/system/taskmgr/taskmgr.xml --- branches/xmlbuildsystem/reactos/subsys/system/taskmgr/taskmgr.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/subsys/system/taskmgr/taskmgr.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -8,6 +8,7 @@ <library>user32</library> <library>gdi32</library> <library>comctl32</library> + <pch>precomp.h</pch> <file>about.c</file> <file>affinity.c</file> <file>applpage.c</file> _____ Modified: branches/xmlbuildsystem/reactos/subsys/system/usetup/usetup.xml --- branches/xmlbuildsystem/reactos/subsys/system/usetup/usetup.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/subsys/system/usetup/usetup.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -7,6 +7,7 @@ <library>zlib</library> <library>vfatlib</library> <library>ntdll</library> + <pch>precomp.h</pch> <file>bootsup.c</file> <file>cabinet.c</file> <file>console.c</file> _____ Modified: branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml --- branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml 2005-03-10 16:43:31 UTC (rev 13912) +++ branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml 2005-03-10 16:50:29 UTC (rev 13913) @@ -14,6 +14,7 @@ <library>hal</library> <library>pseh</library> <library>freetype</library> + <pch>w32k.h</pch> <directory name="dib"> <file>dib1bpp.c</file> <file>dib4bpp.c</file>
19 years, 9 months
1
0
0
0
[royce] 13912: accidentally commited testing changes
by royce@svn.reactos.com
accidentally commited testing changes Modified: branches/xmlbuildsystem/reactos/Makefile _____ Modified: branches/xmlbuildsystem/reactos/Makefile --- branches/xmlbuildsystem/reactos/Makefile 2005-03-10 16:42:28 UTC (rev 13911) +++ branches/xmlbuildsystem/reactos/Makefile 2005-03-10 16:43:31 UTC (rev 13912) @@ -7,8 +7,8 @@ Q = HALFVERBOSEECHO = @: else - Q = - HALFVERBOSEECHO = echo + Q = @ + HALFVERBOSEECHO = @echo endif endif
19 years, 9 months
1
0
0
0
[royce] 13911: Makefile.auto -> makefile.auto
by royce@svn.reactos.com
Makefile.auto -> makefile.auto Modified: branches/xmlbuildsystem/reactos/Makefile Modified: branches/xmlbuildsystem/reactos/ReactOS.xml _____ Modified: branches/xmlbuildsystem/reactos/Makefile --- branches/xmlbuildsystem/reactos/Makefile 2005-03-10 16:08:08 UTC (rev 13910) +++ branches/xmlbuildsystem/reactos/Makefile 2005-03-10 16:42:28 UTC (rev 13911) @@ -7,8 +7,8 @@ Q = HALFVERBOSEECHO = @: else - Q = @ - HALFVERBOSEECHO = @echo + Q = + HALFVERBOSEECHO = echo endif endif @@ -53,7 +53,7 @@ .PHONY: all .PHONY: clean -all: Makefile.auto +all: makefile.auto ifneq ($(ROS_INTERMEDIATE),) $(ROS_INTERMEDIATE)tools: $(ROS_INTERMEDIATE) @@ -66,7 +66,7 @@ endif include tools/Makefile --include Makefile.auto +-include makefile.auto PREAUTO := \ include$(SEP)reactos$(SEP)buildno.h \ @@ -75,7 +75,7 @@ include$(SEP)reactos$(SEP)errcodes.h \ lib$(SEP)kernel32$(SEP)errcodes.rc -Makefile.auto: $(RMKDIR_TARGET) $(BUILDNO_TARGET) $(NCI_SERVICE_FILES) $(WMC_TARGET) $(WRC_TARGET) \ +makefile.auto: $(RMKDIR_TARGET) $(BUILDNO_TARGET) $(NCI_SERVICE_FILES) $(WMC_TARGET) $(WRC_TARGET) \ $(RSYM_TARGET) $(CDMAKE_TARGET) $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES) $(HALFVERBOSEECHO) [RBUILD] makefile.auto $(Q)tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw @@ -89,5 +89,5 @@ .PHONY: makefile_auto_clean makefile_auto_clean: - -@$(rm) Makefile.auto $(PREAUTO) 2>$(NUL) + -@$(rm) makefile.auto $(PREAUTO) 2>$(NUL) clean: makefile_auto_clean _____ Modified: branches/xmlbuildsystem/reactos/ReactOS.xml --- branches/xmlbuildsystem/reactos/ReactOS.xml 2005-03-10 16:08:08 UTC (rev 13910) +++ branches/xmlbuildsystem/reactos/ReactOS.xml 2005-03-10 16:42:28 UTC (rev 13911) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE project SYSTEM "tools/rbuild/project.dtd"> -<project name="ReactOS" makefile="Makefile.auto" xmlns:xi="
http://www.w3.org/2001/XInclude
"> +<project name="ReactOS" makefile="makefile.auto" xmlns:xi="
http://www.w3.org/2001/XInclude
"> <xi:include href="config.xml"> <xi:fallback> <xi:include href="config.template.xml" />
19 years, 9 months
1
0
0
0
[sedwards] 13910: Change tabs to spaces.
by sedwards@svn.reactos.com
Change tabs to spaces. Modified: trunk/rosapps/games/solitaire/cardlib/cardbitmaps.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardcolor.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardcount.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardlib.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardregion.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardrgndraw.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardrgnmouse.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardstack.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardwindow.cpp Modified: trunk/rosapps/games/solitaire/cardlib/dropzone.cpp Modified: trunk/rosapps/games/solitaire/solcreate.cpp Modified: trunk/rosapps/games/solitaire/solgame.cpp Modified: trunk/rosapps/games/solitaire/solitaire.cpp _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardbitmaps.cpp --- trunk/rosapps/games/solitaire/cardlib/cardbitmaps.cpp 2005-03-10 14:06:14 UTC (rev 13909) +++ trunk/rosapps/games/solitaire/cardlib/cardbitmaps.cpp 2005-03-10 16:08:08 UTC (rev 13910) @@ -1,8 +1,8 @@ // -// CardLib - Card bitmap support +// CardLib - Card bitmap support // -// Freeware -// Copyright J Brown 2001 +// Freeware +// Copyright J Brown 2001 // #include <windows.h> #include "globals.h" @@ -12,7 +12,7 @@ #pragma comment( lib, "..\\CardLib\\cards16.lib" ) extern "C" HINSTANCE WINAPI LoadLibrary16( PSTR ); -extern "C" void WINAPI FreeLibrary16( HINSTANCE ); +extern "C" void WINAPI FreeLibrary16( HINSTANCE ); #endif #define NUMCARDBITMAPS (52+16) @@ -21,261 +21,261 @@ void LoadCardBitmapsFromLibrary(HINSTANCE hCardDll, int *pwidth, int *pheight) { - HBITMAP hBitmap; - HDC hdcCard; - HANDLE hOld; - int i, xpos; - int width, height; - BITMAP bmp; + HBITMAP hBitmap; + HDC hdcCard; + HANDLE hOld; + int i, xpos; + int width, height; + BITMAP bmp; - for(i = 0; i < NUMCARDBITMAPS; i++) - { - //convert into the range used by the cdt_xxx functions - int val; - - if(i < 52) val = (i % 4) * 13 + (i/4); - else val = i; - - hBitmap = LoadBitmap(hCardDll, MAKEINTRESOURCE(val + 1)); - GetObject(hBitmap, sizeof(bmp), &bmp); - - width = bmp.bmWidth; - height = bmp.bmHeight; - - if(i == 0) //if first time through, create BIG bitmap.. - { - HDC hdc = GetDC(0); - __hdcCardBitmaps = CreateCompatibleDC(hdc); - __hbmCardBitmaps = CreateCompatibleBitmap(hdc, width * NUMCARDBITMAPS, height); - SelectObject(__hdcCardBitmaps, __hbmCardBitmaps); - - hdcCard = CreateCompatibleDC(0); - - ReleaseDC(0, hdc); - } - - hOld = SelectObject(hdcCard, hBitmap); - BitBlt(__hdcCardBitmaps, i*width, 0, width, height, hdcCard, 0, 0, SRCCOPY); - SelectObject(hdcCard, hOld); - - //Now draw a black border around each card... - xpos = i*width; - MoveToEx(__hdcCardBitmaps, xpos+2, 0, 0); - LineTo(__hdcCardBitmaps, xpos+width - 3, 0); - LineTo(__hdcCardBitmaps, xpos+width - 1, 2); - LineTo(__hdcCardBitmaps, xpos+width - 1, height - 3); //vertical - LineTo(__hdcCardBitmaps, xpos+width - 3, height - 1); - LineTo(__hdcCardBitmaps, xpos+2, height - 1); - LineTo(__hdcCardBitmaps, xpos+0, height - 3); - LineTo(__hdcCardBitmaps, xpos+0, 2); - LineTo(__hdcCardBitmaps, xpos+2, 0); - - DeleteObject(hBitmap); - } - - DeleteDC(hdcCard); + for(i = 0; i < NUMCARDBITMAPS; i++) + { + //convert into the range used by the cdt_xxx functions + int val; + + if(i < 52) val = (i % 4) * 13 + (i/4); + else val = i; + + hBitmap = LoadBitmap(hCardDll, MAKEINTRESOURCE(val + 1)); + GetObject(hBitmap, sizeof(bmp), &bmp); + + width = bmp.bmWidth; + height = bmp.bmHeight; + + if(i == 0) //if first time through, create BIG bitmap.. + { + HDC hdc = GetDC(0); + __hdcCardBitmaps = CreateCompatibleDC(hdc); + __hbmCardBitmaps = CreateCompatibleBitmap(hdc, width * NUMCARDBITMAPS, height); + SelectObject(__hdcCardBitmaps, __hbmCardBitmaps); + + hdcCard = CreateCompatibleDC(0); + + ReleaseDC(0, hdc); + } + + hOld = SelectObject(hdcCard, hBitmap); + BitBlt(__hdcCardBitmaps, i*width, 0, width, height, hdcCard, 0, 0, SRCCOPY); + SelectObject(hdcCard, hOld); + + //Now draw a black border around each card... + xpos = i*width; + MoveToEx(__hdcCardBitmaps, xpos+2, 0, 0); + LineTo(__hdcCardBitmaps, xpos+width - 3, 0); + LineTo(__hdcCardBitmaps, xpos+width - 1, 2); + LineTo(__hdcCardBitmaps, xpos+width - 1, height - 3); //vertical + LineTo(__hdcCardBitmaps, xpos+width - 3, height - 1); + LineTo(__hdcCardBitmaps, xpos+2, height - 1); + LineTo(__hdcCardBitmaps, xpos+0, height - 3); + LineTo(__hdcCardBitmaps, xpos+0, 2); + LineTo(__hdcCardBitmaps, xpos+2, 0); + + DeleteObject(hBitmap); + } + + DeleteDC(hdcCard); - *pwidth = width; - *pheight = height; - + *pwidth = width; + *pheight = height; + } void LoadCardBitmaps(void) { - HINSTANCE hCardDll; - + HINSTANCE hCardDll; + - //If Windows NT/2000/XP - if(GetVersion() < 0x80000000) - { - hCardDll = LoadLibrary("cards.dll"); + //If Windows NT/2000/XP + if(GetVersion() < 0x80000000) + { + hCardDll = LoadLibrary("cards.dll"); - if(hCardDll == 0) - { - MessageBox(0, "Error loading cards.dll (32bit)", "Shed", MB_OK | MB_ICONEXCLAMATION); - PostQuitMessage(0); - return; - } - - LoadCardBitmapsFromLibrary(hCardDll, &__cardwidth, &__cardheight); - - FreeLibrary(hCardDll); - } + if(hCardDll == 0) + { + MessageBox(0, "Error loading cards.dll (32bit)", "Shed", MB_OK | MB_ICONEXCLAMATION); + PostQuitMessage(0); + return; + } + + LoadCardBitmapsFromLibrary(hCardDll, &__cardwidth, &__cardheight); + + FreeLibrary(hCardDll); + } #ifndef __REACTOS__ - //Else, Win9X - else - { - hCardDll = LoadLibrary16("cards.dll"); + //Else, Win9X + else + { + hCardDll = LoadLibrary16("cards.dll"); - if(hCardDll == 0) - { - MessageBox(0, "Error loading cards.dll (16bit)", "Shed", MB_OK | MB_ICONEXCLAMATION); - PostQuitMessage(0); - return; - } + if(hCardDll == 0) + { + MessageBox(0, "Error loading cards.dll (16bit)", "Shed", MB_OK | MB_ICONEXCLAMATION); + PostQuitMessage(0); + return; + } - LoadCardBitmapsFromLibrary(hCardDll, &__cardwidth, &__cardheight); + LoadCardBitmapsFromLibrary(hCardDll, &__cardwidth, &__cardheight); - FreeLibrary16(hCardDll); - } + FreeLibrary16(hCardDll); + } #endif } void FreeCardBitmaps() { - DeleteObject (__hbmCardBitmaps); - DeleteDC (__hdcCardBitmaps); + DeleteObject (__hbmCardBitmaps); + DeleteDC (__hdcCardBitmaps); } // -// Paint a checkered rectangle, with each alternate -// pixel being assigned a different colour +// Paint a checkered rectangle, with each alternate +// pixel being assigned a different colour // static void DrawCheckedRect(HDC hdc, RECT *rect, COLORREF fg, COLORREF bg) { - static WORD wCheckPat[8] = - { - 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555 - }; + static WORD wCheckPat[8] = + { + 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555 + }; - HBITMAP hbmp; - HBRUSH hbr, hbrold; - COLORREF fgold, bgold; + HBITMAP hbmp; + HBRUSH hbr, hbrold; + COLORREF fgold, bgold; - hbmp = CreateBitmap(8, 8, 1, 1, wCheckPat); - hbr = CreatePatternBrush(hbmp); + hbmp = CreateBitmap(8, 8, 1, 1, wCheckPat); + hbr = CreatePatternBrush(hbmp); - //UnrealizeObject(hbr); + //UnrealizeObject(hbr); - SetBrushOrgEx(hdc, rect->left, rect->top, 0); + SetBrushOrgEx(hdc, rect->left, rect->top, 0); - hbrold = (HBRUSH)SelectObject(hdc, hbr); + hbrold = (HBRUSH)SelectObject(hdc, hbr); - fgold = SetTextColor(hdc, fg); - bgold = SetBkColor(hdc, bg); - - PatBlt(hdc, rect->left, rect->top, - rect->right - rect->left, - rect->bottom - rect->top, - PATCOPY); - - SetBkColor(hdc, bgold); - SetTextColor(hdc, fgold); - - SelectObject(hdc, hbrold); - DeleteObject(hbr); - DeleteObject(hbmp); + fgold = SetTextColor(hdc, fg); + bgold = SetBkColor(hdc, bg); + + PatBlt(hdc, rect->left, rect->top, + rect->right - rect->left, + rect->bottom - rect->top, + PATCOPY); + + SetBkColor(hdc, bgold); + SetTextColor(hdc, fgold); + + SelectObject(hdc, hbrold); + DeleteObject(hbr); + DeleteObject(hbmp); } void GetSinkCols(COLORREF crBase, COLORREF *fg, COLORREF *bg, COLORREF *sh1, COLORREF *sh2) { - if(bg) *bg = crBase; - if(fg) *fg = ColorScaleRGB(crBase, RGB(255,255,255), 0.2);//RGB(49, 99, 140); - if(sh1) *sh1 = ColorScaleRGB(crBase, RGB(0,0,0), 0.4); - if(sh2) *sh2 = ColorScaleRGB(crBase, RGB(0,0,0), 0.2); + if(bg) *bg = crBase; + if(fg) *fg = ColorScaleRGB(crBase, RGB(255,255,255), 0.2);//RGB(49, 99, 140); + if(sh1) *sh1 = ColorScaleRGB(crBase, RGB(0,0,0), 0.4); + if(sh2) *sh2 = ColorScaleRGB(crBase, RGB(0,0,0), 0.2); } HBITMAP CreateSinkBmp(HDC hdcCompat, HDC hdc, COLORREF col, int width, int height) { - HANDLE hold, hpold; - HBITMAP hbm = CreateCompatibleBitmap(hdcCompat, width, height); + HANDLE hold, hpold; + HBITMAP hbm = CreateCompatibleBitmap(hdcCompat, width, height); - HPEN hpfg, hpbg, hpsh, hpsh2; + HPEN hpfg, hpbg, hpsh, hpsh2; - RECT rect; - COLORREF fg, bg, shadow, shadow2; + RECT rect; + COLORREF fg, bg, shadow, shadow2; - GetSinkCols(col, &fg, &bg, &shadow, &shadow2); + GetSinkCols(col, &fg, &bg, &shadow, &shadow2); - hold = SelectObject(hdc, hbm); + hold = SelectObject(hdc, hbm); - //fill with a solid base colour - SetRect(&rect, 0,0,width,height); - PaintRect(hdc, &rect, MAKE_PALETTERGB(bg)); + //fill with a solid base colour + SetRect(&rect, 0,0,width,height); + PaintRect(hdc, &rect, MAKE_PALETTERGB(bg)); - //draw the outline - hpfg = CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(fg)); - hpbg = CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(bg)); - hpsh = CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(shadow)); - hpsh2= CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(shadow2)); + //draw the outline + hpfg = CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(fg)); + hpbg = CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(bg)); + hpsh = CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(shadow)); + hpsh2= CreatePen(PS_SOLID, 0, MAKE_PALETTERGB(shadow2)); - hpold = SelectObject(hdc, hpsh); - MoveToEx(hdc, 2, 0, NULL); - LineTo (hdc, width-3,0); - LineTo (hdc, width-1, 2); - - SelectObject(hdc, hpold); - hpold = SelectObject(hdc, hpsh2); - LineTo (hdc, width-1, height-3); //vertical - LineTo (hdc, width-3, height-1); - LineTo (hdc, 2, height-1); - LineTo (hdc, 0, height-3); - SelectObject(hdc, hpold); - hpold = SelectObject(hdc, hpsh); + hpold = SelectObject(hdc, hpsh); + MoveToEx(hdc, 2, 0, NULL); + LineTo (hdc, width-3,0); + LineTo (hdc, width-1, 2); + + SelectObject(hdc, hpold); + hpold = SelectObject(hdc, hpsh2); + LineTo (hdc, width-1, height-3); //vertical + LineTo (hdc, width-3, height-1); + LineTo (hdc, 2, height-1); + LineTo (hdc, 0, height-3); + SelectObject(hdc, hpold); + hpold = SelectObject(hdc, hpsh); - //MoveToEx( hdc, 0, height-3,0); - LineTo (hdc, 0, 2); - LineTo (hdc, 2, 0); + //MoveToEx( hdc, 0, height-3,0); + LineTo (hdc, 0, 2); + LineTo (hdc, 2, 0); - SelectObject(hdc, hpold); + SelectObject(hdc, hpold); - //draw the highlight (vertical) - hpold = SelectObject(hdc, hpfg); - MoveToEx(hdc, width - 2, 3, NULL); - LineTo (hdc, width - 2, height - 2); - - //(horz) - MoveToEx(hdc, width - 3, height-2, NULL); - LineTo (hdc, 3, height-2); - SelectObject(hdc, hpold); - - //draw the background - InflateRect(&rect, -2, -2); - DrawCheckedRect(hdc, &rect, MAKE_PALETTERGB(bg), MAKE_PALETTERGB(fg)); + //draw the highlight (vertical) + hpold = SelectObject(hdc, hpfg); + MoveToEx(hdc, width - 2, 3, NULL); + LineTo (hdc, width - 2, height - 2); + + //(horz) + MoveToEx(hdc, width - 3, height-2, NULL); + LineTo (hdc, 3, height-2); + SelectObject(hdc, hpold); + + //draw the background + InflateRect(&rect, -2, -2); + DrawCheckedRect(hdc, &rect, MAKE_PALETTERGB(bg), MAKE_PALETTERGB(fg)); - //overwrite the top-left background pixel - SetPixel(hdc, 2, 2, MAKE_PALETTERGB(bg)); + //overwrite the top-left background pixel + SetPixel(hdc, 2, 2, MAKE_PALETTERGB(bg)); - DeleteObject(hpsh); - DeleteObject(hpsh2); - DeleteObject(hpfg); - DeleteObject(hpbg); + DeleteObject(hpsh); + DeleteObject(hpsh2); + DeleteObject(hpfg); + DeleteObject(hpbg); - - return hbm; + + return hbm; } void CopyColor(PALETTEENTRY *pe, COLORREF col) { - pe->peBlue = GetBValue(col); - pe->peGreen = GetGValue(col); - pe->peRed = GetRValue(col); - pe->peFlags = 0; + pe->peBlue = GetBValue(col); + pe->peGreen = GetGValue(col); + pe->peRed = GetRValue(col); + pe->peFlags = 0; } HPALETTE MakePaletteFromCols(COLORREF cols[], int nNumColours) { - LOGPALETTE *lp; - HPALETTE hPalette; + LOGPALETTE *lp; + HPALETTE hPalette; - // Allocate memory for the logical palette - lp = (LOGPALETTE *)HeapAlloc( - GetProcessHeap(), 0, sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * nNumColours); + // Allocate memory for the logical palette + lp = (LOGPALETTE *)HeapAlloc( + GetProcessHeap(), 0, sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * nNumColours); - lp->palNumEntries = nNumColours; - lp->palVersion = 0x300; + lp->palNumEntries = nNumColours; + lp->palVersion = 0x300; - //copy the colours into the logical palette format - for(int i = 0; i < nNumColours; i++) - { - CopyColor(&lp->palPalEntry[i], cols[i]); - } + //copy the colours into the logical palette format + for(int i = 0; i < nNumColours; i++) + { + CopyColor(&lp->palPalEntry[i], cols[i]); + } - // create palette! - hPalette = CreatePalette(lp); + // create palette! + hPalette = CreatePalette(lp); - HeapFree(GetProcessHeap(), 0, lp); + HeapFree(GetProcessHeap(), 0, lp); - return hPalette; + return hPalette; } _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp --- trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp 2005-03-10 14:06:14 UTC (rev 13909) +++ trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp 2005-03-10 16:08:08 UTC (rev 13910) @@ -1,8 +1,8 @@ // -// CardLib - CardButton class +// CardLib - CardButton class // -// Freeware -// Copyright J Brown 2001 +// Freeware +// Copyright J Brown 2001 // #include <windows.h> #include <tchar.h> @@ -13,477 +13,477 @@ #include "cardcolor.h" HPALETTE UseNicePalette(HDC, HPALETTE); -void RestorePalette(HDC, HPALETTE); +void RestorePalette(HDC, HPALETTE); void PaintRect(HDC hdc, RECT *rect, COLORREF colour); CardButton::CardButton(CardWindow &parent, int Id, TCHAR *szText, UINT Style, bool visible, - int x, int y, int width, int height) + int x, int y, int width, int height) : parentWnd(parent), id(Id), uStyle(Style), fVisible(visible), ButtonCallback(0) { - crText = RGB(255,255,255); - crBack = RGB(0, 128, 0); - - xadjust = 0; - yadjust = 0; - xjustify = 0; - yjustify = 0; + crText = RGB(255,255,255); + crBack = RGB(0, 128, 0); + + xadjust = 0; + yadjust = 0; + xjustify = 0; + yjustify = 0; - fMouseDown = false; - fButtonDown = false; + fMouseDown = false; + fButtonDown = false; - hIcon = 0; + hIcon = 0; - SetText(szText); - Move(x, y, width, height); + SetText(szText); + Move(x, y, width, height); - mxlock = CreateMutex(0, FALSE, 0); + mxlock = CreateMutex(0, FALSE, 0); - hFont = 0; + hFont = 0; } CardButton::~CardButton() { - CloseHandle(mxlock); + CloseHandle(mxlock); } void CardButton::DrawRect(HDC hdc, RECT *rect, bool fNormal) { - RECT fill; + RECT fill; - HANDLE hOld; + HANDLE hOld; - HPEN hhi = CreatePen(0, 0, MAKE_PALETTERGB(crHighlight)); - HPEN hsh = CreatePen(0, 0, MAKE_PALETTERGB(crShadow)); - HPEN hbl = (HPEN)GetStockObject(BLACK_PEN); - - int x = rect->left; - int y = rect->top; - int width = rect->right-rect->left - 1; - int height = rect->bottom-rect->top - 1; - - SetRect(&fill, x+1, y+1, x+width-1, y+height-1); + HPEN hhi = CreatePen(0, 0, MAKE_PALETTERGB(crHighlight)); + HPEN hsh = CreatePen(0, 0, MAKE_PALETTERGB(crShadow)); + HPEN hbl = (HPEN)GetStockObject(BLACK_PEN); + + int x = rect->left; + int y = rect->top; + int width = rect->right-rect->left - 1; + int height = rect->bottom-rect->top - 1; + + SetRect(&fill, x+1, y+1, x+width-1, y+height-1); - int one = 1; - - if(!fNormal) - { - x += width; - y += height; - width = -width; - height = -height; - one = -1; - OffsetRect(&fill, 1, 1); - } - - if(fNormal) - hOld = SelectObject(hdc, hhi); - else - hOld = SelectObject(hdc, hhi); + int one = 1; + + if(!fNormal) + { + x += width; + y += height; + width = -width; + height = -height; + one = -1; + OffsetRect(&fill, 1, 1); + } + + if(fNormal) + hOld = SelectObject(hdc, hhi); + else + hOld = SelectObject(hdc, hhi); - MoveToEx(hdc, x, y+height, 0); - LineTo(hdc, x, y); - LineTo(hdc, x+width, y); - SelectObject(hdc, hOld); + MoveToEx(hdc, x, y+height, 0); + LineTo(hdc, x, y); + LineTo(hdc, x+width, y); + SelectObject(hdc, hOld); - hOld = SelectObject(hdc, hbl); - LineTo(hdc, x+width, y+height); - LineTo(hdc, x-one, y+height); - SelectObject(hdc, hOld); + hOld = SelectObject(hdc, hbl); + LineTo(hdc, x+width, y+height); + LineTo(hdc, x-one, y+height); + SelectObject(hdc, hOld); - hOld = SelectObject(hdc, hsh); - MoveToEx(hdc, x+one, y+height-one, 0); - LineTo(hdc, x+width-one, y+height-one); - LineTo(hdc, x+width-one, y); - SelectObject(hdc, hOld); + hOld = SelectObject(hdc, hsh); + MoveToEx(hdc, x+one, y+height-one, 0); + LineTo(hdc, x+width-one, y+height-one); + LineTo(hdc, x+width-one, y); + SelectObject(hdc, hOld); - PaintRect(hdc, &fill, MAKE_PALETTERGB(crBack)); + PaintRect(hdc, &fill, MAKE_PALETTERGB(crBack)); - DeleteObject(hhi); - DeleteObject(hsh); + DeleteObject(hhi); + DeleteObject(hsh); } void CardButton::Clip(HDC hdc) { - if(fVisible == false) return; - - ExcludeClipRect(hdc, rect.left, rect.top, rect.right, rect.bottom); + if(fVisible == false) return; + + ExcludeClipRect(hdc, rect.left, rect.top, rect.right, rect.bottom); } void CardButton::Draw(HDC hdc, bool fNormal) { - SIZE textsize; - int x, y; //text x, y - int ix, iy; //icon x, y - int iconwidth = 0; + SIZE textsize; + int x, y; //text x, y + int ix, iy; //icon x, y + int iconwidth = 0; - RECT cliprect; + RECT cliprect; - if(fVisible == 0) return; + if(fVisible == 0) return; - if(hFont == 0) - SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)); - else - SelectObject(hdc, hFont); - - GetTextExtentPoint32(hdc, szText, lstrlen(szText), &textsize); - - if(hIcon) - { - x = rect.left + 32 + 8; - } - else - { - if(uStyle & CB_ALIGN_LEFT) - { - x = rect.left + iconwidth; - } - else if(uStyle & CB_ALIGN_RIGHT) - { - x = rect.left + (rect.right-rect.left-iconwidth-textsize.cx); - } - else //centered - { - x = rect.right - rect.left - iconwidth; - x = (x - textsize.cx) / 2; - x += rect.left + iconwidth; - } - } - - y = rect.bottom - rect.top; - y = (y - textsize.cy) / 2; - y += rect.top; - - //calc icon position.. - ix = rect.left + 4; - iy = rect.top + (rect.bottom-rect.top-32) / 2; + if(hFont == 0) + SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)); + else + SelectObject(hdc, hFont); + + GetTextExtentPoint32(hdc, szText, lstrlen(szText), &textsize); + + if(hIcon) + { + x = rect.left + 32 + 8; + } + else + { + if(uStyle & CB_ALIGN_LEFT) + { + x = rect.left + iconwidth; + } + else if(uStyle & CB_ALIGN_RIGHT) + { + x = rect.left + (rect.right-rect.left-iconwidth-textsize.cx); + } + else //centered + { + x = rect.right - rect.left - iconwidth; + x = (x - textsize.cx) / 2; + x += rect.left + iconwidth; + } + } + + y = rect.bottom - rect.top; + y = (y - textsize.cy) / 2; + y += rect.top; + + //calc icon position.. + ix = rect.left + 4; + iy = rect.top + (rect.bottom-rect.top-32) / 2; - //if button is pressed, then shift text - if(fNormal == false && (uStyle & CB_PUSHBUTTON)) - { - x += 1; - y += 1; - ix += 1; - iy += 1; - } + //if button is pressed, then shift text + if(fNormal == false && (uStyle & CB_PUSHBUTTON)) + { + x += 1; + y += 1; + ix += 1; + iy += 1; + } - SetRect(&cliprect, x, y, x+textsize.cx, y+textsize.cy); - ExcludeClipRect(hdc, x, y, x+textsize.cx, y+textsize.cy); + SetRect(&cliprect, x, y, x+textsize.cx, y+textsize.cy); + ExcludeClipRect(hdc, x, y, x+textsize.cx, y+textsize.cy); - // - // Calc icon pos - // - - if(hIcon) - { - ExcludeClipRect(hdc, ix, iy, ix + 32, iy + 32); - } - - if(uStyle & CB_PUSHBUTTON) - { - DrawRect(hdc, &rect, fNormal); + // + // Calc icon pos + // + + if(hIcon) + { + ExcludeClipRect(hdc, ix, iy, ix + 32, iy + 32); + } + + if(uStyle & CB_PUSHBUTTON) + { + DrawRect(hdc, &rect, fNormal); - SetBkColor(hdc, MAKE_PALETTERGB(crBack)); - SetTextColor(hdc, crText);//MAKE_PALETTERGB(crText)); - - SelectClipRgn(hdc, 0); + SetBkColor(hdc, MAKE_PALETTERGB(crBack)); + SetTextColor(hdc, crText);//MAKE_PALETTERGB(crText)); + + SelectClipRgn(hdc, 0); - ExtTextOut(hdc, x, y, ETO_OPAQUE, &cliprect, szText, lstrlen(szText), 0); - } - else - { - SetBkColor(hdc, MAKE_PALETTERGB(crBack)); - SetTextColor(hdc, crText);//MAKE_PALETTERGB(crText)); + ExtTextOut(hdc, x, y, ETO_OPAQUE, &cliprect, szText, lstrlen(szText), 0); + } + else + { + SetBkColor(hdc, MAKE_PALETTERGB(crBack)); + SetTextColor(hdc, crText);//MAKE_PALETTERGB(crText)); - SelectClipRgn(hdc, 0); + SelectClipRgn(hdc, 0); - ExtTextOut(hdc, x, y, ETO_OPAQUE, &rect, szText, lstrlen(szText), 0); - } + ExtTextOut(hdc, x, y, ETO_OPAQUE, &rect, szText, lstrlen(szText), 0); + } - if(hIcon) - { - HBRUSH hbr = CreateSolidBrush(MAKE_PALETTERGB(crBack)); - DrawIconEx(hdc, ix, iy, hIcon, 32, 32, 0, hbr, 0); - DeleteObject(hbr); - } + if(hIcon) + { + HBRUSH hbr = CreateSolidBrush(MAKE_PALETTERGB(crBack)); + DrawIconEx(hdc, ix, iy, hIcon, 32, 32, 0, hbr, 0); + DeleteObject(hbr); + } } void CardButton::AdjustPosition(int winwidth, int winheight) { - int width = rect.right-rect.left; - int height = rect.bottom-rect.top; + int width = rect.right-rect.left; + int height = rect.bottom-rect.top; - width = width & ~0x1; + width = width & ~0x1; - switch(xjustify) - { - case CS_XJUST_NONE: - break; + switch(xjustify) + { + case CS_XJUST_NONE: + break; - case CS_XJUST_CENTER: //centered - rect.left = (winwidth - (width)) / 2; - rect.left += xadjust; - rect.right = rect.left+width; - break; + case CS_XJUST_CENTER: //centered + rect.left = (winwidth - (width)) / 2; + rect.left += xadjust; + rect.right = rect.left+width; + break; - case CS_XJUST_RIGHT: //right-aligned - rect.left = winwidth - width; - rect.left += xadjust; - rect.right = rect.left+width; - break; - } + case CS_XJUST_RIGHT: //right-aligned + rect.left = winwidth - width; + rect.left += xadjust; + rect.right = rect.left+width; + break; + } - switch(yjustify) - { - case CS_YJUST_NONE: - break; + switch(yjustify) + { + case CS_YJUST_NONE: + break; - case CS_YJUST_CENTER: //centered - rect.top = (winheight - (height)) / 2; - rect.top += yadjust; - rect.bottom = rect.top+height; - break; + case CS_YJUST_CENTER: //centered + rect.top = (winheight - (height)) / 2; + rect.top += yadjust; + rect.bottom = rect.top+height; + break; - case CS_YJUST_BOTTOM: //right-aligned - rect.top = winheight - height; - rect.top += yadjust; - rect.bottom = rect.top+height; - break; - } + case CS_YJUST_BOTTOM: //right-aligned + rect.top = winheight - height; + rect.top += yadjust; + rect.bottom = rect.top+height; + break; + } } int CardButton::OnLButtonDown(HWND hwnd, int x, int y) { - if((uStyle & CB_PUSHBUTTON) == 0) - return 0; + if((uStyle & CB_PUSHBUTTON) == 0) + return 0; - //make sure that the user is allowed to do something - if(WaitForSingleObject(mxlock, 0) != WAIT_OBJECT_0) - { - return 0; - } - else - { - ReleaseMutex(mxlock); - } - - fMouseDown = true; - fButtonDown = true; + //make sure that the user is allowed to do something + if(WaitForSingleObject(mxlock, 0) != WAIT_OBJECT_0) + { + return 0; + } + else + { + ReleaseMutex(mxlock); + } + + fMouseDown = true; + fButtonDown = true; - Redraw(); + Redraw(); - SetCapture(hwnd); + SetCapture(hwnd); - return 1; + return 1; } int CardButton::OnMouseMove(HWND hwnd, int x, int y) { - if(fMouseDown) - { - bool fOldButtonDown = fButtonDown; + if(fMouseDown) + { + bool fOldButtonDown = fButtonDown; - POINT pt; - - pt.x = x; - pt.y = y; - - if(PtInRect(&rect, pt)) - fButtonDown = true; - else - fButtonDown = false; - - if(fButtonDown != fOldButtonDown) - Redraw(); - } - - return 0; + POINT pt; + + pt.x = x; + pt.y = y; + + if(PtInRect(&rect, pt)) + fButtonDown = true; + else + fButtonDown = false; + + if(fButtonDown != fOldButtonDown) + Redraw(); + } [truncated at 1000 lines; 7184 more skipped]
19 years, 9 months
1
0
0
0
[royce] 13909: enable PCH support for ntoskrnl
by royce@svn.reactos.com
enable PCH support for ntoskrnl Modified: branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml _____ Modified: branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml --- branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml 2005-03-10 14:05:41 UTC (rev 13908) +++ branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml 2005-03-10 14:06:14 UTC (rev 13909) @@ -14,6 +14,9 @@ <library>rosrtl</library> <library>rtl</library> <library>string</library> + <directory name="include"> + <pch>ntoskrnl.h</pch> + </directory> <directory name="ke"> <if property="ARCH" value="i386"> <directory name="i386">
19 years, 9 months
1
0
0
0
[royce] 13908: PCH support
by royce@svn.reactos.com
PCH support Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-03-10 04:58:40 UTC (rev 13907) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-03-10 14:05:41 UTC (rev 13908) @@ -50,6 +50,7 @@ if ( !fMakefile ) throw AccessDeniedException ( ProjectNode.makefile ); MingwModuleHandler::SetMakefile ( fMakefile ); + MingwModuleHandler::SetUsePch ( use_pch ); } void _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-03-10 04:58:40 UTC (rev 13907) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-03-10 14:05:41 UTC (rev 13908) @@ -23,6 +23,8 @@ FILE* MingwModuleHandler::fMakefile = NULL; +bool +MingwModuleHandler::use_pch = false; string ReplaceExtension ( const string& filename, @@ -67,6 +69,12 @@ fMakefile = f; } +void +MingwModuleHandler::SetUsePch ( bool b ) +{ + use_pch = b; +} + MingwModuleHandler* MingwModuleHandler::LookupHandler ( const string& location, ModuleType moduletype ) @@ -710,11 +718,14 @@ const string& cc, const string& cflagsMacro ) const { + string deps = sourceFilename; + if ( module.pch && use_pch ) + deps += " " + module.pch->header + ".gch"; string objectFilename = PassThruCacheDirectory ( MingwModuleHandler::GetObjectFilename ( sourceFilename ) ); fprintf ( fMakefile, "%s: %s\n", objectFilename.c_str (), - sourceFilename.c_str () ); + deps.c_str () ); fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [CC] $<\n" ); fprintf ( fMakefile, "\t%s -c %s -o %s %s\n", @@ -1045,6 +1056,26 @@ const string& windresflagsMacro, string_list& clean_files ) const { + if ( module.pch && use_pch ) + { + const string& pch_file = module.pch->header; + string gch_file = pch_file + ".gch"; + CLEAN_FILE(gch_file); + fprintf ( + fMakefile, + "%s: %s\n", + gch_file.c_str(), + pch_file.c_str() ); + fprintf ( fMakefile, "\t$(HALFVERBOSEECHO) [PCH] $@\n" ); + fprintf ( + fMakefile, + "\t%s -c %s -o %s %s\n\n", + cc.c_str(), + pch_file.c_str(), + gch_file.c_str(), + cflagsMacro.c_str() ); + } + GenerateObjectFileTargets ( module, module.non_if_data, cc, @@ -1425,6 +1456,8 @@ return dependencies; } +// TODO FIXME - check for C++ extensions when parsing XML, and set a +// bool in the Module class bool MingwModuleHandler::IsCPlusPlusModule ( const Module& module ) const { _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-03-10 04:58:40 UTC (rev 13907) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-03-10 14:05:41 UTC (rev 13908) @@ -5,7 +5,7 @@ extern std::string ReplaceExtension ( const std::string& filename, - const std::string& newExtension ); + const std::string& newExtension ); class MingwModuleHandler @@ -20,6 +20,7 @@ virtual ~MingwModuleHandler(); static void SetMakefile ( FILE* f ); + static void SetUsePch ( bool use_pch ); static MingwModuleHandler* LookupHandler ( const std::string& location, ModuleType moduletype_ ); virtual void Process ( const Module& module, string_list& clean_files ) = 0; @@ -73,6 +74,7 @@ std::string GetLinkingDependencies ( const Module& module ) const; bool IsCPlusPlusModule ( const Module& module ) const; static FILE* fMakefile; + static bool use_pch; static std::set<std::string> directory_set; private: std::string ConcatenatePaths ( const std::string& path1, _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp 2005-03-10 04:58:40 UTC (rev 13907) +++ branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp 2005-03-10 14:05:41 UTC (rev 13908) @@ -90,7 +90,8 @@ : project (project), node (moduleNode), importLibrary (NULL), - bootstrap (NULL) + bootstrap (NULL), + pch (NULL) { if ( node.name != "module" ) throw Exception ( "internal tool error: Module created with non-<module> node" ); @@ -141,6 +142,8 @@ delete compilerFlags[i]; for ( i = 0; i < linkerFlags.size(); i++ ) delete linkerFlags[i]; + if ( pch ) + delete pch; } void @@ -158,6 +161,8 @@ for ( i = 0; i < linkerFlags.size(); i++ ) linkerFlags[i]->ProcessXML(); non_if_data.ProcessXML(); + if ( pch ) + pch->ProcessXML(); } void @@ -282,6 +287,20 @@ bootstrap = new Bootstrap ( project, this, e ); subs_invalid = true; } + else if ( e.name == "pch" ) + { + if ( pIf ) + throw InvalidBuildFileException ( + e.location, + "<pch> is not a valid sub-element of <if>" ); + if ( pch ) + throw InvalidBuildFileException ( + e.location, + "Only one <pch> is valid per module" ); + pch = new PchFile ( + e, *this, FixSeparator ( path + CSEP + e.value ) ); + subs_invalid = true; + } if ( subs_invalid && e.subElements.size() > 0 ) throw InvalidBuildFileException ( e.location, @@ -806,3 +825,17 @@ Property::ProcessXML() { } + + +PchFile::PchFile ( + const XMLElement& node_, + const Module& module_, + const string& header_ ) + : node(node_), module(module_), header(header_) +{ +} + +void +PchFile::ProcessXML() +{ +} _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-03-10 04:58:40 UTC (rev 13907) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-03-10 14:05:41 UTC (rev 13908) @@ -54,6 +54,7 @@ class AutomaticDependency; class Bootstrap; class CDFile; +class PchFile; class SourceFileTest; @@ -150,6 +151,7 @@ std::vector<Dependency*> dependencies; std::vector<CompilerFlag*> compilerFlags; std::vector<LinkerFlag*> linkerFlags; + PchFile* pch; Module ( const Project& project, const XMLElement& moduleNode, @@ -499,6 +501,21 @@ }; +class PchFile +{ +public: + const XMLElement& node; + const Module& module; + std::string header; + + PchFile ( + const XMLElement& node, + const Module& module, + const std::string& header ); + void ProcessXML(); +}; + + extern std::string FixSeparator ( const std::string& s );
19 years, 9 months
1
0
0
0
[royce] 13907: eliminate warnings, fix bug that locked up game when single-clicking a card
by royce@svn.reactos.com
eliminate warnings, fix bug that locked up game when single-clicking a card Modified: trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardcolor.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardcount.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardlib.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardregion.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardregion.h Modified: trunk/rosapps/games/solitaire/cardlib/cardrgnmouse.cpp Modified: trunk/rosapps/games/solitaire/cardlib/cardwindow.cpp Modified: trunk/rosapps/games/solitaire/makefile Modified: trunk/rosapps/games/solitaire/solgame.cpp Modified: trunk/rosapps/games/solitaire/solitaire.cpp _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp --- trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardbutton.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -20,7 +20,7 @@ CardButton::CardButton(CardWindow &parent, int Id, TCHAR *szText, UINT Style, bool visible, int x, int y, int width, int height) - : parentWnd(parent), id(Id), fVisible(visible), uStyle(Style), ButtonCallback(0) + : parentWnd(parent), id(Id), uStyle(Style), fVisible(visible), ButtonCallback(0) { crText = RGB(255,255,255); crBack = RGB(0, 128, 0); _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardcolor.cpp --- trunk/rosapps/games/solitaire/cardlib/cardcolor.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardcolor.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -186,28 +186,12 @@ COLORREF ColorDarker(COLORREF col, double ratio) { - static double Hue, Lum, Sat; - - //RGBtoHLS(col, &Hue, &Lum, &Sat); - - //col = HLStoRGB(Hue, fMax(0.0,Lum-ratio), Sat); - return ColorScaleHSL(col, RGB(0,0,0), ratio); - - //return col; } COLORREF ColorLighter(COLORREF col, double ratio) { - static double Hue, Lum, Sat; - - //RGBtoHLS(col, &Hue, &Lum, &Sat); - - //col = HLStoRGB(Hue, fMin(1.0,Lum+ratio), Sat); - return ColorScaleHSL(col, RGB(255,255,255), ratio); - - //return col; } // _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardcount.cpp --- trunk/rosapps/games/solitaire/cardlib/cardcount.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardcount.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -87,4 +87,4 @@ if(count[index] > 0) count[index]--; -} \ No newline at end of file +} _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardlib.cpp --- trunk/rosapps/games/solitaire/cardlib/cardlib.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardlib.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -10,7 +10,7 @@ void LoadCardBitmaps(void); -static bool __CARDLIB_ACES_HIGH = false; +//static bool __CARDLIB_ACES_HIGH = false; extern double __CARDZOOMSPEED; // _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardregion.cpp --- trunk/rosapps/games/solitaire/cardlib/cardregion.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardregion.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -16,7 +16,7 @@ void PaintRect(HDC hdc, RECT *rect, COLORREF colour); CardRegion::CardRegion(CardWindow &parent, int Id, bool visible, int x, int y, int xOffset, int yOffset) -: parentWnd(parent), id(Id), fVisible(visible), xpos(x), ypos(y), xoffset(xOffset), yoffset(yOffset) +: id(Id), parentWnd(parent), xpos(x), ypos(y), xoffset(xOffset), yoffset(yOffset), fVisible(visible) { width = __cardwidth; height = __cardheight; @@ -56,7 +56,7 @@ nFlashCount = 0; fFlashVisible = false; - uFlashTimer = -1; + uFlashTimer = (UINT)-1; fMouseDragging = false; @@ -331,25 +331,25 @@ void CardRegion::StopFlash() { - if(uFlashTimer != -1) + if(uFlashTimer != (UINT)-1) { KillTimer((HWND)parentWnd, uFlashTimer); nFlashCount = 0; - uFlashTimer = -1; + uFlashTimer = (UINT)-1; fFlashVisible = true; } } void CardRegion::DoFlash() { - if(uFlashTimer != -1) + if(uFlashTimer != (UINT)-1) { fFlashVisible = !fFlashVisible; if(--nFlashCount == 0) { KillTimer((HWND)parentWnd, uFlashTimer); - uFlashTimer = -1; + uFlashTimer = (UINT)-1; fFlashVisible = true; } @@ -655,4 +655,4 @@ } return true; -} \ No newline at end of file +} _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardregion.h --- trunk/rosapps/games/solitaire/cardlib/cardregion.h 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardregion.h 2005-03-10 04:58:40 UTC (rev 13907) @@ -147,12 +147,12 @@ bool fMouseDragging; - int xoffset; //direction that cards take - int yoffset; - int xpos; //coordinates of stack int ypos; + int xoffset; //direction that cards take + int yoffset; + int width; //stack-size of all cards int height; _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardrgnmouse.cpp --- trunk/rosapps/games/solitaire/cardlib/cardrgnmouse.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardrgnmouse.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -6,11 +6,18 @@ // #include <windows.h> #include <math.h> +#include <stdio.h> #include "cardlib.h" #include "cardwindow.h" #include "cardregion.h" +#if 1 +#define TRACE(s) +#else +#define TRACE(s) printf("%s(%i): %s",__FILE__,__LINE__,s) +#endif + double __CARDZOOMSPEED = 32; int ClipCard(HDC hdc, int x, int y, int width, int height); @@ -304,8 +311,10 @@ // If have found a stack to drop onto // + TRACE ( "can I drop card?\n" ); if(pDestStack && pDestStack->CanDropCards(dragstack)) { + TRACE ( "yes, dropping card\n" ); hdc = GetDC((HWND)parentWnd); // UseNicePalette(hdc); ZoomCard(hdc, x - mousexoffset, y - mouseyoffset, pDestStack); @@ -332,25 +341,32 @@ pDestStack->AddCallback(*pDestStack, pDestStack->cardstack);//index, deststack->numcards); RedrawIfNotDim(pDestStack, true); - } + TRACE ( "done dropping card\n" ); + } // // Otherwise, let the cards snap back onto this stack // else { - + TRACE ( "no, putting card back\n" ); hdc = GetDC((HWND)parentWnd); + TRACE ( "calling ZoomCard()\n" ); ZoomCard(hdc, x - mousexoffset, y - mouseyoffset, this); + TRACE ( "cardstack += dragstack\n" ); cardstack += dragstack; + TRACE ( "calling ReleaseDC()\n" ); ReleaseDC((HWND)parentWnd, hdc); + TRACE ( "calling Update()\n" ); Update(); //Update this stack's card count + size + TRACE ( "done putting card back\n" ); } ReleaseDragBitmaps(); ReleaseCapture(); + TRACE ( "OnLButtonUp() done\n" ); return true; } @@ -531,6 +547,7 @@ #else void CardRegion::ZoomCard(HDC hdc, int xpos, int ypos, CardRegion *pDestStack) { + TRACE ( "ENTER ZoomCard()\n" ); double dx, dy, x ,y; int apparentcards; x = (double)xpos; y = (double)ypos; @@ -552,6 +569,11 @@ //normalise the motion vector dx = idestx - x; dy = idesty - y; + if ( fabs(dx) + fabs(dy) < 0.001f ) + { + MoveDragCardTo(hdc, idestx, idesty); + return; + } double recip = 1.0 / sqrt(dx*dx + dy*dy); dx *= recip * __CARDZOOMSPEED; dy *= recip * __CARDZOOMSPEED; @@ -566,7 +588,8 @@ ix = (int)x; iy = (int)y; - if(dx < 0.0 && ix < idestx) ix = idestx; + + if(dx < 0.0 && ix < idestx) ix = idestx; else if(dx > 0.0 && ix > idestx) ix = idestx; else attarget = false; @@ -614,5 +637,6 @@ Sleep(10); } + TRACE ( "EXIT ZoomCard()\n" ); } #endif _____ Modified: trunk/rosapps/games/solitaire/cardlib/cardwindow.cpp --- trunk/rosapps/games/solitaire/cardlib/cardwindow.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/cardlib/cardwindow.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -282,7 +282,6 @@ { int i; RECT rect; - int xpos = 10; HPALETTE hOldPal; hOldPal = UseNicePalette(hdc, __hPalette); _____ Modified: trunk/rosapps/games/solitaire/makefile --- trunk/rosapps/games/solitaire/makefile 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/makefile 2005-03-10 04:58:40 UTC (rev 13907) @@ -4,6 +4,8 @@ TARGET_TYPE = program TARGET_APPTYPE = windows +# change to console for debugging purposes... +#TARGET_APPTYPE = console TARGET_INSTALLDIR = system32 _____ Modified: trunk/rosapps/games/solitaire/solgame.cpp --- trunk/rosapps/games/solitaire/solgame.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/solgame.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -1,16 +1,24 @@ #include <windows.h> #include <commctrl.h> #include <tchar.h> +#include <stdio.h> #include "resource.h" #include "cardlib/cardlib.h" //#include "../catch22lib/trace.h" #include "solitaire.h" +#if 1 +#define TRACE(s) +#else +#define TRACE(s) printf("%s(%i): %s",__FILE__,__LINE__,s) +#endif + CardStack activepile; bool fGameStarted = false; void NewGame(void) { + TRACE("ENTER NewGame()\n"); int i, j; SolWnd.EmptyStacks(); @@ -44,6 +52,7 @@ SolWnd.Redraw(); fGameStarted = false; + TRACE("EXIT NewGame()\n"); } // @@ -56,6 +65,7 @@ // bool CARDLIBPROC RowStackDragProc(CardRegion &stackobj, int iNumDragCards) { + TRACE("ENTER RowStackDragProc()\n"); int numfacedown; int numcards; @@ -63,6 +73,7 @@ numcards = stackobj.NumCards(); + TRACE("EXIT RowStackDragProc()\n"); if(iNumDragCards <= numcards-numfacedown) return true; else @@ -76,13 +87,17 @@ // bool CARDLIBPROC RowStackDropProc(CardRegion &stackobj, const CardStack &dragcards) { + TRACE("ENTER RowStackDropProc()\n"); Card dragcard = dragcards[dragcards.NumCards() - 1]; //if we are empty, can only drop a stack with a King at bottom if(stackobj.NumCards() == 0) { if(dragcard.LoVal() != 13) + { + TRACE("EXIT RowStackDropProc(false)\n"); return false; + } } else { @@ -90,14 +105,21 @@ //can only drop if card is 1 less if(mystack[0].LoVal() != dragcard.LoVal() + 1) + { + TRACE("EXIT RowStackDropProc(false)\n"); return false; + } //can only drop if card is different colour if( mystack[0].IsBlack() && !dragcard.IsRed() || !mystack[0].IsBlack() && dragcard.IsRed() ) + { + TRACE("EXIT RowStackDropProc(false)\n"); return false; + } } + TRACE("EXIT RowStackDropProc(true)\n"); return true; } @@ -107,6 +129,7 @@ // bool CanDrop(CardRegion &stackobj, Card card) { + TRACE("ENTER CanDrop()\n"); int topval; const CardStack &cardstack = stackobj.GetCardStack(); @@ -115,6 +138,7 @@ { if(card.Suit() != cardstack[0].Suit()) { + TRACE("EXIT CanDrop()\n"); return false; } @@ -127,8 +151,12 @@ //make sure 1 higher if(card.LoVal() != (topval + 1)) + { + TRACE("EXIT CanDrop()\n"); return false; + } + TRACE("EXIT CanDrop()\n"); return true; } @@ -137,13 +165,17 @@ // bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, const CardStack &dragcards) { - int topval = 0; - + TRACE("ENTER SuitStackDropProc()\n"); //only drop 1 card at a time if(dragcards.NumCards() != 1) + { + TRACE("EXIT SuitStackDropProc()\n"); return false; + } - return CanDrop(stackobj, dragcards[0]); + bool b = CanDrop(stackobj, dragcards[0]); + TRACE("EXIT SuitStackDropProc()\n"); + return b; } // @@ -152,6 +184,7 @@ // void CARDLIBPROC RowStackClickProc(CardRegion &stackobj, int iNumClicked) { + TRACE("ENTER RowStackClickProc()\n"); int numfacedown; stackobj.GetFaceDirection(&numfacedown); @@ -163,6 +196,7 @@ stackobj.SetFaceDirection(CS_FACE_DOWNUP, numfacedown); stackobj.Redraw(); } + TRACE("EXIT RowStackClickProc()\n"); } // @@ -170,12 +204,17 @@ // CardRegion *FindSuitStackFromCard(Card card) { + TRACE("ENTER FindSuitStackFromCard()\n"); for(int i = 0; i < 4; i++) { if(CanDrop(*pSuitStack[i], card)) + { + TRACE("EXIT FindSuitStackFromCard()\n"); return pSuitStack[i]; + } } + TRACE("EXIT FindSuitStackFromCard()\n"); return 0; } @@ -187,6 +226,7 @@ // void CARDLIBPROC SuitStackAddProc(CardRegion &stackobj, const CardStack &added) { + TRACE("ENTER SuitStackAddProc()\n"); bool fGameOver = true; for(int i = 0; i < 4; i++) @@ -207,6 +247,7 @@ pSuitStack[i]->Flash(11, 100); } } + TRACE("EXIT SuitStackAddProc()\n"); } // @@ -216,9 +257,13 @@ // void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked) { + TRACE("ENTER RowStackDblClickProc()\n"); //can only move 1 card at a time if(iNumClicked != 1) + { + TRACE("EXIT RowStackDblClickProc()\n"); return; + } //find a suit-stack to move the card to... const CardStack &cardstack = stackobj.GetCardStack(); @@ -231,6 +276,7 @@ //AddProc callbacks called for us on the destination stacks... stackobj.SimulateDrag(pDest, 1, true); } + TRACE("EXIT RowStackDblClickProc()\n"); } // @@ -238,7 +284,9 @@ // void CARDLIBPROC PileDblClickProc(CardRegion &stackobj, int iNumClicked) { + TRACE("ENTER PileDblClickProc()\n"); RowStackDblClickProc(stackobj, iNumClicked); + TRACE("EXIT PileDblClickProc()\n"); } // @@ -246,6 +294,7 @@ // void CARDLIBPROC PileRemoveProc(CardRegion &stackobj, int iItems) { + TRACE("ENTER PileRemoveProc()\n"); //modify our "virtual" pile by removing the same card //that was removed from the physical card stack activepile.Pop(iItems); @@ -259,6 +308,7 @@ stackobj.SetOffsets(0,0); stackobj.SetCardStack(activepile); } + TRACE("EXIT PileRemoveProc()\n"); } // @@ -267,6 +317,7 @@ // void CARDLIBPROC DeckClickProc(CardRegion &stackobj, int iNumClicked) { + TRACE("ENTER DeckClickProc()\n"); CardStack cardstack = stackobj.GetCardStack(); CardStack pile = pPile->GetCardStack(); @@ -305,4 +356,5 @@ pPile->SetCardStack(pile); SolWnd.Redraw(); + TRACE("EXIT DeckClickProc()\n"); } _____ Modified: trunk/rosapps/games/solitaire/solitaire.cpp --- trunk/rosapps/games/solitaire/solitaire.cpp 2005-03-10 04:10:24 UTC (rev 13906) +++ trunk/rosapps/games/solitaire/solitaire.cpp 2005-03-10 04:58:40 UTC (rev 13907) @@ -28,6 +28,11 @@ lstrcpy(ptr + 1, szExt); } +int main ( int argc, char** argv ) +{ + return WinMain ( NULL, NULL, NULL, SW_SHOW ); +} + // // Main entry point //
19 years, 9 months
1
0
0
0
[sedwards] 13906: set the svn:ignore
by sedwards@svn.reactos.com
set the svn:ignore Property changes on: trunk/rosapps/games/solitaire ___________________________________________________________________ Name: svn:ignore + .coff .o .d .a .sym .map .exe Property changes on: trunk/rosapps/games/solitaire/cardlib ___________________________________________________________________ Name: svn:ignore + .coff .o .d .a .sym .map .exe
19 years, 9 months
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
61
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Results per page:
10
25
50
100
200