Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » [Patch] Clothes change
Re: [Patch] Clothes change[message #249501]
|
Fri, 16 April 2010 20:17
|
|
mgl |
|
Messages:255
Registered:December 2007 Location: France |
|
|
You can do a desperate try with the "--binary" command line option on a CR/LF diff file and CR/LF source code files: patch -p0 --verbose --binary --dry-run < clothes_change.diff
The "--dry-run" option will make the patch program simulate the update without really updating anything and the "verbose" option will show more output. See if it looks better.
Another solution is to have your source code tree in Unix LF text format. The only change is that Windows editors will display source code files on a single line. You can convert them by hand with tools like unix2dos/dos2unix or todos/fromdos but it may not be reasonable to do it on the many (4 ?) source code files that the "change_clothes" patch updates.
You would rather edit your subversion configuration file and change the svn:eol-style property to have this:
### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
###
###
###
###
###
*.c = svn:eol-style=LF
*.cpp = svn:eol-style=LF
*.h = svn:eol-style=LF
# *.dsp = svn:eol-style=CRLF
# *.dsw = svn:eol-style=CRLF
*.sh = svn:eol-style=native;svn:executable
*.txt = svn:eol-style=LF
# *.png = svn:mime-type=image/png
# *.jpg = svn:mime-type=image/jpeg
Makefile = svn:eol-style=LF
LF for all the source files: *.h, *.cpp and *.c (I doubt there are still .c files in stracciatella).
If you use TortoiseSVN, it's in the menu TortoiseSVN->Settings, where you have a button "Edit Subversion configuration file". The next time you check out from Mythrell's or Tron's repositories, your source code files will be converted to Unix text file format.
To check that it would work, if you wish, instead of the bigger "Clothes change" patch, try on this content before you update your subversion configuration file:
Jake_sells_CAWS_ammo.diff:
Index: Build/Tactical/Arms_Dealer_Init.cc
===================================================================
--- Build/Tactical/Arms_Dealer_Init.cc (revision 7059)
+++ Build/Tactical/Arms_Dealer_Init.cc (working copy)
@@ -498,6 +498,16 @@
// gas is restocked regularly, unlike most items
GuaranteeAtLeastXItemsOfIndex( ARMS_DEALER_JAKE, GAS_CAN, ( UINT8 ) ( 4 + Random( 3 ) ) );
}
+
+ /* mgl: Jake sells CAWS ammo if Maddog was recruited */
+ if (gMercProfiles[MADDOG].ubMiscFlags & PROFILE_MISC_FLAG_RECRUITED)
+ {
+ GuaranteeAtLeastXItemsOfIndex(ARMS_DEALER_JAKE,
+ Random(2) ? CLIPCAWS_10_SAP
+ : CLIPCAWS_10_FLECH,
+ 1 + Random(3)
+ );
+ }
//If the player hasn't bought a video camera from Franz yet, make sure Franz has one to sell
if( !( gArmsDealerStatus[ ARMS_DEALER_FRANZ ].ubSpecificDealerFlags & ARMS_DEALER_FLAG__FRANZ_HAS_SOLD_VIDEO_CAMERA_TO_PLAYER ) )
This patch is only two lines of code and updates only one file: 'Build/Tactical/Arms_Dealer_Init.cc'.
It makes Jake start to sell clips for the CAWS if you hire Maddog.
You should copy and paste this content to a file 'Jake_sells_CAWS_ammo.diff' at the root of your straciatella source tree as either a CR/LF or LF only text file.
Convert the source code file 'Build/Tactical/Arms_Dealer_Init.cc' to Unix (LF) format with the tool of your choice. As a tip, it should be smaller than originally when converted to unix text format.
Now that you have the diff file in any format and the source code file in LF format, cd to the root of your straciatella tree and type: patch -p0 --verbose --dry-run < Jake_sells_CAWS_ammo.diff And watch if it would fail or not. Try to change the text format of the diff file if it fails.
Report message to a moderator
|
|
|
|
|
|
[Patch] Clothes change
By: mgl on Sat, 31 October 2009 10:47
|
|
|
Re: [Patch] Clothes change
|
|
|
Re: [Patch] Clothes change
By: mgl on Fri, 16 April 2010 00:28
|
|
|
Re: [Patch] Clothes change
By: mgl on Fri, 16 April 2010 13:58
|
|
|
Re: [Patch] Clothes change
|
|
|
Re: [Patch] Clothes change
By: mgl on Fri, 16 April 2010 20:17
|
|
|
Re: [Patch] Clothes change
|
|
|
Re: [Patch] Clothes change
By: Mythrell on Fri, 16 April 2010 21:52
|
|
|
Re: [Patch] Clothes change
|
|
|
Re: [Patch] Clothes change
By: lockie on Sat, 17 April 2010 21:43
|
|
|
Re: [Patch] Clothes change
By: cdudau on Sat, 17 April 2010 22:45
|
|
|
Re: [Patch] Clothes change
By: mgl on Sat, 17 April 2010 23:47
|
|
|
Re: [Patch] Clothes change
By: mgl on Sun, 18 April 2010 10:19
|
|
|
Re: [Patch] Clothes change
|
|
|
Re: [Patch] Clothes change
By: mgl on Sun, 18 April 2010 19:35
|
|
|
Re: [Patch] Clothes change
By: mgl on Sun, 25 April 2010 00:10
|
|
|
Re: [Patch] Clothes change
By: Tron on Tue, 04 May 2010 10:52
|
|
|
Re: [Patch] Clothes change
By: mgl on Tue, 04 May 2010 23:24
|
|
|
Re: [Patch] Clothes change
By: Tron on Wed, 05 May 2010 08:26
|
|
|
Re: [Patch] Clothes change
By: mgl on Thu, 06 May 2010 22:20
|
|
|
Re: [Patch] Clothes change
By: Tron on Sun, 16 May 2010 21:43
|
|
|
Re: [Patch] Clothes change
By: mgl on Sun, 16 May 2010 22:52
|
|
|
Re: [Patch] Clothes change
By: Tron on Sun, 16 May 2010 23:05
|
|
|
Re: [Patch] Clothes change
By: mgl on Sun, 16 May 2010 23:38
|
|
|
Re: [Patch] Clothes change
By: Tron on Mon, 17 May 2010 00:03
|
|
|
Re: [Patch] Clothes change
By: mgl on Mon, 17 May 2010 00:44
|
|
|
Re: [Patch] Clothes change
By: Tron on Mon, 17 May 2010 07:16
|
Goto Forum:
Current Time: Sat Jan 25 18:53:33 GMT+2 2025
Total time taken to generate the page: 0.01565 seconds
|