Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » [Patch] Clothes change
[Patch] Clothes change[message #236398]
|
Sat, 31 October 2009 10:47
|
|
mgl |
|
Messages:255
Registered:December 2007 Location: France |
|
|
Another patch for people who can build stracciatella themselves.
In the tactical screen, press:
SHIFT + V to cycle the available vest palettes of the selected merc.
SHIFT + P to cycle the pants palettes.
It works for the civilians you escort too.
I did nothing in this patch, all the code was already there for a "Palette edit" screen. I have never seen it.
And, as a bonus, the 'j' key will let you climb roofs and jump fences, since I didn't bother to remove this part from the patch. 'j' is stolen from 1.13.
clothes_change.diff:
Index: Build/JAScreens.h
===================================================================
--- Build/JAScreens.h (revision 7056)
+++ Build/JAScreens.h (working copy)
@@ -4,7 +4,13 @@
#include "ScreenIDs.h"
#include "Types.h"
+/* mgl: Clothes change
+ * SOLDIERTYPE, resp PaletteRepID defined there
+ */
+#include "Soldier_Control.h"
+#include "Overhead_Types.h"
+
ScreenID ErrorScreenHandle(void);
ScreenID InitScreenHandle(void);
@@ -38,4 +44,10 @@
ScreenID DemoExitScreenHandle(void);
#endif
+/* mgl: Clothes change
+ * Exported function.
+ * It was a local function called by "PalEditScreenHandle()".
+ */
+void CyclePaletteReplacement(SOLDIERTYPE& s, PaletteRepID pal);
+
#endif
Index: Build/JAScreens.cc
===================================================================
--- Build/JAScreens.cc (revision 7056)
+++ Build/JAScreens.cc (working copy)
@@ -285,7 +285,10 @@
}
-static void CyclePaletteReplacement(SOLDIERTYPE& s, PaletteRepID pal)
+/* mgl: Clothes change
+ * Exported function.
+ */
+void CyclePaletteReplacement(SOLDIERTYPE& s, PaletteRepID pal)
{
UINT8 ubPaletteRep = GetPaletteRepIndexFromID(pal);
const UINT8 ubType = gpPalRep[ubPaletteRep].ubType;
Index: Build/Tactical/Turn_Based_Input.cc
===================================================================
--- Build/Tactical/Turn_Based_Input.cc (revision 7056)
+++ Build/Tactical/Turn_Based_Input.cc (working copy)
@@ -1354,6 +1354,39 @@
case 'g': HandlePlayerTogglingLightEffects(TRUE); break;
case 'h': ShouldTheHelpScreenComeUp(HELP_SCREEN_TACTICAL, TRUE); break;
case 'i': ToggleItemGlow(!gGameSettings.fOptions[TOPTION_GLOW_ITEMS]); break;
+ /* mgl: kbd shortcut 'j' = climb roof. From JA2 v1.13 */
+ case 'j':
+ {
+ SOLDIERTYPE* const s = GetSelectedMan();
+ if (!s) { break; }
+
+ // Prevent the robot, Maria, Joey etc from climbing
+ if (!IsValidStance(s, ANIM_CROUCH)) { break; }
+
+ // Make sure the merc is not collapsed!
+ if (s->bCollapsed && s->bBreath < OKBREATH)
+ {
+ // Merc can't change stance message
+ ScreenMsg(FONT_MCOLOR_LTYELLOW,
+ MSG_UI_FEEDBACK,
+ gzLateLocalizedString[3],
+ s->name);
+ break;
+ }
+
+ if (FindHigherLevel(s))
+ { BeginSoldierClimbUpRoof(s);
+ }
+ else if (FindLowerLevel(s))
+ { BeginSoldierClimbDownRoof(s);
+ }
+ else if (FindFenceJumpDirection(s))
+ { BeginSoldierClimbFence(s);
+ }
+
+ break;
+ } /* case 'j' */
+
case 'k': BeginKeyPanelFromKeyShortcut(); break;
case 'l':
@@ -1561,6 +1594,18 @@
}
break;
+ /* mgl: Clothes change */
+ case 'v':
+ {
+ SOLDIERTYPE* const s = GetSelectedMan();
+ if (!s) { break; }
+ // Anyone except the robot can change clothes
+ if (AM_A_ROBOT(s)) { break; }
+ CyclePaletteReplacement(*s, s->VestPal);
+ break;
+ }
+
+
#ifdef JA2BETAVERSION
case 'l':
{
@@ -1573,6 +1618,17 @@
}
#endif
+ /* mgl: Clothes change */
+ case 'p':
+ {
+ SOLDIERTYPE* const s = GetSelectedMan();
+ if (!s) { break; }
+ // Anyone except the robot can change clothes
+ if (AM_A_ROBOT(s)) { break; }
+ CyclePaletteReplacement(*s, s->PantsPal);
+ break;
+ }
+
case SDLK_F1:
case SDLK_F2:
case SDLK_F3:
Enjoy the trendy pink war vest.
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: Fri Jan 10 20:39:41 GMT+2 2025
Total time taken to generate the page: 0.01084 seconds
|