Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » bold border on the inventory items
bold border on the inventory items[message #257470] Sun, 25 July 2010 18:06 Go to next message
Kokkolar is currently offline Kokkolar

 
Messages:18
Registered:July 2010
Location: Russia
How i can dissable this horrible shadows behind items in inventory? (7059hotfix3)

http://img59.imageshack.us/img59/1027/ja2stracc.th.png

Left side of the picture - JA2stracc(look at the MAC-10, they are so fatty because of shadows), right side - original 1.12

Report message to a moderator

Private
Re: bold border on the inventory items[message #257474] Sun, 25 July 2010 18:48 Go to previous messageGo to next message
Kaerar is currently offline Kaerar

 
Messages:2017
Registered:January 2003
Location: 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.

Report message to a moderator

Lieutenant

Re: bold border on the inventory items[message #257506] Sun, 25 July 2010 23:33 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: 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.

Report message to a moderator

Master Sergeant
Re: bold border on the inventory items[message #257524] Mon, 26 July 2010 01:46 Go to previous messageGo to next message
Marlboro Man

 
Messages:1155
Registered:October 2005
Location: USA
There is a setting in the game menu to turn that on and off with. Wink

Report message to a moderator

Sergeant Major

Re: bold border on the inventory items[message #257532] Mon, 26 July 2010 04:49 Go to previous messageGo to next message
Guest
@Marbs

Happy Birthday old man!

Report message to a moderator

Re: bold border on the inventory items[message #257545] Mon, 26 July 2010 08:54 Go to previous messageGo to next message
Marlboro Man

 
Messages:1155
Registered:October 2005
Location: USA
Thanks Wink

Report message to a moderator

Sergeant Major

Re: bold border on the inventory items[message #257561] Mon, 26 July 2010 13:57 Go to previous messageGo to next message
Kaerar is currently offline Kaerar

 
Messages:2017
Registered:January 2003
Location: Australia :D
Happy B'day mate Smile

Report message to a moderator

Lieutenant

Re: bold border on the inventory items[message #257571] Mon, 26 July 2010 17:04 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: 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.
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


[Updated on: Mon, 26 July 2010 20:50] by Moderator

Report message to a moderator

Master Sergeant
Re: bold border on the inventory items[message #257630] Tue, 27 July 2010 10:42 Go to previous messageGo to next message
Tron

 
Messages:225
Registered:August 2007
Location: Germany
The problem should be resolved now (r7068). Thanks for reporting this issue.

Report message to a moderator

Sergeant 1st Class
Re: bold border on the inventory items[message #257674] Tue, 27 July 2010 20:10 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: 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.

Report message to a moderator

Master Sergeant
Re: bold border on the inventory items[message #257715] Wed, 28 July 2010 01:51 Go to previous message
BirdFlu is currently offline BirdFlu

 
Messages:438
Registered:September 2007
Location: 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

Report message to a moderator

Master Sergeant
Previous Topic: r7059 - crash when loading savegame
Next Topic: [Fix < r7069] Cambria mine garrison: 15% elites + 90% regulars
Goto Forum:
  


Current Time: Thu May 14 07:10:46 GMT+3 2026

Total time taken to generate the page: 0.00734 seconds