mirror of
https://github.com/AdAstra-LD/DS-Pokemon-Rom-Editor.git
synced 2026-05-12 06:54:33 -05:00
Merge of BluRosie code to add compat for HG-Engine
This commit is contained in:
parent
7fbeda7a7e
commit
7b9d9ac8ce
|
|
@ -8782,7 +8782,10 @@ namespace DSPRE {
|
|||
int iconPalTableOffsetFromFileStart = (int)(RomInfo.monIconPalTableAddress - RomInfo.synthOverlayLoadAddress);
|
||||
if (iconPalTableOffsetFromFileStart >= 0) { // if iconPalTableAddress >= RomInfo.synthOverlayLoadAddress
|
||||
//In other words, if the pointer shows the table was moved to the synthetic overlay
|
||||
iconTablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + ROMToolboxDialog.expandedARMfileID.ToString("D4");
|
||||
if (File.Exists(DSUtils.GetOverlayPath(129)))
|
||||
iconTablePath = DSUtils.GetOverlayPath(129); // HG-engine new overlay for icons
|
||||
else
|
||||
iconTablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + ROMToolboxDialog.expandedARMfileID.ToString("D4");
|
||||
} else {
|
||||
iconPalTableOffsetFromFileStart = (int)(RomInfo.monIconPalTableAddress - DSUtils.ARM9.address);
|
||||
iconTablePath = RomInfo.arm9Path;
|
||||
|
|
|
|||
|
|
@ -531,9 +531,15 @@ namespace DSPRE {
|
|||
"displayed incorrectly or not displayed at all.", "Decompression error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
if (ramAddressOfTable >= RomInfo.synthOverlayLoadAddress) { // if the pointer shows the table was moved to the synthetic overlay
|
||||
OWTableOffset = ramAddressOfTable - RomInfo.synthOverlayLoadAddress;
|
||||
OWtablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + ROMToolboxDialog.expandedARMfileID.ToString("D4");
|
||||
if (ramAddressOfTable >= RomInfo.synthOverlayLoadAddress) {
|
||||
// if the pointer shows the table was moved to the synthetic overlay
|
||||
if (File.Exists(DSUtils.GetOverlayPath(131))) {
|
||||
OWTableOffset = ramAddressOfTable - DSUtils.GetOverlayRAMAddress(131);
|
||||
OWtablePath = DSUtils.GetOverlayPath(131); // HG-Engine new OW overlay
|
||||
} else {
|
||||
OWTableOffset = ramAddressOfTable - RomInfo.synthOverlayLoadAddress;
|
||||
OWtablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + ROMToolboxDialog.expandedARMfileID.ToString("D4");
|
||||
}
|
||||
} else {
|
||||
OWTableOffset = ramAddressOfTable - ov1Address;
|
||||
OWtablePath = ov1Path;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user