You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(147) |
Oct
(219) |
Nov
(189) |
Dec
(380) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(301) |
Feb
(369) |
Mar
(155) |
Apr
(61) |
May
(77) |
Jun
(101) |
Jul
(191) |
Aug
(107) |
Sep
(180) |
Oct
(37) |
Nov
(7) |
Dec
(28) |
2004 |
Jan
(34) |
Feb
(45) |
Mar
(7) |
Apr
(17) |
May
(6) |
Jun
(59) |
Jul
(4) |
Aug
(8) |
Sep
(6) |
Oct
(18) |
Nov
(11) |
Dec
(15) |
2005 |
Jan
(148) |
Feb
(146) |
Mar
(73) |
Apr
(154) |
May
(192) |
Jun
(11) |
Jul
(23) |
Aug
(23) |
Sep
(26) |
Oct
(68) |
Nov
(109) |
Dec
(294) |
2006 |
Jan
(172) |
Feb
(22) |
Mar
(81) |
Apr
(79) |
May
(83) |
Jun
(23) |
Jul
(35) |
Aug
(66) |
Sep
(39) |
Oct
(133) |
Nov
(125) |
Dec
(90) |
2007 |
Jan
(49) |
Feb
(21) |
Mar
(3) |
Apr
(33) |
May
(19) |
Jun
(26) |
Jul
(32) |
Aug
(18) |
Sep
(14) |
Oct
(2) |
Nov
(8) |
Dec
(22) |
2008 |
Jan
(23) |
Feb
(14) |
Mar
(28) |
Apr
(11) |
May
(55) |
Jun
(8) |
Jul
(1) |
Aug
(36) |
Sep
(8) |
Oct
(20) |
Nov
(6) |
Dec
|
2009 |
Jan
(2) |
Feb
(7) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(46) |
Jul
(15) |
Aug
(1) |
Sep
(3) |
Oct
(88) |
Nov
(108) |
Dec
(119) |
2010 |
Jan
(31) |
Feb
(3) |
Mar
(5) |
Apr
(1) |
May
(5) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(23) |
Mar
(1) |
Apr
(20) |
May
(27) |
Jun
(2) |
Jul
(40) |
Aug
(14) |
Sep
(17) |
Oct
(5) |
Nov
|
Dec
(28) |
2012 |
Jan
(31) |
Feb
(19) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <av...@us...> - 2011-07-04 21:49:17
|
Revision: 3632 http://sc2.svn.sourceforge.net/sc2/?rev=3632&view=rev Author: avolkov Date: 2011-07-04 21:49:11 +0000 (Mon, 04 Jul 2011) Log Message: ----------- Updated 0.7.0 revision Modified Paths: -------------- trunk/sc2/doc/devel/versions Modified: trunk/sc2/doc/devel/versions =================================================================== --- trunk/sc2/doc/devel/versions 2011-07-04 19:21:01 UTC (rev 3631) +++ trunk/sc2/doc/devel/versions 2011-07-04 21:49:11 UTC (rev 3632) @@ -39,4 +39,4 @@ Version 0.6.7: Revision 3276 Version 0.6.8: Revision 3334 Version 0.6.9: Revision 3537 -Version 0.7.0-rc2: Revision 3622 +Version 0.7.0: Revision 3631 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-07-04 19:21:07
|
Revision: 3631 http://sc2.svn.sourceforge.net/sc2/?rev=3631&view=rev Author: avolkov Date: 2011-07-04 19:21:01 +0000 (Mon, 04 Jul 2011) Log Message: ----------- Updated .LSM file Modified Paths: -------------- trunk/sc2/uqm.lsm Modified: trunk/sc2/uqm.lsm =================================================================== --- trunk/sc2/uqm.lsm 2011-07-04 17:58:45 UTC (rev 3630) +++ trunk/sc2/uqm.lsm 2011-07-04 19:21:01 UTC (rev 3631) @@ -1,7 +1,7 @@ Begin3 Title: The Ur-Quan Masters -Version: 0.6.0 -Entered-date: 2006-12-15 +Version: 0.7.0 +Entered-date: 2011-07-04 Description: Port of the classic game 'Star Control II'. Keywords: Ur-Quan Masters, Star Control, game, space adventure, Super Melee @@ -11,13 +11,13 @@ Mika Kolehmainen <mim...@cc...> Michael Chapman Martin <mcm...@gm...> Alex Volkov <co...@us...> -Primary-site: ftp.sourceforge.net /pub/sourceforge/s/sc/sc2/ - 1225567 uqm-0.6.0-win32-installer.exe - 11580000 uqm-0.6.0-content.uqm - 18980071 uqm-0.6.0-3domusic.uqm - 114823409 uqm-0.6.0-voice.uqm - 21917799 uqm-0.6.0-macosx.dmg - 1567422 uqm-0.6.0-source.tgz +Primary-site: http://sourceforge.net/projects/sc2/files/ + 1251331 uqm-0.7.0-installer.exe + 11538533 uqm-0.7.0-content.uqm + 18980671 uqm-0.7.0-3domusic.uqm + 115143439 uqm-0.7.0-voice.uqm + 14716453 uqm-0.7.0-macosx.dmg + 1562065 uqm-0.7.0-source.tgz Platforms: Windows, Linux, FreeBSD, OpenBSD, MacOS X, BeOS Copying-policy: GPL for the C code, CC-by-nc-sa 2.5 or custom for the graphics and audio content, CC-by 2.0 for the documentation End This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-07-04 17:58:51
|
Revision: 3630 http://sc2.svn.sourceforge.net/sc2/?rev=3630&view=rev Author: avolkov Date: 2011-07-04 17:58:45 +0000 (Mon, 04 Jul 2011) Log Message: ----------- Fix pending error messing up the file-append op Modified Paths: -------------- trunk/sc2/build/win32_install/uqm-installer.nsi Modified: trunk/sc2/build/win32_install/uqm-installer.nsi =================================================================== --- trunk/sc2/build/win32_install/uqm-installer.nsi 2011-07-04 17:51:45 UTC (rev 3629) +++ trunk/sc2/build/win32_install/uqm-installer.nsi 2011-07-04 17:58:45 UTC (rev 3630) @@ -344,9 +344,12 @@ FunctionEnd Function EnableRemixes + # If there are errors pending AppendToFile will fail + ClearErrors Push "$UQMUSERDATA\uqm.cfg" Push "remixmusic = BOOLEAN:true$\r$\n" Call AppendToFile + ClearErrors FunctionEnd SectionGroup "!UQM" SECGRP01 @@ -625,6 +628,7 @@ Delete "$INSTDIR\SDL_image.dll" Delete "$INSTDIR\SDL.dll" Delete "$INSTDIR\README.txt" + Delete "$INSTDIR\README-SDL.txt" Delete "$INSTDIR\wrap_oal.dll" Delete "$INSTDIR\OpenAL32.dll" Delete "$INSTDIR\ogg.dll" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Mee...@us...> - 2011-07-04 17:51:51
|
Revision: 3629 http://sc2.svn.sourceforge.net/sc2/?rev=3629&view=rev Author: Meep-Eep Date: 2011-07-04 17:51:45 +0000 (Mon, 04 Jul 2011) Log Message: ----------- Some restructuring, removing of credits for individual items as before (they are in ChangeLog), and removing of bug numbers (again ChangeLog). Modified Paths: -------------- trunk/sc2/WhatsNew Modified: trunk/sc2/WhatsNew =================================================================== --- trunk/sc2/WhatsNew 2011-07-04 16:44:22 UTC (rev 3628) +++ trunk/sc2/WhatsNew 2011-07-04 17:51:45 UTC (rev 3629) @@ -17,46 +17,41 @@ NEW FEATURES -- Added spoken Slylandro probe coordinates - Added the missing bits to the no-voice versions of Mycon, Syreen and Utwig dialogue +- New lander reports for Supox ruins and Ultron. The reports text + is new content from TFB. +- Added spoken Slylandro probe coordinates - Remixes are now selectable from the setup menu -- "Safe mode", which will ignore settings. Useful if you've somehow +- Added a "safe mode", which will ignore settings. Useful if you've somehow wrecked your configuration files. -- Added --addondir commandline option - Mika +- Added --addondir commandline option - Added --keepaspectratio to keep correct aspect ratio when using - custom resolutions in OpenGL mode - Mika + custom resolutions in OpenGL mode - New addon machanism allows greater flexibility for selecting which resource goes with which game element. - Joystick text input improved - Unicode strings now could theoretically support UCS-4 on all platforms -- Experimental support for Symbian S60 3rd edition - Mika & SvdB -- Support for Windows CE. - SvdB with Pavel Chernikov -- Added fullscreen/windowed toggle key F11 (bug #578) - Mika -- Support for 3do "ship spin" videos - -BALANCE/GAME FLOW CHANGES -- Cannot talk to Ilwrath with a 'caster anymore after they die off -- New lander reports for Supox ruins and Ultron. The reports text - is new content from TFB. -- Do not match singular stars when given a prefix in star search -- Properly account for simultaneous destruction in SuperMelee. -- Druuge no longer turn hostile after attempting a salvage -- Canceling load from the main menu returns to main menu +- Experimental support for Symbian S60 3rd edition +- Support for Windows CE +- Added fullscreen/windowed toggle key F11 +- Support for 3DO "ship spin" videos - Better location description in savegame summaries -- Fixed Mmrnmhrm's X-Form transformation without energy use (bug #1004) - Alex -- 999.9:999.9 is now reachable in HyperSpace -- Fuel and distance estimates are now more accurate -- Analog joysticks less sensitive to jitter -- Gas giants can no longer have negative masses -- Fixed enemy ships getting recrewed between encounters in HyperSpace -- Fixed wrong Sa-Matra guards icons after Kohr-Ah win (bug #1001) - Alex -- Cancel key will now quit out of the Manifest Menu (Bug #838) - Michael +- Cancel key will now quit out of the Manifest Menu - Error boxes on MacOSX are now actually native to the OS - no need to check Console.app anymore. - + BUGFIXES +- Properly account for simultaneous destruction in SuperMelee. +- Ending a battle with a simultaneous death no longer triggers an + assertion +- Druuge no longer turn hostile after attempting a salvage +- Fixed Mmrnmhrm's X-Form transformation without energy use +- Fuel and distance estimates are now more accurate +- Analog joysticks less sensitive to jitter +- Cannot talk to Ilwrath with a 'caster anymore after they die off +- Fixed enemy ships getting recrewed between encounters in HyperSpace - Old Windows installer was horribly obsolete; fixed now. - Fixed rendering error when entering the orbit of a shielded planet - Fixed planet blinking when exiting scan @@ -69,7 +64,7 @@ - Fixed Melee menu timeout when both sides are Cyborgs - Fixed AI ship not moving on warp in - Revert gfx settings entirely when a mode switch fails -- Fix for weird colors problem on MacOSX w/ SDL 1.2.14 +- Fix for weird colors problem on MacOSX with SDL 1.2.14 - Lander will no longer hang when killed on planets with a lot of natural disasters - Fixed crash when saving a game into the last slot while having @@ -82,15 +77,18 @@ - Fixed rendering bug that would occasionally make a ship just be solid blue all the time - Objects in melee made of multiple "parts" no longer jitter during zoom -- Ending a battle with a simultaneous death no longer triggers an - assertion - Fixed a crash on startup if uqm.cfg did not exist - Extremely rapid key presses will no longer be lost at low framerates - 3DO videos now work after a resolution change - OpenGL texture loading uses surface pitch instead of screen width, improving compatibility across older graphics cards. - Miscellaneous conversational typo and timing fixes - +- 999.9:999.9 is now reachable in HyperSpace +- Do not match singular stars when given a prefix in star search +- Fixed wrong Sa-Matra guards icons after Kohr-Ah win +- Canceling load from the main menu returns to main menu +- Gas giants can no longer have negative masses + INTERNAL CHANGES - Code cleanup; many warnings removed @@ -100,8 +98,8 @@ - Code reorganization; old stuff removed, new stuff better set-up - 32-bit graphics everywhere internally. - Refactored universe generation -- Pthread support - Mika -- Removed the 256-frame limit on .ani files - Michael +- Pthread support +- Removed the 256-frame limit on .ani files Version 0.6 ------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-07-04 16:44:28
|
Revision: 3628 http://sc2.svn.sourceforge.net/sc2/?rev=3628&view=rev Author: avolkov Date: 2011-07-04 16:44:22 +0000 (Mon, 04 Jul 2011) Log Message: ----------- Version 0.7.0 Modified Paths: -------------- trunk/sc2/src/uqmversion.h Modified: trunk/sc2/src/uqmversion.h =================================================================== --- trunk/sc2/src/uqmversion.h 2011-07-03 21:05:11 UTC (rev 3627) +++ trunk/sc2/src/uqmversion.h 2011-07-04 16:44:22 UTC (rev 3628) @@ -23,7 +23,7 @@ #define UQM_MINOR_VERSION_S "7" #define UQM_PATCH_VERSION 0 #define UQM_PATCH_VERSION_S "0" -#define UQM_EXTRA_VERSION "-rc2" +#define UQM_EXTRA_VERSION "" /* The final version is interpreted as: * printf ("%d.%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, * UQM_PATCH_VERSION, UQM_EXTRA_VERSION); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-07-03 21:05:17
|
Revision: 3627 http://sc2.svn.sourceforge.net/sc2/?rev=3627&view=rev Author: avolkov Date: 2011-07-03 21:05:11 +0000 (Sun, 03 Jul 2011) Log Message: ----------- Updated download paths and mirrors for 0.7 Modified Paths: -------------- trunk/sc2/build/win32_install/uqm-installer.nsi Modified: trunk/sc2/build/win32_install/uqm-installer.nsi =================================================================== --- trunk/sc2/build/win32_install/uqm-installer.nsi 2011-07-03 18:38:37 UTC (rev 3626) +++ trunk/sc2/build/win32_install/uqm-installer.nsi 2011-07-03 21:05:11 UTC (rev 3627) @@ -125,7 +125,7 @@ Function RandomServer Push $0 - Push 15 + Push 27 Call Random Pop $0 IntCmp $0 0 0 +4 +4 @@ -137,7 +137,7 @@ Exch $0 Return IntCmp $0 2 0 +4 +4 - StrCpy $0 "easynews" + StrCpy $0 "aarnet" Exch $0 Return IntCmp $0 3 0 +4 +4 @@ -145,7 +145,7 @@ Exch $0 Return IntCmp $0 4 0 +4 +4 - StrCpy $0 "superb-east" + StrCpy $0 "superb-sea2" Exch $0 Return IntCmp $0 5 0 +4 +4 @@ -153,7 +153,7 @@ Exch $0 Return IntCmp $0 6 0 +4 +4 - StrCpy $0 "ufpr" + StrCpy $0 "voxel" Exch $0 Return IntCmp $0 7 0 +4 +4 @@ -161,15 +161,15 @@ Exch $0 Return IntCmp $0 8 0 +4 +4 - StrCpy $0 "puzzle" + StrCpy $0 "cdnetworks-us-1" Exch $0 Return IntCmp $0 9 0 +4 +4 - StrCpy $0 "superb-west" + StrCpy $0 "cdnetworks-us-2" Exch $0 Return IntCmp $0 10 0 +4 +4 - StrCpy $0 "optusnet" + StrCpy $0 "cdnetworks-kr-1" Exch $0 Return IntCmp $0 11 0 +4 +4 @@ -177,7 +177,7 @@ Exch $0 Return IntCmp $0 12 0 +4 +4 - StrCpy $0 "belnet" + StrCpy $0 "cdnetworks-kr-2" Exch $0 Return IntCmp $0 13 0 +4 +4 @@ -188,8 +188,52 @@ StrCpy $0 "nchc" Exch $0 Return - StrCpy $0 "umn" + IntCmp $0 15 0 +4 +4 + StrCpy $0 "dfn" Exch $0 + Return + IntCmp $0 16 0 +4 +4 + StrCpy $0 "freefr" + Exch $0 + Return + IntCmp $0 17 0 +4 +4 + StrCpy $0 "garr" + Exch $0 + Return + IntCmp $0 18 0 +4 +4 + StrCpy $0 "ignum" + Exch $0 + Return + IntCmp $0 19 0 +4 +4 + StrCpy $0 "internode" + Exch $0 + Return + IntCmp $0 20 0 +4 +4 + StrCpy $0 "iweb" + Exch $0 + Return + IntCmp $0 21 0 +4 +4 + StrCpy $0 "netcologne" + Exch $0 + Return + IntCmp $0 22 0 +4 +4 + StrCpy $0 "leaseweb" + Exch $0 + Return + IntCmp $0 23 0 +4 +4 + StrCpy $0 "ncu" + Exch $0 + Return + IntCmp $0 24 0 +4 +4 + StrCpy $0 "tenet" + Exch $0 + Return + IntCmp $0 25 0 +4 +4 + StrCpy $0 "transact" + Exch $0 + Return + StrCpy $0 "citylan" + Exch $0 FunctionEnd # To use: @@ -200,6 +244,7 @@ Var DOWNLOADTARGET Var MANDATORY Var MD5SUM +Var DOWNLOADPATH Function HandlePackage Exch $0 # File location Exch @@ -239,7 +284,7 @@ GetTempFileName $DOWNLOADTARGET Delete $DOWNLOADTARGET CreateDirectory $DOWNLOADTARGET - NSISdl::download "http://$2.dl.sourceforge.net/sourceforge/sc2/UQM/0.6.0/$1" "$DOWNLOADTARGET\$1" + NSISdl::download "http://$2.dl.sourceforge.net/project/sc2/$DOWNLOADPATH$1" "$DOWNLOADTARGET\$1" Pop $2 StrCmp $2 "success" DownloadSuccessful StrCmp $2 "cancel" DownloadCanceled @@ -364,6 +409,7 @@ StrCpy $MANDATORY 1 StrCpy $MD5SUM "${PKG_CONTENT_MD5SUM}" File "content\version" + StrCpy $DOWNLOADPATH "UQM/0.7/" Push "${PKG_CONTENT_FILE}" Push "$INSTDIR\content\packages" Call HandlePackage @@ -385,6 +431,7 @@ AddSize ${PKG_3DOMUSIC_SIZE} StrCpy $MANDATORY 0 StrCpy $MD5SUM "${PKG_3DOMUSIC_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM/0.7/" Push "${PKG_3DOMUSIC_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage @@ -398,6 +445,7 @@ AddSize ${PKG_VOICE_SIZE} StrCpy $MANDATORY 0 StrCpy $MD5SUM "${PKG_VOICE_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM/0.7/" Push "${PKG_VOICE_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage @@ -413,6 +461,7 @@ AddSize ${PKG_REMIX1_SIZE} StrCpy $MANDATORY 0 StrCpy $MD5SUM "${PKG_REMIX1_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%201/" Push "${PKG_REMIX1_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage @@ -427,6 +476,7 @@ AddSize ${PKG_REMIX2_SIZE} StrCpy $MANDATORY 0 StrCpy $MD5SUM "${PKG_REMIX2_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%202/" Push "${PKG_REMIX2_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage @@ -441,6 +491,7 @@ AddSize ${PKG_REMIX3_SIZE} StrCpy $MANDATORY 0 StrCpy $MD5SUM "${PKG_REMIX3_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%203/" Push "${PKG_REMIX3_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage @@ -455,6 +506,7 @@ # AddSize ${PKG_REMIX4_SIZE} # StrCpy $MANDATORY 0 # StrCpy $MD5SUM "${PKG_REMIX4_MD5SUM}" +# StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%204/" # Push "${PKG_REMIX4_FILE}" # Push "$INSTDIR\content\addons" # Call HandlePackage This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-07-03 18:38:43
|
Revision: 3626 http://sc2.svn.sourceforge.net/sc2/?rev=3626&view=rev Author: avolkov Date: 2011-07-03 18:38:37 +0000 (Sun, 03 Jul 2011) Log Message: ----------- Added the SDL readme to the win32 installer Modified Paths: -------------- trunk/sc2/build/win32_install/uqm-installer.nsi Modified: trunk/sc2/build/win32_install/uqm-installer.nsi =================================================================== --- trunk/sc2/build/win32_install/uqm-installer.nsi 2011-07-03 18:25:58 UTC (rev 3625) +++ trunk/sc2/build/win32_install/uqm-installer.nsi 2011-07-03 18:38:37 UTC (rev 3626) @@ -317,6 +317,7 @@ File "OpenAL32.dll" File "wrap_oal.dll" File "README.txt" + File "README-SDL.txt" File "SDL.dll" File "SDL_image.dll" File "SDL_gfx.dll" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-07-03 18:26:04
|
Revision: 3625 http://sc2.svn.sourceforge.net/sc2/?rev=3625&view=rev Author: avolkov Date: 2011-07-03 18:25:58 +0000 (Sun, 03 Jul 2011) Log Message: ----------- Updated irc nicks to actual Modified Paths: -------------- trunk/sc2/Contributing Modified: trunk/sc2/Contributing =================================================================== --- trunk/sc2/Contributing 2011-06-24 17:38:12 UTC (rev 3624) +++ trunk/sc2/Contributing 2011-07-03 18:25:58 UTC (rev 3625) @@ -103,7 +103,7 @@ particular field of expertise with the source. Though all of us should have enough experience to deal with most issues not explicitely mentioned. - Serge van den Boom (svdb at stack.nl), Meep-Eep at #sc2 + Serge van den Boom (svdb at stack.nl), SvdB at #sc2 - Resource system - 3DO historical code - *nix build system @@ -119,7 +119,7 @@ - Input system - In-game configuration - General issues - Alex Volkov (codepro at usa.net), fOSSiL at #sc2 + Alex Volkov (codepro at usa.net), fossil at #sc2 - Graphics - Sound (particularly MixSDL) - Alien communications code This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-06-24 17:38:18
|
Revision: 3624 http://sc2.svn.sourceforge.net/sc2/?rev=3624&view=rev Author: avolkov Date: 2011-06-24 17:38:12 +0000 (Fri, 24 Jun 2011) Log Message: ----------- Actually build a debug exe in strict-debug mode; bug #1127; from Scott A. Colcord Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/build/unix/build.config trunk/sc2/doc/devel/versions Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2011-06-01 18:55:48 UTC (rev 3623) +++ trunk/sc2/ChangeLog 2011-06-24 17:38:12 UTC (rev 3624) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Build with debug info in strict-debug mode (bug #1127), from Scott A. Colcord - Added spoken Slylandro probe coordinates (bug #732) - Nic, Alex - Added the missing bits to the no-voice versions of Mycon, Syreen and Utwig dialogue (bug #327) - Alex Modified: trunk/sc2/build/unix/build.config =================================================================== --- trunk/sc2/build/unix/build.config 2011-06-01 18:55:48 UTC (rev 3623) +++ trunk/sc2/build/unix/build.config 2011-06-24 17:38:12 UTC (rev 3624) @@ -151,7 +151,7 @@ ;; *) CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized - CFLAGS="$CFLAGS -W -Wall \ + CFLAGS="$CFLAGS -g -DDEBUG -W -Wall \ -Wbad-function-cast -Wcast-qual -Wmissing-prototypes \ -Wstrict-prototypes -Wmissing-declarations \ -Wwrite-strings -Wimplicit -Wreturn-type -Wformat \ @@ -179,6 +179,7 @@ CFLAGS=`echo $CFLAGS` # Remove all the unnecessary spaces from $CFLAGS, # for more readable messages. + LDFLAGS="$LDFLAGS -O0" ;; esac DEBUG=1 Modified: trunk/sc2/doc/devel/versions =================================================================== --- trunk/sc2/doc/devel/versions 2011-06-01 18:55:48 UTC (rev 3623) +++ trunk/sc2/doc/devel/versions 2011-06-24 17:38:12 UTC (rev 3624) @@ -39,4 +39,4 @@ Version 0.6.7: Revision 3276 Version 0.6.8: Revision 3334 Version 0.6.9: Revision 3537 -Version 0.7.0-rc1: Revision 3574 +Version 0.7.0-rc2: Revision 3622 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-06-01 18:55:54
|
Revision: 3623 http://sc2.svn.sourceforge.net/sc2/?rev=3623&view=rev Author: avolkov Date: 2011-06-01 18:55:48 +0000 (Wed, 01 Jun 2011) Log Message: ----------- *nix wants abs() in stdlib.h Modified Paths: -------------- trunk/sc2/src/uqm/comm/slyland/slyland.c Modified: trunk/sc2/src/uqm/comm/slyland/slyland.c =================================================================== --- trunk/sc2/src/uqm/comm/slyland/slyland.c 2011-05-23 20:59:06 UTC (rev 3622) +++ trunk/sc2/src/uqm/comm/slyland/slyland.c 2011-06-01 18:55:48 UTC (rev 3623) @@ -17,7 +17,7 @@ */ #include "../commall.h" -#include <math.h> +#include <stdlib.h> #include "resinst.h" #include "strings.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-23 20:59:12
|
Revision: 3622 http://sc2.svn.sourceforge.net/sc2/?rev=3622&view=rev Author: avolkov Date: 2011-05-23 20:59:06 +0000 (Mon, 23 May 2011) Log Message: ----------- Windows installer: fix a (benign?) register preservation bug in HandlePackage Modified Paths: -------------- trunk/sc2/build/win32_install/uqm-installer.nsi Modified: trunk/sc2/build/win32_install/uqm-installer.nsi =================================================================== --- trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-23 20:53:55 UTC (rev 3621) +++ trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-23 20:59:06 UTC (rev 3622) @@ -204,7 +204,6 @@ Exch $0 # File location Exch Exch $1 # File name - Exch Push $2 Push $3 # Check to make sure the file wasn't already installed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-23 20:54:01
|
Revision: 3621 http://sc2.svn.sourceforge.net/sc2/?rev=3621&view=rev Author: avolkov Date: 2011-05-23 20:53:55 +0000 (Mon, 23 May 2011) Log Message: ----------- Windows installer: no need for default uqm.cfg anymore; append remixmusic option Modified Paths: -------------- trunk/sc2/build/win32_install/uqm-installer.nsi Modified: trunk/sc2/build/win32_install/uqm-installer.nsi =================================================================== --- trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-23 18:31:07 UTC (rev 3620) +++ trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-23 20:53:55 UTC (rev 3621) @@ -279,6 +279,32 @@ Pop $0 FunctionEnd +# Usage: +# Push the file name, preferrably a full path. +# Push the string to be appended +# Any errors during appending will be ignored. +Function AppendToFile + Exch $0 # string to append + Exch + Exch $1 # File name + Push $2 # using $2 for file handle + FileOpen $2 $1 a + IfErrors done + FileSeek $2 0 END # seek to end + FileWrite $2 $0 + FileClose $2 +done: + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +Function EnableRemixes + Push "$UQMUSERDATA\uqm.cfg" + Push "remixmusic = BOOLEAN:true$\r$\n" + Call AppendToFile +FunctionEnd + SectionGroup "!UQM" SECGRP01 Section "Executable" SEC01 SectionIn 1 2 3 4 5 6 RO @@ -301,13 +327,10 @@ File "vorbisfile.dll" File "WhatsNew.txt" File "zlib1.dll" - SetOverwrite off SetOutPath $UQMUSERDATA - File "uqm.cfg" SetOverwrite try File "uqm-pc.cfg" File "uqm-3do.cfg" - File "uqm-remix.cfg" # Delete old content Delete "$INSTDIR\content\packages\uqm-0.3-3domusic.zip" @@ -393,9 +416,7 @@ Push "${PKG_REMIX1_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" + Call EnableRemixes ; Shortcuts !insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_END @@ -409,9 +430,7 @@ Push "${PKG_REMIX2_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" + Call EnableRemixes ; Shortcuts !insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_END @@ -425,9 +444,7 @@ Push "${PKG_REMIX3_FILE}" Push "$INSTDIR\content\addons" Call HandlePackage - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" + Call EnableRemixes ; Shortcuts !insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_END @@ -441,6 +458,7 @@ # Push "${PKG_REMIX4_FILE}" # Push "$INSTDIR\content\addons" # Call HandlePackage +# Call EnableRemixes # ; Shortcuts # !insertmacro MUI_STARTMENU_WRITE_BEGIN Application # !insertmacro MUI_STARTMENU_WRITE_END This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-23 18:31:15
|
Revision: 3620 http://sc2.svn.sourceforge.net/sc2/?rev=3620&view=rev Author: avolkov Date: 2011-05-23 18:31:07 +0000 (Mon, 23 May 2011) Log Message: ----------- Windows installer: script package sizes and md5 checksums Modified Paths: -------------- trunk/sc2/build/win32_install/uqm-installer.nsi Added Paths: ----------- trunk/sc2/build/win32_install/packages.nsh trunk/sc2/build/win32_install/procpkgs.cmd Property Changed: ---------------- trunk/sc2/build/win32_install/uqm-installer.nsi Added: trunk/sc2/build/win32_install/packages.nsh =================================================================== --- trunk/sc2/build/win32_install/packages.nsh (rev 0) +++ trunk/sc2/build/win32_install/packages.nsh 2011-05-23 18:31:07 UTC (rev 3620) @@ -0,0 +1,20 @@ +# Autogenerated by procpkgs.cmd +# +!define PKG_CONTENT_FILE "uqm-0.7.0-content.uqm" +!define PKG_CONTENT_MD5SUM "2f36dcb15274dbbcb5e266f2ed84d5b2" +!define PKG_CONTENT_SIZE 11268 +!define PKG_3DOMUSIC_FILE "uqm-0.7.0-3domusic.uqm" +!define PKG_3DOMUSIC_MD5SUM "86a5e376d9b76888add1d10818f0ab9f" +!define PKG_3DOMUSIC_SIZE 18535 +!define PKG_VOICE_FILE "uqm-0.7.0-voice.uqm" +!define PKG_VOICE_MD5SUM "b78e0606325810f9f2e9ec786191c01b" +!define PKG_VOICE_SIZE 112444 +!define PKG_REMIX1_FILE "uqm-remix-disc1.uqm" +!define PKG_REMIX1_MD5SUM "09f242d8d72166d1d5ccbd3d99c93e7d" +!define PKG_REMIX1_SIZE 49012 +!define PKG_REMIX2_FILE "uqm-remix-disc2.uqm" +!define PKG_REMIX2_MD5SUM "fbc8bdcb709939d559d8c7216ad15cc2" +!define PKG_REMIX2_SIZE 58869 +!define PKG_REMIX3_FILE "uqm-remix-disc3.uqm" +!define PKG_REMIX3_MD5SUM "5ccc6d4ac301ae98e172ac6835dcdead" +!define PKG_REMIX3_SIZE 38989 Property changes on: trunk/sc2/build/win32_install/packages.nsh ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/sc2/build/win32_install/procpkgs.cmd =================================================================== --- trunk/sc2/build/win32_install/procpkgs.cmd (rev 0) +++ trunk/sc2/build/win32_install/procpkgs.cmd 2011-05-23 18:31:07 UTC (rev 3620) @@ -0,0 +1,70 @@ +@echo off +REM Generates a .nsh file for the NSIS Windows installer with MD5 checksums +REM and file sizes of the UQM packages. +REM CMD command extension must be enabled to use this script. +REM The packages must be in the current directory. +REM Uses GNU md5sum utility, such as in Cygwin, which you must have somewhere +REM in PATH. + +setlocal + +set nsh_file=packages.nsh +set md5_tool=md5sum +set pkg_version=0.7.0 + +set content_pkg=uqm-%pkg_version%-content.uqm +set music_pkg=uqm-%pkg_version%-3domusic.uqm +set voice_pkg=uqm-%pkg_version%-voice.uqm +set remix1_pkg=uqm-remix-disc1.uqm +set remix2_pkg=uqm-remix-disc2.uqm +set remix3_pkg=uqm-remix-disc3.uqm +set remix4_pkg=uqm-remix-disc4.uqm + +call :check_exists %content_pkg% +call :check_exists %music_pkg% +call :check_exists %voice_pkg% +call :check_exists %remix1_pkg% +call :check_exists %remix2_pkg% +call :check_exists %remix3_pkg% +REM call :check_exists %remix4_pkg% + +call :check_md5_tool + +echo # Autogenerated by procpkgs.cmd>%nsh_file% +echo #>>%nsh_file% + +call :process_pkg %content_pkg% PKG_CONTENT +call :process_pkg %music_pkg% PKG_3DOMUSIC +call :process_pkg %voice_pkg% PKG_VOICE +call :process_pkg %remix1_pkg% PKG_REMIX1 +call :process_pkg %remix2_pkg% PKG_REMIX2 +call :process_pkg %remix3_pkg% PKG_REMIX3 +REM call :process_pkg %remix4_pkg% PKG_REMIX4 + +echo All packages processed. %nsh_file% generated. +exit 0 + +:process_pkg +setlocal +echo Processing %1...>&2 +echo !define %2_FILE "%1">>%nsh_file% +for /f %%s in ('%md5_tool% %1') do (set md5=%%s) +echo !define %2_MD5SUM "%md5%">>%nsh_file% +for /f "tokens=4" %%s in ('dir /n /-c %1 ^|find "%1"') do (set size=%%s) +set /a size/=1024 +echo !define %2_SIZE %size%>>%nsh_file% +endlocal +goto :eof + +:check_exists +if not exist %1 (echo %1 not found & exit 1) +goto :eof + +:check_md5_tool +setlocal +echo Checking for GNU %md5_tool%...>&2 +%md5_tool% --version >nul 2>&1 || (echo GNU %md5_tool% not found & exit 1) +for /f %%s in ('echo foo^|%md5_tool%') do (set md5=%%s) +if not "%md5%"=="2145971cf82058b108229a3a2e3bff35" (echo %md5_tool% is not GNU or does not operate correctly & exit 1) +endlocal +goto :eof Property changes on: trunk/sc2/build/win32_install/procpkgs.cmd ___________________________________________________________________ Added: svn:executable + * Added: svn:eol-style + native Modified: trunk/sc2/build/win32_install/uqm-installer.nsi =================================================================== --- trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-22 17:48:55 UTC (rev 3619) +++ trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-23 18:31:07 UTC (rev 3620) @@ -1,592 +1,596 @@ -; Script generated by the HM NIS Edit Script Wizard. - -Var PACKAGEDIR -Var UQMARGS -Var MAKEICON -Var UQMUSERDATA - -; HM NIS Edit Wizard helper defines -!define PRODUCT_NAME "The Ur-Quan Masters" -!define PRODUCT_VERSION "0.7.0" -!define PRODUCT_WEB_SITE "http://sc2.sourceforge.net" -!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\uqm.exe" -!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" -!define PRODUCT_UNINST_ROOT_KEY "HKLM" -!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" - -; MUI 1.67 compatible ------ -!include "MUI.nsh" - -; MUI Settings -!define MUI_ABORTWARNING -!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" -!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" -!define MUI_WELCOMEFINISHPAGE_BITMAP "orzshofixti.bmp" -!define MUI_HEADERIMAGE -!define MUI_HEADERIMAGE_BITMAP "ultron.bmp" -!define MUI_HEADERIMAGE_RIGHT - -; UAC support -RequestExecutionLevel admin - -; Welcome page -!insertmacro MUI_PAGE_WELCOME -; License page -!define MUI_LICENSEPAGE_BUTTON "Install" -!define MUI_LICENSEPAGE_TEXT_BOTTOM "Press the Install button to continue." -!insertmacro MUI_PAGE_LICENSE "COPYING.txt" -; Components page -!define MUI_COMPONENTSPAGE_TEXT_COMPLIST "You can preconfigure the options to mimic the original platforms by selecting those install types. Note that more complete installs will need to download more packages." -!insertmacro MUI_PAGE_COMPONENTS -; Directory page -!insertmacro MUI_PAGE_DIRECTORY -; Package Dictory -!define MUI_PAGE_HEADER_TEXT "Choose Package Location" -!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder that holds packages that have already been downloaded." -!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will look for already-downloaded content packages in the following folder. To copy them from a different folder, click Browse and select another folder. If you are doing a net install, leave this field alone. Click Next to continue." -!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Source Folder" -!define MUI_DIRECTORYPAGE_VARIABLE $PACKAGEDIR -!define MUI_DIRECTORYPAGE_VERIFYONLEAVE -!insertmacro MUI_PAGE_DIRECTORY -; Start menu page -var ICONS_GROUP -!define MUI_STARTMENUPAGE_NODISABLE -!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Games\The Ur-Quan Masters" -!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" -!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" -!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" -!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP -; Instfiles page -!insertmacro MUI_PAGE_INSTFILES -; Finish page -!define MUI_FINISHPAGE_RUN_NOTCHECKED -!define MUI_FINISHPAGE_NOREBOOTSUPPORT -!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" -!define MUI_FINISHPAGE_RUN "$INSTDIR\uqm.exe" -!define MUI_FINISHPAGE_RUN_PARAMETERS $UQMARGS -!insertmacro MUI_PAGE_FINISH - -; Uninstaller pages -!define MUI_UNCONFIRMPAGE_TEXT_TOP "This program will now uninstall The Ur-Quan Masters entirely. If you wish to preserve content or expansion packs, select Cancel now and back them up. Otherwise, press Uninstall to continue." -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES - -; Language files -!insertmacro MUI_LANGUAGE "English" - -; MUI end ------ - -Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "uqm-0.7.0-installer.exe" -InstallDir "$PROGRAMFILES\The Ur-Quan Masters\" -InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" -ShowInstDetails show -ShowUnInstDetails show -AllowRootDirInstall true -DirText "" "" "" "Please select a folder." -InstType "Typical" -InstType "Minimal" -InstType "Mimic PC" -InstType "Mimic 3DO" -InstType "No Content" -InstType "All Expansions" - -Function .onInit - Push $0 - StrCpy $PACKAGEDIR $EXEDIR - StrCpy $UQMARGS "" - StrCpy $MAKEICON 0 - ReadEnvStr $0 APPDATA - StrCmp $0 "" NoAppData - ExpandEnvStrings $UQMUSERDATA "%APPDATA%\uqm" - Goto GotAppData -NoAppData: - ReadEnvStr $0 USERPROFILE - StrCmp $0 "" NoProfile - ExpandEnvStrings $UQMUSERDATA "%USERPROFILE%\Application Data\uqm" - Goto GotAppData -NoProfile: - StrCpy $UQMUSERDATA "$INSTDIR\userdata\uqm" -GotAppData: -FunctionEnd - -Function Random - Exch $0 - Push $1 - System::Call 'kernel32::QueryPerformanceCounter(*l.r1)' - System::Int64Op $1 % $0 - Pop $0 - Pop $1 - Exch $0 -FunctionEnd - -Function RandomServer - Push $0 - Push 15 - Call Random - Pop $0 - IntCmp $0 0 0 +4 +4 - StrCpy $0 "ovh" - Exch $0 - Return - IntCmp $0 1 0 +4 +4 - StrCpy $0 "mesh" - Exch $0 - Return - IntCmp $0 2 0 +4 +4 - StrCpy $0 "easynews" - Exch $0 - Return - IntCmp $0 3 0 +4 +4 - StrCpy $0 "switch" - Exch $0 - Return - IntCmp $0 4 0 +4 +4 - StrCpy $0 "superb-east" - Exch $0 - Return - IntCmp $0 5 0 +4 +4 - StrCpy $0 "jaist" - Exch $0 - Return - IntCmp $0 6 0 +4 +4 - StrCpy $0 "ufpr" - Exch $0 - Return - IntCmp $0 7 0 +4 +4 - StrCpy $0 "heanet" - Exch $0 - Return - IntCmp $0 8 0 +4 +4 - StrCpy $0 "puzzle" - Exch $0 - Return - IntCmp $0 9 0 +4 +4 - StrCpy $0 "superb-west" - Exch $0 - Return - IntCmp $0 10 0 +4 +4 - StrCpy $0 "optusnet" - Exch $0 - Return - IntCmp $0 11 0 +4 +4 - StrCpy $0 "surfnet" - Exch $0 - Return - IntCmp $0 12 0 +4 +4 - StrCpy $0 "belnet" - Exch $0 - Return - IntCmp $0 13 0 +4 +4 - StrCpy $0 "kent" - Exch $0 - Return - IntCmp $0 14 0 +4 +4 - StrCpy $0 "nchc" - Exch $0 - Return - StrCpy $0 "umn" - Exch $0 -FunctionEnd - -# To use: -# Push the file name. -# Push the installation location. -# It will install it from the Package Directory if necessary; otherwise it -# will download it to a temp file and install that. -Var DOWNLOADTARGET -Var MANDATORY -Var MD5SUM -Function HandlePackage - Exch $0 # File location - Exch - Exch $1 # File name - Exch - Push $2 - Push $3 - # Check to make sure the file wasn't already installed - IfFileExists "$0\$1" 0 NotThere - md5dll::GetFileMD5 "$0\$1" - Pop $3 - StrCmp $MD5SUM $3 0 NotThere - MessageBox MB_ICONINFORMATION|MB_OK "The package $1 has already been installed." - Goto PackageDone -NotThere: - SetOutPath "$0" - SetOverwrite ifdiff - IfFileExists "$PACKAGEDIR\$1" 0 CheckForZip - md5dll::GetFileMD5 "$PACKAGEDIR\$1" - Pop $3 - StrCmp $MD5SUM $3 PackageOK - MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1 appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone -PackageOK: - CopyFiles "$PACKAGEDIR\$1" "$0\$1" - Goto PackageDone -CheckForZip: - IfFileExists "$PACKAGEDIR\$1.zip" 0 AttemptDownload - md5dll::GetFileMD5 "$PACKAGEDIR\$1.zip" - Pop $3 - StrCmp $MD5SUM $3 ZipPackageOK - MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1.zip appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone -ZipPackageOK: - CopyFiles "$PACKAGEDIR\$1.zip" "$0\$1" - Goto PackageDone -AttemptDownload: - Call RandomServer - Pop $2 - GetTempFileName $DOWNLOADTARGET - Delete $DOWNLOADTARGET - CreateDirectory $DOWNLOADTARGET - NSISdl::download "http://$2.dl.sourceforge.net/sourceforge/sc2/UQM/0.6.0/$1" "$DOWNLOADTARGET\$1" - Pop $2 - StrCmp $2 "success" DownloadSuccessful - StrCmp $2 "cancel" DownloadCanceled - StrCpy $2 "Could not install the package $1 due to the following error: $\"$2$\"." - Goto CheckMandatory -DownloadCanceled: - StrCpy $2 "Download was canceled by user." -CheckMandatory: - IntCmp $MANDATORY 0 NotMandatory - StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." - Goto DisplayError -NotMandatory: - StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." -DisplayError: - MessageBox MB_ICONEXCLAMATION|MB_YESNO "$2 $3 Do you want to retry from a different mirror?" IDYES AttemptDownload - Goto DoneWithTempFile -DownloadSuccessful: - md5dll::GetFileMD5 "$DOWNLOADTARGET\$1" - Pop $3 - StrCmp $MD5SUM $3 DownloadedPackageOK - IntCmp $MANDATORY 0 NotMandatory2 - StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." - Goto DisplayError2 -NotMandatory2: - StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." -DisplayError2: - MessageBox MB_ICONEXCLAMATION|MB_YESNO "The downloaded file $1 doesn't match the internal MD5 sum. This probably means the download was corrupt. $3 Do you want to retry from a different mirror? (Select NO to install the downloaded package anyway - for instance, if you know that the content pack was upgraded or modified since.)" IDYES AttemptDownload -DownloadedPackageOK: - CopyFiles "$DOWNLOADTARGET\$1" "$0\$1" -DoneWithTempFile: - RmDir /r $DOWNLOADTARGET -PackageDone: - Pop $3 - Pop $2 - Pop $1 - Pop $0 -FunctionEnd - -SectionGroup "!UQM" SECGRP01 - Section "Executable" SEC01 - SectionIn 1 2 3 4 5 6 RO - SetOutPath "$INSTDIR" - SetOverwrite try - File "AUTHORS.txt" - File "COPYING.txt" - File "libpng12-0.dll" - File "Manual.txt" - File "ogg.dll" - File "OpenAL32.dll" - File "wrap_oal.dll" - File "README.txt" - File "SDL.dll" - File "SDL_image.dll" - File "SDL_gfx.dll" - File "uqm.exe" - File "keyjam.exe" - File "vorbis.dll" - File "vorbisfile.dll" - File "WhatsNew.txt" - File "zlib1.dll" - SetOverwrite off - SetOutPath $UQMUSERDATA - File "uqm.cfg" - SetOverwrite try - File "uqm-pc.cfg" - File "uqm-3do.cfg" - File "uqm-remix.cfg" - - # Delete old content - Delete "$INSTDIR\content\packages\uqm-0.3-3domusic.zip" - Delete "$INSTDIR\content\packages\uqm-0.3-voice.zip" - Delete "$INSTDIR\content\packages\uqm-0.3-content.zip" - Delete "$INSTDIR\content\packages\uqm-0.4.0-3domusic.uqm" - Delete "$INSTDIR\content\packages\uqm-0.4.0-voice.uqm" - Delete "$INSTDIR\content\packages\uqm-0.4.0-content.uqm" - Delete "$INSTDIR\content\packages\uqm-0.5.0-3domusic.uqm" - Delete "$INSTDIR\content\packages\uqm-0.5.0-voice.uqm" - Delete "$INSTDIR\content\packages\uqm-0.5.0-content.uqm" - Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm" - Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm" - Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm" - # and in a case of manual install and overly helpful browsers - Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm.zip" - Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm.zip" - Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm.zip" - - ; Shortcuts - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - SectionEnd - - Section "Core Data" SEC02 - SectionIn 1 2 3 4 6 - CreateDirectory "$INSTDIR\content\addons" - SetOutPath "$INSTDIR\content" - SetOverwrite ifnewer - AddSize 12261 - StrCpy $MANDATORY 1 - StrCpy $MD5SUM "5c9114112ed84bd372755f881e235f61" - File "content\version" - Push "uqm-0.7.0-content.uqm" - Push "$INSTDIR\content\packages" - Call HandlePackage - - ; Shortcuts - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - SectionEnd - - Section "Desktop Icon" SECICON - SectionIn 1 2 3 4 5 6 - StrCpy $MAKEICON 1 - SectionEnd -SectionGroupEnd - -SectionGroup /e "3DO Content" SECGRP02 - Section "Music" SEC03 - SectionIn 1 4 6 - AddSize 18536 - StrCpy $MANDATORY 0 - StrCpy $MD5SUM "86a5e376d9b76888add1d10818f0ab9f" - Push "uqm-0.7.0-3domusic.uqm" - Push "$INSTDIR\content\addons" - Call HandlePackage - ; Shortcuts - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - SectionEnd - - Section "Voiceovers" SEC04 - SectionIn 1 4 6 - AddSize 112291 - StrCpy $MANDATORY 0 - StrCpy $MD5SUM "320bd2f278ea06c443048b9fa1e40dbf" - Push "uqm-0.7.0-voice.uqm" - Push "$INSTDIR\content\addons" - Call HandlePackage - ; Shortcuts - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - SectionEnd -SectionGroupEnd - -SectionGroup "Modern Remixes" SECGRP03 - Section "Pack 1" SEC05 - SectionIn 6 - AddSize 49012 - StrCpy $MANDATORY 0 - StrCpy $MD5SUM "09f242d8d72166d1d5ccbd3d99c93e7d" - Push "uqm-remix-disc1.uqm" - Push "$INSTDIR\content\addons" - Call HandlePackage - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" - ; Shortcuts - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - SectionEnd - - Section "Pack 2" SEC06 - SectionIn 6 - AddSize 58869 - StrCpy $MANDATORY 0 - StrCpy $MD5SUM "fbc8bdcb709939d559d8c7216ad15cc2" - Push "uqm-remix-disc2.uqm" - Push "$INSTDIR\content\addons" - Call HandlePackage - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" - ; Shortcuts - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - SectionEnd - - Section "Pack 3" SEC07 - SectionIn 6 - AddSize 38989 - StrCpy $MANDATORY 0 - StrCpy $MD5SUM "5ccc6d4ac301ae98e172ac6835dcdead" - Push "uqm-remix-disc3.uqm" - Push "$INSTDIR\content\addons" - Call HandlePackage - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" - ; Shortcuts - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - SectionEnd - -# Section "Pack 4" SEC08 -# SectionIn 6 -# AddSize 50000 # ESTIMATE: Update later -# StrCpy $MANDATORY 0 -# Push "uqm-remix-pack4.zip" -# Push "$INSTDIR\content\addons" -# Call HandlePackage -# ; Shortcuts -# !insertmacro MUI_STARTMENU_WRITE_BEGIN Application -# !insertmacro MUI_STARTMENU_WRITE_END -# SectionEnd -SectionGroupEnd - -Section -ShortcutsAndIcons - SetOutPath $INSTDIR - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" "$INSTDIR\uqm.exe" "-x --safe" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" "$INSTDIR\uqm.exe" "-o --safe" - CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Documentation" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" "$INSTDIR\AUTHORS.txt" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" "$INSTDIR\COPYING.txt" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" "$INSTDIR\Manual.txt" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" "$INSTDIR\README.txt" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" "$INSTDIR\WhatsNew.txt" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" "$INSTDIR\keyjam.exe" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" "$UQMUSERDATA\save" - IntCmp $MAKEICON 1 0 NoIcon NoIcon - CreateShortCut "$DESKTOP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS -NoIcon: - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe" - !insertmacro MUI_STARTMENU_WRITE_END -SectionEnd - -Section -Set3DOConfig - SectionIn 4 - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-3do.cfg" "$UQMUSERDATA\uqm.cfg" - !insertmacro MUI_STARTMENU_WRITE_END -SectionEnd - -Section -SetPCConfig - SectionIn 3 - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - SetOutPath $UQMUSERDATA - Delete "uqm.cfg" - CopyFiles "$UQMUSERDATA\uqm-pc.cfg" "$UQMUSERDATA\uqm.cfg" - !insertmacro MUI_STARTMENU_WRITE_END -SectionEnd - -Section -SetRemixConfig - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END -SectionEnd - -Section -Post - WriteUninstaller "$INSTDIR\uninst.exe" - WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\uqm.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\uqm.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" -SectionEnd - -; Section descriptions -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP01} "The core executables and content libraries for The Ur-Quan Masters. All elements in this section must be installed for the game to be playable." - !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Includes the main program, all subsidiary libraries, and basic documentation for The Ur-Quan Masters. Required for play." - !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Graphics, sound, and the PC-edition music for The Ur-Quan Masters. Required for play. If this package is selected and not present in the packages directory, the installer will attempt to download it." - !insertmacro MUI_DESCRIPTION_TEXT ${SECICON} "Adds a desktop icon linking directly to The Ur-Quan Masters." - !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP02} "Optional content packages containing music and sound unique to the 1993 3DO release." - !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Optional package which includes the remixed songs from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." - !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Optional package containing the voiceovers from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." - !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP03} "Optional content packages containing the official UQM remixes by The Precursors. Selecting any element from this group will also enable the 'remix' addon by default in the starting configuration." - !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} `Ur-Quan Masters Remix Pack 1 - 'Super Melee!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` - !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} `Ur-Quan Masters Remix Pack 2 - 'Neutral Aliens - Don't Shoot!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` - !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} `Ur-Quan Masters Remix Pack 3 - 'The Ur-Quan Hierarchy.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` -# !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} `Ur-Quan Masters Remix Pack 4 - 'The New Alliance of Free Stars.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` -!insertmacro MUI_FUNCTION_DESCRIPTION_END - - -Function un.onUninstSuccess - HideWindow - MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." -FunctionEnd - -Function un.onInit - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 - Abort -FunctionEnd - -Section Uninstall - !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP - Delete "$INSTDIR\uninst.exe" - Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack4.zip" - Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack3.zip" - Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack2.zip" - Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack1.zip" - Delete "$INSTDIR\content\addons\uqm-remix-disc4.uqm" - Delete "$INSTDIR\content\addons\uqm-remix-disc3.uqm" - Delete "$INSTDIR\content\addons\uqm-remix-disc2.uqm" - Delete "$INSTDIR\content\addons\uqm-remix-disc1.uqm" - Delete "$INSTDIR\content\addons\uqm-0.7.0-voice.uqm" - Delete "$INSTDIR\content\addons\uqm-0.7.0-3domusic.uqm" - Delete "$INSTDIR\content\packages\uqm-0.7.0-content.uqm" - Delete "$INSTDIR\content\version" - Delete "$INSTDIR\zlib.dll" - Delete "$INSTDIR\zlib1.dll" - Delete "$INSTDIR\WhatsNew.txt" - Delete "$INSTDIR\vorbisfile.dll" - Delete "$INSTDIR\vorbis.dll" - Delete "$INSTDIR\uqm.exe" - Delete "$INSTDIR\keyjam.exe" - Delete "$INSTDIR\SDL_gfx.dll" - Delete "$INSTDIR\SDL_image.dll" - Delete "$INSTDIR\SDL.dll" - Delete "$INSTDIR\README.txt" - Delete "$INSTDIR\wrap_oal.dll" - Delete "$INSTDIR\OpenAL32.dll" - Delete "$INSTDIR\ogg.dll" - Delete "$INSTDIR\Manual.txt" - Delete "$INSTDIR\libpng13.dll" - Delete "$INSTDIR\libpng12.dll" - Delete "$INSTDIR\libpng12-0.dll" - Delete "$INSTDIR\COPYING.txt" - Delete "$INSTDIR\AUTHORS.txt" - Delete "$INSTDIR\stderr.txt" - - Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Options Configuration.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Key Configuration.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" - Delete "$DESKTOP\The Ur-Quan Masters.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" - Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" - - RMDir "$SMPROGRAMS\$ICONS_GROUP\Documentation" - RMDir "$SMPROGRAMS\$ICONS_GROUP" - RMDir "$INSTDIR\content\addons" - RMDir "$INSTDIR\content\packages\addons\remix" - RMDir "$INSTDIR\content\packages\addons" - RMDir "$INSTDIR\content\packages" - RMDir "$INSTDIR\content" - RMDir "$INSTDIR" - - DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" - DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" - SetAutoClose true -SectionEnd +; Script generated by the HM NIS Edit Script Wizard. + +Var PACKAGEDIR +Var UQMARGS +Var MAKEICON +Var UQMUSERDATA + +; HM NIS Edit Wizard helper defines +!define PRODUCT_NAME "The Ur-Quan Masters" +!define PRODUCT_VERSION "0.7.0" +!define PRODUCT_WEB_SITE "http://sc2.sourceforge.net" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\uqm.exe" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" +!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" + +; UQM Package definitions +!include "packages.nsh" + +; MUI 1.67 compatible ------ +!include "MUI.nsh" + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" +!define MUI_WELCOMEFINISHPAGE_BITMAP "orzshofixti.bmp" +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "ultron.bmp" +!define MUI_HEADERIMAGE_RIGHT + +; UAC support +RequestExecutionLevel admin + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +!define MUI_LICENSEPAGE_BUTTON "Install" +!define MUI_LICENSEPAGE_TEXT_BOTTOM "Press the Install button to continue." +!insertmacro MUI_PAGE_LICENSE "COPYING.txt" +; Components page +!define MUI_COMPONENTSPAGE_TEXT_COMPLIST "You can preconfigure the options to mimic the original platforms by selecting those install types. Note that more complete installs will need to download more packages." +!insertmacro MUI_PAGE_COMPONENTS +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +; Package Dictory +!define MUI_PAGE_HEADER_TEXT "Choose Package Location" +!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder that holds packages that have already been downloaded." +!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will look for already-downloaded content packages in the following folder. To copy them from a different folder, click Browse and select another folder. If you are doing a net install, leave this field alone. Click Next to continue." +!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Source Folder" +!define MUI_DIRECTORYPAGE_VARIABLE $PACKAGEDIR +!define MUI_DIRECTORYPAGE_VERIFYONLEAVE +!insertmacro MUI_PAGE_DIRECTORY +; Start menu page +var ICONS_GROUP +!define MUI_STARTMENUPAGE_NODISABLE +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Games\The Ur-Quan Masters" +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" +!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!define MUI_FINISHPAGE_RUN_NOTCHECKED +!define MUI_FINISHPAGE_NOREBOOTSUPPORT +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" +!define MUI_FINISHPAGE_RUN "$INSTDIR\uqm.exe" +!define MUI_FINISHPAGE_RUN_PARAMETERS $UQMARGS +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!define MUI_UNCONFIRMPAGE_TEXT_TOP "This program will now uninstall The Ur-Quan Masters entirely. If you wish to preserve content or expansion packs, select Cancel now and back them up. Otherwise, press Uninstall to continue." +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" + +; MUI end ------ + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "uqm-${PRODUCT_VERSION}-installer.exe" +InstallDir "$PROGRAMFILES\The Ur-Quan Masters\" +InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails show +ShowUnInstDetails show +AllowRootDirInstall true +DirText "" "" "" "Please select a folder." +InstType "Typical" +InstType "Minimal" +InstType "Mimic PC" +InstType "Mimic 3DO" +InstType "No Content" +InstType "All Expansions" + +Function .onInit + Push $0 + StrCpy $PACKAGEDIR $EXEDIR + StrCpy $UQMARGS "" + StrCpy $MAKEICON 0 + ReadEnvStr $0 APPDATA + StrCmp $0 "" NoAppData + ExpandEnvStrings $UQMUSERDATA "%APPDATA%\uqm" + Goto GotAppData +NoAppData: + ReadEnvStr $0 USERPROFILE + StrCmp $0 "" NoProfile + ExpandEnvStrings $UQMUSERDATA "%USERPROFILE%\Application Data\uqm" + Goto GotAppData +NoProfile: + StrCpy $UQMUSERDATA "$INSTDIR\userdata\uqm" +GotAppData: +FunctionEnd + +Function Random + Exch $0 + Push $1 + System::Call 'kernel32::QueryPerformanceCounter(*l.r1)' + System::Int64Op $1 % $0 + Pop $0 + Pop $1 + Exch $0 +FunctionEnd + +Function RandomServer + Push $0 + Push 15 + Call Random + Pop $0 + IntCmp $0 0 0 +4 +4 + StrCpy $0 "ovh" + Exch $0 + Return + IntCmp $0 1 0 +4 +4 + StrCpy $0 "mesh" + Exch $0 + Return + IntCmp $0 2 0 +4 +4 + StrCpy $0 "easynews" + Exch $0 + Return + IntCmp $0 3 0 +4 +4 + StrCpy $0 "switch" + Exch $0 + Return + IntCmp $0 4 0 +4 +4 + StrCpy $0 "superb-east" + Exch $0 + Return + IntCmp $0 5 0 +4 +4 + StrCpy $0 "jaist" + Exch $0 + Return + IntCmp $0 6 0 +4 +4 + StrCpy $0 "ufpr" + Exch $0 + Return + IntCmp $0 7 0 +4 +4 + StrCpy $0 "heanet" + Exch $0 + Return + IntCmp $0 8 0 +4 +4 + StrCpy $0 "puzzle" + Exch $0 + Return + IntCmp $0 9 0 +4 +4 + StrCpy $0 "superb-west" + Exch $0 + Return + IntCmp $0 10 0 +4 +4 + StrCpy $0 "optusnet" + Exch $0 + Return + IntCmp $0 11 0 +4 +4 + StrCpy $0 "surfnet" + Exch $0 + Return + IntCmp $0 12 0 +4 +4 + StrCpy $0 "belnet" + Exch $0 + Return + IntCmp $0 13 0 +4 +4 + StrCpy $0 "kent" + Exch $0 + Return + IntCmp $0 14 0 +4 +4 + StrCpy $0 "nchc" + Exch $0 + Return + StrCpy $0 "umn" + Exch $0 +FunctionEnd + +# To use: +# Push the file name. +# Push the installation location. +# It will install it from the Package Directory if necessary; otherwise it +# will download it to a temp file and install that. +Var DOWNLOADTARGET +Var MANDATORY +Var MD5SUM +Function HandlePackage + Exch $0 # File location + Exch + Exch $1 # File name + Exch + Push $2 + Push $3 + # Check to make sure the file wasn't already installed + IfFileExists "$0\$1" 0 NotThere + md5dll::GetFileMD5 "$0\$1" + Pop $3 + StrCmp $MD5SUM $3 0 NotThere + MessageBox MB_ICONINFORMATION|MB_OK "The package $1 has already been installed." + Goto PackageDone +NotThere: + SetOutPath "$0" + SetOverwrite ifdiff + IfFileExists "$PACKAGEDIR\$1" 0 CheckForZip + md5dll::GetFileMD5 "$PACKAGEDIR\$1" + Pop $3 + StrCmp $MD5SUM $3 PackageOK + MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1 appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone +PackageOK: + CopyFiles "$PACKAGEDIR\$1" "$0\$1" + Goto PackageDone +CheckForZip: + IfFileExists "$PACKAGEDIR\$1.zip" 0 AttemptDownload + md5dll::GetFileMD5 "$PACKAGEDIR\$1.zip" + Pop $3 + StrCmp $MD5SUM $3 ZipPackageOK + MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1.zip appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone +ZipPackageOK: + CopyFiles "$PACKAGEDIR\$1.zip" "$0\$1" + Goto PackageDone +AttemptDownload: + Call RandomServer + Pop $2 + GetTempFileName $DOWNLOADTARGET + Delete $DOWNLOADTARGET + CreateDirectory $DOWNLOADTARGET + NSISdl::download "http://$2.dl.sourceforge.net/sourceforge/sc2/UQM/0.6.0/$1" "$DOWNLOADTARGET\$1" + Pop $2 + StrCmp $2 "success" DownloadSuccessful + StrCmp $2 "cancel" DownloadCanceled + StrCpy $2 "Could not install the package $1 due to the following error: $\"$2$\"." + Goto CheckMandatory +DownloadCanceled: + StrCpy $2 "Download was canceled by user." +CheckMandatory: + IntCmp $MANDATORY 0 NotMandatory + StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." + Goto DisplayError +NotMandatory: + StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." +DisplayError: + MessageBox MB_ICONEXCLAMATION|MB_YESNO "$2 $3 Do you want to retry from a different mirror?" IDYES AttemptDownload + Goto DoneWithTempFile +DownloadSuccessful: + md5dll::GetFileMD5 "$DOWNLOADTARGET\$1" + Pop $3 + StrCmp $MD5SUM $3 DownloadedPackageOK + IntCmp $MANDATORY 0 NotMandatory2 + StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." + Goto DisplayError2 +NotMandatory2: + StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." +DisplayError2: + MessageBox MB_ICONEXCLAMATION|MB_YESNO "The downloaded file $1 doesn't match the internal MD5 sum. This probably means the download was corrupt. $3 Do you want to retry from a different mirror? (Select NO to install the downloaded package anyway - for instance, if you know that the content pack was upgraded or modified since.)" IDYES AttemptDownload +DownloadedPackageOK: + CopyFiles "$DOWNLOADTARGET\$1" "$0\$1" +DoneWithTempFile: + RmDir /r $DOWNLOADTARGET +PackageDone: + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +SectionGroup "!UQM" SECGRP01 + Section "Executable" SEC01 + SectionIn 1 2 3 4 5 6 RO + SetOutPath "$INSTDIR" + SetOverwrite try + File "AUTHORS.txt" + File "COPYING.txt" + File "libpng12-0.dll" + File "Manual.txt" + File "ogg.dll" + File "OpenAL32.dll" + File "wrap_oal.dll" + File "README.txt" + File "SDL.dll" + File "SDL_image.dll" + File "SDL_gfx.dll" + File "uqm.exe" + File "keyjam.exe" + File "vorbis.dll" + File "vorbisfile.dll" + File "WhatsNew.txt" + File "zlib1.dll" + SetOverwrite off + SetOutPath $UQMUSERDATA + File "uqm.cfg" + SetOverwrite try + File "uqm-pc.cfg" + File "uqm-3do.cfg" + File "uqm-remix.cfg" + + # Delete old content + Delete "$INSTDIR\content\packages\uqm-0.3-3domusic.zip" + Delete "$INSTDIR\content\packages\uqm-0.3-voice.zip" + Delete "$INSTDIR\content\packages\uqm-0.3-content.zip" + Delete "$INSTDIR\content\packages\uqm-0.4.0-3domusic.uqm" + Delete "$INSTDIR\content\packages\uqm-0.4.0-voice.uqm" + Delete "$INSTDIR\content\packages\uqm-0.4.0-content.uqm" + Delete "$INSTDIR\content\packages\uqm-0.5.0-3domusic.uqm" + Delete "$INSTDIR\content\packages\uqm-0.5.0-voice.uqm" + Delete "$INSTDIR\content\packages\uqm-0.5.0-content.uqm" + Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm" + Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm" + Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm" + # and in a case of manual install and overly helpful browsers + Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm.zip" + Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm.zip" + Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm.zip" + + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Core Data" SEC02 + SectionIn 1 2 3 4 6 + CreateDirectory "$INSTDIR\content\addons" + SetOutPath "$INSTDIR\content" + SetOverwrite ifnewer + AddSize ${PKG_CONTENT_SIZE} + StrCpy $MANDATORY 1 + StrCpy $MD5SUM "${PKG_CONTENT_MD5SUM}" + File "content\version" + Push "${PKG_CONTENT_FILE}" + Push "$INSTDIR\content\packages" + Call HandlePackage + + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Desktop Icon" SECICON + SectionIn 1 2 3 4 5 6 + StrCpy $MAKEICON 1 + SectionEnd +SectionGroupEnd + +SectionGroup /e "3DO Content" SECGRP02 + Section "Music" SEC03 + SectionIn 1 4 6 + AddSize ${PKG_3DOMUSIC_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_3DOMUSIC_MD5SUM}" + Push "${PKG_3DOMUSIC_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Voiceovers" SEC04 + SectionIn 1 4 6 + AddSize ${PKG_VOICE_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_VOICE_MD5SUM}" + Push "${PKG_VOICE_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd +SectionGroupEnd + +SectionGroup "Modern Remixes" SECGRP03 + Section "Pack 1" SEC05 + SectionIn 6 + AddSize ${PKG_REMIX1_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_REMIX1_MD5SUM}" + Push "${PKG_REMIX1_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + SetOutPath $UQMUSERDATA + Delete "uqm.cfg" + CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Pack 2" SEC06 + SectionIn 6 + AddSize ${PKG_REMIX2_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_REMIX2_MD5SUM}" + Push "${PKG_REMIX2_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + SetOutPath $UQMUSERDATA + Delete "uqm.cfg" + CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Pack 3" SEC07 + SectionIn 6 + AddSize ${PKG_REMIX3_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_REMIX3_MD5SUM}" + Push "${PKG_REMIX3_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + SetOutPath $UQMUSERDATA + Delete "uqm.cfg" + CopyFiles "$UQMUSERDATA\uqm-remix.cfg" "$UQMUSERDATA\uqm.cfg" + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + +# Section "Pack 4" SEC08 +# SectionIn 6 +# AddSize ${PKG_REMIX4_SIZE} +# StrCpy $MANDATORY 0 +# StrCpy $MD5SUM "${PKG_REMIX4_MD5SUM}" +# Push "${PKG_REMIX4_FILE}" +# Push "$INSTDIR\content\addons" +# Call HandlePackage +# ; Shortcuts +# !insertmacro MUI_STARTMENU_WRITE_BEGIN Application +# !insertmacro MUI_STARTMENU_WRITE_END +# SectionEnd +SectionGroupEnd + +Section -ShortcutsAndIcons + SetOutPath $INSTDIR + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" "$INSTDIR\uqm.exe" "-x --safe" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" "$INSTDIR\uqm.exe" "-o --safe" + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Documentation" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" "$INSTDIR\AUTHORS.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" "$INSTDIR\COPYING.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" "$INSTDIR\Manual.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" "$INSTDIR\README.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" "$INSTDIR\WhatsNew.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" "$INSTDIR\keyjam.exe" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" "$UQMUSERDATA\save" + IntCmp $MAKEICON 1 0 NoIcon NoIcon + CreateShortCut "$DESKTOP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS +NoIcon: + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -Set3DOConfig + SectionIn 4 + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + SetOutPath $UQMUSERDATA + Delete "uqm.cfg" + CopyFiles "$UQMUSERDATA\uqm-3do.cfg" "$UQMUSERDATA\uqm.cfg" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -SetPCConfig + SectionIn 3 + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + SetOutPath $UQMUSERDATA + Delete "uqm.cfg" + CopyFiles "$UQMUSERDATA\uqm-pc.cfg" "$UQMUSERDATA\uqm.cfg" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -SetRemixConfig + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\uqm.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\uqm.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" +SectionEnd + +; Section descriptions +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP01} "The core executables and content libraries for The Ur-Quan Masters. All elements in this section must be installed for the game to be playable." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Includes the main program, all subsidiary libraries, and basic documentation for The Ur-Quan Masters. Required for play." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Graphics, sound, and the PC-edition music for The Ur-Quan Masters. Required for play. If this package is selected and not present in the packages directory, the installer will attempt to download it." + !insertmacro MUI_DESCRIPTION_TEXT ${SECICON} "Adds a desktop icon linking directly to The Ur-Quan Masters." + !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP02} "Optional content packages containing music and sound unique to the 1993 3DO release." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Optional package which includes the remixed songs from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Optional package containing the voiceovers from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." + !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP03} "Optional content packages containing the official UQM remixes by The Precursors. Selecting any element from this group will also enable the 'remix' addon by default in the starting configuration." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} `Ur-Quan Masters Remix Pack 1 - 'Super Melee!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` + !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} `Ur-Quan Masters Remix Pack 2 - 'Neutral Aliens - Don't Shoot!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` + !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} `Ur-Quan Masters Remix Pack 3 - 'The Ur-Quan Hierarchy.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` +# !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} `Ur-Quan Masters Remix Pack 4 - 'The New Alliance of Free Stars.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` +!insertmacro MUI_FUNCTION_DESCRIPTION_END + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP + Delete "$INSTDIR\uninst.exe" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack4.zip" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack3.zip" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack2.zip" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack1.zip" + Delete "$INSTDIR\content\addons\uqm-remix-disc4.uqm" + Delete "$INSTDIR\content\addons\uqm-remix-disc3.uqm" + Delete "$INSTDIR\content\addons\uqm-remix-disc2.uqm" + Delete "$INSTDIR\content\addons\uqm-remix-disc1.uqm" + Delete "$INSTDIR\content\addons\${PKG_VOICE_FILE}" + Delete "$INSTDIR\content\addons\${PKG_3DOMUSIC_FILE}" + Delete "$INSTDIR\content\packages\${PKG_CONTENT_FILE}" + Delete "$INSTDIR\content\version" + Delete "$INSTDIR\zlib.dll" + Delete "$INSTDIR\zlib1.dll" + Delete "$INSTDIR\WhatsNew.txt" + Delete "$INSTDIR\vorbisfile.dll" + Delete "$INSTDIR\vorbis.dll" + Delete "$INSTDIR\uqm.exe" + Delete "$INSTDIR\keyjam.exe" + Delete "$INSTDIR\SDL_gfx.dll" + Delete "$INSTDIR\SDL_image.dll" + Delete "$INSTDIR\SDL.dll" + Delete "$INSTDIR\README.txt" + Delete "$INSTDIR\wrap_oal.dll" + Delete "$INSTDIR\OpenAL32.dll" + Delete "$INSTDIR\ogg.dll" + Delete "$INSTDIR\Manual.txt" + Delete "$INSTDIR\libpng13.dll" + Delete "$INSTDIR\libpng12.dll" + Delete "$INSTDIR\libpng12-0.dll" + Delete "$INSTDIR\COPYING.txt" + Delete "$INSTDIR\AUTHORS.txt" + Delete "$INSTDIR\stderr.txt" + + Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Options Configuration.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Key Configuration.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" + Delete "$DESKTOP\The Ur-Quan Masters.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" + + RMDir "$SMPROGRAMS\$ICONS_GROUP\Documentation" + RMDir "$SMPROGRAMS\$ICONS_GROUP" + RMDir "$INSTDIR\content\addons" + RMDir "$INSTDIR\content\packages\addons\remix" + RMDir "$INSTDIR\content\packages\addons" + RMDir "$INSTDIR\content\packages" + RMDir "$INSTDIR\content" + RMDir "$INSTDIR" + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" + SetAutoClose true +SectionEnd Property changes on: trunk/sc2/build/win32_install/uqm-installer.nsi ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-22 17:49:01
|
Revision: 3619 http://sc2.svn.sourceforge.net/sc2/?rev=3619&view=rev Author: avolkov Date: 2011-05-22 17:48:55 +0000 (Sun, 22 May 2011) Log Message: ----------- Add the missing OpenAL piece to the install; delete old packages with .zip names upon install Modified Paths: -------------- trunk/sc2/build/win32_install/uqm-installer.nsi Modified: trunk/sc2/build/win32_install/uqm-installer.nsi =================================================================== --- trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-21 17:26:51 UTC (rev 3618) +++ trunk/sc2/build/win32_install/uqm-installer.nsi 2011-05-22 17:48:55 UTC (rev 3619) @@ -287,6 +287,7 @@ File "Manual.txt" File "ogg.dll" File "OpenAL32.dll" + File "wrap_oal.dll" File "README.txt" File "SDL.dll" File "SDL_image.dll" @@ -318,6 +319,10 @@ Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm" Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm" Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm" + # and in a case of manual install and overly helpful browsers + Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm.zip" + Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm.zip" + Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm.zip" ; Shortcuts !insertmacro MUI_STARTMENU_WRITE_BEGIN Application @@ -546,6 +551,7 @@ Delete "$INSTDIR\SDL_image.dll" Delete "$INSTDIR\SDL.dll" Delete "$INSTDIR\README.txt" + Delete "$INSTDIR\wrap_oal.dll" Delete "$INSTDIR\OpenAL32.dll" Delete "$INSTDIR\ogg.dll" Delete "$INSTDIR\Manual.txt" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-21 17:26:59
|
Revision: 3618 http://sc2.svn.sourceforge.net/sc2/?rev=3618&view=rev Author: avolkov Date: 2011-05-21 17:26:51 +0000 (Sat, 21 May 2011) Log Message: ----------- Updated WhatsNew for 0.7.0-rc2 Modified Paths: -------------- trunk/sc2/WhatsNew Modified: trunk/sc2/WhatsNew =================================================================== --- trunk/sc2/WhatsNew 2011-05-18 22:01:31 UTC (rev 3617) +++ trunk/sc2/WhatsNew 2011-05-21 17:26:51 UTC (rev 3618) @@ -17,6 +17,9 @@ NEW FEATURES +- Added spoken Slylandro probe coordinates +- Added the missing bits to the no-voice versions of Mycon, Syreen and + Utwig dialogue - Remixes are now selectable from the setup menu - "Safe mode", which will ignore settings. Useful if you've somehow wrecked your configuration files. @@ -33,6 +36,9 @@ - Support for 3do "ship spin" videos BALANCE/GAME FLOW CHANGES +- Cannot talk to Ilwrath with a 'caster anymore after they die off +- New lander reports for Supox ruins and Ultron. The reports text + is new content from TFB. - Do not match singular stars when given a prefix in star search - Properly account for simultaneous destruction in SuperMelee. - Druuge no longer turn hostile after attempting a salvage This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-18 22:01:37
|
Revision: 3617 http://sc2.svn.sourceforge.net/sc2/?rev=3617&view=rev Author: avolkov Date: 2011-05-18 22:01:31 +0000 (Wed, 18 May 2011) Log Message: ----------- v0.7.0 Release Candidate 2 Modified Paths: -------------- trunk/sc2/src/uqmversion.h Modified: trunk/sc2/src/uqmversion.h =================================================================== --- trunk/sc2/src/uqmversion.h 2011-05-17 21:48:59 UTC (rev 3616) +++ trunk/sc2/src/uqmversion.h 2011-05-18 22:01:31 UTC (rev 3617) @@ -23,7 +23,7 @@ #define UQM_MINOR_VERSION_S "7" #define UQM_PATCH_VERSION 0 #define UQM_PATCH_VERSION_S "0" -#define UQM_EXTRA_VERSION "-rc1" +#define UQM_EXTRA_VERSION "-rc2" /* The final version is interpreted as: * printf ("%d.%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, * UQM_PATCH_VERSION, UQM_EXTRA_VERSION); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-17 21:49:09
|
Revision: 3616 http://sc2.svn.sourceforge.net/sc2/?rev=3616&view=rev Author: avolkov Date: 2011-05-17 21:48:59 +0000 (Tue, 17 May 2011) Log Message: ----------- Updated documentation for 0.7 release Modified Paths: -------------- trunk/sc2/Contributing trunk/sc2/INSTALL trunk/sc2/INSTALL.macosx trunk/sc2/INSTALL.mingw trunk/sc2/INSTALL.msvc trunk/sc2/README trunk/sc2/build/unix_installer/USAGE trunk/sc2/build/unix_installer/template trunk/sc2/doc/devel/checklist trunk/sc2/doc/devel/versions trunk/sc2/doc/users/unixinstall Modified: trunk/sc2/Contributing =================================================================== --- trunk/sc2/Contributing 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/Contributing 2011-05-17 21:48:59 UTC (rev 3616) @@ -115,7 +115,6 @@ - General issues Michael Martin (mcmartin at stanford.edu), McMartin at #sc2 - Threading - - Alien communications code - Graphics - Input system - In-game configuration @@ -123,6 +122,7 @@ Alex Volkov (codepro at usa.net), fOSSiL at #sc2 - Graphics - Sound (particularly MixSDL) + - Alien communications code - General issues - Only submit code that can be used under the GPL. By submitting code you hold the copyright to, you agree that it can be used under the term of Modified: trunk/sc2/INSTALL =================================================================== --- trunk/sc2/INSTALL 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/INSTALL 2011-05-17 21:48:59 UTC (rev 3616) @@ -10,7 +10,7 @@ Debian package: make For Windows: -Microsoft Visual C++ 6 or 7 (or MinGW+MSYS, see INSTALL.mingw for that) +Microsoft Visual C++ 6 or newer (or MinGW+MSYS, see INSTALL.mingw for that) Visual C++ 6.0 Processor Pack (if using VC6, to build MMX-accelerated code) http://msdn.microsoft.com/vstudio/downloads/tools/ppack/ @@ -21,7 +21,7 @@ http://developer.apple.com/tools/macosxtools.html Additionally, The Ur-Quan Masters requires the following libraries: -Note that dependancies can differ between different OS's. +Note that dependencies can differ between different OS's. OpenGL v1.2 (if HAVE_OPENGL is defined, which is the default) Win32 users should have all by default, following is for Linux version: @@ -45,12 +45,12 @@ Download: http://www.libsdl.org/projects/SDL_image/release/ Debian packages: libsdl-image1.2 libsdl-image1.2-dev -OpenAL (Win32 only) +OpenAL (optional) A cross-platform spatialized audio library. Homepage: http://www.openal.org/ - SDK download: http://developer.creative.com/articles/article.asp?aid=45&file=OpenAL11CoreSDK.exe + Windows SDK download: http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip -libogg and libvorbis +libogg and libvorbis (optional but highly recommended) Audio codec to play Ogg Vorbis files, used for music and speech. Homepage: http://www.xiph.org/ogg/vorbis/index.html Download: @@ -68,10 +68,10 @@ Homepage: http://www.xiph.org/vorbis/ Download: http://svn.xiph.org/trunk/Tremor (Subversion) -Libmikmod - Audio codec to play .mof files, used for the original PC music. +Libmikmod (also included with UQM source) + Audio codec to play .mod files, used for the original PC music. Homepage: http://mikmod.raphnet.net/ - Download: http://sourceforge.net/project/showfiles.php?group_id=40531 + Download: https://sourceforge.net/projects/mikmod/files/ Zlib v1.2 Data compression / decompression library Modified: trunk/sc2/INSTALL.macosx =================================================================== --- trunk/sc2/INSTALL.macosx 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/INSTALL.macosx 2011-05-17 21:48:59 UTC (rev 3616) @@ -7,6 +7,9 @@ Only the Runtime is truly necessary, but the devel extras are nice. SDL_image: http://www.libsdl.org/projects/SDL_image/ +The last version of stock framework that can be used is v1.2.7. +Starting with v1.2.8, the stock framework uses ImageIO by default +to load PNG files, which strips out the PNG palettes. Ogg Vorbis: http://www.xiph.org/downloads/ Theoretically optional, but necessary if you're using the 3DO music Modified: trunk/sc2/INSTALL.mingw =================================================================== --- trunk/sc2/INSTALL.mingw 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/INSTALL.mingw 2011-05-17 21:48:59 UTC (rev 3616) @@ -4,18 +4,18 @@ First, download and install the latest version of MinGW and then MSYS. (You can get them from <http://www.mingw.org/>). -You'll need all the libraries described in the INSTALL file in CVS. +You'll need all the libraries described in the INSTALL file in SVN. You should get the 'mingw' development build for SDL, and follow the instructions to install it into mingw. All others will be either for win32 or VC. These are the files you need to download: -http://www.libsdl.org/release/SDL-devel-1.2.8-mingw32.tar.gz -http://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.4-VC6.zip -ftp://opensource.creative.com/pub/sdk/OpenALSDK.zip -http://www.vorbis.com/files/1.0/windows/OggVorbis-win32sdk-1.0.zip -http://www.gzip.org/zlib/zlib122-dll.zip +http://www.libsdl.org/release/SDL-devel-1.2.14-mingw32.zip +http://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.10-VC.zip +http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip (optional) +http://www.vorbis.com/files/1.0.1/windows/OggVorbis-win32sdk-1.0.1.zip +http://www.gzip.org/zlib/zlib125-dll.zip You can now do either of the following: @@ -28,8 +28,8 @@ respective include and library dirs where you installed them. i.e. something like: - export C_INCLUDE_PATH=/mingw/include/SDL:/c/VClibs/SDL_image-1.2.4/include/:/c/VClibs/OpenAL\ 1.0\ SDK/Include/:/c/VClibs/oggvorbis-win32sdk-1.0/include/:c/VClibs/zlib/include/ - export LIBRARY_PATH=/c/VClibs/SDL_image-1.2.4/lib/:/c/VClibs/OpenAL\ 1.0\ SDK/libs/:/c/VClibs/oggvorbis-win32sdk-1.0/lib/:c/VClibs/zlib/lib/ + export C_INCLUDE_PATH=/mingw/include/SDL:/c/VClibs/SDL_image-1.2.10/include/:/c/VClibs/OpenAL\ 1.1\ SDK/Include/:/c/VClibs/oggvorbis-win32sdk-1.0.1/include/:c/VClibs/zlib/include/ + export LIBRARY_PATH=/c/VClibs/SDL_image-1.2.10/lib/:/c/VClibs/OpenAL\ 1.1\ SDK/libs/:/c/VClibs/oggvorbis-win32sdk-1.0.1/lib/:c/VClibs/zlib/lib/ NOTE: If you use the 2nd method above, you need to include the path to SDL in C_INCLUDE_PATH (but not in LIBRARY_PATH) @@ -38,6 +38,12 @@ this file, download <http://sc2.sourceforge.net/misc/_G_config.h> and put it to \[MinGW]\include. +If you want to build with OpenAL support, you need to modify the OpenAL SDK +installation somewhat: +- Create a directory "AL" in "C:\VClibs\OpenAL 1.1 SDK\include" +- Copy all the .h files from "C:\VClibs\OpenAL 1.1 SDK\include" + into the newly created "AL" directory. + Now you're ready to build. Start up MSYS (the installer put an icon in your Start Menu and on the desktop). Modified: trunk/sc2/INSTALL.msvc =================================================================== --- trunk/sc2/INSTALL.msvc 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/INSTALL.msvc 2011-05-17 21:48:59 UTC (rev 3616) @@ -10,14 +10,16 @@ 1. Install the Microsoft development environment -1.1. Install Microsoft Visual C++ 2005 Express Edition: -- Download the installer from http://msdn.microsoft.com/vstudio/express/visualc/ +1.1. Install Microsoft Visual C++ 2008 Express Edition: +- Download the installer from + http://www.microsoft.com/downloads/details.aspx?familyid=94de806b-e1a1-4282-abc5-1f7347782553 - Run the installer, and follow the instructions. There's no need to register your copy of MSVC++ to use it for compiling UQM. 1.2. Install the Microsoft Windows Platform SDK: - Download the installer from http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB + or a newer version of the SDK - Run the installer, and follow the instructions. @@ -28,7 +30,7 @@ - Download the installer from http://tortoisesvn.net/downloads - Run the installer, and follow the instructions -2.2. Install WinZip, which we use to extract the compressed .zip files. +2.2. Install WinZip, if you cannot open .zip files natively: - Download WinZip from http://www.winzip.com/downwzeval.htm - Run the installer, and follow the instructions @@ -42,26 +44,26 @@ 3.2 Install the SDL SDK: - Download SDL-devel-1.2.14-VC6.zip from http://www.libsdl.org/download-1.2.php -- Use WinZip to Extract the .zip file in "C:\Build" +- Unzip ("Extract" in WinZip) the file in "C:\Build" A folder "SDL-1.2.14" will be created. 3.3 Install the SDL_image SDK: - Download SDL_image-devel-1.2.10-VC.zip from http://www.libsdl.org/projects/SDL_image/ -- Use WinZip to Extract the .zip file in "C:\Build" +- Unzip ("Extract" in WinZip) the file in "C:\Build" A folder "SDL_image-1.2.10" will be created. 3.4 Install the Ogg Vorbis SDK - Download http://www.vorbis.com/files/1.0.1/windows/OggVorbis-win32sdk-1.0.1.zip -- Use WinZip to Extract the .zip file in "C:\Build" +- Unzip ("Extract" in WinZip) the file in "C:\Build" A folder "oggvorbis-win32sdk-1.0.1" will be created. 3.5 Install zlib: - Download zlib123-dll.zip ("zlib compiled DLL") from http://www.gzip.org/zlib/ -- Create a folder "zlib-1.2.3" in "C:\Build\" -- Extract "zlib123-dll.zip" in C:\Build\zlib-1.2.3\" +- Create a folder "zlib-1.2.5" in "C:\Build\" +- Unzip "zlib125-dll.zip" in C:\Build\zlib-1.2.5\" 3.6 Install OpenAL - Download http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip @@ -106,8 +108,7 @@ 5.1. Import the VC6 .dsp file: - Open C:\Build\sc2\build\msvc6\ and double-click on "UrQuanMasters.dsp". - Visual C++ 2005 Express Edition will start. Confirm when it asks to - convert the VC6 .dsp file. + Visual C++ will start. Confirm when it asks to convert the VC6 .dsp file. 5.2. Setup the additional include locations for the project: - Still in MSVC++, right click on 'UrQuanMasters' in the Solution Explorer, @@ -123,7 +124,7 @@ - "C:\Build\SDL_image-1.2.10\include" - "C:\Build\oggvorbis-win32sdk-1.0.1\include" - "C:\Program Files\OpenAL 1.1 SDK\include" - - "C:\Build\zlib-1.2.3\include" + - "C:\Build\zlib-1.2.5\include" 5.3. Setup the additional library locations for the project: - Still in the project properties pages, in the left part of the screen, @@ -137,7 +138,7 @@ - "C:\Build\SDL_image-1.2.10\lib" - "C:\Build\oggvorbis-win32sdk-1.0.1\lib" - "C:\Program Files\OpenAL 1.1 SDK\libs\Win32" - - "C:\Build\zlib-1.2.3\lib" + - "C:\Build\zlib-1.2.5\lib" 5.4. Remove unnecessary dependencies - Still in the "Linker" part of the project properties pages, in the left Modified: trunk/sc2/README =================================================================== --- trunk/sc2/README 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/README 2011-05-17 21:48:59 UTC (rev 3616) @@ -7,8 +7,13 @@ their permission and encouragement. If you've got this file from the source tree, you can find everything -you need to get started in INSTALL (INSTALL.mingw for MinGW) and -doc/users/unixinstall. +you need to get started in INSTALL. Additionally and depending on your +platform, please see: + INSTALL.mingw for MinGW build instructions + INSTALL.msvc for MSVC++ build instructions + INSTALL.macosx for MacOS X build instructions + INSTALL.symbian for Symbian build instructions + doc/users/unixinstall The home page of the project is located at http://sc2.sourceforge.net/ You can find links to downloads, our bug database, and our forum there. Modified: trunk/sc2/build/unix_installer/USAGE =================================================================== --- trunk/sc2/build/unix_installer/USAGE 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/build/unix_installer/USAGE 2011-05-17 21:48:59 UTC (rev 3616) @@ -4,7 +4,7 @@ - Change build/unix_installer/template to suit your needs. -- From the top of the cvs tree, run the following command, changing +- From the 'sc2' dir of the svn tree, run the following command, changing the arguments if necessary. The first one is the name of the final executable, the second the template to use. Modified: trunk/sc2/build/unix_installer/template =================================================================== --- trunk/sc2/build/unix_installer/template 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/build/unix_installer/template 2011-05-17 21:48:59 UTC (rev 3616) @@ -1,23 +1,23 @@ # Template file for building the UQM installer for unix Systems. # By Serge van den Boom, 2003-02-23 -UQM_VERSION="0.2" +UQM_VERSION="0.7" UQM_LICENSE_FILE="COPYING" UQM_PACKAGES="content voice 3domusic" UQM_PACKAGE_content_NAME="content" UQM_PACKAGE_content_TITLE="General game data" -UQM_PACKAGE_content_LOCATION="share/uqm/content/" +UQM_PACKAGE_content_LOCATION="share/uqm/content/packages/" UQM_PACKAGE_content_OPTIONAL="FALSE" UQM_PACKAGE_content_DEFAULT="TRUE" UQM_PACKAGE_voice_NAME="voice" UQM_PACKAGE_voice_TITLE="Spoken alien communication" -UQM_PACKAGE_voice_LOCATION="share/uqm/content/" +UQM_PACKAGE_voice_LOCATION="share/uqm/content/addons/" UQM_PACKAGE_voice_OPTIONAL="TRUE" UQM_PACKAGE_voice_DEFAULT="TRUE" UQM_PACKAGE_3domusic_NAME="3domusic" UQM_PACKAGE_3domusic_TITLE="Music from the 3DO version" -UQM_PACKAGE_3domusic_LOCATION="share/uqm/content/" +UQM_PACKAGE_3domusic_LOCATION="share/uqm/content/addons/" UQM_PACKAGE_3domusic_OPTIONAL="TRUE" UQM_PACKAGE_3domusic_DEFAULT="TRUE" Modified: trunk/sc2/doc/devel/checklist =================================================================== --- trunk/sc2/doc/devel/checklist 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/doc/devel/checklist 2011-05-17 21:48:59 UTC (rev 3616) @@ -13,19 +13,16 @@ - doc/users/unixinstall - Contributing - AUTHORS - - INSTALL + - INSTALL (and platform variants) - unix man pages (in the future) Building the release: -- make a new tag for the cvs repository - make a final build in release mode - for the source archive: - - use a clean cvs dir. - Just using 'cvs update' and watching the output will not be - enough, as some files like those beginning with '.#'will be ignored. - Make sure it is the most recent version (check out using authenticated - cvs), but modify the CVS/Root files to refer to anonymous CVS. + - use a clean subversion checkout. + Just using 'svn update' and watching the output will not be + enough, as the files not in repository will be ignored. - be sure to include content/version - Building the content packages: - make sure the permissions in the .zip files are ok (0644 for data files @@ -50,5 +47,5 @@ Moving on to the next version: - update the snapshots page so that content diffs are generated to the most recent release +- update doc/devel/versions with the release revision - Modified: trunk/sc2/doc/devel/versions =================================================================== --- trunk/sc2/doc/devel/versions 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/doc/devel/versions 2011-05-17 21:48:59 UTC (rev 3616) @@ -35,3 +35,8 @@ Version 0.6.3: Revision 2828 Version 0.6.4: Revision 2869 Version 0.6.5: Revision 3110 +Version 0.6.6: Revision 3143 +Version 0.6.7: Revision 3276 +Version 0.6.8: Revision 3334 +Version 0.6.9: Revision 3537 +Version 0.7.0-rc1: Revision 3574 Modified: trunk/sc2/doc/users/unixinstall =================================================================== --- trunk/sc2/doc/users/unixinstall 2011-05-17 18:58:06 UTC (rev 3615) +++ trunk/sc2/doc/users/unixinstall 2011-05-17 21:48:59 UTC (rev 3616) @@ -9,12 +9,13 @@ 2. If you haven't done so already, download the content .uqm files packages that you want, from where you got this source package. -You'll need uqm-0.6.0-content.uqm; uqm-0.6.0-3domusic.uqm (music from the 3DO -version) and uqm-0.6.0-voice.uqm (spoken alien dialogs) are optional. +You'll need uqm-0.7.0-content.uqm; uqm-0.7.0-3domusic.uqm (music from the 3DO +version) and uqm-0.7.0-voice.uqm (spoken alien dialogs) are optional. -Put these .uqm files in the directory content/packages/ which exists +Put the uqm-0.7.0-content.uqm in the directory content/packages/ which exists in the top directory of the source tree (the dir with (among others) COPYING, src/, and build.var.in). +Put the optional music and voice packages in the content/addons/ directory. 3. @@ -35,7 +36,7 @@ Done. You can start the game now with the command 'uqm'. You may also delete the source (with the .uqm files you put in -content/packages) if you want. +content/) if you want. If you want to recompile with other options, you can use This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-17 18:58:12
|
Revision: 3615 http://sc2.svn.sourceforge.net/sc2/?rev=3615&view=rev Author: avolkov Date: 2011-05-17 18:58:06 +0000 (Tue, 17 May 2011) Log Message: ----------- Fix alien comm flickers when using number speech and other spliced pieces Modified Paths: -------------- trunk/sc2/src/libs/sound/trackplayer.c Modified: trunk/sc2/src/libs/sound/trackplayer.c =================================================================== --- trunk/sc2/src/libs/sound/trackplayer.c 2011-05-17 18:45:21 UTC (rev 3614) +++ trunk/sc2/src/libs/sound/trackplayer.c 2011-05-17 18:58:06 UTC (rev 3615) @@ -393,6 +393,7 @@ chunks_tail->next = create_SoundChunk (track_decs[tracks], sound_sample->length); chunks_tail = chunks_tail->next; + chunks_tail->track_num = track_count - 1; sound_sample->length += track_decs[tracks]->length; } else @@ -580,10 +581,10 @@ dec_offset, time_stamps[page]); #endif sound_sample->length += decoder->length; + chunks_tail->track_num = track_count - 1; if (!no_page_break) { chunks_tail->tag_me = 1; - chunks_tail->track_num = track_count - 1; if (page < num_pages) { chunks_tail->text = pages[page]; @@ -773,12 +774,9 @@ create_SoundChunk (TFB_SoundDecoder *decoder, float start_time) { TFB_SoundChunk *chunk; - chunk = HMalloc (sizeof (TFB_SoundChunk)); + chunk = HCalloc (sizeof (*chunk)); chunk->decoder = decoder; - chunk->next = NULL; chunk->start_time = start_time; - chunk->tag_me = 0; - chunk->text = 0; return chunk; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-17 18:45:27
|
Revision: 3614 http://sc2.svn.sourceforge.net/sc2/?rev=3614&view=rev Author: avolkov Date: 2011-05-17 18:45:21 +0000 (Tue, 17 May 2011) Log Message: ----------- Update a Melnorme number speech call missed in r3610 Modified Paths: -------------- trunk/sc2/src/uqm/comm/melnorm/melnorm.c Modified: trunk/sc2/src/uqm/comm/melnorm/melnorm.c =================================================================== --- trunk/sc2/src/uqm/comm/melnorm/melnorm.c 2011-05-16 21:01:22 UTC (rev 3613) +++ trunk/sc2/src/uqm/comm/melnorm/melnorm.c 2011-05-17 18:45:21 UTC (rev 3614) @@ -590,7 +590,7 @@ else { NPCPhrase (NEED_MORE_CREDIT0); - NPCPhrase (delta_credit + (int)Credit); + NPCNumber (-delta_credit - Credit, NULL); NPCPhrase (NEED_MORE_CREDIT1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-16 21:01:28
|
Revision: 3613 http://sc2.svn.sourceforge.net/sc2/?rev=3613&view=rev Author: avolkov Date: 2011-05-16 21:01:22 +0000 (Mon, 16 May 2011) Log Message: ----------- Melnorme number speech work files Added Paths: ----------- trunk/misc/melnorme-speech/ trunk/misc/melnorme-speech/ReadMe.txt trunk/misc/melnorme-speech/eigh.wav trunk/misc/melnorme-speech/eighteen.wav trunk/misc/melnorme-speech/fifty.wav trunk/misc/melnorme-speech/fourty.wav trunk/misc/melnorme-speech/hundred.wav trunk/misc/melnorme-speech/nine.wav trunk/misc/melnorme-speech/nineteen.wav trunk/misc/melnorme-speech/one.wav trunk/misc/melnorme-speech/seven.wav trunk/misc/melnorme-speech/seventeen.wav trunk/misc/melnorme-speech/seventy.wav trunk/misc/melnorme-speech/sixty.wav trunk/misc/melnorme-speech/teen.wav trunk/misc/melnorme-speech/thirty.wav trunk/misc/melnorme-speech/thousand1.wav trunk/misc/melnorme-speech/thousand2.wav trunk/misc/melnorme-speech/twen1.wav trunk/misc/melnorme-speech/twen2.wav trunk/misc/melnorme-speech/twenty1.wav trunk/misc/melnorme-speech/twenty2.wav trunk/misc/melnorme-speech/ty.wav Added: trunk/misc/melnorme-speech/ReadMe.txt =================================================================== --- trunk/misc/melnorme-speech/ReadMe.txt (rev 0) +++ trunk/misc/melnorme-speech/ReadMe.txt 2011-05-16 21:01:22 UTC (rev 3613) @@ -0,0 +1,17 @@ +These are the work files for the Melnorme number speech. The 3DO original +speech only had numbers 1 through 16 to enumerate the modules Melnorme +would strip from the player's ship to give him fuel. The rest of the numbers +were generated by splicing the appropriate phonemes, e.g. "eigh" + "ty" = "eighty" +Note that Melnorme speech is still missing a "zero". + +List of tracks containing various needed words: +004 - thousand (good) +070 - million (good) +091 - thousands, millions, twenty +097 - fifty +102 - thousands +107 - hundreds +110 - hundred (good), twenty (avg) +115 - twenty, thousand +117 - twenty, thousand, hundred +119 - twenty, hundred Property changes on: trunk/misc/melnorme-speech/ReadMe.txt ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/misc/melnorme-speech/eigh.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/eigh.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/eighteen.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/eighteen.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/fifty.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/fifty.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/fourty.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/fourty.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/hundred.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/hundred.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/nine.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/nine.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/nineteen.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/nineteen.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/one.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/one.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/seven.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/seven.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/seventeen.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/seventeen.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/seventy.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/seventy.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/sixty.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/sixty.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/teen.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/teen.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/thirty.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/thirty.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/thousand1.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/thousand1.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/thousand2.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/thousand2.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/twen1.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/twen1.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/twen2.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/twen2.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/twenty1.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/twenty1.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/twenty2.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/twenty2.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/melnorme-speech/ty.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/melnorme-speech/ty.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-16 16:15:20
|
Revision: 3612 http://sc2.svn.sourceforge.net/sc2/?rev=3612&view=rev Author: avolkov Date: 2011-05-16 16:15:13 +0000 (Mon, 16 May 2011) Log Message: ----------- Slylandro probe coordinates speech work files Added Paths: ----------- trunk/misc/ trunk/misc/probe-speech/ trunk/misc/probe-speech/0.wav trunk/misc/probe-speech/1.wav trunk/misc/probe-speech/10.wav trunk/misc/probe-speech/11.wav trunk/misc/probe-speech/12.wav trunk/misc/probe-speech/13.wav trunk/misc/probe-speech/14.wav trunk/misc/probe-speech/15.wav trunk/misc/probe-speech/16.wav trunk/misc/probe-speech/17.wav trunk/misc/probe-speech/18.wav trunk/misc/probe-speech/19.wav trunk/misc/probe-speech/2.wav trunk/misc/probe-speech/20.wav trunk/misc/probe-speech/3.wav trunk/misc/probe-speech/30.wav trunk/misc/probe-speech/4.wav trunk/misc/probe-speech/40.wav trunk/misc/probe-speech/5.wav trunk/misc/probe-speech/50.wav trunk/misc/probe-speech/6.wav trunk/misc/probe-speech/60.wav trunk/misc/probe-speech/7.wav trunk/misc/probe-speech/70.wav trunk/misc/probe-speech/8.wav trunk/misc/probe-speech/80.wav trunk/misc/probe-speech/9.wav trunk/misc/probe-speech/90.wav trunk/misc/probe-speech/ReadMe.txt trunk/misc/probe-speech/by.wav trunk/misc/probe-speech/coords-are.wav trunk/misc/probe-speech/hundred.wav trunk/misc/probe-speech/minus.wav trunk/misc/probe-speech/plus.wav trunk/misc/probe-speech/point.wav trunk/misc/probe-speech/probe-capture.wav trunk/misc/probe-speech/probe-processed.wav trunk/misc/probe-speech/thousand.wav Added: trunk/misc/probe-speech/0.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/0.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/1.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/1.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/10.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/10.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/11.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/11.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/12.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/12.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/13.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/13.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/14.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/14.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/15.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/15.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/16.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/16.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/17.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/17.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/18.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/18.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/19.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/19.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/2.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/2.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/20.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/20.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/3.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/3.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/30.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/30.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/4.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/4.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/40.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/40.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/5.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/5.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/50.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/50.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/6.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/6.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/60.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/60.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/7.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/7.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/70.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/70.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/8.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/8.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/80.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/80.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/9.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/9.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/90.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/90.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/ReadMe.txt =================================================================== --- trunk/misc/probe-speech/ReadMe.txt (rev 0) +++ trunk/misc/probe-speech/ReadMe.txt 2011-05-16 16:15:13 UTC (rev 3612) @@ -0,0 +1,3 @@ +These are the work files for the new Slylandro Probe speech, mostly the +spoken coordinates. The speech was generated with "Bruce" from MacInTalk Pro. +See sc2/doc/devel/voiceeffects for more info. Property changes on: trunk/misc/probe-speech/ReadMe.txt ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/misc/probe-speech/by.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/by.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/coords-are.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/coords-are.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/hundred.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/hundred.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/minus.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/minus.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/plus.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/plus.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/point.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/point.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/probe-capture.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/probe-capture.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/probe-processed.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/probe-processed.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav Added: trunk/misc/probe-speech/thousand.wav =================================================================== (Binary files differ) Property changes on: trunk/misc/probe-speech/thousand.wav ___________________________________________________________________ Added: svn:mime-type + audio/wav This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-15 21:17:14
|
Revision: 3611 http://sc2.svn.sourceforge.net/sc2/?rev=3611&view=rev Author: avolkov Date: 2011-05-15 21:17:08 +0000 (Sun, 15 May 2011) Log Message: ----------- Voice effects docs: Slylandro probe Added Paths: ----------- trunk/sc2/doc/devel/voiceeffects Added: trunk/sc2/doc/devel/voiceeffects =================================================================== --- trunk/sc2/doc/devel/voiceeffects (rev 0) +++ trunk/sc2/doc/devel/voiceeffects 2011-05-15 21:17:08 UTC (rev 3611) @@ -0,0 +1,20 @@ +Slylandro Probe +--------------------------------------------------------------------------- +The voice of the Slylandro probe is "Bruce" from MacInTalk Pro. MacInTalk +Pro requires a 68040 Mac, a Quadra or Performa, and System 7.3 minimum. +Basilisk II emulator can do Quadra 900 well enough. + +The probe speech added to UQM was processed as follows: +1) generated on Basilisk II v0.8.0.142 running System 7.5.3 Rev 2 on + Quadra 900. Words like "hundred" and "point" were mid-sentence to get + better intonation. Names of tens -- 20, 30, etc. -- were cut from number + phrases "twenty-five", "thirty-five", etc. +2) captured at 44100 Hz +3) post-processed with Audacity 1.3 beta; filters: + a) GVerb: room 40m, reverb time 0.1s, damping 0.85, input bandwidth 0.75, + dry signal +0dB, early reflection -22dB, trail level -30dB + b) Amplify: +2.5dB (depends on your capture level) + c) Bass boost: centered at 300 Hz, +4dB +4) chopped up and exported at 11025 Hz + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-15 20:45:14
|
Revision: 3610 http://sc2.svn.sourceforge.net/sc2/?rev=3610&view=rev Author: avolkov Date: 2011-05-15 20:45:07 +0000 (Sun, 15 May 2011) Log Message: ----------- Added spoken Slylandro probe coordinates; bug #732 Modified Paths: -------------- trunk/sc2/ChangeLog trunk/sc2/content/addons/3dovoice/probe/probe-019.ogg trunk/sc2/content/addons/3dovoice/probe/probe-030.ogg trunk/sc2/content/addons/3dovoice/probe/probe.ts trunk/sc2/content/base/comm/probe/probe.txt trunk/sc2/src/uqm/comm/druuge/druugec.c trunk/sc2/src/uqm/comm/melnorm/melnorm.c trunk/sc2/src/uqm/comm/slyland/slyland.c trunk/sc2/src/uqm/comm/slyland/strings.h trunk/sc2/src/uqm/commglue.c trunk/sc2/src/uqm/commglue.h trunk/sc2/src/uqm/globdata.h Added Paths: ----------- trunk/sc2/content/addons/3dovoice/probe/probe-031.ogg trunk/sc2/content/addons/3dovoice/probe/probe-032.ogg trunk/sc2/content/addons/3dovoice/probe/probe-033.ogg trunk/sc2/content/addons/3dovoice/probe/probe-034.ogg trunk/sc2/content/addons/3dovoice/probe/probe-035.ogg trunk/sc2/content/addons/3dovoice/probe/probe-036.ogg trunk/sc2/content/addons/3dovoice/probe/probe-037.ogg trunk/sc2/content/addons/3dovoice/probe/probe-038.ogg trunk/sc2/content/addons/3dovoice/probe/probe-039.ogg trunk/sc2/content/addons/3dovoice/probe/probe-040.ogg trunk/sc2/content/addons/3dovoice/probe/probe-041.ogg trunk/sc2/content/addons/3dovoice/probe/probe-042.ogg trunk/sc2/content/addons/3dovoice/probe/probe-043.ogg trunk/sc2/content/addons/3dovoice/probe/probe-044.ogg trunk/sc2/content/addons/3dovoice/probe/probe-045.ogg trunk/sc2/content/addons/3dovoice/probe/probe-046.ogg trunk/sc2/content/addons/3dovoice/probe/probe-047.ogg trunk/sc2/content/addons/3dovoice/probe/probe-048.ogg trunk/sc2/content/addons/3dovoice/probe/probe-049.ogg trunk/sc2/content/addons/3dovoice/probe/probe-050.ogg trunk/sc2/content/addons/3dovoice/probe/probe-051.ogg trunk/sc2/content/addons/3dovoice/probe/probe-052.ogg trunk/sc2/content/addons/3dovoice/probe/probe-053.ogg trunk/sc2/content/addons/3dovoice/probe/probe-054.ogg trunk/sc2/content/addons/3dovoice/probe/probe-055.ogg trunk/sc2/content/addons/3dovoice/probe/probe-056.ogg trunk/sc2/content/addons/3dovoice/probe/probe-057.ogg trunk/sc2/content/addons/3dovoice/probe/probe-058.ogg trunk/sc2/content/addons/3dovoice/probe/probe-059.ogg trunk/sc2/content/addons/3dovoice/probe/probe-060.ogg trunk/sc2/content/addons/3dovoice/probe/probe-061.ogg trunk/sc2/content/addons/3dovoice/probe/probe-062.ogg trunk/sc2/content/addons/3dovoice/probe/probe-063.ogg trunk/sc2/content/addons/3dovoice/probe/probe-064.ogg Modified: trunk/sc2/ChangeLog =================================================================== --- trunk/sc2/ChangeLog 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/ChangeLog 2011-05-15 20:45:07 UTC (rev 3610) @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Added spoken Slylandro probe coordinates (bug #732) - Nic, Alex - Added the missing bits to the no-voice versions of Mycon, Syreen and Utwig dialogue (bug #327) - Alex - Syreen dialog tree no longer resets after visiting the Syreen Vault Modified: trunk/sc2/content/addons/3dovoice/probe/probe-019.ogg =================================================================== (Binary files differ) Modified: trunk/sc2/content/addons/3dovoice/probe/probe-030.ogg =================================================================== (Binary files differ) Added: trunk/sc2/content/addons/3dovoice/probe/probe-031.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-031.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-032.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-032.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-033.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-033.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-034.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-034.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-035.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-035.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-036.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-036.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-037.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-037.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-038.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-038.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-039.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-039.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-040.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-040.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-041.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-041.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-042.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-042.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-043.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-043.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-044.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-044.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-045.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-045.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-046.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-046.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-047.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-047.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-048.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-048.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-049.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-049.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-050.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-050.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-051.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-051.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-052.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-052.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-053.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-053.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-054.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-054.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-055.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-055.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-056.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-056.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-057.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-057.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-058.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-058.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-059.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-059.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-060.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-060.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-061.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-061.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-062.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-062.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-063.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-063.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Added: trunk/sc2/content/addons/3dovoice/probe/probe-064.ogg =================================================================== (Binary files differ) Property changes on: trunk/sc2/content/addons/3dovoice/probe/probe-064.ogg ___________________________________________________________________ Added: svn:mime-type + application/ogg Modified: trunk/sc2/content/addons/3dovoice/probe/probe.ts =================================================================== --- trunk/sc2/content/addons/3dovoice/probe/probe.ts 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/content/addons/3dovoice/probe/probe.ts 2011-05-15 20:45:07 UTC (rev 3610) @@ -51,3 +51,36 @@ #(HOSTILE) 3785 #(DESTRUCT_SEQUENCE) #(destruct_code) +#(COORD_PLUS) +#(COORD_MINUS) +#(COORD_POINT) +#(ENUMERATE_HUNDRED) +#(ENUMERATE_THOUSAND) +#(ENUMERATE_ZERO) +#(ENUMERATE_ONE) +#(ENUMERATE_TWO) +#(ENUMERATE_THREE) +#(ENUMERATE_FOUR) +#(ENUMERATE_FIVE) +#(ENUMERATE_SIX) +#(ENUMERATE_SEVEN) +#(ENUMERATE_EIGHT) +#(ENUMERATE_NINE) +#(ENUMERATE_TEN) +#(ENUMERATE_ELEVEN) +#(ENUMERATE_TWELVE) +#(ENUMERATE_THIRTEEN) +#(ENUMERATE_FOURTEEN) +#(ENUMERATE_FIFTEEN) +#(ENUMERATE_SIXTEEN) +#(ENUMERATE_SEVENTEEN) +#(ENUMERATE_EIGHTEEN) +#(ENUMERATE_NINETEEN) +#(ENUMERATE_TWENTY) +#(ENUMERATE_THIRTY) +#(ENUMERATE_FOURTY) +#(ENUMERATE_FIFTY) +#(ENUMERATE_SIXTY) +#(ENUMERATE_SEVENTY) +#(ENUMERATE_EIGHTY) +#(ENUMERATE_NINETY) Modified: trunk/sc2/content/base/comm/probe/probe.txt =================================================================== --- trunk/sc2/content/base/comm/probe/probe.txt 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/content/base/comm/probe/probe.txt 2011-05-15 20:45:07 UTC (rev 3610) @@ -94,12 +94,12 @@ THIS IS PROBE 2418-B. WE REPLICATE SO THAT WE MAY EXPAND THE SCOPE OF MISSION. #(THIS_IS_PROBE_40) probe-019.ogg -THIS IS PROBE 2418-B. +THIS IS PROBE 2418-B. COORDINATES ARE: #(THIS_IS_PROBE_41) probe-030.ogg -COORDINATES ARE: +, -#(THIS_IS_PROBE_42) +#(THIS_IS_PROBE_42) probe-031.ogg . #(why_attack_1) @@ -177,3 +177,102 @@ #(destruct_code) Transmit destruct sequence! + +#(COORD_PLUS) probe-032.ogg ++ + +#(COORD_MINUS) probe-033.ogg +- + +#(COORD_POINT) probe-034.ogg +. + +#(ENUMERATE_HUNDRED) probe-035.ogg +hundred + +#(ENUMERATE_THOUSAND) probe-036.ogg +thousand + +#(ENUMERATE_ZERO) probe-037.ogg +zero + +#(ENUMERATE_ONE) probe-038.ogg +one + +#(ENUMERATE_TWO) probe-039.ogg +two + +#(ENUMERATE_THREE) probe-040.ogg +three + +#(ENUMERATE_FOUR) probe-041.ogg +four + +#(ENUMERATE_FIVE) probe-042.ogg +five + +#(ENUMERATE_SIX) probe-043.ogg +six + +#(ENUMERATE_SEVEN) probe-044.ogg +seven + +#(ENUMERATE_EIGHT) probe-045.ogg +eight + +#(ENUMERATE_NINE) probe-046.ogg +nine + +#(ENUMERATE_TEN) probe-047.ogg +ten + +#(ENUMERATE_ELEVEN) probe-048.ogg +eleven + +#(ENUMERATE_TWELVE) probe-049.ogg +twelve + +#(ENUMERATE_THIRTEEN) probe-050.ogg +thirteen + +#(ENUMERATE_FOURTEEN) probe-051.ogg +fourteen + +#(ENUMERATE_FIFTEEN) probe-052.ogg +fifteen + +#(ENUMERATE_SIXTEEN) probe-053.ogg +sixteen + +#(ENUMERATE_SEVENTEEN) probe-054.ogg +seventeen + +#(ENUMERATE_EIGHTEEN) probe-055.ogg +eighteen + +#(ENUMERATE_NINETEEN) probe-056.ogg +nineteen + +#(ENUMERATE_TWENTY) probe-057.ogg +twenty + +#(ENUMERATE_THIRTY) probe-058.ogg +thirty + +#(ENUMERATE_FOURTY) probe-059.ogg +fourty + +#(ENUMERATE_FIFTY) probe-060.ogg +fifty + +#(ENUMERATE_SIXTY) probe-061.ogg +sixty + +#(ENUMERATE_SEVENTY) probe-062.ogg +seventy + +#(ENUMERATE_EIGHTY) probe-063.ogg +eighty + +#(ENUMERATE_NINETY) probe-064.ogg +ninety Modified: trunk/sc2/src/uqm/comm/druuge/druugec.c =================================================================== --- trunk/sc2/src/uqm/comm/druuge/druugec.c 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/src/uqm/comm/druuge/druugec.c 2011-05-15 20:45:07 UTC (rev 3610) @@ -476,7 +476,7 @@ UnlockMutex (GraphicsLock); NPCPhrase (FUEL0); - NPCPhrase (-(int)f); + NPCNumber (f, NULL); NPCPhrase (FUEL1); if (f >= 250) Modified: trunk/sc2/src/uqm/comm/melnorm/melnorm.c =================================================================== --- trunk/sc2/src/uqm/comm/melnorm/melnorm.c 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/src/uqm/comm/melnorm/melnorm.c 2011-05-15 20:45:07 UTC (rev 3610) @@ -39,7 +39,7 @@ #define NUM_ALIEN_RACE_ITEMS 16 #define NUM_TECH_ITEMS 13 -static NUMBER_SPEECH_DESC melnorme_numbers_english; +static const NUMBER_SPEECH_DESC melnorme_numbers_english; static LOCDATA melnorme_desc = { @@ -159,7 +159,7 @@ ENUMERATE_NINETY }; -static NUMBER_SPEECH_DESC melnorme_numbers_english = +static const NUMBER_SPEECH_DESC melnorme_numbers_english = { 5, /* NumDigits */ { @@ -1183,9 +1183,9 @@ added_credit = GLOBAL_SIS (TotalBioMass) * BIO_CREDIT_VALUE; NPCPhrase (SOLD_LIFE_DATA1); - NPCPhrase (-(int)GLOBAL_SIS (TotalBioMass)); + NPCNumber (GLOBAL_SIS (TotalBioMass), NULL); NPCPhrase (SOLD_LIFE_DATA2); - NPCPhrase (-(int)added_credit); + NPCNumber (added_credit, NULL); NPCPhrase (SOLD_LIFE_DATA3); // queue WHAT_TO_SELL before talk-segue if (num_new_rainbows) @@ -1231,9 +1231,9 @@ added_credit = num_new_rainbows * (250 * BIO_CREDIT_VALUE); NPCPhrase (SOLD_RAINBOW_LOCATIONS1); - NPCPhrase (-(int)num_new_rainbows); + NPCNumber (num_new_rainbows, NULL); NPCPhrase (SOLD_RAINBOW_LOCATIONS2); - NPCPhrase (-(int)added_credit); + NPCNumber (added_credit, NULL); NPCPhrase (SOLD_RAINBOW_LOCATIONS3); num_new_rainbows += GET_GAME_STATE (MELNORME_RAINBOW_COUNT); Modified: trunk/sc2/src/uqm/comm/slyland/slyland.c =================================================================== --- trunk/sc2/src/uqm/comm/slyland/slyland.c 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/src/uqm/comm/slyland/slyland.c 2011-05-15 20:45:07 UTC (rev 3610) @@ -17,6 +17,7 @@ */ #include "../commall.h" +#include <math.h> #include "resinst.h" #include "strings.h" @@ -25,6 +26,8 @@ #include "uqm/setup.h" +static const NUMBER_SPEECH_DESC probe_numbers_english; + static LOCDATA slylandro_desc = { NULL, /* init_encounter_func */ @@ -110,13 +113,97 @@ 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - NULL, /* AlienNumberSpeech - none */ + &probe_numbers_english, /* AlienNumberSpeech - default */ /* Filler for loaded resources */ NULL, NULL, NULL, NULL, NULL, }; +static COUNT probe_digit_names[] = +{ + ENUMERATE_ZERO, + ENUMERATE_ONE, + ENUMERATE_TWO, + ENUMERATE_THREE, + ENUMERATE_FOUR, + ENUMERATE_FIVE, + ENUMERATE_SIX, + ENUMERATE_SEVEN, + ENUMERATE_EIGHT, + ENUMERATE_NINE, +}; + +static COUNT probe_teen_names[] = +{ + ENUMERATE_TEN, + ENUMERATE_ELEVEN, + ENUMERATE_TWELVE, + ENUMERATE_THIRTEEN, + ENUMERATE_FOURTEEN, + ENUMERATE_FIFTEEN, + ENUMERATE_SIXTEEN, + ENUMERATE_SEVENTEEN, + ENUMERATE_EIGHTEEN, + ENUMERATE_NINETEEN, +}; + +static COUNT probe_tens_names[] = +{ + 0, /* invalid */ + 0, /* skip digit */ + ENUMERATE_TWENTY, + ENUMERATE_THIRTY, + ENUMERATE_FOURTY, + ENUMERATE_FIFTY, + ENUMERATE_SIXTY, + ENUMERATE_SEVENTY, + ENUMERATE_EIGHTY, + ENUMERATE_NINETY, +}; + +static const NUMBER_SPEECH_DESC probe_numbers_english = +{ + 5, /* NumDigits */ + { + { /* 1000-999999 */ + 1000, /* Divider */ + 0, /* Subtrahend */ + NULL, /* StrDigits - recurse */ + NULL, /* Names - not used */ + ENUMERATE_THOUSAND /* CommonIndex */ + }, + { /* 100-999 */ + 100, /* Divider */ + 0, /* Subtrahend */ + probe_digit_names, /* StrDigits */ + NULL, /* Names - not used */ + ENUMERATE_HUNDRED /* CommonIndex */ + }, + { /* 20-99 */ + 10, /* Divider */ + 0, /* Subtrahend */ + probe_tens_names, /* StrDigits */ + NULL, /* Names - not used */ + 0 /* CommonIndex - not used */ + }, + { /* 10-19 */ + 1, /* Divider */ + 10, /* Subtrahend */ + probe_teen_names, /* StrDigits */ + NULL, /* Names - not used */ + 0 /* CommonIndex - not used */ + }, + { /* 0-9 */ + 1, /* Divider */ + 0, /* Subtrahend */ + probe_digit_names, /* StrDigits */ + NULL, /* Names - not used */ + 0 /* CommonIndex - not used */ + } + } +}; + static RESPONSE_REF threat, something_wrong, we_are_us, @@ -124,6 +211,19 @@ bye; static void +sayCoord (int coord) +{ + int ac; + + ac = abs (coord); + + NPCPhrase_splice (coord < 0 ? COORD_MINUS : COORD_PLUS); + NPCNumber (ac / 10, "%03d"); + NPCPhrase_splice (COORD_POINT); + NPCNumber (ac % 10, NULL); +} + +static void CombatIsInevitable (RESPONSE_REF R) { if (R == 0) @@ -266,13 +366,6 @@ else if (PLAYER_SAID (R, we_are_us)) { NumVisits = GET_GAME_STATE (SLYLANDRO_PROBE_ID); - if (NumVisits == 3 && !optSubtitles) - { - /* If playing without subtitles, don't use the - * last item in the conversation tree, which mentions - * coordinates which can't be spoken. */ - NumVisits--; - } switch (NumVisits++) { case 0: @@ -286,9 +379,16 @@ break; case 3: { + SIZE dx, dy; + + // Probe's coordinate system is {-Y,X} relative to B Corvi + dx = LOGX_TO_UNIVERSE (GLOBAL_SIS (log_x)) - 333; + dy = 9812 - LOGY_TO_UNIVERSE (GLOBAL_SIS (log_y)); + NPCPhrase (THIS_IS_PROBE_40); - NPCPhrase (THIS_IS_PROBE_41); - NPCPhrase (GLOBAL_PLAYER_LOCATION); + sayCoord (dy); + NPCPhrase_splice (THIS_IS_PROBE_41); + sayCoord (dx); NPCPhrase (THIS_IS_PROBE_42); --NumVisits; Modified: trunk/sc2/src/uqm/comm/slyland/strings.h =================================================================== --- trunk/sc2/src/uqm/comm/slyland/strings.h 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/src/uqm/comm/slyland/strings.h 2011-05-15 20:45:07 UTC (rev 3610) @@ -75,6 +75,39 @@ HOSTILE, DESTRUCT_SEQUENCE, destruct_code, + COORD_PLUS, + COORD_MINUS, + COORD_POINT, + ENUMERATE_HUNDRED, + ENUMERATE_THOUSAND, + ENUMERATE_ZERO, + ENUMERATE_ONE, + ENUMERATE_TWO, + ENUMERATE_THREE, + ENUMERATE_FOUR, + ENUMERATE_FIVE, + ENUMERATE_SIX, + ENUMERATE_SEVEN, + ENUMERATE_EIGHT, + ENUMERATE_NINE, + ENUMERATE_TEN, + ENUMERATE_ELEVEN, + ENUMERATE_TWELVE, + ENUMERATE_THIRTEEN, + ENUMERATE_FOURTEEN, + ENUMERATE_FIFTEEN, + ENUMERATE_SIXTEEN, + ENUMERATE_SEVENTEEN, + ENUMERATE_EIGHTEEN, + ENUMERATE_NINETEEN, + ENUMERATE_TWENTY, + ENUMERATE_THIRTY, + ENUMERATE_FOURTY, + ENUMERATE_FIFTY, + ENUMERATE_SIXTY, + ENUMERATE_SEVENTY, + ENUMERATE_EIGHTY, + ENUMERATE_NINETY, }; #endif /* _STRINGS_H */ Modified: trunk/sc2/src/uqm/commglue.c =================================================================== --- trunk/sc2/src/uqm/commglue.c 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/src/uqm/commglue.c 2011-05-15 20:45:07 UTC (rev 3610) @@ -26,12 +26,12 @@ #include <assert.h> #include "libs/log.h" -int NPCNumberPhrase (int number, UNICODE **ptrack); +static int NPCNumberPhrase (int number, const char *fmt, UNICODE **ptrack); void NPCPhrase_cb (int index, TFB_TrackCB cb) { - UNICODE *pStr, numbuf[400]; + UNICODE *pStr, buf[400]; void *pClip, *pTimeStamp; switch (index) @@ -46,54 +46,25 @@ pClip = 0; pTimeStamp = 0; break; - case GLOBAL_PLAYER_LOCATION: - { - SIZE dx, dy; - COUNT adx, ady; - - dx = LOGX_TO_UNIVERSE (GLOBAL_SIS (log_x)) - 333; - adx = dx >= 0 ? dx : -dx; - dy = 9812 - LOGY_TO_UNIVERSE (GLOBAL_SIS (log_y)); - ady = dy >= 0 ? dy : -dy; - sprintf (numbuf, - "%+04d.%01u,%+04d.%01u", - (SIZE)(dy / 10), (COUNT)(ady % 10), - (SIZE)(dx / 10), (COUNT)(adx % 10)); - pStr = numbuf; - pClip = 0; - pTimeStamp = 0; - break; - } case 0: { return; } default: if (index < 0) - { - if (index > UNREASONABLE_NUMBER) - { - if (CommData.AlienNumberSpeech) - { - NPCNumberPhrase (-index, NULL); - return; - } - sprintf (numbuf, "%d", -index); - } - else - { - COUNT i; - STRING S; + { // One of the alliance name variants + COUNT i; + STRING S; - index -= GLOBAL_ALLIANCE_NAME; + index -= GLOBAL_ALLIANCE_NAME; - i = GET_GAME_STATE (NEW_ALLIANCE_NAME); - S = SetAbsStringTableIndex (CommData.ConversationPhrases, (index - 1) + i); - strcpy (numbuf, (UNICODE *)GetStringAddress (S)); - if (i == 3) - strcat (numbuf, GLOBAL_SIS (CommanderName)); - } - pStr = numbuf; + i = GET_GAME_STATE (NEW_ALLIANCE_NAME); + S = SetAbsStringTableIndex (CommData.ConversationPhrases, (index - 1) + i); + strcpy (buf, (UNICODE *)GetStringAddress (S)); + if (i == 3) + strcat (buf, GLOBAL_SIS (CommanderName)); + + pStr = buf; pClip = 0; pTimeStamp = 0; } @@ -115,9 +86,57 @@ SpliceTrack (pClip, pStr, pTimeStamp, cb); } -int -NPCNumberPhrase (int number, UNICODE **ptrack) +// Special case variant: prevents page breaks. +void +NPCPhrase_splice (int index) { + UNICODE *pStr; + void *pClip; + + assert (index >= 0); + if (index == 0) + return; + + pStr = (UNICODE *)GetStringAddress ( + SetAbsStringTableIndex (CommData.ConversationPhrases, index - 1)); + pClip = GetStringSoundClip ( + SetAbsStringTableIndex (CommData.ConversationPhrases, index - 1)); + + if (!pClip) + { // Just appending some text + SpliceTrack (NULL, pStr, NULL, NULL); + } + else + { // Splicing in some voice + UNICODE *tracks[] = {NULL, NULL}; + + tracks[0] = pClip; + SpliceMultiTrack (tracks, pStr); + } +} + +void +NPCNumber (int number, const char *fmt) +{ + UNICODE buf[32]; + + if (!fmt) + fmt = "%d"; + + if (CommData.AlienNumberSpeech) + { + NPCNumberPhrase (number, fmt, NULL); + return; + } + + // just splice in the subtitle text + snprintf (buf, sizeof buf, fmt, number); + SpliceTrack (NULL, buf, NULL, NULL); +} + +static int +NPCNumberPhrase (int number, const char *fmt, UNICODE **ptrack) +{ #define MAX_NUMBER_TRACKS 20 NUMBER_SPEECH speech = CommData.AlienNumberSpeech; COUNT i; @@ -125,6 +144,7 @@ int toplevel = 0; UNICODE *TrackNames[MAX_NUMBER_TRACKS]; UNICODE numbuf[60]; + const SPEECH_DIGIT* dig = NULL; if (!speech) return 0; @@ -132,15 +152,17 @@ if (!ptrack) { toplevel = 1; - sprintf (numbuf, "%d", number); + if (!fmt) + fmt = "%d"; + sprintf (numbuf, fmt, number); ptrack = TrackNames; } for (i = 0; i < speech->NumDigits; ++i) { - SPEECH_DIGIT* dig = speech->Digits + i; int quot; + dig = speech->Digits + i; quot = number / dig->Divider; if (quot == 0) @@ -166,7 +188,7 @@ } else { - int ctracks = NPCNumberPhrase (quot, ptrack); + int ctracks = NPCNumberPhrase (quot, NULL, ptrack); ptrack += ctracks; queued += ctracks; } @@ -181,9 +203,7 @@ { *ptrack++ = GetStringSoundClip ( SetAbsStringTableIndex ( - CommData.ConversationPhrases, - (COUNT) (name->StrIndex - 1) - )); + CommData.ConversationPhrases, name->StrIndex - 1)); queued++; break; } @@ -192,9 +212,7 @@ else if (dig->CommonNameIndex != 0) { *ptrack++ = GetStringSoundClip (SetAbsStringTableIndex ( - CommData.ConversationPhrases, - (COUNT) (dig->CommonNameIndex - 1) - )); + CommData.ConversationPhrases, dig->CommonNameIndex - 1)); queued++; } @@ -205,11 +223,9 @@ { if (queued == 0) { // nothing queued, say "zero" + assert (number == 0); *ptrack++ = GetStringSoundClip (SetAbsStringTableIndex ( - CommData.ConversationPhrases, - speech->Digits[speech->NumDigits - 1].StrDigits[0] - )); - + CommData.ConversationPhrases, dig->StrDigits[number] - 1)); } *ptrack++ = NULL; // term Modified: trunk/sc2/src/uqm/commglue.h =================================================================== --- trunk/sc2/src/uqm/commglue.h 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/src/uqm/commglue.h 2011-05-15 20:45:07 UTC (rev 3610) @@ -74,10 +74,7 @@ { GLOBAL_PLAYER_NAME = -1000000, GLOBAL_SHIP_NAME, - GLOBAL_PLAYER_LOCATION, - GLOBAL_ALLIANCE_NAME, - UNREASONABLE_NUMBER = GLOBAL_ALLIANCE_NAME + 1000, }; typedef COUNT RESPONSE_REF; @@ -90,6 +87,8 @@ extern void NPCPhrase_cb (int index, TFB_TrackCB cb); #define NPCPhrase(index) NPCPhrase_cb ((index), NULL) +extern void NPCPhrase_splice (int index); +extern void NPCNumber (int number, const char *fmt); #define ALLIANCE_NAME_BUFSIZE 256 extern void GetAllianceName (UNICODE *buf, RESPONSE_REF name_1); Modified: trunk/sc2/src/uqm/globdata.h =================================================================== --- trunk/sc2/src/uqm/globdata.h 2011-05-14 17:27:36 UTC (rev 3609) +++ trunk/sc2/src/uqm/globdata.h 2011-05-15 20:45:07 UTC (rev 3610) @@ -82,7 +82,7 @@ // 0-9, 10-19, ..20-90, ..100-900, etc. SPEECH_DIGIT Digits[MAX_SPEECH_DIGITS]; } NUMBER_SPEECH_DESC; -typedef NUMBER_SPEECH_DESC *NUMBER_SPEECH; +typedef const NUMBER_SPEECH_DESC *NUMBER_SPEECH; typedef DWORD LDAS_FLAGS; #define LDASF_NONE ((LDAS_FLAGS) 0 ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-14 17:27:43
|
Revision: 3609 http://sc2.svn.sourceforge.net/sc2/?rev=3609&view=rev Author: avolkov Date: 2011-05-14 17:27:36 +0000 (Sat, 14 May 2011) Log Message: ----------- Added WAVE file output to AIFF converter; fixed AIFF decoding bug which caused 8 extra samples in the output Modified Paths: -------------- trunk/tools/aif/Makefile trunk/tools/aif/aif2wav.sh Added Paths: ----------- trunk/tools/aif/aif2wav.c trunk/tools/aif/aif2wav.dsp trunk/tools/aif/aiff.c trunk/tools/aif/aiff.h trunk/tools/aif/wav.c trunk/tools/aif/wav.h Removed Paths: ------------- trunk/tools/aif/aif2raw.c trunk/tools/aif/aif2raw.h Modified: trunk/tools/aif/Makefile =================================================================== --- trunk/tools/aif/Makefile 2011-05-13 23:55:45 UTC (rev 3608) +++ trunk/tools/aif/Makefile 2011-05-14 17:27:36 UTC (rev 3609) @@ -1,7 +1,7 @@ -aif2raw: aif2raw.c aif2raw.h - gcc -W -Wall -g -O0 aif2raw.c -o aif2raw +aif2wav: aif2wav.c aiff.h aiff.c wav.h wav.c port.h + gcc -W -Wall -g -O0 aif2wav.c aiff.c wav.c -o aif2wav clean: - rm aif2raw + rm aif2wav aif2wav.exe Deleted: trunk/tools/aif/aif2raw.c =================================================================== --- trunk/tools/aif/aif2raw.c 2011-05-13 23:55:45 UTC (rev 3608) +++ trunk/tools/aif/aif2raw.c 2011-05-14 17:27:36 UTC (rev 3609) @@ -1,278 +0,0 @@ -/* - * aif to raw converter. By Serge van den Boom (sv...@st...), - * 20020816 - * Doesn't convert all .aif files in general, only AIFF-C, 16 bits - * SDX2-compressed. - * - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "aif2raw.h" - -void convert_aif(FILE *in, FILE *out); -void write_data(const uint8_t *data, ssize_t size, int numChannels, - FILE *out); - -int -main(int argc, char *argv[]) { - FILE *in, *out; - - if (argc != 3) { - fprintf(stderr, "aif2wav <infile> <outfile>\n"); - return EXIT_FAILURE; - } - - in = fopen(argv[1], "rb"); - if (!in) { - perror("Could not open input file"); - return EXIT_FAILURE; - } - - out = fopen(argv[2], "wb"); - if (!out) { - perror("Could not open output file"); - return EXIT_FAILURE; - } - - convert_aif(in, out); - - fclose(in); - fclose(out); - return EXIT_SUCCESS; -} - -/* local to file byte order */ -inline uint32_t -ltof32(uint32_t val) { - return (val >> 24) | - ((val & 0x00ff0000L) >> 8) | - ((val & 0x0000ff00L) << 8) | - (val << 24); -} - -/* file to local byte order */ -inline uint32_t -ftol32(uint32_t val) { - return (val >> 24) | - ((val & 0x00ff0000L) >> 8) | - ((val & 0x0000ff00L) << 8) | - (val << 24); -} - -/* local to file byte order */ -inline uint16_t -ltof16(uint16_t val) { - return (val >> 8) | (val << 8); -} - -/* file to local byte order */ -inline uint16_t -ftol16(uint16_t val) { - return (val >> 8) | (val << 8); -} - -#if 0 -/* local to file byte order */ -inline void -ltofld(char *dest, long double val) { -} -#endif - -/* file to local byte order */ -inline long double -ftolld(const char *val) { - long double result; - ((char *) &result)[0] = val[9]; - ((char *) &result)[1] = val[8]; - ((char *) &result)[2] = val[7]; - ((char *) &result)[3] = val[6]; - ((char *) &result)[4] = val[5]; - ((char *) &result)[5] = val[4]; - ((char *) &result)[6] = val[3]; - ((char *) &result)[7] = val[2]; - ((char *) &result)[8] = val[1]; - ((char *) &result)[9] = val[0]; - ((char *) &result)[10] = 0x00; - ((char *) &result)[11] = 0x00; - return result; -} - -void -read_data(char *buf, size_t size, FILE *file) { - ssize_t numread; - - numread = fread(buf, size, 1, file); - if (numread == 0 && ferror(file)) { - perror("read header"); - exit(EXIT_FAILURE); - } - if ((size_t) numread != 1) { - fprintf(stderr, "Input file too small.\n"); - exit(EXIT_FAILURE); - } -} - -struct aifc_Chunk * -read_chunk(FILE *in) { - struct aifc_Chunk *result; - size_t numread; - - result = malloc(sizeof (struct aifc_ChunkHeader)); - numread = fread(result, sizeof (struct aifc_ChunkHeader), 1, in); - if (numread == 0) { - free(result); - if (ferror(in)) - fprintf(stderr, "Fread failed.\n"); - return NULL; - } - result = realloc(result, sizeof (struct aifc_ChunkHeader) + - ftol32(result->ckSize)); - numread = fread(&result->ckData, ftol32(result->ckSize), 1, in); - if (numread == 0) { - free(result); - if (ferror(in)) - fprintf(stderr, "Fread failed.\n"); - return NULL; - } - return result; -} - -/* number to increase number of sections by if all preallocated - sections are full */ -#define CHUNK_NUM_INC 5 - -struct aifc_Chunk ** -read_chunks(FILE *in) { - struct aifc_Chunk **chunks; - struct aifc_ContainerChunk *form; - int maxchunks; - int numchunks; - - /* The FORM chunk contains all the other chunks. */ - form = malloc(sizeof (struct aifc_ContainerChunk)); - read_data((char *) form, sizeof (struct aifc_ContainerChunk), in); - if (form->formType != aifc_FormTypeAIFC) { - fprintf(stderr, "File is not an AIFF-C file.\n"); - free(form); - exit(EXIT_FAILURE); - } - free(form); - - numchunks = 0; - maxchunks = 0; - chunks = NULL; - while (1) { - if (numchunks >= maxchunks) { - maxchunks += CHUNK_NUM_INC; - chunks = realloc(chunks, - (maxchunks + 1) * sizeof (struct aifc_Chunk *)); - } - chunks[numchunks] = read_chunk(in); - if (chunks[numchunks] == NULL) - break; - numchunks++; - } - chunks = realloc(chunks, - (numchunks + 1) * sizeof (struct aifc_Chunk *)); - return chunks; -} - -void -free_chunks(struct aifc_Chunk **chunks) { - int i; - - for (i = 0; chunks[i] != NULL; i++) - free(chunks[i]); - free(chunks); -} - -void -convert_aif(FILE *in, FILE *out) { - struct aifc_Chunk **chunks; - struct aifc_FormatVersionChunk *fverChunk; - struct aifc_ExtCommonChunk *commChunk; - struct aifc_SoundDataChunk *ssndChunk; - int i; - - fverChunk = NULL; - commChunk = NULL; - ssndChunk = NULL; - chunks = read_chunks(in); - for (i = 0; chunks[i] != NULL; i++) { - if (chunks[i]->ckID == aifc_FormVersionID && fverChunk == NULL) { - fverChunk = (struct aifc_FormatVersionChunk *) chunks[i]; - } else if (chunks[i]->ckID == aifc_CommonID && commChunk == NULL) { - commChunk = (struct aifc_ExtCommonChunk *) chunks[i]; - } else if (chunks[i]->ckID == aifc_SoundDataID && ssndChunk == NULL) { - ssndChunk = (struct aifc_SoundDataChunk *) chunks[i]; - } - } - if (fverChunk == NULL) { - fprintf(stderr, "No format version chunk found.\n"); - exit(EXIT_FAILURE); - } - if (commChunk == NULL) { - fprintf(stderr, "No common chunk found.\n"); - exit(EXIT_FAILURE); - } - if (ssndChunk == NULL) { - fprintf(stderr, "No sound data chunk found.\n"); - exit(EXIT_FAILURE); - } - fprintf(stderr, "Number of channels: %d\n", - ftol16(commChunk->numChannels)); - fprintf(stderr, "Number of sample frames: %d\n", - ftol32(commChunk->numSampleFrames)); - fprintf(stderr, "Number of bits per sample: %d\n", - ftol16(commChunk->sampleSize)); - fprintf(stderr, "Sample rate: %.2LfHz\n", - ftolld((char *) &commChunk->sampleRate)); - if (ftol16(commChunk->sampleSize) != 16) { - fprintf(stderr, "Only 16-bits files are supported.\n"); - exit(EXIT_FAILURE); - } - if (commChunk->compressionType != aifc_CompressionTypeSDX2) { - fprintf(stderr, "Only SDX2 compression is supported.\n"); - exit(EXIT_FAILURE); - } - write_data(ssndChunk->data + ftol32(ssndChunk->offset), - ftol32(ssndChunk->ckSize) - ftol32(ssndChunk->offset), - ftol16(commChunk->numChannels), out); - free_chunks(chunks); -} - -void -write_data(const uint8_t *data, ssize_t size, int numChannels, FILE *out) { - const uint8_t *srcptr, *endptr; - uint16_t *buffer, *dstptr; - int i; - int16_t *last; - - endptr = data + size; - srcptr = data; - buffer = malloc(size * sizeof (uint16_t)); - dstptr = buffer; - last = malloc(numChannels * sizeof(int16_t)); - memset(last, '\0', numChannels * sizeof(uint16_t)); - while (srcptr < endptr) { - for (i = 0; i < numChannels; i++) { - if (*srcptr & 1) { - *dstptr = last[i] + - ((*(int8_t *)srcptr * abs(*(int8_t *)srcptr)) << 1); - } else - *dstptr = (*(int8_t *)srcptr * abs(*(int8_t *)srcptr)) << 1; - last[i] = *dstptr; - dstptr++; - srcptr++; - } - } - fwrite(buffer, size * sizeof (uint16_t), 1, out); - - free(last); - free(buffer); -} - - Deleted: trunk/tools/aif/aif2raw.h =================================================================== --- trunk/tools/aif/aif2raw.h 2011-05-13 23:55:45 UTC (rev 3608) +++ trunk/tools/aif/aif2raw.h 2011-05-14 17:27:36 UTC (rev 3609) @@ -1,69 +0,0 @@ -#include <stdint.h> - -typedef uint32_t aifc_ID; -typedef uint8_t aifc_Extended[10]; - /* This should actually be a 80-bits integer, but - * long double takes 96 bits, even though only 80 are used */ - -#define aifc_MAKE_ID(x1, x2, x3, x4) \ - (((x4) << 24) | ((x3) << 16) | ((x2) << 8) | (x1)) - -#define aifc_FormID aifc_MAKE_ID('F', 'O', 'R', 'M') -#define aifc_FormVersionID aifc_MAKE_ID('F', 'V', 'E', 'R') -#define aifc_CommonID aifc_MAKE_ID('C', 'O', 'M', 'M') -#define aifc_SoundDataID aifc_MAKE_ID('S', 'S', 'N', 'D') - -#define aifc_FormTypeAIFF aifc_MAKE_ID('A', 'I', 'F', 'F') -#define aifc_FormTypeAIFC aifc_MAKE_ID('A', 'I', 'F', 'C') - -#define aifc_CompressionTypeSDX2 aifc_MAKE_ID('S', 'D', 'X', '2') - -struct aifc_ChunkHeader { - aifc_ID ckID; - uint32_t ckSize; -}; - -struct aifc_Chunk { - aifc_ID ckID; /* Chunk ID */ - uint32_t ckSize; /* Chunk size, excluding header */ - uint8_t ckData[]; /* placeholder for data */ -}; - -struct aifc_ContainerChunk { - aifc_ID ckID; /* "FORM" */ - uint32_t ckSize; /* number of bytes of data */ - aifc_ID formType; /* type of file, "AIFC" */ -}; - -struct aifc_FormatVersionChunk { - aifc_ID ckID; /* "FVER" */ - uint32_t ckSize; /* 4 */ - uint32_t timestamp; /* date of format version, in Mac format */ -}; - - -struct aifc_ExtCommonChunk { - aifc_ID ckID; /* "COMM" */ - uint32_t ckSize; /* size of chunk data */ - uint16_t numChannels; /* number of channels */ - uint32_t numSampleFrames; - /* number of sample frames */ - uint16_t sampleSize; - /* number of bits per sample */ - aifc_Extended sampleRate; - /* number of frames per second */ - aifc_ID compressionType; - /* compression type ID */ - char *compressionName; - /* compression type name */ -} __attribute__ ((packed)); - - -struct aifc_SoundDataChunk { - aifc_ID ckID; /* "SSND" */ - uint32_t ckSize; /* size of chunk data */ - uint32_t offset; /* offset to sound data */ - uint32_t blocksize; /* size of alignment blocks */ - uint8_t data[]; /* placeholder for data */ -}; - Copied: trunk/tools/aif/aif2wav.c (from rev 3596, trunk/tools/aif/aif2raw.c) =================================================================== --- trunk/tools/aif/aif2wav.c (rev 0) +++ trunk/tools/aif/aif2wav.c 2011-05-14 17:27:36 UTC (rev 3609) @@ -0,0 +1,101 @@ +/* + * 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. + */ + +/* + * AIFF to WAVE converter. + * By Serge van den Boom (sv...@st...) 20020816 + * AIFF decoder modularization and WAVE ouput by Alex Volkov (co...@us...) + * + * Doesn't convert all .aif files in general, only AIFF-C, 16 bits + * SDX2-compressed, and AIFF 8-/16-bit PCM. + * + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "aiff.h" +#include "wav.h" + +void convert_aiff_to_wave(aiff_File *aiff, wave_File *wave); + +int +main(int argc, char *argv[]) { + wave_File wave; + aiff_File aiff; + + if (argc != 3) { + fprintf(stderr, "aif2wav <infile> <outfile>\n"); + return EXIT_FAILURE; + } + + if (!aiff_open(&aiff, argv[1])) { + perror("Could not open input file"); + return EXIT_FAILURE; + } + + if (!wave_create(&wave, argv[2])) { + perror("Could not open output file"); + return EXIT_FAILURE; + } + + convert_aiff_to_wave(&aiff, &wave); + + wave_close(&wave); + aiff_close(&aiff); + return EXIT_SUCCESS; +} + +void +convert_aiff_to_wave(aiff_File *aiff, wave_File *wave) { + + uint32_t bufsize; + uint8_t *buf; + uint32_t bytes; + + wave_setFormat(wave, aiff->fmtHdr.channels, aiff->fmtHdr.sampleSize, + aiff->fmtHdr.sampleRate); + + bufsize = 0x10000; + buf = malloc(bufsize); + if (!buf) { + perror("alloc buffer"); + exit(EXIT_FAILURE); + } + + fprintf(stderr, "Number of channels: %u\n", + (unsigned)aiff->fmtHdr.channels); + fprintf(stderr, "Number of sample frames: %u\n", + (unsigned)aiff->fmtHdr.sampleFrames); + fprintf(stderr, "Number of bits per sample: %u\n", + (unsigned)aiff->fmtHdr.sampleSize); + fprintf(stderr, "Sample rate: %d Hz\n", + (int)aiff->fmtHdr.sampleRate); + + for (bytes = aiff_readData(aiff, buf, bufsize); bytes > 0; ) { + if (wave_writeData(wave, buf, bytes) != bytes) { + fprintf(stderr, "Cannot write wave: %s\n", strerror(wave->last_error)); + break; + } + bytes = aiff_readData(aiff, buf, bufsize); + } + if (bytes == 0 && aiff->last_error != 0) + fprintf(stderr, "Cannot read aiff: %s\n", strerror(aiff->last_error)); + + free(buf); +} + Added: trunk/tools/aif/aif2wav.dsp =================================================================== --- trunk/tools/aif/aif2wav.dsp (rev 0) +++ trunk/tools/aif/aif2wav.dsp 2011-05-14 17:27:36 UTC (rev 3609) @@ -0,0 +1,116 @@ +# Microsoft Developer Studio Project File - Name="aif2wav" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=aif2wav - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "aif2wav.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "aif2wav.mak" CFG="aif2wav - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "aif2wav - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "aif2wav - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "aif2wav - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "aif2wav - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# 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 /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "aif2wav - Win32 Release" +# Name "aif2wav - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\aif2wav.c +# End Source File +# Begin Source File + +SOURCE=.\aiff.c +# End Source File +# Begin Source File + +SOURCE=.\aiff.h +# End Source File +# Begin Source File + +SOURCE=.\port.h +# End Source File +# Begin Source File + +SOURCE=.\wav.c +# End Source File +# Begin Source File + +SOURCE=.\wav.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project Property changes on: trunk/tools/aif/aif2wav.dsp ___________________________________________________________________ Added: svn:eol-style + CRLF Modified: trunk/tools/aif/aif2wav.sh =================================================================== --- trunk/tools/aif/aif2wav.sh 2011-05-13 23:55:45 UTC (rev 3608) +++ trunk/tools/aif/aif2wav.sh 2011-05-14 17:27:36 UTC (rev 3609) @@ -1,25 +1,22 @@ #!/bin/sh -AIF2RAW="./aif2raw" -SOX="sox" +AIF2WAV="./aif2wav" echo "Converting all aif files in the current directory to wav files." -echo "This script looks for aif2raw in the current dir. If it's somewhere" -echo "else, edit it to point the variable AIF2RAW to the correct location." -echo "The same goes for sox, which is expected somewhere in the path." +echo "This script looks for aif2wav in the current dir. If it's somewhere" +echo "else, edit it to point the variable AIF2WAV to the correct location." echo "It's just supposed to work once on a specific set of files, and hence" echo "is pretty fragile." -echo "It is assumed that all aif files have a sample rate of 11025." -echo "If this is not the case, files won't be converted correctly." -echo "The sample rate is reported, so you can see if it goes wrong." echo "Press ENTER when ready." read DUMMY -for FILE in *.aif; do +for FILE in `find . -type f -name "*.[aA][iI][fF]"`; do echo "File $FILE" + # This is lame and does not handle "Aif", but I + # do not want to mess with it too much BASE="${FILE%%.aif}" - "$AIF2RAW" "$FILE" "${BASE}.raw" - "$SOX" -c 2 -r 44100 -w -s "${BASE}.raw" "${BASE}.wav" + BASE="${BASE%%.AIF}" + "$AIF2WAV" "$FILE" "${BASE}.wav" echo done Copied: trunk/tools/aif/aiff.c (from rev 3596, trunk/tools/aif/aif2raw.c) =================================================================== --- trunk/tools/aif/aiff.c (rev 0) +++ trunk/tools/aif/aiff.c 2011-05-14 17:27:36 UTC (rev 3609) @@ -0,0 +1,425 @@ +/* + * 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. + */ + +/* AIFF format decoder + * By Serge van den Boom (sv...@st...) 20020816, + * modularization by Alex Volkov (co...@us...) + * + * Doesn't convert all .aif files in general, only 8- and 16-bit PCM and + * AIFF-C 16-bit SDX2-compressed. + * + */ + +#include <stdio.h> +#include <stdlib.h> +#include <memory.h> +#include <errno.h> +#include <assert.h> + +#include "aiff.h" + +static int aiff_decodePCM(aiff_File*, void *buf, uint32_t bufsize); +static int aiff_decodeSDX2(aiff_File*, void *buf, uint32_t bufsize); + + +static bool read_be_16 (FILE *fp, uint16_t *v) +{ + uint8_t buf[2]; + if (fread(buf, sizeof(buf), 1, fp) != 1) + return false; + *v = (buf[0] << 8) | buf[1]; + return true; +} + +static bool read_be_32 (FILE *fp, uint32_t *v) +{ + uint8_t buf[4]; + if (fread(buf, sizeof(buf), 1, fp) != 1) + return false; + *v = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; + return true; +} + +// Read 80-bit IEEE 754 floating point number. +// We are only interested in values that we can work with, +// so using an sint32 here is fine. +static bool read_be_f80(FILE *fp, int32_t *v) +{ + int sign, exp; + int shift; + uint16_t se; + uint32_t mant, mant_low; + if (!read_be_16(fp, &se) || + !read_be_32(fp, &mant) || !read_be_32(fp, &mant_low)) + return false; + + sign = (se >> 15) & 1; // sign is the highest bit + exp = (se & ((1 << 15) - 1)); // exponent is next highest 15 bits +#if 0 // XXX: 80bit IEEE 754 used in AIFF uses explicit mantissa MS bit + // mantissa has an implied leading bit which is typically 1 + mant >>= 1; + if (exp != 0) + mant |= 0x80000000; +#endif + mant >>= 1; // we also need space for sign + exp -= (1 << 14) - 1; // exponent is biased by (2^(e-1) - 1) + shift = exp - 31 + 1; // mantissa is already 31 bits before decimal pt. + if (shift > 0) + mant = 0x7fffffff; // already too big + else if (shift < 0) + mant >>= -shift; + + *v = sign ? -(int32_t)mant : (int32_t)mant; + + return true; +} + +static bool aiff_readFileHeader(aiff_File *aiff, aiff_FileHeader *hdr) +{ + if (!read_be_32(aiff->fp, &hdr->chunk.id) || + !read_be_32(aiff->fp, &hdr->chunk.size) || + !read_be_32(aiff->fp, &hdr->type)) + { + aiff->last_error = errno; + return false; + } + return true; +} + +static bool aiff_readChunkHeader(aiff_File *aiff, aiff_ChunkHeader *hdr) +{ + if (!read_be_32(aiff->fp, &hdr->id) || + !read_be_32(aiff->fp, &hdr->size)) + { + aiff->last_error = errno; + return false; + } + return true; +} + +static int aiff_readCommonChunk(aiff_File *aiff, uint32_t size, aiff_ExtCommonChunk *fmt) +{ + int bytes; + + memset(fmt, sizeof(*fmt), 0); + if (size < AIFF_COMM_SIZE) + { + aiff->last_error = EIO; + return 0; + } + + if (!read_be_16(aiff->fp, &fmt->channels) || + !read_be_32(aiff->fp, &fmt->sampleFrames) || + !read_be_16(aiff->fp, &fmt->sampleSize) || + !read_be_f80(aiff->fp, &fmt->sampleRate)) + { + aiff->last_error = errno; + return 0; + } + bytes = AIFF_COMM_SIZE; + + if (size >= AIFF_EXT_COMM_SIZE) + { + if (!read_be_32(aiff->fp, &fmt->extTypeID)) + { + aiff->last_error = errno; + return 0; + } + bytes += sizeof(fmt->extTypeID); + } + + return bytes; +} + +static bool aiff_readSoundDataChunk(aiff_File *aiff, aiff_SoundDataChunk *data) +{ + if (!read_be_32(aiff->fp, &data->offset) || + !read_be_32(aiff->fp, &data->blockSize)) + { + aiff->last_error = errno; + return false; + } + return true; +} + +bool aiff_open(aiff_File *aiff, const char *filename) +{ + aiff_FileHeader fileHdr; + aiff_ChunkHeader chunkHdr; + uint32_t sdata_size = 0; + long remSize; + + aiff->fp = fopen(filename, "rb"); + if (!aiff->fp) + { + aiff->last_error = errno; + return false; + } + + aiff->data_size = 0; + aiff->max_pcm = 0; + aiff->data_ofs = 0; + memset(&aiff->fmtHdr, 0, sizeof(aiff->fmtHdr)); + memset(aiff->prev_val, sizeof(aiff->prev_val), 0); + + // read the header + if (!aiff_readFileHeader(aiff, &fileHdr)) + { + aiff->last_error = errno; + aiff_close(aiff); + return false; + } + if (fileHdr.chunk.id != aiff_FormID) + { + fprintf(stderr, "aiff_open(): not an aiff file, ID 0x%08x", + (unsigned)fileHdr.chunk.id); + aiff_close(aiff); + return false; + } + if (fileHdr.type != aiff_FormTypeAIFF && fileHdr.type != aiff_FormTypeAIFC) + { + fprintf(stderr, "aiff_open(): unsupported aiff file, Type 0x%08x", + (unsigned)fileHdr.type); + aiff_close(aiff); + return false; + } + + for (remSize = fileHdr.chunk.size - sizeof(aiff_ID); remSize > 0; + remSize -= ((chunkHdr.size + 1) & ~1) + AIFF_CHUNK_HDR_SIZE) + { + if (!aiff_readChunkHeader(aiff, &chunkHdr)) + { + aiff_close(aiff); + return false; + } + + if (chunkHdr.id == aiff_CommonID) + { + int read = aiff_readCommonChunk(aiff, chunkHdr.size, &aiff->fmtHdr); + if (!read) + { + aiff_close(aiff); + return false; + } + fseek(aiff->fp, chunkHdr.size - read, SEEK_CUR); + } + else if (chunkHdr.id == aiff_SoundDataID) + { + aiff_SoundDataChunk data; + if (!aiff_readSoundDataChunk(aiff, &data)) + { + aiff_close(aiff); + return false; + } + sdata_size = chunkHdr.size - AIFF_SSND_SIZE - data.offset; + aiff->data_ofs = ftell(aiff->fp) + data.offset; + fseek(aiff->fp, chunkHdr.size - AIFF_SSND_SIZE, SEEK_CUR); + } + else + { // skip uninteresting chunk + fseek(aiff->fp, chunkHdr.size, SEEK_CUR); + } + + // 2-align the file ptr + fseek(aiff->fp, chunkHdr.size & 1, SEEK_CUR); + } + + if (aiff->fmtHdr.sampleFrames == 0) + { + fprintf(stderr, "aiff_open(): aiff file has no sound data"); + aiff_close(aiff); + return false; + } + + // make bits-per-sample a multiple of 8 + aiff->bits_per_sample = (aiff->fmtHdr.sampleSize + 7) & ~7; + if (aiff->bits_per_sample == 0 || aiff->bits_per_sample > 16) + { // XXX: for now we do not support 24 and 32 bps + fprintf(stderr, "aiff_open(): unsupported sample size %u", + aiff->bits_per_sample); + aiff_close(aiff); + return false; + } + if (aiff->fmtHdr.sampleRate == 0 || aiff->fmtHdr.sampleRate > 480000) + { + fprintf(stderr, "aiff_open(): unsupported sampling rate %ld", + (long)aiff->fmtHdr.sampleRate); + aiff_close(aiff); + return false; + } + + aiff->block_align = aiff->bits_per_sample / 8 * aiff->fmtHdr.channels; + aiff->file_block = aiff->block_align; + if (!aiff->data_ofs) + { + fprintf(stderr, "aiff_open(): bad aiff file, no SSND chunk found"); + aiff_close(aiff); + return false; + } + + if (fileHdr.type == aiff_FormTypeAIFF) + { + if (aiff->fmtHdr.extTypeID != 0) + { + fprintf(stderr, "aiff_open(): unsupported extension 0x%08x", + (unsigned)aiff->fmtHdr.extTypeID); + aiff_close(aiff); + return false; + } + aiff->compType = aifc_None; + } + else if (fileHdr.type == aiff_FormTypeAIFC) + { + if (aiff->fmtHdr.extTypeID != aiff_CompressionTypeSDX2) + { + fprintf(stderr, "aiff_open(): unsupported compression 0x%08x", + (unsigned)aiff->fmtHdr.extTypeID); + aiff_close(aiff); + return false; + } + aiff->compType = aifc_Sdx2; + aiff->file_block /= 2; + + if (aiff->fmtHdr.channels > MAX_CHANNELS) + { + fprintf(stderr, "aiff_open(): number of channels (%u) too large", + (unsigned)aiff->fmtHdr.channels); + aiff_close(aiff); + return false; + } + } + + aiff->data_size = aiff->fmtHdr.sampleFrames * aiff->file_block; + if (sdata_size < aiff->data_size) + { + fprintf(stderr, "aiff_open(): sound data size %u is less than " + "computed %u\n", + (unsigned)sdata_size, (unsigned)aiff->data_size); + aiff->fmtHdr.sampleFrames = sdata_size / aiff->file_block; + aiff->data_size = aiff->fmtHdr.sampleFrames * aiff->file_block; + } + + if (aiff->compType == aifc_Sdx2 && aiff->bits_per_sample != 16) + { + fprintf(stderr, "aiff_open(): unsupported sample size %u for SDX2", + (unsigned)aiff->fmtHdr.sampleSize); + aiff_close(aiff); + return false; + } + + fseek(aiff->fp, aiff->data_ofs, SEEK_SET); + aiff->max_pcm = aiff->fmtHdr.sampleFrames; + aiff->cur_pcm = 0; + aiff->last_error = 0; + + return true; +} + +void aiff_close(aiff_File *aiff) +{ + if (aiff->fp) + { + fclose (aiff->fp); + aiff->fp = NULL; + } +} + +int aiff_readData(aiff_File *aiff, void *buf, uint32_t bufsize) +{ + switch (aiff->compType) + { + case aifc_None: + return aiff_decodePCM(aiff, buf, bufsize); + case aifc_Sdx2: + return aiff_decodeSDX2(aiff, buf, bufsize); + default: + assert(false && "Unknown compession type"); + return 0; + } +} + +static int aiff_decodePCM(aiff_File *aiff, void *buf, uint32_t bufsize) +{ + uint32_t dec_pcm; + uint32_t size; + + dec_pcm = bufsize / aiff->block_align; + if (dec_pcm > aiff->max_pcm - aiff->cur_pcm) + dec_pcm = aiff->max_pcm - aiff->cur_pcm; + + dec_pcm = fread(buf, aiff->file_block, dec_pcm, aiff->fp); + aiff->cur_pcm += dec_pcm; + size = dec_pcm * aiff->block_align; + + if (aiff->bits_per_sample == 8) + { // AIFF files store 8-bit data as signed + // and we need it unsigned + uint8_t* ptr = (uint8_t*)buf; + uint32_t left; + for (left = size; left > 0; --left, ++ptr) + *ptr ^= 0x80; + } + else if (aiff->bits_per_sample == 16) + { // AIFF files store 16-bit data big-endian + // and we need it in machine order + uint8_t* ptr = (uint8_t*)buf; + uint32_t left; + for (left = size / 2; left > 0; --left, ptr += 2) + *(int16_t*)ptr = (ptr[0] << 8) | ptr[1]; + } + + return size; +} + +static int aiff_decodeSDX2(aiff_File *aiff, void* buf, uint32_t bufsize) +{ + uint32_t dec_pcm; + int8_t *src; + int16_t *dst = buf; + uint32_t left; + uint32_t size; + + dec_pcm = bufsize / aiff->block_align; + if (dec_pcm > aiff->max_pcm - aiff->cur_pcm) + dec_pcm = aiff->max_pcm - aiff->cur_pcm; + + src = (int8_t*)buf + bufsize - (dec_pcm * aiff->file_block); + dec_pcm = fread(src, aiff->file_block, dec_pcm, aiff->fp); + aiff->cur_pcm += dec_pcm; + size = dec_pcm * aiff->block_align; + + for (left = dec_pcm; left > 0; --left) + { + int i; + int32_t *prev = aiff->prev_val; + for (i = aiff->fmtHdr.channels; i > 0; --i, ++prev, ++src, ++dst) + { + int32_t v = (*src * abs(*src)) << 1; + if (*src & 1) + v += *prev; + // Saturate the value. This is just a safety measure, as it + // should never be necessary in SDX2. + if (v > 32767) + v = 32767; + else if (v < -32768) + v = -32768; + *prev = v; + *dst = v; + } + } + + return size; +} Copied: trunk/tools/aif/aiff.h (from rev 3596, trunk/tools/aif/aif2raw.h) =================================================================== --- trunk/tools/aif/aiff.h (rev 0) +++ trunk/tools/aif/aiff.h 2011-05-14 17:27:36 UTC (rev 3609) @@ -0,0 +1,122 @@ +/* + * 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. + */ + +/* AIFF format decoder */ + +#ifndef AIFF_H_INCL +#define AIFF_H_INCL + +#include <stdint.h> +#include "port.h" + +typedef uint32_t aiff_ID; + +#define aiff_MAKE_ID(x1, x2, x3, x4) \ + (((x1) << 24) | ((x2) << 16) | ((x3) << 8) | (x4)) + +#define aiff_FormID aiff_MAKE_ID('F', 'O', 'R', 'M') +#define aiff_FormVersionID aiff_MAKE_ID('F', 'V', 'E', 'R') +#define aiff_CommonID aiff_MAKE_ID('C', 'O', 'M', 'M') +#define aiff_SoundDataID aiff_MAKE_ID('S', 'S', 'N', 'D') + +#define aiff_FormTypeAIFF aiff_MAKE_ID('A', 'I', 'F', 'F') +#define aiff_FormTypeAIFC aiff_MAKE_ID('A', 'I', 'F', 'C') + +#define aiff_CompressionTypeSDX2 aiff_MAKE_ID('S', 'D', 'X', '2') + + +typedef struct +{ + aiff_ID id; /* Chunk ID */ + uint32_t size; /* Chunk size, excluding header */ +} aiff_ChunkHeader; + +#define AIFF_CHUNK_HDR_SIZE (4+4) + +typedef struct +{ + aiff_ChunkHeader chunk; + aiff_ID type; +} aiff_FileHeader; + +typedef struct +{ + uint32_t version; /* format version, in Mac format */ +} aiff_FormatVersionChunk; + +typedef struct +{ + uint16_t channels; /* number of channels */ + uint32_t sampleFrames; /* number of sample frames */ + uint16_t sampleSize; /* number of bits per sample */ + int32_t sampleRate; /* number of frames per second */ + /* this is actually stored as IEEE-754 80bit in files */ +} aiff_CommonChunk; + +#define AIFF_COMM_SIZE (2+4+2+10) + +typedef struct +{ + uint16_t channels; /* number of channels */ + uint32_t sampleFrames; /* number of sample frames */ + uint16_t sampleSize; /* number of bits per sample */ + int32_t sampleRate; /* number of frames per second */ + aiff_ID extTypeID; /* compression type ID */ + char extName[32]; /* compression type name */ +} aiff_ExtCommonChunk; + +#define AIFF_EXT_COMM_SIZE (AIFF_COMM_SIZE+4) + +typedef struct +{ + uint32_t offset; /* offset to sound data */ + uint32_t blockSize; /* size of alignment blocks */ +} aiff_SoundDataChunk; + +#define AIFF_SSND_SIZE (4+4) + +typedef enum +{ + aifc_None, + aifc_Sdx2, +} aiff_CompressionType; + +#define MAX_CHANNELS 16 + +typedef struct +{ + // read-only + int last_error; + aiff_ExtCommonChunk fmtHdr; + aiff_CompressionType compType; + + // internal + FILE *fp; + unsigned bits_per_sample; + unsigned block_align; + unsigned file_block; + uint32_t data_ofs; + uint32_t data_size; + uint32_t max_pcm; + uint32_t cur_pcm; + int32_t prev_val[MAX_CHANNELS]; +} aiff_File; + +bool aiff_open(aiff_File*, const char *filename); +void aiff_close(aiff_File*); +int aiff_readData(aiff_File*, void *buf, uint32_t bufsize); + +#endif /* AIFF_H_INCL */ Copied: trunk/tools/aif/wav.c (from rev 3608, trunk/tools/abx/wav.c) =================================================================== --- trunk/tools/aif/wav.c (rev 0) +++ trunk/tools/aif/wav.c 2011-05-14 17:27:36 UTC (rev 3609) @@ -0,0 +1,416 @@ +/* + * 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. + */ + +/* Wave format encoder/decoder */ + +#include <stdio.h> +#include <memory.h> +#include <errno.h> + +#include "wav.h" + + +#define wave_FormatHeader_size 16 +#define wave_ChunkHeader_size 8 + + +static bool read_le_16 (FILE *fp, uint16_t *v) +{ + uint8_t buf[2]; + if (fread(buf, sizeof(buf), 1, fp) != 1) + return false; + *v = (buf[1] << 8) | buf[0]; + return true; +} + +static bool read_le_32 (FILE *fp, uint32_t *v) +{ + uint8_t buf[4]; + if (fread(buf, sizeof(buf), 1, fp) != 1) + return false; + *v = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; + return true; +} + +static bool write_le_16 (FILE *fp, uint16_t v) +{ + uint8_t buf[2]; + buf[0] = v; + buf[1] = v >> 8; + return fwrite(buf, sizeof(buf), 1, fp) == 1; +} + +static bool write_le_32 (FILE *fp, uint32_t v) +{ + uint8_t buf[4]; + buf[0] = v; + buf[1] = v >> 8; + buf[2] = v >> 16; + buf[3] = v >> 24; + return fwrite(buf, sizeof(buf), 1, fp) == 1; +} + +static bool wave_readFileHeader(wave_File *wave, wave_FileHeader *hdr) +{ + if (!read_le_32(wave->fp, &hdr->id) || + !read_le_32(wave->fp, &hdr->size) || + !read_le_32(wave->fp, &hdr->type)) + { + wave->last_error = errno; + return false; + } + return true; +} + +static bool wave_writeFileHeader(wave_File *wave, const wave_FileHeader *hdr) +{ + if (!write_le_32(wave->fp, hdr->id) || + !write_le_32(wave->fp, hdr->size) || + !write_le_32(wave->fp, hdr->type)) + { + wave->last_error = errno; + return false; + } + return true; +} + +static bool wave_readChunkHeader(wave_File *wave, wave_ChunkHeader *chunk) +{ + if (!read_le_32(wave->fp, &chunk->id) || + !read_le_32(wave->fp, &chunk->size)) + { + wave->last_error = errno; + return false; + } + return true; +} + +static bool wave_writeChunkHeader(wave_File *wave, const wave_ChunkHeader *chunk) +{ + if (!write_le_32(wave->fp, chunk->id) || + !write_le_32(wave->fp, chunk->size)) + { + wave->last_error = errno; + return false; + } + return true; +} + +static bool wave_readFormatHeader(wave_File *wave, wave_FormatHeader *fmt) +{ + if (!read_le_16(wave->fp, &fmt->format) || + !read_le_16(wave->fp, &fmt->channels) || + !read_le_32(wave->fp, &fmt->samplesPerSec) || + !read_le_32(wave->fp, &fmt->bytesPerSec) || + !read_le_16(wave->fp, &fmt->blockAlign) || + !read_le_16(wave->fp, &fmt->bitsPerSample)) + { + wave->last_error = errno; + return false; + } + return true; +} + +static bool wave_writeFormatHeader(wave_File *wave, const wave_FormatHeader *fmt) +{ + if (!write_le_16(wave->fp, fmt->format) || + !write_le_16(wave->fp, fmt->channels) || + !write_le_32(wave->fp, fmt->samplesPerSec) || + !write_le_32(wave->fp, fmt->bytesPerSec) || + !write_le_16(wave->fp, fmt->blockAlign) || + !write_le_16(wave->fp, fmt->bitsPerSample)) + { + wave->last_error = errno; + return false; + } + return true; +} + +bool wave_open(wave_File *wave, const char *filename) +{ + wave_FileHeader fileHdr; + wave_ChunkHeader chunkHdr; + long dataLeft; + + memset(wave, 0, sizeof(*wave)); + + wave->fp = fopen(filename, "rb"); + if (!wave->fp) + { + wave->last_error = errno; + return false; + } + + // read wave header + if (!wave_readFileHeader(wave, &fileHdr)) + { + wave->last_error = errno; + wave_close(wave); + return false; + } + if (fileHdr.id != wave_RiffID || fileHdr.type != wave_WaveID) + { + fprintf(stderr, "wave_open(): " + "not a wave file, ID 0x%08x, Type 0x%08x", + (unsigned)fileHdr.id, (unsigned)fileHdr.type); + wave_close(wave); + return false; + } + + for (dataLeft = ((fileHdr.size + 1) & ~1) - 4; dataLeft > 0; + dataLeft -= (((chunkHdr.size + 1) & ~1) + 8)) + { + if (!wave_readChunkHeader(wave, &chunkHdr)) + { + wave_close(wave); + return false; + } + + if (chunkHdr.id == wave_FmtID) + { + if (!wave_readFormatHeader(wave, &wave->fmtHdr)) + { + wave_close(wave); + return false; + } + fseek(wave->fp, chunkHdr.size - 16, SEEK_CUR); + } + else + { + if (chunkHdr.id == wave_DataID) + { + wave->data_size = chunkHdr.size; + wave->data_ofs = ftell(wave->fp); + } + fseek(wave->fp, chunkHdr.size, SEEK_CUR); + } + + // 2-align the file ptr + // XXX: I do not think this is necessary in WAVE files; + // possibly a remnant of ported AIFF reader + fseek(wave->fp, chunkHdr.size & 1, SEEK_CUR); + } + + if (!wave->data_size || !wave->data_ofs) + { + fprintf(stderr, "wave_open(): bad wave file," + " no DATA chunk found"); + wave_close(wave); + return false; + } + + if (wave->fmtHdr.format != WAVE_FORMAT_PCM) + { // not a PCM format + fprintf(stderr, "wave_open(): unsupported format %x", + wave->fmtHdr.format); + wave_close(wave); + return false; + } + + if (dataLeft != 0) + { + fprintf(stderr, "wave_open(): bad or unsupported wave file, " + "size in header does not match read chunks"); + } + + wave->bytesPerSample = (wave->fmtHdr.bitsPerSample + 7) >> 3; + if (wave->bytesPerSample == 3) + { + fprintf(stderr, "wave_open(): 24-bit data is not fully supported\n"); + } + + fseek(wave->fp, wave->data_ofs, SEEK_SET); + wave->max_pcm = wave->data_size / wave->fmtHdr.blockAlign; + wave->cur_pcm = 0; + wave->last_error = 0; + + return true; +} + +static bool wave_writeHeaders(wave_File *wave) +{ + wave_FileHeader fileHdr; + wave_ChunkHeader chunkHdr; + + fileHdr.id = wave_RiffID; + fileHdr.size = 4 + wave_ChunkHeader_size + wave_FormatHeader_size + + wave_ChunkHeader_size + wave->data_size; + fileHdr.type = wave_WaveID; + if (!wave_writeFileHeader(wave, &fileHdr)) + return false; + + chunkHdr.id = wave_FmtID; + chunkHdr.size = wave_FormatHeader_size; + if (!wave_writeChunkHeader(wave, &chunkHdr) || + !wave_writeFormatHeader(wave, &wave->fmtHdr)) + return false; + + chunkHdr.id = wave_DataID; + chunkHdr.size = wave->data_size; + if (!wave_writeChunkHeader(wave, &chunkHdr)) + return false; + + return true; +} + +bool wave_create(wave_File *wave, const char *filename) +{ + memset(wave, 0, sizeof(*wave)); + + wave->fp = fopen(filename, "wb"); + if (!wave->fp) + { + wave->last_error = errno; + return false; + } + + wave->fmtHdr.format = WAVE_FORMAT_PCM; + if (!wave_writeHeaders(wave)) + { + wave->last_error = errno; + return false; + } + + wave->data_ofs = ftell(wave->fp); + wave->writing = true; + return true; +} + +static bool wave_flushHeaders(wave_File *wave) +{ + wave->data_size = wave->max_pcm * wave->fmtHdr.blockAlign; + fseek(wave->fp, 0, SEEK_SET); + if (!wave_writeHeaders(wave)) + { + wave->last_error = errno; + return false; + } + return true; +} + +void wave_close(wave_File *wave) +{ + if (wave->fp) + { + if (wave->writing) + wave_flushHeaders(wave); + + fclose(wave->fp); + } + memset(wave, 0, sizeof(*wave)); +} + +bool wave_setFormat(wave_File *wave, uint16_t chans, uint16_t bitsPerSample, + uint32_t freq) +{ + wave->fmtHdr.format = WAVE_FORMAT_PCM; + wave->fmtHdr.channels = chans; + wave->fmtHdr.bitsPerSample = bitsPerSample; + wave->bytesPerSample = (bitsPerSample + 7) >> 3; + if (wave->bytesPerSample == 3) + { + fprintf(stderr, "wave_setFormat(): 24-bit data is not fully supported\n"); + } + wave->fmtHdr.samplesPerSec = freq; + wave->fmtHdr.blockAlign = wave->bytesPerSample * chans; + wave->fmtHdr.bytesPerSec = wave->fmtHdr.blockAlign * freq; + return true; +} + +uint32_t wave_readData(wave_File *wave, void *buf, uint32_t bufsize) +{ + uint32_t pcm; + uint8_t *ptr = (uint8_t*)buf; + uint32_t size; + uint32_t left; + + pcm = bufsize / wave->fmtHdr.blockAlign; + if (pcm > wave->max_pcm - wave->cur_pcm) + pcm = wave->max_pcm - wave->cur_pcm; + + pcm = fread(buf, wave->fmtHdr.blockAlign, pcm, wave->fp); + wave->cur_pcm += pcm; + size = pcm * wave->fmtHdr.blockAlign; + + // WAVE files store data little-endian and we need it in machine order + // Let the compiler optimize this away if it is not necessary + switch (wave->bytesPerSample) + { + case 2: + for (left = size / 2; left > 0; --left, ptr += 2) + *(int16_t*)ptr = (ptr[1] << 8) | ptr[0]; + break; + + case 3: + // TODO + break; + + case 4: + for (left = size / 4; left > 0; --left, ptr += 4) + *(int32_t*)ptr = (ptr[3] << 24) | (ptr[2] << 16) | (ptr[1] << 8) | ptr[0]; + break; + } + + return size; +} + +uint32_t wave_writeData(wave_File *wave, void *buf, uint32_t bufsize) +{ + uint32_t pcm; + uint8_t *ptr = (uint8_t*)buf; + uint32_t size; + uint32_t left; + + pcm = bufsize / wave->fmtHdr.blockAlign; + + size = pcm * wave->fmtHdr.blockAlign; + // WAVE files store data little-endian and we have it in machine order + // Let the compiler optimize this away if it is not necessary + switch (wave->bytesPerSample) + { + case 2: + for (left = size / 2; left > 0; --left, ptr += 2) + { + int16_t v = *(int16_t*)ptr; + ptr[0] = (v & 0xff); + ptr[1] = (v >> 8); + } + break; + + case 3: + // TODO + break; + + case 4: + for (left = size / 4; left > 0; --left, ptr += 4) + { + int32_t v = *(int32_t*)ptr; + ptr[0] = (v & 0xff); + ptr[1] = (v >> 8); + ptr[2] = (v >> 16); + ptr[3] = (v >> 24); + } + break; + } + + pcm = fwrite(buf, wave->fmtHdr.blockAlign, pcm, wave->fp); + wave->cur_pcm += pcm; + wave->max_pcm = wave->cur_pcm; + size = pcm * wave->fmtHdr.blockAlign; + wave->data_size += size; + + return size; +} Copied: trunk/tools/aif/wav.h (from rev 3608, trunk/tools/abx/wav.h) =================================================================== --- trunk/tools/aif/wav.h (rev 0) +++ trunk/tools/aif/wav.h 2011-05-14 17:27:36 UTC (rev 3609) @@ -0,0 +1,82 @@ +/* + * 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. + */ + +/* Wave format encoder/decoder */ + +#ifndef WAV_H_INCL +#define WAV_H_INCL + +#include <stdint.h> +#include "port.h" + +#define wave_MAKE_ID(x1, x2, x3, x4) \ + (((x4) << 24) | ((x3) << 16) | ((x2) << 8) | (x1)) + +#define wave_RiffID wave_MAKE_ID('R', 'I', 'F', 'F') +#define wave_WaveID wave_MAKE_ID('W', 'A', 'V', 'E') +#define wave_FmtID wave_MAKE_ID('f', 'm', 't', ' ') +#define wave_DataID wave_MAKE_ID('d', 'a', 't', 'a') + +typedef struct +{ + uint32_t id; + uint32_t size; + uint32_t type; +} wave_FileHeader; + +typedef struct +{ + uint16_t format; + uint16_t channels; + uint32_t samplesPerSec; + uint32_t bytesPerSec; + uint16_t blockAlign; + uint16_t bitsPerSample; +} wave_FormatHeader; + +#define WAVE_FORMAT_PCM 1 + +typedef struct +{ + uint32_t id; + uint32_t size; +} wave_ChunkHeader; + +typedef struct +{ + // read-only + wave_FormatHeader fmtHdr; + int last_error; + + // internal + bool writing; + FILE *fp; + unsigned bytesPerSample; + uint32_t data_ofs; + uint32_t data_size; + uint32_t max_pcm; + uint32_t cur_pcm; +} wave_File; + +bool wave_open(wave_File *wave, const char *filename); +bool wave_create(wave_File *wave, const char *filename); +void wave_close(wave_File *wave); +bool wave_setFormat(wave_File *wave, uint16_t chans, uint16_t bitsPerSample, + uint32_t freq); +uint32_t wave_readData(wave_File *wave, void *buf, uint32_t bufsize); +uint32_t wave_writeData(wave_File *wave, void *buf, uint32_t bufsize); + +#endif /* WAV_H_INCL */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <av...@us...> - 2011-05-13 23:55:51
|
Revision: 3608 http://sc2.svn.sourceforge.net/sc2/?rev=3608&view=rev Author: avolkov Date: 2011-05-13 23:55:45 +0000 (Fri, 13 May 2011) Log Message: ----------- Take care of WAVE file byte order wrt machine byte order Modified Paths: -------------- trunk/tools/abx/wav.c trunk/tools/abx/wav.h Modified: trunk/tools/abx/wav.c =================================================================== --- trunk/tools/abx/wav.c 2011-05-13 19:21:24 UTC (rev 3607) +++ trunk/tools/abx/wav.c 2011-05-13 23:55:45 UTC (rev 3608) @@ -219,36 +219,22 @@ wave_close(wave); return false; } - if (wave->fmtHdr.channels != 1 && wave->fmtHdr.channels != 2) - { - fprintf(stderr, "wave_open(): unsupported number of channels %u", - (unsigned)wave->fmtHdr.channels); - wave_close(wave); - return false; - } if (dataLeft != 0) { fprintf(stderr, "wave_open(): bad or unsupported wave file, " "size in header does not match read chunks"); } -#if 0 - wave->format = (wave->fmtHdr.channels == 1 ? - (wave->fmtHdr.bitsPerSample == 8 ? - wava_formats->mono8 : wava_formats->mono16) - : - (wave->fmtHdr.bitsPerSample == 8 ? - wava_formats->stereo8 : wava_formats->stereo16) - ); - wave->frequency = wave->fmtHdr.samplesPerSec; -#endif + wave->bytesPerSample = (wave->fmtHdr.bitsPerSample + 7) >> 3; + if (wave->bytesPerSample == 3) + { + fprintf(stderr, "wave_open(): 24-bit data is not fully supported\n"); + } + fseek(wave->fp, wave->data_ofs, SEEK_SET); wave->max_pcm = wave->data_size / wave->fmtHdr.blockAlign; wave->cur_pcm = 0; -#if 0 - wave->length = (float) wave->max_pcm / wave->fmtHdr.samplesPerSec; -#endif wave->last_error = 0; return true; @@ -333,8 +319,13 @@ wave->fmtHdr.format = WAVE_FORMAT_PCM; wave->fmtHdr.channels = chans; wave->fmtHdr.bitsPerSample = bitsPerSample; + wave->bytesPerSample = (bitsPerSample + 7) >> 3; + if (wave->bytesPerSample == 3) + { + fprintf(stderr, "wave_setFormat(): 24-bit data is not fully supported\n"); + } wave->fmtHdr.samplesPerSec = freq; - wave->fmtHdr.blockAlign = (bitsPerSample / 8) * chans; + wave->fmtHdr.blockAlign = wave->bytesPerSample * chans; wave->fmtHdr.bytesPerSec = wave->fmtHdr.blockAlign * freq; return true; } @@ -342,6 +333,9 @@ uint32_t wave_readData(wave_File *wave, void *buf, uint32_t bufsize) { uint32_t pcm; + uint8_t *ptr = (uint8_t*)buf; + uint32_t size; + uint32_t left; pcm = bufsize / wave->fmtHdr.blockAlign; if (pcm > wave->max_pcm - wave->cur_pcm) @@ -349,20 +343,74 @@ pcm = fread(buf, wave->fmtHdr.blockAlign, pcm, wave->fp); wave->cur_pcm += pcm; - - return pcm * wave->fmtHdr.blockAlign; + size = pcm * wave->fmtHdr.blockAlign; + + // WAVE files store data little-endian and we need it in machine order + // Let the compiler optimize this away if it is not necessary + switch (wave->bytesPerSample) + { + case 2: + for (left = size / 2; left > 0; --left, ptr += 2) + *(int16_t*)ptr = (ptr[1] << 8) | ptr[0]; + break; + + case 3: + // TODO + break; + + case 4: + for (left = size / 4; left > 0; --left, ptr += 4) + *(int32_t*)ptr = (ptr[3] << 24) | (ptr[2] << 16) | (ptr[1] << 8) | ptr[0]; + break; + } + + return size; } uint32_t wave_writeData(wave_File *wave, void *buf, uint32_t bufsize) { uint32_t pcm; + uint8_t *ptr = (uint8_t*)buf; + uint32_t size; + uint32_t left; pcm = bufsize / wave->fmtHdr.blockAlign; + size = pcm * wave->fmtHdr.blockAlign; + // WAVE files store data little-endian and we have it in machine order + // Let the compiler optimize this away if it is not necessary + switch (wave->bytesPerSample) + { + case 2: + for (left = size / 2; left > 0; --left, ptr += 2) + { + int16_t v = *(int16_t*)ptr; + ptr[0] = (v & 0xff); + ptr[1] = (v >> 8); + } + break; + + case 3: + // TODO + break; + + case 4: + for (left = size / 4; left > 0; --left, ptr += 4) + { + int32_t v = *(int32_t*)ptr; + ptr[0] = (v & 0xff); + ptr[1] = (v >> 8); + ptr[2] = (v >> 16); + ptr[3] = (v >> 24); + } + break; + } + pcm = fwrite(buf, wave->fmtHdr.blockAlign, pcm, wave->fp); wave->cur_pcm += pcm; wave->max_pcm = wave->cur_pcm; - wave->data_size += pcm * wave->fmtHdr.blockAlign; - - return pcm * wave->fmtHdr.blockAlign; + size = pcm * wave->fmtHdr.blockAlign; + wave->data_size += size; + + return size; } Modified: trunk/tools/abx/wav.h =================================================================== --- trunk/tools/abx/wav.h 2011-05-13 19:21:24 UTC (rev 3607) +++ trunk/tools/abx/wav.h 2011-05-13 23:55:45 UTC (rev 3608) @@ -64,6 +64,7 @@ // internal bool writing; FILE *fp; + unsigned bytesPerSample; uint32_t data_ofs; uint32_t data_size; uint32_t max_pcm; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |