Add SurfaceFlags, and more formatting :)
This commit is contained in:
@@ -13,8 +13,7 @@ static Vec3s gVec3sZero = {0, 0, 0};
|
||||
|
||||
static struct Object *try_allocate_object(void)
|
||||
{
|
||||
struct ObjectNode *nextObj;
|
||||
nextObj = (struct ObjectNode *)malloc(sizeof(struct Object));
|
||||
struct ObjectNode *nextObj = (struct ObjectNode *)malloc(sizeof(struct Object));
|
||||
nextObj->prev = NULL;
|
||||
nextObj->next = NULL;
|
||||
return (struct Object *)nextObj;
|
||||
@@ -22,7 +21,6 @@ static struct Object *try_allocate_object(void)
|
||||
|
||||
static struct Object *allocate_object(void)
|
||||
{
|
||||
s32 i;
|
||||
struct Object *obj = try_allocate_object();
|
||||
|
||||
// Initialize object fields
|
||||
@@ -33,7 +31,7 @@ static struct Object *allocate_object(void)
|
||||
obj->collidedObjInteractTypes = 0;
|
||||
obj->numCollidedObjs = 0;
|
||||
|
||||
for (i = 0; i < 0x50; i++)
|
||||
for (s32 i = 0; i < 0x50; i++)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
obj->rawData.asS32[i] = 0;
|
||||
@@ -89,8 +87,7 @@ static struct Object *allocate_object(void)
|
||||
|
||||
static struct Object *create_object(void)
|
||||
{
|
||||
struct Object *obj;
|
||||
obj = allocate_object();
|
||||
struct Object *obj = allocate_object();
|
||||
obj->curBhvCommand = NULL;
|
||||
obj->behavior = NULL;
|
||||
return obj;
|
||||
@@ -115,9 +112,7 @@ static void geo_obj_init(struct GraphNodeObject *graphNode, void *sharedChild, V
|
||||
|
||||
static struct Object *spawn_object_at_origin(void)
|
||||
{
|
||||
struct Object *obj;
|
||||
obj = create_object();
|
||||
|
||||
struct Object *obj = create_object();
|
||||
obj->parentObj = NULL;
|
||||
obj->header.gfx.areaIndex = 0;
|
||||
obj->header.gfx.activeAreaIndex = 0;
|
||||
@@ -194,11 +189,9 @@ void bhv_mario_update(void)
|
||||
|
||||
void create_transformation_from_matrices(Mat4 a0, Mat4 a1, Mat4 a2)
|
||||
{
|
||||
f32 spC, sp8, sp4;
|
||||
|
||||
spC = a2[3][0] * a2[0][0] + a2[3][1] * a2[0][1] + a2[3][2] * a2[0][2];
|
||||
sp8 = a2[3][0] * a2[1][0] + a2[3][1] * a2[1][1] + a2[3][2] * a2[1][2];
|
||||
sp4 = a2[3][0] * a2[2][0] + a2[3][1] * a2[2][1] + a2[3][2] * a2[2][2];
|
||||
f32 spC = a2[3][0] * a2[0][0] + a2[3][1] * a2[0][1] + a2[3][2] * a2[0][2];
|
||||
f32 sp8 = a2[3][0] * a2[1][0] + a2[3][1] * a2[1][1] + a2[3][2] * a2[1][2];
|
||||
f32 sp4 = a2[3][0] * a2[2][0] + a2[3][1] * a2[2][1] + a2[3][2] * a2[2][2];
|
||||
|
||||
a0[0][0] = a1[0][0] * a2[0][0] + a1[0][1] * a2[0][1] + a1[0][2] * a2[0][2];
|
||||
a0[0][1] = a1[0][0] * a2[1][0] + a1[0][1] * a2[1][1] + a1[0][2] * a2[1][2];
|
||||
|
||||
Reference in New Issue
Block a user