Decompile objectiveInsert
This commit is contained in:
parent
03d52d0e97
commit
46deaccf96
|
|
@ -3228,13 +3228,13 @@ void setupParseObjects(s32 stagenum)
|
|||
break;
|
||||
case OBJTYPE_BEGINOBJECTIVE:
|
||||
{
|
||||
struct beginobjectiveobj *objective = (struct beginobjectiveobj *)obj;
|
||||
struct objective *objective = (struct objective *)obj;
|
||||
|
||||
func0f010a98(obj);
|
||||
objectiveInsert(objective);
|
||||
|
||||
if (objective->index < 7) {
|
||||
if ((u32)objective->index < 7) {
|
||||
g_Briefing.objectivenames[objective->index] = objective->text;
|
||||
g_Briefing.objectivedifficulties[objective->index] = (s8)objective->difficulty;
|
||||
g_Briefing.objectivedifficulties[objective->index] = objective->difficulties;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -69,25 +69,14 @@ void briefingInsert(struct briefingobj *briefing)
|
|||
g_BriefingObjs = briefing;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f010a98
|
||||
/* f010a98: 8c8e0004 */ lw $t6,0x4($a0)
|
||||
/* f010a9c: 3c01800a */ lui $at,%hi(g_Objectives)
|
||||
/* f010aa0: 3c038007 */ lui $v1,%hi(g_ObjectiveLastIndex)
|
||||
/* f010aa4: 000e7880 */ sll $t7,$t6,0x2
|
||||
/* f010aa8: 002f0821 */ addu $at,$at,$t7
|
||||
/* f010aac: ac24d060 */ sw $a0,%lo(g_Objectives)($at)
|
||||
/* f010ab0: 2463ae70 */ addiu $v1,$v1,%lo(g_ObjectiveLastIndex)
|
||||
/* f010ab4: 8c780000 */ lw $t8,0x0($v1)
|
||||
/* f010ab8: 8c820004 */ lw $v0,0x4($a0)
|
||||
/* f010abc: 0302082a */ slt $at,$t8,$v0
|
||||
/* f010ac0: 10200002 */ beqz $at,.L0f010acc
|
||||
/* f010ac4: 00000000 */ nop
|
||||
/* f010ac8: ac620000 */ sw $v0,0x0($v1)
|
||||
.L0f010acc:
|
||||
/* f010acc: 03e00008 */ jr $ra
|
||||
/* f010ad0: 00000000 */ nop
|
||||
);
|
||||
void objectiveInsert(struct objective *objective)
|
||||
{
|
||||
g_Objectives[objective->index] = objective;
|
||||
|
||||
if (g_ObjectiveLastIndex < objective->index) {
|
||||
g_ObjectiveLastIndex = objective->index;
|
||||
}
|
||||
}
|
||||
|
||||
void objectiveAddRoomEnteredCriteria(struct criteria_roomentered *criteria)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
void func0f0109d0(void);
|
||||
void tagInsert(struct tag *tag);
|
||||
void briefingInsert(struct briefingobj *obj);
|
||||
void func0f010a98(struct defaultobj *obj);
|
||||
void objectiveInsert(struct objective *objective);
|
||||
void objectiveAddRoomEnteredCriteria(struct criteria_roomentered *criteria);
|
||||
void objectiveAddMultiroomEnteredCriteria(struct criteria_multiroomentered *criteria);
|
||||
void objectiveAddHolographCriteria(struct criteria_holograph *criteria);
|
||||
|
|
|
|||
|
|
@ -1375,11 +1375,13 @@ struct tag { // objtype 0x16
|
|||
/*0x0c*/ struct defaultobj *obj;
|
||||
};
|
||||
|
||||
struct beginobjectiveobj { // objtype 0x17
|
||||
u32 unk00;
|
||||
u32 index;
|
||||
u32 text;
|
||||
u32 difficulty;
|
||||
struct objective { // objtype 0x17
|
||||
/*0x00*/ u32 unk00;
|
||||
/*0x04*/ s32 index;
|
||||
/*0x08*/ u32 text;
|
||||
/*0x0c*/ u16 unk0c;
|
||||
/*0x0e*/ u8 unk0e;
|
||||
/*0x0f*/ s8 difficulties;
|
||||
};
|
||||
|
||||
struct briefingobj { // objtype 0x23
|
||||
|
|
@ -4736,15 +4738,6 @@ struct activemenuthing {
|
|||
/*0x34*/ u8 unk34;
|
||||
};
|
||||
|
||||
struct objective { // representation of setup file beginobjective macro
|
||||
/*0x00*/ u32 unk00;
|
||||
/*0x04*/ u32 unk04;
|
||||
/*0x08*/ u32 text;
|
||||
/*0x0c*/ u16 unk0c;
|
||||
/*0x0e*/ u8 unk0e;
|
||||
/*0x0f*/ s8 difficulties;
|
||||
};
|
||||
|
||||
struct briefing {
|
||||
u16 briefingtextnum;
|
||||
u16 objectivenames[6]; // index 0 is the briefing, and the rest are objectives
|
||||
|
|
|
|||
Loading…
Reference in New Issue