Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- idImageManager::ImageFromFile
- *_name = 0x05c72e20 "fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24"
- idMaterial::ParseStage
- src.buffer = 0x05c8f2e0 "material fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24 // IMPLICITLY GENERATED\n{\n\t{\n\tblend blend\n\tcolored\n\tmap \"fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24\"\n\tclamp\n\t}\n}\n"
- idMaterial::ParseStage (diff function same name)
- src.buffer = 0x05c8f2e0 "material fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24 // IMPLICITLY GENERATED\n{\n\t{\n\tblend blend\n\tcolored\n\tmap \"fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24\"\n\tclamp\n\t}\n}\n"
- idMaterial::Parse
- *text = 0x05c8f2e0 "material fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24 // IMPLICITLY GENERATED\n{\n\t{\n\tblend blend\n\tcolored\n\tmap \"fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24\"\n\tclamp\n\t}\n}\n"
- idDeclLocal::ParseLocal
- This function has no parameters
- idMaterial::Parse called with declText as parameter
- declText = 0x05c8f2e0 "material fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24 // IMPLICITLY GENERATED\n{\n\t{\n\tblend blend\n\tcolored\n\tmap \"fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24\"\n\tclamp\n\t}\n}\n"
- declText is from the function GetText()
- idDeclLocal::GetText
- void idDeclLocal::GetText( char *text ) const {
- HuffmanDecompressText( text, textLength, (byte *)textSource, compressedLength );
- }
- textSource is a class member of idDeclLocal
- So it's obviously reading the compressed file and getting the incorrect file name for that
- So I searched for "IMPLICITLY GENERATED" in the solution and found
- bool idMaterial::SetDefaultText( void ) {
- // if there exists an image with the same name
- //if ( 1 ) { //fileSystem->ReadFile( GetName(), NULL ) != -1 ) {
- char generated[2048];
- idStr::snPrintf( generated, sizeof( generated ),
- "material %s // IMPLICITLY GENERATED\n"
- "{\n"
- "\t" "{\n"
- "\t" "blend blend\n"
- "\t" "colored\n"
- "\t" "map \"%s\"\n"
- "\t" "clamp\n"
- "\t" "}\n"
- "}\n", GetName(), GetName() );
- SetText( generated );
- return true;
- }
- So it is probably returning the incorrect name from GetName()
- (Virtual functions are a pain to debug)
- GetName is from idDecl::GetName
- GetName( void ) const { return base->GetName(); }
- base is class idDeclBase* but again that's an abstract class
- The abstract class is actually idDeclLocal:
- const char *idDeclLocal::GetName( void ) const {
- return name.c_str();
- }
- ?name.c_str()
- 0x758b5653 "\aÑ\xe"
- So that doesn't give us anything, let's go into the idStr::snPrintf function
- This is putting the wrong file paths in
- So something to do with setting the name of the idDeclLocal?
- Did a search of the solution with various breakpoints, name is being set in line 1703 of DeclManager.cpp
- decl->name = canonicalName; where canonicalName is the incorrect filename
- It is being called in the function idDeclManagerLocal::FindTypeWithoutParsing where name is 0x18f75b60 "fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24.32859"
- Called from *idDeclManagerLocal::FindType where name is again incorrect
- Called from *idDeclManagerLocal::FindMaterial where name is incorrect
- Called from idWinBackground::Set where name is incorrect
- Called from Script_Set where src is incorrect (in GuiScript.cpp)
- Called from idGuiScript::Execute
- So again this is where it's reading from the script...
- void CDownloadMenu::UpdateScreenshotItemVisibility(idUserInterface* gui)
- mods[19]->screenshots = [27] { shared_ptr {filename="fms/_missionshots/previewshot_gatehouse_2014-01-29_19.23.20420.jpg" serverRelativeUrl="screenshots/gatehouse_2014-01-29_19.23.20420.jpg" } [1 strong ref] [default], shared_ptr {filename="fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24.32859.jpg" serverRelativeUrl="screenshots/gatehouse_2014-01-29_19.24.32859.jpg" } [1 strong ref] [default], shared_ptr {filename="fms/_missionshots/previewshot_gatehouse_2014-01-29_19.26.03889.jpg" serverRelativeUrl="screenshots/gatehouse_2014-01-29_19.26.03889.jpg" } [1 strong ref] [default], shared_ptr {filename="fms/_missionshots/previewshot_gatehouse_2014-01-29_19.27.13786.jpg" serverRelativeUrl="screenshots/gatehouse_2014-01-29_19.27.13786.jpg" } [1 strong ref] [default], shared_ptr {filename="fms/_missionshots/previewshot_gatehouse_2014-01-29_19.29.52540.jpg" serverRelativeUrl="screenshots/gatehouse_2014-01-29_19.29.52540.jpg" } [1 strong ref] [default], shared_ptr {filename="fms/_missionshots/previewshot_gatehouse_2014-01-29_19.30.18716.jpg" serverRelativeUrl="screenshots/gatehouse_2014-01-29_19.30.18716.jpg" } [1 strong ref] [default], shared_ptr {filename="fms/_missionshots/previewshot_gatehouse_2014-01-29_19.31.04791.jpg" serverRelativeUrl="screenshots/gatehouse_2014-01-29_19.31.04791.jpg" } [1 strong ref] [default], ... }
- Here the names are correct!!
- Control+F screenshots
- in void CDownloadMenu::UpdateNextScreenshotData(idUserInterface* gui, int nextScreenshotNum)
- MissionScreenshot& screenshotInfo = *mods[missionIndex]->screenshots[nextScreenshotNum];
- gui->SetStateInt("av_mission_cur_screenshot_num", nextScreenshotNum);
- // Load next screenshot path, remove image extension
- idStr path = screenshotInfo.filename;
- path.StripFileExtension();
- gui->SetStateString("av_mission_next_screenshot", path);
- path = "fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24.32859.jpg"
- path.StripFileExtension();
- gui->SetStateString("av_mission_next_screenshot", path)
- Now path is "fms/_missionshots/previewshot_gatehouse_2014-01-29_19.24.32859" which is correct?
- in void CDownloadMenu::PerformScreenshotStep(idUserInterface* gui, int step it's also correct
- The gui script being called is titled "onStartFadeToNextScreenshot"
- In idWindow::RunNamedEvent if we change:
- RunScriptList(namedEvents[i]->mEvent);
- To:
- if (namedEvents[i]->mName == "onStartFadeToNextScreenshot") {
- }
- else {
- RunScriptList(namedEvents[i]->mEvent);
- }
- The screenshots fail to load altogether, but debugging the content of the script seems difficult
- Currently i'm modifying the code to debug onStartFadeToNextScreenshot easier
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement