You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Refresh 12
This commit is contained in:
@@ -487,7 +487,7 @@ static void geo_process_generated_list(struct GraphNodeGenerated *node) {
|
||||
Gfx *list = node->fnNode.func(GEO_CONTEXT_RENDER, &node->fnNode.node,
|
||||
(struct AllocOnlyPool *) gMatStack[gMatStackIndex]);
|
||||
|
||||
if (list != 0) {
|
||||
if (list != NULL) {
|
||||
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(list), node->fnNode.node.flags >> 8);
|
||||
}
|
||||
}
|
||||
@@ -508,7 +508,7 @@ static void geo_process_background(struct GraphNodeBackground *node) {
|
||||
list = node->fnNode.func(GEO_CONTEXT_RENDER, &node->fnNode.node,
|
||||
(struct AllocOnlyPool *) gMatStack[gMatStackIndex]);
|
||||
}
|
||||
if (list != 0) {
|
||||
if (list != NULL) {
|
||||
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(list), node->fnNode.node.flags >> 8);
|
||||
} else if (gCurGraphNodeMasterList != NULL) {
|
||||
#ifndef F3DEX_GBI_2E
|
||||
@@ -602,10 +602,10 @@ static void geo_process_animated_part(struct GraphNodeAnimatedPart *node) {
|
||||
* Initialize the animation-related global variables for the currently drawn
|
||||
* object's animation.
|
||||
*/
|
||||
void geo_set_animation_globals(struct GraphNodeObject_sub *node, s32 hasAnimation) {
|
||||
void geo_set_animation_globals(struct AnimInfo *node, s32 hasAnimation) {
|
||||
struct Animation *anim = node->curAnim;
|
||||
|
||||
if (hasAnimation != 0) {
|
||||
if (hasAnimation) {
|
||||
node->animFrame = geo_update_animation_frame(node, &node->animFrameAccelAssist);
|
||||
}
|
||||
node->animTimer = gAreaUpdateCounter;
|
||||
@@ -624,10 +624,10 @@ void geo_set_animation_globals(struct GraphNodeObject_sub *node, s32 hasAnimatio
|
||||
gCurrAnimAttribute = segmented_to_virtual((void *) anim->index);
|
||||
gCurAnimData = segmented_to_virtual((void *) anim->values);
|
||||
|
||||
if (anim->unk02 == 0) {
|
||||
if (anim->animYTransDivisor == 0) {
|
||||
gCurAnimTranslationMultiplier = 1.0f;
|
||||
} else {
|
||||
gCurAnimTranslationMultiplier = (f32) node->animYTrans / (f32) anim->unk02;
|
||||
gCurAnimTranslationMultiplier = (f32) node->animYTrans / (f32) anim->animYTransDivisor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ static void geo_process_shadow(struct GraphNodeShadow *node) {
|
||||
}
|
||||
|
||||
objScale = 1.0f;
|
||||
if (gCurAnimEnabled != 0) {
|
||||
if (gCurAnimEnabled) {
|
||||
if (gCurAnimType == ANIM_TYPE_TRANSLATION
|
||||
|| gCurAnimType == ANIM_TYPE_LATERAL_TRANSLATION) {
|
||||
geo = node->node.children;
|
||||
@@ -694,7 +694,7 @@ static void geo_process_shadow(struct GraphNodeShadow *node) {
|
||||
mtxf_mul(gMatStack[gMatStackIndex], mtxf, *gCurGraphNodeCamera->matrixPtr);
|
||||
mtxf_to_mtx(mtx, gMatStack[gMatStackIndex]);
|
||||
gMatStackFixed[gMatStackIndex] = mtx;
|
||||
if (gShadowAboveWaterOrLava == 1) {
|
||||
if (gShadowAboveWaterOrLava == TRUE) {
|
||||
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), 4);
|
||||
} else if (gMarioOnIceOrCarpet == 1) {
|
||||
geo_append_display_list((void *) VIRTUAL_TO_PHYSICAL(shadowList), 5);
|
||||
@@ -740,7 +740,7 @@ static void geo_process_shadow(struct GraphNodeShadow *node) {
|
||||
*
|
||||
* Since (0,0,0) is unaffected by rotation, columns 0, 1 and 2 are ignored.
|
||||
*/
|
||||
static int obj_is_in_view(struct GraphNodeObject *node, Mat4 matrix) {
|
||||
static s32 obj_is_in_view(struct GraphNodeObject *node, Mat4 matrix) {
|
||||
s16 cullingRadius;
|
||||
s16 halfFov; // half of the fov in in-game angle units instead of degrees
|
||||
struct GraphNode *geo;
|
||||
@@ -805,7 +805,7 @@ static void geo_process_object(struct Object *node) {
|
||||
Mat4 mtxf;
|
||||
s32 hasAnimation = (node->header.gfx.node.flags & GRAPH_RENDER_HAS_ANIMATION) != 0;
|
||||
|
||||
if (node->header.gfx.unk18 == gCurGraphNodeRoot->areaIndex) {
|
||||
if (node->header.gfx.areaIndex == gCurGraphNodeRoot->areaIndex) {
|
||||
if (node->header.gfx.throwMatrix != NULL) {
|
||||
mtxf_mul(gMatStack[gMatStackIndex + 1], *node->header.gfx.throwMatrix,
|
||||
gMatStack[gMatStackIndex]);
|
||||
@@ -825,8 +825,8 @@ static void geo_process_object(struct Object *node) {
|
||||
node->header.gfx.cameraToObject[2] = gMatStack[gMatStackIndex][3][2];
|
||||
|
||||
// FIXME: correct types
|
||||
if (node->header.gfx.unk38.curAnim != NULL) {
|
||||
geo_set_animation_globals(&node->header.gfx.unk38, hasAnimation);
|
||||
if (node->header.gfx.animInfo.curAnim != NULL) {
|
||||
geo_set_animation_globals(&node->header.gfx.animInfo, hasAnimation);
|
||||
}
|
||||
if (obj_is_in_view(&node->header.gfx, gMatStack[gMatStackIndex])) {
|
||||
Mtx *mtx = alloc_display_list(sizeof(*mtx));
|
||||
@@ -912,8 +912,8 @@ void geo_process_held_object(struct GraphNodeHeldObject *node) {
|
||||
gGeoTempState.data = gCurAnimData;
|
||||
gCurAnimType = 0;
|
||||
gCurGraphNodeHeldObject = (void *) node;
|
||||
if (node->objNode->header.gfx.unk38.curAnim != NULL) {
|
||||
geo_set_animation_globals(&node->objNode->header.gfx.unk38, hasAnimation);
|
||||
if (node->objNode->header.gfx.animInfo.curAnim != NULL) {
|
||||
geo_set_animation_globals(&node->objNode->header.gfx.animInfo, hasAnimation);
|
||||
}
|
||||
|
||||
geo_process_node_and_siblings(node->objNode->header.gfx.sharedChild);
|
||||
|
||||
Reference in New Issue
Block a user