jsm174 / vpx-standalone-scripts

Table patches for VPX Standalone
https://github.com/vpinball/vpinball/tree/standalone/
29 stars 14 forks source link

patch: Darkest Dungeon pupevent_2.2 #298

Closed francisdb closed 3 months ago

francisdb commented 3 months ago

https://vpuniverse.com/files/file/17345-darkest-dungeon-table-pup/

wine issue: https://bugs.winehq.org/show_bug.cgi?id=56781

I do wonder why the Set on the dictionary is not working and if removing it does the right thing.

To get the pup pack going I copied PuP-Pack_Options/3 Screen - FullDMD/* to the pup pack root

francisdb commented 3 months ago

Dictionary issue is that it's just not implemented:

https://github.com/vpinball/vpinball/blob/ab17aa1942229cb10e898795ca48a2a75db38d6b/standalone/inc/wine/dlls/scrrun/dictionary.c#L578-L583

Switching to the non-ref version will probably mess up reference counting and generate a leak or early cleanup?

Tested with the following code that updates actually work

Class C 
    Dim p
End Class
Dim cls1: set cls1 = new C
cls1.p = 1
Dim cls2: set cls2 = new C
cls2.p = 2
Dim key: key = "test"

Dim dict: set dict = createobject("scripting.dictionary")
dict.Add key, cls1

if dict.Item(key).p <> 1 then
    ' fail by calling something undefined
    i.do.not.exist
end if

Set dict.Item(key) = cls2

if dict.Item(key).p <> 2 then
    ' fail by calling something undefined
    i.do.not.exist
end if
francisdb commented 3 months ago

Looks like the 3-screen setup has a screen missing. 2-screen works

Dim DMDType: DMDType = 0

copied PuP-Pack_Options/2 Screen DMD on BG no Topper/* to the pup pack root

Still some issues where some image overlays are missing. However already quite playable.

francisdb commented 3 months ago

PuPlayer.GetRoot returns "" if called before the pup pack is initialized