Subversion Repositories spk

Rev

Rev 88 | Rev 91 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 88 Rev 89
Line 3101... Line 3101...
3101
			ware->id = w[i].token(";", -2);
3101
			ware->id = w[i].token(";", -2);
3102
			ware->relval = w[i].token(";", 9).toLong();
3102
			ware->relval = w[i].token(";", 9).toLong();
3103
			ware->notority = w[i].token(";", 14).toLong();
3103
			ware->notority = w[i].token(";", 14).toLong();
3104
			ware->type = eType;
3104
			ware->type = eType;
3105
			ware->position = i;
3105
			ware->position = i;
-
 
3106
			ware->package = this;
3106
			list.push_back(ware);
3107
			list.push_back(ware);
3107
		}
3108
		}
3108
	}
3109
	}
3109
 
3110
 
3110
	CLEANSPLIT(w, totalWares);
3111
	CLEANSPLIT(w, totalWares);
Line 3116... Line 3117...
3116
 
3117
 
3117
	// now go through all emp wares and get the ones we have text for
3118
	// now go through all emp wares and get the ones we have text for
3118
	_addWaresToList(iLang, list, empWares, Ware_EMP);
3119
	_addWaresToList(iLang, list, empWares, Ware_EMP);
3119
	_addWaresToList(iLang, list, builtInWares(), Ware_BuiltIn);
3120
	_addWaresToList(iLang, list, builtInWares(), Ware_BuiltIn);
3120
 
3121
 
-
 
3122
	return true;
-
 
3123
}
-
 
3124
 
-
 
3125
bool CBaseFile::_readCommands(int iLang, int iStartID, CLinkList<SCommandSlot> &list)
-
 
3126
{
-
 
3127
	_pTextDB->setLanguage(iLang);
-
 
3128
 
-
 
3129
	for(int i = 2; i <= 13; i++) {
-
 
3130
		for(int j = 0; j < 64; j++) {
3121
	// now add any custom wares
3131
			int id = (i * 100) + j;
-
 
3132
			if ( _pTextDB->exists(iLang, iStartID + 2, id) ) {
-
 
3133
				SCommandSlot *slot = new SCommandSlot;
-
 
3134
				list.push_back(slot);
-
 
3135
 
-
 
3136
				slot->id = _pTextDB->get(iLang, iStartID, id);
-
 
3137
				slot->name = _pTextDB->get(iLang, iStartID + 2, id);
-
 
3138
				slot->shortName = _pTextDB->get(iLang, iStartID + 3, id);
-
 
3139
				slot->info = _pTextDB->get(iLang, iStartID + 14, id);
-
 
3140
				slot->slot = id;
-
 
3141
				slot->package = this;
-
 
3142
 			}
-
 
3143
		}
-
 
3144
	}
-
 
3145
 
-
 
3146
	for(int i = 1400; i <= 2000; i++) {
-
 
3147
		if ( _pTextDB->exists(iLang, iStartID + 2, i) ) {
-
 
3148
			SCommandSlot *slot = new SCommandSlot;
-
 
3149
			list.push_back(slot);
-
 
3150
 
-
 
3151
			slot->id = _pTextDB->get(iLang, iStartID, i);
-
 
3152
			slot->name = _pTextDB->get(iLang, iStartID + 2, i);
-
 
3153
			slot->shortName = _pTextDB->get(iLang, iStartID + 3, i);
-
 
3154
			slot->info = _pTextDB->get(iLang, iStartID + 14, i);
-
 
3155
			slot->slot = i;
-
 
3156
			slot->package = this;
-
 
3157
		}
-
 
3158
	}
-
 
3159
 
-
 
3160
	for(int i = 6000; i <= 9999; i++) {
-
 
3161
		if ( _pTextDB->exists(iLang, iStartID + 2, i) ) {
-
 
3162
			SCommandSlot *slot = new SCommandSlot;
-
 
3163
			list.push_back(slot);
-
 
3164
 
-
 
3165
			slot->id = _pTextDB->get(iLang, iStartID, i);
-
 
3166
			slot->name = _pTextDB->get(iLang, iStartID + 2, i);
-
 
3167
			slot->shortName = _pTextDB->get(iLang, iStartID + 3, i);
-
 
3168
			slot->info = _pTextDB->get(iLang, iStartID + 14, i);
-
 
3169
			slot->slot = i;
-
 
3170
			slot->package = this;
-
 
3171
		}
3122
	
3172
	}
3123
 
3173
 
3124
	return true;
3174
	return true;
3125
}
3175
}
3126
 
3176
 
-
 
3177
bool CBaseFile::readWingCommands(int iLang, CLinkList<SCommandSlot> &list)
-
 
3178
{
-
 
3179
	return _readCommands(iLang, 2028, list);
-
 
3180
}
-
 
3181
 
-
 
3182
bool CBaseFile::readCommands(int iLang, CLinkList<SCommandSlot> &list)
-
 
3183
{
-
 
3184
	return _readCommands(iLang, 2008, list);
-
 
3185
}
-
 
3186
 
3127
int CBaseFile::FindFirstGameInPackage()
3187
int CBaseFile::FindFirstGameInPackage()
3128
{
3188
{
3129
	for ( CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next() ) {
3189
	for ( CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next() ) {
3130
		if ( node->Data()->GetGame() )
3190
		if ( node->Data()->GetGame() )
3131
			return node->Data()->GetGame();
3191
			return node->Data()->GetGame();