Merge branch 'mr-origin-96'

This commit is contained in:
banjo.decomp
2024-10-19 23:10:46 -05:00
291 changed files with 2238 additions and 2204 deletions

View File

@@ -26,7 +26,7 @@ u8 _gcbound_blue; //D_80380902
void _gcbound_draw(Gfx** dl, s32 a, s32 r, s32 g, s32 b){
gSPDisplayList((*dl)++, &D_803688E8);
gDPSetFogColor((*dl)++, r, g, b, a);
gSPTextureRectangle((*dl)++, 0, 0, (framebuffer_width-1)<<2, (framebuffer_height-1)<<2, 0, 0, 0, 0x100, 0x100);
gSPTextureRectangle((*dl)++, 0, 0, (gFramebufferWidth-1)<<2, (gFramebufferHeight-1)<<2, 0, 0, 0, 0x100, 0x100);
}
void gcbound_draw(Gfx** dl){

View File

@@ -1,4 +1,5 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
@@ -373,7 +374,7 @@ void gcdialog_update(void) {
ret = -1;
if (g_Dialog.u8.unk128_31 & 0x80) {
func_8024E5A8(0, controller_face_buttons);
pfsManager_getFirstControllerFaceButtonState(0, controller_face_buttons);
func_8024E640(0, controller_side_buttons);
} else {
controller_copyFaceButtons(0, controller_face_buttons);

View File

@@ -1,8 +1,7 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
#include "ml/mtx.h"
#include <core1/viewport.h>
#include "zoombox.h"
@@ -31,9 +30,6 @@ f32 func_8024DE1C(f32, f32, f32 *, f32 *);
void func_80310D2C(void);
s32 level_get(void);
void func_8024E6E0(s32, void *);
void func_8024E60C(s32, void *);
void controller_getJoystick(s32, void *);
s32 getGameMode(void);
void func_802DC5B8(void);
@@ -764,12 +760,12 @@ void gcpausemenu_init(void) {
func_80311604();
gcpausemenu_zoomboxes_initMainMenu();
D_80383010.joystick_sprite = assetcache_get(0x7EB);
D_80383010.joystick_frame_count = spriteGetFrameCount(D_80383010.joystick_sprite);
D_80383010.joystick_frame_count = sprite_getFrameCount(D_80383010.joystick_sprite);
D_80383010.left_joystick_alpha = temp_v1 = D_80383010.right_joystick_alpha = 0;
D_80383010.joystick_frame = D_80383010.unk3_4 = temp_v1;
D_80383010.b_button_sprite = assetcache_get(0x7ED);
D_80383010.b_button_frame_count = spriteGetFrameCount(D_80383010.b_button_sprite);
D_80383010.b_button_frame_count = sprite_getFrameCount(D_80383010.b_button_sprite);
D_80383010.b_button_frame = D_80383010.unk3_0 = D_80383010.b_button_alpha = 0;
D_80383010.page_cnt = gcpausemenu_initLargestPageIndex();
D_80383010.sns_alpha = D_80383010.sns_visible = D_80383010.unk70_31 = D_80383010.unk70_30 = 0;
@@ -1306,7 +1302,7 @@ void __gcpausemenu_drawSprite(Gfx **gdl, Mtx **mptr, Vtx **vptr, BKSprite *sprit
f32 sp2C;
f32 sp28;
_frame = spriteGetFramePtr(sprite, frame);
_frame = sprite_getFramePtr(sprite, frame);
sp2C = _frame->w;
sp28 = _frame->h;
func_803382E4(5);
@@ -1337,7 +1333,7 @@ void gcpausemenu_drawSprite(Gfx **gdl, Mtx **mptr, Vtx **vptr, BKSprite *sprite,
BKSpriteFrame *_frame;
s32 w;
s32 h;
_frame = spriteGetFramePtr(sprite, frame);
_frame = sprite_getFramePtr(sprite, frame);
w = ((mirror) ? -1 : 1) * _frame->w;
h = _frame->h;
__gcpausemenu_drawSprite(gdl, mptr, vptr, sprite, frame, (x - w * 0.5), (y - h * 0.5), w, h, a);
@@ -1376,7 +1372,7 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
}
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.joystick_sprite, D_80383010.joystick_frame, 30.0f, 196.0f, 1, (s32) D_80383010.left_joystick_alpha);
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.joystick_sprite, D_80383010.joystick_frame, (f32)(framebuffer_width - 0x1E), 196.0f, 0, (s32) D_80383010.right_joystick_alpha);
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.joystick_sprite, D_80383010.joystick_frame, (f32)(gFramebufferWidth - 0x1E), 196.0f, 0, (s32) D_80383010.right_joystick_alpha);
var_a0 = ((*((u32 * ) & D_80383010.state) << 0x1c) >> 0x1f); //left_joystick_visible
if (var_a0 != 0) {
if (D_80383010.left_joystick_alpha < 0xFF) {
@@ -1399,7 +1395,7 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
D_80383010.right_joystick_alpha = (D_80383010.right_joystick_alpha - 0xC > 0) ? D_80383010.right_joystick_alpha - 0xC : 0;
}
}
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.b_button_sprite, (s32) D_80383010.b_button_frame, framebuffer_width * 0.5, 196.0f, 0, (s32) D_80383010.b_button_alpha);
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.b_button_sprite, (s32) D_80383010.b_button_frame, gFramebufferWidth * 0.5, 196.0f, 0, (s32) D_80383010.b_button_alpha);
var_a0 = ((*((u32 * ) & D_80383010.state) << 0x1e) >> 0x1f);//b_button_visible
if (var_a0 != 0) {
if (D_80383010.b_button_alpha < 0xFF) {

View File

@@ -1,7 +1,7 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
#include <core1/viewport.h>
typedef struct {
s16 model_id;
@@ -75,7 +75,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
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
drawRectangle2D(gfx, 0, 0, (s32)(f32) gFramebufferWidth, (s32)(f32)gFramebufferHeight,0, 0, 0); //fill screen with black
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
viewport_getPosition_vec3f(position);
for(i = 0; i < 3; i++){
@@ -89,7 +89,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
}
}
else{//L8030B200
drawRectangle2D(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height, 0, 0, 0);
drawRectangle2D(gfx, 0, 0, (s32)(f32) gFramebufferWidth, (s32)(f32)gFramebufferHeight, 0, 0, 0);
}//L8030B254
}

View File

@@ -1,13 +1,11 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
#include <core1/viewport.h>
#include "gc/gctransition.h"
void animctrl_setAnimTimer(AnimCtrl*, f32);
void func_8025AC20(s32, s32, s32, f32, char*, s32);
f32 func_80257618(void);
typedef enum {
TRANSITION_ID_1_BLACK_IN = 1,
@@ -321,7 +319,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){
case 0xA:
//zoom out only
vp_rotation[2] = 0.0f;
scale = (1.0f - func_80257618())*s_current_transition.transistion_info->scale + 0.1;
scale = (1.0f - func_80257618(percentage))*s_current_transition.transistion_info->scale + 0.1;
break;
}
if(!(s_current_transition.substate < 3) || s_current_transition.transistion_info->uid != 0x11){

View File

@@ -1,16 +1,12 @@
#include <ultra64.h>
#include "core1/core1.h"
#include "core1/core1.h"
#include "functions.h"
#include "variables.h"
#include "zoombox.h"
#include "ml/mtx.h"
#include <core1/viewport.h>
void func_80252330(f32, f32, f32);
extern f32 func_8033DDB8(void);
extern void func_8024E60C(s32, void *);
extern void func_8024E640(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);
@@ -863,7 +859,7 @@ void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, BK
}
sp2C[1] = this->unk172 + ((f32) arg4 * this->unk198);
sp2C[2] = -10.0f;
func_80252330((sp2C[0] * 4.0f) - ((f32)framebuffer_width * 2), ((f32)framebuffer_height * 2) - (sp2C[1] * 4.0f), sp2C[2]);
func_80252330((sp2C[0] * 4.0f) - ((f32)gFramebufferWidth * 2), ((f32)gFramebufferHeight * 2) - (sp2C[1] * 4.0f), sp2C[2]);
temp_f12 = (f32) ((f64) this->unk198 * 0.8);
mlMtxScale_xyz(temp_f12, temp_f12, 1.0f);
mlMtxApply(*mtx);
@@ -885,7 +881,7 @@ void func_80316764(GcZoombox *this, s32 arg1) {
func_8024E60C(0, sp2C);
phi_f0 = time_getDelta();
} else {
func_8024E5A8(0, sp38);
pfsManager_getFirstControllerFaceButtonState(0, sp38);
func_8024E640(0, sp2C);
phi_f0 = func_8033DDB8();
}
@@ -1072,7 +1068,7 @@ void gczoombox_update(GcZoombox *this){
tmp_f0 = time_getDelta();
}
else{
func_8024E5A8(0, sp58);
pfsManager_getFirstControllerFaceButtonState(0, sp58);
func_8024E640(0, sp4C);
tmp_f0 = func_8033DDB8();
}
@@ -1345,7 +1341,7 @@ void __gczoombox_load_sprite(GcZoombox *this, GcZoomboxSprite portrait_id){
this->frame_count = this->unkF8->frameCnt;
func_803382E4(-1);
func_80338308(func_802510A0(this->unkF8), func_802510A8(this->unkF8));
func_80338308(sprite_getUnk8(this->unkF8), sprite_getUnkA(this->unkF8));
}
void __gczoombox_load_sfx(GcZoombox *this, GcZoomboxSprite portrait_id){
@@ -1404,8 +1400,8 @@ GcZoombox *gczoombox_new(s32 y, GcZoomboxSprite portrait_id, s32 arg2, s32 arg3,
this->unk1A4_24 = arg3;
if(this->unk1A4_24){
this->unk16A = 45;
this->unk174 = framebuffer_width - 0x25;
this->unk170 = framebuffer_width + 0x66;
this->unk174 = gFramebufferWidth - 0x25;
this->unk170 = gFramebufferWidth + 0x66;
}else{
this->unk16A = 71;
this->unk174 = 0x25;
@@ -1606,9 +1602,9 @@ void func_80318640(GcZoombox *this, s32 arg1, f32 arg2, f32 arg3, s32 arg4) {
if (this != NULL) {
if (this->unk1A4_24) {
this->unk174 = framebuffer_width - arg1;
this->unk174 = gFramebufferWidth - arg1;
this->unk16A = arg1 + (8.0f * arg2);
this->unk170 = (framebuffer_width - arg1) + 0x8B;
this->unk170 = (gFramebufferWidth - arg1) + 0x8B;
} else {
this->unk174 = arg1;
phi_v0 = arg4 ? 0x28 : 0x22;