Skip to content

Commit

Permalink
Fix compilation on latest vitaGL and vitasdk builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Aug 17, 2023
1 parent e824630 commit ec0c55f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
5 changes: 2 additions & 3 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ target_link_libraries(${PROJECT_NAME}.elf
taihen_stub
SceDisplay_stub
SceGxm_stub
ScePgf_stub
ScePvf_stub
SceSysmodule_stub
-Wl,--whole-archive SceSysmodule_stub -Wl,--no-whole-archive
SceCommonDialog_stub
SceKernelThreadMgr_stub
SceCtrl_stub
Expand All @@ -123,6 +121,7 @@ target_link_libraries(${PROJECT_NAME}.elf
SceAudio_stub
ScePower_stub
SceNet_stub
-Wl,--whole-archive SceNetCtl_stub -Wl,--no-whole-archive
SceAppMgr_stub
SceAppUtil_stub
SceShaccCg_stub
Expand Down
16 changes: 8 additions & 8 deletions Source/SysVita/HLEGraphics/RendererLegacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ void RendererLegacy::TexRect(u32 tile_idx, const v2 & xy0, const v2 & xy1, TexCo
gVertexBuffer[9] = screen1.x;
gVertexBuffer[10] = screen1.y;
gVertexBuffer[11] = depth;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
gVertexBuffer += 12;

uint32_t *p_vertices = gColorBuffer;
Expand Down Expand Up @@ -710,7 +710,7 @@ void RendererLegacy::TexRectFlip(u32 tile_idx, const v2 & xy0, const v2 & xy1, T
gVertexBuffer[9] = screen1.x;
gVertexBuffer[10] = screen1.y;
gVertexBuffer[11] = 0.0f;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
gVertexBuffer += 12;

uint32_t *p_vertices = gColorBuffer;
Expand Down Expand Up @@ -742,7 +742,7 @@ void RendererLegacy::FillRect(const v2 & xy0, const v2 & xy1, u32 color)
gVertexBuffer[9] = screen1.x;
gVertexBuffer[10] = screen1.y;
gVertexBuffer[11] = 0.0f;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
gVertexBuffer += 12;

uint32_t *p_vertices = gColorBuffer;
Expand Down Expand Up @@ -775,7 +775,7 @@ void RendererLegacy::DoGamma(float gamma)
gVertexBuffer[9] = SCR_WIDTH;
gVertexBuffer[10] = SCR_HEIGHT;
gVertexBuffer[11] = 0.0f;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
gVertexBuffer += 12;

// Hack to use float colors without having to use a temporary buffer
Expand Down Expand Up @@ -820,7 +820,7 @@ void RendererLegacy::DrawUITexture()
gVertexBuffer[9] = SCR_WIDTH;
gVertexBuffer[10] = SCR_HEIGHT;
gVertexBuffer[11] = 0.0f;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
gVertexBuffer += 12;

gTexCoordBuffer[0] = 0.0f;
Expand Down Expand Up @@ -897,7 +897,7 @@ void RendererLegacy::Draw2DTexture(f32 x0, f32 y0, f32 x1, f32 y1,
gTexCoordBuffer[5] = v1 * scale_y;
gTexCoordBuffer[6] = u1 * scale_x;
gTexCoordBuffer[7] = v1 * scale_y;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
vglTexCoordPointerMapped(gTexCoordBuffer);
gVertexBuffer += 12;
gTexCoordBuffer += 8;
Expand Down Expand Up @@ -959,7 +959,7 @@ void RendererLegacy::Draw2DTextureR(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2,
gTexCoordBuffer[5] = t * scale_y;
gTexCoordBuffer[6] = 0.0f;
gTexCoordBuffer[7] = t * scale_y;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
vglTexCoordPointerMapped(gTexCoordBuffer);
gVertexBuffer += 12;
gTexCoordBuffer += 8;
Expand All @@ -976,7 +976,7 @@ uint32_t RendererLegacy::PrepareTrisUnclipped(uint32_t **clr)
//
// Now we just shuffle all the data across directly (potentially duplicating verts)
//
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
*clr = gColorBuffer;
if (mTnL.Flags.Texture) {
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
Expand Down
4 changes: 2 additions & 2 deletions Source/SysVita/HLEGraphics/RendererModern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ void RendererModern::DoGamma(float gamma)
gVertexBuffer[9] = SCR_WIDTH;
gVertexBuffer[10] = SCR_HEIGHT;
gVertexBuffer[11] = 0.0f;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
gVertexBuffer += 12;

// Hack to use float colors without having to use a temporary buffer
Expand Down Expand Up @@ -1031,7 +1031,7 @@ void RendererModern::DrawUITexture()
gVertexBuffer[9] = SCR_WIDTH;
gVertexBuffer[10] = SCR_HEIGHT;
gVertexBuffer[11] = 0.0f;
vglVertexPointerMapped(gVertexBuffer);
vglVertexPointerMapped(3, gVertexBuffer);
gVertexBuffer += 12;

gTexCoordBuffer[0] = 0.0f;
Expand Down
2 changes: 1 addition & 1 deletion Source/SysVita/UI/MainMenuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ void DrawBackground()
bg_attributes[9] = SCR_WIDTH;
bg_attributes[10] = SCR_HEIGHT;
bg_attributes[11] = 0.0f;
vglVertexPointerMapped(bg_attributes);
vglVertexPointerMapped(3, bg_attributes);

bg_attributes[12] = 0.0f;
bg_attributes[13] = 0.0f;
Expand Down
2 changes: 1 addition & 1 deletion Source/SysVita/UI/MenuBarScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ void DrawCommonWindows() {
colors[3] = colors[7] = colors[11] = colors[15] = a;
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
vglVertexPointerMapped(vflux_vertices);
vglVertexPointerMapped(3, vflux_vertices);
vglColorPointerMapped(GL_FLOAT, colors);
vglDrawObjects(GL_TRIANGLE_FAN, 4, true);
glDisableClientState(GL_COLOR_ARRAY);
Expand Down

0 comments on commit ec0c55f

Please sign in to comment.