-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: main
Are you sure you want to change the base?
Changes from all commits
625736d
171037a
e897bc2
f004cda
cb3097b
3aa7d2b
a7286ba
18bbbcf
64425ed
f8b227b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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', 'W', '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.
Author
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. Sorry! Forgot to implement it correctly. Please tell me if the changes are correct! |
||
|
|
||
| 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 | ||
| } | ||
|
|
||
|
|
||
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.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.
By accident I forgot to change the references. Apparently this now is fixed!
If not I found another way to implement this and avoid wrong games, by deleting this line and references and hardcoding chinese and iQue titles to be blacklisted and changing game regions that are wrongly labeled