1+ using Zero2UndubProcess . Constants ;
2+
3+ namespace Zero2UndubProcess . GameFiles
4+ {
5+ public class RegionHandler
6+ {
7+ private readonly GameRegions OriginGameRegion ;
8+ private readonly GameRegions TargetGameRegion ;
9+ public readonly RegionInfo OriginRegionInfo ;
10+ public readonly RegionInfo TargetRegionInfo ;
11+
12+ public RegionHandler ( GameRegions originGameRegion , GameRegions targetGameRegion )
13+ {
14+ OriginGameRegion = originGameRegion ;
15+ TargetGameRegion = targetGameRegion ;
16+
17+ // TODO: Add game region check logic
18+
19+ OriginRegionInfo = new RegionInfo
20+ {
21+ FileArchiveStartAddress = GameRegionConstants . JpIsoConstants . FileArchiveStartAddress ,
22+ FileTableStartAddress = GameRegionConstants . JpIsoConstants . FileTableStartAddress ,
23+ FileTypeTableStartAddress = GameRegionConstants . JpIsoConstants . FileTypeTableStartAddress ,
24+ NumberFiles = GameRegionConstants . JpIsoConstants . NumberFiles
25+ } ;
26+
27+ TargetRegionInfo = new RegionInfo
28+ {
29+ FileArchiveStartAddress = GameRegionConstants . UsIsoConstants . FileArchiveStartAddress ,
30+ FileTableStartAddress = GameRegionConstants . UsIsoConstants . FileTableStartAddress ,
31+ FileTypeTableStartAddress = GameRegionConstants . UsIsoConstants . FileTypeTableStartAddress ,
32+ NumberFiles = GameRegionConstants . UsIsoConstants . NumberFiles
33+ } ;
34+ }
35+ }
36+
37+ public class RegionInfo
38+ {
39+ public long FileArchiveStartAddress { get ; set ; }
40+ public long FileTableStartAddress { get ; set ; }
41+ public long FileTypeTableStartAddress { get ; set ; }
42+ public int NumberFiles { get ; set ; }
43+ }
44+
45+ public enum GameRegions
46+ {
47+ Japan ,
48+ USA ,
49+ EU
50+ }
51+ }
0 commit comments