mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Consoles: Allow separating horizontal from vertical content offset
This commit is contained in:
parent
788d4f32d9
commit
4b3e520ec3
@ -472,6 +472,7 @@
|
|||||||
<ClCompile Include="Game.c" />
|
<ClCompile Include="Game.c" />
|
||||||
<ClCompile Include="Graphics_GL2.c" />
|
<ClCompile Include="Graphics_GL2.c" />
|
||||||
<ClCompile Include="Graphics_N64.c" />
|
<ClCompile Include="Graphics_N64.c" />
|
||||||
|
<ClCompile Include="Graphics_PS2.c" />
|
||||||
<ClCompile Include="Graphics_PS3.c" />
|
<ClCompile Include="Graphics_PS3.c" />
|
||||||
<ClCompile Include="Graphics_PSP.c" />
|
<ClCompile Include="Graphics_PSP.c" />
|
||||||
<ClCompile Include="Graphics_PSVita.c" />
|
<ClCompile Include="Graphics_PSVita.c" />
|
||||||
@ -497,6 +498,7 @@
|
|||||||
<ClCompile Include="Platform_GCWii.c" />
|
<ClCompile Include="Platform_GCWii.c" />
|
||||||
<ClCompile Include="Platform_N64.c" />
|
<ClCompile Include="Platform_N64.c" />
|
||||||
<ClCompile Include="Platform_Posix.c" />
|
<ClCompile Include="Platform_Posix.c" />
|
||||||
|
<ClCompile Include="Platform_PS2.c" />
|
||||||
<ClCompile Include="Platform_PS3.c" />
|
<ClCompile Include="Platform_PS3.c" />
|
||||||
<ClCompile Include="Platform_PSP.c" />
|
<ClCompile Include="Platform_PSP.c" />
|
||||||
<ClCompile Include="Platform_PSVita.c" />
|
<ClCompile Include="Platform_PSVita.c" />
|
||||||
@ -537,6 +539,7 @@
|
|||||||
<ClCompile Include="Window_Dreamcast.c" />
|
<ClCompile Include="Window_Dreamcast.c" />
|
||||||
<ClCompile Include="Window_GCWii.c" />
|
<ClCompile Include="Window_GCWii.c" />
|
||||||
<ClCompile Include="Window_N64.c" />
|
<ClCompile Include="Window_N64.c" />
|
||||||
|
<ClCompile Include="Window_PS2.c" />
|
||||||
<ClCompile Include="Window_PS3.c" />
|
<ClCompile Include="Window_PS3.c" />
|
||||||
<ClCompile Include="Window_PSP.c" />
|
<ClCompile Include="Window_PSP.c" />
|
||||||
<ClCompile Include="Window_PSVita.c" />
|
<ClCompile Include="Window_PSVita.c" />
|
||||||
|
@ -689,6 +689,15 @@
|
|||||||
<ClCompile Include="Graphics_SoftGPU.c">
|
<ClCompile Include="Graphics_SoftGPU.c">
|
||||||
<Filter>Source Files\Graphics</Filter>
|
<Filter>Source Files\Graphics</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Window_PS2.c">
|
||||||
|
<Filter>Source Files\Window</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Platform_PS2.c">
|
||||||
|
<Filter>Source Files\Platform</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Graphics_PS2.c">
|
||||||
|
<Filter>Source Files\Graphics</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="..\misc\windows\CCicon.rc">
|
<ResourceCompile Include="..\misc\windows\CCicon.rc">
|
||||||
|
@ -120,7 +120,7 @@ static void HUDScreen_BuildPosition(struct HUDScreen* s, struct VertexTextured*
|
|||||||
|
|
||||||
/* Make "Position: " prefix */
|
/* Make "Position: " prefix */
|
||||||
tex = atlas->tex;
|
tex = atlas->tex;
|
||||||
tex.X = 2 + DisplayInfo.ContentOffset;
|
tex.X = 2 + DisplayInfo.ContentOffsetX;
|
||||||
tex.Width = atlas->offset;
|
tex.Width = atlas->offset;
|
||||||
Gfx_Make2DQuad(&tex, PACKEDCOL_WHITE, &cur);
|
Gfx_Make2DQuad(&tex, PACKEDCOL_WHITE, &cur);
|
||||||
|
|
||||||
@ -214,11 +214,11 @@ static void HUDScreen_Layout(void* screen) {
|
|||||||
int posY;
|
int posY;
|
||||||
|
|
||||||
Widget_SetLocation(line1, ANCHOR_MIN, ANCHOR_MIN,
|
Widget_SetLocation(line1, ANCHOR_MIN, ANCHOR_MIN,
|
||||||
2 + DisplayInfo.ContentOffset, 2 + DisplayInfo.ContentOffset);
|
2 + DisplayInfo.ContentOffsetX, 2 + DisplayInfo.ContentOffsetY);
|
||||||
posY = line1->y + line1->height;
|
posY = line1->y + line1->height;
|
||||||
s->posAtlas.tex.Y = posY;
|
s->posAtlas.tex.Y = posY;
|
||||||
Widget_SetLocation(line2, ANCHOR_MIN, ANCHOR_MIN,
|
Widget_SetLocation(line2, ANCHOR_MIN, ANCHOR_MIN,
|
||||||
2 + DisplayInfo.ContentOffset, 0);
|
2 + DisplayInfo.ContentOffsetX, 0);
|
||||||
|
|
||||||
if (Game_ClassicMode) {
|
if (Game_ClassicMode) {
|
||||||
/* Swap around so 0.30 version is at top */
|
/* Swap around so 0.30 version is at top */
|
||||||
|
@ -60,7 +60,7 @@ CC_VAR extern struct _DisplayData {
|
|||||||
/* Amount to offset content near the edges of the window by */
|
/* Amount to offset content near the edges of the window by */
|
||||||
/* Mainly intended for when the game is rendered on TV displays, where */
|
/* Mainly intended for when the game is rendered on TV displays, where */
|
||||||
/* pixels on the edges of the screen may be hidden due to overscan */
|
/* pixels on the edges of the screen may be hidden due to overscan */
|
||||||
int ContentOffset;
|
int ContentOffsetX, ContentOffsetY;
|
||||||
} DisplayInfo;
|
} DisplayInfo;
|
||||||
|
|
||||||
/* Scales the given X coordinate from 96 dpi to current display dpi. */
|
/* Scales the given X coordinate from 96 dpi to current display dpi. */
|
||||||
|
@ -32,7 +32,8 @@ void Window_Init(void) {
|
|||||||
WindowInfo.Exists = true;
|
WindowInfo.Exists = true;
|
||||||
|
|
||||||
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
||||||
DisplayInfo.ContentOffset = 10;
|
DisplayInfo.ContentOffsetX = 10;
|
||||||
|
DisplayInfo.ContentOffsetY = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window_Create2D(int width, int height) {
|
void Window_Create2D(int width, int height) {
|
||||||
|
@ -76,7 +76,8 @@ void Window_Init(void) {
|
|||||||
WindowInfo.Exists = true;
|
WindowInfo.Exists = true;
|
||||||
|
|
||||||
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
||||||
DisplayInfo.ContentOffset = 10;
|
DisplayInfo.ContentOffsetX = 10;
|
||||||
|
DisplayInfo.ContentOffsetY = 10;
|
||||||
|
|
||||||
#if defined HW_RVL
|
#if defined HW_RVL
|
||||||
WPAD_Init();
|
WPAD_Init();
|
||||||
|
@ -52,7 +52,8 @@ void Window_Init(void) {
|
|||||||
WindowInfo.Exists = true;
|
WindowInfo.Exists = true;
|
||||||
|
|
||||||
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
||||||
DisplayInfo.ContentOffset = 10;
|
DisplayInfo.ContentOffsetX = 10;
|
||||||
|
DisplayInfo.ContentOffsetY = 10;
|
||||||
|
|
||||||
LoadModules();
|
LoadModules();
|
||||||
padInit(0);
|
padInit(0);
|
||||||
|
@ -54,7 +54,9 @@ void Window_Init(void) {
|
|||||||
WindowInfo.Exists = true;
|
WindowInfo.Exists = true;
|
||||||
|
|
||||||
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
||||||
DisplayInfo.ContentOffset = 10;
|
DisplayInfo.ContentOffsetX = 10;
|
||||||
|
DisplayInfo.ContentOffsetY = 10;
|
||||||
|
|
||||||
ioPadInit(7);
|
ioPadInit(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,9 @@ void Window_Init(void) {
|
|||||||
WindowInfo.Exists = true;
|
WindowInfo.Exists = true;
|
||||||
|
|
||||||
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
Input.Sources = INPUT_SOURCE_GAMEPAD;
|
||||||
DisplayInfo.ContentOffset = 10;
|
DisplayInfo.ContentOffsetX = 10;
|
||||||
|
DisplayInfo.ContentOffsetY = 10;
|
||||||
|
|
||||||
usbh_core_init();
|
usbh_core_init();
|
||||||
usbh_xid_init();
|
usbh_xid_init();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user