mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged from revision: 7163
Externalized keys and locks to xml (by anv) - Locks (TableData/Items/Locks.xml): Originally 64 locks were kept in BinaryData/LOCKS.BIN. Now up to 255 locks can be specified in TableData/Locks.xml. If it isn't found, LOCKS.BIN will be loaded normally. - Keys (TableData/Items/Keys.xml): Originally 10 keys were hardcoded in KeyTable[]. Now up to 255 keys can be specified in TableData/Keys.xml. If it isn't found, hardcoded array will be used normally. see: http://www.bears-pit.com/board/ubbthreads.php/topics/331900.html git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7164 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -376,12 +376,14 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
{ //Keys use a totally different method for determining
|
||||
for( i = 0; i < eInfo.sNumItems; i++ )
|
||||
{
|
||||
item = &Item[ KeyTable[ 0 ].usItem + LockTable[ i ].usKeyItem ];
|
||||
//item = &Item[ KeyTable[ 0 ].usItem + LockTable[ i ].usKeyItem ];
|
||||
item = &Item[ KeyTable[ LockTable[ i ].usKeyItem ].usItem ];
|
||||
uiVideoObjectIndex = GetInterfaceGraphicForItem( item );
|
||||
GetVideoObject( &hVObject, uiVideoObjectIndex );
|
||||
|
||||
//Store these item pointers for later when rendering selected items.
|
||||
eInfo.pusItemIndex[i] = KeyTable[ 0 ].usItem + LockTable[ i ].usKeyItem;
|
||||
//eInfo.pusItemIndex[i] = KeyTable[ 0 ].usItem + LockTable[ i ].usKeyItem;
|
||||
eInfo.pusItemIndex[i] = KeyTable[ LockTable[ i ].usKeyItem ].usItem;
|
||||
|
||||
SetFont(SMALLCOMPFONT);
|
||||
SetFontForeground( FONT_MCOLOR_WHITE );
|
||||
|
||||
Reference in New Issue
Block a user