core2/code_5FB00.c done, core2/code_5FD90.c progress
This commit is contained in:
@@ -43,6 +43,7 @@ Actor *func_80387DD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/FP/code_19E0/func_80388000.s")
|
||||
|
||||
|
||||
void func_8038811C(ActorMarker *this_marker, ActorMarker *other_marker){
|
||||
Actor *this = marker_getActor(this_marker);
|
||||
if(this->state == 2)
|
||||
|
@@ -522,9 +522,6 @@ void func_802E6800(s32 arg0){
|
||||
D_8037E900->flags &= ~arg0 | 0x1;
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5DBC0/func_802E6820.s")
|
||||
#else
|
||||
void func_802E6820(s32 arg0) {
|
||||
BKSprite *prev_sprite_ptr;
|
||||
s32 chunk_count;
|
||||
@@ -539,74 +536,19 @@ void func_802E6820(s32 arg0) {
|
||||
D_8037E900->unk4 = (struct5DBC0_2s *)defrag(D_8037E900->unk4);
|
||||
D_8037E900->string = (char *)defrag(D_8037E900->string);
|
||||
for(var_s5 = 0; var_s5 < D_8037E900->unk10; var_s5++) {
|
||||
if (D_8037E900->unk4[var_s5].unk8 != NULL) {
|
||||
D_8037E900->unk4[var_s5].unk8 = (BKSpriteTextureBlock **)defrag(D_8037E900->unk4[var_s5].unk8);
|
||||
if (D_8037E900->unk4[var_s5].letter_texture != NULL) {
|
||||
D_8037E900->unk4[var_s5].letter_texture = (BKSpriteTextureBlock **)defrag(D_8037E900->unk4[var_s5].letter_texture);
|
||||
}
|
||||
|
||||
prev_sprite_ptr = D_8037E900->unk4[var_s5].unk0;
|
||||
if (D_8037E900->unk4[var_s5].unk0 != NULL) {
|
||||
prev_sprite_ptr = D_8037E900->unk4[var_s5].font_bin;
|
||||
if (D_8037E900->unk4[var_s5].font_bin != NULL) {
|
||||
chunk_count = spriteGetFramePtr(prev_sprite_ptr, 0U)->chunkCnt;
|
||||
D_8037E900->unk4[var_s5].unk0 = (BKSprite *)defrag_asset(D_8037E900->unk4[var_s5].unk0);
|
||||
D_8037E900->unk4[var_s5].font_bin = (BKSprite *)defrag_asset(D_8037E900->unk4[var_s5].font_bin);
|
||||
for(i_chunk = 0; i_chunk < chunk_count; i_chunk++){
|
||||
D_8037E900->unk4[var_s5].unk8[i_chunk] = (BKSpriteTextureBlock *)((s32)D_8037E900->unk4[var_s5].unk0 + ((s32)D_8037E900->unk4[var_s5].unk8[i_chunk] - (s32)prev_sprite_ptr));
|
||||
D_8037E900->unk4[var_s5].letter_texture[i_chunk] = ((u32)(((s32)D_8037E900->unk4[var_s5].letter_texture[i_chunk] - (s32)prev_sprite_ptr)) + (u32)D_8037E900->unk4[var_s5].font_bin);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* BREAK??? */
|
||||
void func_802E6A90(BKModelUnk28List *arg0, BKVertexList *arg1, s32 arg2, f32 arg3[3]) {
|
||||
Vtx *i_vtx;
|
||||
Vtx *vtx_list;
|
||||
s32 i;
|
||||
s32 var_a2;
|
||||
BKModelUnk28 *var_v1;
|
||||
|
||||
vtx_list = vtxList_getVertices(arg1);
|
||||
|
||||
var_v1 = (BKModelUnk28 *)(arg0 + 1);
|
||||
for(arg2 = arg2; arg2 != 0; arg2--){
|
||||
var_v1 = (BKModelUnk28 *)((s16*)(var_v1 + 1) + (var_v1->vtx_count - 1));
|
||||
}
|
||||
|
||||
for(i = 0; i < var_v1->vtx_count; i++){
|
||||
i_vtx = &vtx_list[var_v1->vtx_list[i]];
|
||||
i_vtx->v.ob[0] = (s16) (s32) arg3[0];
|
||||
i_vtx->v.ob[1] = (s16) (s32) arg3[1];
|
||||
i_vtx->v.ob[2] = (s16) (s32) arg3[2];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, struct58s *arg2) {
|
||||
Vtx *vtx_list;
|
||||
Vtx *i_vtx;
|
||||
s32 i;
|
||||
BKModelUnk28 *var_s1;
|
||||
s16 sp50[3];
|
||||
s32 temp_v0;
|
||||
s32 var_s3;
|
||||
s32 var_s4;
|
||||
|
||||
vtx_list = vtxList_getVertices(arg1);
|
||||
var_s1 = (BKModelUnk28 *)(arg0 + 1);
|
||||
var_s3 = -2;
|
||||
for(var_s4 = 0; var_s4 < arg0->count; var_s4++){
|
||||
if (var_s3 != var_s1->unk6) {
|
||||
var_s3 = var_s1->unk6;
|
||||
func_80251BCC(func_802EA110(arg2, var_s3));
|
||||
}
|
||||
mlMtx_apply_vec3s(sp50, var_s1->unk0);
|
||||
for(i = 0; i < var_s1->vtx_count; i++){
|
||||
i_vtx = &vtx_list[var_s1->vtx_list[i]];
|
||||
i_vtx->v.ob[0] = sp50[0];
|
||||
i_vtx->v.ob[1] = sp50[1];
|
||||
i_vtx->v.ob[2] = sp50[2];
|
||||
}
|
||||
var_s1 = (BKModelUnk28 *)((s16*)(var_s1 + 1) + (var_s1->vtx_count - 1));
|
||||
}
|
||||
osWritebackDCache(vtx_list, vtxList_getVtxCount(arg1) * sizeof(Vtx));
|
||||
}
|
||||
|
57
src/core2/code_5FB00.c
Normal file
57
src/core2/code_5FB00.c
Normal file
@@ -0,0 +1,57 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
|
||||
void func_802E6A90(BKModelUnk28List *arg0, BKVertexList *arg1, s32 arg2, f32 arg3[3]) {
|
||||
Vtx *i_vtx;
|
||||
Vtx *vtx_list;
|
||||
s32 i;
|
||||
s32 var_a2;
|
||||
BKModelUnk28 *var_v1;
|
||||
|
||||
vtx_list = vtxList_getVertices(arg1);
|
||||
|
||||
var_v1 = (BKModelUnk28 *)(arg0 + 1);
|
||||
for(arg2 = arg2; arg2 != 0; arg2--){
|
||||
var_v1 = (BKModelUnk28 *)((s16*)(var_v1 + 1) + (var_v1->vtx_count - 1));
|
||||
}
|
||||
|
||||
for(i = 0; i < var_v1->vtx_count; i++){
|
||||
i_vtx = &vtx_list[var_v1->vtx_list[i]];
|
||||
i_vtx->v.ob[0] = (s16) (s32) arg3[0];
|
||||
i_vtx->v.ob[1] = (s16) (s32) arg3[1];
|
||||
i_vtx->v.ob[2] = (s16) (s32) arg3[2];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, struct58s *arg2) {
|
||||
Vtx *vtx_list;
|
||||
Vtx *i_vtx;
|
||||
s32 i;
|
||||
BKModelUnk28 *var_s1;
|
||||
s16 sp50[3];
|
||||
s32 temp_v0;
|
||||
s32 var_s3;
|
||||
s32 var_s4;
|
||||
|
||||
vtx_list = vtxList_getVertices(arg1);
|
||||
var_s1 = (BKModelUnk28 *)(arg0 + 1);
|
||||
var_s3 = -2;
|
||||
for(var_s4 = 0; var_s4 < arg0->count; var_s4++){
|
||||
if (var_s3 != var_s1->unk6) {
|
||||
var_s3 = var_s1->unk6;
|
||||
func_80251BCC(func_802EA110(arg2, var_s3));
|
||||
}
|
||||
mlMtx_apply_vec3s(sp50, var_s1->unk0);
|
||||
for(i = 0; i < var_s1->vtx_count; i++){
|
||||
i_vtx = &vtx_list[var_s1->vtx_list[i]];
|
||||
i_vtx->v.ob[0] = sp50[0];
|
||||
i_vtx->v.ob[1] = sp50[1];
|
||||
i_vtx->v.ob[2] = sp50[2];
|
||||
}
|
||||
var_s1 = (BKModelUnk28 *)((s16*)(var_s1 + 1) + (var_s1->vtx_count - 1));
|
||||
}
|
||||
osWritebackDCache(vtx_list, vtxList_getVtxCount(arg1) * sizeof(Vtx));
|
||||
}
|
@@ -57,9 +57,6 @@ void func_802E6D20(BKCollisionTri *arg0, BKVertexList *vtx_list) {
|
||||
|
||||
}
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5FD90/func_802E6DEC.s")
|
||||
#else
|
||||
void func_802E6DEC(BKCollisionList *collision_list, f32 arg1[3], f32 arg2[3], BKCollisionGeo ***arg3, BKCollisionGeo ***arg4) {
|
||||
s32 sp3C[3];
|
||||
s32 sp30[3];
|
||||
@@ -109,7 +106,7 @@ void func_802E6DEC(BKCollisionList *collision_list, f32 arg1[3], f32 arg2[3], BK
|
||||
for(z = sp3C[2]; z <= sp30[2]; z++){
|
||||
for(y = sp3C[1]; y <= sp30[1]; y++){
|
||||
for(x = sp3C[0]; x <= sp30[0]; x++){
|
||||
*(D_8037E910.unk190++) = (BKCollisionGeo *)((s32)collision_list + sizeof(BKCollisionList)) + (collision_list->unkE * z) + (y * collision_list->unkC) + (x);
|
||||
*(D_8037E910.unk190++) = ((collision_list->unkE * z) + (BKCollisionGeo *)(collision_list + 1)) + x + (y * collision_list->unkC);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,11 +114,7 @@ void func_802E6DEC(BKCollisionList *collision_list, f32 arg1[3], f32 arg2[3], BK
|
||||
*arg4 = D_8037E910.unk190;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NONMATCHING
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5FD90/func_802E70FC.s")
|
||||
#else
|
||||
void func_802E70FC(BKCollisionList *collision_list, s32 arg1[3], s32 arg2[3], BKCollisionGeo ***arg3, BKCollisionGeo ***arg4) {
|
||||
s32 sp3C[3];
|
||||
s32 sp30[3];
|
||||
@@ -168,10 +161,11 @@ void func_802E70FC(BKCollisionList *collision_list, s32 arg1[3], s32 arg2[3], BK
|
||||
}
|
||||
|
||||
D_8037E910.unk190 = &D_8037E910.unk0[0];
|
||||
|
||||
for(z = sp3C[2]; z <= sp30[2]; z++){
|
||||
for(y = sp3C[1]; y <= sp30[1]; y++){
|
||||
for(x = sp3C[0]; x <= sp30[0]; x++){
|
||||
*(D_8037E910.unk190++) = (BKCollisionGeo *)((s32)collision_list + sizeof(BKCollisionList)) + (collision_list->unkE * z) + x + (y * collision_list->unkC);
|
||||
*(D_8037E910.unk190++) = ((collision_list->unkE * z) + (BKCollisionGeo *)(collision_list + 1)) + x + (y * collision_list->unkC);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -179,7 +173,6 @@ void func_802E70FC(BKCollisionList *collision_list, s32 arg1[3], s32 arg2[3], BK
|
||||
*arg4 = D_8037E910.unk190;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void func_802E73C8(f32 (*arg0)[3]) {
|
||||
s32 i;
|
||||
|
@@ -2065,6 +2065,7 @@ void func_8032ACA8(Actor *arg0) {
|
||||
extern s32 D_8036E5A8;
|
||||
void func_8032AD7C(s32 arg0) {
|
||||
s32 var_s0;
|
||||
|
||||
|
||||
if (D_8036E560 != NULL) {
|
||||
if (D_8036E5A8 >= D_8036E560->cnt) {
|
||||
|
Reference in New Issue
Block a user