more viewport function documentation and cleaning up prototypes
This commit is contained in:
@@ -18,7 +18,6 @@ extern int func_80340020(s32, f32[3], s32, f32, s32, BKVertexList *, f32[3], f32
|
||||
extern void boneTransformList_getBoneScale(s32, s32, f32[3]);
|
||||
extern void boneTransformList_setBoneScale(s32, s32, f32[3]);
|
||||
extern void func_8033A9A8(s32, s32, f32[3]);
|
||||
extern void viewport_getPosition_vec3f(f32[3]);
|
||||
extern void ml_vec3f_normalize(f32[3]);
|
||||
extern void func_8033A45C(s32, s32);
|
||||
extern void modelRender_setBoneTransformList(s32);
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern s32 func_8024DB50(f32[3], f32);
|
||||
|
||||
void func_80390EB0(Actor *this);
|
||||
|
||||
/* .data */
|
||||
@@ -72,7 +70,7 @@ void func_80390EB0(Actor *this){
|
||||
marker_setCollisionScripts(this->marker, func_80390E78, NULL, NULL);
|
||||
}
|
||||
|
||||
if(func_8024DB50(this->position, 150.0f) || func_80329530(this, 1200))
|
||||
if(viewport_func_8024DB50(this->position, 150.0f) || func_80329530(this, 1200))
|
||||
{
|
||||
if( !(globalTimer_getTime() & 3) && randf() < 0.2){
|
||||
func_80390C70(this->position);
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern int func_8024DB50(f32[3], f32);
|
||||
|
||||
void GV_func_8038A084(Actor *this);
|
||||
|
||||
/* .data */
|
||||
@@ -54,7 +52,7 @@ void GV_func_8038A084(Actor *this){
|
||||
}
|
||||
|
||||
if(this->unkF4_8 == 6
|
||||
&& func_8024DB50(this->position, 50.0f)
|
||||
&& viewport_func_8024DB50(this->position, 50.0f)
|
||||
&& !this->unk38_31
|
||||
&& randf() < 0.2
|
||||
){
|
||||
|
@@ -34,8 +34,6 @@ f32 ml_acosValTbl[90] = { //D_80276CBC
|
||||
0.0871559978, 0.0697569996, 0.0523359999, 0.0348990001, 0.0174519997
|
||||
};
|
||||
|
||||
f32 viewport_getYaw(void);
|
||||
|
||||
// .h
|
||||
void func_80257918(f32 arg0[3], f32 arg1[3], f32 arg2[3], f32 arg3[3]);
|
||||
void ml_vec3f_roll_rotate_copy(f32 arg0[3], f32 arg1[3], f32);
|
||||
@@ -437,6 +435,7 @@ void func_80256D0C(f32 val1, f32 val2, f32 x, f32 y, f32 z, f32 *dstX, f32 *dstY
|
||||
*dstZ = tmp * cosf(val2) - sinf(val2) * x;
|
||||
}
|
||||
|
||||
// rotates direction vector (x, y, z)
|
||||
void func_80256E24(f32 dst[3], f32 theta, f32 phi, f32 x, f32 y, f32 z)
|
||||
{
|
||||
f32 tmp;
|
||||
|
@@ -4,7 +4,6 @@
|
||||
|
||||
extern f32 ml_cos_deg(f32);
|
||||
extern f32 ml_sin_deg(f32);
|
||||
extern void viewport_getPosition_vec3w(s32[3]);
|
||||
|
||||
Gfx D_80275880[] = {
|
||||
gsSPClearGeometryMode(G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH | G_CLIPPING | 0x0060CD00),
|
||||
|
@@ -2,9 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void guPerspective(Mtx *, u16*, f32, f32, f32, f32, f32);
|
||||
extern f32 ml_dotProduct_vec3f(f32[3], f32[3]);
|
||||
void func_80256E24(f32 [3], f32, f32, f32, f32, f32);
|
||||
|
||||
#define VIEWPORT_FOVY_DEFAULT (40.0f)
|
||||
#define VIEWPORT_STACK_SIZE (8)
|
||||
@@ -24,20 +22,14 @@ f32 sViewportMatrix[4][4];
|
||||
Mtx sViewportDefaultMatrix;
|
||||
s32 sViewportStackIndex;
|
||||
|
||||
void viewport_setRenderPerspectiveMatrix(Gfx **, Mtx **, f32, f32);
|
||||
void viewport_debug4(int);
|
||||
void viewport_setPosition_f3(f32, f32, f32);
|
||||
void viewport_setRotation_f3(f32, f32, f32);
|
||||
void viewport_setNearAndFar(f32, f32);
|
||||
void viewport_pushVpScaleAndTranslation(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
|
||||
void viewport_setFOVy(f32);
|
||||
void viewport_moveAlongZAxis(f32 offset) {
|
||||
f32 delta_position[3];
|
||||
|
||||
void func_8024C510(f32 arg0){
|
||||
f32 sp24[3];
|
||||
func_80256E24(sp24, sViewportRotation[0], sViewportRotation[1], 0.0f, 0.0f, arg0);
|
||||
sViewportPosition[0] += sp24[0];
|
||||
sViewportPosition[1] += sp24[1];
|
||||
sViewportPosition[2] += sp24[2];
|
||||
func_80256E24(delta_position, sViewportRotation[0], sViewportRotation[1], 0.0f, 0.0f, offset);
|
||||
|
||||
sViewportPosition[0] += delta_position[0];
|
||||
sViewportPosition[1] += delta_position[1];
|
||||
sViewportPosition[2] += delta_position[2];
|
||||
}
|
||||
|
||||
f32 viewport_getDistance(f32 arg0[3]) {
|
||||
@@ -53,15 +45,15 @@ void viewport_getPosition_vec3f(f32 arg0[3]) {
|
||||
}
|
||||
|
||||
void viewport_getPosition_vec3w(s32 dst[3]) {
|
||||
dst[0] = ((f32)(s32)(sViewportPosition[0]*500.0))/500.0;
|
||||
dst[1] = ((f32)(s32)(sViewportPosition[1]*500.0))/500.0;
|
||||
dst[2] = ((f32)(s32)(sViewportPosition[2]*500.0))/500.0;
|
||||
dst[0] = ((f32)(s32)(sViewportPosition[0] * 500.0)) / 500.0;
|
||||
dst[1] = ((f32)(s32)(sViewportPosition[1] * 500.0)) / 500.0;
|
||||
dst[2] = ((f32)(s32)(sViewportPosition[2] * 500.0)) / 500.0;
|
||||
}
|
||||
|
||||
void viewport_getPosition_vec3s(s16 dst[3]) {
|
||||
dst[0] = ((f32)(s32)(sViewportPosition[0]*500.0))/500.0;
|
||||
dst[1] = ((f32)(s32)(sViewportPosition[1]*500.0))/500.0;
|
||||
dst[2] = ((f32)(s32)(sViewportPosition[2]*500.0))/500.0;
|
||||
dst[0] = ((f32)(s32)(sViewportPosition[0] * 500.0)) / 500.0;
|
||||
dst[1] = ((f32)(s32)(sViewportPosition[1] * 500.0)) / 500.0;
|
||||
dst[2] = ((f32)(s32)(sViewportPosition[2] * 500.0)) / 500.0;
|
||||
}
|
||||
|
||||
void viewport_getRotation_vec3f(f32 arg0[3]) {
|
||||
@@ -94,18 +86,18 @@ void viewport_setRenderViewportAndPerspectiveMatrix(Gfx **gfx, Mtx **mtx) {
|
||||
}
|
||||
|
||||
void viewport_setRenderPerspectiveMatrix(Gfx **gfx, Mtx **mtx, f32 near, f32 far) {
|
||||
u16 sp5e;
|
||||
u16 perspNorm;
|
||||
|
||||
near = MAX(sViewportNear, near);
|
||||
far = MIN(sViewportFar, far);
|
||||
|
||||
if(*(u32*)OS_PHYSICAL_TO_K1(0x1D8) + 0x53D4FFF0){
|
||||
if(*(u32*)OS_PHYSICAL_TO_K1(0x1D8) + 0x53D4FFF0) { // what's this?
|
||||
near = 750.0f;
|
||||
far = 1250.0f;
|
||||
}
|
||||
|
||||
guPerspective(*mtx, &sp5e, sViewportFOVy, sViewportAspect, near, far, 0.5f);
|
||||
gSPPerspNormalize((*gfx)++, sp5e);
|
||||
guPerspective(*mtx, &perspNorm, sViewportFOVy, sViewportAspect, near, far, 0.5f);
|
||||
gSPPerspNormalize((*gfx)++, perspNorm);
|
||||
gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
guRotate(*mtx, -sViewportRotation[2], 0.0f, 0.0f, -1.0f);
|
||||
@@ -128,8 +120,8 @@ void viewport_setRenderPerspectiveMatrixDefaultNearAndFar(Gfx **gfx, Mtx **mtx)
|
||||
void viewport_debug(void) {}
|
||||
|
||||
void viewport_debug2(f32 arg0) {
|
||||
if(90.0f < arg0) arg0 = 90.0f;
|
||||
if(arg0 < 5.0f) arg0 = 10.0f;
|
||||
if (90.0f < arg0) arg0 = 90.0f;
|
||||
if (arg0 < 5.0f) arg0 = 10.0f;
|
||||
sViewportUnused1 = arg0;
|
||||
}
|
||||
|
||||
@@ -359,18 +351,20 @@ bool cube_isInFrustum2(Cube *cube) {
|
||||
return viewport_isBoundingBoxInFrustum(min, max);
|
||||
}
|
||||
|
||||
bool func_8024DB50(f32 arg0[3], f32 arg1) {
|
||||
bool viewport_func_8024DB50(f32 arg0[3], f32 arg1) {
|
||||
f32 delta[3];
|
||||
s32 i;
|
||||
|
||||
delta[0] = arg0[0] - sViewportPosition[0];
|
||||
delta[1] = arg0[1] - sViewportPosition[1];
|
||||
delta[2] = arg0[2] - sViewportPosition[2];
|
||||
for(i = 0; i < 4; i++){
|
||||
|
||||
for(i = 0; i < 4; i++) {
|
||||
if(arg1 <= ml_dotProduct_vec3f(delta, sViewportFrustumPlanes[i])){
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -389,7 +383,7 @@ bool viewport_isPointOutsideFrustum_vec3f(f32 arg0[3]) {
|
||||
}
|
||||
|
||||
// need to figure out, what plane 2 is (neg/pos x/y ?)
|
||||
bool viewport_isPointPlane2_3f(f32 arg0, f32 arg1, f32 arg2) {
|
||||
bool viewport_isPointPlane_3f(f32 arg0, f32 arg1, f32 arg2) {
|
||||
return ((sViewportFrustumPlanes[2][0]*arg0 + sViewportFrustumPlanes[2][1]*arg1 + sViewportFrustumPlanes[2][2]*arg2 + sViewportFrustumPlanes[2][3]) <= 0.0f);
|
||||
}
|
||||
|
||||
@@ -417,11 +411,11 @@ f32 viewport_getNear(void) {
|
||||
return sViewportNear;
|
||||
}
|
||||
|
||||
f32 func_8024DDD8(s32 arg0, f32 arg1) {
|
||||
f32 viewport_func_8024DDD8(f32 arg0[3], f32 arg1) {
|
||||
return mlNormalizeAngle((sViewportRotation[1] + arg1) + 90.0);
|
||||
}
|
||||
|
||||
f32 func_8024DE1C(f32 arg0, f32 arg1, f32 arg2[3], f32 arg3[3]) {
|
||||
f32 viewport_func_8024DE1C(f32 arg0, f32 arg1, f32 arg2[3], f32 arg3[3]) {
|
||||
f32 fovy_rad;
|
||||
static f32 D_8028101C;
|
||||
static f32 D_80281020;
|
||||
@@ -456,7 +450,7 @@ f32 sViewportBackupFrustumPlanes[4][4];
|
||||
f32 sViewportBackupLookVector[3];
|
||||
f32 sViewportBackupMatrix[4][4];
|
||||
|
||||
bool func_8024E030(f32 arg0[3], f32 *arg1)
|
||||
bool viewport_func_8024E030(f32 arg0[3], f32 *arg1)
|
||||
{
|
||||
f32 sp34[3];
|
||||
f32 temp_f2_2;
|
||||
@@ -473,20 +467,23 @@ bool func_8024E030(f32 arg0[3], f32 *arg1)
|
||||
ml_vec3f_pitch_rotate_copy(sp34, sp34, -sViewportRotation[0]);
|
||||
|
||||
if ((-sViewportNear) <= sp34[2]) {
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
temp_f2 = gu_sqrtf((sp34[1] * sp34[1]) + (sp34[2] * sp34[2])) * sinf(fovy_radians);
|
||||
temp_f2_2 = (((f32) framebuffer_width) / ((f32) framebuffer_height)) * temp_f2;
|
||||
|
||||
arg1[0] = (f32) (((sp34[0] / temp_f2_2) + 1) * (((f32) framebuffer_width) / 2));
|
||||
arg1[1] = (f32) ((1 - (sp34[1] / temp_f2)) * (((f32) framebuffer_height) / 2));
|
||||
|
||||
if ((arg1[0] < (-((f32) framebuffer_width))) || ((((f32) framebuffer_width) * 2) < arg1[0])) {
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((arg1[1] < (-((f32) framebuffer_height))) || ((((f32) framebuffer_height) * 2) < arg1[1])) {
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void viewport_backupState(void) {
|
||||
|
@@ -7,7 +7,6 @@
|
||||
#include "SnS.h"
|
||||
|
||||
extern void func_803012F8(void);
|
||||
extern f32 func_8024DDD8(f32[3], f32);
|
||||
extern f32 ml_distanceSquared_vec3f(f32 arg0[3], f32 arg1[3]);
|
||||
extern void __baMarker_8028BA00(s32);
|
||||
extern void func_802C418C(void);
|
||||
|
@@ -86,7 +86,7 @@ void chBottlesBonusCursor_func_802DF460(s32 indx, ActorMarker *caller, f32 arg2[
|
||||
sp1C[0] = arg2[0] * 100.0f;
|
||||
sp1C[1] = arg2[1] * 100.0f;
|
||||
sp1C[2] = arg2[2] * 100.0f;
|
||||
if (func_8024E030(sp1C, D_8037E068[indx]) == 0) {
|
||||
if (viewport_func_8024E030(sp1C, D_8037E068[indx]) == 0) {
|
||||
D_8037E068[indx][0] = D_8037E068[indx][1] = 0.0f;
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)chBottlesBonusCursorMarker);
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
|
||||
actor_setOpacity(this, 0xB9);
|
||||
func_8024E030(this->position, D_8037E5C0.unk18);
|
||||
viewport_func_8024E030(this->position, D_8037E5C0.unk18);
|
||||
sp3C = (this->scale * 650.0f);
|
||||
func_80253208(gfx,
|
||||
(s32)(D_8037E5C0.unk18[0] - sp3C/2), (s32)(D_8037E5C0.unk18[1] - sp3C/2),
|
||||
@@ -157,7 +157,7 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
D_803A5D00[getActiveFramebuffer()]
|
||||
);
|
||||
modelRender_draw(gfx, mtx, this->position, rotation, this->scale, NULL, marker_loadModelBin(chBottlesBonusCursorMarker));
|
||||
func_8024E030(this->position, D_8037E5C0.unk10);
|
||||
viewport_func_8024E030(this->position, D_8037E5C0.unk10);
|
||||
if (this->state == 1) {
|
||||
D_8037E5C0.unk10[0] -= 24.0f;
|
||||
D_8037E5C0.unk10[1] -= 8.0f;
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern int func_8024DB50(f32 arg0[3], f32 arg1);
|
||||
|
||||
void chfirefx_update(Actor *this);
|
||||
|
||||
/* .data */
|
||||
@@ -75,7 +73,7 @@ void chfirefx_update(Actor *this){
|
||||
}
|
||||
}//L80359934
|
||||
if(subaddie_playerIsWithinSphere(this, 2000)){
|
||||
if( func_8024DB50(this->position, 50.0f) && this->unk38_31 ){
|
||||
if( viewport_func_8024DB50(this->position, 50.0f) && this->unk38_31 ){
|
||||
if(!(globalTimer_getTime() & 3) && randf() < 0.1){
|
||||
__chfirefx_spawnSmoke(this->position, this->scale);
|
||||
} //L803599AC
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
f32 func_8024DDD8(f32[3], f32);
|
||||
extern void func_8024E71C(s32, f32*);
|
||||
extern f32 ml_acosf(f32);
|
||||
extern f32 player_getYaw(void);
|
||||
@@ -141,7 +140,7 @@ f32 func_8029B33C(void){
|
||||
f32 sp1C[3];
|
||||
|
||||
_player_getPosition(sp1C);
|
||||
return func_8024DDD8(sp1C, func_8029B2F4());
|
||||
return viewport_func_8024DDD8(sp1C, func_8029B2F4());
|
||||
}
|
||||
|
||||
s32 func_8029B370(void){
|
||||
|
@@ -6,7 +6,6 @@
|
||||
#include "core2/ba/anim.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
f32 func_8024DDD8(f32[3], f32);
|
||||
extern void func_8024E71C(s32, f32*);
|
||||
extern f32 ml_acosf(f32);
|
||||
extern f32 player_getYaw(void);
|
||||
|
@@ -6,8 +6,6 @@
|
||||
#include "core2/statetimer.h"
|
||||
#include "core2/ba/physics.h"
|
||||
|
||||
|
||||
extern f32 func_8024DDD8(f32[3], f32);
|
||||
extern int func_80259254(f32 vec[3], f32 x, f32 z, f32 val);
|
||||
extern f32 player_getYaw(void);
|
||||
|
||||
@@ -144,8 +142,8 @@ bool func_8028AE10(void) {
|
||||
|
||||
_player_getPosition(sp1C);
|
||||
ideal_yaw = yaw_getIdeal();
|
||||
sp2C = func_8024DDD8(sp1C, 90.0f);
|
||||
sp28 = func_8024DDD8(sp1C, 270.0f);
|
||||
sp2C = viewport_func_8024DDD8(sp1C, 90.0f);
|
||||
sp28 = viewport_func_8024DDD8(sp1C, 270.0f);
|
||||
if (sp28 < sp2C) {
|
||||
return (sp2C < ideal_yaw) || (ideal_yaw < sp28);
|
||||
}
|
||||
|
@@ -3,9 +3,6 @@
|
||||
#include "variables.h"
|
||||
#include "core2/particle.h"
|
||||
|
||||
|
||||
extern bool func_8024DB50(f32[3], f32);
|
||||
|
||||
void func_802DC208(Actor *this);
|
||||
|
||||
/* .data */
|
||||
@@ -57,7 +54,7 @@ void func_802DC208(Actor *this) {
|
||||
actor_collisionOff(this);
|
||||
this->marker->propPtr->unk8_3 = TRUE;
|
||||
}
|
||||
if( func_8024DB50(this->position, 50.0f)
|
||||
if( viewport_func_8024DB50(this->position, 50.0f)
|
||||
&& func_802DC188()
|
||||
&& !(globalTimer_getTime() & 0x1F)
|
||||
&& randf() < 0.1
|
||||
|
@@ -4,10 +4,6 @@
|
||||
|
||||
#include "gc/gctransition.h"
|
||||
|
||||
extern void func_8024C510(f32);
|
||||
extern void viewport_setPosition_f3(f32, f32, f32);
|
||||
extern void viewport_setRotation_f3(f32, f32, f32);
|
||||
extern void viewport_setNearAndFar(f32, f32);
|
||||
extern void func_802F5374(void);
|
||||
extern void func_802FA0F8(void);
|
||||
extern void timedFuncQueue_update(void);
|
||||
@@ -66,7 +62,7 @@ struct{
|
||||
void func_802E3800(void){
|
||||
viewport_setPosition_f3(0.0f, 0.0f, 0.0f);
|
||||
viewport_setRotation_f3(-30.0f, 30.0f, 0.0f);
|
||||
func_8024C510(3000.0f);
|
||||
viewport_moveAlongZAxis(3000.0f);
|
||||
viewport_update();
|
||||
}
|
||||
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern s32 viewport_isPointPlane2_3f(f32,f32, f32);
|
||||
|
||||
/* .code */
|
||||
void func_802F7EB0(struct3s *this){
|
||||
f32 plyrPos[3]; //sp74
|
||||
@@ -37,7 +35,7 @@ void func_802F7EB0(struct3s *this){
|
||||
sp4C[1] = plyrPos[1] + sp4C[1];
|
||||
sp4C[2] = plyrPos[2] + sp4C[2];
|
||||
if(tmpf < 550.0)
|
||||
for(i = 0; (i < 0xa) && viewport_isPointPlane2_3f(sp4C[0],sp4C[1]- 10.0f, sp4C[2]); i++){
|
||||
for(i = 0; (i < 0xa) && viewport_isPointPlane_3f(sp4C[0],sp4C[1]- 10.0f, sp4C[2]); i++){
|
||||
sp4C[1] += 100.0f;
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern int viewport_isPointPlane2_3f(f32, f32, f32);
|
||||
#define _SQ3(x, y, z) (((x) * (x)) + ((y) * (y)) + ((z) * (z)))
|
||||
#define _SQ3v1(v) (v[0] * v[0] + v[1] * v[1] + v[2] * v[2])
|
||||
|
||||
@@ -39,7 +38,7 @@ void func_802F87B0(struct6s *this){
|
||||
sp4C[1] += plyrPos[1];
|
||||
sp4C[2] += plyrPos[2];
|
||||
if(f20 < 600.0){
|
||||
for(i = 0; i <10 && viewport_isPointPlane2_3f(sp4C[0], sp4C[1] - 10.0f, sp4C[2]); i++){
|
||||
for(i = 0; i <10 && viewport_isPointPlane_3f(sp4C[0], sp4C[1] - 10.0f, sp4C[2]); i++){
|
||||
sp4C[1] += 100.0f;
|
||||
}
|
||||
}
|
||||
|
@@ -7,15 +7,12 @@ typedef struct {
|
||||
f32 unkC[3];
|
||||
}Struct_core2_72060_0;
|
||||
|
||||
extern f32 viewport_getYaw();
|
||||
extern int viewport_isPointPlane2_3f(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 mlMtxApply(Mtx *);
|
||||
extern f32 vtxList_getGlobalNorm(BKVertexList *);
|
||||
extern bool func_8024DB50(f32[3], f32);
|
||||
|
||||
struct4Cs *D_80369280 = NULL;
|
||||
|
||||
@@ -171,7 +168,7 @@ void func_802F919C(void) {
|
||||
sp4C[1] += D_80381040[1];
|
||||
sp4C[2] += D_80381040[2];
|
||||
if (sp58 < 650.0) {
|
||||
for(sp44 = 0; sp44 < 5 && viewport_isPointPlane2_3f(sp4C[0], sp4C[1] - 10.0f, sp4C[2]) ; sp44++){
|
||||
for(sp44 = 0; sp44 < 5 && viewport_isPointPlane_3f(sp4C[0], sp4C[1] - 10.0f, sp4C[2]) ; sp44++){
|
||||
sp4C[1] += 200.0f;
|
||||
}
|
||||
}
|
||||
@@ -231,7 +228,7 @@ bool func_802F989C(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {
|
||||
if( ((-17000.0f < D_80381070[0]) &&(D_80381070[0] < 17000.0f))
|
||||
&& (arg2[1] > -200.0f)
|
||||
&& ((-17000.0f < D_80381070[2]) && (D_80381070[2] < 17000.0f))
|
||||
&& func_8024DB50(arg2, D_8038108C)
|
||||
&& viewport_func_8024DB50(arg2, D_8038108C)
|
||||
) {
|
||||
func_80251B5C(D_80381070[0], D_80381070[1], D_80381070[2]);
|
||||
mlMtxApply(*mtx);
|
||||
|
@@ -19,7 +19,6 @@ u32 D_803835E0;
|
||||
/* public */
|
||||
void func_80335110(s32);
|
||||
void func_80335128(s32);
|
||||
void viewport_setNearAndFar(f32, f32);
|
||||
void func_80335140(enum map_e);
|
||||
void func_8033520C(s32);
|
||||
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
Mtx *viewport_getDefaultMatrix(void);
|
||||
void mlMtxSet(Mtx *);
|
||||
void func_80252330(f32, f32, f32);
|
||||
void mlMtxApply(Mtx *);
|
||||
|
@@ -7,7 +7,6 @@ extern void func_80252330(f32, f32, f32);
|
||||
extern void mlMtxRotatePYR(f32, f32, f32);
|
||||
extern void mlMtxApply(Mtx *);
|
||||
extern void func_80349AD0(void);
|
||||
extern void viewport_getLookVector(f32[3]);
|
||||
|
||||
|
||||
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#include "variables.h"
|
||||
|
||||
extern bool func_8028F170(f32, f32);
|
||||
extern void viewport_getPosition_vec3f(f32[3]);
|
||||
|
||||
typedef struct {
|
||||
f32 unk0;
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern int func_8024DB50(f32[3], f32 );
|
||||
extern void func_802EFF5C(ParticleEmitter *, f32, f32, f32);
|
||||
extern void func_802EFF7C(ParticleEmitter *, f32, f32, f32);
|
||||
extern void func_802EFF9C(ParticleEmitter *, f32);
|
||||
@@ -487,17 +486,17 @@ void func_80362E94(Actor *this){
|
||||
|
||||
switch(this->unkF4_8){
|
||||
case 0x3: //L80362ED8
|
||||
if(func_8024DB50(this->position, 50.0f) && randf() < 0.2){
|
||||
if(viewport_func_8024DB50(this->position, 50.0f) && randf() < 0.2){
|
||||
func_80362084(this->position);
|
||||
}
|
||||
break;
|
||||
case 0xa: //L80362F24
|
||||
if(func_8024DB50(this->position, 50.0f) && randf() < 0.1){
|
||||
if(viewport_func_8024DB50(this->position, 50.0f) && randf() < 0.1){
|
||||
func_8036247C(this->position);
|
||||
}
|
||||
break;
|
||||
case 0xc: //L80362F70
|
||||
if(func_8024DB50(this->position, 50.0f)){
|
||||
if(viewport_func_8024DB50(this->position, 50.0f)){
|
||||
if(randf() < 0.4)
|
||||
func_80362680(this->position);
|
||||
if(randf() < 0.8)
|
||||
@@ -505,27 +504,27 @@ void func_80362E94(Actor *this){
|
||||
}
|
||||
break;
|
||||
case 0x10://L80362FE8
|
||||
if(func_8024DB50(this->position, 50.0f) && randf() < 0.1){
|
||||
if(viewport_func_8024DB50(this->position, 50.0f) && randf() < 0.1){
|
||||
func_80362A48(this->position);
|
||||
}
|
||||
break;
|
||||
case 0x11://L80363034
|
||||
if(func_8024DB50(this->position, 50.0f) && randf() < 0.06){
|
||||
if(viewport_func_8024DB50(this->position, 50.0f) && randf() < 0.06){
|
||||
func_80362ADC(this->position);
|
||||
}
|
||||
break;
|
||||
case 0x12://L80363080
|
||||
if(func_8024DB50(this->position, 50.0f) && randf() < 0.06){
|
||||
if(viewport_func_8024DB50(this->position, 50.0f) && randf() < 0.06){
|
||||
func_80362C04(this->position);
|
||||
}
|
||||
break;
|
||||
case 0x13://L803630CC
|
||||
if(func_8024DB50(this->position, 50.0f) && randf() < 0.4){
|
||||
if(viewport_func_8024DB50(this->position, 50.0f) && randf() < 0.4){
|
||||
func_80362B70(this->position);
|
||||
}
|
||||
break;
|
||||
case 0x14://L80363118
|
||||
if(func_8024DB50(this->position, 300.0f)){
|
||||
if(viewport_func_8024DB50(this->position, 300.0f)){
|
||||
if(randf() < 0.01)
|
||||
func_80362C98(this->position);
|
||||
func_80362D2C(this->position);
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern f32 func_8024DE1C(f32, f32, f32[3], f32[3]);
|
||||
extern f32 vtxList_getGlobalNorm(BKVertexList *);
|
||||
extern void func_80253208(Gfx **gdl, s32 x, s32 y, s32 w, s32 h, void *color_buffer);
|
||||
|
||||
@@ -192,7 +191,7 @@ void fxcommon3score_draw(enum item_e item_id, void *arg1, Gfx **gfx, Mtx **mtx,
|
||||
a1->value_string[0] = '\0';
|
||||
strIToA(a1->value_string, itemPrint_getValue(item_id));
|
||||
print_bold_spaced(a1->unk30 + a1->unk40, sp40 + a1->unk44, a1->value_string);
|
||||
sp3C = func_8024DE1C(a1->unk30, sp40, sp5C, sp68);
|
||||
sp3C = viewport_func_8024DE1C(a1->unk30, sp40, sp5C, sp68);
|
||||
|
||||
sp44[0] = 0.0f;
|
||||
sp44[1] = a1->unk38;
|
||||
|
@@ -25,7 +25,6 @@ typedef struct struct_1A_s{
|
||||
extern void func_802C5994(void);
|
||||
extern void func_802E412C(s32, s32);
|
||||
void volatileFlag_set(s32, s32);
|
||||
f32 func_8024DE1C(f32, f32, f32 *, f32 *);
|
||||
void mlMtxApply(Mtx*);
|
||||
void func_80310D2C(void);
|
||||
|
||||
@@ -1210,7 +1209,7 @@ void __gcpausemenu_drawSprite(Gfx** gdl, Mtx** mptr, Vtx** vptr, BKSprite* sprit
|
||||
func_8033837C(0);
|
||||
viewport_getPosition_vec3f(sp50);
|
||||
|
||||
sp34 = func_8024DE1C(x, y, sp5C, sp44);
|
||||
sp34 = viewport_func_8024DE1C(x, y, sp5C, sp44);
|
||||
mlMtxIdent(); //matrix_stack_identity
|
||||
sp38[0] = sp5C[0] - sp50[0];
|
||||
sp38[1] = sp5C[1] - sp50[1];
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void viewport_setNearAndFar(f32, f32);
|
||||
|
||||
typedef struct {
|
||||
s16 model_id;
|
||||
// u8 pad2[0x2];
|
||||
|
@@ -7,7 +7,6 @@
|
||||
void animctrl_setAnimTimer(AnimCtrl*, f32);
|
||||
void func_8025AC20(s32, s32, s32, f32, char*, s32);
|
||||
f32 func_80257618(void);
|
||||
void viewport_setNearAndFar(f32, f32);
|
||||
|
||||
typedef enum {
|
||||
TRANSITION_ID_1_BLACK_IN = 1,
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#include "variables.h"
|
||||
#include "zoombox.h"
|
||||
|
||||
extern f32 func_8024DE1C(f32, f32, f32[3], f32[3]);
|
||||
void func_80252330(f32, f32, f32);
|
||||
extern f32 func_8033DDB8(void);
|
||||
extern void func_8024E60C(s32, void *);
|
||||
@@ -823,7 +822,7 @@ void func_803163A8(GcZoombox *this, Gfx **gfx, Mtx **mtx) {
|
||||
f32 sp38[3];
|
||||
f32 sp34;
|
||||
|
||||
sp34 = func_8024DE1C(this->unk170, this->unk172, sp50, sp5C);
|
||||
sp34 = viewport_func_8024DE1C(this->unk170, this->unk172, sp50, sp5C);
|
||||
if (this->unk1A4_24) {
|
||||
sp5C[1] += 180.0f;
|
||||
sp5C[0] -= 2*sp5C[0];
|
||||
|
@@ -10,13 +10,7 @@ extern bool func_802ED420(BKModelUnk20List *arg0, u8 *arg1, u32 arg2);
|
||||
extern void func_802ED52C(BKModelUnk20List *, f32[3], f32);
|
||||
extern void func_80252AF0(f32[3], f32[3], f32[3], f32, f32[3]);
|
||||
extern void mlMtxRotatePYR(f32, f32, f32);
|
||||
extern void viewport_getPosition_vec3f(f32[3]);
|
||||
extern void viewport_getRotation_vec3f(f32[3]);
|
||||
extern void viewport_setPosition_vec3f(f32[3]);
|
||||
extern void viewport_setRotation_vec3f(f32[3]);
|
||||
extern void viewport_update(void);
|
||||
extern void func_8033BD4C(BKModelBin *);
|
||||
extern s32 func_8024DB50(f32[3], f32);
|
||||
extern void mlMtx_push_translation(f32, f32, f32);
|
||||
extern void mlMtxScale(f32);
|
||||
extern void mlMtxApply(Mtx* mtx);
|
||||
@@ -959,7 +953,7 @@ void func_80338EB8(Gfx ** gfx, Mtx ** mtx, void *arg2){
|
||||
sp34[1] = (f32)cmd->unk8[1] * modelRenderScale;
|
||||
sp34[2] = (f32)cmd->unk8[2] * modelRenderScale;
|
||||
sp30 = (f32)cmd->unkE*modelRenderScale;
|
||||
if(func_8024DB50(sp34, sp30) && cmd->unk10){
|
||||
if(viewport_func_8024DB50(sp34, sp30) && cmd->unk10){
|
||||
func_80339124(gfx, mtx, (BKGeoList*)((s32)cmd + cmd->unk10));
|
||||
}
|
||||
}
|
||||
@@ -981,7 +975,7 @@ void func_80338EB8(Gfx ** gfx, Mtx ** mtx, void *arg2){
|
||||
sp34[0] += modelRenderCameraPosition[0];
|
||||
sp34[1] += modelRenderCameraPosition[1];
|
||||
sp34[2] += modelRenderCameraPosition[2];
|
||||
if(func_8024DB50(sp34, sp30) && cmd->unk10){
|
||||
if(viewport_func_8024DB50(sp34, sp30) && cmd->unk10){
|
||||
func_80339124(gfx, mtx, (BKGeoList*)((s32)cmd + cmd->unk10));
|
||||
}
|
||||
|
||||
@@ -1102,7 +1096,7 @@ BKModelBin *modelRender_draw(Gfx **gfx, Mtx **mtx, f32 position[3], f32 rotation
|
||||
return 0;
|
||||
}
|
||||
|
||||
D_80370990 = (D_80383704) ? func_8024DB50(object_position, spD0*scale) : 1;
|
||||
D_80370990 = (D_80383704) ? viewport_func_8024DB50(object_position, spD0*scale) : 1;
|
||||
if(D_80370990 == 0){
|
||||
modelRender_reset();
|
||||
return 0;
|
||||
|
@@ -5,7 +5,6 @@
|
||||
extern bool func_80245314(f32[3], f32[3], f32, f32, u32);
|
||||
extern int func_80244D94(f32[3], f32[3], f32[3], u32, f32);
|
||||
extern int func_8024575C(f32[3], f32[3], f32, f32[3], s32, u32);
|
||||
extern void func_8024C510(f32);
|
||||
extern f32 func_80258708(f32[3], f32[3]);
|
||||
extern f32 func_80259198(f32, f32);
|
||||
extern f32 func_8028E82C(void);
|
||||
@@ -962,7 +961,7 @@ void func_802BE794(void){
|
||||
sp20[1] = mlNormalizeAngle(sp20[1] + 180.0f);
|
||||
viewport_setPosition_vec3f(sp2C);
|
||||
viewport_setRotation_vec3f(sp20);
|
||||
func_8024C510(300.0f);
|
||||
viewport_moveAlongZAxis(300.0f);
|
||||
func_802BE720();
|
||||
}//L802BE828
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#include "variables.h"
|
||||
#include "core2/particle.h"
|
||||
|
||||
extern int func_8024DB50(f32 (*)[3], f32);
|
||||
extern s32 spriteGetFrameCount(BKSprite *);
|
||||
extern void func_80344720(s32 SpriteGfx, s32 frame, s32, f32[3], f32[3], f32[3], Gfx **, Mtx **);
|
||||
extern void func_80344424(s32 SpriteGfx, s32 frame, s32, f32[3], f32[3], f32, Gfx **, Mtx **);
|
||||
@@ -645,7 +644,7 @@ void particleEmitter_update(ParticleEmitter *this){
|
||||
}//L802F0254
|
||||
|
||||
if( 0.0f != this->unkFC
|
||||
&& !func_8024DB50(&particle->position, this->unkFC)
|
||||
&& !viewport_func_8024DB50(&particle->position, this->unkFC)
|
||||
){
|
||||
memcpy(particle, --this->pList_end_128, sizeof(Particle));
|
||||
}
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#include "fight.h"
|
||||
#include "core2/particle.h"
|
||||
|
||||
|
||||
extern void viewport_getPosition_vec3f(f32 (*)[3]);
|
||||
extern void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
|
||||
extern void func_80386654(f32 arg0, f32 (*arg1)[4], f32 (*arg2)[4]);
|
||||
extern void func_80324CFC(f32, enum comusic_e, s32);
|
||||
|
Reference in New Issue
Block a user