tutorial 1 and 2
This commit is contained in:
@@ -18,6 +18,17 @@ namespace Tyra {
|
||||
|
||||
class Packet2TyraUtils {
|
||||
public:
|
||||
inline static void addUnpackData(packet2_t* packet2,
|
||||
const u32& t_dest_address,
|
||||
const void* t_data, const u32& t_size,
|
||||
const u8& t_use_top) {
|
||||
packet2_chain_ref(packet2, t_data, t_size, 0, 0, 0);
|
||||
packet2_vif_stcycl(packet2, 0, 0x0101, 0);
|
||||
packet2_vif_open_unpack(packet2, P2_UNPACK_V4_32, t_dest_address, t_use_top,
|
||||
0, 1, 0);
|
||||
packet2_vif_close_unpack_manual(packet2, t_size);
|
||||
}
|
||||
|
||||
inline static void addM4x4(packet2_t* packet2, const M4x4& val) {
|
||||
*(reinterpret_cast<M4x4*>(packet2->next)) = val;
|
||||
packet2_advance_next(packet2, sizeof(MATRIX));
|
||||
|
||||
Reference in New Issue
Block a user