Skip to content

Commit

Permalink
intelmap.cpp: Fix some uses of psCurrentMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Nov 4, 2023
1 parent 545da52 commit f8f25c8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/intelmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,6 @@ static void StartMessageSequences(MESSAGE *psMessage, bool Start)
VIEW_REPLAY *psViewReplay;
UDWORD Sequence;

// Surely we don't need to set up psCurrentMsg when we pass the message into this routine ... tim
psViewReplay = (VIEW_REPLAY *)psMessage->pViewData->pData;

seq_ClearSeqList();
Expand Down Expand Up @@ -887,7 +886,7 @@ static void StartMessageSequences(MESSAGE *psMessage, bool Start)
VIEW_RESEARCH *psViewReplay;
//UDWORD Sequence;

psViewReplay = (VIEW_RESEARCH *)psCurrentMsg->pViewData->pData;
psViewReplay = (VIEW_RESEARCH *)psMessage->pViewData->pData;

seq_ClearSeqList();
seq_AddSeqToList(psViewReplay->sequenceName, psViewReplay->audio, nullptr, false);
Expand Down Expand Up @@ -1097,7 +1096,6 @@ void intDisplayPIEView(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset)
{
MESSAGE *psMessage = (MESSAGE *)psWidget->pUserData;
SWORD image = -1;
RESEARCH *psResearch;

// Should not have any proximity messages here...
if (!psMessage || psMessage->type == MSG_PROXIMITY)
Expand All @@ -1122,14 +1120,13 @@ void intDisplayPIEView(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset)
}

//render an object
psResearch = getResearchForMsg(psCurrentMsg->pViewData);
RESEARCH *psResearch = getResearchForMsg(psMessage->pViewData);
if (psResearch)
{
renderResearchToBuffer(psResearch, x0 + width / 2, y0 + height / 2);
}

//draw image icon in top left of window
psResearch = getResearchForMsg(psMessage->pViewData);
if (psResearch)
{
image = (SWORD)(psResearch->iconID);
Expand Down Expand Up @@ -1167,7 +1164,7 @@ void intDisplayFLICView(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset)
}

RenderWindowFrame(FRAME_NORMAL, x0, y0, x1 - x0, y1 - y0);
psViewResearch = (VIEW_RESEARCH *)psCurrentMsg->pViewData->pData;
psViewResearch = (VIEW_RESEARCH *)psMessage->pViewData->pData;
// set the dimensions to window size & position
seq_SetDisplaySize(INTMAP_FLICWIDTH, INTMAP_FLICHEIGHT, x0, y0);
//render a frame of the current movie *must* force above resolution!
Expand Down

0 comments on commit f8f25c8

Please sign in to comment.