Mods Repo Gear Shop JAGalaxy.com FB Page IRC Channel

Who's Online
5 registered (Strohmann, DepressivesBrot, StaticZ, 2 invisible), 24 Guests and 20 Spiders online.
Key: Admin, Global Mod, Mod
Topic Options
Rate This Topic
#257470 - 25/07/2010 bold border on the inventory items

Kokkolar
private 1st class
Registered: 21/07/2010
Posts: 18
Loc: Russia
How i can dissable this horrible shadows behind items in inventory? (7059hotfix3)



Left side of the picture - JA2stracc(look at the MAC-10, they are so fatty because of shadows), right side - original 1.12
Top
#257474 - 25/07/2010 Re: bold border on the inventory items [Re: Kokkolar]

Kaerar
Drifter
Brigadier General
Registered: 13/01/2003
Posts: 6580
Loc: Australia :D
It's not the shadows it's the borders. Why they are there I cannot fathom unless it was activated using the highlight mechanism.
_________________________
It is a mistake to think you can solve any major problems just with potatoes.
-Douglas Adams
Top
#257506 - 25/07/2010 Re: bold border on the inventory items [Re: Kaerar]

mgl

master sgt
Registered: 29/12/2007
Posts: 281
Loc: France
My stracciatella looks like your vanilla ja2.

I don't know how you managed to draw a black border around your items. I changed the highlight of the items on the ground to dark grey in my version and didn't notice a border/highlight for the inventory in the source code files when I did that.
Top
#257524 - 26/07/2010 Re: bold border on the inventory items [Re: mgl]

Marlboro Man

Major General
Registered: 12/10/2005
Posts: 7801
Loc: USA
There is a setting in the game menu to turn that on and off with. wink
_________________________
You smell that?
Top
#257532 - 26/07/2010 Re: bold border on the inventory items [Re: Marlboro Man]

tao
A man who doesn't spend time with his family can never be a real man. -Vito Corleone
Major
Registered: 03/08/2009
Posts: 4126
Loc: The Known Universe
@Marbs

Happy Birthday old man!
_________________________
The journey is the reward...
He who knows he has enough is rich...
T.A.O. E.I.

tao
playboy
Top
#257545 - 26/07/2010 Re: bold border on the inventory items [Re: tao]

Marlboro Man

Major General
Registered: 12/10/2005
Posts: 7801
Loc: USA
Thanks wink
_________________________
You smell that?
Top
#257561 - 26/07/2010 Re: bold border on the inventory items [Re: Marlboro Man]

Kaerar
Drifter
Brigadier General
Registered: 13/01/2003
Posts: 6580
Loc: Australia :D
Happy B'day mate smile
_________________________
It is a mistake to think you can solve any major problems just with potatoes.
-Douglas Adams
Top
#257571 - 26/07/2010 Re: bold border on the inventory items [Re: Kaerar]

mgl

master sgt
Registered: 29/12/2007
Posts: 281
Loc: France
I think it's more a problem in the code with the outline function and the compiler from Microsoft than a setting. The outline function uses the "TRANSPARENT" keyword (as a palette index or a colour value for a pixel, I don't know yet), which is another name for 0. It seems that MSVC uses that keyword too, but as a name for another value than 0.

BirdFlu noticed the problem with "TRANSPARENT" and MSVC some time ago. But his fix was not included in svn.
If 7059hotfix3 was built with MSVC, it's probably the problem.

@BirdFlu
Do you have a diff file rather than the painful list of changes to do by hand that I linked ?


*Edit:*
I did the diff file myself from the SMP project files:
TRANSPARENT is now called TRANSPARENT_INDEX as suggested by BirdFlu
INPUT_MOUSE is now called SGP_INPUT_MOUSE (unrelated to this problem but related to MSVC).

The updated files are:
Build/Laptop/AIMMembers.cc
Build/Laptop/Personnel.cc
Build/Tactical/Interface_Items.cc
Build/Tactical/ShopKeeper_Interface.cc
Build/Tactical/Interface_Panels.cc
Build/Editor/EditorItems.cc
Build/Editor/EditorMercs.cc
Build/Strategic/Map_Screen_Interface_Map_Inventory.cc
Build/Strategic/MapScreen.cc
Build/TileEngine/RenderWorld.cc
sgp/Cursor_Control.cc
sgp/VObject_Blitters.cc
sgp/Types.h
Build/GameLoop.cc
sgp/Input.h

The diff file for people who can build the program themselves: "keywords_MSVC.diff"
It's rather big and I had to remove several chunks which were parts of some of my patches, two reasons why I'm not sure that the "patch" program will be successful.
I will host it somewhere with my other fixes which were not included to stracciatella.
Code:
Index: Build/Laptop/AIMMembers.cc
===================================================================
--- Build/Laptop/AIMMembers.cc	(revision 7065)
+++ Build/Laptop/AIMMembers.cc	(working copy)
@@ -896,7 +896,7 @@
 		// Blt the shadow of the item
 		BltVideoObjectOutlineShadow(FRAME_BUFFER, &item_vo, item.ubGraphicNum, sCenX - 2, sCenY + 2);
 		// Blt the item
-		BltVideoObjectOutline(      FRAME_BUFFER, &item_vo, item.ubGraphicNum, sCenX,     sCenY, TRANSPARENT);
+		BltVideoObjectOutline(      FRAME_BUFFER, &item_vo, item.ubGraphicNum, sCenX,     sCenY, TRANSPARENT_INDEX);
 
 		/* If there are more then 1 piece of equipment in the current slot, display
 		 * how many there are */


Index: Build/Laptop/Personnel.cc
===================================================================
--- Build/Laptop/Personnel.cc	(revision 7065)
+++ Build/Laptop/Personnel.cc	(working copy)
@@ -1163,7 +1163,7 @@
 		ETRLEObject const& pTrav = gfx.SubregionProperties(item.ubGraphicNum);
 		INT16       const  cen_x = PosX + abs(57 - pTrav.usWidth)  / 2 - pTrav.sOffsetX;
 		INT16       const  cen_y = PosY + abs(22 - pTrav.usHeight) / 2 - pTrav.sOffsetY;
-		BltVideoObjectOutline(FRAME_BUFFER, &gfx, item.ubGraphicNum, cen_x, cen_y, TRANSPARENT);
+		BltVideoObjectOutline(FRAME_BUFFER, &gfx, item.ubGraphicNum, cen_x, cen_y, TRANSPARENT_INDEX);
 
 		SetFontDestBuffer(FRAME_BUFFER);
 


Index: Build/Tactical/Interface_Items.cc
===================================================================
--- Build/Tactical/Interface_Items.cc	(revision 7065)
+++ Build/Tactical/Interface_Items.cc	(working copy)
@@ -800,7 +800,7 @@
 	MOUSE_REGION&     r      = gSMInvRegion[pocket];
 
 	bool   hatch_out = false;
-	UINT16 outline   = TRANSPARENT;
+	UINT16 outline   = TRANSPARENT_INDEX;
 	if (dirty_level == DIRTYLEVEL2)
 	{
 		wchar_t buf[150];
@@ -2296,7 +2308,7 @@
 				INT16 const item_y = agi.item_box.y + y;
 				INT16 const item_w = agi.item_box.w;
 				INT16 const item_h = agi.item_box.h;
-				INVRenderItem(guiSAVEBUFFER, NULL, obj, item_x, item_y, item_w, item_h, DIRTYLEVEL2, RENDER_ITEM_ATTACHMENT1 + i, TRANSPARENT);
+				INVRenderItem(guiSAVEBUFFER, NULL, obj, item_x, item_y, item_w, item_h, DIRTYLEVEL2, RENDER_ITEM_ATTACHMENT1 + i, TRANSPARENT_INDEX);
 
 				INT16 const bar_x = agi.bar_box.x + x;
 				INT16 const bar_h = agi.bar_box.h;
@@ -3870,7 +3891,7 @@
 			INT16 sX = gsItemPopupX + cnt * usWidth + 11;
 			INT16 sY = gsItemPopupY + 3;
 
-			INVRenderItem(FRAME_BUFFER, NULL, *gpItemPopupObject, sX, sY, 29, 23, DIRTYLEVEL2, RENDER_ITEM_NOSTATUS, TRANSPARENT);
+			INVRenderItem(FRAME_BUFFER, NULL, *gpItemPopupObject, sX, sY, 29, 23, DIRTYLEVEL2, RENDER_ITEM_NOSTATUS, TRANSPARENT_INDEX);
 
 			// Do status bar here...
 			INT16 sNewX = gsItemPopupX + cnt * usWidth + 7;
@@ -4047,7 +4068,7 @@
 		o.usItem            = FIRST_KEY + LockTable[key->ubKeyID].usKeyItem;
 
 		DrawItemUIBarEx(o, 0, x + 7, y + 24, ITEM_BAR_HEIGHT, Get16BPPColor(STATUS_BAR), Get16BPPColor(STATUS_BAR_SHADOW), FRAME_BUFFER);
-		INVRenderItem(FRAME_BUFFER, NULL, o, x + 8, y, box_w - 8, box_h - 2, DIRTYLEVEL2, 0, TRANSPARENT);
+		INVRenderItem(FRAME_BUFFER, NULL, o, x + 8, y, box_w - 8, box_h - 2, DIRTYLEVEL2, 0, TRANSPARENT_INDEX);
 	}
 
 	InvalidateRegion(dx, dy, dx + gsKeyRingPopupInvWidth, dy + gsKeyRingPopupInvHeight);
@@ -4731,7 +4752,7 @@
 			// ATE: Adjust to basic shade.....
 			te->hTileSurface->CurrentShade(4);
 
-			UINT16 const outline = (menu.pfSelectedArray[cnt + menu.ubScrollAnchor] ? outline_col : TRANSPARENT);
+			UINT16 const outline = (menu.pfSelectedArray[cnt + menu.ubScrollAnchor] ? outline_col : TRANSPARENT_INDEX);
 			Blt8BPPDataTo16BPPBufferOutline(pDestBuf, uiDestPitchBYTES, te->hTileSurface, sX, sY, te->usRegionIndex, outline);
 
 			if (o.ubNumberOfObjects > 1)


Index: Build/Tactical/ShopKeeper_Interface.cc
===================================================================
--- Build/Tactical/ShopKeeper_Interface.cc	(revision 7065)
+++ Build/Tactical/ShopKeeper_Interface.cc	(working copy)
@@ -2053,7 +2053,7 @@
 	}
 	else if (gubSkiDirtyLevel != SKI_DIRTY_LEVEL0)
 	{
-		outline = TRANSPARENT;
+		outline = TRANSPARENT_INDEX;
 	}
 	else
 	{ // The item is not highlighted and we are not rerendering the screen


Index: Build/Tactical/Interface_Panels.cc
===================================================================
--- Build/Tactical/Interface_Panels.cc	(revision 7065)
+++ Build/Tactical/Interface_Panels.cc	(working copy)
@@ -2946,7 +2946,7 @@
 	}
 	else
 	{ // Look in primary hand
-		INVRenderItem(buf, &s, s.inv[HANDPOS], x, y, w, h, dirty_level, 0, TRANSPARENT);
+		INVRenderItem(buf, &s, s.inv[HANDPOS], x, y, w, h, dirty_level, 0, TRANSPARENT_INDEX);
 	}
 
 	y += TM_INV_HAND_SEPY;
@@ -2957,7 +2957,7 @@
 	}
 	else
 	{ // Do secondary hand
-		INVRenderItem(buf, &s, s.inv[SECONDHANDPOS], x, y, w, h, dirty_level, 0, TRANSPARENT);
+		INVRenderItem(buf, &s, s.inv[SECONDHANDPOS], x, y, w, h, dirty_level, 0, TRANSPARENT_INDEX);
 	}
 }
 


Index: Build/Editor/EditorItems.cc
===================================================================
--- Build/Editor/EditorItems.cc	(revision 7065)
+++ Build/Editor/EditorItems.cc	(working copy)
@@ -316,7 +316,7 @@
 			swprintf(pStr, lengthof(pStr), L"%hs", LockTable[i].ubEditorName);
 			DisplayWrappedString(x, y + 25, 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, CENTER_JUSTIFIED | MARK_DIRTY);
 
-			DrawItemCentered(Item[item_id], eInfo.uiBuffer, x, y + 2, TRANSPARENT);
+			DrawItemCentered(Item[item_id], eInfo.uiBuffer, x, y + 2, TRANSPARENT_INDEX);
 
 			//cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)...
 			if( y == 0 )
@@ -444,7 +444,7 @@
 				}
 				DisplayWrappedString(x, y + 25, 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, CENTER_JUSTIFIED | MARK_DIRTY);
 
-				DrawItemCentered(*item, eInfo.uiBuffer, x, y + 2, TRANSPARENT);
+				DrawItemCentered(*item, eInfo.uiBuffer, x, y + 2, TRANSPARENT_INDEX);
 
 				//cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)...
 				if( y == 0 )


Index: Build/Editor/EditorMercs.cc
===================================================================
--- Build/Editor/EditorMercs.cc	(revision 7065)
+++ Build/Editor/EditorMercs.cc	(working copy)
@@ -2163,7 +2163,7 @@
 	//now draw the fullsize item into the temp buffer
 	INVTYPE    const& item = Item[gusMercsNewItemIndex];
 	SGPVObject const& vo   = GetInterfaceGraphicForItem(item);
-	BltVideoObjectOutline(uiSrcID, &vo, item.ubGraphicNum, 0, 0, TRANSPARENT);
+	BltVideoObjectOutline(uiSrcID, &vo, item.ubGraphicNum, 0, 0, TRANSPARENT_INDEX);
 
 	//crop the source image
 	ETRLEObject const& pObject    = vo.SubregionProperties(item.ubGraphicNum);


Index: Build/Strategic/Map_Screen_Interface_Map_Inventory.cc
===================================================================
--- Build/Strategic/Map_Screen_Interface_Map_Inventory.cc	(revision 7065)
+++ Build/Strategic/Map_Screen_Interface_Map_Inventory.cc	(working copy)
@@ -205,7 +205,7 @@
 
 	SetFontDestBuffer(guiSAVEBUFFER);
 	const SGPBox* const item_box = &g_sector_inv_item_box;
-	const UINT16        outline  = (fMapInventoryItemCompatable[iCurrentSlot] ? Get16BPPColor(FROMRGB(255, 255, 255)) : TRANSPARENT);
+	const UINT16        outline  = (fMapInventoryItemCompatable[iCurrentSlot] ? Get16BPPColor(FROMRGB(255, 255, 255)) : TRANSPARENT_INDEX);
 	INVRenderItem(guiSAVEBUFFER, NULL, item->o, dx + item_box->x, dy + item_box->y, item_box->w, item_box->h, DIRTYLEVEL2, 0, outline);
 
 	// draw bar for condition

Index: Build/Strategic/MapScreen.cc
===================================================================
--- Build/Strategic/MapScreen.cc	(revision 7065)
+++ Build/Strategic/MapScreen.cc	(working copy)
@@ -712,7 +712,7 @@
 	SOLDIERTYPE const* const s = GetSelectedInfoChar();
 	if (!s || s->bLife == 0) return;
 
-	INVRenderItem(guiSAVEBUFFER, s, s->inv[HANDPOS], SOLDIER_HAND_X, SOLDIER_HAND_Y, 58, 23, DIRTYLEVEL2, 0, TRANSPARENT);
+	INVRenderItem(guiSAVEBUFFER, s, s->inv[HANDPOS], SOLDIER_HAND_X, SOLDIER_HAND_Y, 58, 23, DIRTYLEVEL2, 0, TRANSPARENT_INDEX);
 }
 
 


Index: Build/TileEngine/RenderWorld.cc
===================================================================
--- Build/TileEngine/RenderWorld.cc	(revision 7065)
+++ Build/TileEngine/RenderWorld.cc	(working copy)
@@ -1280,7 +1285,7 @@
 								}
 								else if (bBlitClipVal == TRUE)
 								{
-									Blt8BPPDataTo16BPPBufferOutlineClip(pDestBuf, uiDestPitchBYTES, hVObject, sXPos, sYPos, usImageIndex, TRANSPARENT, &gClippingRect);
+									Blt8BPPDataTo16BPPBufferOutlineClip(pDestBuf, uiDestPitchBYTES, hVObject, sXPos, sYPos, usImageIndex, TRANSPARENT_INDEX, &gClippingRect);
 								}
 							}
 						}


Index: sgp/Cursor_Control.cc
===================================================================
--- sgp/Cursor_Control.cc	(revision 7065)
+++ sgp/Cursor_Control.cc	(working copy)
@@ -206,7 +206,7 @@
 			UINT16      const  usEffHeight = pTrav.usHeight + pTrav.sOffsetY;
 			UINT16      const  usEffWidth  = pTrav.usWidth  + pTrav.sOffsetX;
 
-			BltVideoObjectOutline(MOUSE_BUFFER, guiExternVo, gusExternVoSubIndex, 0, 0, TRANSPARENT);
+			BltVideoObjectOutline(MOUSE_BUFFER, guiExternVo, gusExternVoSubIndex, 0, 0, TRANSPARENT_INDEX);
 
 			// Hook into hook function
 			if (gMouseBltOverride != NULL) gMouseBltOverride();


Index: sgp/VObject_Blitters.cc
===================================================================
--- sgp/VObject_Blitters.cc	(revision 7065)
+++ sgp/VObject_Blitters.cc	(working copy)
@@ -6653,7 +6653,7 @@
 }
 
 
-// ATE New blitter for rendering a differrent color for value 254. Can be transparent if outline is TRANSPARENT
+// ATE New blitter for rendering a differrent color for value 254. Can be transparent if outline is TRANSPARENT_INDEX
 void Blt8BPPDataTo16BPPBufferOutline(UINT16* const buf, UINT32 const uiDestPitchBYTES, SGPVObject const* const hSrcVObject, INT32 const iX, INT32 const iY, UINT16 const usIndex, INT16 const outline)
 {
 	Assert(hSrcVObject);
@@ -6699,7 +6699,7 @@
 				{
 					*dst = pal[px];
 				}
-				else if (outline != TRANSPARENT)
+				else if (outline != TRANSPARENT_INDEX)
 				{
 					*dst = outline;
 				}
@@ -6783,7 +6783,7 @@
 }
 
 
-// ATE New blitter for rendering a differrent color for value 254. Can be transparent if s16BPPColor is TRANSPARENT
+// ATE New blitter for rendering a differrent color for value 254. Can be transparent if s16BPPColor is TRANSPARENT_INDEX
 void Blt8BPPDataTo16BPPBufferOutlineClip(UINT16* const pBuffer, const UINT32 uiDestPitchBYTES, const SGPVObject* const hSrcVObject, const INT32 iX, const INT32 iY, const UINT16 usIndex, const INT16 s16BPPColor, const SGPRect* const clipregion)
 {
 	UINT32 Unblitted;
@@ -6920,7 +6920,7 @@
 					{
 						*(UINT16*)DestPtr = p16BPPPalette[src];
 					}
-					else if (s16BPPColor != TRANSPARENT)
+					else if (s16BPPColor != TRANSPARENT_INDEX)
 					{
 						*(UINT16*)DestPtr = s16BPPColor;
 					}


Index: sgp/Types.h
===================================================================
--- sgp/Types.h	(revision 7065)
+++ sgp/Types.h	(working copy)
@@ -140,7 +140,7 @@
 typedef SGPFile* HWFILE;
 
 
-#define TRANSPARENT ((UINT16)0)
+#define TRANSPARENT_INDEX ((UINT16)0)
 
 
 #ifdef __cplusplus

Index: Build/GameLoop.cc
===================================================================
--- Build/GameLoop.cc	(revision 7065)
+++ Build/GameLoop.cc	(working copy)
@@ -208,7 +208,7 @@
 	MouseSystemHook(MOUSE_POS, MousePos.iX, MousePos.iY);
 	MusicPoll();
 
-  while (DequeueSpecificEvent(&InputEvent, INPUT_MOUSE))
+  while (DequeueSpecificEvent(&InputEvent, SGP_INPUT_MOUSE))
   {
 		MouseSystemHook(InputEvent.usEvent, MousePos.iX, MousePos.iY);
 	}


Index: sgp/Input.h
===================================================================
--- sgp/Input.h	(revision 7065)
+++ sgp/Input.h	(working copy)
@@ -18,7 +18,7 @@
 #define MOUSE_POS									0x0400
 #define MOUSE_WHEEL_UP      0x0800
 #define MOUSE_WHEEL_DOWN    0x1000
-#define INPUT_MOUSE         0x1FF8
+#define SGP_INPUT_MOUSE         0x1FF8
 
 #define SHIFT_DOWN								0x01
 #define CTRL_DOWN									0x02




Edited by mgl (26/07/2010)
Top
#257630 - 27/07/2010 Re: bold border on the inventory items [Re: mgl]

Tron

master sgt
Registered: 07/08/2007
Posts: 296
Loc: Germany
The problem should be resolved now (r7068). Thanks for reporting this issue.
_________________________
Jagged Alliance 2 - Stracciatella - Bringing JA2 to SDL and everywhere
Top
#257674 - 27/07/2010 Re: bold border on the inventory items [Re: Tron]

mgl

master sgt
Registered: 29/12/2007
Posts: 281
Loc: France
You could have taken the names already used for several months by SMP. It's 20 or more conflicting files to solve by hand to update to the head revision of subversion for nothing new in my working copy. When you're behind, you follow.
Top
#257715 - 28/07/2010 Re: bold border on the inventory items [Re: mgl]

BirdFlu
first sergeant
Registered: 01/09/2007
Posts: 680
Loc: Lampukistan
Hey Tron, while you are at it. There is another name clash with the MinGW compiler. The struct GROUP is defined in windows.h (i think). Error only occurs when you somehow include the windows header where the struct GROUP is also used. I renamed it to JA2_GROUP. I don't particularly like that name, but i couldn't come up with a better one.

Here is the (somewhat large) diff
Top

Moderator:  mgl, Off_Topic, Tron 

Forum Stats
11422 Members
88 Forums
7492 Topics
136043 Posts

Max Online: 345 @ 01/05/2012
Copyright 2000-2013 Bear's Pit