fixed to match new packet2 api
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "../include/utils/math.hpp"
|
||||
#include "../include/utils/debug.hpp"
|
||||
#include "../include/modules/light.hpp"
|
||||
#include <packet2_chain.h>
|
||||
#include <kernel.h>
|
||||
#include <dma.h>
|
||||
#include <draw.h>
|
||||
@@ -61,7 +62,8 @@ void GifSender::sendTexture(MeshTexture &texture, texbuffer_t *t_texBuffer)
|
||||
packet2->base,
|
||||
texture.getData(),
|
||||
texture.getWidth(),
|
||||
texture.getHeight(), GS_PSM_24,
|
||||
texture.getHeight(),
|
||||
texture.getType(),
|
||||
t_texBuffer->address,
|
||||
t_texBuffer->width));
|
||||
packet2_chain_open_cnt(packet2, 0, 0, 0);
|
||||
@@ -257,5 +259,5 @@ void GifSender::addCurrentCalcs(u32 &t_vertexCount)
|
||||
packet2_add_u64(currentPacket, st[i].uv);
|
||||
packet2_add_u64(currentPacket, xyz[i].xyz);
|
||||
}
|
||||
packet2_align_to_qword(currentPacket);
|
||||
packet2_pad128(currentPacket, 0);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ void VifSender::setDoubleBuffer()
|
||||
void VifSender::drawVertices(Mesh &t_mesh, u32 t_start, u32 t_end, VECTOR *t_vertices, VECTOR *t_coordinates, prim_t *t_prim, texbuffer_t *textureBuffer)
|
||||
{
|
||||
const u32 vertCount = t_end - t_start;
|
||||
currPacket->vif_added_bytes = 0;
|
||||
u32 vif_added_bytes = 0;
|
||||
packet2_utils_vu_open_unpack(currPacket, 0, 1);
|
||||
// TODO get this via screensettings
|
||||
packet2_add_float(currPacket, 2048.0F); // scale
|
||||
@@ -181,8 +181,10 @@ void VifSender::drawVertices(Mesh &t_mesh, u32 t_start, u32 t_end, VECTOR *t_ver
|
||||
packet2_add_float(currPacket, 0.0F);
|
||||
|
||||
//// Clipping tests end
|
||||
packet2_utils_vu_close_unpack(currPacket);
|
||||
packet2_utils_vu_add_unpack_data(currPacket, packet2_get_vif_added_qws(currPacket), t_vertices + t_start, vertCount, 1);
|
||||
packet2_utils_vu_add_unpack_data(currPacket, packet2_get_vif_added_qws(currPacket), t_coordinates + t_start, vertCount, 1);
|
||||
vif_added_bytes += packet2_utils_vu_close_unpack(currPacket);
|
||||
packet2_utils_vu_add_unpack_data(currPacket, vif_added_bytes, t_vertices + t_start, vertCount, 1);
|
||||
vif_added_bytes += vertCount;
|
||||
packet2_utils_vu_add_unpack_data(currPacket, vif_added_bytes, t_coordinates + t_start, vertCount, 1);
|
||||
vif_added_bytes += vertCount;
|
||||
packet2_utils_vu_add_start_program(currPacket, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user