Jump to content

Photo

PSA: Broken zscript "DMapScreenD" used in some old quests


  • Please log in to reply
2 replies to this topic

#1 connor.clark

connor.clark

    Junior

  • ZC Developers

Posted 23 January 2024 - 02:36 PM

I learned that old versions of the zscript compiler did not compile "GetDMapScreenD/SetDMapScreenD" functions correctly. They likely do not work at all in any old quest that uses them. Whatever they are being used for is not working as intended.
 
Just FYI, in case quest authors care to upgrade the quest / recompile to fix.
 
This was fixed in releases after February 3rd, 2023.
 
Here are all the quests on the database that have this issue:

https://www.purezc.n...e=quests&id=513- RandomizerBSZelda.qst 
https://www.purezc.n...e=quests&id=537- The Forbidden City.qst 
https://www.purezc.n...e=quests&id=554- RandomizerOutlands.qst 
https://www.purezc.n...e=quests&id=597- ATributeToYeto'sQuest.qst 
https://www.purezc.n...e=quests&id=611- RandomizerReturns.qst 
https://www.purezc.n...e=quests&id=621- LegendOfPokemonWarrior.qst 
https://www.purezc.n...e=quests&id=623- Rite of the Storm/Rite of the Storm.qst 
https://www.purezc.n...e=quests&id=731- GoGollab_1_FunnieresterEdition.qst 

 

 

 



#2 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 23 January 2024 - 03:01 PM

According to the bug report thread where Emily caught this on Discord, the broken function was GetDMapScreenD; and it worked as intended in older versions by dumb luck (it was passing the latest thing off the stack or something for a value, and it just so happened that the thing off the stack it grabbed would always be the correct value before we optimized stuff). Is there new info that indicates that these quests might actually be broken?

EDIT: in case anyone's confused: I'm saying that nothing should be broken currently and that things work the same way they did before; just they worked by accident before and now they work by intentionality now. 



#3 connor.clark

connor.clark

    Junior

  • ZC Developers

Posted 23 January 2024 - 03:24 PM

Yeah, that looks right. So should be fine.
 

270: SETV            D2              0            
271: PUSHR           D2                           
272: CALLFUNC        403                          [Call Function #6]
 
...
 
Function #6
403: POP             D6                           [Block 0 -> ]
404: POP             D1                           
405: POP             D0                           
406: POP             D5                           
407: SETR            D2              SDDDD        
408: NOP                                          
409: RETURNFUNC            
 

 

 

The above list is just quests that have functions that look like this .. where D6 should have been D2. But when called, D2 is used to push to the stack, which means it already happens to have the correct value that Line 403 should have set.




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users