summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeWad.cpp
AgeCommit message (Collapse)Author
2017-03-20Merge pull request #5099 from JosJuice/wii-menu-stringsMatthew Parlane
Display nicer version strings for the Wii Menu
2017-03-20Merge pull request #5093 from JosJuice/six-char-game-idsMatthew Parlane
Use 6-char game IDs for NAND tiles (if they are printable)
2017-03-18Check whether WAD is a channel before reading namesLéo Lam
Dolphin assumes that content 0 is opening.bnr, without checking whether content 0 exists or if it is even supposed to be there (it's only there for channels). This results in sometimes reading garbage. This adds a check to only try to read names from content 0's header if the title is a channel (channel, system channel or game channel).
2017-03-18Return a more meaningful type from GetSysMenuRegionJosJuice
2017-03-16Use 6-char game IDs for NAND tiles (if they are printable)JosJuice
5.0-2712 made ES's code for setting the game ID use the title ID converted to hex (except for disc titles) instead of using a 6-char game ID like before. Then, 5.0-2830 made us use that code even when loading game INIs. This breaks the expectations of both users and the game INIs we ship with. This commit makes Dolphin use 6-char game IDs for all titles (unless the 6-char ID would contain unprintable characters, which is the case with e.g. the Wii Menu). I'm also putting unprintability checks in VolumeWad for consistency.
2017-03-13Remove Blob nullptr checks from Volume codeJosJuice
There's no point in creating a volume without a blob, since essentially all the functionality of a volume requires a blob to be used. Also, VolumeCreator doesn't support creating volumes without blobs (it can't even figure out the volume type unless it gets a blob), so it's currently impossible for a volume to be created without a blob.
2017-03-09Volume: Use ReadSwapped moreJosJuice
Most of the Volume code was written before this convenience function was added. Let's use it more. Also deleting m_pReader nullptr checks that are unnecessary because of Read (which ReadSwapped calls) already having a nullptr check.
2017-02-26Use ESFormats for TMDsLéo Lam
We already have a TMDReader, so let's actually use it. And move ESFormats to IOS::ES, since it's definitely part of IOS. This adds a DiscIO dependency on Core which will be fixed in a follow-up PR.
2017-01-23VolumeWad: Implement GetTMD()Léo Lam
This allows getting useful info like the required IOS version for WADs (for showing it in the UI, for example).
2017-01-23VolumeWad: Remove useless else after returnLéo Lam
2017-01-23VolumeWad: Clean up variable namingLéo Lam
2017-01-23VolumeWad: In-class initialise member variablesLéo Lam
2017-01-02DiscIO: Add GetRegion function and Region enumJosJuice
Instead of needing different switch cases for converting countries to regions in multiple places, we now only need a single country-to-region switch case (in DiscIO/Enums.cpp), and we get a nice Region type.
2016-12-06Common: Add alignment headerLéo Lam
Gets rid of duplicated alignment code.
2016-10-29DiscIO/SConfig: Rename GetUniqueID to GetGameIDJosJuice
We call this "game ID" everywhere else, and it's not actually completely unique.
2016-07-13Move DiscIO enums to a new fileJosJuice
At first there weren't many enums in Volume.h, but the number has been growing, and I'm planning to add one more for regions. To not make Volume.h too large, and to avoid needing to include Volume.h in code that doesn't use volume objects, I'm moving the enums to a new file. I'm also turning them into enum classes while I'm at it.
2016-06-25Undo some comment formatting changes from b5104a7JosJuice
2016-06-26GCVolume: supports reading all opening.bnr informationRukai
DQT2: Game properties dialog contains info tab giving information about the selected iso.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-12-03Don't read from volume when reloading Wii bannersJosJuice
Should make loading cached Wii games that lack banners slightly faster.
2015-10-03Merge pull request #3102 from rohit-n/build-pchLioncash
Fix building with PCH disabled.
2015-09-28Fix building with PCH disabled.Rohit Nirmal
2015-09-27DiscIO: Add a way to get blob typeJosJuice
2015-09-27Merge pull request #3092 from JosJuice/compressed-blobsflacs
Display all compressed formats in blue in GUI
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-09-26Display all compressed formats in blue in GUIJosJuice
In the past, only GCZ was shown as compressed, not CISO and WBFS.
2015-09-22DiscIO: Do swapping in GetTitleID implementationsLioncash
Gets rid of external swaps at every usage.
2015-08-31VolumeCreator: Use a unique_ptr in CreateVolumeFromFilenameLioncash
2015-06-18Volume: Use DecodeString moreJosJuice
DecodeString handles the case where there is no trailing null byte, so using it lets the code be a bit simpler.
2015-06-08Volume: Add prefer_long parameter to GetNamesJosJuice
GC games with long names store two variations of the name in opening.bnr. This makes the shorter of those names available. For volumes other than GC discs, prefer_long is ignored.
2015-06-04Volume: Return volume type as an enumJosJuice
ISOFile and GameFile were using IsWiiDisc() and IsWadFile() to set an enum value. The volume might as well return an enum directly. I increased the Qt CACHE_REVISION because m_platform now is saved as u32 instead of int, but increasing the wx CACHE_REVISION is not necessary.
2015-05-29Volume: Use more appropriate types for some returned valuesJosJuice
Disc number is changed from bool to u8, and revision is changed from int to u16 (WADs can use all 16 bits, but discs can only use 8 bits).
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-03Read opening.bnr to get names from Wii discsJosJuice
This makes Dolphin display the same names as the Disc Channel.
2015-04-23Return GetNames languages, to avoid hardcoded language lists in callersJosJuice
This makes the code cleaner and also leads to some user-visible changes: The wx game properties will no longer let the user select WAD languages that don't have any names. The Qt game list will now display names using the languages set in the configuration instead of always using English for PAL GC games and Japanese for WADs. If a WAD doesn't have a name in the user's preferred language, English is now selected as a fallback before Japanese.
2015-02-28VolumeWad: change titlever to title_versionStevoisiak
2015-02-28General FormattingStevoisiak
2015-02-26De-capitalized CountryCodeStevoisiak
2015-02-26VolumeWad: Move country identification to GetCountry()Stevoisiak
Brings the code more in line with the rest of the game volume code
2015-02-26VolumeWad: Private variables for offset valuesStevoisiak
2015-02-05VolumeWad: Return version number for WADsStevoisiak
2015-01-17Don't read from disk when checking volume typeJosJuice
Should be faster than relying on the OS to cache the magic words. Also gets rid of the odd recursive call in VolumeDirectory.
2014-12-28DiscIO: Replace "raw" functions with "decrypt" parametersJosJuice
This is intended to make decryption look less implicit in the code.
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-09-01DiscIO: Prefix class member variables with "m_"Lioncash
2014-08-31DiscIO: Move some raw pointers over to unique_ptrLioncash
2014-03-11Fixes spacing for "for", "while", "switch" and "if"Matthew Parlane
Also moved && and || to ends of lines instead of start. Fixed misc vertical alignments and some { needed newlining.
2014-03-09clang-modernize -use-nullptrTillmann Karras
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-02-22Make DiscIO/ mostly IWYU clean (and fix errors in rest of the project ↵Pierre Bourdon
detected by this change).