LiveSplit.VideoAutoSplit icon indicating copy to clipboard operation
LiveSplit.VideoAutoSplit copied to clipboard

Let Watchers directory scan for images

Open ROMaster2 opened this issue 6 years ago • 7 comments

ROMaster2 avatar Dec 31 '18 05:12 ROMaster2

Would love more context. From what I can see from the xml, it doesnt have any logic for a directory right now.

In terms of code, you can load a profile from a folder but again, not linked to an image in any way.

kenman345 avatar Jan 11 '19 20:01 kenman345

Right now the VAS file decoder only looks for specifically defined images. Example:

                <WatchImage>
                  <FilePath>start\x.png</FilePath>
                </WatchImage>
                <WatchImage>
                  <FilePath>start\a.png</FilePath>
                </WatchImage>

It's a bit messy if you have a lot of images to compare against. This would be much cleaner:

                <WatchImage>
                  <FilePath>start</FilePath>
                </WatchImage>

Or something similar to it.

ROMaster2 avatar Jan 11 '19 21:01 ROMaster2

but dont we have individual defined geometry and dimensions for each? so using a directory wouldnt work in that situation would it?

kenman345 avatar Jan 17 '19 20:01 kenman345

Nevermind, I think I can handle this, will give it a go.

kenman345 avatar Jan 17 '19 20:01 kenman345

So when you load a profile we do this: https://github.com/ROMaster2/LiveSplit.VideoAutoSplit/blob/1cae2660343f2de3a00dd1a7b7639b1a75990e81/Models/Features/GameProfile.cs#L197-L211

and we can easily change it to handle when its a folder, to set the first file to the wi.Image that its on and then add to the gp.WatchImages but I think it might be best to take that property set, and compile a new List of WatchImages to handle folders by changing it to a watchImage defined for each file with the filePath being accurrate.

Its on export that we would need to group the folder items so we dont screw that up on save, otherwise its a moot point.

kenman345 avatar Jan 17 '19 20:01 kenman345

It's definitely an easy add, I've just prioritized other things first ¯\_(ツ)_/¯

ROMaster2 avatar Jan 18 '19 03:01 ROMaster2

The only way I am thinking of the changes is definitely wrong and wants me to change access properties, so I would much prefer to actually leave this to you instead of going at it myself.

kenman345 avatar Jan 18 '19 18:01 kenman345