Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intelmap.cpp: Fix some uses of psCurrentMsg #3467

Merged
merged 1 commit into from
Nov 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading