src/Scaleform/MICScaleform_RetrieveExtraData.cpp
//Recursively travel through the extra info structure to find the desired entry
Recursively travel through the extra info structure to find the desired entry
Recursively travel through the extra info structure to find the desired entry
ExtraInfoEntry* MICScaleform_RetrieveExtraData::TraverseExtraInfoEntries(ExtraInfoEntry* currentEntry, RE::GFxValue* indexArray, uint32_t currentIndex)
{
	logger::debug( ("Traverse Current Index " + IntToString(currentIndex) ).c_str() );
	RE::GFxValue indexToSelect;
	indexArray->GetElement(currentIndex, &indexToSelect);
	logger::debug(("Traverse Current Index " + std::to_string(currentIndex) + " indexToSelect " + std::to_string(indexToSelect.GetNumber())).c_str());
	ExtraInfoEntry* nextEntry = currentEntry->GetChild((int)indexToSelect.GetNumber());
	if (currentIndex + 1 == indexArray->GetArraySize()) {
		return nextEntry;
	}
	else {
		return TraverseExtraInfoEntries(nextEntry, indexArray, currentIndex + 1);
	}
}
ExtraInfoEntry * MICScaleform_RetrieveExtraData :: TraverseExtraInfoEntries ( ExtraInfoEntry * currentEntry , RE :: GFxValue * indexArray , uint32_t currentIndex ) { logger :: debug ( ( " " + IntToString ( currentIndex ) ) . c_str ( ) ) ; RE :: GFxValue indexToSelect ; indexArray -> GetElement ( currentIndex , & indexToSelect ) ; logger :: debug ( ( " " + std :: to_string ( currentIndex ) + " " + std :: to_string ( indexToSelect . GetNumber ( ) ) ) . c_str ( ) ) ; ExtraInfoEntry * nextEntry = currentEntry -> GetChild ( ( int ) indexToSelect . GetNumber ( ) ) ; if ( currentIndex + 1 == indexArray -> GetArraySize ( ) ) { return nextEntry ; } else { return TraverseExtraInfoEntries ( nextEntry , indexArray , currentIndex + 1 ) ; } }
Recursively travel through the extra info structure to find the desired entry
Recursively travel through the extra info structure to find the desired entry