document viewport functions
This commit is contained in:
@@ -88,7 +88,7 @@ f32 func_802D7038(Actor *this) {
|
||||
void func_802D7124(Actor *actor, f32 arg1) {
|
||||
f32 vp[3];
|
||||
|
||||
viewport_get_position_vec3f(&vp);
|
||||
viewport_getPosition_vec3f(&vp);
|
||||
if ((actor->position[0] - vp[0]) * (actor->position[0] - vp[0]) + (actor->position[2] - vp[2]) * (actor->position[2] - vp[2]) < 12250000.0f) {
|
||||
func_802D729C(actor, arg1);
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ typedef struct{
|
||||
|
||||
extern void item_set(enum item_e, s32);
|
||||
extern void actor_postdrawMethod(ActorMarker *);
|
||||
extern void viewport_set_near_far(f32, f32);
|
||||
extern void viewport_setNearAndFar(f32, f32);
|
||||
|
||||
Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void chBottlesBonus_update(Actor *this);
|
||||
@@ -122,8 +122,8 @@ void chBottlesBonus_func_802DD080(Gfx **gfx, Mtx **mtx) {
|
||||
f32 vp_position[3];
|
||||
f32 vp_rotation[3];
|
||||
|
||||
func_8024E258();
|
||||
viewport_set_near_far(50.0f, 2000.0f);
|
||||
viewport_backupState();
|
||||
viewport_setNearAndFar(50.0f, 2000.0f);
|
||||
if (getGameMode() == GAME_MODE_A_SNS_PICTURE) {
|
||||
vp_rotation[0] = 0.0f;
|
||||
vp_rotation[1] = 0.0f;
|
||||
@@ -139,15 +139,15 @@ void chBottlesBonus_func_802DD080(Gfx **gfx, Mtx **mtx) {
|
||||
vp_rotation[1] = 270.0f;
|
||||
vp_rotation[2] = 0.0f;
|
||||
}
|
||||
viewport_set_position_vec3f(vp_position);
|
||||
viewport_set_rotation_vec3f(vp_rotation);
|
||||
viewport_setPosition_vec3f(vp_position);
|
||||
viewport_setRotation_vec3f(vp_rotation);
|
||||
viewport_update();
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
}
|
||||
|
||||
void chBottlesBonus_func_802DD158(Gfx **gfx, Mtx** mtx){
|
||||
func_8024E2FC();
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
}
|
||||
|
||||
Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
|
@@ -88,11 +88,11 @@ void func_802CDAC4(Actor *this){
|
||||
f32 sp1C[3];
|
||||
|
||||
camera_setType(1);
|
||||
viewport_set_position_vec3f(this->position);
|
||||
viewport_setPosition_vec3f(this->position);
|
||||
sp1C[0] = this->pitch;
|
||||
sp1C[1] = this->yaw;
|
||||
sp1C[2] = 0.0f;
|
||||
viewport_set_rotation_vec3f(sp1C);
|
||||
viewport_setRotation_vec3f(sp1C);
|
||||
}
|
||||
|
||||
void func_802CDB18(Actor *this){
|
||||
|
@@ -37,18 +37,18 @@ Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vt
|
||||
actor = marker_getActor(marker);
|
||||
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)actor);
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
|
||||
func_8024E258();
|
||||
viewport_backupState();
|
||||
{sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;};
|
||||
{sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;};
|
||||
viewport_set_position_vec3f(sp58);
|
||||
viewport_set_rotation_vec3f(sp4C);
|
||||
viewport_setPosition_vec3f(sp58);
|
||||
viewport_setRotation_vec3f(sp4C);
|
||||
viewport_update();
|
||||
func_8024C904(gdl, mptr);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
{sp40[0] = 0.0f; sp40[1] = 0.0f; sp40[2] = 0.0f;};
|
||||
{sp34[0] = 0.0f; sp34[1] = 165.0f; sp34[2] = 0.0f;};
|
||||
modelRender_draw(gdl, mptr, sp40, 0, 1.0f, sp34, marker_loadModelBin(marker));
|
||||
func_8024E2FC();
|
||||
func_8024C904(gdl, mptr);
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
return actor;
|
||||
}
|
||||
|
||||
|
@@ -47,18 +47,18 @@ Actor *chOverlayPressStart_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx
|
||||
|
||||
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)actor);
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
|
||||
func_8024E258();
|
||||
viewport_backupState();
|
||||
{sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;};
|
||||
{sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;};
|
||||
viewport_set_position_vec3f(sp58);
|
||||
viewport_set_rotation_vec3f(sp4C);
|
||||
viewport_setPosition_vec3f(sp58);
|
||||
viewport_setRotation_vec3f(sp4C);
|
||||
viewport_update();
|
||||
func_8024C904(gdl, mptr);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
{sp40[0] = 0.0f; sp40[1] = 0.0f; sp40[2] = 0.0f;};
|
||||
{sp34[0] = 0.0f; sp34[1] = 400.0f; sp34[2] = 0.0f;};
|
||||
modelRender_draw(gdl, mptr, sp40, 0, 1.0f, sp34, marker_loadModelBin(marker));
|
||||
func_8024E2FC();
|
||||
func_8024C904(gdl, mptr);
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
return actor;
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ void __chTermite_updateWalkSFX(Actor *this) {
|
||||
f32 sp24[3];
|
||||
f32 sp20;
|
||||
|
||||
viewport_get_position_vec3f(&sp24);
|
||||
viewport_getPosition_vec3f(&sp24);
|
||||
sp20 = ml_map_f( (300.0f - sp24[0])*(300.0f - sp24[0]) + (this->position[1] - sp24[1])*(this->position[1] - sp24[1]) + (-858.0f - sp24[2])*(-858.0f - sp24[2])
|
||||
, 7617600.0f, 8236900.0f
|
||||
, 8000.0f, 1000.0f
|
||||
|
Reference in New Issue
Block a user