Changed u16 to u32 ids thanks to someone2639 on soundcloud xd

This commit is contained in:
KiritoDv 2021-05-31 18:42:33 +00:00
parent f02de40a1d
commit 701dffa219
3 changed files with 16 additions and 21 deletions

View File

@ -161,17 +161,19 @@
CMD_BBH(0x20, 0x04, 0x0000)
#define LOAD_MODEL_FROM_DL(model, dl, layer) \
CMD_BBH(0x21, 0x0C, 0), \
CMD_BBH(0x21, 0x10, 0), \
CMD_PTR(dl), \
CMD_HH(layer, model)
CMD_W(layer), \
CMD_W(model)
#define LOAD_MODEL_FROM_GEO(model, geo) \
CMD_BBH(0x22, 0x08, model), \
CMD_PTR(geo)
CMD_BBH(0x22, 0x0C, 0), \
CMD_PTR(geo), \
CMD_W(model)
// unk8 is float, but doesn't really matter since CMD23 is unused
#define CMD23(model, unk4, unk8) \
CMD_BBH(0x22, 0x08, model), \
CMD_BBH(0x22, 0x08, 0), \
CMD_PTR(unk4), \
CMD_W(unk8)
@ -180,7 +182,7 @@
CMD_HHHHHH(posX, posY, posZ, angleX, angleY, angleZ), \
CMD_W(behParam), \
CMD_PTR(beh), \
CMD_HH(0, model)
CMD_W(model)
#define OBJECT(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh) \
OBJECT_WITH_ACTS(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh, 0x1F)
@ -189,7 +191,7 @@
CMD_BBH(0x25, 0x10, 0), \
CMD_W(behArg), \
CMD_PTR(beh), \
CMD_HH(0, model)
CMD_W(model)
#define WARP_NODE(id, destLevel, destArea, destNode, flags) \
CMD_BBBB(0x26, 0x08, id, destLevel), \

View File

@ -327,8 +327,6 @@ static void level_cmd_alloc_level_pool(void) {
sLevelPool = alloc_only_pool_init();
}
printf("Called alloc level pool\n");
sCurrentCmd = CMD_NEXT;
}
@ -376,8 +374,8 @@ static void level_cmd_end_area(void) {
}
static void level_cmd_load_model_from_dl(void) {
u32 model = CMD_GET(u32, 0xA);
s64 layer = CMD_GET(u16, 0x8);
u32 model = CMD_GET(u32, 0xC);
u32 layer = CMD_GET(u32, 0x8);
void *dl_ptr = CMD_GET(void *, 4);
bind_graph_node(model, (struct GraphNode *) init_graph_node_display_list(sLevelPool, 0, layer, dl_ptr));
@ -385,10 +383,10 @@ static void level_cmd_load_model_from_dl(void) {
}
static void level_cmd_load_model_from_geo(void) {
u32 arg0 = CMD_GET(u32, 2);
void *arg1 = CMD_GET(void *, 4);
u32 model = CMD_GET(u32, 8);
void *geo = CMD_GET(void *, 4);
bind_graph_node(arg0, process_geo_layout(sLevelPool, arg1));
bind_graph_node(model, process_geo_layout(sLevelPool, geo));
sCurrentCmd = CMD_NEXT;
}
@ -412,7 +410,7 @@ static void level_cmd_23(void) {
}
static void level_cmd_init_mario(void) {
u32 model = CMD_GET(u32, 0xE);
u32 model = CMD_GET(u32, 0xC);
vec3s_set(gMarioSpawnInfo->startPos, 0, 0, 0);
vec3s_set(gMarioSpawnInfo->startAngle, 0, 0, 0);
@ -421,7 +419,6 @@ static void level_cmd_init_mario(void) {
gMarioSpawnInfo->behaviorArg = CMD_GET(u32, 4);
gMarioSpawnInfo->behaviorScript = CMD_GET(void *, 8);
gMarioSpawnInfo->unk18 = get_graph_node(model);
printf("level_cmd_init_mario %d\n", model);
gMarioSpawnInfo->next = NULL;
sCurrentCmd = CMD_NEXT;
@ -429,9 +426,8 @@ static void level_cmd_init_mario(void) {
static void level_cmd_place_object(void) {
u8 val7 = 1 << (gCurrActNum - 1);
u32 model = CMD_GET(u32, 0x1A);
u32 model = CMD_GET(u32, 0x18);
struct SpawnInfo *spawnInfo;
printf("level_cmd_place_object %d\n", model);
if (sCurrAreaIndex != -1 && ((CMD_GET(u8, 2) & val7) || CMD_GET(u8, 2) == 0x1F)) {
spawnInfo = alloc_only_pool_alloc(sLevelPool, sizeof(struct SpawnInfo));

View File

@ -535,7 +535,6 @@ struct Object *spawn_object_at_origin(struct Object *parent, UNUSED s32 unusedAr
obj->parentObj = parent;
obj->header.gfx.unk18 = parent->header.gfx.unk18;
obj->header.gfx.unk19 = parent->header.gfx.unk18;
printf("spawn_object_at_origin %d\n", model);
geo_obj_init((struct GraphNodeObject *) &obj->header.gfx, get_graph_node(model), gVec3fZero,
gVec3sZero);
@ -1122,7 +1121,6 @@ void cur_obj_get_dropped(void) {
}
void cur_obj_set_model(u32 modelID) {
printf("cur_obj_set_model %d\n", modelID);
o->header.gfx.sharedChild = get_graph_node(modelID);
}
@ -2739,7 +2737,6 @@ s32 cur_obj_update_dialog_with_cutscene(s32 actionArg, s32 dialogFlags, s32 cuts
}
s32 cur_obj_has_model(u32 modelID) {
printf("cur_obj_has_model %d\n", modelID);
return o->header.gfx.sharedChild == get_graph_node(modelID);
}