-
Notifications
You must be signed in to change notification settings - Fork 8
Fixing PAL and NTSC-U region issues and updated Touch! Generations #16
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
Open
Barcia04
wants to merge
8
commits into
WiiLink24:main
Choose a base branch
from
Barcia04:Barcia04-patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
625736d
Fixing PAL region codes and forcing wrong labeled games to their corr…
Barcia04 171037a
Update const.go
Barcia04 e897bc2
Attempt to fix region code badly implemented and forcing region IDs
Barcia04 f004cda
Fix syntax errors in TouchGenIDs declaration
Barcia04 cb3097b
Testing
Barcia04 3aa7d2b
Delete test.go
Barcia04 a7286ba
Added missing more Canada IDs that are labeled as PAL
Barcia04 18bbbcf
Removed the exclusive region of Cooking Guide/Personal Trainer: Cooki…
Barcia04 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,10 +101,10 @@ var regionToGameTDB = map[constants.Region]string{ | |
| constants.Japan: "NTSC-J", | ||
| } | ||
|
|
||
| var regionToCodeTDB = map[constants.Region]byte{ | ||
| constants.NTSC: 'E', | ||
| constants.PAL: 'P', | ||
| constants.Japan: 'J', | ||
| var regionToCodeTDB = map[constants.Region][]byte{ | ||
| constants.NTSC: {'E', 'L', 'X', 'Z'}, | ||
| constants.PAL: {'P', 'F', 'D', 'S', 'I', 'H', 'U', 'X', 'Y', 'V', 'Z'}, | ||
| constants.Japan: {'J'}, | ||
| } | ||
|
|
||
| var gameTDBRatingToRatingID = map[string]map[string]uint8{ | ||
|
|
@@ -160,8 +160,15 @@ func (l *List) GenerateTitleStruct(games *[]gametdb.Game, defaultTitleType const | |
| // Whatever the reason is, we have no metadata to use. | ||
| continue | ||
| } | ||
|
|
||
| forcedRegion := game.Region | ||
| isForced := slices.Contains(constants.CanadaUSAIDs, game.ID[:4]) | ||
|
|
||
| if game.Region == regionToGameTDB[l.region] || game.Region == "ALL" { | ||
| if isForced { | ||
| forcedRegion = "NTSC-U" | ||
| } | ||
|
Comment on lines
+164
to
+169
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does literally nothing. |
||
|
|
||
| if forcedRegion == regionToGameTDB[l.region] || game.Region == "ALL" { | ||
| titleType := defaultTitleType | ||
| // (Sketch) The first locale will always be English from what I have observed | ||
| title := game.Locale[0].Title | ||
|
|
@@ -195,7 +202,7 @@ func (l *List) GenerateTitleStruct(games *[]gametdb.Game, defaultTitleType const | |
| continue | ||
| } | ||
|
|
||
| if game.ID[3] != regionToCodeTDB[l.region] { | ||
| if !slices.Contains(regionToCodeTDB[l.region], game.ID[3]) { | ||
| continue | ||
| } | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changed the value of the map from
byteto an array ofbyte, therefore you must alter all code that references this map to reflect the change.