The first commit
This commit is contained in:
51
src/core2/done/bs/talk.c
Normal file
51
src/core2/done/bs/talk.c
Normal file
@@ -0,0 +1,51 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .bss */
|
||||
s32 D_8037D570;
|
||||
|
||||
/* .code */
|
||||
void func_802B6130(void){
|
||||
AnimCtrl *plyr_mvmt;
|
||||
f32 yaw;
|
||||
f32 plyr_pos[3];
|
||||
f32 target_pos[3];
|
||||
|
||||
plyr_mvmt = _player_getAnimCtrlPtr();
|
||||
animctrl_reset(plyr_mvmt);
|
||||
func_8029C848(plyr_mvmt);
|
||||
animctrl_setPlaybackType(plyr_mvmt, ANIMCTRL_LOOP);
|
||||
func_802875AC(plyr_mvmt, "bstalk.c", 0x38);
|
||||
_player_getPosition(plyr_pos);
|
||||
func_802949F8(target_pos);
|
||||
func_80257F18(plyr_pos, target_pos, &yaw);
|
||||
yaw_setIdeal(yaw);
|
||||
func_80289F10(1);
|
||||
func_802991A8(1);
|
||||
func_8029957C(3);
|
||||
func_802978DC(2);
|
||||
func_80297970(0.0f);
|
||||
D_8037D570 = 1;
|
||||
}
|
||||
|
||||
void func_802B61E0(void){
|
||||
s32 tmp = 0;
|
||||
|
||||
if (D_8037D570 == 0)
|
||||
tmp = BS_1_IDLE;
|
||||
D_8037D570 = 0;
|
||||
bs_setState(tmp);
|
||||
}
|
||||
|
||||
void func_802B6218(void){}
|
||||
|
||||
void func_802B6220(void){
|
||||
if(bs_getInterruptType() == 8){
|
||||
D_8037D570 = 1;
|
||||
func_8029A86C(2);
|
||||
}
|
||||
else{
|
||||
func_80296608();
|
||||
}
|
||||
}
|
67
src/core2/done/climb.c
Normal file
67
src/core2/done/climb.c
Normal file
@@ -0,0 +1,67 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
/* .bss */
|
||||
f32 climbPoleBottom[3];
|
||||
f32 climbPoleTop[3];
|
||||
f32 climbRadius;//climbRadius
|
||||
f32 D_8037C580[3];
|
||||
f32 D_8037C58C;
|
||||
u8 D_8037C590; //bool climbing
|
||||
u8 D_8037C591;
|
||||
|
||||
/* .code */
|
||||
void climbClear(void){ //climbClear
|
||||
ml_vec3f_clear(climbPoleBottom);
|
||||
ml_vec3f_clear(climbPoleTop);
|
||||
D_8037C590 = 0;
|
||||
D_8037C58C = 0.0f;
|
||||
|
||||
}
|
||||
|
||||
void climbGetBottom(f32 dst[3]){ //climbGetBottom
|
||||
ml_vec3f_copy(dst, climbPoleBottom);
|
||||
}
|
||||
|
||||
f32 climbGetBottomY(void){ //climbGetBottomY
|
||||
return climbPoleBottom[1];
|
||||
}
|
||||
|
||||
f32 climbGetRadius(void){ //climbGetRadius
|
||||
return climbRadius;
|
||||
}
|
||||
|
||||
u8 func_8029825C(void){ //climb_2098250
|
||||
return D_8037C591;
|
||||
}
|
||||
|
||||
f32 climbGetTopY(void){ //climbGetTopY
|
||||
return climbPoleTop[1];
|
||||
}
|
||||
|
||||
climbSet(f32 bottom[3], f32 top[3], f32 radius, u32 arg3){
|
||||
if( !(D_8037C58C > 0.0f) || D_8037C580[0] != bottom[0]
|
||||
|| D_8037C580[1] != bottom[1] || D_8037C580[2] != bottom[2])
|
||||
{
|
||||
ml_vec3f_copy(climbPoleBottom, bottom);
|
||||
ml_vec3f_copy(climbPoleTop, top);
|
||||
climbRadius = radius;
|
||||
D_8037C591 = arg3;
|
||||
D_8037C590 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80298344(void){ //climbUpdateRegrab
|
||||
D_8037C58C = max_f(D_8037C58C - time_getDelta(), 0.0f);
|
||||
if(D_8037C590 && ability_hasLearned(ABILITY_5_CLIMB)){
|
||||
bs_checkInterrupt(0xC);
|
||||
}
|
||||
D_8037C590 = 0;
|
||||
}
|
||||
|
||||
void climbRelease(void){ //climbRelease
|
||||
D_8037C590 = 0;
|
||||
ml_vec3f_copy(D_8037C580, climbPoleBottom);
|
||||
D_8037C58C = 0.6f;
|
||||
}
|
97
src/core2/done/code_3B2C0.c
Normal file
97
src/core2/done/code_3B2C0.c
Normal file
@@ -0,0 +1,97 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
f32 mlDiffDegF(f32, f32);
|
||||
|
||||
|
||||
/* .bss */
|
||||
f32 D_8037DC20[3];
|
||||
f32 D_8037DC30[3];
|
||||
f32 D_8037DC3C;
|
||||
f32 D_8037DC40;
|
||||
u8 D_8037DC44;
|
||||
f32 D_8037DC50[3];
|
||||
|
||||
/* .code */
|
||||
void func_802C2250(void){}
|
||||
|
||||
void func_802C2258(void){
|
||||
D_8037DC44 = 0;
|
||||
}
|
||||
|
||||
void func_802C2264(f32 arg0){
|
||||
D_8037DC40 = arg0;
|
||||
D_8037DC3C = D_8037DC40;
|
||||
func_802BD384(D_8037DC20);
|
||||
func_802BD3A8(D_8037DC30);
|
||||
D_8037DC44 = 1;
|
||||
}
|
||||
|
||||
void func_802C22B4(void){
|
||||
D_8037DC44 = 0;
|
||||
}
|
||||
|
||||
|
||||
void func_802C22C0(f32 *arg0, f32 *arg1){
|
||||
f32 tmpf_1[3];
|
||||
f32 tmpf_2[3];
|
||||
f32 tmp;
|
||||
|
||||
if(D_8037DC44 == 0)
|
||||
return;
|
||||
|
||||
if(D_8037DC44 == 1){
|
||||
ml_vec3f_diff(D_8037DC20, arg0);
|
||||
D_8037DC30[0] = mlDiffDegF(D_8037DC30[0], arg1[0]);
|
||||
D_8037DC30[1] = mlDiffDegF(D_8037DC30[1], arg1[1]);
|
||||
D_8037DC30[2] = 0.0f;
|
||||
D_8037DC44 = 2;
|
||||
}
|
||||
D_8037DC3C -= time_getDelta();
|
||||
if(D_8037DC3C <= 0.0f)
|
||||
D_8037DC44 = 0;
|
||||
else {
|
||||
tmp = ml_map_f(D_8037DC3C, 0.0f, D_8037DC40, 0.0f, 1.0f);
|
||||
ml_vec3f_scale_copy(tmpf_1, D_8037DC20, tmp);
|
||||
ml_vec3f_scale_copy(tmpf_2, D_8037DC30, tmp);
|
||||
arg0[0] += tmpf_1[0];
|
||||
arg0[1] += tmpf_1[1];
|
||||
arg0[2] += tmpf_1[2];
|
||||
arg1[0] += tmpf_2[0];
|
||||
arg1[1] += tmpf_2[1];
|
||||
arg1[2] += tmpf_2[2];
|
||||
arg1[0] = mlNormalizeAngle(arg1[0]);
|
||||
arg1[1] = mlNormalizeAngle(arg1[1]);
|
||||
arg1[2] = 0.0f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void func_802C2460(void){
|
||||
f32 sp24[3];
|
||||
f32 sp12[3];
|
||||
|
||||
func_8024C5CC(sp24);
|
||||
func_8024C764(sp12);
|
||||
func_802BD334(sp24);
|
||||
func_802BD35C(sp12);
|
||||
player_getPosition(D_8037DC50);
|
||||
func_80291488(5);
|
||||
}
|
||||
|
||||
void func_802C24AC(void){}
|
||||
|
||||
void func_802C24B4(void){
|
||||
f32 sp24[3];
|
||||
f32 sp18[3];
|
||||
|
||||
player_getPosition(sp24);
|
||||
ml_vec3f_diff_copy(sp18, D_8037DC50, sp24);
|
||||
if( !(gu_sqrtf(sp18[0]*sp18[0] + sp18[1]*sp18[1] + sp18[2]*sp18[2]) < 2.0f)){
|
||||
func_80291488(2);
|
||||
func_802BD0D8(0xB);
|
||||
func_802BE720();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user