mirror of https://github.com/zeldaret/mm.git
document object_kanban (cuttable sign) (#1364)
* initial commit of doc * comment * model and material * indeed c file exists * renamed confusing stuff * space Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
parent
9e72c240d9
commit
d635b81ee6
|
@ -1,18 +1,19 @@
|
||||||
<Root>
|
<Root>
|
||||||
|
<!-- Assets for cuttable signs -->
|
||||||
<File Name="object_kanban" Segment="6">
|
<File Name="object_kanban" Segment="6">
|
||||||
<DList Name="object_kanban_DL_000C30" Offset="0xC30" />
|
<DList Name="gSignMaterialDL" Offset="0xC30" />
|
||||||
<DList Name="object_kanban_DL_000CB0" Offset="0xCB0" /> <!-- Original name is "kanban_L_top_R_model" -->
|
<DList Name="gSignUpperSideLeftModelDL" Offset="0xCB0" /> <!-- Original name is "kanban_L_top_R_model" -->
|
||||||
<DList Name="object_kanban_DL_000DB8" Offset="0xDB8" /> <!-- Original name is "kanban_L_top_L_model" -->
|
<DList Name="gSignLeftSideUpperModelDL" Offset="0xDB8" /> <!-- Original name is "kanban_L_top_L_model" -->
|
||||||
<DList Name="object_kanban_DL_000E78" Offset="0xE78" /> <!-- Original name is "kanban_L_bottom_L_model" -->
|
<DList Name="gSignLeftSideLowerModelDL" Offset="0xE78" /> <!-- Original name is "kanban_L_bottom_L_model" -->
|
||||||
<DList Name="object_kanban_DL_000F38" Offset="0xF38" /> <!-- Original name is "kanban_R_top_R_model" -->
|
<DList Name="gSignRightSideUpperModelDL" Offset="0xF38" /> <!-- Original name is "kanban_R_top_R_model" -->
|
||||||
<DList Name="object_kanban_DL_000FF8" Offset="0xFF8" /> <!-- Original name is "kanban_R_bottom_R_model" -->
|
<DList Name="gSignRightSideLowerModelDL" Offset="0xFF8" /> <!-- Original name is "kanban_R_bottom_R_model" -->
|
||||||
<DList Name="object_kanban_DL_0010B8" Offset="0x10B8" /> <!-- Original name is "kanban_L_bottom_R_model" -->
|
<DList Name="gSignLowerSideLeftModelDL" Offset="0x10B8" /> <!-- Original name is "kanban_L_bottom_R_model" -->
|
||||||
<DList Name="object_kanban_DL_0011C0" Offset="0x11C0" /> <!-- Original name is "kanban_R_top_L_model" -->
|
<DList Name="gSignUpperSideRightModelDL" Offset="0x11C0" /> <!-- Original name is "kanban_R_top_L_model" -->
|
||||||
<DList Name="object_kanban_DL_0012C8" Offset="0x12C8" /> <!-- Original name is "kanban_R_bottom_L_model" -->
|
<DList Name="gSignLowerSideRightModelDL" Offset="0x12C8" /> <!-- Original name is "kanban_R_bottom_L_model" -->
|
||||||
<DList Name="object_kanban_DL_0013D0" Offset="0x13D0" /> <!-- Original name is "kanban_bo_top_model" -->
|
<DList Name="gSignPostUpperModelDL" Offset="0x13D0" /> <!-- Original name is "kanban_bo_top_model" -->
|
||||||
<DList Name="object_kanban_DL_001488" Offset="0x1488" /> <!-- Original name is "kanban_bo_center_model" -->
|
<DList Name="gSignPostLowerModelDL" Offset="0x1488" /> <!-- Original name is "kanban_bo_center_model" -->
|
||||||
<DList Name="object_kanban_DL_001540" Offset="0x1540" /> <!-- Original name is "kanban_bo_bottom_model" -->
|
<DList Name="gSignPostStandModelDL" Offset="0x1540" /> <!-- Original name is "kanban_bo_bottom_model" -->
|
||||||
<DList Name="object_kanban_DL_001630" Offset="0x1630" /> <!-- Original name is "kanban_eff_modelT" -->
|
<DList Name="gSignParticleDL" Offset="0x1630" /> <!-- Original name is "kanban_eff_modelT" -->
|
||||||
<Texture Name="object_kanban_Tex_0016B0" OutName="tex_0016B0" Format="i8" Width="16" Height="16" Offset="0x16B0" />
|
<Texture Name="gSignParticleTex" OutName="sign_particle" Format="i8" Width="16" Height="16" Offset="0x16B0" />
|
||||||
</File>
|
</File>
|
||||||
</Root>
|
</Root>
|
||||||
|
|
|
@ -50,8 +50,9 @@ static ColliderCylinderInit sCylinderInit = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static u16 sPartFlags[] = {
|
static u16 sPartFlags[] = {
|
||||||
PART_UPPER_LEFT, PART_LEFT_UPPER, PART_LEFT_LOWER, PART_RIGHT_UPPER, PART_RIGHT_LOWER, PART_LOWER_LEFT,
|
PART_UPPER_SIDE_LEFT, PART_LEFT_SIDE_UPPER, PART_LEFT_SIDE_LOWER, PART_RIGHT_SIDE_UPPER,
|
||||||
PART_UPPER_RIGHT, PART_LOWER_RIGHT, PART_POST_UPPER, PART_POST_LOWER, PART_POST_STAND,
|
PART_RIGHT_SIDE_LOWER, PART_LOWER_SIDE_LEFT, PART_UPPER_SIDE_RIGHT, PART_LOWER_SIDE_RIGHT,
|
||||||
|
PART_POST_UPPER, PART_POST_LOWER, PART_POST_STAND,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Vec3f sPieceOffsets[] = {
|
static Vec3f sPieceOffsets[] = {
|
||||||
|
@ -289,40 +290,48 @@ void EnKanban_Update(Actor* thisx, PlayState* play) {
|
||||||
this->zTargetTimer = 10;
|
this->zTargetTimer = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((piece->partFlags & PART_UPPER_LEFT) && (piece->partFlags & PART_LOWER_RIGHT)) {
|
if ((piece->partFlags & PART_UPPER_SIDE_LEFT) && (piece->partFlags & PART_LOWER_SIDE_RIGHT)) {
|
||||||
piece->pieceType = PIECE_WHOLE_SIGN;
|
piece->pieceType = PIECE_WHOLE_SIGN;
|
||||||
} else if ((piece->partFlags & PART_LEFT_UPPER) && (piece->partFlags & PART_RIGHT_UPPER)) {
|
} else if ((piece->partFlags & PART_LEFT_SIDE_UPPER) &&
|
||||||
|
(piece->partFlags & PART_RIGHT_SIDE_UPPER)) {
|
||||||
piece->pieceType = PIECE_UPPER_HALF;
|
piece->pieceType = PIECE_UPPER_HALF;
|
||||||
} else if ((piece->partFlags & PART_LEFT_LOWER) && (piece->partFlags & PART_RIGHT_LOWER)) {
|
} else if ((piece->partFlags & PART_LEFT_SIDE_LOWER) &&
|
||||||
|
(piece->partFlags & PART_RIGHT_SIDE_LOWER)) {
|
||||||
piece->pieceType = PIECE_LOWER_HALF;
|
piece->pieceType = PIECE_LOWER_HALF;
|
||||||
} else if ((piece->partFlags & PART_UPPER_RIGHT) && (piece->partFlags & PART_LOWER_RIGHT)) {
|
} else if ((piece->partFlags & PART_UPPER_SIDE_RIGHT) &&
|
||||||
|
(piece->partFlags & PART_LOWER_SIDE_RIGHT)) {
|
||||||
piece->pieceType = PIECE_RIGHT_HALF;
|
piece->pieceType = PIECE_RIGHT_HALF;
|
||||||
} else if ((piece->partFlags & PART_UPPER_LEFT) && (piece->partFlags & PART_LOWER_LEFT)) {
|
} else if ((piece->partFlags & PART_UPPER_SIDE_LEFT) &&
|
||||||
|
(piece->partFlags & PART_LOWER_SIDE_LEFT)) {
|
||||||
piece->pieceType = PIECE_LEFT_HALF;
|
piece->pieceType = PIECE_LEFT_HALF;
|
||||||
} else if ((piece->partFlags & PART_UPPER_LEFT) && (piece->partFlags & PART_LEFT_UPPER)) {
|
} else if ((piece->partFlags & PART_UPPER_SIDE_LEFT) &&
|
||||||
|
(piece->partFlags & PART_LEFT_SIDE_UPPER)) {
|
||||||
piece->pieceType = PIECE_2ND_QUAD;
|
piece->pieceType = PIECE_2ND_QUAD;
|
||||||
} else if ((piece->partFlags & PART_UPPER_RIGHT) && (piece->partFlags & PART_RIGHT_UPPER)) {
|
} else if ((piece->partFlags & PART_UPPER_SIDE_RIGHT) &&
|
||||||
|
(piece->partFlags & PART_RIGHT_SIDE_UPPER)) {
|
||||||
piece->pieceType = PIECE_1ST_QUAD;
|
piece->pieceType = PIECE_1ST_QUAD;
|
||||||
} else if ((piece->partFlags & PART_LEFT_LOWER) && (piece->partFlags & PART_LOWER_LEFT)) {
|
} else if ((piece->partFlags & PART_LEFT_SIDE_LOWER) &&
|
||||||
|
(piece->partFlags & PART_LOWER_SIDE_LEFT)) {
|
||||||
piece->pieceType = PIECE_3RD_QUAD;
|
piece->pieceType = PIECE_3RD_QUAD;
|
||||||
} else if ((piece->partFlags & PART_RIGHT_LOWER) && (piece->partFlags & PART_LOWER_RIGHT)) {
|
} else if ((piece->partFlags & PART_RIGHT_SIDE_LOWER) &&
|
||||||
|
(piece->partFlags & PART_LOWER_SIDE_RIGHT)) {
|
||||||
piece->pieceType = PIECE_4TH_QUAD;
|
piece->pieceType = PIECE_4TH_QUAD;
|
||||||
} else if (piece->partFlags & PART_UPPER_LEFT) {
|
} else if (piece->partFlags & PART_UPPER_SIDE_LEFT) {
|
||||||
piece->pieceType = PIECE_UPPER_LEFT;
|
piece->pieceType = PIECE_UPPER_SIDE_LEFT;
|
||||||
} else if (piece->partFlags & PART_LEFT_UPPER) {
|
} else if (piece->partFlags & PART_LEFT_SIDE_UPPER) {
|
||||||
piece->pieceType = PIECE_LEFT_UPPER;
|
piece->pieceType = PIECE_LEFT_SIDE_UPPER;
|
||||||
} else if (piece->partFlags & PART_LEFT_LOWER) {
|
} else if (piece->partFlags & PART_LEFT_SIDE_LOWER) {
|
||||||
piece->pieceType = PIECE_LEFT_LOWER;
|
piece->pieceType = PIECE_LEFT_SIDE_LOWER;
|
||||||
} else if (piece->partFlags & PART_LOWER_LEFT) {
|
} else if (piece->partFlags & PART_LOWER_SIDE_LEFT) {
|
||||||
piece->pieceType = PIECE_LOWER_LEFT;
|
piece->pieceType = PIECE_LOWER_SIDE_LEFT;
|
||||||
} else if (piece->partFlags & PART_UPPER_RIGHT) {
|
} else if (piece->partFlags & PART_UPPER_SIDE_RIGHT) {
|
||||||
piece->pieceType = PIECE_UPPER_RIGHT;
|
piece->pieceType = PIECE_UPPER_SIDE_RIGHT;
|
||||||
} else if (piece->partFlags & PART_RIGHT_UPPER) {
|
} else if (piece->partFlags & PART_RIGHT_SIDE_UPPER) {
|
||||||
piece->pieceType = PIECE_RIGHT_UPPER;
|
piece->pieceType = PIECE_RIGHT_SIDE_UPPER;
|
||||||
} else if (piece->partFlags & PART_RIGHT_LOWER) {
|
} else if (piece->partFlags & PART_RIGHT_SIDE_LOWER) {
|
||||||
piece->pieceType = PIECE_RIGHT_LOWER;
|
piece->pieceType = PIECE_RIGHT_SIDE_LOWER;
|
||||||
} else if (piece->partFlags & PART_LOWER_RIGHT) {
|
} else if (piece->partFlags & PART_LOWER_SIDE_RIGHT) {
|
||||||
piece->pieceType = PIECE_LOWER_RIGHT;
|
piece->pieceType = PIECE_LOWER_SIDE_RIGHT;
|
||||||
} else if (piece->partFlags & PART_POST_UPPER) {
|
} else if (piece->partFlags & PART_POST_UPPER) {
|
||||||
piece->pieceType = PIECE_POST_UPPER;
|
piece->pieceType = PIECE_POST_UPPER;
|
||||||
} else if (piece->partFlags & PART_POST_LOWER) {
|
} else if (piece->partFlags & PART_POST_LOWER) {
|
||||||
|
@ -891,9 +900,9 @@ void EnKanban_Update(Actor* thisx, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Gfx* sDisplayLists[] = {
|
static Gfx* sDisplayLists[] = {
|
||||||
object_kanban_DL_000CB0, object_kanban_DL_000DB8, object_kanban_DL_000E78, object_kanban_DL_000F38,
|
gSignUpperSideLeftModelDL, gSignLeftSideUpperModelDL, gSignLeftSideLowerModelDL, gSignRightSideUpperModelDL,
|
||||||
object_kanban_DL_000FF8, object_kanban_DL_0010B8, object_kanban_DL_0011C0, object_kanban_DL_0012C8,
|
gSignRightSideLowerModelDL, gSignLowerSideLeftModelDL, gSignUpperSideRightModelDL, gSignLowerSideRightModelDL,
|
||||||
object_kanban_DL_0013D0, object_kanban_DL_001488, object_kanban_DL_001540,
|
gSignPostUpperModelDL, gSignPostLowerModelDL, gSignPostStandModelDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "z_en_kanban_gfx.c"
|
#include "z_en_kanban_gfx.c"
|
||||||
|
@ -924,7 +933,7 @@ void EnKanban_Draw(Actor* thisx, PlayState* play) {
|
||||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||||
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
Gfx_SetupDL25_Xlu(play->state.gfxCtx);
|
||||||
|
|
||||||
gSPDisplayList(POLY_OPA_DISP++, object_kanban_DL_000C30);
|
gSPDisplayList(POLY_OPA_DISP++, gSignMaterialDL);
|
||||||
|
|
||||||
if (this->actionState != ENKANBAN_SIGN) {
|
if (this->actionState != ENKANBAN_SIGN) {
|
||||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||||
|
@ -983,7 +992,7 @@ void EnKanban_Draw(Actor* thisx, PlayState* play) {
|
||||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x00, 255, 255, 255, this->cutMarkAlpha);
|
gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x00, 255, 255, 255, this->cutMarkAlpha);
|
||||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 150, 0);
|
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 150, 0);
|
||||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(POLY_XLU_DISP++, object_kanban_DL_001630);
|
gSPDisplayList(POLY_XLU_DISP++, gSignParticleDL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,22 +5,22 @@
|
||||||
|
|
||||||
struct EnKanban;
|
struct EnKanban;
|
||||||
|
|
||||||
#define PART_UPPER_LEFT (1 << 0)
|
#define PART_UPPER_SIDE_LEFT (1 << 0)
|
||||||
#define PART_LEFT_UPPER (1 << 1)
|
#define PART_LEFT_SIDE_UPPER (1 << 1)
|
||||||
#define PART_LEFT_LOWER (1 << 2)
|
#define PART_LEFT_SIDE_LOWER (1 << 2)
|
||||||
#define PART_RIGHT_UPPER (1 << 3)
|
#define PART_RIGHT_SIDE_UPPER (1 << 3)
|
||||||
#define PART_RIGHT_LOWER (1 << 4)
|
#define PART_RIGHT_SIDE_LOWER (1 << 4)
|
||||||
#define PART_LOWER_LEFT (1 << 5)
|
#define PART_LOWER_SIDE_LEFT (1 << 5)
|
||||||
#define PART_UPPER_RIGHT (1 << 6)
|
#define PART_UPPER_SIDE_RIGHT (1 << 6)
|
||||||
#define PART_LOWER_RIGHT (1 << 7)
|
#define PART_LOWER_SIDE_RIGHT (1 << 7)
|
||||||
#define PART_POST_UPPER (1 << 8)
|
#define PART_POST_UPPER (1 << 8)
|
||||||
#define PART_POST_LOWER (1 << 9)
|
#define PART_POST_LOWER (1 << 9)
|
||||||
#define PART_POST_STAND (1 << 10)
|
#define PART_POST_STAND (1 << 10)
|
||||||
#define LEFT_HALF (PART_UPPER_LEFT | PART_LEFT_UPPER | PART_LEFT_LOWER | PART_LOWER_LEFT)
|
#define LEFT_HALF (PART_UPPER_SIDE_LEFT | PART_LEFT_SIDE_UPPER | PART_LEFT_SIDE_LOWER | PART_LOWER_SIDE_LEFT)
|
||||||
#define RIGHT_HALF (PART_UPPER_RIGHT | PART_RIGHT_UPPER | PART_RIGHT_LOWER | PART_LOWER_RIGHT)
|
#define RIGHT_HALF (PART_UPPER_SIDE_RIGHT | PART_RIGHT_SIDE_UPPER | PART_RIGHT_SIDE_LOWER | PART_LOWER_SIDE_RIGHT)
|
||||||
#define UPPER_HALF (PART_POST_UPPER | PART_UPPER_RIGHT | PART_RIGHT_UPPER | PART_UPPER_LEFT | PART_LEFT_UPPER)
|
#define UPPER_HALF (PART_POST_UPPER | PART_UPPER_SIDE_RIGHT | PART_RIGHT_SIDE_UPPER | PART_UPPER_SIDE_LEFT | PART_LEFT_SIDE_UPPER)
|
||||||
#define UPPERLEFT_HALF (PART_POST_UPPER | PART_UPPER_RIGHT | PART_LEFT_LOWER | PART_UPPER_LEFT | PART_LEFT_UPPER)
|
#define UPPERLEFT_HALF (PART_POST_UPPER | PART_UPPER_SIDE_RIGHT | PART_LEFT_SIDE_LOWER | PART_UPPER_SIDE_LEFT | PART_LEFT_SIDE_UPPER)
|
||||||
#define UPPERRIGHT_HALF (PART_POST_UPPER | PART_UPPER_RIGHT | PART_RIGHT_UPPER | PART_UPPER_LEFT | PART_RIGHT_LOWER)
|
#define UPPERRIGHT_HALF (PART_POST_UPPER | PART_UPPER_SIDE_RIGHT | PART_RIGHT_SIDE_UPPER | PART_UPPER_SIDE_LEFT | PART_RIGHT_SIDE_LOWER)
|
||||||
#define ALL_PARTS (LEFT_HALF | RIGHT_HALF | PART_POST_UPPER | PART_POST_LOWER)
|
#define ALL_PARTS (LEFT_HALF | RIGHT_HALF | PART_POST_UPPER | PART_POST_LOWER)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -42,14 +42,14 @@ typedef enum {
|
||||||
/* 6 */ PIECE_1ST_QUAD,
|
/* 6 */ PIECE_1ST_QUAD,
|
||||||
/* 7 */ PIECE_3RD_QUAD,
|
/* 7 */ PIECE_3RD_QUAD,
|
||||||
/* 8 */ PIECE_4TH_QUAD,
|
/* 8 */ PIECE_4TH_QUAD,
|
||||||
/* 9 */ PIECE_UPPER_LEFT,
|
/* 9 */ PIECE_UPPER_SIDE_LEFT,
|
||||||
/* 10 */ PIECE_LEFT_UPPER,
|
/* 10 */ PIECE_LEFT_SIDE_UPPER,
|
||||||
/* 11 */ PIECE_LEFT_LOWER,
|
/* 11 */ PIECE_LEFT_SIDE_LOWER,
|
||||||
/* 12 */ PIECE_LOWER_LEFT,
|
/* 12 */ PIECE_LOWER_SIDE_LEFT,
|
||||||
/* 13 */ PIECE_UPPER_RIGHT,
|
/* 13 */ PIECE_UPPER_SIDE_RIGHT,
|
||||||
/* 14 */ PIECE_RIGHT_UPPER,
|
/* 14 */ PIECE_RIGHT_SIDE_UPPER,
|
||||||
/* 15 */ PIECE_RIGHT_LOWER,
|
/* 15 */ PIECE_RIGHT_SIDE_LOWER,
|
||||||
/* 16 */ PIECE_LOWER_RIGHT,
|
/* 16 */ PIECE_LOWER_SIDE_RIGHT,
|
||||||
/* 17 */ PIECE_POST_UPPER,
|
/* 17 */ PIECE_POST_UPPER,
|
||||||
/* 18 */ PIECE_POST_LOWER,
|
/* 18 */ PIECE_POST_LOWER,
|
||||||
/* 100 */ PIECE_OTHER = 100
|
/* 100 */ PIECE_OTHER = 100
|
||||||
|
|
Loading…
Reference in New Issue