Fix fixed-point matrix type being used in floating-point matrix instances
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "generic.h"
|
#include "generic.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
#ifndef NONMATCHING
|
#ifndef NONMATCHING
|
||||||
#define animctrl_start(this, file, line) _animctrl_start(this, file, line)
|
#define animctrl_start(this, file, line) _animctrl_start(this, file, line)
|
||||||
@@ -18,10 +19,10 @@ enum animctrl_playback_e{
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
Mtx mtx_0;
|
MtxF mtx_0;
|
||||||
s32 size_40;
|
s32 size_40;
|
||||||
s32 capacity_44;
|
s32 capacity_44;
|
||||||
Mtx data[];
|
MtxF data[];
|
||||||
}AnimMtxList;
|
}AnimMtxList;
|
||||||
|
|
||||||
typedef struct animation_s{
|
typedef struct animation_s{
|
||||||
|
@@ -1,11 +1,35 @@
|
|||||||
#ifndef __ML_MTX__
|
#ifndef __ML_MTX__
|
||||||
#define __ML_MTX__
|
#define __ML_MTX__
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
f32 m[4][4];
|
||||||
|
} MtxF;
|
||||||
|
|
||||||
|
void mlMtxGet(MtxF *dst);
|
||||||
|
MtxF *mlMtx_get_stack_pointer(void);
|
||||||
|
void mlMtxApply(Mtx *mPtr);
|
||||||
|
void mlMtxPop(void);
|
||||||
|
void mlMtx_push_duplicate(void);
|
||||||
|
void mlMtx_push_identity(void);
|
||||||
|
void mlMtx_push_translation(f32 x, f32 y, f32 z);
|
||||||
|
void mlMtx_push_mtx(f32* mtx);
|
||||||
|
void mlMtx_push_multiplied(f32* l_mtx);
|
||||||
|
void mlMtx_push_multiplied_2(MtxF * l_mtx, MtxF * r_mtx);
|
||||||
void mlMtxIdent(void);
|
void mlMtxIdent(void);
|
||||||
void mlMtxRotPitch(f32 pitch);
|
void mlMtxSet(MtxF* arg0);
|
||||||
void mlMtxRotYaw(f32 yaw);
|
void mlMtxRotPitch(f32 arg0);
|
||||||
void mlMtxRotRoll(f32 roll);
|
void mlMtxRotYaw(f32 arg0);
|
||||||
void mlMtxScale_xyz(f32 x, f32 y, f32);
|
void mlMtxRotRoll(f32 arg0);
|
||||||
|
void mlMtx_rotate_pitch_deg(f32 arg0);
|
||||||
|
void mlMtx_rotate_yaw_deg(f32 arg0);
|
||||||
|
void mlMtxRotatePYR(f32 pitch, f32 yaw, f32 roll);
|
||||||
|
void mlMtxScale_xyz(f32 x, f32 y, f32 z);
|
||||||
|
void mlMtxScale(f32 scale);
|
||||||
|
void mlMtx_apply_f3(f32 dst[3], f32 x, f32 y, f32 z);
|
||||||
|
void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]);
|
||||||
void mlMtxTranslate(f32 x, f32 y, f32 z);
|
void mlMtxTranslate(f32 x, f32 y, f32 z);
|
||||||
|
|
||||||
|
MtxF *func_8024DD90(void);
|
||||||
|
MtxF *func_8024DD9C(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
void chScarfSled_update(Actor *this);
|
void chScarfSled_update(Actor *this);
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ void __chScarfSled_func_80386630(Actor *this){
|
|||||||
f32 sp7C[3];
|
f32 sp7C[3];
|
||||||
f32 sp70[3];
|
f32 sp70[3];
|
||||||
f32 sp64[3];
|
f32 sp64[3];
|
||||||
f32 sp24[4][4];
|
MtxF sp24;
|
||||||
|
|
||||||
func_80343DEC(this);
|
func_80343DEC(this);
|
||||||
mapSpecificFlags_set(9, 1);
|
mapSpecificFlags_set(9, 1);
|
||||||
@@ -89,7 +90,7 @@ void __chScarfSled_func_80386630(Actor *this){
|
|||||||
mlMtxIdent();
|
mlMtxIdent();
|
||||||
mlMtxRotYaw(sp64[1]);
|
mlMtxRotYaw(sp64[1]);
|
||||||
mlMtxRotPitch(sp64[0]);
|
mlMtxRotPitch(sp64[0]);
|
||||||
mlMtxGet(sp24);
|
mlMtxGet(&sp24);
|
||||||
|
|
||||||
sp70[0] = 0.0f;
|
sp70[0] = 0.0f;
|
||||||
sp70[1] = 18.0f;
|
sp70[1] = 18.0f;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "ml/mtx.h"
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
void _guRotateF(Mtx*, f32, f32, f32, f32);
|
void _guRotateF(f32 mf[4][4], f32, f32, f32, f32);
|
||||||
f32 func_80263FF0(f32);
|
f32 func_80263FF0(f32);
|
||||||
f32 cosf(f32);
|
f32 cosf(f32);
|
||||||
|
|
||||||
@@ -21,9 +21,8 @@ f32 D_80276578 = BAD_DTOR;
|
|||||||
f32 D_8027657C = BAD_DTOR;
|
f32 D_8027657C = BAD_DTOR;
|
||||||
|
|
||||||
/*.bss*/
|
/*.bss*/
|
||||||
Mtx_t D_80282810;
|
MtxF D_80282810[0x1F];
|
||||||
u8 pad_D_80282850[0x780];
|
MtxF * s_mtx_stack;
|
||||||
Mtx * s_mtx_stack;
|
|
||||||
|
|
||||||
/*.code*/
|
/*.code*/
|
||||||
/**
|
/**
|
||||||
@@ -31,17 +30,19 @@ Mtx * s_mtx_stack;
|
|||||||
*
|
*
|
||||||
* @param dst
|
* @param dst
|
||||||
*/
|
*/
|
||||||
void mlMtxGet(f32 *dst) {
|
void mlMtxGet(MtxF *dst) {
|
||||||
s32 row, col;
|
s32 row, col;
|
||||||
|
|
||||||
for(row = 0; row < 4; row++){
|
for(row = 0; row < 4; row++){
|
||||||
for(col = 0; col < 4; col++){
|
for(col = 0; col < 4; col++){
|
||||||
*(dst++) = reinterpret_cast(f32, s_mtx_stack->m[row][col]);
|
dst->m[0][0] = s_mtx_stack->m[row][col];
|
||||||
|
// TODO figure out how to avoid this pointer arithmetic.
|
||||||
|
dst = (MtxF*)&dst->m[0][1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Mtx *mlMtx_get_stack_pointer(void){
|
MtxF *mlMtx_get_stack_pointer(void){
|
||||||
return s_mtx_stack;
|
return s_mtx_stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,23 +50,23 @@ void mlMtxApply(Mtx *mPtr){
|
|||||||
_guMtxF2L(s_mtx_stack, mPtr);
|
_guMtxF2L(s_mtx_stack, mPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802514BC(Mtx* arg0) {
|
void func_802514BC(MtxF *arg0) {
|
||||||
s32 row;
|
s32 row;
|
||||||
s32 col;
|
s32 col;
|
||||||
s32 i;
|
s32 i;
|
||||||
f32 sum;
|
f32 sum;
|
||||||
f32 prod[4][4];
|
f32 prod[4][4];
|
||||||
|
|
||||||
for(row = 0; row < 4; row++, arg0 = &arg0->m[1][0]) {
|
for(row = 0; row < 4; row++, arg0 = (MtxF*)&arg0->m[1][0]) {
|
||||||
for(col = 0; col < 4; col++) {
|
for(col = 0; col < 4; col++) {
|
||||||
sum = 0.0;
|
sum = 0.0;
|
||||||
for(i = 0; i < 4; i++) {
|
for(i = 0; i < 4; i++) {
|
||||||
sum += reinterpret_cast(f32, arg0->m[0][i]) * reinterpret_cast(f32, s_mtx_stack->m[i][col]);
|
sum += arg0->m[0][i] * s_mtx_stack->m[i][col];
|
||||||
}
|
}
|
||||||
prod[row][col] = sum;
|
prod[row][col] = sum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func_80253010(s_mtx_stack, prod, sizeof(Mtx));
|
func_80253010(s_mtx_stack, prod, sizeof(MtxF));
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802515D4(f32 arg0[3][3]) {
|
void func_802515D4(f32 arg0[3][3]) {
|
||||||
@@ -79,7 +80,7 @@ void func_802515D4(f32 arg0[3][3]) {
|
|||||||
for(var_v1 = 0; var_v1 < 3; var_v1++){
|
for(var_v1 = 0; var_v1 < 3; var_v1++){
|
||||||
var_f0 = 0.0f;
|
var_f0 = 0.0f;
|
||||||
for(var_v0 = 0; var_v0 < 3; var_v0++){
|
for(var_v0 = 0; var_v0 < 3; var_v0++){
|
||||||
var_f0 += arg0[i][var_v0] * reinterpret_cast(f32, s_mtx_stack->m[var_v0][var_v1]);
|
var_f0 += arg0[i][var_v0] * s_mtx_stack->m[var_v0][var_v1];
|
||||||
}
|
}
|
||||||
sp1C[i][var_v1] = var_f0;
|
sp1C[i][var_v1] = var_f0;
|
||||||
}
|
}
|
||||||
@@ -88,7 +89,7 @@ void func_802515D4(f32 arg0[3][3]) {
|
|||||||
|
|
||||||
for( i = 0; i < 3; i++){
|
for( i = 0; i < 3; i++){
|
||||||
for(var_v1 = 0; var_v1 < 3; var_v1++){
|
for(var_v1 = 0; var_v1 < 3; var_v1++){
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[i][var_v1]) = sp1C[i][var_v1];
|
s_mtx_stack->m[i][var_v1] = sp1C[i][var_v1];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,8 +110,8 @@ void mlMtx_push_duplicate(void) {
|
|||||||
f32 *var_a3;
|
f32 *var_a3;
|
||||||
f32 *var_a2;
|
f32 *var_a2;
|
||||||
|
|
||||||
var_a2 = s_mtx_stack + 1;
|
var_a2 = &(s_mtx_stack + 1)->m[0][0];
|
||||||
var_a3 = s_mtx_stack;
|
var_a3 = &s_mtx_stack->m[0][0];
|
||||||
for(i = 0; i < 16; i++) {
|
for(i = 0; i < 16; i++) {
|
||||||
var_a2[i] = var_a3[i];
|
var_a2[i] = var_a3[i];
|
||||||
}
|
}
|
||||||
@@ -123,7 +124,7 @@ void mlMtx_push_duplicate(void) {
|
|||||||
*/
|
*/
|
||||||
void mlMtx_push_identity(void){
|
void mlMtx_push_identity(void){
|
||||||
s32 i;
|
s32 i;
|
||||||
f32 *v0 = ++s_mtx_stack;
|
f32 *v0 = &(++s_mtx_stack)->m[0][0];
|
||||||
for(i = 0; i<3; i++){
|
for(i = 0; i<3; i++){
|
||||||
v0[0] = 1.0f;
|
v0[0] = 1.0f;
|
||||||
v0[1] = 0.0f;
|
v0[1] = 0.0f;
|
||||||
@@ -141,14 +142,13 @@ void mlMtx_push_identity(void){
|
|||||||
* @param x
|
* @param x
|
||||||
* @param y
|
* @param y
|
||||||
* @param z
|
* @param z
|
||||||
* @return f32*
|
|
||||||
*/
|
*/
|
||||||
f32 *mlMtx_push_translation(f32 x, f32 y, f32 z){
|
void mlMtx_push_translation(f32 x, f32 y, f32 z){
|
||||||
f32 * var_v0 = ++s_mtx_stack;
|
f32 * var_v0 = &(++s_mtx_stack)->m[0][0];
|
||||||
*(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
*(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
||||||
*(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
*(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
||||||
*(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f;
|
*(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f;
|
||||||
*(var_v0++) = x; *(var_v0++) = y; *(var_v0++) = z; *(var_v0++) = 1.0f;
|
*(var_v0++) = x; *(var_v0++) = y; *(var_v0++) = z; *(var_v0++) = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -162,7 +162,7 @@ void mlMtx_push_mtx(f32* mtx) {
|
|||||||
s_mtx_stack++;
|
s_mtx_stack++;
|
||||||
for(var_v0 = 0; var_v0 < 4; var_v0++){
|
for(var_v0 = 0; var_v0 < 4; var_v0++){
|
||||||
for(j = 0; j < 4; j++){
|
for(j = 0; j < 4; j++){
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[var_v0][j]) = *mtx++;
|
s_mtx_stack->m[var_v0][j] = *mtx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,15 +176,15 @@ void mlMtx_push_mtx(f32* mtx) {
|
|||||||
void mlMtx_push_multiplied(f32* l_mtx) {
|
void mlMtx_push_multiplied(f32* l_mtx) {
|
||||||
s32 i;
|
s32 i;
|
||||||
s32 j;
|
s32 j;
|
||||||
Mtx* var_a2;
|
MtxF* var_a2;
|
||||||
|
|
||||||
var_a2 = s_mtx_stack + 1;
|
var_a2 = s_mtx_stack + 1;
|
||||||
for(i = 0; i < 4; i++, l_mtx += 4){
|
for(i = 0; i < 4; i++, l_mtx += 4){
|
||||||
for(j = 0; j < 4; j++){
|
for(j = 0; j < 4; j++){
|
||||||
reinterpret_cast(f32, var_a2->m[i][j]) = l_mtx[0] * reinterpret_cast(f32, s_mtx_stack->m[0][j])
|
var_a2->m[i][j] = l_mtx[0] * s_mtx_stack->m[0][j]
|
||||||
+ l_mtx[1] * reinterpret_cast(f32, s_mtx_stack->m[1][j])
|
+ l_mtx[1] * s_mtx_stack->m[1][j]
|
||||||
+ l_mtx[2] * reinterpret_cast(f32, s_mtx_stack->m[2][j])
|
+ l_mtx[2] * s_mtx_stack->m[2][j]
|
||||||
+ l_mtx[3] * reinterpret_cast(f32, s_mtx_stack->m[3][j]);
|
+ l_mtx[3] * s_mtx_stack->m[3][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s_mtx_stack = var_a2;
|
s_mtx_stack = var_a2;
|
||||||
@@ -197,21 +197,21 @@ void mlMtx_push_multiplied(f32* l_mtx) {
|
|||||||
* @param l_mtx
|
* @param l_mtx
|
||||||
* @param r_mtx
|
* @param r_mtx
|
||||||
*/
|
*/
|
||||||
void mlMtx_push_multiplied_2(Mtx * l_mtx, Mtx * r_mtx) {
|
void mlMtx_push_multiplied_2(MtxF * l_mtx, MtxF * r_mtx) {
|
||||||
s32 row;
|
s32 row;
|
||||||
s32 col;
|
s32 col;
|
||||||
Mtx * dst = (s_mtx_stack + 1);
|
MtxF * dst = (s_mtx_stack + 1);
|
||||||
|
|
||||||
for (row = 0; row < 4; row++, r_mtx = &r_mtx->m[1][0])
|
for (row = 0; row < 4; row++, r_mtx = (MtxF*)&r_mtx->m[1][0])
|
||||||
{
|
{
|
||||||
for (col = 0; col < 4; col++)
|
for (col = 0; col < 4; col++)
|
||||||
{
|
{
|
||||||
reinterpret_cast(f32, dst->m[row][col]) =
|
dst->m[row][col] =
|
||||||
(
|
(
|
||||||
reinterpret_cast(f32, r_mtx->m[0][0]) * reinterpret_cast(f32, l_mtx->m[0][col]) +
|
r_mtx->m[0][0] * l_mtx->m[0][col] +
|
||||||
reinterpret_cast(f32, r_mtx->m[0][1]) * reinterpret_cast(f32, l_mtx->m[1][col]) +
|
r_mtx->m[0][1] * l_mtx->m[1][col] +
|
||||||
reinterpret_cast(f32, r_mtx->m[0][2]) * reinterpret_cast(f32, l_mtx->m[2][col]) +
|
r_mtx->m[0][2] * l_mtx->m[2][col] +
|
||||||
reinterpret_cast(f32, r_mtx->m[0][3]) * reinterpret_cast(f32, l_mtx->m[3][col])
|
r_mtx->m[0][3] * l_mtx->m[3][col]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ void mlMtx_push_multiplied_2(Mtx * l_mtx, Mtx * r_mtx) {
|
|||||||
//mlMtx
|
//mlMtx
|
||||||
void mlMtxIdent(void){
|
void mlMtxIdent(void){
|
||||||
s32 i;
|
s32 i;
|
||||||
f32 *v0 = s_mtx_stack = &D_80282810;
|
f32 *v0 = &(s_mtx_stack = &D_80282810[0])->m[0][0];
|
||||||
for(i = 0; i<3; i++){
|
for(i = 0; i<3; i++){
|
||||||
v0[0] = 1.0f;
|
v0[0] = 1.0f;
|
||||||
v0[1] = 0.0f;
|
v0[1] = 0.0f;
|
||||||
@@ -234,28 +234,31 @@ void mlMtxIdent(void){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80251B5C(f32 x, f32 y, f32 z){
|
void func_80251B5C(f32 x, f32 y, f32 z){
|
||||||
f32 * var_v0 = s_mtx_stack = &D_80282810;
|
f32 * var_v0 = &(s_mtx_stack = &D_80282810[0])->m[0][0];
|
||||||
*(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
*(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
||||||
*(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
*(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f; *(var_v0++) = 0.0f;
|
||||||
*(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f;
|
*(var_v0++) = 0.0f; *(var_v0++) = 0.0f; *(var_v0++) = 1.0f; *(var_v0++) = 0.0f;
|
||||||
*(var_v0++) = x; *(var_v0++) = y; *(var_v0++) = z; *(var_v0++) = 1.0f;
|
*(var_v0++) = x; *(var_v0++) = y; *(var_v0++) = z; *(var_v0++) = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlMtxSet(Mtx* arg0) {
|
void mlMtxSet(MtxF* arg0) {
|
||||||
s32 i, j;
|
s32 i, j;
|
||||||
f32 *v0;
|
MtxF *v0;
|
||||||
|
|
||||||
v0 = s_mtx_stack = &D_80282810;
|
v0 = s_mtx_stack = D_80282810;
|
||||||
for(i = 0; i < 4*4; i+=4){
|
for(i = 0; i < 4*4; i+=4){
|
||||||
for(j = 0; j < 4; j++){
|
for(j = 0; j < 4; j++){
|
||||||
*(v0++) = *(((f32*)arg0)++);
|
v0->m[0][0] = arg0->m[0][0];
|
||||||
|
// TODO figure out how to avoid this pointer arithmetic.
|
||||||
|
v0 = (MtxF*)(&v0->m[0][1]);
|
||||||
|
arg0 = (MtxF*)(&arg0->m[0][1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlMtxRotate(f32 a, f32 x, f32 y, f32 z) {
|
void mlMtxRotate(f32 a, f32 x, f32 y, f32 z) {
|
||||||
_guRotateF(s_mtx_stack + 1, a, x, y, z);
|
_guRotateF((s_mtx_stack + 1)->m, a, x, y, z);
|
||||||
guMtxCatF(s_mtx_stack + 1, s_mtx_stack, s_mtx_stack);
|
guMtxCatF((s_mtx_stack + 1)->m, s_mtx_stack->m, s_mtx_stack->m);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlMtxRotPitch(f32 arg0) {
|
void mlMtxRotPitch(f32 arg0) {
|
||||||
@@ -268,20 +271,20 @@ void mlMtxRotPitch(f32 arg0) {
|
|||||||
arg0 *= D_80276578;
|
arg0 *= D_80276578;
|
||||||
sin = sinf(arg0);
|
sin = sinf(arg0);
|
||||||
cos = cosf(arg0);
|
cos = cosf(arg0);
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[1][0]);
|
var_f18 = s_mtx_stack->m[1][0];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[2][0]);
|
var_f10 = s_mtx_stack->m[2][0];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][0]) = var_f18*cos + var_f10*sin;
|
s_mtx_stack->m[1][0] = var_f18*cos + var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][0]) = var_f18*-sin + var_f10*cos;
|
s_mtx_stack->m[2][0] = var_f18*-sin + var_f10*cos;
|
||||||
|
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[1][1]);
|
var_f18 = s_mtx_stack->m[1][1];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[2][1]);
|
var_f10 = s_mtx_stack->m[2][1];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][1]) = var_f18*cos + var_f10*sin;
|
s_mtx_stack->m[1][1] = var_f18*cos + var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][1]) = var_f18*-sin + var_f10*cos;
|
s_mtx_stack->m[2][1] = var_f18*-sin + var_f10*cos;
|
||||||
|
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[1][2]);
|
var_f18 = s_mtx_stack->m[1][2];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[2][2]);
|
var_f10 = s_mtx_stack->m[2][2];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][2]) = var_f18*cos + var_f10*sin;
|
s_mtx_stack->m[1][2] = var_f18*cos + var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][2]) = var_f18*-sin + var_f10*cos;
|
s_mtx_stack->m[2][2] = var_f18*-sin + var_f10*cos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,10 +300,10 @@ void mlMtxRotYaw(f32 arg0) {
|
|||||||
sin = sinf(arg0);
|
sin = sinf(arg0);
|
||||||
cos = cosf(arg0);
|
cos = cosf(arg0);
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[0][i]);
|
var_f18 = s_mtx_stack->m[0][i];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[2][i]);
|
var_f10 = s_mtx_stack->m[2][i];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[0][i]) = var_f18*cos - var_f10*sin;
|
s_mtx_stack->m[0][i] = var_f18*cos - var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][i]) = var_f18*sin + var_f10*cos;
|
s_mtx_stack->m[2][i] = var_f18*sin + var_f10*cos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -315,20 +318,20 @@ void mlMtxRotRoll(f32 arg0) {
|
|||||||
arg0 *= D_8027657C;
|
arg0 *= D_8027657C;
|
||||||
sin = sinf(arg0);
|
sin = sinf(arg0);
|
||||||
cos = cosf(arg0);
|
cos = cosf(arg0);
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[0][0]);
|
var_f18 = s_mtx_stack->m[0][0];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[1][0]);
|
var_f10 = s_mtx_stack->m[1][0];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[0][0]) = var_f18*cos + var_f10*sin;
|
s_mtx_stack->m[0][0] = var_f18*cos + var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][0]) = var_f18*-sin + var_f10*cos;
|
s_mtx_stack->m[1][0] = var_f18*-sin + var_f10*cos;
|
||||||
|
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[0][1]);
|
var_f18 = s_mtx_stack->m[0][1];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[1][1]);
|
var_f10 = s_mtx_stack->m[1][1];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[0][1]) = var_f18*cos + var_f10*sin;
|
s_mtx_stack->m[0][1] = var_f18*cos + var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][1]) = var_f18*-sin + var_f10*cos;
|
s_mtx_stack->m[1][1] = var_f18*-sin + var_f10*cos;
|
||||||
|
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[0][2]);
|
var_f18 = s_mtx_stack->m[0][2];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[1][2]);
|
var_f10 = s_mtx_stack->m[1][2];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[0][2]) = var_f18*cos + var_f10*sin;
|
s_mtx_stack->m[0][2] = var_f18*cos + var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][2]) = var_f18*-sin + var_f10*cos;
|
s_mtx_stack->m[1][2] = var_f18*-sin + var_f10*cos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,10 +348,10 @@ void mlMtx_rotate_pitch_deg(f32 arg0) {
|
|||||||
sin = sinf(arg0);
|
sin = sinf(arg0);
|
||||||
cos = cosf(arg0);
|
cos = cosf(arg0);
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[1][i]);
|
var_f18 = s_mtx_stack->m[1][i];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[2][i]);
|
var_f10 = s_mtx_stack->m[2][i];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][i]) = var_f18*cos + var_f10*sin;
|
s_mtx_stack->m[1][i] = var_f18*cos + var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][i]) = var_f18*-sin +var_f10*cos;
|
s_mtx_stack->m[2][i] = var_f18*-sin +var_f10*cos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -365,10 +368,10 @@ void mlMtx_rotate_yaw_deg(f32 arg0) {
|
|||||||
sin = sinf(arg0);
|
sin = sinf(arg0);
|
||||||
cos = cosf(arg0);
|
cos = cosf(arg0);
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
var_f18 = reinterpret_cast(f32, s_mtx_stack->m[0][i]);
|
var_f18 = s_mtx_stack->m[0][i];
|
||||||
var_f10 = reinterpret_cast(f32, s_mtx_stack->m[2][i]);
|
var_f10 = s_mtx_stack->m[2][i];
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[0][i]) = var_f18*cos - var_f10*sin;
|
s_mtx_stack->m[0][i] = var_f18*cos - var_f10*sin;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][i]) = var_f18*sin + var_f10*cos;
|
s_mtx_stack->m[2][i] = var_f18*sin + var_f10*cos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -383,25 +386,25 @@ void mlMtxRotatePYR(f32 pitch, f32 yaw, f32 roll){
|
|||||||
void mlMtxScale_xyz(f32 x, f32 y, f32 z){
|
void mlMtxScale_xyz(f32 x, f32 y, f32 z){
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[0][i]) *= x;
|
s_mtx_stack->m[0][i] *= x;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][i]) *= y;
|
s_mtx_stack->m[1][i] *= y;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][i]) *= z;
|
s_mtx_stack->m[2][i] *= z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlMtxScale(f32 scale){
|
void mlMtxScale(f32 scale){
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[0][i]) *= scale;
|
s_mtx_stack->m[0][i] *= scale;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[1][i]) *= scale;
|
s_mtx_stack->m[1][i] *= scale;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[2][i]) *= scale;
|
s_mtx_stack->m[2][i] *= scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80252330(f32 x, f32 y, f32 z){
|
void func_80252330(f32 x, f32 y, f32 z){
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[3][0]) = x;
|
s_mtx_stack->m[3][0] = x;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[3][1]) = y;
|
s_mtx_stack->m[3][1] = y;
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[3][2]) = z;
|
s_mtx_stack->m[3][2] = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8025235C(f32 arg0[3], f32 arg1[3]) {
|
void func_8025235C(f32 arg0[3], f32 arg1[3]) {
|
||||||
@@ -413,10 +416,10 @@ void func_8025235C(f32 arg0[3], f32 arg1[3]) {
|
|||||||
sp0[2] = arg1[2];
|
sp0[2] = arg1[2];
|
||||||
|
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
arg0[i] = sp0[0]*reinterpret_cast(f32, s_mtx_stack->m[0][i])
|
arg0[i] = sp0[0]*s_mtx_stack->m[0][i]
|
||||||
+ sp0[1]*reinterpret_cast(f32, s_mtx_stack->m[1][i])
|
+ sp0[1]*s_mtx_stack->m[1][i]
|
||||||
+ sp0[2]*reinterpret_cast(f32, s_mtx_stack->m[2][i])
|
+ sp0[2]*s_mtx_stack->m[2][i]
|
||||||
+ reinterpret_cast(f32, s_mtx_stack->m[3][i]);
|
+ s_mtx_stack->m[3][i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,17 +427,17 @@ void func_80252434(f32 arg0[3], f32 arg1[3]) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for(i = 0; i < 3; i++){
|
for(i = 0; i < 3; i++){
|
||||||
arg0[i] = arg1[0]*reinterpret_cast(f32, s_mtx_stack->m[0][i])
|
arg0[i] = arg1[0]*s_mtx_stack->m[0][i]
|
||||||
+ arg1[1]*reinterpret_cast(f32, s_mtx_stack->m[1][i])
|
+ arg1[1]*s_mtx_stack->m[1][i]
|
||||||
+ arg1[2]*reinterpret_cast(f32, s_mtx_stack->m[2][i])
|
+ arg1[2]*s_mtx_stack->m[2][i]
|
||||||
+ reinterpret_cast(f32, s_mtx_stack->m[3][i]);
|
+ s_mtx_stack->m[3][i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlMtx_apply_f3(f32 dst[3], f32 x, f32 y, f32 z) {
|
void mlMtx_apply_f3(f32 dst[3], f32 x, f32 y, f32 z) {
|
||||||
dst[0] = x*((f32 (*)[4])s_mtx_stack)[0][0] + y*((f32 (*)[4])s_mtx_stack)[1][0] + z*((f32 (*)[4])s_mtx_stack)[2][0] + ((f32 (*)[4])s_mtx_stack)[3][0];
|
dst[0] = x* s_mtx_stack->m[0][0] + y*s_mtx_stack->m[1][0] + z*s_mtx_stack->m[2][0] + s_mtx_stack->m[3][0];
|
||||||
dst[1] = x*((f32 (*)[4])s_mtx_stack)[0][1] + y*((f32 (*)[4])s_mtx_stack)[1][1] + z*((f32 (*)[4])s_mtx_stack)[2][1] + ((f32 (*)[4])s_mtx_stack)[3][1];
|
dst[1] = x* s_mtx_stack->m[0][1] + y*s_mtx_stack->m[1][1] + z*s_mtx_stack->m[2][1] + s_mtx_stack->m[3][1];
|
||||||
dst[2] = x*((f32 (*)[4])s_mtx_stack)[0][2] + y*((f32 (*)[4])s_mtx_stack)[1][2] + z*((f32 (*)[4])s_mtx_stack)[2][2] + ((f32 (*)[4])s_mtx_stack)[3][2];
|
dst[2] = x* s_mtx_stack->m[0][2] + y*s_mtx_stack->m[1][2] + z*s_mtx_stack->m[2][2] + s_mtx_stack->m[3][2];
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]) {
|
void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]) {
|
||||||
@@ -442,7 +445,7 @@ void mlMtx_apply_vec3s(s16 dst[3], s16 src[3]) {
|
|||||||
f32 sp0[3];
|
f32 sp0[3];
|
||||||
f32 (*temp_v0)[4];
|
f32 (*temp_v0)[4];
|
||||||
|
|
||||||
temp_v0 = s_mtx_stack;
|
temp_v0 = &s_mtx_stack->m[0];
|
||||||
sp0[0] = (f32) src[0];
|
sp0[0] = (f32) src[0];
|
||||||
sp0[1] = (f32) src[1];
|
sp0[1] = (f32) src[1];
|
||||||
sp0[2] = (f32) src[2];
|
sp0[2] = (f32) src[2];
|
||||||
@@ -489,19 +492,14 @@ void func_8025276C(s32 arg0[3], s32 arg1[3], s32 arg2[3], s32 arg3[3]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mlMtxTranslate(f32 x, f32 y, f32 z) {
|
void mlMtxTranslate(f32 x, f32 y, f32 z) {
|
||||||
f32 *temp_t6;
|
|
||||||
f32 *phi_v0;
|
|
||||||
f32 phi_f18;
|
f32 phi_f18;
|
||||||
f32 phi_f16;
|
f32 phi_f16;
|
||||||
f32 phi_f10;
|
|
||||||
s32 phi_v1;
|
s32 phi_v1;
|
||||||
|
|
||||||
phi_v0 = s_mtx_stack;
|
for(phi_v1 = 0; phi_v1 < 3; phi_v1++){
|
||||||
for(phi_v1 = 0; phi_v1 < 0xC; phi_v1 +=4){
|
phi_f18 = s_mtx_stack->m[0][phi_v1] * x;
|
||||||
phi_v0 = (u32)s_mtx_stack + phi_v1;
|
phi_f16 = s_mtx_stack->m[1][phi_v1] * y;
|
||||||
phi_f18 = phi_v0[0] * x;
|
s_mtx_stack->m[3][phi_v1] += phi_f18 + phi_f16 + (s_mtx_stack->m[2][phi_v1] * z);
|
||||||
phi_f16 = phi_v0[4] * y;
|
|
||||||
phi_v0[0xC] += phi_f18 + phi_f16 + (phi_v0[8] * z);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -509,7 +507,7 @@ void func_80252A38(f32 x, f32 y, f32 z) {
|
|||||||
s32 var_v1;
|
s32 var_v1;
|
||||||
|
|
||||||
for(var_v1 = 0; var_v1 != 3; var_v1++){
|
for(var_v1 = 0; var_v1 != 3; var_v1++){
|
||||||
reinterpret_cast(f32, s_mtx_stack->m[3][var_v1]) += reinterpret_cast(f32, s_mtx_stack->m[0][var_v1])*x + reinterpret_cast(f32, s_mtx_stack->m[1][var_v1])*y + reinterpret_cast(f32, s_mtx_stack->m[2][var_v1])*z;
|
s_mtx_stack->m[3][var_v1] += s_mtx_stack->m[0][var_v1]*x + s_mtx_stack->m[1][var_v1]*y + s_mtx_stack->m[2][var_v1]*z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
extern void guPerspective(Mtx *, u16*, f32, f32, f32, f32, f32);
|
extern void guPerspective(Mtx *, u16*, f32, f32, f32, f32, f32);
|
||||||
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
|
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
|
||||||
|
|
||||||
@@ -21,8 +23,8 @@ f32 D_80280ECC;
|
|||||||
f32 D_80280ED0[4][4];
|
f32 D_80280ED0[4][4];
|
||||||
Vp s_viewport_stack[8];
|
Vp s_viewport_stack[8];
|
||||||
int D_80280F90;
|
int D_80280F90;
|
||||||
f32 D_80280F98[4][4];
|
MtxF D_80280F98;
|
||||||
Mtx D_80280FD8;
|
MtxF D_80280FD8;
|
||||||
s32 s_viewport_stack_index; //viewport indx
|
s32 s_viewport_stack_index; //viewport indx
|
||||||
|
|
||||||
|
|
||||||
@@ -386,11 +388,11 @@ bool func_8024DD34(f32 arg0, f32 arg1, f32 arg2) {
|
|||||||
return ((D_80280ED0[2][0]*arg0 + D_80280ED0[2][1]*arg1 + D_80280ED0[2][2]*arg2 + D_80280ED0[2][3]) <= 0.0f);
|
return ((D_80280ED0[2][0]*arg0 + D_80280ED0[2][1]*arg1 + D_80280ED0[2][2]*arg2 + D_80280ED0[2][3]) <= 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Mtx *func_8024DD90(void){
|
MtxF *func_8024DD90(void){
|
||||||
return &D_80280F98;
|
return &D_80280F98;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mtx *func_8024DD9C(void){
|
MtxF *func_8024DD9C(void){
|
||||||
return &D_80280FD8;
|
return &D_80280FD8;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,7 +452,7 @@ f32 D_80281058[3];
|
|||||||
f32 D_80281068[3];
|
f32 D_80281068[3];
|
||||||
f32 D_80281078[3];
|
f32 D_80281078[3];
|
||||||
f32 D_80281088[3];
|
f32 D_80281088[3];
|
||||||
f32 D_80281098[4][4];
|
MtxF D_80281098;
|
||||||
|
|
||||||
bool func_8024E030(f32 arg0[3], f32 *arg1)
|
bool func_8024E030(f32 arg0[3], f32 *arg1)
|
||||||
{
|
{
|
||||||
@@ -488,7 +490,7 @@ void func_8024E258(void){
|
|||||||
func_8024C5A8(D_80281088);
|
func_8024C5A8(D_80281088);
|
||||||
for(i = 0; i < 4; i++){
|
for(i = 0; i < 4; i++){
|
||||||
for(j = 0; j < 4; j++){
|
for(j = 0; j < 4; j++){
|
||||||
D_80281098[i][j] = D_80280F98[i][j];
|
D_80281098.m[i][j] = D_80280F98.m[i][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -501,7 +503,7 @@ void func_8024E2FC(void){
|
|||||||
ml_vec3f_copy(D_80280EA0, D_80281088);
|
ml_vec3f_copy(D_80280EA0, D_80281088);
|
||||||
for(i = 0; i < 4; i++){
|
for(i = 0; i < 4; i++){
|
||||||
for(j = 0; j < 4; j++){
|
for(j = 0; j < 4; j++){
|
||||||
D_80280F98[i][j] = D_80281098[i][j];
|
D_80280F98.m[i][j] = D_80281098.m[i][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@ typedef struct {
|
|||||||
}ActorLocal_Core2_3ECE0;
|
}ActorLocal_Core2_3ECE0;
|
||||||
|
|
||||||
void chBubble_update(Actor *this);
|
void chBubble_update(Actor *this);
|
||||||
extern void func_802F32C4(s32, f32[3], f32, ActorMarker *, void(*)(f32[3], f32, ActorMarker *));
|
extern void func_802F32C4(s32, f32[3], f32, ActorMarker *, s32(*)(f32[3], f32, ActorMarker *));
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
ActorInfo chBubble = {
|
ActorInfo chBubble = {
|
||||||
@@ -17,7 +17,7 @@ ActorInfo chBubble = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
int __chBubble_func_802C5C70(f32 arg0[3], f32 arg1, ActorMarker *marker){
|
s32 __chBubble_func_802C5C70(f32 arg0[3], f32 arg1, ActorMarker *marker){
|
||||||
s32 pad2C;
|
s32 pad2C;
|
||||||
Actor *this = marker_getActor(marker);
|
Actor *this = marker_getActor(marker);
|
||||||
ActorLocal_Core2_3ECE0 *local = (ActorLocal_Core2_3ECE0 *) &this->local;
|
ActorLocal_Core2_3ECE0 *local = (ActorLocal_Core2_3ECE0 *) &this->local;
|
||||||
|
@@ -2,11 +2,14 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
|
void *defrag(void *);
|
||||||
|
|
||||||
void animMtxList_setBoneless(AnimMtxList **this_ptr, BKAnimationList *anim_list){
|
void animMtxList_setBoneless(AnimMtxList **this_ptr, BKAnimationList *anim_list){
|
||||||
AnimMtxList * this;
|
AnimMtxList * this;
|
||||||
Mtx *end_ptr;
|
MtxF *end_ptr;
|
||||||
Mtx *i_ptr;
|
MtxF *i_ptr;
|
||||||
|
|
||||||
this = *this_ptr;
|
this = *this_ptr;
|
||||||
if(this->capacity_44 < anim_list->cnt_4){
|
if(this->capacity_44 < anim_list->cnt_4){
|
||||||
@@ -16,14 +19,14 @@ void animMtxList_setBoneless(AnimMtxList **this_ptr, BKAnimationList *anim_list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->size_40 = anim_list->cnt_4;
|
this->size_40 = anim_list->cnt_4;
|
||||||
end_ptr = (Mtx *)(this->size_40*sizeof(Mtx) + (s32)this +sizeof(AnimMtxList));
|
end_ptr = (MtxF *)(this->size_40*sizeof(MtxF) + (s32)this +sizeof(AnimMtxList));
|
||||||
mlMtxIdent();
|
mlMtxIdent();
|
||||||
for(i_ptr = this->data; i_ptr < end_ptr; i_ptr++){
|
for(i_ptr = this->data; i_ptr < end_ptr; i_ptr++){
|
||||||
mlMtxGet(i_ptr);
|
mlMtxGet(i_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Mtx *animMtxList_get(AnimMtxList *this, s32 arg1){
|
MtxF *animMtxList_get(AnimMtxList *this, s32 arg1){
|
||||||
if (arg1 == -1){
|
if (arg1 == -1){
|
||||||
return &this->mtx_0;
|
return &this->mtx_0;
|
||||||
}
|
}
|
||||||
@@ -40,7 +43,7 @@ AnimMtxList *animMtxList_new(void){
|
|||||||
this->size_40 = 0;
|
this->size_40 = 0;
|
||||||
this->capacity_44 = 0;
|
this->capacity_44 = 0;
|
||||||
mlMtxIdent();
|
mlMtxIdent();
|
||||||
mlMtxGet(this);
|
mlMtxGet(&this->mtx_0);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,14 +53,13 @@ s32 animMtxList_len(AnimMtxList* this){
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlMtxSet(Mtx*);
|
void func_8033A5B8(BoneTransformList *this, s32 bone_id, f32 arg2[4], f32 scale[3], f32 arg4[3]);
|
||||||
void func_8033A5B8(s32, s32, f32[4],f32[3], f32[3]);
|
|
||||||
|
|
||||||
void animMtxList_setBoned(AnimMtxList **this_ptr, BKAnimationList *anim_list, BoneTransformList *arg2){
|
void animMtxList_setBoned(AnimMtxList **this_ptr, BKAnimationList *anim_list, BoneTransformList *arg2){
|
||||||
AnimMtxList * this;
|
AnimMtxList * this;
|
||||||
Mtx *start_ptr;
|
MtxF *start_ptr;
|
||||||
Mtx *end_ptr;
|
MtxF *end_ptr;
|
||||||
Mtx *i_ptr;
|
MtxF *i_ptr;
|
||||||
BKAnimation *s0;
|
BKAnimation *s0;
|
||||||
f32 tmp_f0;
|
f32 tmp_f0;
|
||||||
s32 pad94[1];
|
s32 pad94[1];
|
||||||
|
@@ -1,13 +1,15 @@
|
|||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
extern void func_80252C08(f32[3], f32[3], f32, f32[3]);
|
extern void func_80252C08(f32[3], f32[3], f32, f32[3]);
|
||||||
extern void func_80252CC4(f32[3], f32[3], f32, s32);
|
extern void func_80252CC4(f32[3], f32[3], f32, f32[3]);
|
||||||
extern void mlMtx_apply_f3(f32[3], f32, f32, f32);
|
extern void mlMtx_apply_f3(f32[3], f32, f32, f32);
|
||||||
extern s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3]);
|
extern s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], AnimMtxList* arg5, f32 arg6[3], f32 arg7, f32 arg8[3]);
|
||||||
|
extern MtxF *animMtxList_get(AnimMtxList *this, s32 arg1);
|
||||||
/* .bss */
|
/* .bss */
|
||||||
Mtx D_80380880;
|
MtxF D_80380880;
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
bool func_802EA760(BKModelUnk14List *arg0, s32 arg1, f32 arg2[3], f32 rotation[3], f32 scale, f32 arg5[3], f32 arg6[3], f32 *arg7) {
|
bool func_802EA760(BKModelUnk14List *arg0, s32 arg1, f32 arg2[3], f32 rotation[3], f32 scale, f32 arg5[3], f32 arg6[3], f32 *arg7) {
|
||||||
@@ -18,7 +20,7 @@ bool func_802EA760(BKModelUnk14List *arg0, s32 arg1, f32 arg2[3], f32 rotation[3
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
start = sizeof(BKModelUnk14List) + arg0->cnt0*sizeof(BKModelUnk14_0) + (s32)arg0;
|
start = sizeof(BKModelUnk14List) + arg0->cnt0*sizeof(BKModelUnk14_0) + (s32)arg0;
|
||||||
temp_v0 = arg0->cnt2*sizeof(BKModelUnk14_1) + start + arg1 *sizeof(BKModelUnk14_2);
|
temp_v0 = (BKModelUnk14_2*)(arg0->cnt2*sizeof(BKModelUnk14_1) + start + arg1 *sizeof(BKModelUnk14_2));
|
||||||
|
|
||||||
arg6[0] = (f32) temp_v0->unk2[0];
|
arg6[0] = (f32) temp_v0->unk2[0];
|
||||||
arg6[1] = (f32) temp_v0->unk2[1];
|
arg6[1] = (f32) temp_v0->unk2[1];
|
||||||
@@ -67,7 +69,7 @@ s32 func_802EA864(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||||||
mlMtxIdent();
|
mlMtxIdent();
|
||||||
func_80252EC8(spB0, sp8C);
|
func_80252EC8(spB0, sp8C);
|
||||||
func_80252CC4(position, rotation, scale, arg4);
|
func_80252CC4(position, rotation, scale, arg4);
|
||||||
func_8025235C(&sp78, arg5);
|
func_8025235C(sp78, arg5);
|
||||||
for(j = 0; j < 3; j++){
|
for(j = 0; j < 3; j++){
|
||||||
if (((sp78[j] + arg6 / scale) <= spA4[j]) || (sp98[j] <= (sp78[j] - arg6 / scale)))
|
if (((sp78[j] + arg6 / scale) <= spA4[j]) || (sp98[j] <= (sp78[j] - arg6 / scale)))
|
||||||
break;
|
break;
|
||||||
@@ -93,7 +95,7 @@ s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||||||
|
|
||||||
// tmp = ;
|
// tmp = ;
|
||||||
tmp = (BKModelUnk14_0 *)(arg0 + 1);
|
tmp = (BKModelUnk14_0 *)(arg0 + 1);
|
||||||
iPtr = tmp + arg0->cnt0;
|
iPtr = (BKModelUnk14_1*)(tmp + arg0->cnt0);
|
||||||
end_ptr = iPtr + arg0->cnt2;
|
end_ptr = iPtr + arg0->cnt2;
|
||||||
for(iPtr = iPtr; iPtr < end_ptr; iPtr++){
|
for(iPtr = iPtr; iPtr < end_ptr; iPtr++){
|
||||||
spA0[0] = (f32) iPtr->unk4[0];
|
spA0[0] = (f32) iPtr->unk4[0];
|
||||||
@@ -108,7 +110,7 @@ s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||||||
mlMtxIdent();
|
mlMtxIdent();
|
||||||
func_80252DDC(spA0, sp94);
|
func_80252DDC(spA0, sp94);
|
||||||
func_80252CC4(position, rotation, scale, arg4);
|
func_80252CC4(position, rotation, scale, arg4);
|
||||||
func_8025235C(&sp78, arg5);
|
func_8025235C(sp78, arg5);
|
||||||
if (!(temp_f20 / 2 <= (sp78[2] - arg6 / scale)) && !((sp78[2] + arg6 / scale) <= -(temp_f20 / 2))) {
|
if (!(temp_f20 / 2 <= (sp78[2] - arg6 / scale)) && !((sp78[2] + arg6 / scale) <= -(temp_f20 / 2))) {
|
||||||
if (!(((arg6 / scale + temp_f24) * (arg6 / scale + temp_f24)) <= ((sp78[0] * sp78[0]) + (sp78[1] * sp78[1])))) {
|
if (!(((arg6 / scale + temp_f24) * (arg6 / scale + temp_f24)) <= ((sp78[0] * sp78[0]) + (sp78[1] * sp78[1])))) {
|
||||||
return iPtr->unkD;
|
return iPtr->unkD;
|
||||||
@@ -119,7 +121,7 @@ s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802EAD5C(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, f32 arg5[3], f32 arg6) {
|
s32 func_802EAD5C(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], f32 arg6) {
|
||||||
BKModelUnk14_0 *t0_ptr;
|
BKModelUnk14_0 *t0_ptr;
|
||||||
BKModelUnk14_1 *t1_ptr;
|
BKModelUnk14_1 *t1_ptr;
|
||||||
f32 sp5C[3];
|
f32 sp5C[3];
|
||||||
@@ -153,7 +155,7 @@ s32 func_802EAD5C(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, AnimMtxList *arg5, f32 arg6[3], f32 arg7) {
|
s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], AnimMtxList *arg5, f32 arg6[3], f32 arg7) {
|
||||||
f32 spF4[3];
|
f32 spF4[3];
|
||||||
f32 spE8[3];
|
f32 spE8[3];
|
||||||
f32 spDC[3];
|
f32 spDC[3];
|
||||||
@@ -242,7 +244,7 @@ s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7)
|
s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], AnimMtxList* arg5, f32 arg6[3], f32 arg7)
|
||||||
{
|
{
|
||||||
BKModelUnk14_0 *ptr_t0;
|
BKModelUnk14_0 *ptr_t0;
|
||||||
f32 spB8[3];
|
f32 spB8[3];
|
||||||
@@ -313,7 +315,7 @@ s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scale, s32 arg4, s32 arg5, f32 *arg6, f32 arg7) {
|
s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scale, f32 arg4[3], AnimMtxList* arg5, f32 *arg6, f32 arg7) {
|
||||||
BKModelUnk14_0 *t0_ptr;
|
BKModelUnk14_0 *t0_ptr;
|
||||||
BKModelUnk14_1 *t1_ptr;
|
BKModelUnk14_1 *t1_ptr;
|
||||||
f32 sp74[3];
|
f32 sp74[3];
|
||||||
@@ -326,7 +328,7 @@ s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scal
|
|||||||
|
|
||||||
mlMtxIdent();
|
mlMtxIdent();
|
||||||
func_80252CC4(position, rotation, scale, arg4);
|
func_80252CC4(position, rotation, scale, arg4);
|
||||||
func_8025235C(&sp74, arg6);
|
func_8025235C(sp74, arg6);
|
||||||
t0_ptr = (BKModelUnk14_0 *)(arg0 + 1);
|
t0_ptr = (BKModelUnk14_0 *)(arg0 + 1);
|
||||||
t1_ptr = (BKModelUnk14_1 *)(t0_ptr + arg0->cnt0);
|
t1_ptr = (BKModelUnk14_1 *)(t0_ptr + arg0->cnt0);
|
||||||
i_ptr = (BKModelUnk14_2 *)(t1_ptr + arg0->cnt2);
|
i_ptr = (BKModelUnk14_2 *)(t1_ptr + arg0->cnt2);
|
||||||
@@ -353,11 +355,11 @@ s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scal
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool func_802EBA98(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scale, s32 arg4, f32 arg5[3], f32 arg6, f32 arg7[3]){
|
bool func_802EBA98(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], f32 arg6, f32 arg7[3]){
|
||||||
return func_802EBAE0(arg0, arg1, rotation, scale, arg4, NULL, arg5, arg6, arg7);
|
return func_802EBAE0(arg0, arg1, rotation, scale, arg4, NULL, arg5, arg6, arg7);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3])
|
s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], AnimMtxList* arg5, f32 arg6[3], f32 arg7, f32 arg8[3])
|
||||||
{
|
{
|
||||||
f32 sp3C[3];
|
f32 sp3C[3];
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
@@ -467,7 +469,7 @@ s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scal
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scale, s32 arg4, f32 arg5[3], s32 arg6){
|
s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], s32 arg6){
|
||||||
BKModelUnk14_1 *i_ptr;
|
BKModelUnk14_1 *i_ptr;
|
||||||
f32 sp90[3];
|
f32 sp90[3];
|
||||||
f32 sp84[3];
|
f32 sp84[3];
|
||||||
@@ -492,9 +494,9 @@ s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scal
|
|||||||
temp_f20 = (f32) i_ptr->unk0;
|
temp_f20 = (f32) i_ptr->unk0;
|
||||||
temp_f22 = (f32) i_ptr->unk2;
|
temp_f22 = (f32) i_ptr->unk2;
|
||||||
mlMtxIdent();
|
mlMtxIdent();
|
||||||
func_80252DDC(&sp90, &sp84);
|
func_80252DDC(sp90, sp84);
|
||||||
func_80252CC4(arg1, rotation, scale, arg4);
|
func_80252CC4(arg1, rotation, scale, arg4);
|
||||||
func_8025235C(&sp68, arg5);
|
func_8025235C(sp68, arg5);
|
||||||
temp_f0 = (f32) (temp_f22 / 2.0);
|
temp_f0 = (f32) (temp_f22 / 2.0);
|
||||||
if (!(temp_f0 <= sp68[2]) && !(sp68[2] <= -temp_f0) && !((temp_f20 * temp_f20) <= (sp68[0] * sp68[0] + sp68[1]*sp68[1]))) {
|
if (!(temp_f0 <= sp68[2]) && !(sp68[2] <= -temp_f0) && !((temp_f20 * temp_f20) <= (sp68[0] * sp68[0] + sp68[1]*sp68[1]))) {
|
||||||
return i_ptr->unkD;
|
return i_ptr->unkD;
|
||||||
@@ -506,7 +508,7 @@ s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scal
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scale, f32 arg4[3], s32 arg5, s32 arg6){
|
s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], s32 arg6){
|
||||||
BKModelUnk14_0 *t0_ptr;
|
BKModelUnk14_0 *t0_ptr;
|
||||||
BKModelUnk14_1 *t1_ptr;
|
BKModelUnk14_1 *t1_ptr;
|
||||||
f32 sp54[3];
|
f32 sp54[3];
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
extern s16 D_803A5D00[2][0xF660];
|
extern s16 D_803A5D00[2][0xF660];
|
||||||
|
|
||||||
|
|
||||||
@@ -49,7 +51,7 @@ Struct_core2_6B030_1 D_80368B28[] = {
|
|||||||
|
|
||||||
/* .bss */
|
/* .bss */
|
||||||
f32 *D_80380A10;
|
f32 *D_80380A10;
|
||||||
Mtx D_80380A18;
|
MtxF D_80380A18;
|
||||||
s32 D_80380A58;
|
s32 D_80380A58;
|
||||||
|
|
||||||
/* .code */
|
/* .code */
|
||||||
@@ -377,7 +379,7 @@ void func_802F2FCC(Struct64s *arg0, f32 arg1[3], s16 arg2, f32 arg3, ActorMarker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802F32C4(Struct64s *arg0, f32 arg1[3], f32 arg2, ActorMarker *arg3, void(*arg4)(f32[3], f32, ActorMarker *)){
|
void func_802F32C4(Struct64s *arg0, f32 arg1[3], f32 arg2, ActorMarker *arg3, s32(*arg4)(f32[3], f32, ActorMarker *)){
|
||||||
func_802F2FCC(arg0, arg1, 8, arg2, arg3, arg4);
|
func_802F2FCC(arg0, arg1, 8, arg2, arg3, arg4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 pad0[0xC];
|
u8 pad0[0xC];
|
||||||
@@ -10,10 +11,7 @@ typedef struct {
|
|||||||
extern f32 viewport_get_yaw();
|
extern f32 viewport_get_yaw();
|
||||||
extern int func_8024DD34(f32, f32, f32);
|
extern int func_8024DD34(f32, f32, f32);
|
||||||
extern void func_80251B5C(f32, f32, f32);
|
extern void func_80251B5C(f32, f32, f32);
|
||||||
extern void mlMtx_rotate_pitch_deg(f32);
|
|
||||||
extern void mlMtx_rotate_yaw_deg(f32);
|
|
||||||
extern void func_80252A38(f32, f32, f32);
|
extern void func_80252A38(f32, f32, f32);
|
||||||
extern void mlMtxApply(Mtx *);
|
|
||||||
extern f32 vtxList_getGlobalNorm(BKVertexList *);
|
extern f32 vtxList_getGlobalNorm(BKVertexList *);
|
||||||
extern bool func_8024DB50(f32[3], f32);
|
extern bool func_8024DB50(f32[3], f32);
|
||||||
|
|
||||||
@@ -202,17 +200,17 @@ void func_802F962C(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
|||||||
if ((D_80369280 != NULL) && (D_80369284 != 0)) {
|
if ((D_80369280 != NULL) && (D_80369284 != 0)) {
|
||||||
viewport_get_position_vec3f(D_80381050);
|
viewport_get_position_vec3f(D_80381050);
|
||||||
viewport_get_rotation_vec3f(D_80381060);
|
viewport_get_rotation_vec3f(D_80381060);
|
||||||
D_80381090 = (s32)D_80369288 + D_80369288->gfx_list_offset_C + sizeof(BKGfxList);
|
D_80381090 = (Gfx*)((s32)D_80369288 + D_80369288->gfx_list_offset_C + sizeof(BKGfxList));
|
||||||
temp_s3 = (BKVertexList *)((s32)D_80369288 + D_80369288->vtx_list_offset_10);
|
temp_s3 = (BKVertexList *)((s32)D_80369288 + D_80369288->vtx_list_offset_10);
|
||||||
D_8038108C = vtxList_getGlobalNorm(temp_s3);
|
D_8038108C = vtxList_getGlobalNorm(temp_s3);
|
||||||
func_80349AD0();
|
func_80349AD0();
|
||||||
gSPSegment((*gfx)++, 1, osVirtualToPhysical(temp_s3 + 1));
|
gSPSegment((*gfx)++, 1, osVirtualToPhysical(temp_s3 + 1));
|
||||||
gSPSegment((*gfx)++, 0x02, osVirtualToPhysical((s32)D_80369288 + D_80369288->texture_list_offset_8 + sizeof(BKTextureList) + sizeof(BKTextureHeader)));
|
gSPSegment((*gfx)++, 0x02, osVirtualToPhysical((void*)((s32)D_80369288 + D_80369288->texture_list_offset_8 + sizeof(BKTextureList) + sizeof(BKTextureHeader))));
|
||||||
gSPSetGeometryMode((*gfx)++, G_ZBUFFER);
|
gSPSetGeometryMode((*gfx)++, G_ZBUFFER);
|
||||||
gSPDisplayList((*gfx)++, D_80369290);
|
gSPDisplayList((*gfx)++, D_80369290);
|
||||||
gSPSegment((*gfx)++, 0x03, osVirtualToPhysical(&D_803692B0));
|
gSPSegment((*gfx)++, 0x03, osVirtualToPhysical(&D_803692B0));
|
||||||
|
|
||||||
D_80381094 = (BKGeoList *)((s32)D_80369288 + D_80369288->geo_list_offset_4);
|
D_80381094 = (Struct_core2_72060_0 *)((s32)D_80369288 + D_80369288->geo_list_offset_4);
|
||||||
|
|
||||||
for(phi_s0 = D_80369280->unk1C; phi_s0 < D_80369280->unk1C + D_80369284; phi_s0++) {
|
for(phi_s0 = D_80369280->unk1C; phi_s0 < D_80369280->unk1C + D_80369284; phi_s0++) {
|
||||||
if ((func_802F989C(gfx, mtx, phi_s0) == 0) && (phi_s0->unk0[1] < D_8038104C)) {
|
if ((func_802F989C(gfx, mtx, phi_s0) == 0) && (phi_s0->unk0[1] < D_8038104C)) {
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
Mtx *func_8024DD9C(void);
|
|
||||||
void mlMtxSet(Mtx *);
|
|
||||||
void func_80252330(f32, f32, f32);
|
void func_80252330(f32, f32, f32);
|
||||||
void mlMtxApply(Mtx *);
|
|
||||||
void func_803382D8(s32 arg0);
|
void func_803382D8(s32 arg0);
|
||||||
void func_803382E4(s32 arg0);
|
void func_803382E4(s32 arg0);
|
||||||
void spriteRender_set1Primative(bool boolean);
|
void spriteRender_set1Primative(bool boolean);
|
||||||
void func_803382FC(s32 arg0);
|
void func_803382FC(s32 arg0);
|
||||||
void func_80338308(s32 arg0, s32 arg1);
|
void func_80338308(s32 arg0, s32 arg1);
|
||||||
|
BKSpriteTextureBlock *func_8033EFB0(Struct84s *arg0, s32 arg1);
|
||||||
|
|
||||||
/* .data */
|
/* .data */
|
||||||
Gfx D_80370260[] = {
|
Gfx D_80370260[] = {
|
||||||
@@ -263,17 +262,17 @@ void spriteRender_drawWithSegment(Gfx **gfx, Vtx **vtx, BKSprite *sprite, u32 fr
|
|||||||
frame_ptr = spriteGetFramePtr(sprite, frame);
|
frame_ptr = spriteGetFramePtr(sprite, frame);
|
||||||
|
|
||||||
//load palette in indexed pixels
|
//load palette in indexed pixels
|
||||||
var_t2 = frame_ptr + 1;
|
var_t2 = (BKSpriteTextureBlock *)(frame_ptr + 1);
|
||||||
if (sprite->type & SPRITE_TYPE_CI4) {
|
if (sprite->type & SPRITE_TYPE_CI4) {
|
||||||
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
||||||
palette_mem = ALIGN(frame_ptr + 1, 8);
|
palette_mem = ALIGN(frame_ptr + 1, 8);
|
||||||
gDPLoadTLUT_pal16((*gfx)++, 0, palette_mem);
|
gDPLoadTLUT_pal16((*gfx)++, 0, palette_mem);
|
||||||
var_t2 = palette_mem + 0x20;
|
var_t2 = (BKSpriteTextureBlock *)(palette_mem + 0x20);
|
||||||
} else if (sprite->type & SPRITE_TYPE_CI8) {
|
} else if (sprite->type & SPRITE_TYPE_CI8) {
|
||||||
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
||||||
palette_mem = ALIGN(frame_ptr + 1, 8);
|
palette_mem = ALIGN(frame_ptr + 1, 8);
|
||||||
gDPLoadTLUT_pal256((*gfx)++, palette_mem);
|
gDPLoadTLUT_pal256((*gfx)++, palette_mem);
|
||||||
var_t2 = palette_mem + 0x200;
|
var_t2 = (BKSpriteTextureBlock *)(palette_mem + 0x200);
|
||||||
}
|
}
|
||||||
|
|
||||||
//start new vtx seg
|
//start new vtx seg
|
||||||
@@ -290,7 +289,7 @@ void spriteRender_drawWithSegment(Gfx **gfx, Vtx **vtx, BKSprite *sprite, u32 fr
|
|||||||
// sp1B4 = sp1B4;
|
// sp1B4 = sp1B4;
|
||||||
for(sp1BC = 0; sp1BC < frame_ptr->chunkCnt; sp1BC++){
|
for(sp1BC = 0; sp1BC < frame_ptr->chunkCnt; sp1BC++){
|
||||||
temp_ra = var_t2->h;
|
temp_ra = var_t2->h;
|
||||||
tmem = ALIGN(var_t2 + 1, 8); //align
|
tmem = (u8*)ALIGN(var_t2 + 1, 8); //align
|
||||||
|
|
||||||
//load texture block
|
//load texture block
|
||||||
if (sprite->type & SPRITE_TYPE_RGBA16) {
|
if (sprite->type & SPRITE_TYPE_RGBA16) {
|
||||||
@@ -342,7 +341,7 @@ void spriteRender_drawWithSegment(Gfx **gfx, Vtx **vtx, BKSprite *sprite, u32 fr
|
|||||||
gSPVertex((*gfx)++, sp1B0, 0, 0);
|
gSPVertex((*gfx)++, sp1B0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var_t2 = tmem + ((s32) (var_t2->w * var_t2->h) * pixel_size_nibbles / 2);
|
var_t2 = (BKSpriteTextureBlock *)(tmem + ((s32) (var_t2->w * var_t2->h) * pixel_size_nibbles / 2));
|
||||||
}
|
}
|
||||||
// sp1B4 = reinterpret_cast(Gfx *,sp1B4);
|
// sp1B4 = reinterpret_cast(Gfx *,sp1B4);
|
||||||
*vtx = var_a3;
|
*vtx = var_a3;
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
extern void mlMtxRotatePYR(f32, f32, f32);
|
extern void mlMtxRotatePYR(f32, f32, f32);
|
||||||
extern void func_80252330(f32, f32, f32);
|
extern void func_80252330(f32, f32, f32);
|
||||||
extern void mlMtxApply(Mtx *);
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
BKSprite *sprite_0;
|
BKSprite *sprite_0;
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
extern void spriteRender_drawWithSegment(Gfx**, Vtx**, BKSprite *, s32, s32);
|
extern void spriteRender_drawWithSegment(Gfx**, Vtx**, BKSprite *, s32, s32);
|
||||||
extern void func_80252330(f32, f32, f32);
|
extern void func_80252330(f32, f32, f32);\
|
||||||
extern void mlMtxRotatePYR(f32, f32, f32);
|
|
||||||
extern void mlMtxApply(Mtx *);
|
|
||||||
extern void func_80349AD0(void);
|
extern void func_80349AD0(void);
|
||||||
extern void func_8024C5A8(f32[3]);
|
extern void func_8024C5A8(f32[3]);
|
||||||
|
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
extern f32 func_80255D70(f32);
|
extern f32 func_80255D70(f32);
|
||||||
|
|
||||||
#define LENGTH_SQ_VEC4F(v) (v[0]*v[0] + v[1]*v[1] + v[2]*v[2] + v[3]*v[3])
|
#define LENGTH_SQ_VEC4F(v) (v[0]*v[0] + v[1]*v[1] + v[2]*v[2] + v[3]*v[3])
|
||||||
@@ -160,7 +162,7 @@ void func_803458E4(f32 arg0[4], f32 arg1[4], f32 arg2[4], f32 arg3) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80345A44(f32 arg0[4], f32 arg1[4][4]) {
|
void func_80345A44(f32 arg0[4], MtxF* arg1) {
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
f32 temp_f2;
|
f32 temp_f2;
|
||||||
s32 temp_a0;
|
s32 temp_a0;
|
||||||
@@ -168,32 +170,32 @@ void func_80345A44(f32 arg0[4], f32 arg1[4][4]) {
|
|||||||
s32 var_a0;
|
s32 var_a0;
|
||||||
|
|
||||||
|
|
||||||
temp_f0 = arg1[0][0] + arg1[1][1] + arg1[2][2];
|
temp_f0 = arg1->m[0][0] + arg1->m[1][1] + arg1->m[2][2];
|
||||||
if (temp_f0 > 0.0) {
|
if (temp_f0 > 0.0) {
|
||||||
temp_f2 = gu_sqrtf(temp_f0 + 1.0);
|
temp_f2 = gu_sqrtf(temp_f0 + 1.0);
|
||||||
arg0[3] = temp_f2 * 0.5;
|
arg0[3] = temp_f2 * 0.5;
|
||||||
temp_f2 = (0.5 / temp_f2);
|
temp_f2 = (0.5 / temp_f2);
|
||||||
arg0[0] = (arg1[1][2] - arg1[2][1]) * temp_f2;
|
arg0[0] = (arg1->m[1][2] - arg1->m[2][1]) * temp_f2;
|
||||||
arg0[1] = (arg1[2][0] - arg1[0][2]) * temp_f2;
|
arg0[1] = (arg1->m[2][0] - arg1->m[0][2]) * temp_f2;
|
||||||
arg0[2] = (arg1[0][1] - arg1[1][0]) * temp_f2;
|
arg0[2] = (arg1->m[0][1] - arg1->m[1][0]) * temp_f2;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var_a0 = 0;
|
var_a0 = 0;
|
||||||
if (arg1[var_a0][var_a0] < arg1[1][1]) {
|
if (arg1->m[var_a0][var_a0] < arg1->m[1][1]) {
|
||||||
var_a0 = 1;
|
var_a0 = 1;
|
||||||
}
|
}
|
||||||
if (arg1[var_a0][var_a0] < arg1[2][2]) {
|
if (arg1->m[var_a0][var_a0] < arg1->m[2][2]) {
|
||||||
var_a0 = 2;
|
var_a0 = 2;
|
||||||
}
|
}
|
||||||
temp_a0 = D_80371ED0[var_a0];
|
temp_a0 = D_80371ED0[var_a0];
|
||||||
temp_a2 = D_80371ED0[temp_a0];
|
temp_a2 = D_80371ED0[temp_a0];
|
||||||
|
|
||||||
temp_f2 = gu_sqrtf((arg1[var_a0][var_a0] - (arg1[temp_a0][temp_a0] + arg1[temp_a2][temp_a2])) + 1.0);
|
temp_f2 = gu_sqrtf((arg1->m[var_a0][var_a0] - (arg1->m[temp_a0][temp_a0] + arg1->m[temp_a2][temp_a2])) + 1.0);
|
||||||
arg0[var_a0] = temp_f2 * 0.5;
|
arg0[var_a0] = temp_f2 * 0.5;
|
||||||
temp_f2 = (0.5 / temp_f2);
|
temp_f2 = (0.5 / temp_f2);
|
||||||
arg0[3] = (arg1[temp_a0][temp_a2] - arg1[temp_a2][temp_a0]) * temp_f2;
|
arg0[3] = (arg1->m[temp_a0][temp_a2] - arg1->m[temp_a2][temp_a0]) * temp_f2;
|
||||||
arg0[temp_a0] = (arg1[var_a0][temp_a0] + arg1[temp_a0][var_a0]) * temp_f2;
|
arg0[temp_a0] = (arg1->m[var_a0][temp_a0] + arg1->m[temp_a0][var_a0]) * temp_f2;
|
||||||
arg0[temp_a2] = (arg1[var_a0][temp_a2] + arg1[temp_a2][var_a0]) * temp_f2;
|
arg0[temp_a2] = (arg1->m[var_a0][temp_a2] + arg1->m[temp_a2][var_a0]) * temp_f2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
#include "zoombox.h"
|
#include "zoombox.h"
|
||||||
|
|
||||||
@@ -26,7 +27,6 @@ extern void func_802C5994(void);
|
|||||||
extern void func_802E412C(s32, s32);
|
extern void func_802E412C(s32, s32);
|
||||||
void volatileFlag_set(s32, s32);
|
void volatileFlag_set(s32, s32);
|
||||||
f32 func_8024DE1C(f32, f32, f32 *, f32 *);
|
f32 func_8024DE1C(f32, f32, f32 *, f32 *);
|
||||||
void mlMtxApply(Mtx*);
|
|
||||||
void func_80310D2C(void);
|
void func_80310D2C(void);
|
||||||
|
|
||||||
s32 level_get(void);
|
s32 level_get(void);
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "zoombox.h"
|
#include "zoombox.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
extern f32 func_8024DE1C(f32, f32, f32[3], f32[3]);
|
extern f32 func_8024DE1C(f32, f32, f32[3], f32[3]);
|
||||||
void func_80252330(f32, f32, f32);
|
void func_80252330(f32, f32, f32);
|
||||||
@@ -9,6 +10,8 @@ extern f32 func_8033DDB8(void);
|
|||||||
extern void func_8024E60C(s32, void *);
|
extern void func_8024E60C(s32, void *);
|
||||||
extern void func_8024E640(s32, void *);
|
extern void func_8024E640(s32, void *);
|
||||||
extern void func_8024E5A8(s32, void *);
|
extern void func_8024E5A8(s32, void *);
|
||||||
|
extern void func_80344090(BKSpriteDisplayData *self, s32 frame, Gfx **gfx);
|
||||||
|
BKSprite *func_8033B6C4(enum asset_e sprite_id, BKSpriteDisplayData **arg1);
|
||||||
|
|
||||||
typedef struct struct_18_s{
|
typedef struct struct_18_s{
|
||||||
s16 sfx_id; /* enum sfx_e */
|
s16 sfx_id; /* enum sfx_e */
|
||||||
@@ -838,7 +841,7 @@ void func_803163A8(GcZoombox *this, Gfx **gfx, Mtx **mtx) {
|
|||||||
modelRender_draw(gfx, mtx, sp50, sp5C, this->unk198 * sp34, sp38, this->model);
|
modelRender_draw(gfx, mtx, sp50, sp5C, this->unk198 * sp34, sp38, this->model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, s32 arg5, f32 arg6) {
|
void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, BKSpriteDisplayData *arg5, f32 arg6) {
|
||||||
f32 sp2C[3];
|
f32 sp2C[3];
|
||||||
f32 temp_f12;
|
f32 temp_f12;
|
||||||
|
|
||||||
@@ -1190,7 +1193,7 @@ void gczoombox_update(GcZoombox *this){
|
|||||||
}//L803176C8
|
}//L803176C8
|
||||||
if(this->unk1A4_25 == 0){
|
if(this->unk1A4_25 == 0){
|
||||||
if(this->unk166 - ((this->unk1A4_19)? 0xf : 0xc) >= this->unk16C){
|
if(this->unk166 - ((this->unk1A4_19)? 0xf : 0xc) >= this->unk16C){
|
||||||
func_803153A8(this->unk30, this->unk0, 0, 0x30);
|
func_803153A8(this->unk30, this->unk0, 0, sizeof(this->unk0));
|
||||||
_gczoombox_memClear(this->unk30, 0x30);
|
_gczoombox_memClear(this->unk30, 0x30);
|
||||||
this->unk16C = this->unk166;
|
this->unk16C = this->unk166;
|
||||||
this->unk16E = ((this->unk1A4_19) ? 0xf : 0xc) + this->unk16C;
|
this->unk16E = ((this->unk1A4_19) ? 0xf : 0xc) + this->unk16C;
|
||||||
@@ -1459,9 +1462,9 @@ GcZoombox *gczoombox_new(s32 arg0, GcZoomboxSprite portrait_id, s32 arg2, s32 ar
|
|||||||
func_80318760(this, 18000);
|
func_80318760(this, 18000);
|
||||||
_gczoombox_memClear( this->unk0, 0x30);
|
_gczoombox_memClear( this->unk0, 0x30);
|
||||||
_gczoombox_memClear( this->unk30, 0x30);
|
_gczoombox_memClear( this->unk30, 0x30);
|
||||||
_gczoombox_memClear( &this->unk60, 0x30);
|
_gczoombox_memClear( this->unk60, 0x30);
|
||||||
_gczoombox_memClear( &this->unk90, 0x20);
|
_gczoombox_memClear( this->unk90, 0x20);
|
||||||
_gczoombox_memClear( &this->unkB0, 0x40);
|
_gczoombox_memClear( this->unkB0, 0x40);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1768,10 +1771,10 @@ void func_80318C48(GcZoombox *this, s32 arg1) {
|
|||||||
if (this->unk0[0] == 0xFD) {
|
if (this->unk0[0] == 0xFD) {
|
||||||
this->unk0[1] = 0x68;
|
this->unk0[1] = 0x68;
|
||||||
} else {
|
} else {
|
||||||
func_803153A8(&this->unk0[0], &D_803830B0, 0, 0x30);
|
func_803153A8(&this->unk0[0], D_803830B0, 0, sizeof(D_803830B0));
|
||||||
this->unk0[0] = 0xFD;
|
this->unk0[0] = 0xFD;
|
||||||
this->unk0[1] = 0x68;
|
this->unk0[1] = 0x68;
|
||||||
func_803153A8(&D_803830B0, &this->unk0[2], 0, 0x2E);
|
func_803153A8(D_803830B0, &this->unk0[2], 0, sizeof(this->unk0) - 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this->unk0[0] == 0xFD) {
|
else if (this->unk0[0] == 0xFD) {
|
||||||
@@ -1785,10 +1788,10 @@ void func_80318C48(GcZoombox *this, s32 arg1) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
func_803153A8(&this->unk30[0], &D_803830B0, 0, 0x30);
|
func_803153A8(&this->unk30[0], D_803830B0, 0, sizeof(D_803830B0));
|
||||||
this->unk30[0] = 0xFD;
|
this->unk30[0] = 0xFD;
|
||||||
this->unk30[1] = 0x68;
|
this->unk30[1] = 0x68;
|
||||||
func_803153A8(&D_803830B0, &this->unk30[2], 0, 0x2E);
|
func_803153A8(D_803830B0, &this->unk30[2], 0, sizeof(this->unk30) - 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this->unk30[0] == 0xFD) {
|
else if (this->unk30[0] == 0xFD) {
|
||||||
|
@@ -209,7 +209,7 @@ typedef struct {
|
|||||||
void gczoombox_free(GcZoombox *this);
|
void gczoombox_free(GcZoombox *this);
|
||||||
void func_803160A8(GcZoombox *this);
|
void func_803160A8(GcZoombox *this);
|
||||||
void func_803163A8(GcZoombox *this, Gfx **gfx, Mtx **mtx);
|
void func_803163A8(GcZoombox *this, Gfx **gfx, Mtx **mtx);
|
||||||
void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, s32 arg5, f32 arg6);
|
void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, BKSpriteDisplayData *arg5, f32 arg6);
|
||||||
void func_80316764(GcZoombox *this, s32 arg1);
|
void func_80316764(GcZoombox *this, s32 arg1);
|
||||||
void gczoombox_draw(GcZoombox *this, Gfx **gdl, Mtx ** mptr, void *vptr);
|
void gczoombox_draw(GcZoombox *this, Gfx **gdl, Mtx ** mptr, void *vptr);
|
||||||
void func_80316E08(GcZoombox *this);
|
void func_80316E08(GcZoombox *this);
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "core2/modelRender.h"
|
#include "core2/modelRender.h"
|
||||||
#include "animation.h"
|
#include "animation.h"
|
||||||
|
#include "ml/mtx.h"
|
||||||
|
|
||||||
#define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
|
#define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
|
|
||||||
@@ -17,11 +18,9 @@ extern void viewport_set_rotation_vec3f(f32[3]);
|
|||||||
extern void viewport_update(void);
|
extern void viewport_update(void);
|
||||||
extern void func_8033BD4C(BKModelBin *);
|
extern void func_8033BD4C(BKModelBin *);
|
||||||
extern s32 func_8024DB50(f32[3], f32);
|
extern s32 func_8024DB50(f32[3], f32);
|
||||||
extern void mlMtx_push_translation(f32, f32, f32);
|
|
||||||
extern void mlMtxScale(f32);
|
|
||||||
extern void mlMtxApply(Mtx* mtx);
|
|
||||||
extern AnimMtxList *animMtxList_new();
|
extern AnimMtxList *animMtxList_new();
|
||||||
extern AnimMtxList *animMtxList_defrag(AnimMtxList *);
|
extern AnimMtxList *animMtxList_defrag(AnimMtxList *);
|
||||||
|
extern MtxF *animMtxList_get(AnimMtxList *this, s32 arg1);
|
||||||
|
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
@@ -662,7 +661,7 @@ struct {
|
|||||||
LookAt *lookat_buffer_end;
|
LookAt *lookat_buffer_end;
|
||||||
f32 eye_pos[3];
|
f32 eye_pos[3];
|
||||||
} D_803837E0;
|
} D_803837E0;
|
||||||
Mtx D_80383BF8;
|
MtxF D_80383BF8;
|
||||||
f32 modelRenderCameraPosition[3];
|
f32 modelRenderCameraPosition[3];
|
||||||
f32 modelRenderCameraRotation[3];
|
f32 modelRenderCameraRotation[3];
|
||||||
BKModelBin *modelRenderModelBin;
|
BKModelBin *modelRenderModelBin;
|
||||||
@@ -909,9 +908,9 @@ void func_80338CD0(Gfx **gfx, Mtx **mtx, void *arg2){
|
|||||||
if (0 < indx) {
|
if (0 < indx) {
|
||||||
if (indx <= cmd->unk8) {
|
if (indx <= cmd->unk8) {
|
||||||
s0 = cmd->unkC;
|
s0 = cmd->unkC;
|
||||||
sub_cmd = cmd;
|
sub_cmd = (s32)cmd;
|
||||||
sub_cmd += *(s32*)(s0 + (indx - 1));
|
sub_cmd += *(s32*)(s0 + (indx - 1));
|
||||||
func_80339124(gfx, mtx, sub_cmd);
|
func_80339124(gfx, mtx, (BKGeoList*)sub_cmd);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
s1 = indx * (-1);
|
s1 = indx * (-1);
|
||||||
@@ -919,9 +918,9 @@ void func_80338CD0(Gfx **gfx, Mtx **mtx, void *arg2){
|
|||||||
for (s2 = 0; s2 < cmd->unk8; s2++) {
|
for (s2 = 0; s2 < cmd->unk8; s2++) {
|
||||||
if (s1 & 1)
|
if (s1 & 1)
|
||||||
{
|
{
|
||||||
sub_cmd = cmd;
|
sub_cmd = (s32)cmd;
|
||||||
sub_cmd += s0[0];
|
sub_cmd += s0[0];
|
||||||
func_80339124(gfx, mtx, sub_cmd);
|
func_80339124(gfx, mtx, (BKGeoList*)sub_cmd);
|
||||||
}
|
}
|
||||||
s1 >>= 1;
|
s1 >>= 1;
|
||||||
s0++;
|
s0++;
|
||||||
|
Reference in New Issue
Block a user