Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameFile: Support HBC-style XML metadata #8313

Open
wants to merge 1 commit into
base: master
from

Conversation

@JosJuice
Copy link
Contributor

commented Aug 13, 2019

This feature was originally exclusive to the previous iteration of DolphinQt (the one that was the reason for the current iteration being named DolphinQt2 initially).

https://bugs.dolphin-emu.org/issues/8949

GameFile: Support HBC-style XML metadata
This feature was originally exclusive to the previous iteration of
DolphinQt (the one that was the reason for the current iteration
being named DolphinQt2 initially).

https://bugs.dolphin-emu.org/issues/8949

@JosJuice JosJuice force-pushed the JosJuice:gamelist-xml branch from a15dccf to 6df8a09 Aug 13, 2019


// Elements that we aren't using:
// version (can be written in any format)
// release_date (YYYYmmddHHMMSS format)

This comment has been minimized.

Copy link
@BhaaLseN

BhaaLseN Aug 13, 2019

Member

We do append the revision to the game name (altho this is a u16 and not just any plain string); and there would be the apploader date field (which is a string)...so we potentially could use those two.

This comment has been minimized.

Copy link
@JosJuice

JosJuice Aug 13, 2019

Author Contributor

I would really not like to change the revision from u16 to std::string. I could do the apploader date, but an apploader date isn't really the same as a release date, and any custom data doesn't show up in the properties dialog anyway the way things are now (which is the only place where you can see the apploader date). Maybe we could rework this if we add a properties dialog for DOL/ELF files at some point.

const std::string& GetName(bool long_name = true) const;
const std::string& GetMaker(bool long_maker = true) const;
const std::string& GetName(bool allow_custom_name, bool long_name = true) const;
const std::string& GetMaker(bool allow_custom_maker, bool long_maker = true) const;

This comment has been minimized.

Copy link
@BhaaLseN

BhaaLseN Aug 13, 2019

Member

Those bools look iffy, especially since one of them is defaulted while the other is not. Maybe we should consider an enum instead; possibly even one that combines both as one (like GetName(Long | AllowCustom) or GetName(Short) etc.)

Thoughts?

This comment has been minimized.

Copy link
@JosJuice

JosJuice Aug 13, 2019

Author Contributor

I could do enums, but we should avoid "combined" enums due to https://bugs.dolphin-emu.org/issues/11692.

This comment has been minimized.

Copy link
@BhaaLseN

BhaaLseN Aug 13, 2019

Member

Does this also apply to enum class? I was just omitting stuff for brevity; I didn't necessarily mean for this to use an unqualified enum.

This comment has been minimized.

Copy link
@JosJuice

JosJuice Aug 13, 2019

Author Contributor

With enum class I believe you get a compile error if you try to use | without casting, but I haven't tested it.

This comment has been minimized.

Copy link
@Pokechu22

Pokechu22 Aug 13, 2019

Contributor

Apparently you do get an error in that case, but you're allowed to declare your own | operator if you want it (according to this article). That's probably excessive for something like this, though...

This comment has been minimized.

Copy link
@Antidote

Antidote Aug 14, 2019

We actually use this method in URDE with great success, we have a macro in our IO library athena which defines all of the necessary operators:
https://gitlab.axiodl.com/libAthena/athena/blob/master/include/athena/Global.hpp#L88-120
Then it's used like this:
https://gitlab.axiodl.com/AxioDL/hecl/blob/master/include/hecl/CVar.hpp#L27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.