Pulling model and animation sources from sm64-port repo with script
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include "behavior_actions.h"
|
||||
#include "rendering_graph_node.h"
|
||||
#include "../shim.h"
|
||||
|
||||
// not sure what this is doing here. not in a behavior file.
|
||||
Gfx *geo_move_mario_part_from_parent(s32 run, UNUSED struct GraphNode *node, Mat4 mtx) {
|
||||
Mat4 sp20;
|
||||
struct Object *sp1C;
|
||||
|
||||
if (run == TRUE) {
|
||||
sp1C = (struct Object *) gCurGraphNodeObject;
|
||||
if (sp1C == gMarioObject && sp1C->prevObj != NULL) {
|
||||
create_transformation_from_matrices(sp20, mtx, *gCurGraphNodeCamera->matrixPtr);
|
||||
obj_update_pos_from_parent_transformation(sp20, sp1C->prevObj);
|
||||
obj_set_gfx_pos_from_pos(sp1C->prevObj);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../include/types.h"
|
||||
#include "../mario/model.inc.h"
|
||||
|
||||
extern Gfx *geo_move_mario_part_from_parent(s32 run, UNUSED struct GraphNode *node, Mat4 mtx);
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
|
||||
#include "../model/model.inc.h"
|
||||
#include "../mario/model.inc.h"
|
||||
|
||||
|
||||
// PATCH
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
#include "engine/surface_collision.h"
|
||||
#include "engine/graph_node.h"
|
||||
#include "engine/geo_layout.h"
|
||||
#include "assets/mario_anim_data.h"
|
||||
#include "game/rendering_graph_node.h"
|
||||
#include "model/geo.inc.h"
|
||||
#include "mario/anim_data.h"
|
||||
#include "mario/geo.inc.h"
|
||||
#include "gfx_adapter.h"
|
||||
|
||||
static struct AllocOnlyPool *s_mario_geo_pool;
|
||||
@@ -86,7 +86,7 @@ void sm64_global_init( SM64DebugPrintFunctionPtr debugPrintFunction )
|
||||
s_mario_geo_pool = alloc_only_pool_init();
|
||||
s_mario_graph_node = process_geo_layout( s_mario_geo_pool, mario_geo_ptr );
|
||||
|
||||
D_80339D10.animDmaTable = (void*)(&gMarioAnims);
|
||||
D_80339D10.animDmaTable = mario_anims_ptr;
|
||||
D_80339D10.currentAnimAddr = NULL;
|
||||
D_80339D10.targetAnim = malloc( 0x4000 );
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/types.h"
|
||||
#include "gfx_adapter_commands.h"
|
||||
|
||||
/*
|
||||
* Vertex (set up for use with colors)
|
||||
*/
|
||||
typedef struct {
|
||||
#ifndef GBI_FLOATS
|
||||
short ob[3]; /* x, y, z */
|
||||
#else
|
||||
float ob[3]; /* x, y, z */
|
||||
#endif
|
||||
unsigned short flag;
|
||||
short tc[2]; /* texture coord */
|
||||
unsigned char cn[4]; /* color & alpha */
|
||||
} Vtx_t;
|
||||
|
||||
/*
|
||||
* Vertex (set up for use with normals)
|
||||
*/
|
||||
typedef struct {
|
||||
#ifndef GBI_FLOATS
|
||||
short ob[3]; /* x, y, z */
|
||||
#else
|
||||
float ob[3]; /* x, y, z */
|
||||
#endif
|
||||
unsigned short flag;
|
||||
short tc[2]; /* texture coord */
|
||||
signed char n[3]; /* normal */
|
||||
unsigned char a; /* alpha */
|
||||
} Vtx_tn;
|
||||
|
||||
typedef union {
|
||||
Vtx_t v; /* Use this one for colors */
|
||||
Vtx_tn n; /* Use this one for normals */
|
||||
long long int force_structure_alignment;
|
||||
} Vtx;
|
||||
|
||||
typedef struct {
|
||||
unsigned char col[3]; /* diffuse light value (rgba) */
|
||||
char pad1;
|
||||
unsigned char colc[3]; /* copy of diffuse light value (rgba) */
|
||||
char pad2;
|
||||
signed char dir[3]; /* direction of light (normalized) */
|
||||
char pad3;
|
||||
} Light_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned char col[3]; /* ambient light value (rgba) */
|
||||
char pad1;
|
||||
unsigned char colc[3]; /* copy of ambient light value (rgba) */
|
||||
char pad2;
|
||||
} Ambient_t;
|
||||
|
||||
typedef union {
|
||||
Light_t l;
|
||||
long long int force_structure_alignment[2];
|
||||
} Light;
|
||||
|
||||
typedef union {
|
||||
Ambient_t l;
|
||||
long long int force_structure_alignment[1];
|
||||
} Ambient;
|
||||
|
||||
typedef struct {
|
||||
Ambient a;
|
||||
Light l[1];
|
||||
} Lights1;
|
||||
|
||||
//static const Lights1 mario_blue_lights_group = gdSPDefLights1( 0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0x28, 0x28, 0x28);
|
||||
#define gdSPDefLights1(ar,ag,ab,r1,g1,b1,x1,y1,z1) {{{ {ar,ag,ab},0,{ar,ag,ab},0}}, {{{ {r1,g1,b1},0,{r1,g1,b1},0,{x1,y1,z1},0}}} }
|
||||
|
||||
#define gsSPVertex(v, n, v0) \
|
||||
GFXCMD_VertexData, \
|
||||
(int64_t)v, n, v0
|
||||
|
||||
#define gsSP2Triangles(v00, v01, v02, flag0, v10, v11, v12, flag1) \
|
||||
GFXCMD_Triangle, \
|
||||
v00, v01, v02, flag0, \
|
||||
GFXCMD_Triangle, \
|
||||
v10, v11, v12, flag1
|
||||
|
||||
#define gsSP1Triangle(v00, v01, v02, flag0) \
|
||||
GFXCMD_Triangle, \
|
||||
v00, v01, v02, flag0
|
||||
|
||||
#define gsSPEndDisplayList() \
|
||||
GFXCMD_EndDisplayList
|
||||
|
||||
#define gsSPDisplayList(dl) \
|
||||
GFXCMD_SubDisplayList, \
|
||||
(int64_t)dl
|
||||
|
||||
#define gsSPLight(l, n) \
|
||||
GFXCMD_Light, \
|
||||
(int64_t)l, n
|
||||
|
||||
#define gsDPPipeSync() (GFXCMD_None)
|
||||
#define gsDPSetCombineMode(a, b) (GFXCMD_None)
|
||||
#define gsSPSetGeometryMode(word) (GFXCMD_None)
|
||||
#define gsDPLoadTextureBlock(timg, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) (GFXCMD_None)
|
||||
#define gsSPTexture(s, t, level, tile, on) (GFXCMD_None)
|
||||
#define gsSPClearGeometryMode(word) (GFXCMD_None)
|
||||
#define gsDPSetEnvColor(r, g, b, a) (GFXCMD_None)
|
||||
#define gsDPSetAlphaCompare(type) (GFXCMD_None)
|
||||
#define gsDPTileSync() (GFXCMD_None)
|
||||
#define gsDPSetTile(fmt, siz, line, tmem, tile, palette, cmt, maskt, shiftt, cms, masks, shifts) (GFXCMD_None)
|
||||
#define gsDPSetTileSize(t, uls, ult, lrs, lrt) (GFXCMD_None)
|
||||
#define gsDPSetTextureImage(f, s, w, i) (GFXCMD_None)
|
||||
#define gsDPLoadBlock(tile, uls, ult, lrs, dxt) (GFXCMD_None)
|
||||
#define gsDPLoadSync() (GFXCMD_None)
|
||||
|
||||
typedef int64_t Gfx;
|
||||
Reference in New Issue
Block a user