DS - wire up rotate options, screen logic doens't work yet

This commit is contained in:
adelikat 2020-03-29 11:07:18 -05:00
parent f15bf2e731
commit b9f6432ddf
3 changed files with 22 additions and 2 deletions

View File

@ -79,5 +79,16 @@
return ret;
}
// Yeah...
public static int[] Rotate90(int[] buffer)
{
return buffer;
}
public static int[] Rotate270(int[] buffer)
{
return buffer;
}
}
}

View File

@ -83,8 +83,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
Default,
TopOnly,
SideBySideLR,
SideBySideRL
/* TODO Reverse */
SideBySideRL,
Rotate90,
Rotate270
}
public class MelonSettings
@ -102,6 +103,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
VideoScreenOptions.TopOnly => null,
VideoScreenOptions.SideBySideLR => new Point(NativeWidth, 0),
VideoScreenOptions.SideBySideRL => new Point(0, 0),
VideoScreenOptions.Rotate90 => new Point(0, 0),
VideoScreenOptions.Rotate270 => new Point(256, 0),
_ => new Point(0, NativeHeight + ScreenGap)
};
@ -111,6 +114,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
{
VideoScreenOptions.SideBySideLR => NativeWidth * 2,
VideoScreenOptions.SideBySideRL => NativeWidth * 2,
VideoScreenOptions.Rotate90 => NativeHeight * 2,
VideoScreenOptions.Rotate270 => NativeHeight * 2,
_ => NativeWidth
};
@ -122,6 +127,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
VideoScreenOptions.TopOnly => NativeHeight,
VideoScreenOptions.SideBySideLR => NativeHeight,
VideoScreenOptions.SideBySideRL => NativeHeight,
VideoScreenOptions.Rotate90 => NativeWidth,
VideoScreenOptions.Rotate270 => NativeWidth,
_ => (NativeHeight * 2) + ScreenGap
};
}

View File

@ -46,6 +46,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
VideoScreenOptions.TopOnly => ScreenArranger.Copy(TopScreen),
VideoScreenOptions.SideBySideLR => ScreenArranger.SideBySide(TopScreen, BottomScreen),
VideoScreenOptions.SideBySideRL => ScreenArranger.SideBySide(BottomScreen, TopScreen),
VideoScreenOptions.Rotate90 => ScreenArranger.Rotate90(ScreenArranger.Stack(TopScreen, BottomScreen, 0)),
VideoScreenOptions.Rotate270 => ScreenArranger.Rotate270(ScreenArranger.Stack(TopScreen, BottomScreen, 0)),
_ => ScreenArranger.Stack(TopScreen, BottomScreen, _settings.ScreenGap)
};
}