Tested on: MS3.0.3, MS3.0.7, & MSE Build 1 and works
Ok I liked the way Diablo 2 did the item system, once it's on the ground it has a name highlighted over it. Well, a Item does not techniquely have a moving postion, so there is no need for the xoffset or yoffset, because the item does not actually move on it's own so here is the code for the bltItemCode
In modGameLogic, at the bottom add:
Code:
Sub BltMapItemName(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
With Item(MapItem(Index).Num)
'Draw name
TextX = MapItem(Index).x * PIC_X + MapItem(Index).X + CLng(PIC_X / 2) - ((Len(Trim$(.Name)) / 2) * 8)
TextY = MapItem(Index).y * PIC_Y + MapItem(Index).Y - CLng(PIC_Y / 2) - 4
DrawText TexthDC, TextX, TextY, Trim$(.Name), vbWhite
End With
End Sub
Then in the same module find this code:
Code:
' Lock the backbuffer so we can draw text and names
TexthDC = DD_BackBuffer.GetDC
For i = 1 To MAX_PLAYERS
If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
Call BltPlayerName(i, MapXOffset, MapYOffset)
End If
Next i
Beneath it add:
Code:
'Draw Item Names
For i = LBound(MapItem) To UBound(MapItem)
If MapItem(i).Num > 0 Then
BltMapItemName i
End If
Next i
and yes this does work without X and Yoffset's as I stated above the items do not move so there not needed unless you write in a seperate moving code for the items but why would you want a item to move? this is straight from my source, it does work, do not change anything. That's all