document viewport functions
This commit is contained in:
@@ -1208,7 +1208,7 @@ void __gcpausemenu_drawSprite(Gfx** gdl, Mtx** mptr, Vtx** vptr, BKSprite* sprit
|
||||
func_80338338(0xFF, 0xFF, 0xFF);
|
||||
func_803382FC(a);
|
||||
func_8033837C(0);
|
||||
viewport_get_position_vec3f(sp50);
|
||||
viewport_getPosition_vec3f(sp50);
|
||||
|
||||
sp34 = func_8024DE1C(x, y, sp5C, sp44);
|
||||
mlMtxIdent(); //matrix_stack_identity
|
||||
@@ -1319,7 +1319,7 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
if (D_80383010.unk3E[i] < 0.0) {
|
||||
D_80383010.unk3E[i] += 360.0;
|
||||
}
|
||||
func_8024E258();
|
||||
viewport_backupState();
|
||||
sp98[0] = ((i-1)*0.4)*360 + -360.0f;
|
||||
sp98[1] = 0.0f;
|
||||
sp98[2] = 1000.0f;
|
||||
@@ -1327,10 +1327,10 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
sp8C[0] = 0.0f;
|
||||
sp8C[1] = 0.0f;
|
||||
sp8C[2] = 0.0f;
|
||||
viewport_set_position_vec3f(sp98);
|
||||
viewport_set_rotation_vec3f(sp8C);
|
||||
viewport_setPosition_vec3f(sp98);
|
||||
viewport_setRotation_vec3f(sp8C);
|
||||
viewport_update();
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
sp98[0] = 0.0f;
|
||||
sp98[1] = 0.0f;
|
||||
sp98[2] = 0.0f;
|
||||
@@ -1350,8 +1350,8 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE);
|
||||
modelRender_setAlpha(D_80383010.sns_alpha);
|
||||
modelRender_draw(gfx, mtx, sp98, sp8C, 0.8f, sp80, D_80383010.sns_egg_model);
|
||||
func_8024E2FC();
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
}
|
||||
}
|
||||
if (sns_get_item_state(7, 0)) {
|
||||
@@ -1362,7 +1362,7 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
if (D_80383010.unk3E[0] < 0.0) {
|
||||
D_80383010.unk3E[0] += 360.0;
|
||||
}
|
||||
func_8024E258();
|
||||
viewport_backupState();
|
||||
|
||||
sp98[0] = 0.0f;
|
||||
sp98[1] = 0.0f;
|
||||
@@ -1372,10 +1372,10 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
sp8C[1] = 0.0f;
|
||||
sp8C[2] = 0.0f;
|
||||
|
||||
viewport_set_position_vec3f(sp98);
|
||||
viewport_set_rotation_vec3f(sp8C);
|
||||
viewport_setPosition_vec3f(sp98);
|
||||
viewport_setRotation_vec3f(sp8C);
|
||||
viewport_update();
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
|
||||
sp98[0] = 0.0f;
|
||||
sp98[1] = 0.0f;
|
||||
@@ -1391,8 +1391,8 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE);
|
||||
modelRender_setAlpha(D_80383010.sns_alpha);
|
||||
modelRender_draw(gfx, mtx, sp98, sp8C, 0.8f, sp80, D_80383010.ice_key_model);
|
||||
func_8024E2FC();
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
extern void viewport_set_near_far(f32, f32);
|
||||
extern void viewport_setNearAndFar(f32, f32);
|
||||
|
||||
typedef struct {
|
||||
s16 model_id;
|
||||
@@ -74,11 +74,11 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
f32 rotation[3];
|
||||
BKModelBin *iAsset;
|
||||
|
||||
viewport_set_near_far(5.0f, 15000.0f);
|
||||
viewport_setNearAndFar(5.0f, 15000.0f);
|
||||
if(gcSky.model_bins[0]){
|
||||
drawRectangle2D(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height,0, 0, 0); //fill screen with black
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_get_position_vec3f(position);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
viewport_getPosition_vec3f(position);
|
||||
for(i = 0; i < 3; i++){
|
||||
iAsset = gcSky.model_bins[i];
|
||||
if(iAsset){
|
||||
|
@@ -7,7 +7,7 @@
|
||||
void animctrl_setAnimTimer(AnimCtrl*, f32);
|
||||
void func_8025AC20(s32, s32, s32, f32, char*, s32);
|
||||
f32 func_80257618(void);
|
||||
void viewport_set_near_far(f32, f32);
|
||||
void viewport_setNearAndFar(f32, f32);
|
||||
|
||||
typedef enum {
|
||||
TRANSITION_ID_1_BLACK_IN = 1,
|
||||
@@ -251,7 +251,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
if(s_current_transition.state == 0)
|
||||
return;
|
||||
|
||||
func_8024E258();
|
||||
viewport_backupState();
|
||||
if(s_current_transition.animctrl != NULL){
|
||||
vp_position[0] = 0.0f;
|
||||
vp_position[1] = 0.0f;
|
||||
@@ -265,11 +265,11 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
vp_rotation[0] = 0.0f;
|
||||
vp_rotation[1] = 0.0f;
|
||||
vp_rotation[2] = 0.0f;
|
||||
viewport_set_near_far(D_8036C440, D_8036C444);
|
||||
viewport_set_position_vec3f(vp_position); //viewport_get_position_vec3f
|
||||
viewport_set_rotation_vec3f(vp_rotation); //viewport_get_rotation_vec3f
|
||||
viewport_setNearAndFar(D_8036C440, D_8036C444);
|
||||
viewport_setPosition_vec3f(vp_position); //viewport_getPosition_vec3f
|
||||
viewport_setRotation_vec3f(vp_rotation); //viewport_getRotation_vec3f
|
||||
viewport_update(); //camera_updateNormal
|
||||
func_8024C904(gdl, mptr);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
|
||||
|
||||
sp58[0] = 0.0f;
|
||||
@@ -367,8 +367,8 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
if(s_current_transition.animctrl != NULL){
|
||||
gDPSetTextureFilter((*gdl)++, G_TF_BILERP);
|
||||
}
|
||||
func_8024E2FC();
|
||||
func_8024C904(gdl, mptr);
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -849,7 +849,7 @@ void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, s3
|
||||
func_803382FC(this->unk168 * arg6);
|
||||
func_803382E4(5);
|
||||
func_80335D30(gfx);
|
||||
func_8024C7B8(gfx, mtx);
|
||||
viewport_setRenderViewportAndOrthoMatrix(gfx, mtx);
|
||||
mlMtxIdent();
|
||||
if (this->unk1A4_24) {
|
||||
mlMtxRotYaw(180.0f);
|
||||
@@ -867,7 +867,7 @@ void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, s3
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE);
|
||||
func_80344090(arg5, this->unk186, gfx);
|
||||
func_8033687C(gfx);
|
||||
func_8024C904(gfx, mtx);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
}
|
||||
|
||||
void func_80316764(GcZoombox *this, s32 arg1) {
|
||||
|
Reference in New Issue
Block a user