refactored to match latest libpacket2 api

This commit is contained in:
h4570
2020-11-21 13:59:56 +01:00
parent 5e811b78cd
commit 82cab6f78b
7 changed files with 59 additions and 46 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ Renderer::Renderer(u32 t_packetSize, ScreenSettings *t_screen)
isVSyncEnabled = true;
isFrameEmpty = false;
lastTextureId = 0;
flipPacket = packet2_create_normal(4, P2_TYPE_UNCACHED_ACCL);
flipPacket = packet2_create(4, P2_TYPE_UNCACHED_ACCL, P2_MODE_NORMAL, 0);
allocateBuffers(t_screen->width, t_screen->height);
initDrawingEnv(t_screen->width, t_screen->height);
setPrim();
@@ -106,7 +106,7 @@ void Renderer::initDrawingEnv(float t_screenW, float t_screenH)
PRINT_LOG("Initializing drawing environment");
u16 halfW = (u16)t_screenW / 2;
u16 halfH = (u16)t_screenH / 2;
packet2_t *packet2 = packet2_create_normal(20, P2_TYPE_NORMAL);
packet2_t *packet2 = packet2_create(20, P2_TYPE_NORMAL, P2_MODE_NORMAL, 0);
packet2_update(packet2, draw_setup_environment(packet2->base, 0, frameBuffers, &(zBuffer)));
packet2_update(packet2, draw_primitive_xyoffset(packet2->next, 0, (2048 - halfW), (2048 - halfH)));
packet2_update(packet2, draw_finish(packet2->next));