mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Reverted the usage of the externalized XML tileset structure (ja2Set.dat.xml) and also removed the additional P4-P9 items
o Disabled the usage, because it seems to cause some problems when loading the maps (reported by Smeagol) o Now it is possible again to choose if we want the XML tileset structure or the binary one (ja2.ini -> USE_XML_TILESETS) o If we later need the additional P4-P9 items we can enable it again and have to check carefully what causes the problems git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5205 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+124
-123
@@ -9193,37 +9193,38 @@ UINT32 GetInterfaceGraphicForItem( INVTYPE *pItem )
|
||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP3ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP3ITEMS,
|
||||
L"Failed to retrieve P3 item image" );
|
||||
}
|
||||
//MM: New item tileslots start here
|
||||
else if ( pItem->ubGraphicType == 4 )
|
||||
{
|
||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP4ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP4ITEMS,
|
||||
L"Failed to retrieve P4 item image" );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 5 )
|
||||
{
|
||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP5ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP5ITEMS,
|
||||
L"Failed to retrieve P5 item image" );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 6 )
|
||||
{
|
||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP6ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP6ITEMS,
|
||||
L"Failed to retrieve P6 item image" );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 7 )
|
||||
{
|
||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP7ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP7ITEMS,
|
||||
L"Failed to retrieve P7 item image" );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 8 )
|
||||
{
|
||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP8ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP8ITEMS,
|
||||
L"Failed to retrieve P8 item image" );
|
||||
}
|
||||
else
|
||||
{
|
||||
SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP9ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP9ITEMS,
|
||||
L"Failed to retrieve P9 item image" );
|
||||
}
|
||||
////MM: New item tileslots start here
|
||||
//else if ( pItem->ubGraphicType == 4 )
|
||||
//{
|
||||
// SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP4ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP4ITEMS,
|
||||
// L"Failed to retrieve P4 item image" );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 5 )
|
||||
//{
|
||||
// SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP5ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP5ITEMS,
|
||||
// L"Failed to retrieve P5 item image" );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 6 )
|
||||
//{
|
||||
// SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP6ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP6ITEMS,
|
||||
// L"Failed to retrieve P6 item image" );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 7 )
|
||||
//{
|
||||
// SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP7ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP7ITEMS,
|
||||
// L"Failed to retrieve P7 item image" );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 8 )
|
||||
//{
|
||||
// SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP8ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP8ITEMS,
|
||||
// L"Failed to retrieve P8 item image" );
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// SGP_TRYCATCH_RETHROW( id = g_bUsePngItemImages ? g_oP9ITEMS.getVObjectForItem(pItem->ubGraphicNum) : guiP9ITEMS,
|
||||
// L"Failed to retrieve P9 item image" );
|
||||
//}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -9251,31 +9252,31 @@ UINT16 GetTileGraphicForItem( INVTYPE *pItem )
|
||||
{
|
||||
GetTileIndexFromTypeSubIndex( P3ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
}
|
||||
//MM: New item tileslots start here
|
||||
else if ( pItem->ubGraphicType == 4 )
|
||||
{
|
||||
GetTileIndexFromTypeSubIndex( P4ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 5 )
|
||||
{
|
||||
GetTileIndexFromTypeSubIndex( P5ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 6 )
|
||||
{
|
||||
GetTileIndexFromTypeSubIndex( P6ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 7 )
|
||||
{
|
||||
GetTileIndexFromTypeSubIndex( P7ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 8 )
|
||||
{
|
||||
GetTileIndexFromTypeSubIndex( P8ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
GetTileIndexFromTypeSubIndex( P9ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
}
|
||||
////MM: New item tileslots start here
|
||||
//else if ( pItem->ubGraphicType == 4 )
|
||||
//{
|
||||
// GetTileIndexFromTypeSubIndex( P4ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 5 )
|
||||
//{
|
||||
// GetTileIndexFromTypeSubIndex( P5ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 6 )
|
||||
//{
|
||||
// GetTileIndexFromTypeSubIndex( P6ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 7 )
|
||||
//{
|
||||
// GetTileIndexFromTypeSubIndex( P7ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 8 )
|
||||
//{
|
||||
// GetTileIndexFromTypeSubIndex( P8ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// GetTileIndexFromTypeSubIndex( P9ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
|
||||
//}
|
||||
|
||||
if ( pItem->ubClassIndex >= M900 )
|
||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("GetTileGraphicForItem: db index %d",usIndex));
|
||||
@@ -9344,73 +9345,73 @@ BOOLEAN LoadTileGraphicForItem( INVTYPE *pItem, UINT32 *puiVo )
|
||||
sprintf( zName, "p3item%d", ubGraphic );
|
||||
}
|
||||
}
|
||||
//MM: New item tileslots start here
|
||||
else if ( pItem->ubGraphicType == 4 )
|
||||
{
|
||||
if ( ubGraphic < 10 )
|
||||
{
|
||||
sprintf( zName, "p4item0%d", ubGraphic );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( zName, "p4item%d", ubGraphic );
|
||||
}
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 5 )
|
||||
{
|
||||
if ( ubGraphic < 10 )
|
||||
{
|
||||
sprintf( zName, "p5item0%d", ubGraphic );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( zName, "p5item%d", ubGraphic );
|
||||
}
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 6 )
|
||||
{
|
||||
if ( ubGraphic < 10 )
|
||||
{
|
||||
sprintf( zName, "p6item0%d", ubGraphic );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( zName, "p6item%d", ubGraphic );
|
||||
}
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 7 )
|
||||
{
|
||||
if ( ubGraphic < 10 )
|
||||
{
|
||||
sprintf( zName, "p7item0%d", ubGraphic );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( zName, "p7item%d", ubGraphic );
|
||||
}
|
||||
}
|
||||
else if ( pItem->ubGraphicType == 8 )
|
||||
{
|
||||
if ( ubGraphic < 10 )
|
||||
{
|
||||
sprintf( zName, "p8item0%d", ubGraphic );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( zName, "p8item%d", ubGraphic );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ubGraphic < 10 )
|
||||
{
|
||||
sprintf( zName, "p9item0%d", ubGraphic );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( zName, "p9item%d", ubGraphic );
|
||||
}
|
||||
}
|
||||
////MM: New item tileslots start here
|
||||
//else if ( pItem->ubGraphicType == 4 )
|
||||
//{
|
||||
// if ( ubGraphic < 10 )
|
||||
// {
|
||||
// sprintf( zName, "p4item0%d", ubGraphic );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sprintf( zName, "p4item%d", ubGraphic );
|
||||
// }
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 5 )
|
||||
//{
|
||||
// if ( ubGraphic < 10 )
|
||||
// {
|
||||
// sprintf( zName, "p5item0%d", ubGraphic );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sprintf( zName, "p5item%d", ubGraphic );
|
||||
// }
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 6 )
|
||||
//{
|
||||
// if ( ubGraphic < 10 )
|
||||
// {
|
||||
// sprintf( zName, "p6item0%d", ubGraphic );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sprintf( zName, "p6item%d", ubGraphic );
|
||||
// }
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 7 )
|
||||
//{
|
||||
// if ( ubGraphic < 10 )
|
||||
// {
|
||||
// sprintf( zName, "p7item0%d", ubGraphic );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sprintf( zName, "p7item%d", ubGraphic );
|
||||
// }
|
||||
//}
|
||||
//else if ( pItem->ubGraphicType == 8 )
|
||||
//{
|
||||
// if ( ubGraphic < 10 )
|
||||
// {
|
||||
// sprintf( zName, "p8item0%d", ubGraphic );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sprintf( zName, "p8item%d", ubGraphic );
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if ( ubGraphic < 10 )
|
||||
// {
|
||||
// sprintf( zName, "p9item0%d", ubGraphic );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sprintf( zName, "p9item%d", ubGraphic );
|
||||
// }
|
||||
//}
|
||||
|
||||
//Load item
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
|
||||
Reference in New Issue
Block a user