mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- Merged Source Code from MP branch Revision 3021
. clip surface coordinates before blitting . track surface data pointer, to identify the surface's clip rectangle . editor : test if item index is smaller than the number of items . other minor updates . update png loader to work with new appdata.xml structure . VFS updates . fix radar maps : write to <userprofile>\RADARMAPS * New Map Editor Release (Build: 3023) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3023 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+26
-14
@@ -44,6 +44,8 @@
|
||||
#include "keys.h"
|
||||
#endif
|
||||
|
||||
#include "VFS/Tools/Log.h"
|
||||
|
||||
#define NUMBER_TRIGGERS 27
|
||||
#define PRESSURE_ACTION_ID (NUMBER_TRIGGERS - 1)
|
||||
|
||||
@@ -526,25 +528,35 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
|
||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||
|
||||
//Calculate the center position of the graphic in a 60 pixel wide area.
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[item->ubGraphicNum].sOffsetX;
|
||||
sStart = x + (60 - sWidth - sOffset*2) / 2;
|
||||
|
||||
if( sWidth && sWidth > 0 )
|
||||
if(item->ubGraphicNum < hVObject->usNumberOfObjects)
|
||||
{
|
||||
BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, item->ubGraphicNum, sStart, y+2, 0, FALSE );
|
||||
}
|
||||
//Calculate the center position of the graphic in a 60 pixel wide area.
|
||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||
sOffset = hVObject->pETRLEObject[item->ubGraphicNum].sOffsetX;
|
||||
sStart = x + (60 - sWidth - sOffset*2) / 2;
|
||||
|
||||
//cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)...
|
||||
if( y == 0 )
|
||||
{
|
||||
y = 40;
|
||||
if( sWidth && sWidth > 0 )
|
||||
{
|
||||
BltVideoObjectOutlineFromIndex( eInfo.uiBuffer, uiVideoObjectIndex, item->ubGraphicNum, sStart, y+2, 0, FALSE );
|
||||
}
|
||||
|
||||
//cycle through the various slot positions (0,0), (0,40), (60,0), (60,40), (120,0)...
|
||||
if( y == 0 )
|
||||
{
|
||||
y = 40;
|
||||
}
|
||||
else
|
||||
{
|
||||
y = 0;
|
||||
x += 60;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
y = 0;
|
||||
x += 60;
|
||||
static CLog& editorLog = *CLog::Create(L"EditorItems.log");
|
||||
editorLog << L"Tried to access item ["
|
||||
<< item->ubGraphicNum << L"/" << hVObject->usNumberOfObjects
|
||||
<< L"]" << CLog::endl;
|
||||
}
|
||||
}
|
||||
usCounter++;
|
||||
|
||||
Reference in New Issue
Block a user