Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions constants/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,21 @@ var TitleTypesData = []TitleTypeData{
}

var TouchGenIDs = []string{
"YBN", "VAA", "AYA", "AND", "ANM", "ATD", "CVN",
"YCU", "ATI", "AOS", "AG3", "AWI", "APL", "AJQ", "CM7",
"AD5", "AD2", "ADG", "AD7", "AD3", "IMW", "C6P", "AXP",
"A8N", "AZI", "ASQ", "ATR", "AGF",
"RFN", "RFP", "R64", "RYW",
"YBN", "VAAE", "VAAV", "AYA", "AND", "ANM", "ATD", "ADJ", "BET", "CNV", "ANH", "ANG", "AUA", "AUB", "AUC", "AUD", "AUE", "AIX", "AIZ",
"YCU", "ATI", "AOS", "AG3", "AWIE", "APLE", "AJQE", "AJQJ","CM7", "BKCE", "ATG", "AVM", "AD5", "AD2", "ADG", "AD7", "AD3", "IMW", "IA8", "C6P", "AXP", "A4VJ", "AJM", "AOI",
"A8NE", "A2Y", "AZI", "ASQ", "AJY", "ATR", "ARJ", "AGFE", "USK", "VET", "YFCE", "YLZP", "YLZX", "YLZJ", "YNU", "SUPP", "SUPJ", "RFN", "RFP", "R64", "RYW", "RHAP", "RHAJ",
"RJT", "RSPP", "RSPJ", "RZTP", "RFBP", "R4EP", "RNOP", "RTYP", "SP2P",
}

var DevAppIDs = []string{
"007E", "091E", "410E", "413E", "5NEA", "RAAE",
}

var CanadaUSAIDs = []string{
"VT3Z", "B5BL", "C62L", "B6RX", "BDYX", "BDPL", "BJBX", "BJCZ", "B58L", "BD4X", "B5CX",
}


// TitleType is the classified type of title according to GameTDB
type TitleType uint8

Expand Down
19 changes: 13 additions & 6 deletions v6/dllist/titles.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Comment on lines +104 to +107
Copy link
Member

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 byte to an array of byte, therefore you must alter all code that references this map to reflect the change.

}

var gameTDBRatingToRatingID = map[string]map[string]uint8{
Expand Down Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does literally nothing. forcedRegion is never used anywhere. Furthermore, since you only assign and never access forcedRegion, this won't even compile.


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
Expand Down Expand Up @@ -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
}

Expand Down