mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-20 13:44:53 -04:00
Sort out g_Briefing struct
This commit is contained in:
@@ -3058,11 +3058,11 @@ void setupParseObjects(s32 stagenum)
|
||||
g_Vars.textoverrides = NULL;
|
||||
|
||||
for (j = 0; j != 6; j++) {
|
||||
g_Briefing.objectivenames[j + 1] = 0;
|
||||
g_Briefing.objectivedifficulties[j + 1] = 0;
|
||||
g_Briefing.objectivenames[j] = 0;
|
||||
g_Briefing.objectivedifficulties[j] = 0;
|
||||
}
|
||||
|
||||
g_Briefing.objectivenames[0] = L_MISC(42); // "No briefing for this mission"
|
||||
g_Briefing.briefingtextnum = L_MISC(42); // "No briefing for this mission"
|
||||
|
||||
if (stagenum < STAGE_TITLE) {
|
||||
if (g_StageSetup.padfiledata) {
|
||||
@@ -3556,7 +3556,7 @@ void setupParseObjects(s32 stagenum)
|
||||
}
|
||||
|
||||
if (briefing->type == wanttype) {
|
||||
g_Briefing.objectivenames[0] = briefing->text;
|
||||
g_Briefing.briefingtextnum = briefing->text;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -3577,8 +3577,8 @@ void setupParseObjects(s32 stagenum)
|
||||
func0f010a98(obj);
|
||||
|
||||
if (objective->index < 7) {
|
||||
g_Briefing.objectivenames[objective->index + 1] = objective->text;
|
||||
g_Briefing.objectivedifficulties[objective->index + 1] = (s8)objective->difficulty;
|
||||
g_Briefing.objectivenames[objective->index] = objective->text;
|
||||
g_Briefing.objectivedifficulties[objective->index] = (s8)objective->difficulty;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -44,8 +44,8 @@ glabel func0f0109d0
|
||||
/* f010a30: ac40fffc */ sw $zero,-0x4($v0)
|
||||
/* f010a34: 3c01800a */ lui $at,%hi(g_TagsLinkedList)
|
||||
/* f010a38: ac20d0b0 */ sw $zero,%lo(g_TagsLinkedList)($at)
|
||||
/* f010a3c: 3c01800a */ lui $at,%hi(var8009d0b4)
|
||||
/* f010a40: ac20d0b4 */ sw $zero,%lo(var8009d0b4)($at)
|
||||
/* f010a3c: 3c01800a */ lui $at,%hi(g_BriefingObjs)
|
||||
/* f010a40: ac20d0b4 */ sw $zero,%lo(g_BriefingObjs)($at)
|
||||
/* f010a44: 3c01800a */ lui $at,%hi(g_RoomEnteredCriterias)
|
||||
/* f010a48: ac20d0b8 */ sw $zero,%lo(g_RoomEnteredCriterias)($at)
|
||||
/* f010a4c: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
@@ -69,8 +69,8 @@ glabel tagInsert
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel briefingInsert
|
||||
/* f010a80: 3c02800a */ lui $v0,%hi(var8009d0b4)
|
||||
/* f010a84: 2442d0b4 */ addiu $v0,$v0,%lo(var8009d0b4)
|
||||
/* f010a80: 3c02800a */ lui $v0,%hi(g_BriefingObjs)
|
||||
/* f010a84: 2442d0b4 */ addiu $v0,$v0,%lo(g_BriefingObjs)
|
||||
/* f010a88: 8c4e0000 */ lw $t6,0x0($v0)
|
||||
/* f010a8c: ac8e000c */ sw $t6,0xc($a0)
|
||||
/* f010a90: 03e00008 */ jr $ra
|
||||
|
||||
+14
-14
@@ -720,7 +720,7 @@ s32 menudialog00103608(u32 operation, struct menudialog *dialog, union handlerda
|
||||
g_Menus[g_MpPlayerNum].unk848, &g_Briefing);
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
langClearBank(var8009dfe0[1]);
|
||||
langClearBank(g_Briefing.langbank);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3895,38 +3895,38 @@ struct menudialog g_SoloAbortShortMenuDialog = {
|
||||
s32 soloMenuDialogPauseStatus(u32 operation, struct menudialog *dialog, union handlerdata *data)
|
||||
{
|
||||
if (operation == MENUOP_OPEN) {
|
||||
struct objectivething *thing = var8009d0b4;
|
||||
struct briefingobj *briefing = g_BriefingObjs;
|
||||
struct objective *objective;
|
||||
s32 iVar3 = 1;
|
||||
s32 wanttype = BRIEFINGTYPE_TEXT_PA;
|
||||
s32 i;
|
||||
|
||||
if (getDifficulty() == DIFF_A) {
|
||||
iVar3 = 3;
|
||||
wanttype = BRIEFINGTYPE_TEXT_A;
|
||||
}
|
||||
|
||||
if (getDifficulty() == DIFF_SA) {
|
||||
iVar3 = 2;
|
||||
wanttype = BRIEFINGTYPE_TEXT_SA;
|
||||
}
|
||||
|
||||
g_Briefing.objectivenames[0] = L_MISC(42); // "No briefing for this mission"
|
||||
g_Briefing.briefingtextnum = L_MISC(42); // "No briefing for this mission"
|
||||
|
||||
while (thing) {
|
||||
if (thing->unk04 == 1) {
|
||||
g_Briefing.objectivenames[0] = thing->name;
|
||||
while (briefing) {
|
||||
if (briefing->type == BRIEFINGTYPE_TEXT_PA) {
|
||||
g_Briefing.briefingtextnum = briefing->text;
|
||||
}
|
||||
|
||||
if (thing->unk04 == iVar3) {
|
||||
g_Briefing.objectivenames[0] = thing->name;
|
||||
if (briefing->type == wanttype) {
|
||||
g_Briefing.briefingtextnum = briefing->text;
|
||||
break;
|
||||
}
|
||||
|
||||
thing = thing->next;
|
||||
briefing = briefing->next;
|
||||
}
|
||||
|
||||
for (i = 0; i < objectiveGetCount(); i++) {
|
||||
if (g_Objectives[i]) {
|
||||
g_Briefing.objectivenames[i + 1] = g_Objectives[i]->text;
|
||||
g_Briefing.objectivedifficulties[i + 1] = objectiveGetDifficultyBits(i);
|
||||
g_Briefing.objectivenames[i] = g_Objectives[i]->text;
|
||||
g_Briefing.objectivedifficulties[i] = objectiveGetDifficultyBits(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3894,8 +3894,8 @@ Gfx *menuRenderItemObjectives(Gfx *gdl, struct menurendercontext *context)
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (g_Briefing.objectivenames[i + 1]
|
||||
&& g_Briefing.objectivedifficulties[i + 1] & (1 << getDifficulty())) {
|
||||
if (g_Briefing.objectivenames[i]
|
||||
&& g_Briefing.objectivedifficulties[i] & (1 << getDifficulty())) {
|
||||
gdl = menuRenderObjective(gdl,
|
||||
context->frame,
|
||||
i, position, context->x, y, context->width, context->height,
|
||||
@@ -6164,7 +6164,7 @@ char *menuItemScrollableGetText(u32 type)
|
||||
case DESCRIPTION_DEVICETIP2: return dtGetTip2();
|
||||
}
|
||||
|
||||
return langGet(g_Briefing.objectivenames[0]);
|
||||
return langGet(g_Briefing.briefingtextnum);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user